From 5159cd2beb2e87806a5b54e9991b7895285c9d3e Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Sun, 27 Jan 2013 01:04:16 -0600 Subject: Rename a number of libraries and executables to avoid conflicts with KDE4 --- kio/CMakeLists.txt | 71 - kio/DESIGN | 272 -- kio/DESIGN.krun | 35 - kio/DESIGN.metadata | 147 - kio/DESIGN.mimetypes | 34 - kio/DESKTOP_ENTRY_STANDARD | 373 -- kio/Mainpage.dox | 120 - kio/Makefile.am | 67 - kio/application.desktop | 124 - kio/bookmarks/CMakeLists.txt | 55 - kio/bookmarks/Makefile.am | 40 - kio/bookmarks/dptrtemplate.h | 57 - kio/bookmarks/kbookmark.cc | 535 --- kio/bookmarks/kbookmark.h | 329 -- kio/bookmarks/kbookmarkbar.cc | 554 --- kio/bookmarks/kbookmarkbar.h | 131 - kio/bookmarks/kbookmarkdombuilder.cc | 81 - kio/bookmarks/kbookmarkdombuilder.h | 48 - kio/bookmarks/kbookmarkdrag.cc | 169 - kio/bookmarks/kbookmarkdrag.h | 57 - kio/bookmarks/kbookmarkexporter.cc | 32 - kio/bookmarks/kbookmarkexporter.h | 50 - kio/bookmarks/kbookmarkimporter.cc | 101 - kio/bookmarks/kbookmarkimporter.h | 106 - kio/bookmarks/kbookmarkimporter_crash.cc | 215 - kio/bookmarks/kbookmarkimporter_crash.h | 74 - kio/bookmarks/kbookmarkimporter_ie.cc | 185 - kio/bookmarks/kbookmarkimporter_ie.h | 90 - kio/bookmarks/kbookmarkimporter_kde1.cc | 156 - kio/bookmarks/kbookmarkimporter_kde1.h | 49 - kio/bookmarks/kbookmarkimporter_ns.cc | 243 -- kio/bookmarks/kbookmarkimporter_ns.h | 132 - kio/bookmarks/kbookmarkimporter_opera.cc | 170 - kio/bookmarks/kbookmarkimporter_opera.h | 86 - kio/bookmarks/kbookmarkmanager.cc | 727 ---- kio/bookmarks/kbookmarkmanager.h | 367 -- kio/bookmarks/kbookmarkmenu.cc | 1187 ------ kio/bookmarks/kbookmarkmenu.h | 265 -- kio/bookmarks/kbookmarkmenu_p.h | 224 -- kio/bookmarks/kbookmarknotifier.h | 45 - kio/data.protocol | 71 - kio/httpfilter/CMakeLists.txt | 32 - kio/httpfilter/Makefile.am | 8 - kio/httpfilter/httpfilter.cc | 372 -- kio/httpfilter/httpfilter.h | 119 - kio/kcomprfilter.desktop | 82 - kio/kdatatool.desktop | 96 - kio/kfile/CMakeLists.txt | 76 - kio/kfile/ChangeLog | 725 ---- kio/kfile/Makefile.am | 78 - kio/kfile/NOTES | 100 - kio/kfile/TODO | 17 - kio/kfile/config-kfile.h | 32 - kio/kfile/images.h | 277 -- kio/kfile/kacleditwidget.cpp | 1054 ----- kio/kfile/kacleditwidget.h | 65 - kio/kfile/kacleditwidget_p.h | 206 - kio/kfile/kcombiview.cpp | 371 -- kio/kfile/kcombiview.h | 133 - kio/kfile/kcustommenueditor.cpp | 242 -- kio/kfile/kcustommenueditor.h | 67 - kio/kfile/kdiroperator.cpp | 1740 -------- kio/kfile/kdiroperator.h | 950 ----- kio/kfile/kdirselectdialog.cpp | 481 --- kio/kfile/kdirselectdialog.h | 131 - kio/kfile/kdirsize.cpp | 166 - kio/kfile/kdirsize.h | 106 - kio/kfile/kdiskfreesp.cpp | 169 - kio/kfile/kdiskfreesp.h | 89 - kio/kfile/kencodingfiledialog.cpp | 223 -- kio/kfile/kencodingfiledialog.h | 313 -- kio/kfile/kfile.h | 129 - kio/kfile/kfilebookmarkhandler.cpp | 81 - kio/kfile/kfilebookmarkhandler.h | 63 - kio/kfile/kfiledetailview.cpp | 686 ---- kio/kfile/kfiledetailview.h | 219 -- kio/kfile/kfiledialog.cpp | 2380 ----------- kio/kfile/kfiledialog.h | 989 ----- kio/kfile/kfilefiltercombo.cpp | 203 - kio/kfile/kfilefiltercombo.h | 104 - kio/kfile/kfileiconview.cpp | 943 ----- kio/kfile/kfileiconview.h | 267 -- kio/kfile/kfilemetainfowidget.cpp | 375 -- kio/kfile/kfilemetainfowidget.h | 95 - kio/kfile/kfilemetapreview.cpp | 196 - kio/kfile/kfilemetapreview.h | 56 - kio/kfile/kfilepreview.cpp | 279 -- kio/kfile/kfilepreview.h | 122 - kio/kfile/kfilesharedlg.cpp | 325 -- kio/kfile/kfilesharedlg.h | 70 - kio/kfile/kfilespeedbar.cpp | 147 - kio/kfile/kfilespeedbar.h | 41 - kio/kfile/kfiletreebranch.cpp | 528 --- kio/kfile/kfiletreebranch.h | 242 -- kio/kfile/kfiletreeview.cpp | 677 ---- kio/kfile/kfiletreeview.h | 273 -- kio/kfile/kfiletreeviewitem.cpp | 83 - kio/kfile/kfiletreeviewitem.h | 106 - kio/kfile/kfileview.cpp | 429 -- kio/kfile/kfileview.h | 444 --- kio/kfile/kicondialog.cpp | 772 ---- kio/kfile/kicondialog.h | 350 -- kio/kfile/kimagefilepreview.cpp | 187 - kio/kfile/kimagefilepreview.h | 77 - kio/kfile/kmetaprops.cpp | 268 -- kio/kfile/kmetaprops.h | 69 - kio/kfile/knotifydialog.cpp | 1191 ------ kio/kfile/knotifydialog.h | 341 -- kio/kfile/knotifywidgetbase.ui | 469 --- kio/kfile/kopenwith.cpp | 851 ---- kio/kfile/kopenwith.h | 209 - kio/kfile/kopenwith_p.h | 101 - kio/kfile/kpreviewprops.cpp | 89 - kio/kfile/kpreviewprops.h | 57 - kio/kfile/kpreviewwidgetbase.cpp | 49 - kio/kfile/kpreviewwidgetbase.h | 92 - kio/kfile/kpropertiesdesktopadvbase.ui | 280 -- kio/kfile/kpropertiesdesktopbase.ui | 316 -- kio/kfile/kpropertiesdialog.cpp | 4170 -------------------- kio/kfile/kpropertiesdialog.h | 918 ----- kio/kfile/kpropertiesmimetypebase.ui | 70 - kio/kfile/kpropsdlg.h | 4 - kio/kfile/kpropsdlgplugin.desktop | 87 - kio/kfile/krecentdirs.cpp | 99 - kio/kfile/krecentdirs.h | 70 - kio/kfile/krecentdocument.cpp | 177 - kio/kfile/krecentdocument.h | 105 - kio/kfile/kurlbar.cpp | 1049 ----- kio/kfile/kurlbar.h | 660 ---- kio/kfile/kurlcombobox.cpp | 363 -- kio/kfile/kurlcombobox.h | 229 -- kio/kfile/kurlrequester.cpp | 430 -- kio/kfile/kurlrequester.h | 301 -- kio/kfile/kurlrequesterdlg.cpp | 135 - kio/kfile/kurlrequesterdlg.h | 114 - kio/kfile/tests/Makefile.am | 41 - kio/kfile/tests/kcustommenueditortest.cpp | 19 - kio/kfile/tests/kdirselectdialogtest.cpp | 17 - kio/kfile/tests/kfdtest.cpp | 34 - kio/kfile/tests/kfdtest.h | 28 - kio/kfile/tests/kfiletreeviewtest.cpp | 165 - kio/kfile/tests/kfiletreeviewtest.h | 42 - kio/kfile/tests/kfstest.cpp | 183 - kio/kfile/tests/kicondialogtest.cpp | 19 - kio/kfile/tests/knotifytest.cpp | 10 - kio/kfile/tests/kopenwithtest.cpp | 67 - kio/kfile/tests/kurlrequestertest.cpp | 16 - kio/kfileplugin.desktop | 88 - kio/kio/CMakeLists.txt | 138 - kio/kio/KFILEMETAINFO_ISSUES | 4 - kio/kio/Makefile.am | 129 - kio/kio/authinfo.cpp | 332 -- kio/kio/authinfo.h | 320 -- kio/kio/chmodjob.cpp | 258 -- kio/kio/chmodjob.h | 109 - kio/kio/configure.in.in | 167 - kio/kio/connection.cpp | 273 -- kio/kio/connection.h | 158 - kio/kio/dataprotocol.cpp | 339 -- kio/kio/dataprotocol.h | 71 - kio/kio/dataslave.cpp | 213 - kio/kio/dataslave.h | 126 - kio/kio/davjob.cpp | 142 - kio/kio/davjob.h | 127 - kio/kio/defaultprogress.cpp | 507 --- kio/kio/defaultprogress.h | 164 - kio/kio/forwardingslavebase.cpp | 475 --- kio/kio/forwardingslavebase.h | 204 - kio/kio/global.cpp | 2009 ---------- kio/kio/global.h | 547 --- kio/kio/http_slave_defaults.h | 49 - kio/kio/ioslave_defaults.h | 53 - kio/kio/job.cpp | 4814 ----------------------- kio/kio/job.h | 532 --- kio/kio/jobclasses.h | 1909 --------- kio/kio/kacl.cpp | 682 ---- kio/kio/kacl.h | 207 - kio/kio/kar.cpp | 170 - kio/kio/kar.h | 103 - kio/kio/karchive.cpp | 717 ---- kio/kio/karchive.h | 639 --- kio/kio/kautomount.cpp | 117 - kio/kio/kautomount.h | 122 - kio/kio/kdatatool.cpp | 285 -- kio/kio/kdatatool.h | 303 -- kio/kio/kdcopservicestarter.cpp | 97 - kio/kio/kdcopservicestarter.h | 103 - kio/kio/kdirlister.cpp | 2538 ------------ kio/kio/kdirlister.h | 634 --- kio/kio/kdirlister_p.h | 358 -- kio/kio/kdirnotify.cpp | 40 - kio/kio/kdirnotify.h | 84 - kio/kio/kdirnotify_stub.cpp | 101 - kio/kio/kdirnotify_stub.h | 32 - kio/kio/kdirwatch.cpp | 1774 --------- kio/kio/kdirwatch.h | 290 -- kio/kio/kdirwatch_p.h | 158 - kio/kio/kemailsettings.cpp | 272 -- kio/kio/kemailsettings.h | 147 - kio/kio/kfilefilter.cpp | 134 - kio/kio/kfilefilter.h | 170 - kio/kio/kfileitem.cpp | 1202 ------ kio/kio/kfileitem.h | 671 ---- kio/kio/kfilemetainfo.cpp | 1859 --------- kio/kio/kfilemetainfo.h | 1738 -------- kio/kio/kfileshare.cpp | 346 -- kio/kio/kfileshare.h | 165 - kio/kio/kfilterbase.cpp | 76 - kio/kio/kfilterbase.h | 116 - kio/kio/kfilterdev.cpp | 484 --- kio/kio/kfilterdev.h | 204 - kio/kio/kimageio.cpp | 566 --- kio/kio/kimageio.h | 170 - kio/kio/kimageiofactory.h | 142 - kio/kio/klimitediodevice.h | 105 - kio/kio/kmdbase.h | 6 - kio/kio/kmessageboxwrapper.h | 56 - kio/kio/kmimemagic.cpp | 2317 ----------- kio/kio/kmimemagic.h | 218 - kio/kio/kmimetype.cpp | 1172 ------ kio/kio/kmimetype.h | 641 --- kio/kio/kmimetypechooser.cpp | 298 -- kio/kio/kmimetypechooser.h | 180 - kio/kio/kmimetyperesolver.h | 255 -- kio/kio/knfsshare.cpp | 219 -- kio/kio/knfsshare.h | 86 - kio/kio/kprotocolinfo.cpp | 257 -- kio/kio/kprotocolinfo.h | 688 ---- kio/kio/kprotocolmanager.cpp | 534 --- kio/kio/kprotocolmanager.h | 389 -- kio/kio/kremoteencoding.cpp | 95 - kio/kio/kremoteencoding.h | 127 - kio/kio/krun.cpp | 1574 -------- kio/kio/krun.h | 512 --- kio/kio/ksambashare.cpp | 239 -- kio/kio/ksambashare.h | 85 - kio/kio/kscan.cpp | 185 - kio/kio/kscan.h | 370 -- kio/kio/kservice.cpp | 934 ----- kio/kio/kservice.h | 562 --- kio/kio/kservice_p.h | 41 - kio/kio/kservicefactory.cpp | 291 -- kio/kio/kservicefactory.h | 113 - kio/kio/kservicegroup.cpp | 724 ---- kio/kio/kservicegroup.h | 353 -- kio/kio/kservicegroupfactory.cpp | 148 - kio/kio/kservicegroupfactory.h | 80 - kio/kio/kservicetype.cpp | 366 -- kio/kio/kservicetype.h | 251 -- kio/kio/kservicetypefactory.cpp | 300 -- kio/kio/kservicetypefactory.h | 123 - kio/kio/kshellcompletion.cpp | 311 -- kio/kio/kshellcompletion.h | 85 - kio/kio/kshred.cpp | 276 -- kio/kio/kshred.h | 156 - kio/kio/ktar.cpp | 980 ----- kio/kio/ktar.h | 171 - kio/kio/ktrader.cpp | 186 - kio/kio/ktrader.h | 295 -- kio/kio/ktraderparse.cpp | 159 - kio/kio/ktraderparse.h | 52 - kio/kio/ktraderparsetree.cpp | 714 ---- kio/kio/ktraderparsetree.h | 371 -- kio/kio/kurifilter.cpp | 451 --- kio/kio/kurifilter.h | 667 ---- kio/kio/kurlcompletion.cpp | 1604 -------- kio/kio/kurlcompletion.h | 236 -- kio/kio/kurlpixmapprovider.cpp | 33 - kio/kio/kurlpixmapprovider.h | 59 - kio/kio/kuserprofile.cpp | 355 -- kio/kio/kuserprofile.h | 282 -- kio/kio/kzip.cpp | 1460 ------- kio/kio/kzip.h | 284 -- kio/kio/lex.c | 1759 --------- kio/kio/lex.l | 126 - kio/kio/metainfojob.cpp | 184 - kio/kio/metainfojob.h | 119 - kio/kio/netaccess.cpp | 536 --- kio/kio/netaccess.h | 540 --- kio/kio/observer.cpp | 417 -- kio/kio/observer.h | 213 - kio/kio/passdlg.cpp | 367 -- kio/kio/passdlg.h | 175 - kio/kio/paste.cpp | 308 -- kio/kio/paste.h | 125 - kio/kio/pastedialog.cpp | 84 - kio/kio/pastedialog.h | 64 - kio/kio/posixacladdons.cpp | 236 -- kio/kio/posixacladdons.h | 47 - kio/kio/previewjob.cpp | 597 --- kio/kio/previewjob.h | 182 - kio/kio/progressbase.cpp | 180 - kio/kio/progressbase.h | 271 -- kio/kio/renamedlg.cpp | 574 --- kio/kio/renamedlg.h | 153 - kio/kio/renamedlgplugin.h | 59 - kio/kio/scheduler.cpp | 922 ----- kio/kio/scheduler.h | 364 -- kio/kio/sessiondata.cpp | 311 -- kio/kio/sessiondata.h | 67 - kio/kio/skipdlg.cpp | 143 - kio/kio/skipdlg.h | 61 - kio/kio/slave.cpp | 519 --- kio/kio/slave.h | 270 -- kio/kio/slavebase.cpp | 1315 ------- kio/kio/slavebase.h | 847 ---- kio/kio/slaveconfig.cpp | 225 -- kio/kio/slaveconfig.h | 106 - kio/kio/slaveinterface.cpp | 550 --- kio/kio/slaveinterface.h | 290 -- kio/kio/statusbarprogress.cpp | 166 - kio/kio/statusbarprogress.h | 112 - kio/kio/tcpslavebase.cpp | 1343 ------- kio/kio/tcpslavebase.h | 389 -- kio/kio/tdelficon.cpp | 89 - kio/kio/tdelficon.h | 54 - kio/kio/thumbcreator.h | 124 - kio/kio/yacc.c | 1522 ------- kio/kio/yacc.h | 93 - kio/kio/yacc.y | 126 - kio/kioexec/CMakeLists.txt | 42 - kio/kioexec/Makefile.am | 19 - kio/kioexec/README | 26 - kio/kioexec/main.cpp | 294 -- kio/kioexec/main.h | 35 - kio/kioslave.upd | 18 - kio/kpasswdserver.desktop | 157 - kio/kpasswdserver/CMakeLists.txt | 43 - kio/kpasswdserver/DESIGN | 56 - kio/kpasswdserver/Makefile.am | 15 - kio/kpasswdserver/kpasswdserver.cpp | 715 ---- kio/kpasswdserver/kpasswdserver.h | 118 - kio/kscan.desktop | 19 - kio/kssl/CMakeLists.txt | 57 - kio/kssl/KPMG-CA-16389.0.DC80502.pdf | Bin 91118 -> 0 bytes kio/kssl/Makefile.am | 72 - kio/kssl/README | 15 - kio/kssl/SECURITY-HOLES | 17 - kio/kssl/TODO | 25 - kio/kssl/configure.in.in | 7 - kio/kssl/keygenwizard.ui | 46 - kio/kssl/keygenwizard2.ui | 78 - kio/kssl/kopenssl.cc | 1601 -------- kio/kssl/kopenssl.h | 920 ----- kio/kssl/ksmimecrypto.cc | 424 -- kio/kssl/ksmimecrypto.h | 128 - kio/kssl/kssl.cc | 688 ---- kio/kssl/kssl.h | 301 -- kio/kssl/kssl/CMakeLists.txt | 14 - kio/kssl/kssl/DigiCertAssuredIDRootCA.pem | 22 - kio/kssl/kssl/DigiCertGlobalRootCA.pem | 22 - kio/kssl/kssl/DigiCertHighAssuranceEVRootCA.pem | 23 - kio/kssl/kssl/GeoTrust_Universal_CA.pem | 32 - kio/kssl/kssl/GeoTrust_Universal_CA2.pem | 31 - kio/kssl/kssl/HOWTO | 30 - kio/kssl/kssl/Makefile.am | 6 - kio/kssl/kssl/StartCom.pem | 148 - kio/kssl/kssl/SwissSign-Gold-G2.pem | 33 - kio/kssl/kssl/SwissSign-Platinum-G2.pem | 33 - kio/kssl/kssl/SwissSign-Silver-G2.pem | 33 - kio/kssl/kssl/WiseKey.pem | 24 - kio/kssl/kssl/ac_offline_raiz_certicamara.pem | 37 - kio/kssl/kssl/argedaten-root-ca-cert.pem | 23 - kio/kssl/kssl/belgacom.pem | 16 - kio/kssl/kssl/caroot/CMakeLists.txt | 12 - kio/kssl/kssl/caroot/Makefile.am | 4 - kio/kssl/kssl/caroot/ca-bundle.crt | 2973 -------------- kio/kssl/kssl/cert_bundle | 47 - kio/kssl/kssl/cert_extract.c | 183 - kio/kssl/kssl/certbundle_Makefile | 43 - kio/kssl/kssl/certkde | 75 - kio/kssl/kssl/certum.pem | 19 - kio/kssl/kssl/certum1.pem | 16 - kio/kssl/kssl/certum2.pem | 16 - kio/kssl/kssl/certum3.pem | 16 - kio/kssl/kssl/certum4.pem | 16 - kio/kssl/kssl/comodo1.pem | 25 - kio/kssl/kssl/comodo2.pem | 25 - kio/kssl/kssl/comodo3.pem | 25 - kio/kssl/kssl/comodo4.pem | 26 - kio/kssl/kssl/comodo5.pem | 26 - kio/kssl/kssl/comodo6.pem | 27 - kio/kssl/kssl/comodo7.pem | 26 - kio/kssl/kssl/dfn-root-ca-cert.pem | 39 - kio/kssl/kssl/gd-class2-root.pem | 24 - kio/kssl/kssl/geotrust-global-1.pem | 20 - kio/kssl/kssl/geotrust-global-2.pem | 22 - kio/kssl/kssl/globalsign-root-r1.pem | 21 - kio/kssl/kssl/globalsign-root-r2.pem | 22 - kio/kssl/kssl/icpbrasil.pem | 28 - kio/kssl/kssl/ipsservidores.pem | 17 - kio/kssl/kssl/ksslcalist | 787 ---- kio/kssl/kssl/localcerts | 36 - kio/kssl/kssl/mergelocal | 65 - kio/kssl/kssl/netlock1.pem | 31 - kio/kssl/kssl/netlock2.pem | 37 - kio/kssl/kssl/netlock3.pem | 31 - kio/kssl/kssl/netlock4.pem | 39 - kio/kssl/kssl/oces.pem | 30 - kio/kssl/kssl/quovadis.pem | 34 - kio/kssl/kssl/qvrca2.pem | 33 - kio/kssl/kssl/qvrca3.pem | 38 - kio/kssl/kssl/sf-class2-root.pem | 24 - kio/kssl/kssl/sonera1.pem | 19 - kio/kssl/kssl/sonera2.pem | 19 - kio/kssl/kssl/staatdernederlandenrotca.pem | 22 - kio/kssl/kssl/startcom.pem | 30 - kio/kssl/kssl/startssl.pem | 44 - kio/kssl/kssl/tcclass2-2011.pem | 20 - kio/kssl/kssl/tcclass3-2011.pem | 20 - kio/kssl/kssl/utn-network.pem | 26 - kio/kssl/kssl/utn-sgc.pem | 26 - kio/kssl/kssl/xgca.pem | 25 - kio/kssl/ksslall.h | 41 - kio/kssl/ksslcallback.c | 89 - kio/kssl/ksslcertchain.cc | 216 - kio/kssl/ksslcertchain.h | 136 - kio/kssl/ksslcertdlg.cc | 174 - kio/kssl/ksslcertdlg.h | 138 - kio/kssl/ksslcertificate.cc | 1157 ------ kio/kssl/ksslcertificate.h | 376 -- kio/kssl/ksslcertificatecache.cc | 399 -- kio/kssl/ksslcertificatecache.h | 107 - kio/kssl/ksslcertificatefactory.cc | 122 - kio/kssl/ksslcertificatefactory.h | 50 - kio/kssl/ksslcertificatehome.cc | 246 -- kio/kssl/ksslcertificatehome.h | 90 - kio/kssl/ksslconfig.h.cmake | 26 - kio/kssl/ksslconfig.h.in | 26 - kio/kssl/ksslconfig_win.h | 26 - kio/kssl/ksslconnectioninfo.cc | 66 - kio/kssl/ksslconnectioninfo.h | 95 - kio/kssl/ksslcsessioncache.cc | 120 - kio/kssl/ksslcsessioncache.h | 47 - kio/kssl/kssldefs.h | 37 - kio/kssl/ksslinfodlg.cc | 463 --- kio/kssl/ksslinfodlg.h | 173 - kio/kssl/ksslkeygen.cc | 223 -- kio/kssl/ksslkeygen.h | 95 - kio/kssl/ksslpeerinfo.cc | 171 - kio/kssl/ksslpeerinfo.h | 108 - kio/kssl/ksslpemcallback.cc | 61 - kio/kssl/ksslpemcallback.h | 29 - kio/kssl/ksslpkcs12.cc | 295 -- kio/kssl/ksslpkcs12.h | 194 - kio/kssl/ksslpkcs7.cc | 208 - kio/kssl/ksslpkcs7.h | 156 - kio/kssl/ksslsession.cc | 82 - kio/kssl/ksslsession.h | 73 - kio/kssl/ksslsettings.cc | 356 -- kio/kssl/ksslsettings.h | 224 -- kio/kssl/ksslsigners.cc | 251 -- kio/kssl/ksslsigners.h | 172 - kio/kssl/ksslutils.cc | 94 - kio/kssl/ksslutils.h | 77 - kio/kssl/ksslx509map.cc | 103 - kio/kssl/ksslx509map.h | 86 - kio/kssl/ksslx509v3.cc | 143 - kio/kssl/ksslx509v3.h | 122 - kio/kurifilterplugin.desktop | 84 - kio/magic | 1065 ----- kio/misc/CMakeLists.txt | 100 - kio/misc/Makefile.am | 60 - kio/misc/fileshareset | 430 -- kio/misc/kfile/CMakeLists.txt | 39 - kio/misc/kfile/Makefile.am | 10 - kio/misc/kfile/README | 4 - kio/misc/kfile/fileprops.cpp | 480 --- kio/misc/kfile/fileprops.h | 74 - kio/misc/kio_uiserver.desktop | 100 - kio/misc/kmailservice.cpp | 45 - kio/misc/kmailservice.protocol | 15 - kio/misc/kpac/CMakeLists.txt | 66 - kio/misc/kpac/Makefile.am | 30 - kio/misc/kpac/README | 9 - kio/misc/kpac/README.wpad | 73 - kio/misc/kpac/TODO | 1 - kio/misc/kpac/configure.in.in | 26 - kio/misc/kpac/dhcp.h | 78 - kio/misc/kpac/discovery.cpp | 147 - kio/misc/kpac/discovery.h | 55 - kio/misc/kpac/downloader.cpp | 89 - kio/misc/kpac/downloader.h | 64 - kio/misc/kpac/eventsrc | 530 --- kio/misc/kpac/kpac_dhcp_helper.c | 229 -- kio/misc/kpac/kpactest.pac | 169 - kio/misc/kpac/proxyscout.cpp | 196 - kio/misc/kpac/proxyscout.desktop | 131 - kio/misc/kpac/proxyscout.h | 82 - kio/misc/kpac/script.cpp | 465 --- kio/misc/kpac/script.h | 56 - kio/misc/ksendbugmail/CMakeLists.txt | 37 - kio/misc/ksendbugmail/Makefile.am | 26 - kio/misc/ksendbugmail/main.cpp | 142 - kio/misc/ksendbugmail/main.h | 20 - kio/misc/ksendbugmail/smtp.cpp | 336 -- kio/misc/ksendbugmail/smtp.h | 144 - kio/misc/kssld/CMakeLists.txt | 47 - kio/misc/kssld/Makefile.am | 33 - kio/misc/kssld/kssld.cpp | 1027 ----- kio/misc/kssld/kssld.desktop | 156 - kio/misc/kssld/kssld.h | 154 - kio/misc/ktelnetservice.cpp | 112 - kio/misc/mms.protocol | 73 - kio/misc/mmst.protocol | 15 - kio/misc/mmsu.protocol | 15 - kio/misc/pnm.protocol | 15 - kio/misc/rlogin.protocol | 13 - kio/misc/rtsp.protocol | 15 - kio/misc/rtspt.protocol | 15 - kio/misc/rtspu.protocol | 15 - kio/misc/ssh.protocol | 13 - kio/misc/tdentlm/CMakeLists.txt | 43 - kio/misc/tdentlm/Makefile.am | 12 - kio/misc/tdentlm/des.cpp | 513 --- kio/misc/tdentlm/des.h | 19 - kio/misc/tdentlm/kswap.h | 428 -- kio/misc/tdentlm/tdentlm.cpp | 389 -- kio/misc/tdentlm/tdentlm.h | 233 -- kio/misc/tdesasl/CMakeLists.txt | 42 - kio/misc/tdesasl/Makefile.am | 12 - kio/misc/tdesasl/tdesasl.cpp | 285 -- kio/misc/tdesasl/tdesasl.h | 169 - kio/misc/tdewalletd/CMakeLists.txt | 49 - kio/misc/tdewalletd/Makefile.am | 35 - kio/misc/tdewalletd/kbetterthankdialogbase.ui | 154 - kio/misc/tdewalletd/kbetterthankdialogbase.ui.h | 50 - kio/misc/tdewalletd/ktimeout.cpp | 84 - kio/misc/tdewalletd/ktimeout.h | 52 - kio/misc/tdewalletd/tdewalletd.cpp | 1514 ------- kio/misc/tdewalletd/tdewalletd.desktop | 151 - kio/misc/tdewalletd/tdewalletd.h | 199 - kio/misc/tdewalletd/tdewalletwizard.ui | 545 --- kio/misc/tdewalletd/tdewalletwizard.ui.h | 74 - kio/misc/telnet.protocol | 13 - kio/misc/uiserver.cpp | 1413 ------- kio/misc/uiserver.h | 430 -- kio/pics/CMakeLists.txt | 14 - kio/pics/Makefile.am | 3 - kio/pics/cr16-app-kio_uiserver.png | Bin 838 -> 0 bytes kio/proxytype.pl | 11 - kio/renamedlgplugin.desktop | 84 - kio/tdecmodule.desktop | 109 - kio/tests/CMakeLists.txt | 36 - kio/tests/Makefile.am | 91 - kio/tests/dataprotocoltest.cpp | 287 -- kio/tests/dummymeta.cpp | 20 - kio/tests/dummymeta.desktop | 54 - kio/tests/dummymeta.h | 20 - kio/tests/getalltest.cpp | 44 - kio/tests/jobtest.cpp | 613 --- kio/tests/jobtest.h | 79 - kio/tests/kacltest.cpp | 309 -- kio/tests/kacltest.h | 53 - kio/tests/kdcopcheck.cpp | 132 - kio/tests/kdcopcheck.h | 28 - kio/tests/kdefaultprogresstest.cpp | 39 - kio/tests/kdirlistertest.cpp | 162 - kio/tests/kdirlistertest.h | 120 - kio/tests/kdirwatchtest.cpp | 82 - kio/tests/kdirwatchtest.h | 33 - kio/tests/kdirwatchunittest.cpp | 180 - kio/tests/kdirwatchunittest.h | 66 - kio/tests/kfiltertest.cpp | 118 - kio/tests/kionetrctest.cpp | 71 - kio/tests/kiopassdlgtest.cpp | 32 - kio/tests/kioslavetest.cpp | 555 --- kio/tests/kioslavetest.h | 108 - kio/tests/kmfitest.cpp | 28 - kio/tests/kmimefromext.cpp | 53 - kio/tests/kmimemagictest.cpp | 54 - kio/tests/kmimetypetest.cpp | 76 - kio/tests/kpropsdlgtest.cpp | 35 - kio/tests/kprotocolinfotest.cpp | 59 - kio/tests/kruntest.cpp | 209 - kio/tests/kruntest.h | 58 - kio/tests/kscantest.cpp | 16 - kio/tests/kshredtest.cpp | 74 - kio/tests/ktartest.cpp | 178 - kio/tests/ktradertest.cpp | 108 - kio/tests/kurifiltertest.cpp | 361 -- kio/tests/kurlcompletiontest.cpp | 189 - kio/tests/kziptest.cpp | 435 -- kio/tests/metatest.cpp | 321 -- kio/tests/netaccesstest.cpp | 48 - kio/tests/previewtest.cpp | 64 - kio/tests/previewtest.h | 25 - kio/tests/speed.cpp | 139 - kio/tests/speed.h | 24 - kio/tests/tdesycocatest.cpp | 360 -- kio/tests/tdesycocaupdatetest.cpp | 11 - kio/tests/wronglocalsizes.zip | Bin 325 -> 0 bytes kio/useragent.pl | 13 - 593 files changed, 156273 deletions(-) delete mode 100644 kio/CMakeLists.txt delete mode 100644 kio/DESIGN delete mode 100644 kio/DESIGN.krun delete mode 100644 kio/DESIGN.metadata delete mode 100644 kio/DESIGN.mimetypes delete mode 100644 kio/DESKTOP_ENTRY_STANDARD delete mode 100644 kio/Mainpage.dox delete mode 100644 kio/Makefile.am delete mode 100644 kio/application.desktop delete mode 100644 kio/bookmarks/CMakeLists.txt delete mode 100644 kio/bookmarks/Makefile.am delete mode 100644 kio/bookmarks/dptrtemplate.h delete mode 100644 kio/bookmarks/kbookmark.cc delete mode 100644 kio/bookmarks/kbookmark.h delete mode 100644 kio/bookmarks/kbookmarkbar.cc delete mode 100644 kio/bookmarks/kbookmarkbar.h delete mode 100644 kio/bookmarks/kbookmarkdombuilder.cc delete mode 100644 kio/bookmarks/kbookmarkdombuilder.h delete mode 100644 kio/bookmarks/kbookmarkdrag.cc delete mode 100644 kio/bookmarks/kbookmarkdrag.h delete mode 100644 kio/bookmarks/kbookmarkexporter.cc delete mode 100644 kio/bookmarks/kbookmarkexporter.h delete mode 100644 kio/bookmarks/kbookmarkimporter.cc delete mode 100644 kio/bookmarks/kbookmarkimporter.h delete mode 100644 kio/bookmarks/kbookmarkimporter_crash.cc delete mode 100644 kio/bookmarks/kbookmarkimporter_crash.h delete mode 100644 kio/bookmarks/kbookmarkimporter_ie.cc delete mode 100644 kio/bookmarks/kbookmarkimporter_ie.h delete mode 100644 kio/bookmarks/kbookmarkimporter_kde1.cc delete mode 100644 kio/bookmarks/kbookmarkimporter_kde1.h delete mode 100644 kio/bookmarks/kbookmarkimporter_ns.cc delete mode 100644 kio/bookmarks/kbookmarkimporter_ns.h delete mode 100644 kio/bookmarks/kbookmarkimporter_opera.cc delete mode 100644 kio/bookmarks/kbookmarkimporter_opera.h delete mode 100644 kio/bookmarks/kbookmarkmanager.cc delete mode 100644 kio/bookmarks/kbookmarkmanager.h delete mode 100644 kio/bookmarks/kbookmarkmenu.cc delete mode 100644 kio/bookmarks/kbookmarkmenu.h delete mode 100644 kio/bookmarks/kbookmarkmenu_p.h delete mode 100644 kio/bookmarks/kbookmarknotifier.h delete mode 100644 kio/data.protocol delete mode 100644 kio/httpfilter/CMakeLists.txt delete mode 100644 kio/httpfilter/Makefile.am delete mode 100644 kio/httpfilter/httpfilter.cc delete mode 100644 kio/httpfilter/httpfilter.h delete mode 100644 kio/kcomprfilter.desktop delete mode 100644 kio/kdatatool.desktop delete mode 100644 kio/kfile/CMakeLists.txt delete mode 100644 kio/kfile/ChangeLog delete mode 100644 kio/kfile/Makefile.am delete mode 100644 kio/kfile/NOTES delete mode 100644 kio/kfile/TODO delete mode 100644 kio/kfile/config-kfile.h delete mode 100644 kio/kfile/images.h delete mode 100644 kio/kfile/kacleditwidget.cpp delete mode 100644 kio/kfile/kacleditwidget.h delete mode 100644 kio/kfile/kacleditwidget_p.h delete mode 100644 kio/kfile/kcombiview.cpp delete mode 100644 kio/kfile/kcombiview.h delete mode 100644 kio/kfile/kcustommenueditor.cpp delete mode 100644 kio/kfile/kcustommenueditor.h delete mode 100644 kio/kfile/kdiroperator.cpp delete mode 100644 kio/kfile/kdiroperator.h delete mode 100644 kio/kfile/kdirselectdialog.cpp delete mode 100644 kio/kfile/kdirselectdialog.h delete mode 100644 kio/kfile/kdirsize.cpp delete mode 100644 kio/kfile/kdirsize.h delete mode 100644 kio/kfile/kdiskfreesp.cpp delete mode 100644 kio/kfile/kdiskfreesp.h delete mode 100644 kio/kfile/kencodingfiledialog.cpp delete mode 100644 kio/kfile/kencodingfiledialog.h delete mode 100644 kio/kfile/kfile.h delete mode 100644 kio/kfile/kfilebookmarkhandler.cpp delete mode 100644 kio/kfile/kfilebookmarkhandler.h delete mode 100644 kio/kfile/kfiledetailview.cpp delete mode 100644 kio/kfile/kfiledetailview.h delete mode 100644 kio/kfile/kfiledialog.cpp delete mode 100644 kio/kfile/kfiledialog.h delete mode 100644 kio/kfile/kfilefiltercombo.cpp delete mode 100644 kio/kfile/kfilefiltercombo.h delete mode 100644 kio/kfile/kfileiconview.cpp delete mode 100644 kio/kfile/kfileiconview.h delete mode 100644 kio/kfile/kfilemetainfowidget.cpp delete mode 100644 kio/kfile/kfilemetainfowidget.h delete mode 100644 kio/kfile/kfilemetapreview.cpp delete mode 100644 kio/kfile/kfilemetapreview.h delete mode 100644 kio/kfile/kfilepreview.cpp delete mode 100644 kio/kfile/kfilepreview.h delete mode 100644 kio/kfile/kfilesharedlg.cpp delete mode 100644 kio/kfile/kfilesharedlg.h delete mode 100644 kio/kfile/kfilespeedbar.cpp delete mode 100644 kio/kfile/kfilespeedbar.h delete mode 100644 kio/kfile/kfiletreebranch.cpp delete mode 100644 kio/kfile/kfiletreebranch.h delete mode 100644 kio/kfile/kfiletreeview.cpp delete mode 100644 kio/kfile/kfiletreeview.h delete mode 100644 kio/kfile/kfiletreeviewitem.cpp delete mode 100644 kio/kfile/kfiletreeviewitem.h delete mode 100644 kio/kfile/kfileview.cpp delete mode 100644 kio/kfile/kfileview.h delete mode 100644 kio/kfile/kicondialog.cpp delete mode 100644 kio/kfile/kicondialog.h delete mode 100644 kio/kfile/kimagefilepreview.cpp delete mode 100644 kio/kfile/kimagefilepreview.h delete mode 100644 kio/kfile/kmetaprops.cpp delete mode 100644 kio/kfile/kmetaprops.h delete mode 100644 kio/kfile/knotifydialog.cpp delete mode 100644 kio/kfile/knotifydialog.h delete mode 100644 kio/kfile/knotifywidgetbase.ui delete mode 100644 kio/kfile/kopenwith.cpp delete mode 100644 kio/kfile/kopenwith.h delete mode 100644 kio/kfile/kopenwith_p.h delete mode 100644 kio/kfile/kpreviewprops.cpp delete mode 100644 kio/kfile/kpreviewprops.h delete mode 100644 kio/kfile/kpreviewwidgetbase.cpp delete mode 100644 kio/kfile/kpreviewwidgetbase.h delete mode 100644 kio/kfile/kpropertiesdesktopadvbase.ui delete mode 100644 kio/kfile/kpropertiesdesktopbase.ui delete mode 100644 kio/kfile/kpropertiesdialog.cpp delete mode 100644 kio/kfile/kpropertiesdialog.h delete mode 100644 kio/kfile/kpropertiesmimetypebase.ui delete mode 100644 kio/kfile/kpropsdlg.h delete mode 100644 kio/kfile/kpropsdlgplugin.desktop delete mode 100644 kio/kfile/krecentdirs.cpp delete mode 100644 kio/kfile/krecentdirs.h delete mode 100644 kio/kfile/krecentdocument.cpp delete mode 100644 kio/kfile/krecentdocument.h delete mode 100644 kio/kfile/kurlbar.cpp delete mode 100644 kio/kfile/kurlbar.h delete mode 100644 kio/kfile/kurlcombobox.cpp delete mode 100644 kio/kfile/kurlcombobox.h delete mode 100644 kio/kfile/kurlrequester.cpp delete mode 100644 kio/kfile/kurlrequester.h delete mode 100644 kio/kfile/kurlrequesterdlg.cpp delete mode 100644 kio/kfile/kurlrequesterdlg.h delete mode 100644 kio/kfile/tests/Makefile.am delete mode 100644 kio/kfile/tests/kcustommenueditortest.cpp delete mode 100644 kio/kfile/tests/kdirselectdialogtest.cpp delete mode 100644 kio/kfile/tests/kfdtest.cpp delete mode 100644 kio/kfile/tests/kfdtest.h delete mode 100644 kio/kfile/tests/kfiletreeviewtest.cpp delete mode 100644 kio/kfile/tests/kfiletreeviewtest.h delete mode 100644 kio/kfile/tests/kfstest.cpp delete mode 100644 kio/kfile/tests/kicondialogtest.cpp delete mode 100644 kio/kfile/tests/knotifytest.cpp delete mode 100644 kio/kfile/tests/kopenwithtest.cpp delete mode 100644 kio/kfile/tests/kurlrequestertest.cpp delete mode 100644 kio/kfileplugin.desktop delete mode 100644 kio/kio/CMakeLists.txt delete mode 100644 kio/kio/KFILEMETAINFO_ISSUES delete mode 100644 kio/kio/Makefile.am delete mode 100644 kio/kio/authinfo.cpp delete mode 100644 kio/kio/authinfo.h delete mode 100644 kio/kio/chmodjob.cpp delete mode 100644 kio/kio/chmodjob.h delete mode 100644 kio/kio/configure.in.in delete mode 100644 kio/kio/connection.cpp delete mode 100644 kio/kio/connection.h delete mode 100644 kio/kio/dataprotocol.cpp delete mode 100644 kio/kio/dataprotocol.h delete mode 100644 kio/kio/dataslave.cpp delete mode 100644 kio/kio/dataslave.h delete mode 100644 kio/kio/davjob.cpp delete mode 100644 kio/kio/davjob.h delete mode 100644 kio/kio/defaultprogress.cpp delete mode 100644 kio/kio/defaultprogress.h delete mode 100644 kio/kio/forwardingslavebase.cpp delete mode 100644 kio/kio/forwardingslavebase.h delete mode 100644 kio/kio/global.cpp delete mode 100644 kio/kio/global.h delete mode 100644 kio/kio/http_slave_defaults.h delete mode 100644 kio/kio/ioslave_defaults.h delete mode 100644 kio/kio/job.cpp delete mode 100644 kio/kio/job.h delete mode 100644 kio/kio/jobclasses.h delete mode 100644 kio/kio/kacl.cpp delete mode 100644 kio/kio/kacl.h delete mode 100644 kio/kio/kar.cpp delete mode 100644 kio/kio/kar.h delete mode 100644 kio/kio/karchive.cpp delete mode 100644 kio/kio/karchive.h delete mode 100644 kio/kio/kautomount.cpp delete mode 100644 kio/kio/kautomount.h delete mode 100644 kio/kio/kdatatool.cpp delete mode 100644 kio/kio/kdatatool.h delete mode 100644 kio/kio/kdcopservicestarter.cpp delete mode 100644 kio/kio/kdcopservicestarter.h delete mode 100644 kio/kio/kdirlister.cpp delete mode 100644 kio/kio/kdirlister.h delete mode 100644 kio/kio/kdirlister_p.h delete mode 100644 kio/kio/kdirnotify.cpp delete mode 100644 kio/kio/kdirnotify.h delete mode 100644 kio/kio/kdirnotify_stub.cpp delete mode 100644 kio/kio/kdirnotify_stub.h delete mode 100644 kio/kio/kdirwatch.cpp delete mode 100644 kio/kio/kdirwatch.h delete mode 100644 kio/kio/kdirwatch_p.h delete mode 100644 kio/kio/kemailsettings.cpp delete mode 100644 kio/kio/kemailsettings.h delete mode 100644 kio/kio/kfilefilter.cpp delete mode 100644 kio/kio/kfilefilter.h delete mode 100644 kio/kio/kfileitem.cpp delete mode 100644 kio/kio/kfileitem.h delete mode 100644 kio/kio/kfilemetainfo.cpp delete mode 100644 kio/kio/kfilemetainfo.h delete mode 100644 kio/kio/kfileshare.cpp delete mode 100644 kio/kio/kfileshare.h delete mode 100644 kio/kio/kfilterbase.cpp delete mode 100644 kio/kio/kfilterbase.h delete mode 100644 kio/kio/kfilterdev.cpp delete mode 100644 kio/kio/kfilterdev.h delete mode 100644 kio/kio/kimageio.cpp delete mode 100644 kio/kio/kimageio.h delete mode 100644 kio/kio/kimageiofactory.h delete mode 100644 kio/kio/klimitediodevice.h delete mode 100644 kio/kio/kmdbase.h delete mode 100644 kio/kio/kmessageboxwrapper.h delete mode 100644 kio/kio/kmimemagic.cpp delete mode 100644 kio/kio/kmimemagic.h delete mode 100644 kio/kio/kmimetype.cpp delete mode 100644 kio/kio/kmimetype.h delete mode 100644 kio/kio/kmimetypechooser.cpp delete mode 100644 kio/kio/kmimetypechooser.h delete mode 100644 kio/kio/kmimetyperesolver.h delete mode 100644 kio/kio/knfsshare.cpp delete mode 100644 kio/kio/knfsshare.h delete mode 100644 kio/kio/kprotocolinfo.cpp delete mode 100644 kio/kio/kprotocolinfo.h delete mode 100644 kio/kio/kprotocolmanager.cpp delete mode 100644 kio/kio/kprotocolmanager.h delete mode 100644 kio/kio/kremoteencoding.cpp delete mode 100644 kio/kio/kremoteencoding.h delete mode 100644 kio/kio/krun.cpp delete mode 100644 kio/kio/krun.h delete mode 100644 kio/kio/ksambashare.cpp delete mode 100644 kio/kio/ksambashare.h delete mode 100644 kio/kio/kscan.cpp delete mode 100644 kio/kio/kscan.h delete mode 100644 kio/kio/kservice.cpp delete mode 100644 kio/kio/kservice.h delete mode 100644 kio/kio/kservice_p.h delete mode 100644 kio/kio/kservicefactory.cpp delete mode 100644 kio/kio/kservicefactory.h delete mode 100644 kio/kio/kservicegroup.cpp delete mode 100644 kio/kio/kservicegroup.h delete mode 100644 kio/kio/kservicegroupfactory.cpp delete mode 100644 kio/kio/kservicegroupfactory.h delete mode 100644 kio/kio/kservicetype.cpp delete mode 100644 kio/kio/kservicetype.h delete mode 100644 kio/kio/kservicetypefactory.cpp delete mode 100644 kio/kio/kservicetypefactory.h delete mode 100644 kio/kio/kshellcompletion.cpp delete mode 100644 kio/kio/kshellcompletion.h delete mode 100644 kio/kio/kshred.cpp delete mode 100644 kio/kio/kshred.h delete mode 100644 kio/kio/ktar.cpp delete mode 100644 kio/kio/ktar.h delete mode 100644 kio/kio/ktrader.cpp delete mode 100644 kio/kio/ktrader.h delete mode 100644 kio/kio/ktraderparse.cpp delete mode 100644 kio/kio/ktraderparse.h delete mode 100644 kio/kio/ktraderparsetree.cpp delete mode 100644 kio/kio/ktraderparsetree.h delete mode 100644 kio/kio/kurifilter.cpp delete mode 100644 kio/kio/kurifilter.h delete mode 100644 kio/kio/kurlcompletion.cpp delete mode 100644 kio/kio/kurlcompletion.h delete mode 100644 kio/kio/kurlpixmapprovider.cpp delete mode 100644 kio/kio/kurlpixmapprovider.h delete mode 100644 kio/kio/kuserprofile.cpp delete mode 100644 kio/kio/kuserprofile.h delete mode 100644 kio/kio/kzip.cpp delete mode 100644 kio/kio/kzip.h delete mode 100644 kio/kio/lex.c delete mode 100644 kio/kio/lex.l delete mode 100644 kio/kio/metainfojob.cpp delete mode 100644 kio/kio/metainfojob.h delete mode 100644 kio/kio/netaccess.cpp delete mode 100644 kio/kio/netaccess.h delete mode 100644 kio/kio/observer.cpp delete mode 100644 kio/kio/observer.h delete mode 100644 kio/kio/passdlg.cpp delete mode 100644 kio/kio/passdlg.h delete mode 100644 kio/kio/paste.cpp delete mode 100644 kio/kio/paste.h delete mode 100644 kio/kio/pastedialog.cpp delete mode 100644 kio/kio/pastedialog.h delete mode 100644 kio/kio/posixacladdons.cpp delete mode 100644 kio/kio/posixacladdons.h delete mode 100644 kio/kio/previewjob.cpp delete mode 100644 kio/kio/previewjob.h delete mode 100644 kio/kio/progressbase.cpp delete mode 100644 kio/kio/progressbase.h delete mode 100644 kio/kio/renamedlg.cpp delete mode 100644 kio/kio/renamedlg.h delete mode 100644 kio/kio/renamedlgplugin.h delete mode 100644 kio/kio/scheduler.cpp delete mode 100644 kio/kio/scheduler.h delete mode 100644 kio/kio/sessiondata.cpp delete mode 100644 kio/kio/sessiondata.h delete mode 100644 kio/kio/skipdlg.cpp delete mode 100644 kio/kio/skipdlg.h delete mode 100644 kio/kio/slave.cpp delete mode 100644 kio/kio/slave.h delete mode 100644 kio/kio/slavebase.cpp delete mode 100644 kio/kio/slavebase.h delete mode 100644 kio/kio/slaveconfig.cpp delete mode 100644 kio/kio/slaveconfig.h delete mode 100644 kio/kio/slaveinterface.cpp delete mode 100644 kio/kio/slaveinterface.h delete mode 100644 kio/kio/statusbarprogress.cpp delete mode 100644 kio/kio/statusbarprogress.h delete mode 100644 kio/kio/tcpslavebase.cpp delete mode 100644 kio/kio/tcpslavebase.h delete mode 100644 kio/kio/tdelficon.cpp delete mode 100644 kio/kio/tdelficon.h delete mode 100644 kio/kio/thumbcreator.h delete mode 100644 kio/kio/yacc.c delete mode 100644 kio/kio/yacc.h delete mode 100644 kio/kio/yacc.y delete mode 100644 kio/kioexec/CMakeLists.txt delete mode 100644 kio/kioexec/Makefile.am delete mode 100644 kio/kioexec/README delete mode 100644 kio/kioexec/main.cpp delete mode 100644 kio/kioexec/main.h delete mode 100644 kio/kioslave.upd delete mode 100644 kio/kpasswdserver.desktop delete mode 100644 kio/kpasswdserver/CMakeLists.txt delete mode 100644 kio/kpasswdserver/DESIGN delete mode 100644 kio/kpasswdserver/Makefile.am delete mode 100644 kio/kpasswdserver/kpasswdserver.cpp delete mode 100644 kio/kpasswdserver/kpasswdserver.h delete mode 100644 kio/kscan.desktop delete mode 100644 kio/kssl/CMakeLists.txt delete mode 100644 kio/kssl/KPMG-CA-16389.0.DC80502.pdf delete mode 100644 kio/kssl/Makefile.am delete mode 100644 kio/kssl/README delete mode 100644 kio/kssl/SECURITY-HOLES delete mode 100644 kio/kssl/TODO delete mode 100644 kio/kssl/configure.in.in delete mode 100644 kio/kssl/keygenwizard.ui delete mode 100644 kio/kssl/keygenwizard2.ui delete mode 100644 kio/kssl/kopenssl.cc delete mode 100644 kio/kssl/kopenssl.h delete mode 100644 kio/kssl/ksmimecrypto.cc delete mode 100644 kio/kssl/ksmimecrypto.h delete mode 100644 kio/kssl/kssl.cc delete mode 100644 kio/kssl/kssl.h delete mode 100644 kio/kssl/kssl/CMakeLists.txt delete mode 100644 kio/kssl/kssl/DigiCertAssuredIDRootCA.pem delete mode 100644 kio/kssl/kssl/DigiCertGlobalRootCA.pem delete mode 100644 kio/kssl/kssl/DigiCertHighAssuranceEVRootCA.pem delete mode 100644 kio/kssl/kssl/GeoTrust_Universal_CA.pem delete mode 100644 kio/kssl/kssl/GeoTrust_Universal_CA2.pem delete mode 100644 kio/kssl/kssl/HOWTO delete mode 100644 kio/kssl/kssl/Makefile.am delete mode 100644 kio/kssl/kssl/StartCom.pem delete mode 100644 kio/kssl/kssl/SwissSign-Gold-G2.pem delete mode 100644 kio/kssl/kssl/SwissSign-Platinum-G2.pem delete mode 100644 kio/kssl/kssl/SwissSign-Silver-G2.pem delete mode 100644 kio/kssl/kssl/WiseKey.pem delete mode 100644 kio/kssl/kssl/ac_offline_raiz_certicamara.pem delete mode 100644 kio/kssl/kssl/argedaten-root-ca-cert.pem delete mode 100644 kio/kssl/kssl/belgacom.pem delete mode 100644 kio/kssl/kssl/caroot/CMakeLists.txt delete mode 100644 kio/kssl/kssl/caroot/Makefile.am delete mode 100644 kio/kssl/kssl/caroot/ca-bundle.crt delete mode 100755 kio/kssl/kssl/cert_bundle delete mode 100644 kio/kssl/kssl/cert_extract.c delete mode 100644 kio/kssl/kssl/certbundle_Makefile delete mode 100755 kio/kssl/kssl/certkde delete mode 100644 kio/kssl/kssl/certum.pem delete mode 100644 kio/kssl/kssl/certum1.pem delete mode 100644 kio/kssl/kssl/certum2.pem delete mode 100644 kio/kssl/kssl/certum3.pem delete mode 100644 kio/kssl/kssl/certum4.pem delete mode 100644 kio/kssl/kssl/comodo1.pem delete mode 100644 kio/kssl/kssl/comodo2.pem delete mode 100644 kio/kssl/kssl/comodo3.pem delete mode 100644 kio/kssl/kssl/comodo4.pem delete mode 100644 kio/kssl/kssl/comodo5.pem delete mode 100644 kio/kssl/kssl/comodo6.pem delete mode 100644 kio/kssl/kssl/comodo7.pem delete mode 100644 kio/kssl/kssl/dfn-root-ca-cert.pem delete mode 100644 kio/kssl/kssl/gd-class2-root.pem delete mode 100644 kio/kssl/kssl/geotrust-global-1.pem delete mode 100644 kio/kssl/kssl/geotrust-global-2.pem delete mode 100644 kio/kssl/kssl/globalsign-root-r1.pem delete mode 100644 kio/kssl/kssl/globalsign-root-r2.pem delete mode 100644 kio/kssl/kssl/icpbrasil.pem delete mode 100644 kio/kssl/kssl/ipsservidores.pem delete mode 100644 kio/kssl/kssl/ksslcalist delete mode 100644 kio/kssl/kssl/localcerts delete mode 100755 kio/kssl/kssl/mergelocal delete mode 100644 kio/kssl/kssl/netlock1.pem delete mode 100644 kio/kssl/kssl/netlock2.pem delete mode 100644 kio/kssl/kssl/netlock3.pem delete mode 100644 kio/kssl/kssl/netlock4.pem delete mode 100644 kio/kssl/kssl/oces.pem delete mode 100644 kio/kssl/kssl/quovadis.pem delete mode 100644 kio/kssl/kssl/qvrca2.pem delete mode 100644 kio/kssl/kssl/qvrca3.pem delete mode 100644 kio/kssl/kssl/sf-class2-root.pem delete mode 100644 kio/kssl/kssl/sonera1.pem delete mode 100644 kio/kssl/kssl/sonera2.pem delete mode 100644 kio/kssl/kssl/staatdernederlandenrotca.pem delete mode 100644 kio/kssl/kssl/startcom.pem delete mode 100644 kio/kssl/kssl/startssl.pem delete mode 100644 kio/kssl/kssl/tcclass2-2011.pem delete mode 100644 kio/kssl/kssl/tcclass3-2011.pem delete mode 100644 kio/kssl/kssl/utn-network.pem delete mode 100644 kio/kssl/kssl/utn-sgc.pem delete mode 100644 kio/kssl/kssl/xgca.pem delete mode 100644 kio/kssl/ksslall.h delete mode 100644 kio/kssl/ksslcallback.c delete mode 100644 kio/kssl/ksslcertchain.cc delete mode 100644 kio/kssl/ksslcertchain.h delete mode 100644 kio/kssl/ksslcertdlg.cc delete mode 100644 kio/kssl/ksslcertdlg.h delete mode 100644 kio/kssl/ksslcertificate.cc delete mode 100644 kio/kssl/ksslcertificate.h delete mode 100644 kio/kssl/ksslcertificatecache.cc delete mode 100644 kio/kssl/ksslcertificatecache.h delete mode 100644 kio/kssl/ksslcertificatefactory.cc delete mode 100644 kio/kssl/ksslcertificatefactory.h delete mode 100644 kio/kssl/ksslcertificatehome.cc delete mode 100644 kio/kssl/ksslcertificatehome.h delete mode 100644 kio/kssl/ksslconfig.h.cmake delete mode 100644 kio/kssl/ksslconfig.h.in delete mode 100644 kio/kssl/ksslconfig_win.h delete mode 100644 kio/kssl/ksslconnectioninfo.cc delete mode 100644 kio/kssl/ksslconnectioninfo.h delete mode 100644 kio/kssl/ksslcsessioncache.cc delete mode 100644 kio/kssl/ksslcsessioncache.h delete mode 100644 kio/kssl/kssldefs.h delete mode 100644 kio/kssl/ksslinfodlg.cc delete mode 100644 kio/kssl/ksslinfodlg.h delete mode 100644 kio/kssl/ksslkeygen.cc delete mode 100644 kio/kssl/ksslkeygen.h delete mode 100644 kio/kssl/ksslpeerinfo.cc delete mode 100644 kio/kssl/ksslpeerinfo.h delete mode 100644 kio/kssl/ksslpemcallback.cc delete mode 100644 kio/kssl/ksslpemcallback.h delete mode 100644 kio/kssl/ksslpkcs12.cc delete mode 100644 kio/kssl/ksslpkcs12.h delete mode 100644 kio/kssl/ksslpkcs7.cc delete mode 100644 kio/kssl/ksslpkcs7.h delete mode 100644 kio/kssl/ksslsession.cc delete mode 100644 kio/kssl/ksslsession.h delete mode 100644 kio/kssl/ksslsettings.cc delete mode 100644 kio/kssl/ksslsettings.h delete mode 100644 kio/kssl/ksslsigners.cc delete mode 100644 kio/kssl/ksslsigners.h delete mode 100644 kio/kssl/ksslutils.cc delete mode 100644 kio/kssl/ksslutils.h delete mode 100644 kio/kssl/ksslx509map.cc delete mode 100644 kio/kssl/ksslx509map.h delete mode 100644 kio/kssl/ksslx509v3.cc delete mode 100644 kio/kssl/ksslx509v3.h delete mode 100644 kio/kurifilterplugin.desktop delete mode 100644 kio/magic delete mode 100644 kio/misc/CMakeLists.txt delete mode 100644 kio/misc/Makefile.am delete mode 100755 kio/misc/fileshareset delete mode 100644 kio/misc/kfile/CMakeLists.txt delete mode 100644 kio/misc/kfile/Makefile.am delete mode 100644 kio/misc/kfile/README delete mode 100644 kio/misc/kfile/fileprops.cpp delete mode 100644 kio/misc/kfile/fileprops.h delete mode 100644 kio/misc/kio_uiserver.desktop delete mode 100644 kio/misc/kmailservice.cpp delete mode 100644 kio/misc/kmailservice.protocol delete mode 100644 kio/misc/kpac/CMakeLists.txt delete mode 100644 kio/misc/kpac/Makefile.am delete mode 100644 kio/misc/kpac/README delete mode 100644 kio/misc/kpac/README.wpad delete mode 100644 kio/misc/kpac/TODO delete mode 100644 kio/misc/kpac/configure.in.in delete mode 100644 kio/misc/kpac/dhcp.h delete mode 100644 kio/misc/kpac/discovery.cpp delete mode 100644 kio/misc/kpac/discovery.h delete mode 100644 kio/misc/kpac/downloader.cpp delete mode 100644 kio/misc/kpac/downloader.h delete mode 100644 kio/misc/kpac/eventsrc delete mode 100644 kio/misc/kpac/kpac_dhcp_helper.c delete mode 100644 kio/misc/kpac/kpactest.pac delete mode 100644 kio/misc/kpac/proxyscout.cpp delete mode 100644 kio/misc/kpac/proxyscout.desktop delete mode 100644 kio/misc/kpac/proxyscout.h delete mode 100644 kio/misc/kpac/script.cpp delete mode 100644 kio/misc/kpac/script.h delete mode 100644 kio/misc/ksendbugmail/CMakeLists.txt delete mode 100644 kio/misc/ksendbugmail/Makefile.am delete mode 100644 kio/misc/ksendbugmail/main.cpp delete mode 100644 kio/misc/ksendbugmail/main.h delete mode 100644 kio/misc/ksendbugmail/smtp.cpp delete mode 100644 kio/misc/ksendbugmail/smtp.h delete mode 100644 kio/misc/kssld/CMakeLists.txt delete mode 100644 kio/misc/kssld/Makefile.am delete mode 100644 kio/misc/kssld/kssld.cpp delete mode 100644 kio/misc/kssld/kssld.desktop delete mode 100644 kio/misc/kssld/kssld.h delete mode 100644 kio/misc/ktelnetservice.cpp delete mode 100644 kio/misc/mms.protocol delete mode 100644 kio/misc/mmst.protocol delete mode 100644 kio/misc/mmsu.protocol delete mode 100644 kio/misc/pnm.protocol delete mode 100644 kio/misc/rlogin.protocol delete mode 100644 kio/misc/rtsp.protocol delete mode 100644 kio/misc/rtspt.protocol delete mode 100644 kio/misc/rtspu.protocol delete mode 100644 kio/misc/ssh.protocol delete mode 100644 kio/misc/tdentlm/CMakeLists.txt delete mode 100644 kio/misc/tdentlm/Makefile.am delete mode 100644 kio/misc/tdentlm/des.cpp delete mode 100644 kio/misc/tdentlm/des.h delete mode 100644 kio/misc/tdentlm/kswap.h delete mode 100644 kio/misc/tdentlm/tdentlm.cpp delete mode 100644 kio/misc/tdentlm/tdentlm.h delete mode 100644 kio/misc/tdesasl/CMakeLists.txt delete mode 100644 kio/misc/tdesasl/Makefile.am delete mode 100644 kio/misc/tdesasl/tdesasl.cpp delete mode 100644 kio/misc/tdesasl/tdesasl.h delete mode 100644 kio/misc/tdewalletd/CMakeLists.txt delete mode 100644 kio/misc/tdewalletd/Makefile.am delete mode 100644 kio/misc/tdewalletd/kbetterthankdialogbase.ui delete mode 100644 kio/misc/tdewalletd/kbetterthankdialogbase.ui.h delete mode 100644 kio/misc/tdewalletd/ktimeout.cpp delete mode 100644 kio/misc/tdewalletd/ktimeout.h delete mode 100644 kio/misc/tdewalletd/tdewalletd.cpp delete mode 100644 kio/misc/tdewalletd/tdewalletd.desktop delete mode 100644 kio/misc/tdewalletd/tdewalletd.h delete mode 100644 kio/misc/tdewalletd/tdewalletwizard.ui delete mode 100644 kio/misc/tdewalletd/tdewalletwizard.ui.h delete mode 100644 kio/misc/telnet.protocol delete mode 100644 kio/misc/uiserver.cpp delete mode 100644 kio/misc/uiserver.h delete mode 100644 kio/pics/CMakeLists.txt delete mode 100644 kio/pics/Makefile.am delete mode 100644 kio/pics/cr16-app-kio_uiserver.png delete mode 100755 kio/proxytype.pl delete mode 100644 kio/renamedlgplugin.desktop delete mode 100644 kio/tdecmodule.desktop delete mode 100644 kio/tests/CMakeLists.txt delete mode 100644 kio/tests/Makefile.am delete mode 100644 kio/tests/dataprotocoltest.cpp delete mode 100644 kio/tests/dummymeta.cpp delete mode 100644 kio/tests/dummymeta.desktop delete mode 100644 kio/tests/dummymeta.h delete mode 100644 kio/tests/getalltest.cpp delete mode 100644 kio/tests/jobtest.cpp delete mode 100644 kio/tests/jobtest.h delete mode 100644 kio/tests/kacltest.cpp delete mode 100644 kio/tests/kacltest.h delete mode 100644 kio/tests/kdcopcheck.cpp delete mode 100644 kio/tests/kdcopcheck.h delete mode 100644 kio/tests/kdefaultprogresstest.cpp delete mode 100644 kio/tests/kdirlistertest.cpp delete mode 100644 kio/tests/kdirlistertest.h delete mode 100644 kio/tests/kdirwatchtest.cpp delete mode 100644 kio/tests/kdirwatchtest.h delete mode 100644 kio/tests/kdirwatchunittest.cpp delete mode 100644 kio/tests/kdirwatchunittest.h delete mode 100644 kio/tests/kfiltertest.cpp delete mode 100644 kio/tests/kionetrctest.cpp delete mode 100644 kio/tests/kiopassdlgtest.cpp delete mode 100644 kio/tests/kioslavetest.cpp delete mode 100644 kio/tests/kioslavetest.h delete mode 100644 kio/tests/kmfitest.cpp delete mode 100644 kio/tests/kmimefromext.cpp delete mode 100644 kio/tests/kmimemagictest.cpp delete mode 100644 kio/tests/kmimetypetest.cpp delete mode 100644 kio/tests/kpropsdlgtest.cpp delete mode 100644 kio/tests/kprotocolinfotest.cpp delete mode 100644 kio/tests/kruntest.cpp delete mode 100644 kio/tests/kruntest.h delete mode 100644 kio/tests/kscantest.cpp delete mode 100644 kio/tests/kshredtest.cpp delete mode 100644 kio/tests/ktartest.cpp delete mode 100644 kio/tests/ktradertest.cpp delete mode 100644 kio/tests/kurifiltertest.cpp delete mode 100644 kio/tests/kurlcompletiontest.cpp delete mode 100644 kio/tests/kziptest.cpp delete mode 100644 kio/tests/metatest.cpp delete mode 100644 kio/tests/netaccesstest.cpp delete mode 100644 kio/tests/previewtest.cpp delete mode 100644 kio/tests/previewtest.h delete mode 100644 kio/tests/speed.cpp delete mode 100644 kio/tests/speed.h delete mode 100644 kio/tests/tdesycocatest.cpp delete mode 100644 kio/tests/tdesycocaupdatetest.cpp delete mode 100644 kio/tests/wronglocalsizes.zip delete mode 100755 kio/useragent.pl (limited to 'kio') diff --git a/kio/CMakeLists.txt b/kio/CMakeLists.txt deleted file mode 100644 index cd2dfd80e..000000000 --- a/kio/CMakeLists.txt +++ /dev/null @@ -1,71 +0,0 @@ -################################################# -# -# (C) 2010 Serghei Amelian -# serghei (DOT) amelian (AT) gmail.com -# -# Improvements and feedback are welcome -# -# This file is released under GPL >= 2 -# -################################################# - -add_definitions( - -D_LARGEFILE64_SOURCE=1 -) - -add_subdirectory( kssl ) -add_subdirectory( kio ) -add_subdirectory( bookmarks ) -add_subdirectory( kfile ) -add_subdirectory( pics ) -add_subdirectory( kioexec ) -add_subdirectory( httpfilter ) -add_subdirectory( misc ) -add_subdirectory( kpasswdserver ) -add_subdirectory( tests ) - -include_directories( - ${TQT_INCLUDE_DIRS} -) - -link_directories( - ${TQT_LIBRARY_DIRS} - ${LIBR_LIBDIR} -) - - -##### other data ################################ - -install( FILES magic DESTINATION ${MIME_INSTALL_DIR} ) - -install( FILES - application.desktop kurifilterplugin.desktop - kcomprfilter.desktop kscan.desktop kdatatool.desktop - kfileplugin.desktop tdecmodule.desktop - DESTINATION ${SERVICETYPES_INSTALL_DIR} ) - -install( FILES kioslave.upd DESTINATION ${KCONF_UPDATE_INSTALL_DIR} ) -install( PROGRAMS useragent.pl proxytype.pl DESTINATION ${KCONF_UPDATE_INSTALL_DIR} ) -install( FILES renamedlgplugin.desktop DESTINATION ${SERVICETYPES_INSTALL_DIR} ) -install( FILES kpasswdserver.desktop DESTINATION ${SERVICES_INSTALL_DIR}/kded ) -install( FILES data.protocol DESTINATION ${SERVICES_INSTALL_DIR} ) - - -if( HAVE_ELFICON ) - set( ELFICON_STATIC_LIB tdelficon-static ) -endif( HAVE_ELFICON ) - - -##### libkio #################################### - -set( target kio ) - -configure_file( ${CMAKE_SOURCE_DIR}/cmake/modules/template_dummy_cpp.cmake dummy.cpp COPYONLY ) - -tde_add_library( ${target} SHARED - SOURCES ${CMAKE_CURRENT_BINARY_DIR}/dummy.cpp - VERSION 4.2.0 - EMBED kssl-static kiocore-static tdesycoca-static kbookmarks-static kfile-static ${ELFICON_STATIC_LIB} - LINK ltdlc-static tdeui-shared tdesu-shared tdewalletclient-shared ${LIBR_LIBRARIES} - DESTINATION ${LIB_INSTALL_DIR} -) diff --git a/kio/DESIGN b/kio/DESIGN deleted file mode 100644 index 08617bbda..000000000 --- a/kio/DESIGN +++ /dev/null @@ -1,272 +0,0 @@ -DESIGN: -======= - -libkio uses kioslaves (separate processes) that handle a given protocol. -Launching those slaves is taken care of by the tdeinit/klauncher tandem, -which are notified by DCOP. - -Connection is the most low-level class, the one that encapsulates the pipe. - -SlaveInterface is the main class for transferring anything to the slave -and Slave, which inherits SlaveInterface, is the sub class that Job should handle. - -A slave inherits SlaveBase, which is the other half of SlaveInterface. - -The scheduling is supposed to be on a two level basis. One is in the daemon -and one is in the application. The daemon one (as opposite to the holy one? :) -will determine how many slaves are ok for this app to be opened and it will -also assign tasks to actually existing slaves. -The application will still have some kind of a scheduler, but it should be -a lot simpler as it doesn't have to decide anything besides which -task goes to which pool of slaves (related to the protocol/host/user/port) -and move tasks around. -Currently a design study to name it cool is in scheduler.cpp but in the -application side. This is just to test other things like recursive jobs -and signals/slots within SlaveInterface. If someone feels brave, the scheduler -is yours! -On a second thought: at the daemon side there is no real scheduler, but a -pool of slaves. So what we need is some kind of load calculation of the -scheduler in the application and load balancing in the daemon. - -A third thought: Maybe the daemon can just take care of a number of 'unused' -slaves. When an application needs a slave, it can request it from the daemon. -The application will get one, either from the pool of unused slaves, -or a new one will be created. This keeps things simple at the daemon level. -It is up to the application to give the slaves back to the daemon. -The scheduler in the application must take care not to request too many -slaves and could implement priorities. - -Thought on usage: -* Typically a single slave-type is used exclusively in one application. E.g. -http slaves are used in a web-browser. POP3 slaves used in a mail program. - -* Sometimes a single program can have multiple roles. E.g. konqueror is -both a web-browser and a file-manager. As a web-browser it primarily uses -http-slaves as a file-manager file-slaves. - -* Selecting a link in konqueror: konqueror does a partial download of -the file to check the mimetype (right??) then the application is -started which downloads the complete file. In this case it should -be able to pass the slave which does the partial download from konqueror -to the application where it can do the complete download. - -Do we need to have a hard limit on the number of slaves/host? -It seems so, because some protocols are about to fail if you -have two slaves running in parralel (e.g. POP3) -This has to be implemented in the daemon because only at daemon -level all the slaves are known. As a consequence slaves must -be returned to the daemon before connecting to another host. -(Returning the slaves back to the daemon after every job is not -strictly needed and only causes extra overhead) - -Instead of actually returning the slave to the daemon, it could -be enough to ask 'recycling permission' from the daemon: the -application asks the daemon whether it is ok to use a slave for -another host. The daemon can then update its administration of -which slave is connected to which host. - -The above does of course not apply to hostless protocols (like file). -(They will never change host). - -Apart from a 'hard limit' on the number of slaves/host we can have -a 'soft limit'. E.g. upon connection to a HTTP 1.1 server, the web- -server tells the slave the number of parallel connections allowed. -THe simplest solution seems to be to treat 'soft limits' the same -as 'hard limits'. This means that the slave has to communicate the -'soft limit' to the daemon. - -Jobs using multiple slaves. - -If a job needs multiple slaves in parallel (e.g. copying a file from -a web-server to a ftp-server or browsing a tar-file on a ftp-site) -we must make sure to request the daemon for all slaves together since -otherwise there is a risk of deadlock. - -(If two applications both need a 'pop3' and a 'ftp' slave for a single -job and only a single slave/host is allowed for pop3 and ftp, we must -prevent giving the single pop3 slave to application #1 and the single -ftp slave to application #2. Both applications will then wait till the -end of times till they get the other slave so that they can start the -job. (This is a quite unlikely situation, but nevertheless possible)) - - -File Operations: -listRecursive is implemented as listDir and finding out if in the result - is a directory. If there is, another listDir job is issued. As listDir - is a readonly operation it fails when a directory isn't readable - .. but the main job goes on and discards the error, because -bIgnoreSubJobsError is true, which is what we want (David) - -del is implemented as listRecursive, removing all files and removing all - empty directories. This basically means if one directory isn't readable - we don't remove it as listRecursive didn't find it. But the del will later - on try to remove it's parent directory and fail. But there are cases when - it would be possible to delete the dir in chmod the dir before. On the - other hand del("/") shouldn't list the whole file system and remove all - user owned files just to find out it can't remove everything else (this - basically means we have to take care of things we can remove before we try) - - ... Well, rm -rf / refuses to do anything, so we should just do the same: - use a listRecursive with bIgnoreSubJobsError = false. If anything can't - be removed, we just abort. (David) - - ... My concern was more that the fact we can list / doesn't mean we can - remove it. So we shouldn't remove everything we could list without checking - we can. But then the question arises how do we check whether we can remove it? - (Stephan) - - ... I was wrong, rm -rf /, even as a user, lists everything and removes - everything it can (don't try this at home!). I don't think we can do - better, unless we add a protocol-dependent "canDelete(path)", which is - _really_ not easy to implement, whatever protocol. (David) - - -Lib docu -======== - -mkdir: ... - -rmdir: ... - -chmod: ... - -special: ... - -stat: ... - -get is implemented as TransferJob. Clients get 'data' signals with the data. -A data block of zero size indicates end of data (EOD) - -put is implemented as TransferJob. Clients have to connect to the -'dataReq' signal. The slave will call you when it needs your data. - -mimetype: ... - -file_copy: copies a single file, either using CMD_COPY if the slave - supports that or get & put otherwise. - -file_move: moves a single file, either using CMD_RENAME if the slave - supports that, CMD_COPY + del otherwise, or eventually - get & put & del. - -file_delete: delete a single file. - -copy: copies a file or directory, recursively if the latter - -move: moves a file or directory, recursively if the latter - -del: deletes a file or directory, recursively if the latter - -PROGRESS DISPLAYING : -===================== -Taj brought up the idea of deligating all progress informations to an extern -GUI daemon which could be provided in several implementations - examples -are popup dialogs (most are annoyed by them, like me :) or a kicker applet -or something completely different. This would also remove the dependency on -libtdeui (I hope). -Conclusion: kio_uiserver is this single GUI daemon, but the dependency on -libtdeui couldn't be removed (for many reasons, including Job::showErrorDialog()) - -A. progress handling ---------------------- -There will be two ways how the application can display progress : - -1. regular apps will use NetAccess for all kio operations and will not care - about progress handling : - - NetAccess creates Job - - NetAccess creates JobObserver that will connect to the Job's signals and - pass them via dcop to the running GUI Progress Server - -2. apps that want to do some handling with progress dialogs like Caitoo or - KMail : - - app creates Job - - app creates a progress dialog : this should be a ProgressBase descendant - e.g. StatusProgress or custom progress dialog - - app calls progress->setJob( job ) in order to connect job's signals with - progress dialog slots - -B. customized progress dialogs -------------------------------- - This will be similar to what we had before. - - - ProgressBase class that all other dialogs will inherit. - will contain an initialization method setJob( TDEIO::Job*) for apps of the - second class (see A.2 above), that will connect job's signals to dialog's - slots - - - DefaultProgress ( former KIOSimpleProgressDialog ) that will be used for - regular progress dialogs created by GUI Progress Server - - - StatusProgress ( former KIOLittleProgressDialog ) that can be used for - embedding in status bar - -C. GUI Progress Server ------------------------ - This is a special progress server. - - createProgress() will either create a DefaultProgress dialog or add new entry - in a ListProgress ( an all-jobs-in-one progress dialog ) - - after receiving signals from the JobObserver via DCOP it will call - appropriate method of progress dialog ( either in DefaultProgress or ListProgress ) - - ListProgres can be a Caitoo style dialog, kicker applet or both in one. - -D. Some notes --------------- - 1. most of the apps will not care at all about the progress display - 2. user will be able to choose whether he wants to see separate progress - dialogs or all-in-one ListProgress dialog - 3. developers can create their custom progress dialogs that inherit - ProgressBase and do any manipulation with a dialog if they use a second - approach ( see A.2 above ) - - -Streaming ---------- - - 1. We currently support a streaming "GET": e.g. file:/tmp/test.gz#gzip:/ - works. The following should also work: file:/tmp/test.gz.gz#gzip:/#gzip:/ - The current approach makes a TrasnferJob for gzip:/ and then adds a - subjob for "file:/tmp/test.gz.gz#gzip:/" which itself adds a subjob - for "file:/tmp/test.gz.gz". - 2. This doesn't extend very well to PUT, because there the order should - basically be the other way around, but the "input" to the job as a whole - should go to the "gzip:/" job, not to the "file:/tmp/test.gz.gz." - It would probably be easier to implement such a job in the way the - current "CopyJob" is done. Have a Job and make all sub-urls sub-jobs of - this Job. - 3. As a result of 1. COPY FROM an url like file:/tmp/test.gz#gzip:/ should - work. COPY TO does not, because that would require PUT. - - -Resuming --------- - -A rough note for now, just to have this somewhere : -(PJ=put-job, GJ=get-job) - -PJ can't resume: -PJ-->app: canResume(0) (emitted by dataReq) -GJ-->app: data() -PJ-->app: dataReq() -app->PJ: data() - -PJ can resume but GJ can't resume: -PJ-->app: canResume(xx) -app->GJ: start job with "resume=xxx" metadata. -GJ-->app: data() -PJ-->app: dataReq() -app->PJ: data() - -PJ can resume and GJ can resume: -PJ-->app: canResume(xx) -app->GJ: start job with "resume=xxx" metadata. -GJ-->app: canResume(xx) -GJ-->app: data() -PJ-->app: dataReq() -app->PJ: canResume(xx) -app->PJ: data() - -So when the slave supports resume for "put" it has to check after the first -dataRequest() whether it has got a canResume() back from the app. If it did -it must resume. Otherwise it must start from 0. - - diff --git a/kio/DESIGN.krun b/kio/DESIGN.krun deleted file mode 100644 index 948ef79a3..000000000 --- a/kio/DESIGN.krun +++ /dev/null @@ -1,35 +0,0 @@ - -konq_run / krun should determine the mimetype by actually -getting the contents of the URL. It should then put the slave -on hold and tell the job-scheduler which request the -slave is currently handling. (Status: implemented in konq_run) - -Now krun/konq_run should determine which client should process the -result of the request. - -* When the client belongs to the same process, no action needs to be -taken. When a new job is created for the request which is on hold the -existing slave will be re-used and the request resumed. -(Status: implemented) - -* When the client is an external process, the on-hold-slave should be -removed from the job-scheduler and should connect itself with -klauncher. This is hard because it must ensure that the external -program does not request the slave before it has been transfered to -klauncher. (Status: to be done) - -* When a slave is on hold but not used for a certain period of time, -or, when another slave is put on hold, the slave should be killed. -(Status: almost done) - -===== - -The slave must emit "mimetype" during a GET before the first data is send. - -It may wait with sending "mimetype" until it has enough data to -determine the mimetype, but it should not pass any data along before it has -send the mimetype. - -Currently only http _always_ sends a mimetype. - - diff --git a/kio/DESIGN.metadata b/kio/DESIGN.metadata deleted file mode 100644 index 783d7f52a..000000000 --- a/kio/DESIGN.metadata +++ /dev/null @@ -1,147 +0,0 @@ -METADATA -======== - -Applications can provide "metadata" to the slaves. Metadata can influence -the behavior of a slave and is usally protocol dependent. MetaData consists -of two strings: a "key" and a "value". - - -The following keys are currently in use: - -Key Value(s) Description ----- -------- ----------- - -referrer string The URL from which the request originates. (read by http) - -modified string The modification date of the document (set by http) - -accept string List of mimetypes to accept separated by a ", ". (read by http) - -SendUserAgent bool Whether to send a User-Agent (read by http) -UserAgent string The user agent name to send to remote host (read by http) - -content-type string The content type of the data to be uploaded (read by http) -media-* string Media-Parameter attributes (e.g. media-boundary) - -cache "cache" Use entry from cache if available. - "cacheonly" Do not do any remote lookups, fail if not in cache. (read by http) - "verify" Use entry from cache, verify with remote server if expired - "refresh" Use entry from cache after verifying with remote server - "reload" Do not do any cache lookups. - -no-cache bool Flag that indicates whether caching is enabled/disabled - -window-id number winId() of the window the request is associated with. - -resume number Try to get the file starting at the given offset (set by TransferJob) - -charset string Charset of the current content as returned by a HTTP Header Response. - -Charsets string Charset(s) send in the "Accept-Charset:" HTTP Request Header. - -Languages string Language(s) send in the "Accept-Language:" HTTP Request Header. - -content- -disposition string Suggested name to Save a file as as returned by a HTTP Header Response. - -request-id number Sequence number to identify requests in a MultiGet command. - -expire-date number Date on which a cache entry needs validation. - -cache-creation-date number Date on which a cache entry has been created. - -http-refresh string Passes HTTP Refresh meta-data back to the application. - -cookies "auto" Use kcookiejar to lookup and collect cookies (default) - "manual" Cookies set in "setcookies" are send, received cookies are reported via "setcookies". - "none" No cookies are send, received cookies are discarded. - -setcookies string Used to send/receive HTTP cookies when "cookies" is set to "manual". - -errorPage bool Flag that indicates that an errorPage() is preferred over an error(). (default:true) - -no-auth bool Flag that indicates that no authentication attempts should be made. -no-auth-prompt bool Flag that indicates that only cached authentication tokens should be used. - -ssl_activate_warnings bool Flag that disables SSL warning dialogs if set to false. (default: true) - -ssl_was_in_use bool Flag to tell TCPSlaveBase if SSL was in use in the previous transaction. (default: false) - -ssl_in_use bool Set in TCPSlaveBase to tell the caller if SSL is in use. (default: assume false) - -ssl_using_client_cert bool Set in TCPSlaveBase to tell the caller if the session is using a client certificate (default: assume false) - -ssl_no_client_cert bool Flag to tell TCPSlaveBase if it should, under no circumstances, use a client certificate. (default: false) - -ssl_force_cert_prompt bool Flag to tell TCPSlaveBase to force the client certificate dialog to appear on this connection. ssl_no_client_cert overrides this flag. This does not force the user to actually choose a certificate. (default: false) - -ssl_demand_certificate bool Flag to tell TCPSlaveBase to demand that a client certificate is used for this connection. (default: false) - -ssl_militant bool Flag to tell TCPSlaveBase "do it right, or don't do it at all". This means that if the certificate check or any other security test fails, just silently fail the connection. This is of particular use to favicon code. (default: false) - -ssl_cipher string Set in TCPSlaveBase to tell the caller which cipher is currently being used. - -ssl_cipher_desc string Set in TCPSlaveBase to describe the details of the current cipher being used. - -ssl_cipher_version string Set in TCPSlaveBase to describe the version of the cipher being used. - -ssl_cipher_used_bits integer Set in TCPSlaveBase to relay the number of bits of the key actually being used in this cipher and connection. - -ssl_cipher_bits integer Set in TCPSlaveBase to relay the number of bits the key is capable of in this cipher and connection. - -ssl_peer_ip string Set in TCPSlaveBase to tell the caller the IP address of the peer. - -ssl_cert_state integer Set in TCPSlaveBase to relay the state of the certificate check, without considering the cache settings. Can be checked with KSSLCertificate enumeration. - -ssl_peer_certificate string Set in TCPSlaveBase to relay the base64 encoding of the X.509 certificate presented by the peer. - -ssl_peer_chain string Set, if present, in TCPSlaveBase to relay the entire certificate chain presented by the peer. The is base64 encoded and \n delimited. - -ssl_action string Set in TCPSlaveBase to determine what the user wishes to do about the connection. Enumerated to {"accept", "reject"} currently. - -ssl_parent_ip string Set in TCPSlaveBase and in the caller. If this is the parent frame of a frame of the session (really only applies to https), this variable is set so that it can be passed back to the child frames. It is necessary to send it to child frames so that they can do a full certificate check. - -ssl_parent_cert string Set in TCPSlaveBase and in the caller. As above, this must be passed to child frames by the caller so that it can compare against the certificate presented in the child frames. It is a base64 encoding of the X.509 presented. - -ssl_session_id string Set in TCPSlaveBase to indicate the SSL session ID in base64 encoded ASN.1 encoded binary format. Also set in the caller to indicate to TCPSlaveBase to reuse a particular session ID. - -ssl_proxied bool Presently exists only if true. Set in TCPSlaveBase to indicate that a proxy is in use for this SSL connection. - -main_frame_request bool Actually for SSL, this is set in the caller to tell TCPSlaveBase if this is the request for the main frame of an html page. (dfault: true) - -HTTP-Version string The HTTP version in use for kio_http (set by http) - -PropagateHttpHeader bool Whether HTTP headers should be send back (read by http) - -HTTP-Headers string The HTTP headers, concatenated, \n delimited (set by http) - Requires PropagateHttpHeader to be set. - -PrivacyPolicy stringlist \n delimited URIs referring to P3P privacy - policies presented by the HTTP server - -PrivacyCompactPolicy stringlist \n delimited P3P compact tag policies - presented by the HTTP server - -textmode bool When true, switches FTP up/downloads to ascii transfer mode (read by ftp) - -DefaultRemoteProtocol string Protocol to redirect file:/// URLs to, default is "smb" (read by file) - -** NOTE: Anything in quotes ("") under Value(s) indicates literal value. - - -Examples: - -E.g. the following disables cookies: -job = TDEIO::get( KURL("http://www.kde.org"), false, false); -job->addMetaData("cookies", "none"); - -If you want to handle cookies yourself, you can do: -job = TDEIO::get( KURL("http://www.kde.org"), false, false); -job->addMetaData("cookies", "manual"); -job->addMetaData("setcookies", "Cookie: foo=bar; gnat=gnork"); - -The above sends two cookies along with the request, any cookies send back by -the server can be retrieved with job->queryMetaData("cookies") after -receiving the mimetype() signal or when the job is finished. - -The cookiejar is not used in this case. diff --git a/kio/DESIGN.mimetypes b/kio/DESIGN.mimetypes deleted file mode 100644 index 7f1d81b11..000000000 --- a/kio/DESIGN.mimetypes +++ /dev/null @@ -1,34 +0,0 @@ -TODO: servicetypes -TODO: mimetypes - -Service type inheritance (X-TDE-Derived) -======================================== -X-TDE-Derived is for service types. ST1 derives from ST2 means ST1 is more specific than ST2. -If a service implements ST1, it also implements ST2, but not the other way round. - -For instance, KoDocument derives from KParts/ReadWritePart, which derives from KParts/ReadOnlyPart, -so KWord's part (which implements KoDocument) can be used as a readonly viewer for KWord files -in Konqueror (which looks for a KParts/ReadOnlyPart). - -Mimetype "inheritance" -====================== -We need a mechanism to also say that "text/xml is a special case of text/plain", -or "text/docbook is a kind of text/sgml", or "application/x-smb-workgroup is a kind -of inode/directory", etc. See below. - -Why mimetype "inheritance" doesn't use X-TDE-Derived -==================================================== -The confusing thing is that we said "a mimetype is a servicetype". But that's not exactly correct. -As Waldo noted, "the ability to open a mimetype" is what's a servicetype. -So if text/xml said X-TDE-Derived=text/plain (i.e. ST1=text/xml, ST2=text/plain), -then an application opening text/xml (ST1) could also open text/plain (ST2) - which is not necessarily true. - -We want the other way round: to be able to open special kinds of text/plain in a plain text editor. -This is what X-TDE-IsAlso was introduced for. X-TDE-IsAlso kind of "works the other way" than X-TDE-Derived. -If M1 is a special kind of M2 (mimetypes), then "the ability to open M2" derives from "the ability to open M1" -So we say in text/xml: X-TDE-IsAlso=text/plain, and applications that can open text/plain can also open text/xml. - -Pattern Accuracy -====================== -In some cases of inheritance several mimetypes shares the same extension (with the primary case being Ogg Multimedia files). -This has been solved sofar by matching the extension to most generic mimetype. To indicate that the mimetype can be refined further, the flag X-TDE-PatternsAccuracy can be set. The value to X-TDE-PatternsAccuracy is a number between 0-100, with 100 being the default if not set. Any values below 100 is interpreted as the possibility of further mimetype refinement. diff --git a/kio/DESKTOP_ENTRY_STANDARD b/kio/DESKTOP_ENTRY_STANDARD deleted file mode 100644 index e19cc24c8..000000000 --- a/kio/DESKTOP_ENTRY_STANDARD +++ /dev/null @@ -1,373 +0,0 @@ - ---------------------------------------------------------------------------------------------------------------------------- - - Desktop Entry Standard - - Preston Brown - - - - Jonathan Blandford - - - - Owen Taylor - - - - Version 0.9.4 - - ---------------------------------------------------------------------------------------------------------------------------- - - Table of Contents - - Introduction - - Basic format of the file - - Possible value types - - Recognized desktop entry keys - - Character set encoding of the file - - List of valid Exec parameter variables - - Detailed discussion of supporting MIME types - - Extending the format - - A. Example Desktop Entry File - - B. Currently reserved for use within KDE - - C. Deprecated Items - - D. The Legacy-Mixed encoding (Deprecated) - -Introduction - - Both the KDE and GNOME desktop environments have adopted a similar format for "desktop entries," or configuration files - describing how a particular program is to be launched, how it appears in menus, etc. It is to the larger community's benefit - that a unified standard be agreed upon by all parties such that interoperation between the two environments, and indeed any - additional environments that implement the specification, becomes simpler. - -Basic format of the file - - These desktop entry files should have the extension ".desktop". Determining file type on basis of extension makes determining - the file type very easy and quick. When no file extension is present, the desktop system should fall back to recognition via - "magic detection." Desktop entries which describe how a directory is to be formatted/displayed should be simply called - ".directory". - - The basic format of the desktop entry file requires that there be a "group" header named "[Desktop Entry]". This "group" entry - denotes that all {key,value} pairs following it belong in the Desktop Entry group. There may be other groups present in the file - (see MIME types discussion below), but this is the most important group which explicitly needs to be supported. This group - should also be used as the "magic key" for automatic mime type detection. There should be nothing proceeding this group in the - desktop entry file but possibly one or more comments (see below). - - Group headers may not contain the characters '[' and ']' as those delimit the header. - - Lines beginning with a "#" and blank lines are considered comments and will be ignored, however they should be preserved across - reads / writes of the desktop entry file. - - Compliant implementations MUST not remove any fields from the file, even if they don't support them. Such fields must be - maintained in a list somewhere, and if the file is "rewritten," they will be included. This ensures that any desktop-specific - extensions will be preserved even if another system accesses and changes the file. - - Entries in the file are {key,value} pairs in the format: - - Name=Value - - Space before and after the equals sign should be ignored; the "=" sign is the actual delimiter. - - The escape sequences \s, \n, \t, \r, and \\ are supported, meaning ASCII space, newline, tab, carriage return, and backslash, - respectively. - -Possible value types - - The value types recognized are string, localestring, regexp, boolean (encoded as the string true/false), and numeric. - - The difference between string and localestring is that the value for a string key must contain only ASCII characters and while - the value of a localestring key may contain UTF-8 characters. (See section 5.) - - Some keys can have multiple values; these should be separated by a semicolon. Those keys which have several values should have a - semicolon as the trailing character. For lists of strings, semicolons are simply not allowed in the strings, there is no escape - mechanism. - -Recognized desktop entry keys - - Keys with type localestring may be postfixed by [LOCALE], where LOCALE is the locale type of the entry. LOCALE must be of the - form lang[_COUNTRY][ ENCODING][ MODIFIER], where _COUNTRY, .ENCODING, and @MODIFIER may be omitted. If a postfixed key occurs, - the same key must be also present without the postfix. - - When reading in the desktop entry file, the value of the key is selected by matching the current POSIX locale for the - LC_MESSAGES category against the locale postfixes of all occurrences of the key, with the .ENCODING part stripped. The .ENCODING - field is used only when the Encoding key for the desktop entry file is Legacy-Mixed, (see Appendix D.) - - The matching of is done as follows. If LC_MESSAGES is of the form LANG_COUNTRY.ENCODING@MODIFIER, then it will match a key of - the form LANG_COUNTRY@MODIFIER. If such a key does not exist, it will attempt to match LANG_COUNTRY followed by LANG@MODIFIER. - Then, a match against LANG by itself will be attempted. Finally, if no matching key is found the required key without a locale - specified is used. The encoding from the LC_MESSAGES value is ignored when matching. - - If LC_MESSAGES does not have a MODIFIER field, then no key with a modifier will be matched. Similarly, if LC_MESSAGES does not - have a COUNTRY field, then no key with a country specified will be matched. If LC_MESSAGES just has a LANG field, then it will - do a straight match to a key with a similar value. The following table lists possible matches of various LC_MESSAGES in the - order in which they are matched. Note that the ENCODING field isn't shown. - - Table 1. Locale Matching - - +-------------------------------------------------------------------------------------------------+ - | LC_MESSAGES Value | Possible Keys in Order of Matching | - |-----------------------+-------------------------------------------------------------------------| - | LANG_COUNTRY@MODIFIER | LANG_COUNTRY@MODIFIER, LANG_COUNTRY, LANG@MODIFIER, LANG, Default Value | - |-----------------------+-------------------------------------------------------------------------| - | LANG_COUNTRY | LANG_COUNTRY, LANG, Default Value | - |-----------------------+-------------------------------------------------------------------------| - | LANG@MODIFIER | LANG@MODIFIER, LANG, Default Value | - |-----------------------+-------------------------------------------------------------------------| - | LANG | LANG, Default Value | - +-------------------------------------------------------------------------------------------------+ - - For example, if the current value of the LC_MESSAGES category is sr_YU Latn and the desktop file includes: - - Name=Foo - Name[sr_YU]=... - Name[sr Latn]= - Name[sr]=... - - then the value of the Name keyed by "sr_YU" is used. - - Case is significant. The keys "Name" and "NAME" are not equivalent. The same holds for group names. Key values are case - sensitive as well. - - Keys are either OPTIONAL or REQUIRED. If a key is optional it may or may not be present in the file. However, if it isn't, the - implementation of the standard should not blow up, it must provide some sane defaults. Additionally, keys either MUST or MAY be - supported by a particular implementation. - - Some keys only make sense in the context when another particular key is also present. - - Some example keys: Name[C], Comment[it]. - - Table 2. Standard Keys - - +------------------------------------------------------------------------------------------------------------------------------+ - | Key | Description | Value Type | REQ? | MUST? | Type | - |------------------------+----------------------------------------------------------------+--------------+------+-------+------| - | Type | There are 4 types of desktop entries: Application(1), Link(2), | string | YES | YES | | - | | FSDevice(3) and Directory(4). | | | | | - |------------------------+----------------------------------------------------------------+--------------+------+-------+------| - | | Version of Desktop Entry Specification (While the version | | | | | - | | field is not required to be present, it should be in all newer | | | | | - | Version | implementations of the Desktop Entry specification. If the | numeric | NO | YES | 1-4 | - | | version number is not present, a "pre-standard" desktop entry | | | | | - | | file is to be assumed). | | | | | - |------------------------+----------------------------------------------------------------+--------------+------+-------+------| - | Encoding | Encoding of the whole desktop entry file (UTF-8 or | string | YES | YES | 1-4 | - | | LegacyMixed). | | | | | - |------------------------+----------------------------------------------------------------+--------------+------+-------+------| - | Name | Specific name of the application, for example "Mozilla". | localestring | YES | YES | 1-4 | - |------------------------+----------------------------------------------------------------+--------------+------+-------+------| - | GenericName | Generic name of the application, for example "Web Browser". | localestring | NO | YES | 1-4 | - |------------------------+----------------------------------------------------------------+--------------+------+-------+------| - | | NoDisplay means "this application exists, but don't display it | | | | | - | | in the menus". This can be useful to e.g. associate this | | | | | - | NoDisplay | application with mimetypes, so that it gets launched from a | boolean | NO | NO | 1-4 | - | | file manager (or other apps), without having a menu entry for | | | | | - | | it (there are tons of good reasons for this, including e.g. | | | | | - | | the netscape -remote, or kfmclient openURL kind of stuff). | | | | | - |------------------------+----------------------------------------------------------------+--------------+------+-------+------| - | Comment | Tooltip for the entry, for example "View sites on the | localestring | NO | YES | 1-4 | - | | Internet"; should not be redundant with Name or GenericName. | | | | | - |------------------------+----------------------------------------------------------------+--------------+------+-------+------| - | | Icon to display in file manager, menus, etc. If the name is an | | | | | - | | absolute path, the given file will be used. If the name is not | | | | | - | Icon | an absolute path, an implementation-dependent search algorithm | string | NO | YES | 1-4 | - | | will be used to locate the icon. Icons may be localized with | | | | | - | | the Icon[xx]= syntax. | | | | | - |------------------------+----------------------------------------------------------------+--------------+------+-------+------| - | | Hidden should have been called Deleted. It means the user | | | | | - | | deleted (at his level) something that was present (at an upper | | | | | - | | level, e.g. in the system dirs). It's strictly equivalent to | | | | | - | Hidden | the .desktop file not existing at all, as far as that user is | boolean | NO | NO | 1-4 | - | | concerned. This can also be used to "uninstall" existing files | | | | | - | | (e.g. due to a renaming) - by letting "make install" install a | | | | | - | | file with Hidden=true in it. | | | | | - |------------------------+----------------------------------------------------------------+--------------+------+-------+------| - | | A list of regular expressions to match against for a file | | | | | - | FilePattern | manager to determine if this entry's icon should be displayed. | regexp(s) | NO | NO | 1 | - | | Usually simply the name of the main executable and friends. | | | | | - |------------------------+----------------------------------------------------------------+--------------+------+-------+------| - | | Filename of a binary on disk used to determine if the program | | | | | - | TryExec | is actually installed. If not, entry may not show in menus, | string | NO | NO | 1 | - | | etc. | | | | | - |------------------------+----------------------------------------------------------------+--------------+------+-------+------| - | Exec | Program to execute, possibly with arguments. | string | NO | YES | 1 | - |------------------------+----------------------------------------------------------------+--------------+------+-------+------| - | Path | If entry is type Application, the working directory to run the | string | NO | YES | 1 | - | | program in. | | | | | - |------------------------+----------------------------------------------------------------+--------------+------+-------+------| - | Terminal | Whether the program runs in a terminal window | boolean | NO | YES | 1 | - |------------------------+----------------------------------------------------------------+--------------+------+-------+------| - | SwallowTitle | If entry is swallowed onto the panel, this should be the title | localestring | NO | NO | 1 | - | | of window | | | | | - |------------------------+----------------------------------------------------------------+--------------+------+-------+------| - | SwallowExec | Program to exec if swallowed app is clicked. | string | NO | NO | 1 | - |------------------------+----------------------------------------------------------------+--------------+------+-------+------| - | Actions | Additional actions possible, see MIME type discussion in the | string(s) | NO | YES | 1 | - | | section called "Detailed discussion of supporting MIME types". | | | | | - |------------------------+----------------------------------------------------------------+--------------+------+-------+------| - | MimeType | The MIME type(s) supported by this entry. | regexp(s) | NO | NO | 1 | - |------------------------+----------------------------------------------------------------+--------------+------+-------+------| - | SortOrder | This may specify the order in which to display files. | string(s) | NO | NO | 4 | - |------------------------+----------------------------------------------------------------+--------------+------+-------+------| - | Dev | The device to mount. | string | NO | NO | 3 | - |------------------------+----------------------------------------------------------------+--------------+------+-------+------| - | FSType | The type of filesystem to try to mount. | string | NO | NO | 3 | - |------------------------+----------------------------------------------------------------+--------------+------+-------+------| - | MountPoint | The mount point of the device in question. | string | NO | NO | 3 | - |------------------------+----------------------------------------------------------------+--------------+------+-------+------| - | ReadOnly | Specifies whether or not the device is read-only. | boolean | NO | NO | 3 | - |------------------------+----------------------------------------------------------------+--------------+------+-------+------| - | | Icon to display when device is not mounted Mounted devices | | | | | - | UnmountIcon | display icon from Icon key. UnmountIcons may be localized with | string | NO | NO | 3 | - | | the UnmountIcon[xx]= syntax. | | | | | - |------------------------+----------------------------------------------------------------+--------------+------+-------+------| - | URL | If entry is Link type, the URL to access. | string | NO | YES | 2 | - |------------------------+----------------------------------------------------------------+--------------+------+-------+------| - | Categories | Categories in which the entry should be shown in a menu (for | string(s) | NO | NO | 1 | - | | possible values see the xdg-menu specification). | | | | | - |------------------------+----------------------------------------------------------------+--------------+------+-------+------| - | | A list of strings identifying the environments that should | | | | | - | OnlyShowIn / NotShowIn | display/not display a given .desktop item. Only one of these | string(s) | NO | NO | 1-4 | - | | keys, either OnlyShowIn or NotShowIn, may appear in a Group. | | | | | - | | (for possible values see the xdg-menu specification) | | | | | - |------------------------+----------------------------------------------------------------+--------------+------+-------+------| - | | If true, it is KNOWN that the application will send a "remove" | | | | | - | StartupNotify | message when started with the DESKTOP_LAUNCH_ID environment | boolean | NO | NO | 1 | - | | variable set (see the startup notification spec for more | | | | | - | | details). | | | | | - |------------------------+----------------------------------------------------------------+--------------+------+-------+------| - | | If true, it is KNOWN that the application will map at least | | | | | - | StartupWMClass | one window with the given string as its WM class or WM name | string | NO | NO | 1 | - | | hint (see the startup notification spec for more details). | | | | | - +------------------------------------------------------------------------------------------------------------------------------+ - -Character set encoding of the file - - Desktop entry files are encoded as lines of 8-bit characters separated by LF characters. - - o Key names must contain only the characters 'A-Za-z0-9-' - - o Group names may contain all ASCII characters except for control characters and '[' and ']'. - - o Values of type string may contain all ASCII characters except for control characters. - - o Values of type boolean must either be the string 'true' or 'false'. - - o Numeric values must be a valid floating point number as recognized by the %f specifier for scanf. - - Comment lines are uninterpreted and may contain any character (except for LF). However, using UTF-8 for comment lines that - contain characters not in ASCII is encouraged. - - The encoding for values of type localestring is determined by the Encoding field. - -List of valid Exec parameter variables - - Each "Exec" field may take a number of arguments which will be expanded by the file manager or program launcher and passed to - the program if necessary. - - Literal % characters must be escaped as %%, and adding new format characters is not allowed. It's a fatal error to have an Exec - field with a format character not given in the spec (exception to this are the deprecated format characters which can be - ignored, that is expanded to no parameters, by the implementation). Again for emphasis: nonstandard extensions are not allowed - here - you must add an X-Foo-Exec field if you have nonstandard Exec lines. - - The escaping of the exec parameters is done in the way the mailcap specification describes. Take a look at RFC 1524 for more - information. - - Recognized fields are as follows: - - +------------------------------------------------------------------------------------------------------------------------------+ - | | a single file name, even if multiple files are selected. The system reading the Desktop Entry should recognize that the | - | | program in question cannot handle multiple file arguments, and it should should probably spawn and execute multiple | - | %f | copies of a program for each selected file if the program is not able to handle additional file arguments. If files are | - | | not on the local file system (i.e. HTTP or FTP locations), the files will be copied to the local file system and %f | - | | will be expanded to point at the temporary file. Used for programs that do not understand URL syntax. | - |----+-------------------------------------------------------------------------------------------------------------------------| - | %F | a list of files. Use for apps that can open several local files at once. | - |----+-------------------------------------------------------------------------------------------------------------------------| - | %u | a single URL. | - |----+-------------------------------------------------------------------------------------------------------------------------| - | %U | a list of URLs. | - |----+-------------------------------------------------------------------------------------------------------------------------| - | %d | directory containing the file that would be passed in a %f field | - |----+-------------------------------------------------------------------------------------------------------------------------| - | %D | list of directories containing the files that would be passed in to a %F field | - |----+-------------------------------------------------------------------------------------------------------------------------| - | %n | a single filename (without path) | - |----+-------------------------------------------------------------------------------------------------------------------------| - | %N | a list of filenames (without path) | - |----+-------------------------------------------------------------------------------------------------------------------------| - | %i | the Icon field of the desktop entry expanded as two parameters, first "--icon" and then the contents of the Icon field | - | | (should not expand as any prameters if the Icon field is empty or missing) | - |----+-------------------------------------------------------------------------------------------------------------------------| - | %c | the translated Name field associated with the desktop entry | - |----+-------------------------------------------------------------------------------------------------------------------------| - | %k | the location of the desktop file as either a uri (if for example gotten from the vfolder system) or a local filename or | - | | empty if no location is known | - |----+-------------------------------------------------------------------------------------------------------------------------| - | %v | the name of the Device entry in the desktop file | - +------------------------------------------------------------------------------------------------------------------------------+ - -Detailed discussion of supporting MIME types - - It is in every desktop's best interest to have thorough support for mime types. The old /etc/mailcap and /etc/mime.types files - are rather limited in scope and frankly, are outdated. Various desktop systems have come up with different ways of extending - this original system, but none are compatible with each other. The Desktop Entry Standard hopes to be able to provide the - beginnings of a solution to this problem. - - At a very basic level, the "Exec" key provides the default action to take when the program described by a desktop entry is used - to open a document or data file. Usually this consists of some action along the lines of "kedit %f" or "ee %f". This is a good - start, but it isn't as flexible as it can be. - - Let us first establish that a program which supports a MIME type or multiple mime types may be able to support multiple actions - on those MIME types as well. The desktop entry may want to define additional actions in addition to the default. The toplevel - "Exec" key describes the default action; Let us define this action to also be known as the "Open" action. Additional actions - which might be possible include View, Edit, Play, etc. A further revision of this document will probably specify several - "standard" actions in addition to the default "Open" action, but in all cases, the number of actions is arbitrary. - - Let us use a sound player as a simple example. Call it sp. The default Exec (Open) action for this program would likely look - something like: - - Exec=sp %u - - However, imagine the sound player also supports editing of sound files in a graphical manner. We might wish to define an - additional action which could accomodate this. Adding the action would be performed like this: - - Actions=Edit; - - [Desktop Action Edit] - Exec=sp -edit %u - - As you can see, defining the action "edit" will enable an additional group of the name [Desktop Action actionname] to be read. - This group can contain an additional Exec line, as well as possibly other information like a new Name, Comment, Icon, and Path. - Thus right-clicking on a .wav file will show both the default "Open" action and this "Edit" action to both be displayed as - choices in the context-menu. A left click (double or single, whichever the file manager implements) would cause the default - action to take place. These are implementation-specific details which are up to the implementer, and are not enforced by this - standard. - - If no DefaultApp is specified for a particular MIME type, any one of the programs registered which claim to be able to handle - the MIME type may become the default handler. This behaviour is undefined and implementation-specific. KDE doesn't use a - DefaultApp anymore, but assigns a Preference number to each program, so that the highest number is the one chosen for handling - the MIME type. - -Extending the format - - If the standard is to be amended with a new {key,value} pair which should be applicable to all supporting parties, a group - discussion will take place. This is the preferred method for introducing changes. If one particular party wishes to add a field - for personal use, they should prefix the key with the string "X-PRODUCT", i.e. "X-NewDesktop-Foo", following the precedent set - by other IETF and RFC standards. - - Alternatively, fields can be placed in their own group, where they may then have arbitrary key names. If this is the case, the - group should follow the scheme outlined above, i.e. [X-PRODUCT GROUPNAME] or something similar. These steps will avoid namespace - clashes between different yet similar environments. - - ---------------------------------------------------------------------------------------------------------------------------- diff --git a/kio/Mainpage.dox b/kio/Mainpage.dox deleted file mode 100644 index 7545c29ef..000000000 --- a/kio/Mainpage.dox +++ /dev/null @@ -1,120 +0,0 @@ -/** - * \mainpage A network-enabled file management system in a library - * - * This library implements almost all the file management functions you - * will ever need. In fact, the %Trinity file manager, Konqueror also uses - * this to provide its network-enabled file management. - * - * The easiest way to use this library from a %Trinity application is via the - * TDEIO::NetAccess class (for easy synchronous access) or via the - * TDEIO::Job class (for more complex asynchronous jobs). - * - * This library also implements the System Configuration Cache (KSycoca). - * - * KMimeType: - * The notion of a file type, already existing in Trinity-1.x - * - * KService: - * To a mimetype are bound one or more applications, now called services. - * Services can be applications, but also libraries, dynamically opened. - * - * KServiceType: - * A service type allows the same mechanism to be extended to components. - * For instance : the question "what are the koffice plugins" is solved by - * a service type called KOfficePlugin, and by every plugin providing - * a .desktop file stating that it is a service that implements the servicetype - * KOfficePlugin. - * - * KServiceTypeProfile: - * Stores the user's preferences for services bound to mimetypes/servicetypes. - * - * KTrader: - * Use it to query for which services implement a given mimetype/servicetype. - * Has its own language, in order to allow complex queries. - * - * - * \section Trinity Filedialog widget and associated classes. - * - * This library also provides the Trinity file selector widget, - * its building blocks and some other widgets, making use of the file dialog. - * - * The file dialog provides different views; there is a vertically scrolling - * view based on KListView, showing things like filename, file size, - * permissions etc. in separate columns. And there is a horizontally scrolling - * view based on KIconView. Additionally, there are some compound views, - * like a view using the icon-view for files on the right side and another - * view for directories on the left. A view, that shows a preview for the - * currently selected file (using TDEIO::PreviewJob to generate previews) - * and any other view to show the files is also available. - * - * All those views share a common baseclass, named KFileView, which - * defines the interface for inserting files into a view, removing them, - * selecting etc. - * - * The one class encapsulating all those views and adding browsing capabilities - * to them is KDirOperator. It allows the user to switch between different - * views. - * - * KFileTreeView is a KListView based widget that displays files and/or - * directories as a tree. It does not implement the KFileView interface, - * however, so it can't be used with KDirOperator. - * - * Besides the filebrowsing widgets, there is the KPropertiesDialog class, - * implementing a dialog showing the name, permissions, icons, meta - * information and all kinds of properties of a file, as well as providing a - * means to modify them. - * - * The KPropertiesDialog is extensible with plugin-pages via the - * KPropsDlgPlugin class. - * - * The KIconDialog class shows a list of icons installed on the system (as - * accessible via KIconLoader) and allows the user to select one. - * - * KOpenWithDlg implements a dialog to choose an application from, that is - * to be run, e.g. to let the user choose an application to open a file/url - * with. - * - * - * KFileDialog: - * The class providing the file selector dialog. It combines a KDirOperator, - * KURLBar and several other widgets. - * - * KDirOperator: - * The class encapsulating different KFileViews, offering file browsing and - * file selection. Asynchronous, network transparent reading of directories - * is performed via the KIO library. - * - * KURLRequester: - * A widget to be used for asking for a filename/path/URL. It consists of a - * KLineEdit (or KComboBox) and a button. Activating the button - * will open a KFileDialog. Typing in the lineedit is aided with - * filename completion. - * - * KURLRequesterDlg: - * A dialog to ask for a filename/path/URL, using KURLRequester. - * - * KFileView: - * The base class for all views to be used with KDirOperator. - * - * KFileIconView: - * The KFileView based on KIconView. - * - * KFileDetailView: - * The KFileView based on KListView. - * - * KFilePreview: - * The KFileView, combining a widget showing preview for a selected file - * and another KFileView for browsing. - * - * KURLBar: - * A widget offering a number of clickable entries which represent a URL, - * aligned horizontally or vertically. The entries are customizable by the - * user both on a per application basis or for all applications (URLs, their - * icon and the description can be added, removed or edited by the user). - * This is the widget used as "sidebar" in the KFileDialog. - * - * KFileMetaInfoWidget: - * A widget that allows viewing and editing of meta data of a file, utilizing - * KFileMetaInfo. - * - */ diff --git a/kio/Makefile.am b/kio/Makefile.am deleted file mode 100644 index fbe0d75dc..000000000 --- a/kio/Makefile.am +++ /dev/null @@ -1,67 +0,0 @@ -# This file is part of the KDE libraries -# Copyright (C) 1997 Torben Weis (weis@kde.org) - -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Library General Public -# License as published by the Free Software Foundation; either -# version 2 of the License, or (at your option) any later version. - -# This library 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 -# Library General Public License for more details. - -# You should have received a copy of the GNU Library General Public License -# along with this library; see the file COPYING.LIB. If not, write to -# the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -# Boston, MA 02110-1301, USA. - -AM_CPPFLAGS = -D_LARGEFILE64_SOURCE - -INCLUDES= -I$(srcdir)/.. $(all_includes) $(SSL_INCLUDES) - -SUBDIRS = kssl kio bookmarks kfile . pics tests kioexec httpfilter misc kpasswdserver - -lib_LTLIBRARIES = libkio.la - -libkio_la_SOURCES = dummy.cpp - -libkio_la_LDFLAGS = -version-info 6:0:2 -no-undefined $(all_libraries) \ - $(KDE_MT_LDFLAGS) -libkio_la_LIBADD = kssl/libkssl.la kio/libkiocore.la \ - kio/libtdesycoca.la bookmarks/libkbookmarks.la kfile/libkfile.la \ - ../tdeui/libtdeui.la ../tdesu/libtdesu.la \ - ../tdewallet/client/libtdewalletclient.la \ - $(LIBZ) $(LIBFAM) $(LIBVOLMGT) $(ACL_LIBS) $(LIB_QT) $(LIB_TDECORE) $(top_builddir)/dcop/libDCOP.la $(LIB_X11) - -kde_mime_DATA = magic -kde_servicetypes_DATA = application.desktop kurifilterplugin.desktop \ - kcomprfilter.desktop kscan.desktop kdatatool.desktop \ - kfileplugin.desktop tdecmodule.desktop - -EXTRA_DIST = $(kde_mime_DATA) - -update_DATA = kioslave.upd -update_SCRIPTS = useragent.pl proxytype.pl -updatedir = $(kde_datadir)/kconf_update - -servicetype_DATA = renamedlgplugin.desktop -servicetypedir = $(kde_servicetypesdir) - -kded_DATA = kpasswdserver.desktop -kdeddir = $(kde_servicesdir)/kded - -dataprotocol_DATA = data.protocol -dataprotocoldir = $(kde_servicesdir) - -dummy.cpp: - echo >dummy.cpp - -messages: - $(EXTRACTRC) `find . ../kioslave -name "*.rc" -o -name "*.ui"` > rc.cpp - $(XGETTEXT) `find . ../kioslave -name "*.cpp" -o -name "*.cc" -o -name "*.h"` -o $(podir)/kio.pot - rm -f rc.cpp - -DOXYGEN_REFERENCES = tdecore tdefx kjs dcop tdeui kio/kio kio/kfile -DOXYGEN_EXCLUDE = kssl/kssl -include ../admin/Doxyfile.am diff --git a/kio/application.desktop b/kio/application.desktop deleted file mode 100644 index d9e9fc3c2..000000000 --- a/kio/application.desktop +++ /dev/null @@ -1,124 +0,0 @@ -[Desktop Entry] -Type=ServiceType -X-TDE-ServiceType=Application -Name=Application -Name[af]=Program -Name[ar]=تطبيق -Name[az]=Proqram -Name[be]=Праграма -Name[bg]=Програма -Name[bn]=অ্যাপলিকেশন -Name[br]=Arload -Name[bs]=Program -Name[ca]=Aplicació -Name[cs]=Aplikace -Name[csb]=Programa -Name[cy]=Cymhwysiad -Name[da]=Program -Name[de]=Programm -Name[el]=Εφαρμογή -Name[eo]=Aplikaĵo -Name[es]=Aplicación -Name[et]=Rakendus -Name[eu]=Aplikazioa -Name[fa]=کاربرد -Name[fi]=Sovellus -Name[fy]=Applikaasje -Name[ga]=Feidhmchlár -Name[gl]=Aplicación -Name[he]=יישום -Name[hi]=अनुप्रयोग -Name[hr]=Aplikacija -Name[hu]=alkalmazás -Name[id]=Aplikasi -Name[is]=Forrit -Name[it]=Applicazione -Name[ja]=アプリケーション -Name[ka]=პროგრამა -Name[kk]=Қолданба -Name[km]=កម្មវិធី -Name[ko]=응용 프로그램 -Name[lb]=Programm -Name[lt]=Programa -Name[lv]=Aplikācija -Name[mi]=Utauta -Name[mk]=Апликација -Name[mn]=Программ -Name[ms]=Aplikasi -Name[mt]=Programm -Name[nb]=Program -Name[nds]=Programm -Name[ne]=अनुप्रयोग -Name[nl]=Toepassing -Name[nn]=Program -Name[nso]=Tshomiso -Name[oc]=Aplicacions -Name[pa]=ਕਾਰਜ -Name[pl]=Program -Name[pt]=Aplicação -Name[pt_BR]=Aplicativo -Name[ro]=Aplicaţie -Name[ru]=Приложение -Name[rw]=Porogaramu -Name[se]=Prográmma -Name[sk]=Aplikácia -Name[sl]=Program -Name[sq]=Aplikacion -Name[sr]=Програм -Name[sr@Latn]=Program -Name[ss]=Sicelo -Name[sv]=Program -Name[ta]=பயன்பாடு -Name[te]=కార్యక్రమం -Name[tg]=Гузориш -Name[th]=แอพพลิเคชัน -Name[tr]=Uygulama -Name[tt]=Yazılım -Name[uk]=Програма -Name[uz]=Dastur -Name[uz@cyrillic]=Дастур -Name[ven]=Apulifikhesheni -Name[vi]=Ứng dụng -Name[wa]=Programe -Name[xh]=Isicelo -Name[zh_CN]=应用程序 -Name[zh_HK]=應用程式 -Name[zh_TW]=應用程式 -Name[zu]=Umyaleli - -[PropertyDef::NoDisplay] -Type=bool - -[PropertyDef::DocPath] -Type=TQString - -[PropertyDef::X-TDE-SubstituteUID] -Type=bool - -[PropertyDef::X-TDE-Username] -Type=TQString - -[PropertyDef::StartupWMClass] -Type=TQString - -[PropertyDef::StartupNotify] -Type=bool - -[PropertyDef::X-TDE-WMClass] -Type=TQString - -[PropertyDef::X-TDE-StartupNotify] -Type=bool - -[PropertyDef::X-DCOP-ServiceName] -Type=TQString - -[PropertyDef::X-TDE-ParentApp] -Type=TQString - -[PropertyDef::X-TDE-HasTempFileOption] -Type=bool - -[PropertyDef::X-TDE-Protocols] -Type=TQStringList - diff --git a/kio/bookmarks/CMakeLists.txt b/kio/bookmarks/CMakeLists.txt deleted file mode 100644 index 7c2fd72c6..000000000 --- a/kio/bookmarks/CMakeLists.txt +++ /dev/null @@ -1,55 +0,0 @@ -################################################# -# -# (C) 2010 Serghei Amelian -# serghei (DOT) amelian (AT) gmail.com -# -# Improvements and feedback are welcome -# -# This file is released under GPL >= 2 -# -################################################# - -include_directories( - ${TQT_INCLUDE_DIRS} - ${CMAKE_CURRENT_BINARY_DIR} - ${CMAKE_CURRENT_SOURCE_DIR} - ${CMAKE_BINARY_DIR}/tdecore - ${CMAKE_SOURCE_DIR}/dcop - ${CMAKE_SOURCE_DIR}/tdefx - ${CMAKE_SOURCE_DIR}/tdecore - ${CMAKE_SOURCE_DIR}/tdeui - ${CMAKE_SOURCE_DIR}/kio - ${CMAKE_SOURCE_DIR}/kio/kio - ${CMAKE_SOURCE_DIR}/kio/kfile -) - - -##### headers ################################### - -install( FILES - kbookmark.h kbookmarkbar.h kbookmarkdrag.h kbookmarkexporter.h - kbookmarkimporter.h kbookmarkmanager.h kbookmarkmenu.h - kbookmarknotifier.h kbookmarkimporter_crash.h - kbookmarkimporter_opera.h kbookmarkimporter_ie.h - kbookmarkimporter_ns.h kbookmarkimporter_kde1.h - kbookmarkdombuilder.h - DESTINATION ${INCLUDE_INSTALL_DIR} ) - - -##### kbookmarks ################################ - -set( target kbookmarks ) - -set( ${target}_SRCS - kbookmark.cc kbookmarkbar.cc kbookmarkdrag.cc kbookmarkexporter.cc - kbookmarkimporter.cc kbookmarkmanager.cc kbookmarkmenu.cc - kbookmarkimporter_crash.cc kbookmarkimporter_opera.cc - kbookmarkimporter_ie.cc kbookmarkimporter_ns.cc - kbookmarkimporter_kde1.cc kbookmarkdombuilder.cc - kbookmarkmanager.skel kbookmarknotifier.skel -) - -tde_add_library( ${target} STATIC_PIC AUTOMOC - SOURCES ${${target}_SRCS} - DEPENDENCIES dcopidl -) diff --git a/kio/bookmarks/Makefile.am b/kio/bookmarks/Makefile.am deleted file mode 100644 index 63b535e13..000000000 --- a/kio/bookmarks/Makefile.am +++ /dev/null @@ -1,40 +0,0 @@ -# This file is part of the KDE libraries -# Copyright (C) 1997 Stephan Kulow (coolo@kde.org) - -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Library General Public -# License as published by the Free Software Foundation; either -# version 2 of the License, or (at your option) any later version. - -# This library 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 -# Library General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this library; see the file COPYING. If not, write to -# the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -# Boston, MA 02110-1301, USA. - - -INCLUDES= -I$(srcdir)/../libltdl/ -I$(top_srcdir) -I$(top_srcdir)/tdefx -I$(top_builddir)/kio/kio $(all_includes) - -noinst_LTLIBRARIES = libkbookmarks.la - -METASOURCES = AUTO - -# convenience lib - no _LDFLAGS or _LIBADD ! - -include_HEADERS = \ - kbookmark.h kbookmarkbar.h kbookmarkdrag.h kbookmarkexporter.h \ - kbookmarkimporter.h kbookmarkmanager.h kbookmarkmenu.h kbookmarknotifier.h \ - kbookmarkimporter_crash.h kbookmarkimporter_opera.h kbookmarkimporter_ie.h \ - kbookmarkimporter_ns.h kbookmarkimporter_kde1.h kbookmarkdombuilder.h -libkbookmarks_la_SOURCES = \ - kbookmark.cc kbookmarkbar.cc kbookmarkdrag.cc kbookmarkexporter.cc \ - kbookmarkimporter.cc kbookmarkmanager.cc kbookmarkmenu.cc \ - kbookmarkimporter_crash.cc kbookmarkimporter_opera.cc kbookmarkimporter_ie.cc \ - kbookmarkimporter_ns.cc kbookmarkimporter_kde1.cc kbookmarkdombuilder.cc \ - kbookmarkmanager.skel kbookmarknotifier.skel - -include $(top_srcdir)/admin/Doxyfile.am diff --git a/kio/bookmarks/dptrtemplate.h b/kio/bookmarks/dptrtemplate.h deleted file mode 100644 index dbc059e7e..000000000 --- a/kio/bookmarks/dptrtemplate.h +++ /dev/null @@ -1,57 +0,0 @@ -// -*- c-basic-offset:4; indent-tabs-mode:nil -*- -// vim: set ts=4 sts=4 sw=4 et: -/* This file is part of the KDE project - Copyright (C) 2003 Alexander Kellett - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef __dptrtemplate_h__ -#define __dptrtemplate_h__ - -#include - -template -class dPtrTemplate { -public: - static PrivateData* d( const Instance* instance ) - { - if ( !d_ptr ) { - cleanup_d_ptr(); - d_ptr = new TQPtrDict; - tqAddPostRoutine( cleanup_d_ptr ); - } - PrivateData* ret = d_ptr->find( (void*) instance ); - if ( ! ret ) { - ret = new PrivateData; - d_ptr->replace( (void*) instance, ret ); - } - return ret; - } - static void delete_d( const Instance* instance ) - { - if ( d_ptr ) - d_ptr->remove( (void*) instance ); - } -private: - static void cleanup_d_ptr() - { - delete d_ptr; - } - static TQPtrDict* d_ptr; -}; - -#endif diff --git a/kio/bookmarks/kbookmark.cc b/kio/bookmarks/kbookmark.cc deleted file mode 100644 index ab1cc398a..000000000 --- a/kio/bookmarks/kbookmark.cc +++ /dev/null @@ -1,535 +0,0 @@ -// -*- c-basic-offset:4; indent-tabs-mode:nil -*- -// vim: set ts=4 sts=4 sw=4 et: -/* This file is part of the KDE libraries - Copyright (C) 2000 David Faure - Copyright (C) 2003 Alexander Kellett - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License version 2 as published by the Free Software Foundation. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include "kbookmark.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -KBookmarkGroup::KBookmarkGroup() - : KBookmark( TQDomElement() ) -{ -} - -KBookmarkGroup::KBookmarkGroup( TQDomElement elem ) - : KBookmark(elem) -{ -} - -TQString KBookmarkGroup::groupAddress() const -{ - if (m_address.isEmpty()) - m_address = address(); - return m_address; -} - -bool KBookmarkGroup::isOpen() const -{ - return element.attribute("folded") == "no"; // default is: folded -} - -// Returns first element node equal to or after node n -static TQDomElement firstElement(TQDomNode n) -{ - while(!n.isNull() && !n.isElement()) - n = n.nextSibling(); - return n.toElement(); -} - -// Returns first element node equal to or before node n -static TQDomElement lastElement(TQDomNode n) -{ - while(!n.isNull() && !n.isElement()) - n = n.previousSibling(); - return n.toElement(); -} - -KBookmark KBookmarkGroup::first() const -{ - return KBookmark( nextKnownTag( firstElement(element.firstChild()), true ) ); -} - -KBookmark KBookmarkGroup::previous( const KBookmark & current ) const -{ - return KBookmark( nextKnownTag( lastElement(current.element.previousSibling()), false ) ); -} - -KBookmark KBookmarkGroup::next( const KBookmark & current ) const -{ - return KBookmark( nextKnownTag( firstElement(current.element.nextSibling()), true ) ); -} - -// KDE4: Change TQDomElement to TQDomNode so that we can get rid of -// firstElement() and lastElement() -TQDomElement KBookmarkGroup::nextKnownTag( TQDomElement start, bool goNext ) const -{ - static const TQString & bookmark = TDEGlobal::staticQString("bookmark"); - static const TQString & folder = TDEGlobal::staticQString("folder"); - static const TQString & separator = TDEGlobal::staticQString("separator"); - - for( TQDomNode n = start; !n.isNull(); ) - { - TQDomElement elem = n.toElement(); - TQString tag = elem.tagName(); - if (tag == folder || tag == bookmark || tag == separator) - return elem; - if (goNext) - n = n.nextSibling(); - else - n = n.previousSibling(); - } - return TQDomElement(); -} - -KBookmarkGroup KBookmarkGroup::createNewFolder( KBookmarkManager* mgr, const TQString & text, bool emitSignal ) -{ - TQString txt( text ); - if ( text.isEmpty() ) - { - bool ok; - TQString caption = parentGroup().fullText().isEmpty() ? - i18n( "Create New Bookmark Folder" ) : - i18n( "Create New Bookmark Folder in %1" ) - .arg( parentGroup().text() ); - txt = KInputDialog::getText( caption, i18n( "New folder:" ), - TQString::null, &ok ); - if ( !ok ) - return KBookmarkGroup(); - } - - Q_ASSERT(!element.isNull()); - TQDomDocument doc = element.ownerDocument(); - TQDomElement groupElem = doc.createElement( "folder" ); - element.appendChild( groupElem ); - TQDomElement textElem = doc.createElement( "title" ); - groupElem.appendChild( textElem ); - textElem.appendChild( doc.createTextNode( txt ) ); - - KBookmarkGroup grp(groupElem); - - if (emitSignal) - emit mgr->notifier().createdNewFolder( - mgr->path(), grp.fullText(), - grp.address() ); - - return grp; - -} - -KBookmark KBookmarkGroup::createNewSeparator() -{ - Q_ASSERT(!element.isNull()); - TQDomDocument doc = element.ownerDocument(); - Q_ASSERT(!doc.isNull()); - TQDomElement sepElem = doc.createElement( "separator" ); - element.appendChild( sepElem ); - return KBookmark(sepElem); -} - -bool KBookmarkGroup::moveItem( const KBookmark & item, const KBookmark & after ) -{ - TQDomNode n; - if ( !after.isNull() ) - n = element.insertAfter( item.element, after.element ); - else // first child - { - if ( element.firstChild().isNull() ) // Empty element -> set as real first child - n = element.insertBefore( item.element, TQDomElement() ); - - // we have to skip everything up to the first valid child - TQDomElement firstChild = nextKnownTag(element.firstChild().toElement(), true); - if ( !firstChild.isNull() ) - n = element.insertBefore( item.element, firstChild ); - else - { - // No real first child -> append after the etc. - n = element.appendChild( item.element ); - } - } - return (!n.isNull()); -} - -KBookmark KBookmarkGroup::addBookmark( KBookmarkManager* mgr, const KBookmark &bm, bool emitSignal ) -{ - element.appendChild( bm.internalElement() ); - - if (emitSignal) { - if ( bm.hasMetaData() ) { - mgr->notifyCompleteChange( "" ); - } else { - emit mgr->notifier().addedBookmark( - mgr->path(), bm.url().url(), - bm.fullText(), bm.address(), bm.icon() ); - } - } - - return bm; -} - -KBookmark KBookmarkGroup::addBookmark( KBookmarkManager* mgr, const TQString & text, const KURL & url, const TQString & icon, bool emitSignal ) -{ - //kdDebug(7043) << "KBookmarkGroup::addBookmark " << text << " into " << m_address << endl; - TQDomDocument doc = element.ownerDocument(); - TQDomElement elem = doc.createElement( "bookmark" ); - elem.setAttribute( "href", url.url( 0, 106 ) ); // write utf8 URL (106 is mib enum for utf8) - TQString _icon = icon; - if ( _icon.isEmpty() ) - _icon = KMimeType::iconForURL( url ); - elem.setAttribute( "icon", _icon ); - - TQDomElement textElem = doc.createElement( "title" ); - elem.appendChild( textElem ); - textElem.appendChild( doc.createTextNode( text ) ); - - return addBookmark( mgr, KBookmark( elem ), emitSignal ); -} - -void KBookmarkGroup::deleteBookmark( KBookmark bk ) -{ - element.removeChild( bk.element ); -} - -bool KBookmarkGroup::isToolbarGroup() const -{ - return ( element.attribute("toolbar") == "yes" ); -} - -TQDomElement KBookmarkGroup::findToolbar() const -{ - if ( element.attribute("toolbar") == "yes" ) - return element; - for (TQDomNode n = element.firstChild(); !n.isNull() ; n = n.nextSibling() ) - { - TQDomElement e = n.toElement(); - // Search among the "folder" children only - if ( e.tagName() == "folder" ) - { - if ( e.attribute("toolbar") == "yes" ) - return e; - else - { - TQDomElement result = KBookmarkGroup(e).findToolbar(); - if (!result.isNull()) - return result; - } - } - } - return TQDomElement(); -} - -TQValueList<KURL> KBookmarkGroup::groupUrlList() const -{ - TQValueList<KURL> urlList; - for ( KBookmark bm = first(); !bm.isNull(); bm = next(bm) ) - { - if ( bm.isSeparator() || bm.isGroup() ) - continue; - urlList << bm.url(); - } - return urlList; -} - -////// - -bool KBookmark::isGroup() const -{ - TQString tag = element.tagName(); - return ( tag == "folder" - || tag == "xbel" ); // don't forget the toplevel group -} - -bool KBookmark::isSeparator() const -{ - return (element.tagName() == "separator"); -} - -bool KBookmark::hasParent() const -{ - TQDomElement parent = element.parentNode().toElement(); - return !parent.isNull(); -} - -TQString KBookmark::text() const -{ - return KStringHandler::csqueeze( fullText() ); -} - -TQString KBookmark::fullText() const -{ - if (isSeparator()) - return i18n("--- separator ---"); - - return element.namedItem("title").toElement().text(); -} - -KURL KBookmark::url() const -{ - return KURL(element.attribute("href"), 106); // Decode it from utf8 (106 is mib enum for utf8) -} - -TQString KBookmark::icon() const -{ - TQString icon = element.attribute("icon"); - if ( icon.isEmpty() ) - // Default icon depends on URL for bookmarks, and is default directory - // icon for groups. - if ( isGroup() ) - icon = "bookmark_folder"; - else - if ( isSeparator() ) - icon = "eraser"; // whatever - else - icon = KMimeType::iconForURL( url() ); - return icon; -} - -KBookmarkGroup KBookmark::parentGroup() const -{ - return KBookmarkGroup( element.parentNode().toElement() ); -} - -KBookmarkGroup KBookmark::toGroup() const -{ - Q_ASSERT( isGroup() ); - return KBookmarkGroup(element); -} - -TQString KBookmark::address() const -{ - if ( element.tagName() == "xbel" ) - return ""; // not TQString::null ! - else - { - // Use keditbookmarks's DEBUG_ADDRESSES flag to debug this code :) - if (!hasParent()) - { - Q_ASSERT(hasParent()); - return "ERROR"; // Avoid an infinite loop - } - KBookmarkGroup group = parentGroup(); - TQString parentAddress = group.address(); - uint counter = 0; - // Implementation note: we don't use QDomNode's childNode list because we - // would have to skip "TEXT", which KBookmarkGroup already does for us. - for ( KBookmark bk = group.first() ; !bk.isNull() ; bk = group.next(bk), ++counter ) - { - if ( bk.element == element ) - return parentAddress + "/" + TQString::number(counter); - } - kdWarning() << "KBookmark::address : this can't happen! " << parentAddress << endl; - return "ERROR"; - } -} - -KBookmark KBookmark::standaloneBookmark( const TQString & text, const KURL & url, const TQString & icon ) -{ - TQDomDocument doc("xbel"); - TQDomElement elem = doc.createElement("xbel"); - doc.appendChild( elem ); - KBookmarkGroup grp( elem ); - grp.addBookmark( 0L, text, url, icon, false ); - return grp.first(); -} - -// For some strange reason TQString("").left(0) returns TQString::null; -// That breaks commonParent() -TQString KBookmark::left(const TQString & str, uint len) -{ - //kdDebug()<<"********"<<TQString("").left(0).isNull()<<endl; - if(len == 0) - return TQString(""); - else - return str.left(len); -} - -TQString KBookmark::commonParent(TQString A, TQString B) -{ - TQString error("ERROR"); - if(A == error || B == error) - return error; - - A += "/"; - B += "/"; - - uint lastCommonSlash = 0; - uint lastPos = A.length() < B.length() ? A.length() : B.length(); - for(uint i=0; i < lastPos; ++i) - { - if(A[i] != B[i]) - return left(A, lastCommonSlash); - if(A[i] == '/') - lastCommonSlash = i; - } - return left(A, lastCommonSlash); -} - -static TQDomNode cd_or_create(TQDomNode node, TQString name) -{ - TQDomNode subnode = node.namedItem(name); - if (subnode.isNull()) - { - subnode = node.ownerDocument().createElement(name); - node.appendChild(subnode); - } - return subnode; -} - -static TQDomText get_or_create_text(TQDomNode node) -{ - TQDomNode subnode = node.firstChild(); - if (subnode.isNull()) - { - subnode = node.ownerDocument().createTextNode(""); - node.appendChild(subnode); - } - return subnode.toText(); -} - -// Look for a metadata with owner="http://www.kde.org" or without any owner (for compatibility) -static TQDomNode findOrCreateMetadata( TQDomNode& parent ) -{ - static const char kdeOwner[] = "http://www.kde.org"; - TQDomElement metadataElement; - for ( TQDomNode _node = parent.firstChild(); !_node.isNull(); _node = _node.nextSibling() ) { - TQDomElement elem = _node.toElement(); - if ( !elem.isNull() && elem.tagName() == "metadata" ) { - const TQString owner = elem.attribute( "owner" ); - if ( owner == kdeOwner ) - return elem; - if ( owner.isEmpty() ) - metadataElement = elem; - } - } - if ( metadataElement.isNull() ) { - metadataElement = parent.ownerDocument().createElement( "metadata" ); - parent.appendChild(metadataElement); - } - metadataElement.setAttribute( "owner", kdeOwner ); - return metadataElement; -} - -bool KBookmark::hasMetaData() const -{ - // ### NOTE: this code creates <info> and <metadata>, despite its name and the const. - // It doesn't matter much in practice since it's only called for newly-created bookmarks, - // which will get metadata soon after anyway. - TQDomNode n = cd_or_create( internalElement(), "info" ); - return findOrCreateMetadata( n ).hasChildNodes(); -} - -void KBookmark::updateAccessMetadata() -{ - kdDebug(7043) << "KBookmark::updateAccessMetadata " << address() << " " << url().prettyURL() << endl; - - const uint timet = TQDateTime::currentDateTime().toTime_t(); - setMetaDataItem( "time_added", TQString::number( timet ), DontOverwriteMetaData ); - setMetaDataItem( "time_visited", TQString::number( timet ) ); - - TQString countStr = metaDataItem( "visit_count" ); // TODO use spec'ed name - bool ok; - int currentCount = countStr.toInt(&ok); - if (!ok) - currentCount = 0; - currentCount++; - setMetaDataItem( "visit_count", TQString::number( currentCount ) ); - - // TODO - for 4.0 - time_modified -} - -TQString KBookmark::metaDataItem( const TQString &key ) const -{ - TQDomNode infoNode = cd_or_create( internalElement(), "info" ); - infoNode = findOrCreateMetadata( infoNode ); - for ( TQDomNode n = infoNode.firstChild(); !n.isNull(); n = n.nextSibling() ) { - if ( !n.isElement() ) { - continue; - } - const TQDomElement e = n.toElement(); - if ( e.tagName() == key ) { - return e.text(); - } - } - return TQString::null; -} - -void KBookmark::setMetaDataItem( const TQString &key, const TQString &value, MetaDataOverwriteMode mode ) -{ - TQDomNode infoNode = cd_or_create( internalElement(), "info" ); - infoNode = findOrCreateMetadata( infoNode ); - - TQDomNode item = cd_or_create( infoNode, key ); - TQDomText text = get_or_create_text( item ); - if ( mode == DontOverwriteMetaData && !text.data().isEmpty() ) { - return; - } - - text.setData( value ); -} - -void KBookmarkGroupTraverser::traverse(const KBookmarkGroup &root) -{ - // non-recursive bookmark iterator - TQValueStack<KBookmarkGroup> stack; - stack.push(root); - KBookmark bk = stack.top().first(); - for (;;) { - if (bk.isNull()) - { - if (stack.isEmpty()) - return; - if (stack.count() > 1) - visitLeave(stack.top()); - bk = stack.pop(); - bk = stack.top().next(bk); - if (bk.isNull()) - continue; - } - - if (bk.isGroup()) - { - KBookmarkGroup gp = bk.toGroup(); - visitEnter(gp); - if (!gp.first().isNull()) - { - stack.push(gp); - bk = gp.first(); - continue; - } - // empty group - visitLeave(gp); - } - else - visit(bk); - - bk = stack.top().next(bk); - } - - // never reached -} - diff --git a/kio/bookmarks/kbookmark.h b/kio/bookmarks/kbookmark.h deleted file mode 100644 index 4e5dc9149..000000000 --- a/kio/bookmarks/kbookmark.h +++ /dev/null @@ -1,329 +0,0 @@ -// -*- c-basic-offset: 4; indent-tabs-mode:nil -*- -// vim: set ts=4 sts=4 sw=4 et: -/* This file is part of the KDE libraries - Copyright (C) 2000 David Faure <faure@kde.org> - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License version 2 as published by the Free Software Foundation. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ -#ifndef __kbookmark_h -#define __kbookmark_h - -#include <tqstring.h> -#include <tqvaluelist.h> -#include <tqdom.h> -#include <kurl.h> - -class KBookmarkManager; -class KBookmarkGroup; - -class TDEIO_EXPORT KBookmark -{ - friend class KBookmarkGroup; -public: - enum MetaDataOverwriteMode { - OverwriteMetaData, DontOverwriteMetaData - }; - - KBookmark( ) {} - KBookmark( TQDomElement elem ) : element(elem) {} - - static KBookmark standaloneBookmark( const TQString & text, const KURL & url, const TQString & icon = TQString::null ); - - /** - * Whether the bookmark is a group or a normal bookmark - */ - bool isGroup() const; - - /** - * Whether the bookmark is a separator - */ - bool isSeparator() const; - - /** - * @return true if this is a null bookmark. This will never - * be the case for a real bookmark (in a menu), but it's used - * for instance as the end condition for KBookmarkGroup::next() - */ - bool isNull() const {return element.isNull();} - - /** - * @return true if bookmark is contained by a TQDomDocument, - * if not it is most likely that it has become separated and - * is thus invalid and/or has been deleted from the bookmarks. - * @since 3.2 - */ - bool hasParent() const; - - /** - * Text shown for the bookmark - * If bigger than 40, the text is shortened by - * replacing middle characters with "..." (see KStringHandler::csqueeze) - */ - TQString text() const; - /** - * Text shown for the bookmark, not truncated. - * You should not use this - this is mainly for keditbookmarks. - */ - TQString fullText() const; - /** - * URL contained by the bookmark - */ - KURL url() const; - /** - * @return the pixmap file for this bookmark - * (i.e. the name of the icon) - */ - TQString icon() const; - - /** - * @return the group containing this bookmark - */ - KBookmarkGroup parentGroup() const; - - /** - * Convert this to a group - do this only if - * isGroup() returns true. - */ - KBookmarkGroup toGroup() const; - - /** - * Return the "address" of this bookmark in the whole tree. - * This is used when telling other processes about a change - * in a given bookmark. The encoding of the address is "/4/2", for - * instance, to design the 2nd child inside the 4th child of the root bk. - */ - TQString address() const; - - // Hard to decide. Good design would imply that each bookmark - // knows about its manager, so that there can be several managers. - // But if we say there is only one manager (i.e. set of bookmarks) - // per application, then KBookmarkManager::self() is much easier. - //KBookmarkManager * manager() const { return m_manager; } - - /** - * @internal for KEditBookmarks - */ - TQDomElement internalElement() const { return element; } - - /** - * Updates the bookmarks access metadata - * Call when a user accesses the bookmark - * @since 3.2 - */ - void updateAccessMetadata(); - - // Utility functions (internal) - - /** - * @return address of parent - */ - static TQString parentAddress( const TQString & address ) - { return address.left( address.findRev('/') ); } - - /** - * @return position in parent (e.g. /4/5/2 -> 2) - */ - static uint positionInParent( const TQString & address ) - { return address.mid( address.findRev('/') + 1 ).toInt(); } - - /** - * @return address of previous sibling (e.g. /4/5/2 -> /4/5/1) - * Returns TQString::null for a first child - */ - static TQString previousAddress( const TQString & address ) - { - uint pp = positionInParent(address); - return pp>0 ? parentAddress(address) + '/' + TQString::number(pp-1) : TQString::null; - } - - /** - * @return address of next sibling (e.g. /4/5/2 -> /4/5/3) - * This doesn't check whether it actually exists - */ - static TQString nextAddress( const TQString & address ) - { return parentAddress(address) + '/' + TQString::number(positionInParent(address)+1); } - - /** - * @return the common parent of both addresses which - * has the greatest depth - * @since 3.5 - */ - static TQString commonParent(TQString A, TQString B); - - /** - * Get the value of a specific metadata item. - * @param key Name of the metadata item - * @return Value of the metadata item. TQString::null is returned in case - * the specified key does not exist. - * @since 3.4 - */ - TQString metaDataItem( const TQString &key ) const; - - /** - * Change the value of a specific metadata item, or create the given item - * if it doesn't exist already. - * @param key Name of the metadata item to change - * @param value Value to use for the specified metadata item - * @param mode Whether to overwrite the item's value if it exists already or not. - * @since 3.4 - */ - void setMetaDataItem( const TQString &key, const TQString &value, MetaDataOverwriteMode mode = OverwriteMetaData ); - -protected: - TQDomElement element; - // Note: you can't add new member variables here. - // The KBookmarks are created on the fly, as wrappers - // around internal QDomElements. Any additional information - // has to be implemented as an attribute of the TQDomElement. - -private: - bool hasMetaData() const; - static TQString left(const TQString & str, uint len); -}; - -/** - * A group of bookmarks - */ -class TDEIO_EXPORT KBookmarkGroup : public KBookmark -{ -public: - /** - * Create an invalid group. This is mostly for use in TQValueList, - * and other places where we need a null group. - * Also used as a parent for a bookmark that doesn't have one - * (e.g. Netscape bookmarks) - */ - KBookmarkGroup(); - - /** - * Create a bookmark group as specified by the given element - */ - KBookmarkGroup( TQDomElement elem ); - - /** - * Much like KBookmark::address, but caches the - * address into m_address. - */ - TQString groupAddress() const; - - /** - * @return true if the bookmark folder is opened in the bookmark editor - */ - bool isOpen() const; - - /** - * Return the first child bookmark of this group - */ - KBookmark first() const; - /** - * Return the prevous sibling of a child bookmark of this group - * @param current has to be one of our child bookmarks. - */ - KBookmark previous( const KBookmark & current ) const; - /** - * Return the next sibling of a child bookmark of this group - * @param current has to be one of our child bookmarks. - */ - KBookmark next( const KBookmark & current ) const; - - /** - * Create a new bookmark folder, as the last child of this group - * @param mgr the manager of the bookmark - * @param text for the folder. If empty, the user will be queried for it. - * @param emitSignal if true emit KBookmarkNotifier signal - */ - KBookmarkGroup createNewFolder( KBookmarkManager* mgr, const TQString & text = TQString::null, bool emitSignal = true ); - /** - * Create a new bookmark separator - * Don't forget to use KBookmarkManager::self()->emitChanged( parentBookmark ); - */ - KBookmark createNewSeparator(); - - /** - * Create a new bookmark, as the last child of this group - * Don't forget to use KBookmarkManager::self()->emitChanged( parentBookmark ); - * @param mgr the manager of the bookmark - * @param bm the bookmark to add - * @param emitSignal if true emit KBookmarkNotifier signal - * @since 3.4 - */ - KBookmark addBookmark( KBookmarkManager* mgr, const KBookmark &bm, bool emitSignal = true ); - - /** - * Create a new bookmark, as the last child of this group - * Don't forget to use KBookmarkManager::self()->emitChanged( parentBookmark ); - * @param mgr the manager of the bookmark - * @param text for the bookmark - * @param url the URL that the bookmark points to - * @param icon the name of the icon to associate with the bookmark. A suitable default - * will be determined from the URL if not specified. - * @param emitSignal if true emit KBookmarkNotifier signal - */ - KBookmark addBookmark( KBookmarkManager* mgr, const TQString & text, const KURL & url, const TQString & icon = TQString::null, bool emitSignal = true ); - - /** - * Moves @p item after @p after (which should be a child of ours). - * If item is null, @p item is moved as the first child. - * Don't forget to use KBookmarkManager::self()->emitChanged( parentBookmark ); - */ - bool moveItem( const KBookmark & item, const KBookmark & after ); - - /** - * Delete a bookmark - it has to be one of our children ! - * Don't forget to use KBookmarkManager::self()->emitChanged( parentBookmark ); - */ - void deleteBookmark( KBookmark bk ); - - /** - * @return true if this is the toolbar group - */ - bool isToolbarGroup() const; - /** - * @internal - */ - TQDomElement findToolbar() const; - - /** - * @return the list of urls of bookmarks at top level of the group - * @since 3.2 - */ - TQValueList<KURL> groupUrlList() const; - -protected: - TQDomElement nextKnownTag( TQDomElement start, bool goNext ) const; - -private: - mutable TQString m_address; - // Note: you can't add other member variables here, except for caching info. - // The KBookmarks are created on the fly, as wrappers - // around internal QDomElements. Any additional information - // has to be implemented as an attribute of the TQDomElement. -}; - -/** - * @since 3.2 - */ -class TDEIO_EXPORT KBookmarkGroupTraverser { -protected: - virtual ~KBookmarkGroupTraverser() { ; } - void traverse(const KBookmarkGroup &); - virtual void visit(const KBookmark &) { ; } - virtual void visitEnter(const KBookmarkGroup &) { ; } - virtual void visitLeave(const KBookmarkGroup &) { ; } -private: - class KBookmarkGroupTraverserPrivate *d; -}; - -#endif diff --git a/kio/bookmarks/kbookmarkbar.cc b/kio/bookmarks/kbookmarkbar.cc deleted file mode 100644 index dc2ad0cde..000000000 --- a/kio/bookmarks/kbookmarkbar.cc +++ /dev/null @@ -1,554 +0,0 @@ -// -*- c-basic-offset:4; indent-tabs-mode:nil -*- -// vim: set ts=4 sts=4 sw=4 et: -/* This file is part of the KDE project - Copyright (C) 1999 Kurt Granroth <granroth@kde.org> - Copyright (C) 1998, 1999 Torben Weis <weis@kde.org> - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ -#include <tqregexp.h> -#include <tqfile.h> - -#include <kbookmarkbar.h> -#include <kbookmarkdrag.h> - -#include <kbookmarkmenu.h> -#include <kdebug.h> - -#include <ktoolbar.h> -#include <ktoolbarbutton.h> - -#include <kconfig.h> -#include <kpopupmenu.h> - -#include "kbookmarkdrag.h" -#include "kbookmarkmenu_p.h" -#include "kbookmarkdombuilder.h" - -#include "dptrtemplate.h" - -#include <tqapplication.h> - -class KBookmarkBarPrivate : public dPtrTemplate<KBookmarkBar, KBookmarkBarPrivate> -{ -public: - TQPtrList<KAction> m_actions; - bool m_readOnly; - KBookmarkManager* m_filteredMgr; - KToolBar* m_sepToolBar; - int m_sepIndex; - bool m_atFirst; - TQString m_dropAddress; - TQString m_highlightedAddress; -public: - KBookmarkBarPrivate() { - m_readOnly = false; - m_filteredMgr = 0; - m_sepToolBar = 0; - m_sepIndex = -1; - m_atFirst = false; - } -}; -template<> TQPtrDict<KBookmarkBarPrivate>* dPtrTemplate<KBookmarkBar, KBookmarkBarPrivate>::d_ptr = 0; - -KBookmarkBarPrivate* KBookmarkBar::dptr() const -{ - return KBookmarkBarPrivate::d( this ); -} - -// usage of KXBELBookmarkImporterImpl is just plain evil, but it reduces code dup. so... -class ToolbarFilter : public KXBELBookmarkImporterImpl -{ -public: - ToolbarFilter() : m_visible(false) { ; } - void filter( const KBookmarkGroup &grp ) { traverse(grp); } -private: - virtual void visit( const KBookmark & ); - virtual void visitEnter( const KBookmarkGroup & ); - virtual void visitLeave( const KBookmarkGroup & ); -private: - bool m_visible; - KBookmarkGroup m_visibleStart; -}; - -KBookmarkBar::KBookmarkBar( KBookmarkManager* mgr, - KBookmarkOwner *_owner, KToolBar *_toolBar, - KActionCollection *coll, - TQObject *parent, const char *name ) - : TQObject( parent, name ), m_pOwner(_owner), m_toolBar(_toolBar), - m_actionCollection( coll ), m_pManager(mgr) -{ - m_lstSubMenus.setAutoDelete( true ); - - m_toolBar->setAcceptDrops( true ); - m_toolBar->installEventFilter( this ); // for drops - - dptr()->m_actions.setAutoDelete( true ); - - connect( mgr, TQT_SIGNAL( changed(const TQString &, const TQString &) ), - TQT_SLOT( slotBookmarksChanged(const TQString &) ) ); - - KBookmarkGroup toolbar = getToolbar(); - fillBookmarkBar( toolbar ); -} - -TQString KBookmarkBar::parentAddress() -{ - return dptr()->m_filteredMgr ? TQString::null : m_pManager->toolbar().address(); -} - -#define CURRENT_TOOLBAR() ( \ - dptr()->m_filteredMgr ? dptr()->m_filteredMgr->root() \ - : m_pManager->toolbar() ) - -#define CURRENT_MANAGER() ( \ - dptr()->m_filteredMgr ? dptr()->m_filteredMgr \ - : m_pManager ) - -KBookmarkGroup KBookmarkBar::getToolbar() -{ - if ( KBookmarkSettings::self()->m_filteredtoolbar ) - { - if ( !dptr()->m_filteredMgr ) { - dptr()->m_filteredMgr = KBookmarkManager::createTempManager(); - } else { - KBookmarkGroup bkRoot = dptr()->m_filteredMgr->root(); - TQValueList<KBookmark> bks; - for (KBookmark bm = bkRoot.first(); !bm.isNull(); bm = bkRoot.next(bm)) - bks << bm; - for ( TQValueListConstIterator<KBookmark> it = bks.begin(); it != bks.end(); ++it ) - bkRoot.deleteBookmark( (*it) ); - } - ToolbarFilter filter; - KBookmarkDomBuilder builder( dptr()->m_filteredMgr->root(), - dptr()->m_filteredMgr ); - builder.connectImporter( &filter ); - filter.filter( m_pManager->root() ); - } - - return CURRENT_TOOLBAR(); -} - -KBookmarkBar::~KBookmarkBar() -{ - //clear(); - KBookmarkBarPrivate::delete_d(this); -} - -void KBookmarkBar::clear() -{ - TQPtrListIterator<KAction> it( dptr()->m_actions ); - m_toolBar->clear(); - for (; it.current(); ++it ) { - (*it)->unplugAll(); - } - dptr()->m_actions.clear(); - m_lstSubMenus.clear(); -} - -void KBookmarkBar::slotBookmarksChanged( const TQString & group ) -{ - KBookmarkGroup tb = getToolbar(); // heavy for non cached toolbar version - kdDebug(7043) << "slotBookmarksChanged( " << group << " )" << endl; - - if ( tb.isNull() ) - return; - - if ( KBookmark::commonParent(group, tb.address()) == group // Is group a parent of tb.address? - || KBookmarkSettings::self()->m_filteredtoolbar ) - { - clear(); - fillBookmarkBar( tb ); - } - else - { - // Iterate recursively into child menus - TQPtrListIterator<KBookmarkMenu> it( m_lstSubMenus ); - for (; it.current(); ++it ) - { - it.current()->slotBookmarksChanged( group ); - } - } -} - -void KBookmarkBar::fillBookmarkBar(KBookmarkGroup & parent) -{ - if (parent.isNull()) - return; - - for (KBookmark bm = parent.first(); !bm.isNull(); bm = parent.next(bm)) - { - TQString text = bm.text(); - text.replace( '&', "&&" ); - if (!bm.isGroup()) - { - if ( bm.isSeparator() ) - m_toolBar->insertLineSeparator(); - else - { - KAction *action = new KBookmarkAction( text, bm.icon(), 0, m_actionCollection, 0 ); - connect(action, TQT_SIGNAL( activated ( KAction::ActivationReason, TQt::ButtonState )), - this, TQT_SLOT( slotBookmarkSelected( KAction::ActivationReason, TQt::ButtonState ) )); - - action->setProperty( "url", bm.url().url() ); - action->setProperty( "address", bm.address() ); - - action->setToolTip( bm.url().pathOrURL() ); - - action->plug(m_toolBar); - - dptr()->m_actions.append( action ); - } - } - else - { - KActionMenu *action = new KBookmarkActionMenu( text, bm.icon(), - m_actionCollection, - "bookmarkbar-actionmenu"); - action->setProperty( "address", bm.address() ); - action->setProperty( "readOnly", dptr()->m_readOnly ); - action->setDelayed( false ); - - // this flag doesn't have any UI yet - TDEGlobal::config()->setGroup( "Settings" ); - bool addEntriesBookmarkBar = TDEGlobal::config()->readBoolEntry("AddEntriesBookmarkBar",true); - - KBookmarkMenu *menu = new KBookmarkMenu(CURRENT_MANAGER(), m_pOwner, action->popupMenu(), - m_actionCollection, false, addEntriesBookmarkBar, - bm.address()); - connect(menu, TQT_SIGNAL( aboutToShowContextMenu(const KBookmark &, TQPopupMenu * ) ), - this, TQT_SIGNAL( aboutToShowContextMenu(const KBookmark &, TQPopupMenu * ) )); - connect(menu, TQT_SIGNAL( openBookmark( const TQString &, TQt::ButtonState) ), - this, TQT_SIGNAL( openBookmark( const TQString &, TQt::ButtonState) )); - menu->fillBookmarkMenu(); - action->plug(m_toolBar); - m_lstSubMenus.append( menu ); - - dptr()->m_actions.append( action ); - } - } -} - -void KBookmarkBar::setReadOnly(bool readOnly) -{ - dptr()->m_readOnly = readOnly; -} - -bool KBookmarkBar::isReadOnly() const -{ - return dptr()->m_readOnly; -} - -void KBookmarkBar::slotBookmarkSelected( KAction::ActivationReason /*reason*/, TQt::ButtonState state ) -{ - if (!m_pOwner) return; // this view doesn't handle bookmarks... - - const KAction* action = dynamic_cast<const KAction *>(sender()); - if(action) - { - const TQString & url = sender()->property("url").toString(); - m_pOwner->openBookmarkURL(url); - emit openBookmark( url, state ); - } -} - -void KBookmarkBar::slotBookmarkSelected() -{ - slotBookmarkSelected(KAction::ToolBarActivation, Qt::NoButton); -} - -static const int const_sepId = -9999; // FIXME this is ugly, - // surely there is another - // way of doing this... - -static void removeTempSep(KBookmarkBarPrivate* p) -{ - if (p->m_sepToolBar) { - p->m_sepToolBar->removeItem(const_sepId); - p->m_sepToolBar = 0; // needed? - } -} - -static KAction* findPluggedAction(TQPtrList<KAction> actions, KToolBar *tb, int id) -{ - TQPtrListIterator<KAction> it( actions ); - for (; (*it); ++it ) - if ((*it)->isPlugged(tb, id)) - return (*it); - return 0; -} - -/** - * Handle a TQDragMoveEvent event on a toolbar drop - * @return the address of the bookmark to be dropped after/before - * else a TQString::null if event should be ignored - * @param pos the current TQDragMoveEvent position - * @param the toolbar - * @param actions the list of actions plugged into the bar - * @param atFirst bool reference, when true the position before the - * returned action was dropped on - */ -static TQString handleToolbarDragMoveEvent( - KBookmarkBarPrivate *p, KToolBar *tb, TQPoint pos, TQPtrList<KAction> actions, - bool &atFirst, KBookmarkManager *mgr -) { - Q_UNUSED( mgr ); - Q_ASSERT( actions.isEmpty() || (tb == dynamic_cast<KToolBar*>(actions.first()->container(0))) ); - p->m_sepToolBar = tb; - p->m_sepToolBar->removeItemDelayed(const_sepId); - - int index = 0; - KToolBarButton* b; - - b = dynamic_cast<KToolBarButton*>(tb->childAt(pos)); - KAction *a = 0; - TQString address; - atFirst = false; - - if (b) - { - index = tb->itemIndex(b->id()); - TQRect r = b->geometry(); - if (pos.x() < ((r.left() + r.right())/2)) - { - // if in first half of button then - // we jump to previous index - if ( index == 0 ) - atFirst = true; - else { - index--; - b = tb->getButton(tb->idAt(index)); - } - } - } - else if (actions.isEmpty()) - { - atFirst = true; - index = 0; - // we skip the action related stuff - // and do what it should have... - // FIXME - here we want to get the - // parent address of the bookmark - // bar itself and return that + "/0" - p->m_sepIndex = 0; - goto skipact; - } - else // (!b) - { - index = actions.count() - 1; - b = tb->getButton(tb->idAt(index)); - // if !b and not past last button, we didn't find button - if (pos.x() <= b->geometry().left()) - goto skipact; // TODO - rename - } - - if ( !b ) - return TQString::null; // TODO Make it works for that case - - a = findPluggedAction(actions, tb, b->id()); - Q_ASSERT(a); - address = a->property("address").toString(); - p->m_sepIndex = index + (atFirst ? 0 : 1); - -#if 0 - { // ugly workaround to fix the goto scoping problems... - KBookmark bk = mgr->findByAddress( address ); - if (bk.isGroup()) // TODO - fix this ****!!!, manhatten distance should be used!!! - { - kdDebug() << "kbookmarkbar:: popping up " << bk.text() << endl; - KBookmarkActionMenu *menu = dynamic_cast<KBookmarkActionMenu*>(a); - Q_ASSERT(menu); - menu->popup(tb->mapToGlobal(b->geometry().center())); - } - } -#endif - -skipact: - tb->insertLineSeparator(p->m_sepIndex, const_sepId); - return address; -} - -// TODO - document!!!! -static KAction* handleToolbarMouseButton(TQPoint pos, TQPtrList<KAction> actions, - KBookmarkManager * /*mgr*/, TQPoint & pt) -{ - KAction *act = actions.first(); - if (!act) { - return 0; - } - - KToolBar *tb = dynamic_cast<KToolBar*>(act->container(0)); - Q_ASSERT(tb); - - KToolBarButton *b; - b = dynamic_cast<KToolBarButton*>(tb->childAt(pos)); - if (!b) - return 0; - - KAction *a = 0; - a = findPluggedAction(actions, tb, b->id()); - Q_ASSERT(a); - pt = tb->mapToGlobal(pos); - - return a; -} - -// TODO *** drop improvements *** -// open submenus on drop interactions - -// TODO *** generic rmb improvements *** -// don't *ever* show the rmb on press, always relase, possible??? - -class KBookmarkBarRMBAssoc : public dPtrTemplate<KBookmarkBar, RMB> { }; -template<> TQPtrDict<RMB>* dPtrTemplate<KBookmarkBar, RMB>::d_ptr = 0; - -static RMB* rmbSelf(KBookmarkBar *m) { return KBookmarkBarRMBAssoc::d(m); } - -void RMB::begin_rmb_action(KBookmarkBar *self) -{ - RMB *s = rmbSelf(self); - s->recv = self; - s->m_parentAddress = self->parentAddress(); - s->s_highlightedAddress = self->dptr()->m_highlightedAddress; // rename in RMB - s->m_pManager = self->m_pManager; - s->m_pOwner = self->m_pOwner; - s->m_parentMenu = 0; -} - -void KBookmarkBar::slotRMBActionEditAt( int val ) -{ RMB::begin_rmb_action(this); rmbSelf(this)->slotRMBActionEditAt( val ); } - -void KBookmarkBar::slotRMBActionProperties( int val ) -{ RMB::begin_rmb_action(this); rmbSelf(this)->slotRMBActionProperties( val ); } - -void KBookmarkBar::slotRMBActionInsert( int val ) -{ RMB::begin_rmb_action(this); rmbSelf(this)->slotRMBActionInsert( val ); } - -void KBookmarkBar::slotRMBActionRemove( int val ) -{ RMB::begin_rmb_action(this); rmbSelf(this)->slotRMBActionRemove( val ); } - -void KBookmarkBar::slotRMBActionCopyLocation( int val ) -{ RMB::begin_rmb_action(this); rmbSelf(this)->slotRMBActionCopyLocation( val ); } - -bool KBookmarkBar::eventFilter( TQObject *o, TQEvent *e ) -{ - if (dptr()->m_readOnly || dptr()->m_filteredMgr) // note, we assume m_pManager in various places, - // this shouldn't really be the case - return false; // todo: make this limit the actions - - if ( (e->type() == TQEvent::MouseButtonRelease) || (e->type() == TQEvent::MouseButtonPress) ) // FIXME, which one? - { - TQMouseEvent *mev = (TQMouseEvent*)e; - - TQPoint pt; - KAction *_a; - - // FIXME, see how this holds up on an empty toolbar - _a = handleToolbarMouseButton( mev->pos(), dptr()->m_actions, m_pManager, pt ); - if (_a && mev->button() == Qt::RightButton) - { - dptr()->m_highlightedAddress = _a->property("address").toString(); - KBookmark bookmark = m_pManager->findByAddress( dptr()->m_highlightedAddress ); - RMB::begin_rmb_action(this); - KPopupMenu *pm = new KPopupMenu; - rmbSelf(this)->fillContextMenu( pm, dptr()->m_highlightedAddress, 0 ); - emit aboutToShowContextMenu( rmbSelf(this)->atAddress( dptr()->m_highlightedAddress ), pm ); - rmbSelf(this)->fillContextMenu2( pm, dptr()->m_highlightedAddress, 0 ); - pm->popup( pt ); - mev->accept(); - } - - return !!_a; // ignore the event if we didn't find the button - } - else if ( e->type() == TQEvent::DragLeave ) - { - removeTempSep(dptr()); - dptr()->m_dropAddress = TQString::null; - } - else if ( e->type() == TQEvent::Drop ) - { - removeTempSep(dptr()); - TQDropEvent *dev = (TQDropEvent*)e; - if ( !KBookmarkDrag::canDecode( dev ) ) - return false; - TQValueList<KBookmark> list = KBookmarkDrag::decode( dev ); - if (list.count() > 1) - kdWarning(7043) << "Sorry, currently you can only drop one address " - "onto the bookmark bar!" << endl; - KBookmark toInsert = list.first(); - KBookmark bookmark = m_pManager->findByAddress( dptr()->m_dropAddress ); - Q_ASSERT(!bookmark.isNull()); - kdDebug(7043) << "inserting " - << TQString(dptr()->m_atFirst ? "before" : "after") - << " dptr()->m_dropAddress == " << dptr()->m_dropAddress << endl; - KBookmarkGroup parentBookmark = bookmark.parentGroup(); - Q_ASSERT(!parentBookmark.isNull()); - KBookmark newBookmark = parentBookmark.addBookmark( - m_pManager, toInsert.fullText(), - toInsert.url() ); - parentBookmark.moveItem( newBookmark, dptr()->m_atFirst ? KBookmark() : bookmark ); - m_pManager->emitChanged( parentBookmark ); - return true; - } - else if ( e->type() == TQEvent::DragMove ) - { - TQDragMoveEvent *dme = (TQDragMoveEvent*)e; - if (!KBookmarkDrag::canDecode( dme )) - return false; - bool _atFirst; - TQString dropAddress; - KToolBar *tb = (KToolBar*)o; - dropAddress = handleToolbarDragMoveEvent(dptr(), tb, dme->pos(), dptr()->m_actions, _atFirst, m_pManager); - if (!dropAddress.isNull()) - { - dptr()->m_dropAddress = dropAddress; - dptr()->m_atFirst = _atFirst; - dme->accept(); - } - } - return false; -} - -static bool showInToolbar( const KBookmark &bk ) { - return (bk.internalElement().attributes().namedItem("showintoolbar").toAttr().value() == "yes"); -} - -void ToolbarFilter::visit( const KBookmark &bk ) { - //kdDebug() << "visit(" << bk.text() << ")" << endl; - if ( m_visible || showInToolbar(bk) ) - KXBELBookmarkImporterImpl::visit(bk); -} - -void ToolbarFilter::visitEnter( const KBookmarkGroup &grp ) { - //kdDebug() << "visitEnter(" << grp.text() << ")" << endl; - if ( !m_visible && showInToolbar(grp) ) - { - m_visibleStart = grp; - m_visible = true; - } - if ( m_visible ) - KXBELBookmarkImporterImpl::visitEnter(grp); -} - -void ToolbarFilter::visitLeave( const KBookmarkGroup &grp ) { - //kdDebug() << "visitLeave()" << endl; - if ( m_visible ) - KXBELBookmarkImporterImpl::visitLeave(grp); - if ( m_visible && grp.address() == m_visibleStart.address() ) - m_visible = false; -} - -#include "kbookmarkbar.moc" diff --git a/kio/bookmarks/kbookmarkbar.h b/kio/bookmarks/kbookmarkbar.h deleted file mode 100644 index 1f100d183..000000000 --- a/kio/bookmarks/kbookmarkbar.h +++ /dev/null @@ -1,131 +0,0 @@ -// -*- c-basic-offset:4; indent-tabs-mode:nil -*- -// vim: set ts=4 sts=4 sw=4 et: -/* This file is part of the KDE project - Copyright (C) 1999 Kurt Granroth <granroth@kde.org> - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ -#ifndef KBOOKMARKBAR_H -#define KBOOKMARKBAR_H - -#include <tqobject.h> -#include <tqguardedptr.h> -#include <tqptrlist.h> -#include <kbookmark.h> -#include <kaction.h> - -class KToolBar; -class KBookmarkMenu; -class KBookmarkOwner; -class KActionCollection; -class KAction; -class TQPopupMenu; - -/** - * This class provides a bookmark toolbar. Using this class is nearly - * identical to using KBookmarkMenu so follow the directions - * there. - */ -class TDEIO_EXPORT KBookmarkBar : public TQObject -{ - Q_OBJECT - - friend class RMB; -public: - /** - * Fills a bookmark toolbar - * - * @param manager the bookmark manager - * @param owner implementation of the KBookmarkOwner interface (callbacks) - * @param toolBar toolbar to fill - * - * The KActionCollection pointer argument is now obsolete. - * - * @param parent the parent widget for the bookmark toolbar - * @param name the internal name for the bookmark toolbar - */ - KBookmarkBar( KBookmarkManager* manager, - KBookmarkOwner *owner, KToolBar *toolBar, - KActionCollection *, - TQObject *parent = 0L, const char *name = 0L); - - virtual ~KBookmarkBar(); - - /** - * @since 3.2 - */ - bool isReadOnly() const; - - /** - * @since 3.2 - */ - void setReadOnly(bool); - - /** - * @since 3.2 - */ - TQString parentAddress(); - -signals: - /** - * @since 3.2 - */ - void aboutToShowContextMenu( const KBookmark &, TQPopupMenu * ); - /** - * @since 3.4 - */ - void openBookmark( const TQString& url, TQt::ButtonState state ); - -public slots: - void clear(); - - void slotBookmarksChanged( const TQString & ); - void slotBookmarkSelected(); - - /** - * @since 3.4 - */ - void slotBookmarkSelected( KAction::ActivationReason reason, TQt::ButtonState state ); - - /// @since 3.2 - void slotRMBActionRemove( int ); - /// @since 3.2 - void slotRMBActionInsert( int ); - /// @since 3.2 - void slotRMBActionCopyLocation( int ); - /// @since 3.2 - void slotRMBActionEditAt( int ); - /// @since 3.2 - void slotRMBActionProperties( int ); - -protected: - void fillBookmarkBar( KBookmarkGroup & parent ); - virtual bool eventFilter( TQObject *o, TQEvent *e ); - -private: - KBookmarkGroup getToolbar(); - - KBookmarkOwner *m_pOwner; - TQGuardedPtr<KToolBar> m_toolBar; - KActionCollection *m_actionCollection; - KBookmarkManager *m_pManager; - TQPtrList<KBookmarkMenu> m_lstSubMenus; - -private: - class KBookmarkBarPrivate* dptr() const; -}; - -#endif // KBOOKMARKBAR_H diff --git a/kio/bookmarks/kbookmarkdombuilder.cc b/kio/bookmarks/kbookmarkdombuilder.cc deleted file mode 100644 index 5c0882d05..000000000 --- a/kio/bookmarks/kbookmarkdombuilder.cc +++ /dev/null @@ -1,81 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 2000 David Faure <faure@kde.org> - Copyright (C) 2002-2003 Alexander Kellett <lypanov@kde.org> - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this program; see the file COPYING. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include <kbookmarkmanager.h> -#include <kdebug.h> - -#include "kbookmarkdombuilder.h" - -KBookmarkDomBuilder::KBookmarkDomBuilder( - const KBookmarkGroup &bkGroup, KBookmarkManager *manager -) { - m_manager = manager; - m_stack.push(bkGroup); -} - -KBookmarkDomBuilder::~KBookmarkDomBuilder() { - m_list.clear(); - m_stack.clear(); -} - -void KBookmarkDomBuilder::connectImporter(const TQObject *importer) { - connect(importer, TQT_SIGNAL( newBookmark(const TQString &, const TQCString &, const TQString &) ), - TQT_SLOT( newBookmark(const TQString &, const TQCString &, const TQString &) )); - connect(importer, TQT_SIGNAL( newFolder(const TQString &, bool, const TQString &) ), - TQT_SLOT( newFolder(const TQString &, bool, const TQString &) )); - connect(importer, TQT_SIGNAL( newSeparator() ), - TQT_SLOT( newSeparator() ) ); - connect(importer, TQT_SIGNAL( endFolder() ), - TQT_SLOT( endFolder() ) ); -} - -void KBookmarkDomBuilder::newBookmark( - const TQString &text, const TQCString &url, const TQString &additionalInfo -) { - KBookmark bk = m_stack.top().addBookmark( - m_manager, text, - KURL( TQString::fromUtf8(url), 106 /*utf8*/ ), - TQString::null, false); - // store additional info - bk.internalElement().setAttribute("netscapeinfo", additionalInfo); -} - -void KBookmarkDomBuilder::newFolder( - const TQString & text, bool open, const TQString & additionalInfo -) { - // we use a qvaluelist so that we keep pointers to valid objects in the stack - KBookmarkGroup gp = m_stack.top().createNewFolder(m_manager, text, false); - m_list.append(gp); - m_stack.push(m_list.last()); - // store additional info - TQDomElement element = m_list.last().internalElement(); - element.setAttribute("netscapeinfo", additionalInfo); - element.setAttribute("folded", (open?"no":"yes")); -} - -void KBookmarkDomBuilder::newSeparator() { - m_stack.top().createNewSeparator(); -} - -void KBookmarkDomBuilder::endFolder() { - m_stack.pop(); -} - -#include "kbookmarkdombuilder.moc" diff --git a/kio/bookmarks/kbookmarkdombuilder.h b/kio/bookmarks/kbookmarkdombuilder.h deleted file mode 100644 index 44fe7b170..000000000 --- a/kio/bookmarks/kbookmarkdombuilder.h +++ /dev/null @@ -1,48 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 2003 Alexander Kellett <lypanov@kde.org> - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this program; see the file COPYING. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef __kbookmarkdombuilder_h -#define __kbookmarkdombuilder_h - -#include <tqvaluestack.h> -#include <tqobject.h> -#include <kbookmark.h> - -/** - * @since 3.2 - */ -class TDEIO_EXPORT KBookmarkDomBuilder : public TQObject { - Q_OBJECT -public: - KBookmarkDomBuilder(const KBookmarkGroup &group, KBookmarkManager *); - virtual ~KBookmarkDomBuilder(); - void connectImporter(const TQObject *); -protected slots: - void newBookmark(const TQString &text, const TQCString &url, const TQString &additionalInfo); - void newFolder(const TQString &text, bool open, const TQString &additionalInfo); - void newSeparator(); - void endFolder(); -private: - TQValueStack<KBookmarkGroup> m_stack; - TQValueList<KBookmarkGroup> m_list; - KBookmarkManager *m_manager; - class KBookmarkDomBuilderPrivate *p; -}; - -#endif diff --git a/kio/bookmarks/kbookmarkdrag.cc b/kio/bookmarks/kbookmarkdrag.cc deleted file mode 100644 index d13893eed..000000000 --- a/kio/bookmarks/kbookmarkdrag.cc +++ /dev/null @@ -1,169 +0,0 @@ -// -*- c-basic-offset:4; indent-tabs-mode:nil -*- -// vim: set ts=4 sts=4 sw=4 et: -/* This file is part of the KDE libraries - Copyright (C) 2000 David Faure <faure@kde.org> - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License version 2 as published by the Free Software Foundation. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include "kbookmarkdrag.h" -#include <kurldrag.h> -#include <kdebug.h> - -KBookmarkDrag * KBookmarkDrag::newDrag( const TQValueList<KBookmark> & bookmarks, TQWidget * dragSource, const char * name ) -{ - KURL::List urls; - - for ( TQValueListConstIterator<KBookmark> it = bookmarks.begin(); it != bookmarks.end(); ++it ) { - urls.append( (*it).url() ); - } - - // See KURLDrag::newDrag - TQStrList uris; - KURL::List::ConstIterator uit = urls.begin(); - KURL::List::ConstIterator uEnd = urls.end(); - // Get each URL encoded in utf8 - and since we get it in escaped - // form on top of that, .latin1() is fine. - for ( ; uit != uEnd ; ++uit ) - uris.append( KURLDrag::urlToString(*uit).latin1() ); - - return new KBookmarkDrag( bookmarks, uris, dragSource, name ); -} - -KBookmarkDrag * KBookmarkDrag::newDrag( const KBookmark & bookmark, TQWidget * dragSource, const char * name ) -{ - TQValueList<KBookmark> bookmarks; - bookmarks.append( KBookmark(bookmark) ); - return newDrag(bookmarks, dragSource, name); -} - -KBookmarkDrag::KBookmarkDrag( const TQValueList<KBookmark> & bookmarks, const TQStrList & urls, - TQWidget * dragSource, const char * name ) - : TQUriDrag( urls, dragSource, name ), m_bookmarks( bookmarks ), m_doc("xbel") -{ - // We need to create the XML for this drag right now and not - // in encodedData because when cutting a folder, the children - // wouldn't be part of the bookmarks anymore, when encodedData - // is requested. - TQDomElement elem = m_doc.createElement("xbel"); - m_doc.appendChild( elem ); - for ( TQValueListConstIterator<KBookmark> it = bookmarks.begin(); it != bookmarks.end(); ++it ) { - elem.appendChild( (*it).internalElement().cloneNode( true /* deep */ ) ); - } - //kdDebug(7043) << "KBookmarkDrag::KBookmarkDrag " << m_doc.toString() << endl; -} - -const char* KBookmarkDrag::format( int i ) const -{ - if ( i == 0 ) - return "application/x-xbel"; - else if ( i == 1 ) - return "text/uri-list"; - else if ( i == 2 ) - return "text/plain"; - else return 0; -} - -TQByteArray KBookmarkDrag::encodedData( const char* mime ) const -{ - TQByteArray a; - TQCString mimetype( mime ); - if ( mimetype == "text/uri-list" ) - return TQUriDrag::encodedData( mime ); - else if ( mimetype == "application/x-xbel" ) - { - a = m_doc.toCString(); - //kdDebug(7043) << "KBookmarkDrag::encodedData " << m_doc.toCString() << endl; - } - else if ( mimetype == "text/plain" ) - { - KURL::List m_lstDragURLs; - if ( KURLDrag::decode( this, m_lstDragURLs ) ) - { - TQStringList uris; - KURL::List::ConstIterator uit = m_lstDragURLs.begin(); - KURL::List::ConstIterator uEnd = m_lstDragURLs.end(); - for ( ; uit != uEnd ; ++uit ) - uris.append( (*uit).prettyURL() ); - - TQCString s = uris.join( "\n" ).local8Bit(); - a.resize( s.length() + 1 ); // trailing zero - memcpy( a.data(), s.data(), s.length() + 1 ); - } - } - return a; -} - -bool KBookmarkDrag::canDecode( const TQMimeSource * e ) -{ - return e->provides("text/uri-list") || e->provides("application/x-xbel") || - e->provides("text/plain"); -} - -TQValueList<KBookmark> KBookmarkDrag::decode( const TQMimeSource * e ) -{ - TQValueList<KBookmark> bookmarks; - if ( e->provides("application/x-xbel") ) - { - TQByteArray s( e->encodedData("application/x-xbel") ); - //kdDebug(7043) << "KBookmarkDrag::decode s=" << TQCString(s) << endl; - TQDomDocument doc; - doc.setContent( s ); - TQDomElement elem = doc.documentElement(); - TQDomNodeList children = elem.childNodes(); - for ( uint childno = 0; childno < children.count(); childno++) - { - bookmarks.append( KBookmark( children.item(childno).cloneNode(true).toElement() )); - } - return bookmarks; - } - if ( e->provides("text/uri-list") ) - { - KURL::List m_lstDragURLs; - //kdDebug(7043) << "KBookmarkDrag::decode uri-list" << endl; - if ( KURLDrag::decode( e, m_lstDragURLs ) ) - { - KURL::List::ConstIterator uit = m_lstDragURLs.begin(); - KURL::List::ConstIterator uEnd = m_lstDragURLs.end(); - for ( ; uit != uEnd ; ++uit ) - { - //kdDebug(7043) << "KBookmarkDrag::decode url=" << (*uit).url() << endl; - bookmarks.append( KBookmark::standaloneBookmark( - (*uit).prettyURL(), (*uit) )); - } - return bookmarks; - } - } - if( e->provides("text/plain") ) - { - //kdDebug(7043) << "KBookmarkDrag::decode text/plain" << endl; - TQString s; - if(TQTextDrag::decode( e, s )) - { - - TQStringList listDragURLs = TQStringList::split(TQChar('\n'), s); - TQStringList::ConstIterator it = listDragURLs.begin(); - TQStringList::ConstIterator end = listDragURLs.end(); - for( ; it!=end; ++it) - { - //kdDebug(7043)<<"KBookmarkDrag::decode string"<<(*it)<<endl; - bookmarks.append( KBookmark::standaloneBookmark( KURL(*it).prettyURL(), KURL(*it))); - } - return bookmarks; - } - } - bookmarks.append( KBookmark() ); - return bookmarks; -} diff --git a/kio/bookmarks/kbookmarkdrag.h b/kio/bookmarks/kbookmarkdrag.h deleted file mode 100644 index 016bd6849..000000000 --- a/kio/bookmarks/kbookmarkdrag.h +++ /dev/null @@ -1,57 +0,0 @@ -// -*- c-basic-offset:4; indent-tabs-mode:nil -*- -// vim: set ts=4 sts=4 sw=4 et: -/* This file is part of the KDE libraries - Copyright (C) 2000 David Faure <faure@kde.org> - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License version 2 as published by the Free Software Foundation. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef __kebdrag_h -#define __kebdrag_h - -#include <tqdragobject.h> -#include <kbookmark.h> - -// Clipboard/dnd data : URLs + XML for bookmarks -class TDEIO_EXPORT KBookmarkDrag : public TQUriDrag -{ -public: - static KBookmarkDrag * newDrag( const TQValueList<KBookmark> & bookmarks, - TQWidget * dragSource = 0, - const char * name = 0 ); - static KBookmarkDrag * newDrag( const KBookmark & bookmark, - TQWidget * dragSource = 0, - const char * name = 0 ); -protected: - KBookmarkDrag( const TQValueList<KBookmark> & bookmarks, - const TQStrList & urls, - TQWidget * dragSource, - const char * name ); -public: - virtual ~KBookmarkDrag() {} - - virtual const char* format( int i ) const; - virtual TQByteArray encodedData( const char* mime ) const; - - static bool canDecode( const TQMimeSource * e ); - static TQValueList<KBookmark> decode( const TQMimeSource * e ); - -protected: - TQValueList<KBookmark> m_bookmarks; - TQDomDocument m_doc; - class KBookmarkDragPrivate; - KBookmarkDragPrivate * d; -}; -#endif diff --git a/kio/bookmarks/kbookmarkexporter.cc b/kio/bookmarks/kbookmarkexporter.cc deleted file mode 100644 index 30c52bdb8..000000000 --- a/kio/bookmarks/kbookmarkexporter.cc +++ /dev/null @@ -1,32 +0,0 @@ -// -*- c-basic-offset:4; indent-tabs-mode:nil -*- -// vim: set ts=4 sts=4 sw=4 et: -/* This file is part of the KDE libraries - Copyright (C) 2003 Alexander Kellett <lypanov@kde.org> - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License version 2 as published by the Free Software Foundation. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ -#include <stdio.h> - -#include <tqfile.h> -#include <tqtextcodec.h> -#include <tqstylesheet.h> - -#include <kdebug.h> -#include <klocale.h> - -#include "kbookmarkmanager.h" -#include "kbookmarkexporter.h" - -// todo - put stuff in here :) diff --git a/kio/bookmarks/kbookmarkexporter.h b/kio/bookmarks/kbookmarkexporter.h deleted file mode 100644 index 68e8f475a..000000000 --- a/kio/bookmarks/kbookmarkexporter.h +++ /dev/null @@ -1,50 +0,0 @@ -// -*- c-basic-offset:4; indent-tabs-mode:nil -*- -// vim: set ts=4 sts=4 sw=4 et: -/* This file is part of the KDE libraries - Copyright (C) 1996-1998 Martin R. Jones <mjones@kde.org> - Copyright (C) 2000 David Faure <faure@kde.org> - Copyright (C) 2003 Alexander Kellett <lypanov@kde.org> - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License version 2 as published by the Free Software Foundation. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef __kbookmarkexporter_h -#define __kbookmarkexporter_h - -#include <tqtextstream.h> -#include <kbookmark.h> - -/** - * @since 3.2 - */ -class TDEIO_EXPORT KBookmarkExporterBase -{ -public: - KBookmarkExporterBase(KBookmarkManager* mgr, const TQString & fileName) - : m_fileName(fileName), m_pManager(mgr) - { ; } - virtual ~KBookmarkExporterBase() {} - virtual void write(KBookmarkGroup) = 0; -protected: - TQString m_fileName; - KBookmarkManager* m_pManager; -private: - class KBookmarkExporterBasePrivate *d; -}; - -// for SC -#include "kbookmarkimporter_ns.h" - -#endif diff --git a/kio/bookmarks/kbookmarkimporter.cc b/kio/bookmarks/kbookmarkimporter.cc deleted file mode 100644 index 8a31fa3d2..000000000 --- a/kio/bookmarks/kbookmarkimporter.cc +++ /dev/null @@ -1,101 +0,0 @@ -// -*- c-basic-offset:4; indent-tabs-mode:nil -*- -// vim: set ts=4 sts=4 sw=4 et: -/* This file is part of the KDE libraries - Copyright (C) 2003 Alexander Kellett <lypanov@kde.org> - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License version 2 as published by the Free Software Foundation. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include <kfiledialog.h> -#include <kstringhandler.h> -#include <klocale.h> -#include <kdebug.h> -#include <kcharsets.h> -#include <tqtextcodec.h> - -#include <sys/types.h> -#include <stddef.h> -#include <dirent.h> -#include <sys/stat.h> -#include <assert.h> - -#include "kbookmarkmanager.h" - -#include "kbookmarkimporter_ns.h" -#include "kbookmarkimporter_opera.h" -#include "kbookmarkimporter_ie.h" - -#include "kbookmarkimporter.h" - -void KXBELBookmarkImporterImpl::parse() -{ - //kdDebug() << "KXBELBookmarkImporterImpl::parse()" << endl; - KBookmarkManager *manager = KBookmarkManager::managerForFile(m_fileName); - KBookmarkGroup root = manager->root(); - traverse(root); - // FIXME delete it! - // delete manager; -} - -void KXBELBookmarkImporterImpl::visit(const KBookmark &bk) -{ - //kdDebug() << "KXBELBookmarkImporterImpl::visit" << endl; - if (bk.isSeparator()) - emit newSeparator(); - else - emit newBookmark(bk.fullText(), bk.url().url().utf8(), ""); -} - -void KXBELBookmarkImporterImpl::visitEnter(const KBookmarkGroup &grp) -{ - //kdDebug() << "KXBELBookmarkImporterImpl::visitEnter" << endl; - emit newFolder(grp.fullText(), false, ""); -} - -void KXBELBookmarkImporterImpl::visitLeave(const KBookmarkGroup &) -{ - //kdDebug() << "KXBELBookmarkImporterImpl::visitLeave" << endl; - emit endFolder(); -} - -void KBookmarkImporterBase::setupSignalForwards(TQObject *src, TQObject *dst) -{ - connect(src, TQT_SIGNAL( newBookmark( const TQString &, const TQCString &, const TQString & ) ), - dst, TQT_SIGNAL( newBookmark( const TQString &, const TQCString &, const TQString & ) )); - connect(src, TQT_SIGNAL( newFolder( const TQString &, bool, const TQString & ) ), - dst, TQT_SIGNAL( newFolder( const TQString &, bool, const TQString & ) )); - connect(src, TQT_SIGNAL( newSeparator() ), - dst, TQT_SIGNAL( newSeparator() ) ); - connect(src, TQT_SIGNAL( endFolder() ), - dst, TQT_SIGNAL( endFolder() ) ); -} - -KBookmarkImporterBase* KBookmarkImporterBase::factory( const TQString &type ) -{ - if (type == "netscape") - return new KNSBookmarkImporterImpl; - else if (type == "mozilla") - return new KMozillaBookmarkImporterImpl; - else if (type == "xbel") - return new KXBELBookmarkImporterImpl; - else if (type == "ie") - return new KIEBookmarkImporterImpl; - else if (type == "opera") - return new KOperaBookmarkImporterImpl; - else - return 0; -} - -#include <kbookmarkimporter.moc> diff --git a/kio/bookmarks/kbookmarkimporter.h b/kio/bookmarks/kbookmarkimporter.h deleted file mode 100644 index cc87b2004..000000000 --- a/kio/bookmarks/kbookmarkimporter.h +++ /dev/null @@ -1,106 +0,0 @@ -// -*- c-basic-offset:4; indent-tabs-mode:nil -*- -// vim: set ts=4 sts=4 sw=4 et: -/* This file is part of the KDE libraries - Copyright (C) 2000 David Faure <faure@kde.org> - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License version 2 as published by the Free Software Foundation. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef __kbookmarkimporter_h -#define __kbookmarkimporter_h - -#include <tqdom.h> -#include <tqcstring.h> -#include <tqstringlist.h> -#include <ksimpleconfig.h> - -#include "kbookmark.h" - -/** - * A class for importing NS bookmarks - * KEditBookmarks uses it to insert bookmarks into its DOM tree, - * and KActionMenu uses it to create actions directly. - * @since 3.2 - */ -class TDEIO_EXPORT KBookmarkImporterBase : public TQObject -{ - Q_OBJECT -public: - KBookmarkImporterBase() {} - virtual ~KBookmarkImporterBase() {} - - void setFilename(const TQString &filename) { m_fileName = filename; } - - virtual void parse() = 0; - virtual TQString findDefaultLocation(bool forSaving = false) const = 0; - - // TODO - make this static? - void setupSignalForwards(TQObject *src, TQObject *dst); - static KBookmarkImporterBase *factory(const TQString &type); - -signals: - /** - * Notify about a new bookmark - * Use "html" for the icon - */ - void newBookmark(const TQString & text, const TQCString & url, const TQString & additionalInfo); - - /** - * Notify about a new folder - * Use "bookmark_folder" for the icon - */ - void newFolder(const TQString & text, bool open, const TQString & additionalInfo); - - /** - * Notify about a new separator - */ - void newSeparator(); - - /** - * Tell the outside world that we're going down - * one menu - */ - void endFolder(); - -protected: - TQString m_fileName; - -private: - class KBookmarkImporterBasePrivate *d; -}; - -/** - * A class for importing XBEL files - */ -class TDEIO_EXPORT KXBELBookmarkImporterImpl : public KBookmarkImporterBase, protected KBookmarkGroupTraverser -{ - Q_OBJECT -public: - KXBELBookmarkImporterImpl() {} - virtual void parse(); - virtual TQString findDefaultLocation(bool = false) const { return TQString::null; } -protected: - virtual void visit(const KBookmark &); - virtual void visitEnter(const KBookmarkGroup &); - virtual void visitLeave(const KBookmarkGroup &); -private: - class KXBELBookmarkImporterImplPrivate *d; -}; - -// for SC -#include "kbookmarkimporter_ns.h" -#include "kbookmarkimporter_kde1.h" - -#endif diff --git a/kio/bookmarks/kbookmarkimporter_crash.cc b/kio/bookmarks/kbookmarkimporter_crash.cc deleted file mode 100644 index 988e1f673..000000000 --- a/kio/bookmarks/kbookmarkimporter_crash.cc +++ /dev/null @@ -1,215 +0,0 @@ -// -*- c-basic-offset:4; indent-tabs-mode:nil -*- -// vim: set ts=4 sts=4 sw=4 et: -/* This file is part of the KDE libraries - Copyright (C) 2002-2003 Alexander Kellett <lypanov@kde.org> - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License version 2 as published by the Free Software Foundation. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include "kbookmarkimporter_crash.h" - -#include <kfiledialog.h> -#include <kstringhandler.h> -#include <klocale.h> -#include <kdebug.h> -#include <kapplication.h> -#include <kstandarddirs.h> -#include <tqfile.h> -#include <tqdir.h> -#include <tqstring.h> -#include <tqtextcodec.h> -#include <dcopclient.h> - -#include <sys/types.h> -#include <stddef.h> -#include <dirent.h> -#include <sys/stat.h> - -typedef TQMap<TQString, TQString> ViewMap; - -// KDE 4.0: remove this BC keeping stub -void KCrashBookmarkImporter::parseCrashLog( TQString /*filename*/, bool /*del*/ ) -{ - ; -} - -ViewMap KCrashBookmarkImporterImpl::parseCrashLog_noemit( const TQString & filename, bool del ) -{ - static const int g_lineLimit = 16*1024; - - TQFile f( filename ); - ViewMap views; - - if ( !f.open( IO_ReadOnly ) ) - return views; - - TQCString s( g_lineLimit ); - - TQTextCodec * codec = TQTextCodec::codecForName( "UTF-8" ); - Q_ASSERT( codec ); - if ( !codec ) - return views; - - while ( f.readLine( s.data(), g_lineLimit ) >=0 ) - { - if ( s[s.length()-1] != '\n' ) - { - kdWarning() << "Crash bookmarks contain a line longer than " << g_lineLimit << ". Skipping." << endl; - continue; - } - TQString t = codec->toUnicode( s.stripWhiteSpace() ); - TQRegExp rx( "(.*)\\((.*)\\):(.*)$" ); - rx.setMinimal( true ); - if ( !rx.exactMatch( t ) ) - continue; - if ( rx.cap(1) == "opened" ) - views[rx.cap(2)] = rx.cap(3); - else if ( rx.cap(1) == "close" ) - views.remove( rx.cap(2) ); - } - - f.close(); - - if ( del ) - f.remove(); - - return views; -} - -TQStringList KCrashBookmarkImporter::getCrashLogs() -{ - return KCrashBookmarkImporterImpl::getCrashLogs(); -} - -TQStringList KCrashBookmarkImporterImpl::getCrashLogs() -{ - TQMap<TQString, bool> activeLogs; - - DCOPClient* dcop = kapp->dcopClient(); - - QCStringList apps = dcop->registeredApplications(); - for ( QCStringList::Iterator it = apps.begin(); it != apps.end(); ++it ) - { - TQCString &clientId = *it; - - if ( tqstrncmp(clientId, "konqueror", 9) != 0 ) - continue; - - TQByteArray data, replyData; - TQCString replyType; - TQDataStream arg( data, IO_WriteOnly ); - - if ( !dcop->call( clientId.data(), "KonquerorIface", - "crashLogFile()", data, replyType, replyData) ) - { - kdWarning() << "can't find dcop function KonquerorIface::crashLogFile()" << endl; - continue; - } - - if ( replyType != "TQString" ) - continue; - - TQDataStream reply( replyData, IO_ReadOnly ); - TQString ret; - reply >> ret; - activeLogs[ret] = true; - } - - TQDir d( KCrashBookmarkImporterImpl().findDefaultLocation() ); - d.setSorting( TQDir::Time ); - d.setFilter( TQDir::Files ); - d.setNameFilter( "konqueror-crash-*.log" ); - - const TQFileInfoList *list = d.entryInfoList(); - TQFileInfoListIterator it( *list ); - - TQFileInfo *fi; - TQStringList crashFiles; - - int count = 0; - for ( ; (( fi = it.current() ) != 0) && (count < 20); ++it, ++count ) - { - bool stillAlive = activeLogs.contains( fi->absFilePath() ); - if ( !stillAlive ) - crashFiles << fi->absFilePath(); - } - // Delete remaining ones - for ( ; ( fi = it.current() ) != 0; ++it ) - { - TQFile::remove( fi->absFilePath() ); - } - - return crashFiles; -} - -void KCrashBookmarkImporterImpl::parse() -{ - TQDict<bool> signatureMap; - TQStringList crashFiles = KCrashBookmarkImporterImpl::getCrashLogs(); - int count = 1; - for ( TQStringList::Iterator it = crashFiles.begin(); it != crashFiles.end(); ++it ) - { - ViewMap views; - views = parseCrashLog_noemit( *it, m_shouldDelete ); - TQString signature; - for ( ViewMap::Iterator vit = views.begin(); vit != views.end(); ++vit ) - signature += "|"+vit.data(); - if (signatureMap[signature]) - { - // Duplicate... throw away and skip - TQFile::remove(*it); - continue; - } - - signatureMap.insert(signature, (bool *) true); // hack - - int outerFolder = ( crashFiles.count() > 1 ) && (views.count() > 0); - if ( outerFolder ) - emit newFolder( TQString("Konqueror Window %1").arg(count++), false, "" ); - for ( ViewMap::Iterator vit = views.begin(); vit != views.end(); ++vit ) - emit newBookmark( vit.data(), vit.data().latin1(), TQString("") ); - if ( outerFolder ) - emit endFolder(); - } -} - -TQString KCrashBookmarkImporter::crashBookmarksDir() -{ - static KCrashBookmarkImporterImpl *p = 0; - if (!p) - p = new KCrashBookmarkImporterImpl; - return p->findDefaultLocation(); -} - -void KCrashBookmarkImporterImpl::setShouldDelete( bool shouldDelete ) -{ - m_shouldDelete = shouldDelete; -} - -void KCrashBookmarkImporter::parseCrashBookmarks( bool del ) -{ - KCrashBookmarkImporterImpl importer; - importer.setFilename( m_fileName ); - importer.setShouldDelete( del ); - importer.setupSignalForwards( &importer, this ); - importer.parse(); -} - -TQString KCrashBookmarkImporterImpl::findDefaultLocation( bool ) const -{ - return locateLocal( "tmp", "" ); -} - -#include "kbookmarkimporter_crash.moc" diff --git a/kio/bookmarks/kbookmarkimporter_crash.h b/kio/bookmarks/kbookmarkimporter_crash.h deleted file mode 100644 index f4fc9af32..000000000 --- a/kio/bookmarks/kbookmarkimporter_crash.h +++ /dev/null @@ -1,74 +0,0 @@ -// -*- c-basic-offset:4; indent-tabs-mode:nil -*- -// vim: set ts=4 sts=4 sw=4 et: -/* This file is part of the KDE libraries - Copyright (C) 2002 Alexander Kellett <lypanov@kde.org> - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License version 2 as published by the Free Software Foundation. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef __kbookmarkimporter_crash_h -#define __kbookmarkimporter_crash_h - -#include <tqdom.h> -#include <tqcstring.h> -#include <tqstringlist.h> -#include <tqmap.h> -#include <ksimpleconfig.h> -#include <kdemacros.h> - -#include "kbookmarkimporter.h" - -/** - * A class for importing all crash sessions as bookmarks - * @deprecated - */ -class TDEIO_EXPORT_DEPRECATED KCrashBookmarkImporter : public TQObject -{ - Q_OBJECT -public: - KCrashBookmarkImporter( const TQString & fileName ) : m_fileName(fileName) {} - ~KCrashBookmarkImporter() {} - void parseCrashBookmarks( bool del = true ); - static TQString crashBookmarksDir( ); - static TQStringList getCrashLogs(); // EMPTY! -signals: - void newBookmark( const TQString & text, const TQCString & url, const TQString & additionalInfo ); - void newFolder( const TQString & text, bool open, const TQString & additionalInfo ); - void newSeparator(); - void endFolder(); -protected: - TQString m_fileName; - void parseCrashLog( TQString filename, bool del ); // EMPTY! -}; - -/** - * A class for importing all crash sessions as bookmarks - * @since 3.2 - */ -class TDEIO_EXPORT KCrashBookmarkImporterImpl : public KBookmarkImporterBase -{ -public: - KCrashBookmarkImporterImpl() : m_shouldDelete(false) { } - void setShouldDelete(bool); - virtual void parse(); - virtual TQString findDefaultLocation(bool forSaving = false) const; - static TQStringList getCrashLogs(); -private: - bool m_shouldDelete; - TQMap<TQString, TQString> parseCrashLog_noemit( const TQString & filename, bool del ); - class KCrashBookmarkImporterImplPrivate *d; -}; - -#endif diff --git a/kio/bookmarks/kbookmarkimporter_ie.cc b/kio/bookmarks/kbookmarkimporter_ie.cc deleted file mode 100644 index 8d1372194..000000000 --- a/kio/bookmarks/kbookmarkimporter_ie.cc +++ /dev/null @@ -1,185 +0,0 @@ -// -*- c-basic-offset:4; indent-tabs-mode:nil -*- -// vim: set ts=4 sts=4 sw=4 et: -/* This file is part of the KDE libraries - Copyright (C) 2002-2003 Alexander Kellett <lypanov@kde.org> - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License version 2 as published by the Free Software Foundation. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include <kfiledialog.h> -#include <kstringhandler.h> -#include <klocale.h> -#include <kdebug.h> -#include <tqtextcodec.h> - -#include <sys/types.h> -#include <stddef.h> -#include <dirent.h> -#include <sys/stat.h> - -#include "kbookmarkimporter.h" -#include "kbookmarkimporter_ie.h" - -/* antlarr: KDE 4: Make them const TQString & */ -void KIEBookmarkImporter::parseIEBookmarks_url_file( TQString filename, TQString name ) { - static const int g_lineLimit = 16*1024; - - TQFile f(filename); - - if(f.open(IO_ReadOnly)) { - - TQCString s(g_lineLimit); - - while(f.readLine(s.data(), g_lineLimit)>=0) { - if ( s[s.length()-1] != '\n' ) // Gosh, this line is longer than g_lineLimit. Skipping. - { - kdWarning() << "IE bookmarks contain a line longer than " << g_lineLimit << ". Skipping." << endl; - continue; - } - TQCString t = s.stripWhiteSpace(); - TQRegExp rx( "URL=(.*)" ); - if (rx.exactMatch(t)) { - emit newBookmark( name, TQString(rx.cap(1)).latin1(), TQString("") ); - } - } - - f.close(); - } -} - -/* antlarr: KDE 4: Make them const TQString & */ -void KIEBookmarkImporter::parseIEBookmarks_dir( TQString dirname, TQString foldername ) -{ - - TQDir dir(dirname); - dir.setFilter( TQDir::Files | TQDir::Dirs ); - dir.setSorting( TQDir::Name | TQDir::DirsFirst ); - dir.setNameFilter("*.url"); // AK - possibly add ";index.ini" ? - dir.setMatchAllDirs(true); - - const TQFileInfoList *list = dir.entryInfoList(); - if (!list) return; - - if (dirname != m_fileName) - emit newFolder( foldername, false, "" ); - - TQFileInfoListIterator it( *list ); - TQFileInfo *fi; - - while ( (fi = it.current()) != 0 ) { - ++it; - - if (fi->fileName() == "." || fi->fileName() == "..") continue; - - if (fi->isDir()) { - parseIEBookmarks_dir(fi->absFilePath(), fi->fileName()); - - } else if (fi->isFile()) { - if (fi->fileName().endsWith(".url")) { - TQString name = fi->fileName(); - name.truncate(name.length() - 4); // .url - parseIEBookmarks_url_file(fi->absFilePath(), name); - } - // AK - add index.ini - } - } - - if (dirname != m_fileName) - emit endFolder(); -} - - -void KIEBookmarkImporter::parseIEBookmarks( ) -{ - parseIEBookmarks_dir( m_fileName ); -} - -TQString KIEBookmarkImporter::IEBookmarksDir() -{ - static KIEBookmarkImporterImpl* p = 0; - if (!p) - p = new KIEBookmarkImporterImpl; - return p->findDefaultLocation(); -} - -void KIEBookmarkImporterImpl::parse() { - KIEBookmarkImporter importer(m_fileName); - setupSignalForwards(&importer, this); - importer.parseIEBookmarks(); -} - -TQString KIEBookmarkImporterImpl::findDefaultLocation(bool) const -{ - // notify user that they must give a new dir such - // as "Favourites" as otherwise it'll just place - // lots of .url files in the given dir and gui - // stuff in the exporter is ugly so that exclues - // the possibility of just writing to Favourites - // and checking if overwriting... - return KFileDialog::getExistingDirectory(); -} - -///////////////////////////////////////////////// - -class IEExporter : private KBookmarkGroupTraverser { -public: - IEExporter( const TQString & ); - void write( const KBookmarkGroup &grp ) { traverse(grp); }; -private: - virtual void visit( const KBookmark & ); - virtual void visitEnter( const KBookmarkGroup & ); - virtual void visitLeave( const KBookmarkGroup & ); -private: - TQDir m_currentDir; -}; - -static TQString ieStyleQuote( const TQString &str ) { - TQString s(str); - s.replace(TQRegExp("[/\\:*?\"<>|]"), "_"); - return s; -} - -IEExporter::IEExporter( const TQString & dname ) { - m_currentDir.setPath( dname ); -} - -void IEExporter::visit( const KBookmark &bk ) { - TQString fname = m_currentDir.path() + "/" + ieStyleQuote( bk.fullText() ) + ".url"; - // kdDebug() << "visit(" << bk.text() << "), fname == " << fname << endl; - TQFile file( fname ); - file.open( IO_WriteOnly ); - TQTextStream ts( &file ); - ts << "[InternetShortcut]\r\n"; - ts << "URL=" << bk.url().url().utf8() << "\r\n"; -} - -void IEExporter::visitEnter( const KBookmarkGroup &grp ) { - TQString dname = m_currentDir.path() + "/" + ieStyleQuote( grp.fullText() ); - // kdDebug() << "visitEnter(" << grp.text() << "), dname == " << dname << endl; - m_currentDir.mkdir( dname ); - m_currentDir.cd( dname ); -} - -void IEExporter::visitLeave( const KBookmarkGroup & ) { - // kdDebug() << "visitLeave()" << endl; - m_currentDir.cdUp(); -} - -void KIEBookmarkExporterImpl::write(KBookmarkGroup parent) { - IEExporter exporter( m_fileName ); - exporter.write( parent ); -} - -#include "kbookmarkimporter_ie.moc" diff --git a/kio/bookmarks/kbookmarkimporter_ie.h b/kio/bookmarks/kbookmarkimporter_ie.h deleted file mode 100644 index b1b7c651c..000000000 --- a/kio/bookmarks/kbookmarkimporter_ie.h +++ /dev/null @@ -1,90 +0,0 @@ -// -*- c-basic-offset:4; indent-tabs-mode:nil -*- -// vim: set ts=4 sts=4 sw=4 et: -/* This file is part of the KDE libraries - Copyright (C) 2002 Alexander Kellett <lypanov@kde.org> - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License version 2 as published by the Free Software Foundation. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef __kbookmarkimporter_ie_h -#define __kbookmarkimporter_ie_h - -#include <tqdom.h> -#include <tqcstring.h> -#include <tqstringlist.h> -#include <ksimpleconfig.h> -#include <kdemacros.h> - -#include <kbookmarkimporter.h> - -/** - * A class for importing IE bookmarks - * @deprecated - */ -class TDEIO_EXPORT_DEPRECATED KIEBookmarkImporter : public TQObject -{ - Q_OBJECT -public: - KIEBookmarkImporter( const TQString & fileName ) : m_fileName(fileName) {} - ~KIEBookmarkImporter() {} - - void parseIEBookmarks(); - - // Usual place for IE bookmarks - static TQString IEBookmarksDir(); - -signals: - void newBookmark( const TQString & text, const TQCString & url, const TQString & additionalInfo ); - void newFolder( const TQString & text, bool open, const TQString & additionalInfo ); - void newSeparator(); - void endFolder(); - -protected: - void parseIEBookmarks_dir( TQString dirname, TQString name = TQString::null ); - void parseIEBookmarks_url_file( TQString filename, TQString name ); - - TQString m_fileName; -}; - -/** - * A class for importing IE bookmarks - * @since 3.2 - */ -class TDEIO_EXPORT KIEBookmarkImporterImpl : public KBookmarkImporterBase -{ -public: - KIEBookmarkImporterImpl() { } - virtual void parse(); - virtual TQString findDefaultLocation(bool forSaving = false) const; -private: - class KIEBookmarkImporterImplPrivate *d; -}; - -/* - * @since 3.2 - */ -class TDEIO_EXPORT KIEBookmarkExporterImpl : public KBookmarkExporterBase -{ -public: - KIEBookmarkExporterImpl(KBookmarkManager* mgr, const TQString & path) - : KBookmarkExporterBase(mgr, path) - { ; } - virtual ~KIEBookmarkExporterImpl() {} - virtual void write(KBookmarkGroup); -private: - class KIEBookmarkExporterImplPrivate *d; -}; - -#endif diff --git a/kio/bookmarks/kbookmarkimporter_kde1.cc b/kio/bookmarks/kbookmarkimporter_kde1.cc deleted file mode 100644 index ac0d29b97..000000000 --- a/kio/bookmarks/kbookmarkimporter_kde1.cc +++ /dev/null @@ -1,156 +0,0 @@ -// -*- c-basic-offset:4; indent-tabs-mode:nil -*- -// vim: set ts=4 sts=4 sw=4 et: -/* This file is part of the KDE libraries - Copyright (C) 2000 David Faure <faure@kde.org> - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License version 2 as published by the Free Software Foundation. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include "kbookmarkimporter_kde1.h" -#include <kfiledialog.h> -#include <kstringhandler.h> -#include <klocale.h> -#include <kdebug.h> -#include <kcharsets.h> -#include <tqtextcodec.h> - -#include <sys/types.h> -#include <stddef.h> -#include <dirent.h> -#include <sys/stat.h> -#include <assert.h> - -//////////////////// - -void KBookmarkImporter::import( const TQString & path ) -{ - TQDomElement elem = m_pDoc->documentElement(); - Q_ASSERT(!elem.isNull()); - scanIntern( elem, path ); -} - -void KBookmarkImporter::scanIntern( TQDomElement & parentElem, const TQString & _path ) -{ - kdDebug(7043) << "KBookmarkImporter::scanIntern " << _path << endl; - // Substitute all symbolic links in the path - TQDir dir( _path ); - TQString canonical = dir.canonicalPath(); - - if ( m_lstParsedDirs.contains(canonical) ) - { - kdWarning() << "Directory " << canonical << " already parsed" << endl; - return; - } - - m_lstParsedDirs.append( canonical ); - - DIR *dp; - struct dirent *ep; - dp = opendir( TQFile::encodeName(_path) ); - if ( dp == 0L ) - return; - - // Loop thru all directory entries - while ( ( ep = readdir( dp ) ) != 0L ) - { - if ( strcmp( ep->d_name, "." ) != 0 && strcmp( ep->d_name, ".." ) != 0 ) - { - KURL file; - file.setPath( TQString( _path ) + '/' + TQFile::decodeName(ep->d_name) ); - - KMimeType::Ptr res = KMimeType::findByURL( file, 0, true ); - //kdDebug(7043) << " - " << file.url() << " -> " << res->name() << endl; - - if ( res->name() == "inode/directory" ) - { - // We could use KBookmarkGroup::createNewFolder, but then it - // would notify about the change, so we'd need a flag, etc. - TQDomElement groupElem = m_pDoc->createElement( "folder" ); - parentElem.appendChild( groupElem ); - TQDomElement textElem = m_pDoc->createElement( "title" ); - groupElem.appendChild( textElem ); - textElem.appendChild( m_pDoc->createTextNode( TDEIO::decodeFileName( ep->d_name ) ) ); - if ( TDEIO::decodeFileName( ep->d_name ) == "Toolbar" ) - groupElem.setAttribute("toolbar","yes"); - scanIntern( groupElem, file.path() ); - } - else if ( (res->name() == "application/x-desktop") - || (res->name() == "media/builtin-mydocuments") - || (res->name() == "media/builtin-mycomputer") - || (res->name() == "media/builtin-mynetworkplaces") - || (res->name() == "media/builtin-printers") - || (res->name() == "media/builtin-trash") - || (res->name() == "media/builtin-webbrowser") ) - { - KSimpleConfig cfg( file.path(), true ); - cfg.setDesktopGroup(); - TQString type = cfg.readEntry( "Type" ); - // Is it really a bookmark file ? - if ( type == "Link" ) - parseBookmark( parentElem, ep->d_name, cfg, 0 /* desktop group */ ); - else - kdWarning(7043) << " Not a link ? Type=" << type << endl; - } - else if ( res->name() == "text/plain") - { - // maybe its an IE Favourite.. - KSimpleConfig cfg( file.path(), true ); - TQStringList grp = cfg.groupList().grep( "internetshortcut", false ); - if ( grp.count() == 0 ) - continue; - cfg.setGroup( *grp.begin() ); - - TQString url = cfg.readPathEntry("URL"); - if (!url.isEmpty() ) - parseBookmark( parentElem, ep->d_name, cfg, *grp.begin() ); - } else - kdWarning(7043) << "Invalid bookmark : found mimetype='" << res->name() << "' for file='" << file.path() << "'!" << endl; - } - } - - closedir( dp ); -} - -void KBookmarkImporter::parseBookmark( TQDomElement & parentElem, TQCString _text, - KSimpleConfig& _cfg, const TQString &_group ) -{ - if ( !_group.isEmpty() ) - _cfg.setGroup( _group ); - else - _cfg.setDesktopGroup(); - - TQString url = _cfg.readPathEntry( "URL" ); - TQString icon = _cfg.readEntry( "Icon" ); - if (icon.right( 4 ) == ".xpm" ) // prevent warnings - icon.truncate( icon.length() - 4 ); - - TQString text = TDEIO::decodeFileName( TQString::fromLocal8Bit(_text) ); - if ( text.length() > 8 && text.right( 8 ) == ".desktop" ) - text.truncate( text.length() - 8 ); - if ( text.length() > 7 && text.right( 7 ) == ".kdelnk" ) - text.truncate( text.length() - 7 ); - - TQDomElement elem = m_pDoc->createElement( "bookmark" ); - parentElem.appendChild( elem ); - elem.setAttribute( "href", url ); - //if ( icon != "www" ) // No need to save the default - // Hmm, after all, it makes KBookmark::pixmapFile faster, - // and it shows a nice feature to those reading the file - elem.setAttribute( "icon", icon ); - TQDomElement textElem = m_pDoc->createElement( "title" ); - elem.appendChild( textElem ); - textElem.appendChild( m_pDoc->createTextNode( text ) ); - kdDebug(7043) << "KBookmarkImporter::parseBookmark text=" << text << endl; -} diff --git a/kio/bookmarks/kbookmarkimporter_kde1.h b/kio/bookmarks/kbookmarkimporter_kde1.h deleted file mode 100644 index 5af4f04e9..000000000 --- a/kio/bookmarks/kbookmarkimporter_kde1.h +++ /dev/null @@ -1,49 +0,0 @@ -// -*- c-basic-offset:4; indent-tabs-mode:nil -*- -// vim: set ts=4 sts=4 sw=4 et: -/* This file is part of the KDE libraries - Copyright (C) 2000 David Faure <faure@kde.org> - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License version 2 as published by the Free Software Foundation. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef __kbookmarkimporter_kde1_h -#define __kbookmarkimporter_kde1_h - -#include <tqdom.h> -#include <tqcstring.h> -#include <tqstringlist.h> -#include <ksimpleconfig.h> - -/** - * A class for importing the previous bookmarks (desktop files) - * Separated from KBookmarkManager to save memory (we throw this one - * out once the import is done) - */ -class TDEIO_EXPORT KBookmarkImporter -{ -public: - KBookmarkImporter( TQDomDocument * doc ) : m_pDoc(doc) {} - - void import( const TQString & path ); - -private: - void scanIntern( TQDomElement & parentElem, const TQString & _path ); - void parseBookmark( TQDomElement & parentElem, TQCString _text, - KSimpleConfig& _cfg, const TQString &_group ); - TQDomDocument * m_pDoc; - TQStringList m_lstParsedDirs; -}; - -#endif diff --git a/kio/bookmarks/kbookmarkimporter_ns.cc b/kio/bookmarks/kbookmarkimporter_ns.cc deleted file mode 100644 index 5521bee7e..000000000 --- a/kio/bookmarks/kbookmarkimporter_ns.cc +++ /dev/null @@ -1,243 +0,0 @@ -// -*- c-basic-offset:4; indent-tabs-mode:nil -*- -// vim: set ts=4 sts=4 sw=4 et: -/* This file is part of the KDE libraries - Copyright (C) 1996-1998 Martin R. Jones <mjones@kde.org> - Copyright (C) 2000 David Faure <faure@kde.org> - Copyright (C) 2003 Alexander Kellett <lypanov@kde.org> - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License version 2 as published by the Free Software Foundation. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include "kbookmarkimporter.h" -#include "kbookmarkexporter.h" -#include "kbookmarkmanager.h" -#include <kfiledialog.h> -#include <kstringhandler.h> -#include <klocale.h> -#include <kdebug.h> -#include <kcharsets.h> -#include <tqtextcodec.h> -#include <tqstylesheet.h> - -#include <sys/types.h> -#include <stddef.h> -#include <dirent.h> -#include <sys/stat.h> -#include <assert.h> - -void KNSBookmarkImporterImpl::parse() -{ - TQFile f(m_fileName); - TQTextCodec * codec = m_utf8 ? TQTextCodec::codecForName("UTF-8") : TQTextCodec::codecForLocale(); - Q_ASSERT(codec); - if (!codec) - return; - - if(f.open(IO_ReadOnly)) { - - static const int g_lineLimit = 16*1024; - TQCString s(g_lineLimit); - // skip header - while(f.readLine(s.data(), g_lineLimit) >= 0 && !s.contains("<DL>")); - - while(f.readLine(s.data(), g_lineLimit)>=0) { - if ( s[s.length()-1] != '\n' ) // Gosh, this line is longer than g_lineLimit. Skipping. - { - kdWarning() << "Netscape bookmarks contain a line longer than " << g_lineLimit << ". Skipping." << endl; - continue; - } - TQCString t = s.stripWhiteSpace(); - if(t.left(12).upper() == "<DT><A HREF=" || - t.left(16).upper() == "<DT><H3><A HREF=") { - int firstQuotes = t.find('"')+1; - int secondQuotes = t.find('"', firstQuotes); - if (firstQuotes != -1 && secondQuotes != -1) - { - TQCString link = t.mid(firstQuotes, secondQuotes-firstQuotes); - int endTag = t.find('>', secondQuotes+1); - TQCString name = t.mid(endTag+1); - name = name.left(name.findRev('<')); - if ( name.right(4) == "</A>" ) - name = name.left( name.length() - 4 ); - TQString qname = KCharsets::resolveEntities( codec->toUnicode( name ) ); - TQCString additionalInfo = t.mid( secondQuotes+1, endTag-secondQuotes-1 ); - - emit newBookmark( qname, - link, codec->toUnicode(additionalInfo) ); - } - } - else if(t.left(7).upper() == "<DT><H3") { - int endTag = t.find('>', 7); - TQCString name = t.mid(endTag+1); - name = name.left(name.findRev('<')); - TQString qname = KCharsets::resolveEntities( codec->toUnicode( name ) ); - TQCString additionalInfo = t.mid( 8, endTag-8 ); - bool folded = (additionalInfo.left(6) == "FOLDED"); - if (folded) additionalInfo.remove(0,7); - - emit newFolder( qname, - !folded, - codec->toUnicode(additionalInfo) ); - } - else if(t.left(4).upper() == "<HR>") - emit newSeparator(); - else if(t.left(8).upper() == "</DL><P>") - emit endFolder(); - } - - f.close(); - } -} - -TQString KNSBookmarkImporterImpl::findDefaultLocation(bool forSaving) const -{ - if (m_utf8) - { - if ( forSaving ) - return KFileDialog::getSaveFileName( TQDir::homeDirPath() + "/.mozilla", - i18n("*.html|HTML Files (*.html)") ); - else - return KFileDialog::getOpenFileName( TQDir::homeDirPath() + "/.mozilla", - i18n("*.html|HTML Files (*.html)") ); - } - else - { - return TQDir::homeDirPath() + "/.netscape/bookmarks.html"; - } -} - -//////////////////////////////////////////////////////////////// - - -void KNSBookmarkImporter::parseNSBookmarks( bool utf8 ) -{ - KNSBookmarkImporterImpl importer; - importer.setFilename(m_fileName); - importer.setUtf8(utf8); - importer.setupSignalForwards(&importer, this); - importer.parse(); -} - -TQString KNSBookmarkImporter::netscapeBookmarksFile( bool forSaving ) -{ - static KNSBookmarkImporterImpl *p = 0; - if (!p) - { - p = new KNSBookmarkImporterImpl; - p->setUtf8(false); - } - return p->findDefaultLocation(forSaving); -} - -TQString KNSBookmarkImporter::mozillaBookmarksFile( bool forSaving ) -{ - static KNSBookmarkImporterImpl *p = 0; - if (!p) - { - p = new KNSBookmarkImporterImpl; - p->setUtf8(true); - } - return p->findDefaultLocation(forSaving); -} - - -//////////////////////////////////////////////////////////////// -// compat only -//////////////////////////////////////////////////////////////// - -void KNSBookmarkExporter::write(bool utf8) { - KNSBookmarkExporterImpl exporter(m_pManager, m_fileName); - exporter.setUtf8(utf8); - exporter.write(m_pManager->root()); -} - -void KNSBookmarkExporter::writeFolder(TQTextStream &/*stream*/, KBookmarkGroup /*gp*/) { - // TODO - requires a d pointer workaround hack? -} - -//////////////////////////////////////////////////////////////// - -void KNSBookmarkExporterImpl::setUtf8(bool utf8) { - m_utf8 = utf8; -} - -void KNSBookmarkExporterImpl::write(KBookmarkGroup parent) { - if (TQFile::exists(m_fileName)) { - ::rename( - TQFile::encodeName(m_fileName), - TQFile::encodeName(m_fileName + ".beforekde")); - } - - TQFile file(m_fileName); - - if (!file.open(IO_WriteOnly)) { - kdError(7043) << "Can't write to file " << m_fileName << endl; - return; - } - - TQTextStream fstream(&file); - fstream.setEncoding(m_utf8 ? TQTextStream::UnicodeUTF8 : TQTextStream::Locale); - - TQString charset - = m_utf8 ? "UTF-8" : TQString::fromLatin1(TQTextCodec::codecForLocale()->name()).upper(); - - fstream << "<!DOCTYPE NETSCAPE-Bookmark-file-1>" << endl - << i18n("<!-- This file was generated by Konqueror -->") << endl - << "<META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset=" - << charset << "\">" << endl - << "<TITLE>" << i18n("Bookmarks") << "" << endl - << "

" << i18n("Bookmarks") << "

" << endl - << "

" << endl - << folderAsString(parent) - << "

" << endl; -} - -TQString KNSBookmarkExporterImpl::folderAsString(KBookmarkGroup parent) const { - TQString str; - TQTextStream fstream(&str, IO_WriteOnly); - - for (KBookmark bk = parent.first(); !bk.isNull(); bk = parent.next(bk)) { - if (bk.isSeparator()) { - fstream << "


" << endl; - continue; - } - - TQString text = TQStyleSheet::escape(bk.fullText()); - - if (bk.isGroup() ) { - fstream << "

" - << text << "

" << endl - << "

" << endl - << folderAsString(bk.toGroup()) - << "

" << endl; - continue; - - } else { - // note - netscape seems to use local8bit for url... - fstream << "

" - << text << "" << endl; - continue; - } - } - - return str; -} - -//// - -#include "kbookmarkimporter_ns.moc" diff --git a/kio/bookmarks/kbookmarkimporter_ns.h b/kio/bookmarks/kbookmarkimporter_ns.h deleted file mode 100644 index 10844fc63..000000000 --- a/kio/bookmarks/kbookmarkimporter_ns.h +++ /dev/null @@ -1,132 +0,0 @@ -// -*- c-basic-offset:4; indent-tabs-mode:nil -*- -// vim: set ts=4 sts=4 sw=4 et: -/* This file is part of the KDE libraries - Copyright (C) 2000 David Faure - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License version 2 as published by the Free Software Foundation. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef __kbookmarkimporter_ns_h -#define __kbookmarkimporter_ns_h - -#include -#include -#include -#include -#include - -#include "kbookmarkimporter.h" -#include "kbookmarkexporter.h" - -/** - * A class for importing NS bookmarks - * @deprecated - */ -class TDEIO_EXPORT_DEPRECATED KNSBookmarkImporter : public TQObject -{ - Q_OBJECT -public: - KNSBookmarkImporter( const TQString & fileName ) : m_fileName(fileName) {} - ~KNSBookmarkImporter() {} - - // for compat reasons only - void parseNSBookmarks() { parseNSBookmarks(false); } - // go for it. Set utf8 to true for Mozilla, false for Netscape. - void parseNSBookmarks( bool utf8 ); - - static TQString netscapeBookmarksFile( bool forSaving=false ); - static TQString mozillaBookmarksFile( bool forSaving=false ); - -signals: - void newBookmark( const TQString & text, const TQCString & url, const TQString & additionalInfo ); - void newFolder( const TQString & text, bool open, const TQString & additionalInfo ); - void newSeparator(); - void endFolder(); - -protected: - TQString m_fileName; -}; - -/** - * A class for importing NS bookmarks - * utf8 defaults to off - * @since 3.2 - */ -class TDEIO_EXPORT KNSBookmarkImporterImpl : public KBookmarkImporterBase -{ -public: - KNSBookmarkImporterImpl() : m_utf8(false) { } - void setUtf8(bool utf8) { m_utf8 = utf8; } - virtual void parse(); - virtual TQString findDefaultLocation(bool forSaving = false) const; -private: - bool m_utf8; - class KNSBookmarkImporterImplPrivate *d; -}; - -/** - * A class for importing Mozilla bookmarks - * utf8 defaults to on - * @since 3.2 - */ -class TDEIO_EXPORT KMozillaBookmarkImporterImpl : public KNSBookmarkImporterImpl -{ -public: - KMozillaBookmarkImporterImpl() { setUtf8(true); } -private: - class KMozillaBookmarkImporterImplPrivate *d; -}; - -/** - * A class that exports all the current bookmarks to Netscape/Mozilla bookmarks - * Warning, it overwrites the existing bookmarks.html file ! - * @deprecated - */ -class TDEIO_EXPORT_DEPRECATED KNSBookmarkExporter -{ -public: - KNSBookmarkExporter(KBookmarkManager* mgr, const TQString & fileName) - : m_fileName(fileName), m_pManager(mgr) { } - ~KNSBookmarkExporter() {} - - void write() { write(false); } // deprecated - void write( bool utf8 ); - -protected: - void writeFolder(TQTextStream &stream, KBookmarkGroup parent); - TQString m_fileName; - KBookmarkManager* m_pManager; -}; - -/** - * @since 3.2 - */ -class TDEIO_EXPORT KNSBookmarkExporterImpl : public KBookmarkExporterBase -{ -public: - KNSBookmarkExporterImpl(KBookmarkManager* mgr, const TQString & fileName) - : KBookmarkExporterBase(mgr, fileName) - { ; } - virtual ~KNSBookmarkExporterImpl() {} - virtual void write(KBookmarkGroup); - void setUtf8(bool); -protected: - TQString folderAsString(KBookmarkGroup) const; -private: - bool m_utf8; - class KNSBookmarkExporterImplPrivate *d; -}; - -#endif diff --git a/kio/bookmarks/kbookmarkimporter_opera.cc b/kio/bookmarks/kbookmarkimporter_opera.cc deleted file mode 100644 index 45ac1a7ca..000000000 --- a/kio/bookmarks/kbookmarkimporter_opera.cc +++ /dev/null @@ -1,170 +0,0 @@ -// -*- c-basic-offset:4; indent-tabs-mode:nil -*- -// vim: set ts=4 sts=4 sw=4 et: -/* This file is part of the KDE libraries - Copyright (C) 2002-2003 Alexander Kellett - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License version 2 as published by the Free Software Foundation. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -#include "kbookmarkimporter.h" -#include "kbookmarkimporter_opera.h" - -void KOperaBookmarkImporter::parseOperaBookmarks( ) -{ - TQFile file(m_fileName); - if(!file.open(IO_ReadOnly)) { - return; - } - - TQTextCodec * codec = TQTextCodec::codecForName("UTF-8"); - Q_ASSERT(codec); - if (!codec) - return; - - int lineno = 0; - TQString url, name, type; - static const int g_lineLimit = 16*1024; - TQCString line(g_lineLimit); - - while ( file.readLine(line.data(), g_lineLimit) >=0 ) { - lineno++; - - // skip lines that didn't fit in buffer and first two headers lines - if ( line[line.length()-1] != '\n' || lineno <= 2 ) - continue; - - TQString currentLine = codec->toUnicode(line).stripWhiteSpace(); - - if (currentLine.isEmpty()) { - // end of data block - if (type.isNull()) - continue; - else if ( type == "URL") - emit newBookmark( name, url.latin1(), "" ); - else if (type == "FOLDER" ) - emit newFolder( name, false, "" ); - - type = TQString::null; - name = TQString::null; - url = TQString::null; - - } else if (currentLine == "-") { - // end of folder - emit endFolder(); - - } else { - // data block line - TQString tag; - if ( tag = "#", currentLine.startsWith( tag ) ) - type = currentLine.remove( 0, tag.length() ); - else if ( tag = "NAME=", currentLine.startsWith( tag ) ) - name = currentLine.remove(0, tag.length()); - else if ( tag = "URL=", currentLine.startsWith( tag ) ) - url = currentLine.remove(0, tag.length()); - } - } - -} - -TQString KOperaBookmarkImporter::operaBookmarksFile() -{ - static KOperaBookmarkImporterImpl *p = 0; - if (!p) - p = new KOperaBookmarkImporterImpl; - return p->findDefaultLocation(); -} - -void KOperaBookmarkImporterImpl::parse() { - KOperaBookmarkImporter importer(m_fileName); - setupSignalForwards(&importer, this); - importer.parseOperaBookmarks(); -} - -TQString KOperaBookmarkImporterImpl::findDefaultLocation(bool saving) const -{ - return saving ? KFileDialog::getSaveFileName( - TQDir::homeDirPath() + "/.opera", - i18n("*.adr|Opera Bookmark Files (*.adr)") ) - : KFileDialog::getOpenFileName( - TQDir::homeDirPath() + "/.opera", - i18n("*.adr|Opera Bookmark Files (*.adr)") ); -} - -///////////////////////////////////////////////// - -class OperaExporter : private KBookmarkGroupTraverser { -public: - OperaExporter(); - TQString generate( const KBookmarkGroup &grp ) { traverse(grp); return m_string; }; -private: - virtual void visit( const KBookmark & ); - virtual void visitEnter( const KBookmarkGroup & ); - virtual void visitLeave( const KBookmarkGroup & ); -private: - TQString m_string; - TQTextStream m_out; -}; - -OperaExporter::OperaExporter() : m_out(&m_string, IO_WriteOnly) { - m_out << "Opera Hotlist version 2.0" << endl; - m_out << "Options: encoding = utf8, version=3" << endl; -} - -void OperaExporter::visit( const KBookmark &bk ) { - // kdDebug() << "visit(" << bk.text() << ")" << endl; - m_out << "#URL" << endl; - m_out << "\tNAME=" << bk.fullText() << endl; - m_out << "\tURL=" << bk.url().url().utf8() << endl; - m_out << endl; -} - -void OperaExporter::visitEnter( const KBookmarkGroup &grp ) { - // kdDebug() << "visitEnter(" << grp.text() << ")" << endl; - m_out << "#FOLDER" << endl; - m_out << "\tNAME="<< grp.fullText() << endl; - m_out << endl; -} - -void OperaExporter::visitLeave( const KBookmarkGroup & ) { - // kdDebug() << "visitLeave()" << endl; - m_out << "-" << endl; - m_out << endl; -} - -void KOperaBookmarkExporterImpl::write(KBookmarkGroup parent) { - OperaExporter exporter; - TQString content = exporter.generate( parent ); - TQFile file(m_fileName); - if (!file.open(IO_WriteOnly)) { - kdError(7043) << "Can't write to file " << m_fileName << endl; - return; - } - TQTextStream fstream(&file); - fstream.setEncoding(TQTextStream::UnicodeUTF8); - fstream << content; -} - -#include "kbookmarkimporter_opera.moc" diff --git a/kio/bookmarks/kbookmarkimporter_opera.h b/kio/bookmarks/kbookmarkimporter_opera.h deleted file mode 100644 index f6f1028b1..000000000 --- a/kio/bookmarks/kbookmarkimporter_opera.h +++ /dev/null @@ -1,86 +0,0 @@ -// -*- c-basic-offset:4; indent-tabs-mode:nil -*- -// vim: set ts=4 sts=4 sw=4 et: -/* This file is part of the KDE libraries - Copyright (C) 2002 Alexander Kellett - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License version 2 as published by the Free Software Foundation. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef __kbookmarkimporter_opera_h -#define __kbookmarkimporter_opera_h - -#include -#include -#include -#include - -#include - -/** - * A class for importing Opera bookmarks - * @deprecated - */ -class TDEIO_EXPORT_DEPRECATED KOperaBookmarkImporter : public TQObject -{ - Q_OBJECT -public: - KOperaBookmarkImporter( const TQString & fileName ) : m_fileName(fileName) {} - ~KOperaBookmarkImporter() {} - - void parseOperaBookmarks(); - - // Usual place for Opera bookmarks - static TQString operaBookmarksFile(); - -signals: - void newBookmark( const TQString & text, const TQCString & url, const TQString & additionalInfo ); - void newFolder( const TQString & text, bool open, const TQString & additionalInfo ); - void newSeparator(); - void endFolder(); - -protected: - TQString m_fileName; -}; - -/** - * A class for importing Opera bookmarks - * @since 3.2 - */ -class TDEIO_EXPORT KOperaBookmarkImporterImpl : public KBookmarkImporterBase -{ -public: - KOperaBookmarkImporterImpl() { } - virtual void parse(); - virtual TQString findDefaultLocation(bool forSaving = false) const; -private: - class KOperaBookmarkImporterImplPrivate *d; -}; - -/** - * @since 3.2 - */ -class TDEIO_EXPORT KOperaBookmarkExporterImpl : public KBookmarkExporterBase -{ -public: - KOperaBookmarkExporterImpl(KBookmarkManager* mgr, const TQString & filename) - : KBookmarkExporterBase(mgr, filename) - { ; } - virtual ~KOperaBookmarkExporterImpl() {} - virtual void write(KBookmarkGroup); -private: - class KOperaBookmarkExporterImplPrivate *d; -}; - -#endif diff --git a/kio/bookmarks/kbookmarkmanager.cc b/kio/bookmarks/kbookmarkmanager.cc deleted file mode 100644 index a87e0f20e..000000000 --- a/kio/bookmarks/kbookmarkmanager.cc +++ /dev/null @@ -1,727 +0,0 @@ -// -*- c-basic-offset:4; indent-tabs-mode:nil -*- -// vim: set ts=4 sts=4 sw=4 et: -/* This file is part of the KDE libraries - Copyright (C) 2000 David Faure - Copyright (C) 2003 Alexander Kellett - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License version 2 as published by the Free Software Foundation. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include "kbookmarkmanager.h" -#include "kbookmarkmenu.h" -#include "kbookmarkmenu_p.h" -#include "kbookmarkimporter.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "dptrtemplate.h" - -class KBookmarkManagerPrivate : public dPtrTemplate { -public: - KBookmarkManagerPrivate() - { m_browserEditor = true; } - TQString m_editorCaption; - bool m_browserEditor; -}; -template<> TQPtrDict* dPtrTemplate::d_ptr = 0; - -KBookmarkManagerPrivate* KBookmarkManager::dptr() const { - return KBookmarkManagerPrivate::d( this ); -} - -// TODO - clean this stuff up by just using the above dptrtemplate? -TQPtrList* KBookmarkManager::s_pSelf; -static KStaticDeleter > sdbm; - -class KBookmarkMap : private KBookmarkGroupTraverser { -public: - KBookmarkMap( KBookmarkManager * ); - void update(); - TQValueList find( const TQString &url ) const - { return m_bk_map[url]; } -private: - virtual void visit(const KBookmark &); - virtual void visitEnter(const KBookmarkGroup &) { ; } - virtual void visitLeave(const KBookmarkGroup &) { ; } -private: - typedef TQValueList KBookmarkList; - TQMap m_bk_map; - KBookmarkManager *m_manager; -}; - -static KBookmarkMap *s_bk_map = 0; - -KBookmarkMap::KBookmarkMap( KBookmarkManager *manager ) { - m_manager = manager; -} - -void KBookmarkMap::update() -{ - m_bk_map.clear(); - KBookmarkGroup root = m_manager->root(); - traverse(root); -} - -void KBookmarkMap::visit(const KBookmark &bk) -{ - if (!bk.isSeparator()) { - // add bookmark to url map - m_bk_map[bk.internalElement().attribute("href")].append(bk); - } -} - - -KBookmarkManager* KBookmarkManager::managerForFile( const TQString& bookmarksFile, bool bImportDesktopFiles ) -{ - if ( !s_pSelf ) { - sdbm.setObject( s_pSelf, new TQPtrList ); - s_pSelf->setAutoDelete( true ); - } - TQPtrListIterator it ( *s_pSelf ); - for ( ; it.current() ; ++it ) - if ( it.current()->path() == bookmarksFile ) - return it.current(); - - KBookmarkManager* mgr = new KBookmarkManager( bookmarksFile, bImportDesktopFiles ); - s_pSelf->append( mgr ); - return mgr; -} - -// principally used for filtered toolbars -KBookmarkManager* KBookmarkManager::createTempManager() -{ - if ( !s_pSelf ) { - sdbm.setObject( s_pSelf, new TQPtrList ); - s_pSelf->setAutoDelete( true ); - } - KBookmarkManager* mgr = new KBookmarkManager(); - s_pSelf->append( mgr ); - return mgr; -} - -#define PI_DATA "version=\"1.0\" encoding=\"UTF-8\"" - -KBookmarkManager::KBookmarkManager( const TQString & bookmarksFile, bool bImportDesktopFiles ) - : DCOPObject(TQCString("KBookmarkManager-")+bookmarksFile.utf8()), m_doc("xbel"), m_docIsLoaded(false) -{ - m_toolbarDoc.clear(); - - m_update = true; - m_showNSBookmarks = true; - - Q_ASSERT( !bookmarksFile.isEmpty() ); - m_bookmarksFile = bookmarksFile; - - if ( !TQFile::exists(m_bookmarksFile) ) - { - TQDomElement topLevel = m_doc.createElement("xbel"); - m_doc.appendChild( topLevel ); - m_doc.insertBefore( m_doc.createProcessingInstruction( "xml", PI_DATA), topLevel ); - if ( bImportDesktopFiles ) - importDesktopFiles(); - m_docIsLoaded = true; - } - - connectDCOPSignal(0, objId(), "bookmarksChanged(TQString)", "notifyChanged(TQString)", false); - connectDCOPSignal(0, objId(), "bookmarkConfigChanged()", "notifyConfigChanged()", false); -} - -KBookmarkManager::KBookmarkManager( ) - : DCOPObject(TQCString("KBookmarkManager-generated")), m_doc("xbel"), m_docIsLoaded(true) -{ - m_toolbarDoc.clear(); // strange ;-) - - m_update = false; // TODO - make it read/write - m_showNSBookmarks = true; - - m_bookmarksFile = TQString::null; // AK - check all codepaths for this one - - TQDomElement topLevel = m_doc.createElement("xbel"); - m_doc.appendChild( topLevel ); - m_doc.insertBefore( m_doc.createProcessingInstruction( "xml", PI_DATA), topLevel ); - - // TODO - enable this via some sort of api and fix the above DCOPObject script somehow -#if 0 - connectDCOPSignal(0, objId(), "bookmarksChanged(TQString)", "notifyChanged(TQString)", false); - connectDCOPSignal(0, objId(), "bookmarkConfigChanged()", "notifyConfigChanged()", false); -#endif -} - -KBookmarkManager::~KBookmarkManager() -{ - if ( s_pSelf ) - s_pSelf->removeRef( this ); -} - -void KBookmarkManager::setUpdate( bool update ) -{ - m_update = update; -} - -const TQDomDocument &KBookmarkManager::internalDocument() const -{ - if(!m_docIsLoaded) - { - parse(); - m_toolbarDoc.clear(); - } - return m_doc; -} - - -void KBookmarkManager::parse() const -{ - m_docIsLoaded = true; - //kdDebug(7043) << "KBookmarkManager::parse " << m_bookmarksFile << endl; - TQFile file( m_bookmarksFile ); - if ( !file.open( IO_ReadOnly ) ) - { - kdWarning() << "Can't open " << m_bookmarksFile << endl; - return; - } - m_doc = TQDomDocument("xbel"); - m_doc.setContent( &file ); - - TQDomElement docElem = m_doc.documentElement(); - if ( docElem.isNull() ) - kdWarning() << "KBookmarkManager::parse : can't parse " << m_bookmarksFile << endl; - else - { - TQString mainTag = docElem.tagName(); - if ( mainTag == "BOOKMARKS" ) - { - kdWarning() << "Old style bookmarks found. Calling convertToXBEL." << endl; - docElem.setTagName("xbel"); - if ( docElem.hasAttribute( "HIDE_NSBK" ) && m_showNSBookmarks ) // non standard either, but we need it - { - docElem.setAttribute( "hide_nsbk", docElem.attribute( "HIDE_NSBK" ) == "1" ? "yes" : "no" ); - docElem.removeAttribute( "HIDE_NSBK" ); - } - - convertToXBEL( docElem ); - save(); - } - else if ( mainTag != "xbel" ) - kdWarning() << "KBookmarkManager::parse : unknown main tag " << mainTag << endl; - - TQDomNode n = m_doc.documentElement().previousSibling(); - if ( n.isProcessingInstruction() ) - { - TQDomProcessingInstruction pi = n.toProcessingInstruction(); - pi.parentNode().removeChild(pi); - } - - TQDomProcessingInstruction pi; - pi = m_doc.createProcessingInstruction( "xml", PI_DATA ); - m_doc.insertBefore( pi, docElem ); - } - - file.close(); - if ( !s_bk_map ) - s_bk_map = new KBookmarkMap( const_cast( this ) ); - s_bk_map->update(); -} - -void KBookmarkManager::convertToXBEL( TQDomElement & group ) -{ - TQDomNode n = group.firstChild(); - while( !n.isNull() ) - { - TQDomElement e = n.toElement(); - if ( !e.isNull() ) - if ( e.tagName() == "TEXT" ) - { - e.setTagName("title"); - } - else if ( e.tagName() == "SEPARATOR" ) - { - e.setTagName("separator"); // so close... - } - else if ( e.tagName() == "GROUP" ) - { - e.setTagName("folder"); - convertAttribute(e, "ICON","icon"); // non standard, but we need it - if ( e.hasAttribute( "TOOLBAR" ) ) // non standard either, but we need it - { - e.setAttribute( "toolbar", e.attribute( "TOOLBAR" ) == "1" ? "yes" : "no" ); - e.removeAttribute( "TOOLBAR" ); - } - - convertAttribute(e, "NETSCAPEINFO","netscapeinfo"); // idem - bool open = (e.attribute("OPEN") == "1"); - e.removeAttribute("OPEN"); - e.setAttribute("folded", open ? "no" : "yes"); - convertToXBEL( e ); - } - else - if ( e.tagName() == "BOOKMARK" ) - { - e.setTagName("bookmark"); // so much difference :-) - convertAttribute(e, "ICON","icon"); // non standard, but we need it - convertAttribute(e, "NETSCAPEINFO","netscapeinfo"); // idem - convertAttribute(e, "URL","href"); - TQString text = e.text(); - while ( !e.firstChild().isNull() ) // clean up the old contained text - e.removeChild(e.firstChild()); - TQDomElement titleElem = e.ownerDocument().createElement("title"); - e.appendChild( titleElem ); // should be the only child anyway - titleElem.appendChild( e.ownerDocument().createTextNode( text ) ); - } - else - kdWarning(7043) << "Unknown tag " << e.tagName() << endl; - n = n.nextSibling(); - } -} - -void KBookmarkManager::convertAttribute( TQDomElement elem, const TQString & oldName, const TQString & newName ) -{ - if ( elem.hasAttribute( oldName ) ) - { - elem.setAttribute( newName, elem.attribute( oldName ) ); - elem.removeAttribute( oldName ); - } -} - -void KBookmarkManager::importDesktopFiles() -{ - KBookmarkImporter importer( const_cast(&internalDocument()) ); - TQString path(TDEGlobal::dirs()->saveLocation("data", "kfm/bookmarks", true)); - importer.import( path ); - //kdDebug(7043) << internalDocument().toCString() << endl; - - save(); -} - -bool KBookmarkManager::save( bool toolbarCache ) const -{ - return saveAs( m_bookmarksFile, toolbarCache ); -} - -bool KBookmarkManager::saveAs( const TQString & filename, bool toolbarCache ) const -{ - kdDebug(7043) << "KBookmarkManager::save " << filename << endl; - - // Save the bookmark toolbar folder for quick loading - // but only when it will actually make things quicker - const TQString cacheFilename = filename + TQString::fromLatin1(".tbcache"); - if(toolbarCache && !root().isToolbarGroup()) - { - KSaveFile cacheFile( cacheFilename ); - if ( cacheFile.status() == 0 ) - { - TQString str; - TQTextStream stream(&str, IO_WriteOnly); - stream << root().findToolbar(); - TQCString cstr = str.utf8(); - cacheFile.file()->writeBlock( cstr.data(), cstr.length() ); - cacheFile.close(); - } - } - else // remove any (now) stale cache - { - TQFile::remove( cacheFilename ); - } - - KSaveFile file( filename ); - if ( file.status() == 0 ) - { - file.backupFile( file.name(), TQString::null, ".bak" ); - TQCString cstr; - cstr = internalDocument().toCString(); // is in UTF8 - file.file()->writeBlock( cstr.data(), cstr.length() ); - if ( file.close() ) - return true; - } - - static int hadSaveError = false; - file.abort(); - if ( !hadSaveError ) { - TQString error = i18n("Unable to save bookmarks in %1. Reported error was: %2. " - "This error message will only be shown once. The cause " - "of the error needs to be fixed as quickly as possible, " - "which is most likely a full hard drive.") - .arg(filename).arg(TQString::fromLocal8Bit(strerror(file.status()))); - if (tqApp->type() != TQApplication::Tty) - KMessageBox::error( 0L, error ); - else - kdError() << error << endl; - } - hadSaveError = true; - return false; -} - -KBookmarkGroup KBookmarkManager::root() const -{ - return KBookmarkGroup(internalDocument().documentElement()); -} - -KBookmarkGroup KBookmarkManager::toolbar() -{ - kdDebug(7043) << "KBookmarkManager::toolbar begin" << endl; - // Only try to read from a toolbar cache if the full document isn't loaded - if(!m_docIsLoaded) - { - kdDebug(7043) << "KBookmarkManager::toolbar trying cache" << endl; - const TQString cacheFilename = m_bookmarksFile + TQString::fromLatin1(".tbcache"); - TQFileInfo bmInfo(m_bookmarksFile); - TQFileInfo cacheInfo(cacheFilename); - if (m_toolbarDoc.isNull() && - TQFile::exists(cacheFilename) && - bmInfo.lastModified() < cacheInfo.lastModified()) - { - kdDebug(7043) << "KBookmarkManager::toolbar reading file" << endl; - TQFile file( cacheFilename ); - - if ( file.open( IO_ReadOnly ) ) - { - m_toolbarDoc = TQDomDocument("cache"); - m_toolbarDoc.setContent( &file ); - kdDebug(7043) << "KBookmarkManager::toolbar opened" << endl; - } - } - if (!m_toolbarDoc.isNull()) - { - kdDebug(7043) << "KBookmarkManager::toolbar returning element" << endl; - TQDomElement elem = m_toolbarDoc.firstChild().toElement(); - return KBookmarkGroup(elem); - } - } - - // Fallback to the normal way if there is no cache or if the bookmark file - // is already loaded - TQDomElement elem = root().findToolbar(); - if (elem.isNull()) - return root(); // Root is the bookmark toolbar if none has been set. - else - return KBookmarkGroup(root().findToolbar()); -} - -KBookmark KBookmarkManager::findByAddress( const TQString & address, bool tolerant ) -{ - //kdDebug(7043) << "KBookmarkManager::findByAddress " << address << endl; - KBookmark result = root(); - // The address is something like /5/10/2+ - TQStringList addresses = TQStringList::split(TQRegExp("[/+]"),address); - // kdWarning() << addresses.join(",") << endl; - for ( TQStringList::Iterator it = addresses.begin() ; it != addresses.end() ; ) - { - bool append = ((*it) == "+"); - uint number = (*it).toUInt(); - Q_ASSERT(result.isGroup()); - KBookmarkGroup group = result.toGroup(); - KBookmark bk = group.first(), lbk = bk; // last non-null bookmark - for ( uint i = 0 ; ( (i restart search from the beginning - ch = parentBookmark.first(); - break; - } - else - { - // this exact URL already exists - return TQString::null; - } - } - ch = parentBookmark.next( ch ); - } - } while ( !ch.isNull() ); - - return uniqueTitle; -} - -KBookmarkGroup KBookmarkManager::addBookmarkDialog( - const TQString & _url, const TQString & _title, - const TQString & _parentBookmarkAddress -) { - TQString url = _url; - TQString title = _title; - TQString parentBookmarkAddress = _parentBookmarkAddress; - - if ( url.isEmpty() ) - { - KMessageBox::error( 0L, i18n("Cannot add bookmark with empty URL.")); - return KBookmarkGroup(); - } - - if ( title.isEmpty() ) - title = url; - - if ( KBookmarkSettings::self()->m_advancedaddbookmark) - { - KBookmarkEditDialog dlg( title, url, this, KBookmarkEditDialog::InsertionMode, parentBookmarkAddress ); - if ( dlg.exec() != KDialogBase::Accepted ) - return KBookmarkGroup(); - title = dlg.finalTitle(); - url = dlg.finalUrl(); - parentBookmarkAddress = dlg.finalAddress(); - } - - KBookmarkGroup parentBookmark; - parentBookmark = findByAddress( parentBookmarkAddress ).toGroup(); - Q_ASSERT( !parentBookmark.isNull() ); - - TQString uniqueTitle = pickUnusedTitle( parentBookmark, title, url ); - if ( !uniqueTitle.isNull() ) - parentBookmark.addBookmark( this, uniqueTitle, KURL( url )); - - return parentBookmark; -} - - -void KBookmarkManager::emitChanged( /*KDE4 const*/ KBookmarkGroup & group ) -{ - save(); - - // Tell the other processes too - // kdDebug(7043) << "KBookmarkManager::emitChanged : broadcasting change " << group.address() << endl; - - TQByteArray data; - TQDataStream ds( data, IO_WriteOnly ); - ds << group.address(); - - emitDCOPSignal("bookmarksChanged(TQString)", data); - - // We do get our own broadcast, so no need for this anymore - //emit changed( group ); -} - -void KBookmarkManager::emitConfigChanged() -{ - emitDCOPSignal("bookmarkConfigChanged()", TQByteArray()); -} - -void KBookmarkManager::notifyCompleteChange( TQString caller ) // DCOP call -{ - if (!m_update) return; - - //kdDebug(7043) << "KBookmarkManager::notifyCompleteChange" << endl; - // The bk editor tells us we should reload everything - // Reparse - parse(); - // Tell our GUI - // (emit where group is "" to directly mark the root menu as dirty) - emit changed( "", caller ); -} - -void KBookmarkManager::notifyConfigChanged() // DCOP call -{ - kdDebug() << "reloaded bookmark config!" << endl; - KBookmarkSettings::self()->readSettings(); - parse(); // reload, and thusly recreate the menus -} - -void KBookmarkManager::notifyChanged( TQString groupAddress ) // DCOP call -{ - if (!m_update) return; - - // Reparse (the whole file, no other choice) - // if someone else notified us - if (callingDcopClient()->senderId() != DCOPClient::mainClient()->appId()) - parse(); - - //kdDebug(7043) << "KBookmarkManager::notifyChanged " << groupAddress << endl; - //KBookmarkGroup group = findByAddress( groupAddress ).toGroup(); - //Q_ASSERT(!group.isNull()); - emit changed( groupAddress, TQString::null ); -} - -bool KBookmarkManager::showNSBookmarks() const -{ - return KBookmarkMenu::showDynamicBookmarks("netscape").show; -} - -void KBookmarkManager::setShowNSBookmarks( bool show ) -{ - m_showNSBookmarks = show; - if (this->path() != userBookmarksFile()) - return; - KBookmarkMenu::DynMenuInfo info - = KBookmarkMenu::showDynamicBookmarks("netscape"); - info.show = show; - KBookmarkMenu::setDynamicBookmarks("netscape", info); -} - -void KBookmarkManager::setEditorOptions( const TQString& caption, bool browser ) -{ - dptr()->m_editorCaption = caption; - dptr()->m_browserEditor = browser; -} - -void KBookmarkManager::slotEditBookmarks() -{ - TDEProcess proc; - proc << TQString::fromLatin1("keditbookmarks"); - if (!dptr()->m_editorCaption.isNull()) - proc << TQString::fromLatin1("--customcaption") << dptr()->m_editorCaption; - if (!dptr()->m_browserEditor) - proc << TQString::fromLatin1("--nobrowser"); - proc << m_bookmarksFile; - proc.start(TDEProcess::DontCare); -} - -void KBookmarkManager::slotEditBookmarksAtAddress( const TQString& address ) -{ - TDEProcess proc; - proc << TQString::fromLatin1("keditbookmarks") - << TQString::fromLatin1("--address") << address - << m_bookmarksFile; - proc.start(TDEProcess::DontCare); -} - -/////// - -void KBookmarkOwner::openBookmarkURL( const TQString& url ) -{ - (void) new KRun(KURL( url )); -} - -void KBookmarkOwner::virtual_hook( int, void* ) -{ /*BASE::virtual_hook( id, data );*/ } - -bool KBookmarkManager::updateAccessMetadata( const TQString & url, bool emitSignal ) -{ - if (!s_bk_map) { - s_bk_map = new KBookmarkMap(this); - s_bk_map->update(); - } - - TQValueList list = s_bk_map->find(url); - if ( list.count() == 0 ) - return false; - - for ( TQValueList::iterator it = list.begin(); - it != list.end(); ++it ) - (*it).updateAccessMetadata(); - - if (emitSignal) - emit notifier().updatedAccessMetadata( path(), url ); - - return true; -} - -void KBookmarkManager::updateFavicon( const TQString &url, const TQString &faviconurl, bool emitSignal ) -{ - Q_UNUSED(faviconurl); - - if (!s_bk_map) { - s_bk_map = new KBookmarkMap(this); - s_bk_map->update(); - } - - TQValueList list = s_bk_map->find(url); - for ( TQValueList::iterator it = list.begin(); - it != list.end(); ++it ) - { - // TODO - update favicon data based on faviconurl - // but only when the previously used icon - // isn't a manually set one. - } - - if (emitSignal) - { - // TODO - // emit notifier().updatedFavicon( path(), url, faviconurl ); - } -} - -TQString KBookmarkManager::userBookmarksFile() -{ - return locateLocal("data", TQString::fromLatin1("konqueror/bookmarks.xml")); -} - -KBookmarkManager* KBookmarkManager::userBookmarksManager() -{ - return KBookmarkManager::managerForFile( userBookmarksFile() ); -} - -KBookmarkSettings* KBookmarkSettings::s_self = 0; - -void KBookmarkSettings::readSettings() -{ - TDEConfig config("kbookmarkrc", false, false); - config.setGroup("Bookmarks"); - - // add bookmark dialog usage - no reparse - s_self->m_advancedaddbookmark = config.readBoolEntry("AdvancedAddBookmarkDialog", false); - - // these three alter the menu, therefore all need a reparse - s_self->m_contextmenu = config.readBoolEntry("ContextMenuActions", true); - s_self->m_quickactions = config.readBoolEntry("QuickActionSubmenu", false); - s_self->m_filteredtoolbar = config.readBoolEntry("FilteredToolbar", false); -} - -KBookmarkSettings *KBookmarkSettings::self() -{ - if (!s_self) - { - s_self = new KBookmarkSettings; - readSettings(); - } - return s_self; -} - -#include "kbookmarkmanager.moc" diff --git a/kio/bookmarks/kbookmarkmanager.h b/kio/bookmarks/kbookmarkmanager.h deleted file mode 100644 index 4a129704a..000000000 --- a/kio/bookmarks/kbookmarkmanager.h +++ /dev/null @@ -1,367 +0,0 @@ -// -*- c-basic-offset:4; indent-tabs-mode:nil -*- -// vim: set ts=4 sts=4 sw=4 et: -/* This file is part of the KDE libraries - Copyright (C) 2000 David Faure - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License version 2 as published by the Free Software Foundation. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ -#ifndef __kbookmarkmanager_h -#define __kbookmarkmanager_h - -#include -#include -#include -#include -#include -#include "kbookmark.h" -#include "kbookmarknotifier.h" - -/** - * This class implements the reading/writing of bookmarks in XML. - * The bookmarks file is read and written using the XBEL standard - * (http://pyxml.sourceforge.net/topics/xbel/) - * - * A sample file looks like this : - * \code - * - * Developer Web Site - * - * Title of this folder - * KDE Web Site - * - * My own bookmarks - * KOffice Web Site - * - * KDevelop Web Site - * - * - * - * \endcode - */ -class TDEIO_EXPORT KBookmarkManager : public TQObject, public DCOPObject -{ - Q_OBJECT - K_DCOP -protected: - /** - * Creates a bookmark manager with a path to the bookmarks. By - * default, it will use the KDE standard dirs to find and create the - * correct location. If you are using your own app-specific - * bookmarks directory, you must instantiate this class with your - * own path before KBookmarkManager::managerForFile() is ever - * called. - * - * @param bookmarksFile full path to the bookmarks file, - * Use ~/.trinity/share/apps/konqueror/bookmarks.xml for the konqueror bookmarks - * - * @param bImportDesktopFiles if true, and if the bookmarksFile - * doesn't already exist, import bookmarks from desktop files - */ - KBookmarkManager( const TQString & bookmarksFile, bool bImportDesktopFiles = true ); - - /** - * @since 3.2 - */ - KBookmarkManager(); - -public: - /** - * Destructor - */ - ~KBookmarkManager(); - - /** - * Set the update flag. Defaults to true. TODO - check - * @param update if true then KBookmarkManager will listen to DCOP update requests. - */ - void setUpdate( bool update ); - - /** - * Save the bookmarks to the default konqueror XML file on disk. - * You should use emitChanged() instead of this function, it saves - * and notifies everyone that the file has changed. - * @param toolbarCache iff true save a cache of the toolbar folder, too - * @return true if saving was successful - */ - bool save( bool toolbarCache = true ) const; - - /** - * Save the bookmarks to the given XML file on disk. - * @param filename full path to the desired bookmarks file location - * @param toolbarCache iff true save a cache of the toolbar folder, too - * @return true if saving was successful - */ - bool saveAs( const TQString & filename, bool toolbarCache = true ) const; - - /** - * Update access time stamps for a given url. - * @param url the viewed url - * @param emitSignal iff true emit KBookmarkNotifier signal - * @since 3.2 - * @return true if any metadata was modified (bookmarks file is not saved automatically) - */ - bool updateAccessMetadata( const TQString &url, bool emitSignal = true ); - - /* - * NB. currently *unimplemented* - * - * Update favicon url for a given url. - * @param url the viewed url - * @param faviconurl the favicion url - * @emitSignal iff true emit KBookmarkNotifier signal - * @since 3.3 - */ - void updateFavicon( const TQString &url, const TQString &faviconurl, bool emitSignal = true ); - - /** - * This will return the path that this manager is using to read - * the bookmarks. - * @internal - * @return the path containing the bookmarks - */ - TQString path() { return m_bookmarksFile; } - - /** - * This will return the root bookmark. It is used to iterate - * through the bookmarks manually. It is mostly used internally. - * - * @return the root (top-level) bookmark - */ - KBookmarkGroup root() const; - - /** - * This returns the root of the toolbar menu. - * In the XML, this is the group with the attribute TOOLBAR=1 - * - * @return the toolbar group - */ - KBookmarkGroup toolbar(); - - /** - * @return the bookmark designated by @p address - * @param address the address belonging to the bookmark you're looking for - * @param tolerate when true tries to find the most tolerable bookmark position - * @see KBookmark::address - */ - KBookmark findByAddress( const TQString & address, bool tolerate = false ); - - /** - * Saves the bookmark file and notifies everyone. - * @param group the parent of all changed bookmarks - */ - void emitChanged( KBookmarkGroup & group ); - - void emitConfigChanged(); - - /** - * @return true if the NS bookmarks should be dynamically shown - * in the toplevel kactionmenu - * @deprecated - */ - bool showNSBookmarks() const; - - /** - * Shows an extra menu for NS bookmarks. Set this to false, if you don't - * want this. - */ - void setShowNSBookmarks( bool show ); - - /** - * Set options with which slotEditBookmarks called keditbookmarks - * this can be used to change the appearance of the keditbookmarks - * in order to provide a slightly differing outer shell depending - * on the bookmarks file / app which calls it. - * @param caption the --caption string, for instance "Konsole" - * @param browser iff false display no browser specific - * menu items in keditbookmarks :: --nobrowser - * @since 3.2 - */ - void setEditorOptions( const TQString& caption, bool browser ); - - /** - * This static function will return an instance of the - * KBookmarkManager, responsible for the given @p bookmarksFile. - * If you do not instantiate this class either - * natively or in a derived class, then it will return an object - * with the default behaviors. If you wish to use different - * behaviors, you must derive your own class and - * instantiate it before this method is ever called. - * - * @param bookmarksFile full path to the bookmarks file, - * Use ~/.trinity/share/apps/konqueror/bookmarks.xml for the konqueror bookmarks - * - * @param bImportDesktopFiles if true, and if the bookmarksFile - * doesn't already exist, import bookmarks from desktop files - * @return a pointer to an instance of the KBookmarkManager. - */ - static KBookmarkManager* managerForFile( const TQString& bookmarksFile, - bool bImportDesktopFiles = true ); - - - static KBookmarkManager* createTempManager(); - - /** - * Returns a pointer to the users main bookmark collection. - * @since 3.2 - */ - static KBookmarkManager* userBookmarksManager(); - - /** - * Returns the path to the user's main bookmark collection file. - * @since 3.5.5 - */ - static TQString userBookmarksFile(); - - /** - * @internal - */ - const TQDomDocument & internalDocument() const; - - /** - * Access to bookmark notifier, for emitting signals. - * We need this object to exist in one instance only, so we could - * connectDCOP to it by name. - */ - KBookmarkNotifier& notifier() { return m_notifier; } - - /** - * @since 3.2 - */ - KBookmarkGroup addBookmarkDialog( const TQString & _url, const TQString & _title, - const TQString & _parentBookmarkAddress = TQString::null ); - -public slots: - void slotEditBookmarks(); - void slotEditBookmarksAtAddress( const TQString& address ); - -public: -k_dcop: - /** - * Reparse the whole bookmarks file and notify about the change - * (Called by the bookmark editor) - */ - ASYNC notifyCompleteChange( TQString caller ); - - /** - * Emit the changed signal for the group whose address is given - * @see KBookmark::address() - * Called by the instance of konqueror that saved the file after - * a small change (new bookmark or new folder). - */ - ASYNC notifyChanged( TQString groupAddress ); - - ASYNC notifyConfigChanged(); - -signals: - /** - * Signals that the group (or any of its children) with the address - * @p groupAddress (e.g. "/4/5") - * has been modified by the caller @p caller. - */ - void changed( const TQString & groupAddress, const TQString & caller ); - -protected: - // consts added to avoid a copy-and-paste of internalDocument - void parse() const; - void importDesktopFiles(); - static void convertToXBEL( TQDomElement & group ); - static void convertAttribute( TQDomElement elem, const TQString & oldName, const TQString & newName ); - -private: - KBookmarkNotifier m_notifier; - TQString m_bookmarksFile; - mutable TQDomDocument m_doc; - mutable TQDomDocument m_toolbarDoc; - mutable bool m_docIsLoaded; - bool m_update; - static TQPtrList* s_pSelf; - bool m_showNSBookmarks; - -private: - class KBookmarkManagerPrivate* dptr() const; -}; - -/** - * The KBookmarkMenu and KBookmarkBar classes gives the user - * the ability to either edit bookmarks or add their own. In the - * first case, the app may want to open the bookmark in a special way. - * In the second case, the app must supply the name and the - * URL for the bookmark. - * - * This class gives the app this callback-like ability. - * - * If your app does not give the user the ability to add bookmarks and - * you don't mind using the default bookmark editor to edit your - * bookmarks, then you don't need to overload this class at all. - * Rather, just use something like: - * - * - * bookmarks = new KBookmarkMenu(new KBookmarkOwner(), ...) - * - * - * If you wish to use your own editor or allow the user to add - * bookmarks, you must overload this class. - */ -class TDEIO_EXPORT KBookmarkOwner -{ -public: - /** - * This function is called if the user selects a bookmark. It will - * open up the bookmark in a default fashion unless you override it. - */ - virtual void openBookmarkURL(const TQString& _url); - - /** - * This function is called whenever the user wants to add the - * current page to the bookmarks list. The title will become the - * "name" of the bookmark. You must overload this function if you - * wish to give your users the ability to add bookmarks. - * - * @return the title of the current page. - */ - virtual TQString currentTitle() const { return TQString::null; } - - /** - * This function is called whenever the user wants to add the - * current page to the bookmarks list. The URL will become the URL - * of the bookmark. You must overload this function if you wish to - * give your users the ability to add bookmarks. - * - * @return the URL of the current page. - */ - virtual TQString currentURL() const { return TQString::null; } - -protected: - virtual void virtual_hook( int id, void* data ); -}; - -/** - * @since 3.2 - */ -class TDEIO_EXPORT KExtendedBookmarkOwner : public TQObject, virtual public KBookmarkOwner -{ - Q_OBJECT -public: - typedef TQValueList > QStringPairList; -public slots: - void fillBookmarksList( KExtendedBookmarkOwner::QStringPairList & list ) { emit signalFillBookmarksList( list ); }; -signals: - void signalFillBookmarksList( KExtendedBookmarkOwner::QStringPairList & list ); -private: - class KExtendedBookmarkOwnerPrivate; - KExtendedBookmarkOwnerPrivate *d; -}; - -#endif diff --git a/kio/bookmarks/kbookmarkmenu.cc b/kio/bookmarks/kbookmarkmenu.cc deleted file mode 100644 index 5e85bc1f6..000000000 --- a/kio/bookmarks/kbookmarkmenu.cc +++ /dev/null @@ -1,1187 +0,0 @@ -// -*- c-basic-offset:4; indent-tabs-mode:nil -*- -// vim: set ts=4 sts=4 sw=4 et: -/* This file is part of the KDE project - Copyright (C) 1998, 1999 Torben Weis - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include "kbookmarkmenu.h" -#include "kbookmarkmenu_p.h" -#include "kbookmarkimporter.h" -#include "kbookmarkimporter_opera.h" -#include "kbookmarkimporter_ie.h" -#include "kbookmarkdrag.h" - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -template class TQPtrList; - -static TQString makeTextNodeMod(KBookmark bk, const TQString &m_nodename, const TQString &m_newText) { - TQDomNode subnode = bk.internalElement().namedItem(m_nodename); - if (subnode.isNull()) { - subnode = bk.internalElement().ownerDocument().createElement(m_nodename); - bk.internalElement().appendChild(subnode); - } - - if (subnode.firstChild().isNull()) { - TQDomText domtext = subnode.ownerDocument().createTextNode(""); - subnode.appendChild(domtext); - } - - TQDomText domtext = subnode.firstChild().toText(); - - TQString m_oldText = domtext.data(); - domtext.setData(m_newText); - - return m_oldText; -} - -/********************************************************************/ -/********************************************************************/ -/********************************************************************/ - -KBookmarkMenu::KBookmarkMenu( KBookmarkManager* mgr, - KBookmarkOwner * _owner, KPopupMenu * _parentMenu, - KActionCollection *collec, bool _isRoot, bool _add, - const TQString & parentAddress ) - : TQObject(), - m_bIsRoot(_isRoot), m_bAddBookmark(_add), - m_bAddShortcuts(true), - m_pManager(mgr), m_pOwner(_owner), - m_parentMenu( _parentMenu ), - m_actionCollection( collec ), - m_parentAddress( parentAddress ) -{ - m_parentMenu->setKeyboardShortcutsEnabled( true ); - - m_lstSubMenus.setAutoDelete( true ); - m_actions.setAutoDelete( true ); - - if (m_actionCollection) - { - m_actionCollection->setHighlightingEnabled(true); - disconnect( m_actionCollection, TQT_SIGNAL( actionHighlighted( KAction * ) ), 0, 0 ); - connect( m_actionCollection, TQT_SIGNAL( actionHighlighted( KAction * ) ), - this, TQT_SLOT( slotActionHighlighted( KAction * ) ) ); - } - - m_bNSBookmark = m_parentAddress.isNull(); - if ( !m_bNSBookmark ) // not for the netscape bookmark - { - //kdDebug(7043) << "KBookmarkMenu::KBookmarkMenu " << this << " address : " << m_parentAddress << endl; - - connect( _parentMenu, TQT_SIGNAL( aboutToShow() ), - TQT_SLOT( slotAboutToShow() ) ); - - if ( KBookmarkSettings::self()->m_contextmenu ) - { - (void) _parentMenu->contextMenu(); - connect( _parentMenu, TQT_SIGNAL( aboutToShowContextMenu(KPopupMenu*, int, TQPopupMenu*) ), - this, TQT_SLOT( slotAboutToShowContextMenu(KPopupMenu*, int, TQPopupMenu*) )); - } - - if ( m_bIsRoot ) - { - connect( m_pManager, TQT_SIGNAL( changed(const TQString &, const TQString &) ), - TQT_SLOT( slotBookmarksChanged(const TQString &) ) ); - } - } - - // add entries that possibly have a shortcut, so they are available _before_ first popup - if ( m_bIsRoot ) - { - if ( m_bAddBookmark ) - { - addAddBookmark(); - if ( extOwner() ) - addAddBookmarksList(); // FIXME - } - - addEditBookmarks(); - } - - m_bDirty = true; -} - -KBookmarkMenu::~KBookmarkMenu() -{ - //kdDebug(7043) << "KBookmarkMenu::~KBookmarkMenu() " << this << endl; - TQPtrListIterator it( m_actions ); - for (; it.current(); ++it ) - it.current()->unplugAll(); - - m_lstSubMenus.clear(); - m_actions.clear(); -} - -void KBookmarkMenu::ensureUpToDate() -{ - slotAboutToShow(); -} - -void KBookmarkMenu::slotAboutToShow() -{ - // Did the bookmarks change since the last time we showed them ? - if ( m_bDirty ) - { - m_bDirty = false; - refill(); - } -} - -TQString KBookmarkMenu::s_highlightedAddress; -TQString KBookmarkMenu::s_highlightedImportType; -TQString KBookmarkMenu::s_highlightedImportLocation; - -void KBookmarkMenu::slotActionHighlighted( KAction* action ) -{ - if (action->isA("KBookmarkActionMenu") || action->isA("KBookmarkAction")) - { - s_highlightedAddress = action->property("address").toString(); - //kdDebug() << "KBookmarkMenu::slotActionHighlighted" << s_highlightedAddress << endl; - } - else if (action->isA("KImportedBookmarksActionMenu")) - { - s_highlightedImportType = action->property("type").toString(); - s_highlightedImportLocation = action->property("location").toString(); - } - else - { - s_highlightedAddress = TQString::null; - s_highlightedImportType = TQString::null; - s_highlightedImportLocation = TQString::null; - } -} - -/********************************************************************/ -/********************************************************************/ -/********************************************************************/ - -class KBookmarkMenuRMBAssoc : public dPtrTemplate { }; -template<> TQPtrDict* dPtrTemplate::d_ptr = 0; - -static RMB* rmbSelf(KBookmarkMenu *m) { return KBookmarkMenuRMBAssoc::d(m); } - -// TODO check via dcop before making any changes to the bookmarks file??? - -void RMB::begin_rmb_action(KBookmarkMenu *self) -{ - RMB *s = rmbSelf(self); - s->recv = self; - s->m_parentAddress = self->m_parentAddress; - s->s_highlightedAddress = KBookmarkMenu::s_highlightedAddress; - s->m_pManager = self->m_pManager; - s->m_pOwner = self->m_pOwner; - s->m_parentMenu = self->m_parentMenu; -} - -bool RMB::invalid( int val ) -{ - bool valid = true; - - if (val == 1) - s_highlightedAddress = m_parentAddress; - - if (s_highlightedAddress.isNull()) - valid = false; - - return !valid; -} - -KBookmark RMB::atAddress(const TQString & address) -{ - KBookmark bookmark = m_pManager->findByAddress( address ); - Q_ASSERT(!bookmark.isNull()); - return bookmark; -} - -void KBookmarkMenu::slotAboutToShowContextMenu( KPopupMenu*, int, TQPopupMenu* contextMenu ) -{ - //kdDebug(7043) << "KBookmarkMenu::slotAboutToShowContextMenu" << s_highlightedAddress << endl; - if (s_highlightedAddress.isNull()) - { - KPopupMenu::contextMenuFocus()->hideContextMenu(); - return; - } - contextMenu->clear(); - fillContextMenu( contextMenu, s_highlightedAddress, 0 ); -} - -void RMB::fillContextMenu( TQPopupMenu* contextMenu, const TQString & address, int val ) -{ - KBookmark bookmark = atAddress(address); - - int id; - - // binner: - // "Add Bookmark Here" when pointing at a bookmark looks strange and if you - // call it you have to close and reopen the menu to see an entry was added? - // - // TODO rename these, but, message freeze... umm... - -// if (bookmark.isGroup()) { - id = contextMenu->insertItem( SmallIcon("bookmark_add"), i18n( "Add Bookmark Here" ), recv, TQT_SLOT(slotRMBActionInsert(int)) ); - contextMenu->setItemParameter( id, val ); -/* } - else - { - id = contextMenu->insertItem( SmallIcon("bookmark_add"), i18n( "Add Bookmark Here" ), recv, TQT_SLOT(slotRMBActionInsert(int)) ); - contextMenu->setItemParameter( id, val ); - }*/ -} - -void RMB::fillContextMenu2( TQPopupMenu* contextMenu, const TQString & address, int val ) -{ - KBookmark bookmark = atAddress(address); - - int id; - - if (bookmark.isGroup()) { - id = contextMenu->insertItem( i18n( "Open Folder in Bookmark Editor" ), recv, TQT_SLOT(slotRMBActionEditAt(int)) ); - contextMenu->setItemParameter( id, val ); - contextMenu->insertSeparator(); - id = contextMenu->insertItem( SmallIcon("editdelete"), i18n( "Delete Folder" ), recv, TQT_SLOT(slotRMBActionRemove(int)) ); - contextMenu->setItemParameter( id, val ); - contextMenu->insertSeparator(); - id = contextMenu->insertItem( i18n( "Properties" ), recv, TQT_SLOT(slotRMBActionProperties(int)) ); - contextMenu->setItemParameter( id, val ); - } - else - { - id = contextMenu->insertItem( i18n( "Copy Link Address" ), recv, TQT_SLOT(slotRMBActionCopyLocation(int)) ); - contextMenu->setItemParameter( id, val ); - contextMenu->insertSeparator(); - id = contextMenu->insertItem( SmallIcon("editdelete"), i18n( "Delete Bookmark" ), recv, TQT_SLOT(slotRMBActionRemove(int)) ); - contextMenu->setItemParameter( id, val ); - contextMenu->insertSeparator(); - id = contextMenu->insertItem( i18n( "Properties" ), recv, TQT_SLOT(slotRMBActionProperties(int)) ); - contextMenu->setItemParameter( id, val ); - } -} - -void RMB::slotRMBActionEditAt( int val ) -{ - kdDebug(7043) << "KBookmarkMenu::slotRMBActionEditAt" << s_highlightedAddress << endl; - if (invalid(val)) { hidePopup(); return; } - - KBookmark bookmark = atAddress(s_highlightedAddress); - - m_pManager->slotEditBookmarksAtAddress( s_highlightedAddress ); -} - -void RMB::slotRMBActionProperties( int val ) -{ - kdDebug(7043) << "KBookmarkMenu::slotRMBActionProperties" << s_highlightedAddress << endl; - if (invalid(val)) { hidePopup(); return; } - - KBookmark bookmark = atAddress(s_highlightedAddress); - - TQString folder = bookmark.isGroup() ? TQString::null : bookmark.url().pathOrURL(); - KBookmarkEditDialog dlg( bookmark.fullText(), folder, - m_pManager, KBookmarkEditDialog::ModifyMode, 0, - 0, 0, i18n("Bookmark Properties") ); - if ( dlg.exec() != KDialogBase::Accepted ) - return; - - makeTextNodeMod(bookmark, "title", dlg.finalTitle()); - if ( !dlg.finalUrl().isNull() ) - { - KURL u = KURL::fromPathOrURL(dlg.finalUrl()); - bookmark.internalElement().setAttribute("href", u.url(0, 106)); - } - - kdDebug(7043) << "Requested move to " << dlg.finalAddress() << "!" << endl; - - KBookmarkGroup parentBookmark = atAddress(m_parentAddress).toGroup(); - m_pManager->emitChanged( parentBookmark ); -} - -void RMB::slotRMBActionInsert( int val ) -{ - kdDebug(7043) << "KBookmarkMenu::slotRMBActionInsert" << s_highlightedAddress << endl; - if (invalid(val)) { hidePopup(); return; } - - TQString url = m_pOwner->currentURL(); - if (url.isEmpty()) - { - KMessageBox::error( 0L, i18n("Cannot add bookmark with empty URL.")); - return; - } - TQString title = m_pOwner->currentTitle(); - if (title.isEmpty()) - title = url; - - KBookmark bookmark = atAddress( s_highlightedAddress ); - - // TODO use unique title - - if (bookmark.isGroup()) - { - KBookmarkGroup parentBookmark = bookmark.toGroup(); - Q_ASSERT(!parentBookmark.isNull()); - parentBookmark.addBookmark( m_pManager, title, KURL( url ) ); - m_pManager->emitChanged( parentBookmark ); - } - else - { - KBookmarkGroup parentBookmark = bookmark.parentGroup(); - Q_ASSERT(!parentBookmark.isNull()); - KBookmark newBookmark = parentBookmark.addBookmark( m_pManager, title, KURL( url ) ); - parentBookmark.moveItem( newBookmark, parentBookmark.previous(bookmark) ); - m_pManager->emitChanged( parentBookmark ); - } -} - -void RMB::slotRMBActionRemove( int val ) -{ - //kdDebug(7043) << "KBookmarkMenu::slotRMBActionRemove" << s_highlightedAddress << endl; - if (invalid(val)) { hidePopup(); return; } - - KBookmark bookmark = atAddress( s_highlightedAddress ); - bool folder = bookmark.isGroup(); - - if (KMessageBox::warningContinueCancel( - m_parentMenu, - folder ? i18n("Are you sure you wish to remove the bookmark folder\n\"%1\"?").arg(bookmark.text()) - : i18n("Are you sure you wish to remove the bookmark\n\"%1\"?").arg(bookmark.text()), - folder ? i18n("Bookmark Folder Deletion") - : i18n("Bookmark Deletion"), - KStdGuiItem::del()) - != KMessageBox::Continue - ) - return; - - KBookmarkGroup parentBookmark = atAddress( m_parentAddress ).toGroup(); - parentBookmark.deleteBookmark( bookmark ); - m_pManager->emitChanged( parentBookmark ); - if (m_parentMenu) - m_parentMenu->hide(); -} - -void RMB::slotRMBActionCopyLocation( int val ) -{ - //kdDebug(7043) << "KBookmarkMenu::slotRMBActionCopyLocation" << s_highlightedAddress << endl; - if (invalid(val)) { hidePopup(); return; } - - KBookmark bookmark = atAddress( s_highlightedAddress ); - - if ( !bookmark.isGroup() ) - { - kapp->clipboard()->setData( KBookmarkDrag::newDrag(bookmark, 0), - TQClipboard::Selection ); - kapp->clipboard()->setData( KBookmarkDrag::newDrag(bookmark, 0), - TQClipboard::Clipboard ); - } -} - -void RMB::hidePopup() { - KPopupMenu::contextMenuFocus()->hideContextMenu(); -} - -/********************************************************************/ -/********************************************************************/ -/********************************************************************/ - -void KBookmarkMenu::fillContextMenu( TQPopupMenu* contextMenu, const TQString & address, int val ) -{ - RMB::begin_rmb_action(this); - rmbSelf(this)->fillContextMenu(contextMenu, address, val); - emit aboutToShowContextMenu( rmbSelf(this)->atAddress(address), contextMenu); - rmbSelf(this)->fillContextMenu2(contextMenu, address, val); -} - -void KBookmarkMenu::slotRMBActionEditAt( int val ) -{ RMB::begin_rmb_action(this); rmbSelf(this)->slotRMBActionEditAt( val ); } - -void KBookmarkMenu::slotRMBActionProperties( int val ) -{ RMB::begin_rmb_action(this); rmbSelf(this)->slotRMBActionProperties( val ); } - -void KBookmarkMenu::slotRMBActionInsert( int val ) -{ RMB::begin_rmb_action(this); rmbSelf(this)->slotRMBActionInsert( val ); } - -void KBookmarkMenu::slotRMBActionRemove( int val ) -{ RMB::begin_rmb_action(this); rmbSelf(this)->slotRMBActionRemove( val ); } - -void KBookmarkMenu::slotRMBActionCopyLocation( int val ) -{ RMB::begin_rmb_action(this); rmbSelf(this)->slotRMBActionCopyLocation( val ); } - -void KBookmarkMenu::slotBookmarksChanged( const TQString & groupAddress ) -{ - if (m_bNSBookmark) - return; - - if ( groupAddress == m_parentAddress ) - { - //kdDebug(7043) << "KBookmarkMenu::slotBookmarksChanged -> setting m_bDirty on " << groupAddress << endl; - m_bDirty = true; - } - else - { - // Iterate recursively into child menus - TQPtrListIterator it( m_lstSubMenus ); - for (; it.current(); ++it ) - { - it.current()->slotBookmarksChanged( groupAddress ); - } - } -} - -void KBookmarkMenu::refill() -{ - //kdDebug(7043) << "KBookmarkMenu::refill()" << endl; - m_lstSubMenus.clear(); - - TQPtrListIterator it( m_actions ); - for (; it.current(); ++it ) - it.current()->unplug( m_parentMenu ); - - m_parentMenu->clear(); - m_actions.clear(); - - fillBookmarkMenu(); - m_parentMenu->adjustSize(); -} - -void KBookmarkMenu::addAddBookmarksList() -{ - if (!kapp->authorizeKAction("bookmarks")) - return; - - TQString title = i18n( "Bookmark Tabs as Folder..." ); - - KAction * paAddBookmarksList = new KAction( title, - "bookmarks_list_add", - 0, - this, - TQT_SLOT( slotAddBookmarksList() ), - m_actionCollection, m_bIsRoot ? "add_bookmarks_list" : 0 ); - - paAddBookmarksList->setToolTip( i18n( "Add a folder of bookmarks for all open tabs." ) ); - - paAddBookmarksList->plug( m_parentMenu ); - m_actions.append( paAddBookmarksList ); -} - -void KBookmarkMenu::addAddBookmark() -{ - if (!kapp->authorizeKAction("bookmarks")) - return; - - TQString title = i18n( "Add Bookmark" ); - - KAction * paAddBookmarks = new KAction( title, - "bookmark_add", - m_bIsRoot && m_bAddShortcuts ? KStdAccel::addBookmark() : KShortcut(), - this, - TQT_SLOT( slotAddBookmark() ), - m_actionCollection, m_bIsRoot ? "add_bookmark" : 0 ); - - paAddBookmarks->setToolTip( i18n( "Add a bookmark for the current document" ) ); - - paAddBookmarks->plug( m_parentMenu ); - m_actions.append( paAddBookmarks ); -} - -void KBookmarkMenu::addEditBookmarks() -{ - if (!kapp->authorizeKAction("bookmarks")) - return; - - KAction * m_paEditBookmarks = KStdAction::editBookmarks( m_pManager, TQT_SLOT( slotEditBookmarks() ), - m_actionCollection, "edit_bookmarks" ); - m_paEditBookmarks->plug( m_parentMenu ); - m_paEditBookmarks->setToolTip( i18n( "Edit your bookmark collection in a separate window" ) ); - m_actions.append( m_paEditBookmarks ); -} - -void KBookmarkMenu::addNewFolder() -{ - if (!kapp->authorizeKAction("bookmarks")) - return; - - TQString title = i18n( "&New Bookmark Folder..." ); - int p; - while ( ( p = title.find( '&' ) ) >= 0 ) - title.remove( p, 1 ); - - KAction * paNewFolder = new KAction( title, - "folder_new", //"folder", - 0, - this, - TQT_SLOT( slotNewFolder() ), - m_actionCollection ); - - paNewFolder->setToolTip( i18n( "Create a new bookmark folder in this menu" ) ); - - paNewFolder->plug( m_parentMenu ); - m_actions.append( paNewFolder ); -} - -void KBookmarkMenu::fillBookmarkMenu() -{ - if (!kapp->authorizeKAction("bookmarks")) - return; - - if ( m_bIsRoot ) - { - if ( m_bAddBookmark ) - { - addAddBookmark(); - if ( extOwner() ) - addAddBookmarksList(); // FIXME - } - - addEditBookmarks(); - - if ( m_bAddBookmark && !KBookmarkSettings::self()->m_advancedaddbookmark ) - addNewFolder(); - } - - if ( m_bIsRoot - && KBookmarkManager::userBookmarksFile() == m_pManager->path() ) - { - bool haveSep = false; - - TQValueList keys = KBookmarkMenu::dynamicBookmarksList(); - TQValueList::const_iterator it; - for ( it = keys.begin(); it != keys.end(); ++it ) - { - DynMenuInfo info; - info = showDynamicBookmarks((*it)); - - if ( !info.show || !TQFile::exists( info.location ) ) - continue; - - if (!haveSep) - { - m_parentMenu->insertSeparator(); - haveSep = true; - } - - KActionMenu * actionMenu; - actionMenu = new KImportedBookmarksActionMenu( - info.name, info.type, - m_actionCollection, "kbookmarkmenu" ); - - actionMenu->setProperty( "type", info.type ); - actionMenu->setProperty( "location", info.location ); - - actionMenu->plug( m_parentMenu ); - m_actions.append( actionMenu ); - - KBookmarkMenu *subMenu = - new KBookmarkMenu( m_pManager, m_pOwner, actionMenu->popupMenu(), - m_actionCollection, false, - m_bAddBookmark, TQString::null ); - connect( subMenu, TQT_SIGNAL( openBookmark( const TQString &, TQt::ButtonState ) ), - this, TQT_SIGNAL( openBookmark( const TQString &, TQt::ButtonState ) )); - m_lstSubMenus.append(subMenu); - - connect(actionMenu->popupMenu(), TQT_SIGNAL(aboutToShow()), subMenu, TQT_SLOT(slotNSLoad())); - } - } - - KBookmarkGroup parentBookmark = m_pManager->findByAddress( m_parentAddress ).toGroup(); - Q_ASSERT(!parentBookmark.isNull()); - bool separatorInserted = false; - for ( KBookmark bm = parentBookmark.first(); !bm.isNull(); bm = parentBookmark.next(bm) ) - { - TQString text = KStringHandler::csqueeze(bm.fullText(), 60); - text.replace( '&', "&&" ); - if ( !separatorInserted && m_bIsRoot) { - // inserted before the first konq bookmark, to avoid the separator if no konq bookmark - m_parentMenu->insertSeparator(); - separatorInserted = true; - } - if ( !bm.isGroup() ) - { - if ( bm.isSeparator() ) - { - m_parentMenu->insertSeparator(); - } - else - { - //kdDebug(7043) << "Creating URL bookmark menu item for " << bm.text() << endl; - KAction * action = new KBookmarkAction( text, bm.icon(), 0, m_actionCollection, 0 ); - connect(action, TQT_SIGNAL( activated ( KAction::ActivationReason, TQt::ButtonState )), - this, TQT_SLOT( slotBookmarkSelected( KAction::ActivationReason, TQt::ButtonState ) )); - - action->setProperty( "url", bm.url().url() ); - action->setProperty( "address", bm.address() ); - - action->setToolTip( bm.url().pathOrURL() ); - - action->plug( m_parentMenu ); - m_actions.append( action ); - } - } - else - { - //kdDebug(7043) << "Creating bookmark submenu named " << bm.text() << endl; - KActionMenu * actionMenu = new KBookmarkActionMenu( text, bm.icon(), - m_actionCollection, - "kbookmarkmenu" ); - actionMenu->setProperty( "address", bm.address() ); - actionMenu->plug( m_parentMenu ); - m_actions.append( actionMenu ); - - KBookmarkMenu *subMenu = new KBookmarkMenu( m_pManager, m_pOwner, actionMenu->popupMenu(), - m_actionCollection, false, - m_bAddBookmark, - bm.address() ); - - connect(subMenu, TQT_SIGNAL( aboutToShowContextMenu( const KBookmark &, TQPopupMenu * ) ), - this, TQT_SIGNAL( aboutToShowContextMenu( const KBookmark &, TQPopupMenu * ) )); - connect(subMenu, TQT_SIGNAL( openBookmark( const TQString &, TQt::ButtonState ) ), - this, TQT_SIGNAL( openBookmark( const TQString &, TQt::ButtonState ) )); - m_lstSubMenus.append( subMenu ); - } - } - - if ( !m_bIsRoot && m_bAddBookmark ) - { - if ( m_parentMenu->count() > 0 ) - m_parentMenu->insertSeparator(); - - if ( KBookmarkSettings::self()->m_quickactions ) - { - KActionMenu * actionMenu = new KActionMenu( i18n("Quick Actions"), m_actionCollection, 0L ); - fillContextMenu( actionMenu->popupMenu(), m_parentAddress, 1 ); - actionMenu->plug( m_parentMenu ); - m_actions.append( actionMenu ); - } - else - { - addAddBookmark(); - if ( extOwner() ) - addAddBookmarksList(); // FIXME - addNewFolder(); - } - } -} - -void KBookmarkMenu::slotAddBookmarksList() -{ - KExtendedBookmarkOwner *extOwner = dynamic_cast(m_pOwner); - if (!extOwner) - { - kdWarning() << "erm, sorry ;-)" << endl; - return; - } - - KExtendedBookmarkOwner::QStringPairList list; - extOwner->fillBookmarksList( list ); - - KBookmarkGroup parentBookmark = m_pManager->findByAddress( m_parentAddress ).toGroup(); - Q_ASSERT(!parentBookmark.isNull()); - KBookmarkGroup group = parentBookmark.createNewFolder( m_pManager ); - if ( group.isNull() ) - return; // user canceled i guess - - KExtendedBookmarkOwner::QStringPairList::const_iterator it; - for ( it = list.begin(); it != list.end(); ++it ) - group.addBookmark( m_pManager, (*it).first, KURL((*it).second) ); - - m_pManager->emitChanged( parentBookmark ); -} - - -void KBookmarkMenu::slotAddBookmark() -{ - KBookmarkGroup parentBookmark; - parentBookmark = m_pManager->addBookmarkDialog(m_pOwner->currentURL(), m_pOwner->currentTitle(), m_parentAddress); - if (!parentBookmark.isNull()) - m_pManager->emitChanged( parentBookmark ); -} - -void KBookmarkMenu::slotNewFolder() -{ - if ( !m_pOwner ) return; // this view doesn't handle bookmarks... - KBookmarkGroup parentBookmark = m_pManager->findByAddress( m_parentAddress ).toGroup(); - Q_ASSERT(!parentBookmark.isNull()); - KBookmarkGroup group = parentBookmark.createNewFolder( m_pManager ); - if ( !group.isNull() ) - { - KBookmarkGroup parentGroup = group.parentGroup(); - m_pManager->emitChanged( parentGroup ); - } -} - -void KBookmarkMenu::slotBookmarkSelected( KAction::ActivationReason /*reason*/, TQt::ButtonState state ) -{ - kdDebug(7043) << "KBookmarkMenu::slotBookmarkSelected()" << endl; - if ( !m_pOwner ) return; // this view doesn't handle bookmarks... - const KAction* action = dynamic_cast(sender()); - if(action) - { - const TQString& url = sender()->property("url").toString(); - m_pOwner->openBookmarkURL( url ); - emit openBookmark( url, state ); - } -} - -void KBookmarkMenu::slotBookmarkSelected() -{ - slotBookmarkSelected(KAction::PopupMenuActivation, Qt::NoButton); -} - -KExtendedBookmarkOwner* KBookmarkMenu::extOwner() -{ - return dynamic_cast(m_pOwner); -} - -void KBookmarkMenu::slotNSLoad() -{ - // only fill menu once - m_parentMenu->disconnect(TQT_SIGNAL(aboutToShow())); - - // not NSImporter, but kept old name for BC reasons - KBookmarkMenuNSImporter importer( m_pManager, this, m_actionCollection ); - importer.openBookmarks(s_highlightedImportLocation, s_highlightedImportType); -} - -/********************************************************************/ -/********************************************************************/ -/********************************************************************/ - -KBookmarkEditFields::KBookmarkEditFields(TQWidget *main, TQBoxLayout *vbox, FieldsSet fieldsSet) -{ - bool isF = (fieldsSet != FolderFieldsSet); - - TQGridLayout *grid = new TQGridLayout( vbox, 2, isF ? 2 : 1 ); - - m_title = new KLineEdit( main ); - grid->addWidget( m_title, 0, 1 ); - grid->addWidget( new TQLabel( m_title, i18n( "Name:" ), main ), 0, 0 ); - m_title->setFocus(); - if (isF) - { - m_url = new KLineEdit( main ); - grid->addWidget( m_url, 1, 1 ); - grid->addWidget( new TQLabel( m_url, i18n( "Location:" ), main ), 1, 0 ); - } - else - { - m_url = 0; - } - - main->setMinimumSize( 300, 0 ); -} - -void KBookmarkEditFields::setName(const TQString &str) -{ - m_title->setText(str); -} - -void KBookmarkEditFields::setLocation(const TQString &str) -{ - m_url->setText(str); -} - -/********************************************************************/ -/********************************************************************/ -/********************************************************************/ - -// TODO - make the dialog use Properties as a title when in Modify mode... (dirk noticed the bug...) -KBookmarkEditDialog::KBookmarkEditDialog(const TQString& title, const TQString& url, KBookmarkManager * mgr, BookmarkEditType editType, const TQString& address, - TQWidget * parent, const char * name, const TQString& caption ) - : KDialogBase(parent, name, true, caption, - (editType == InsertionMode) ? (User1|Ok|Cancel) : (Ok|Cancel), - Ok, false, KGuiItem()), - m_folderTree(0), m_mgr(mgr), m_editType(editType), m_address(address) -{ - setButtonOK( (editType == InsertionMode) ? KGuiItem( i18n( "&Add" ), "bookmark_add") : i18n( "&Update" ) ); - if (editType == InsertionMode) { - setButtonGuiItem( User1, KGuiItem( i18n( "&New Folder..." ), "folder_new") ); - } - - bool folder = url.isNull(); - - m_main = new TQWidget( this ); - setMainWidget( m_main ); - - TQBoxLayout *vbox = new TQVBoxLayout( m_main, 0, spacingHint() ); - KBookmarkEditFields::FieldsSet fs = - folder ? KBookmarkEditFields::FolderFieldsSet - : KBookmarkEditFields::BookmarkFieldsSet; - m_fields = new KBookmarkEditFields(m_main, vbox, fs); - m_fields->setName(title); - if ( !folder ) - m_fields->setLocation(url); - - if ( editType == InsertionMode ) - { - m_folderTree = KBookmarkFolderTree::createTree( m_mgr, m_main, name, m_address ); - connect( m_folderTree, TQT_SIGNAL( doubleClicked(TQListViewItem*) ), - this, TQT_SLOT( slotDoubleClicked(TQListViewItem*) ) ); - vbox->addWidget( m_folderTree ); - connect( this, TQT_SIGNAL( user1Clicked() ), TQT_SLOT( slotUser1() ) ); - } -} - -void KBookmarkEditDialog::slotDoubleClicked( TQListViewItem* item ) -{ - Q_ASSERT( m_folderTree ); - m_folderTree->setCurrentItem( item ); - accept(); -} - -void KBookmarkEditDialog::slotOk() -{ - accept(); -} - -void KBookmarkEditDialog::slotCancel() -{ - reject(); -} - -TQString KBookmarkEditDialog::finalAddress() const -{ - Q_ASSERT( m_folderTree ); - return KBookmarkFolderTree::selectedAddress( m_folderTree ); -} - -TQString KBookmarkEditDialog::finalUrl() const -{ - return m_fields->m_url ? m_fields->m_url->text() : TQString::null; -} - -TQString KBookmarkEditDialog::finalTitle() const -{ - return m_fields->m_title ? m_fields->m_title->text() : TQString::null; -} - -void KBookmarkEditDialog::slotUser1() -{ - // kdDebug(7043) << "KBookmarkEditDialog::slotUser1" << endl; - Q_ASSERT( m_folderTree ); - - TQString address = KBookmarkFolderTree::selectedAddress( m_folderTree ); - if ( address.isNull() ) return; - KBookmarkGroup bm = m_mgr->findByAddress( address ).toGroup(); - Q_ASSERT(!bm.isNull()); - Q_ASSERT(m_editType == InsertionMode); - - KBookmarkGroup group = bm.createNewFolder( m_mgr ); - if ( !group.isNull() ) - { - KBookmarkGroup parentGroup = group.parentGroup(); - m_mgr->emitChanged( parentGroup ); - } - KBookmarkFolderTree::fillTree( m_folderTree, m_mgr ); -} - -/********************************************************************/ -/********************************************************************/ -/********************************************************************/ - -static void fillGroup( TQListView* listview, KBookmarkFolderTreeItem * parentItem, KBookmarkGroup group, bool expandOpenGroups = true, const TQString& address = TQString::null ) -{ - bool noSubGroups = true; - KBookmarkFolderTreeItem * lastItem = 0L; - KBookmarkFolderTreeItem * item = 0L; - for ( KBookmark bk = group.first() ; !bk.isNull() ; bk = group.next(bk) ) - { - if ( bk.isGroup() ) - { - KBookmarkGroup grp = bk.toGroup(); - item = new KBookmarkFolderTreeItem( parentItem, lastItem, grp ); - fillGroup( listview, item, grp, expandOpenGroups, address ); - if ( expandOpenGroups && grp.isOpen() ) - item->setOpen( true ); - lastItem = item; - noSubGroups = false; - } - if (bk.address() == address) { - listview->setCurrentItem( lastItem ); - listview->ensureItemVisible( item ); - } - } - if ( noSubGroups ) { - parentItem->setOpen( true ); - } -} - -TQListView* KBookmarkFolderTree::createTree( KBookmarkManager* mgr, TQWidget* parent, const char* name, const TQString& address ) -{ - TQListView *listview = new TQListView( parent, name ); - - listview->setRootIsDecorated( false ); - listview->header()->hide(); - listview->addColumn( i18n("Bookmark"), 200 ); - listview->setSorting( -1, false ); - listview->setSelectionMode( TQListView::Single ); - listview->setAllColumnsShowFocus( true ); - listview->setResizeMode( TQListView::AllColumns ); - listview->setMinimumSize( 60, 100 ); - - fillTree( listview, mgr, address ); - - return listview; -} - -void KBookmarkFolderTree::fillTree( TQListView *listview, KBookmarkManager* mgr, const TQString& address ) -{ - listview->clear(); - - KBookmarkGroup root = mgr->root(); - KBookmarkFolderTreeItem * rootItem = new KBookmarkFolderTreeItem( listview, root ); - listview->setCurrentItem( rootItem ); - rootItem->setSelected( true ); - fillGroup( listview, rootItem, root, (address == root.groupAddress() || address.isNull()) ? true : false, address ); - rootItem->setOpen( true ); -} - -static KBookmarkFolderTreeItem* ft_cast( TQListViewItem *i ) -{ - return static_cast( i ); -} - -TQString KBookmarkFolderTree::selectedAddress( TQListView *listview ) -{ - if ( !listview) - return TQString::null; - KBookmarkFolderTreeItem *item = ft_cast( listview->currentItem() ); - return item ? item->m_bookmark.address() : TQString::null; -} - -void KBookmarkFolderTree::setAddress( TQListView *listview, const TQString & address ) -{ - KBookmarkFolderTreeItem* it = ft_cast( listview->firstChild() ); - while ( true ) { - kdDebug(7043) << it->m_bookmark.address() << endl; - it = ft_cast( it->itemBelow() ); - if ( !it ) - return; - if ( it->m_bookmark.address() == address ) - break; - } - it->setSelected( true ); - listview->setCurrentItem( it ); -} - -/********************************************************************/ -/********************************************************************/ -/********************************************************************/ - -// toplevel item -KBookmarkFolderTreeItem::KBookmarkFolderTreeItem( TQListView *parent, const KBookmark & gp ) - : TQListViewItem(parent, i18n("Bookmarks")), m_bookmark(gp) -{ - setPixmap(0, SmallIcon("bookmark")); - setExpandable(true); -} - -// group -KBookmarkFolderTreeItem::KBookmarkFolderTreeItem( KBookmarkFolderTreeItem *parent, TQListViewItem *after, const KBookmarkGroup & gp ) - : TQListViewItem(parent, after, gp.fullText()), m_bookmark(gp) -{ - setPixmap(0, SmallIcon( gp.icon() ) ); - setExpandable(true); -} - -/********************************************************************/ -/********************************************************************/ -/********************************************************************/ - -// NOTE - KBookmarkMenuNSImporter is really === KBookmarkMenuImporter -// i.e, it is _not_ ns specific. and in KDE4 it should be renamed. - -void KBookmarkMenuNSImporter::openNSBookmarks() -{ - openBookmarks( KNSBookmarkImporter::netscapeBookmarksFile(), "netscape" ); -} - -void KBookmarkMenuNSImporter::openBookmarks( const TQString &location, const TQString &type ) -{ - mstack.push(m_menu); - - KBookmarkImporterBase *importer = KBookmarkImporterBase::factory(type); - if (!importer) - return; - importer->setFilename(location); - connectToImporter(*importer); - importer->parse(); - - delete importer; -} - -void KBookmarkMenuNSImporter::connectToImporter(const TQObject &importer) -{ - connect( &importer, TQT_SIGNAL( newBookmark( const TQString &, const TQCString &, const TQString & ) ), - TQT_SLOT( newBookmark( const TQString &, const TQCString &, const TQString & ) ) ); - connect( &importer, TQT_SIGNAL( newFolder( const TQString &, bool, const TQString & ) ), - TQT_SLOT( newFolder( const TQString &, bool, const TQString & ) ) ); - connect( &importer, TQT_SIGNAL( newSeparator() ), TQT_SLOT( newSeparator() ) ); - connect( &importer, TQT_SIGNAL( endFolder() ), TQT_SLOT( endFolder() ) ); -} - -void KBookmarkMenuNSImporter::newBookmark( const TQString & text, const TQCString & url, const TQString & ) -{ - TQString _text = KStringHandler::csqueeze(text); - _text.replace( '&', "&&" ); - KAction * action = new KBookmarkAction(_text, "html", 0, 0, "", m_actionCollection, 0); - connect(action, TQT_SIGNAL( activated ( KAction::ActivationReason, TQt::ButtonState )), - m_menu, TQT_SLOT( slotBookmarkSelected( KAction::ActivationReason, TQt::ButtonState ) )); - action->setProperty( "url", url ); - action->setToolTip( url ); - action->plug( mstack.top()->m_parentMenu ); - mstack.top()->m_actions.append( action ); -} - -void KBookmarkMenuNSImporter::newFolder( const TQString & text, bool, const TQString & ) -{ - TQString _text = KStringHandler::csqueeze(text); - _text.replace( '&', "&&" ); - KActionMenu * actionMenu = new KActionMenu( _text, "folder", m_actionCollection, 0L ); - actionMenu->plug( mstack.top()->m_parentMenu ); - mstack.top()->m_actions.append( actionMenu ); - KBookmarkMenu *subMenu = new KBookmarkMenu( m_pManager, m_menu->m_pOwner, actionMenu->popupMenu(), - m_actionCollection, false, - m_menu->m_bAddBookmark, TQString::null ); - connect( subMenu, TQT_SIGNAL( openBookmark( const TQString &, TQt::ButtonState ) ), - m_menu, TQT_SIGNAL( openBookmark( const TQString &, TQt::ButtonState ) )); - mstack.top()->m_lstSubMenus.append( subMenu ); - - mstack.push(subMenu); -} - -void KBookmarkMenuNSImporter::newSeparator() -{ - mstack.top()->m_parentMenu->insertSeparator(); -} - -void KBookmarkMenuNSImporter::endFolder() -{ - mstack.pop(); -} - -/********************************************************************/ -/********************************************************************/ -/********************************************************************/ - -KBookmarkMenu::DynMenuInfo KBookmarkMenu::showDynamicBookmarks( const TQString &id ) -{ - TDEConfig config("kbookmarkrc", false, false); - config.setGroup("Bookmarks"); - - DynMenuInfo info; - info.show = false; - - if (!config.hasKey("DynamicMenus")) { - // upgrade path - if (id == "netscape") { - KBookmarkManager *manager = KBookmarkManager::userBookmarksManager(); - info.show = manager->root().internalElement().attribute("hide_nsbk") != "yes"; - info.location = KNSBookmarkImporter::netscapeBookmarksFile(); - info.type = "netscape"; - info.name = i18n("Netscape Bookmarks"); - } // else, no show - - } else { - // have new version config - if (config.hasGroup("DynamicMenu-" + id)) { - config.setGroup("DynamicMenu-" + id); - info.show = config.readBoolEntry("Show"); - info.location = config.readPathEntry("Location"); - info.type = config.readEntry("Type"); - info.name = config.readEntry("Name"); - } // else, no show - } - - return info; -} - -TQStringList KBookmarkMenu::dynamicBookmarksList() -{ - TDEConfig config("kbookmarkrc", false, false); - config.setGroup("Bookmarks"); - - TQStringList mlist; - if (config.hasKey("DynamicMenus")) - mlist = config.readListEntry("DynamicMenus"); - else - mlist << "netscape"; - - return mlist; -} - -void KBookmarkMenu::setDynamicBookmarks(const TQString &id, const DynMenuInfo &newMenu) -{ - TDEConfig config("kbookmarkrc", false, false); - - // add group unconditionally - config.setGroup("DynamicMenu-" + id); - config.writeEntry("Show", newMenu.show); - config.writePathEntry("Location", newMenu.location); - config.writeEntry("Type", newMenu.type); - config.writeEntry("Name", newMenu.name); - - TQStringList elist; - - config.setGroup("Bookmarks"); - if (!config.hasKey("DynamicMenus")) { - if (newMenu.type != "netscape") { - // update from old xbel method to new rc method - // though only if not writing the netscape setting - config.setGroup("DynamicMenu-" "netscape"); - DynMenuInfo xbelSetting; - xbelSetting = showDynamicBookmarks("netscape"); - config.writeEntry("Show", xbelSetting.show); - config.writePathEntry("Location", xbelSetting.location); - config.writeEntry("Type", xbelSetting.type); - config.writeEntry("Name", xbelSetting.name); - } - } else { - elist = config.readListEntry("DynamicMenus"); - } - - // make sure list includes type - config.setGroup("Bookmarks"); - if (elist.contains(id) < 1) { - elist << id; - config.writeEntry("DynamicMenus", elist); - } - - config.sync(); -} - -#include "kbookmarkmenu.moc" -#include "kbookmarkmenu_p.moc" diff --git a/kio/bookmarks/kbookmarkmenu.h b/kio/bookmarks/kbookmarkmenu.h deleted file mode 100644 index 35e6191e3..000000000 --- a/kio/bookmarks/kbookmarkmenu.h +++ /dev/null @@ -1,265 +0,0 @@ -// -*- c-basic-offset:4; indent-tabs-mode:nil -*- -// vim: set ts=4 sts=4 sw=4 et: -/* This file is part of the KDE project - Copyright (C) 1998, 1999 Torben Weis - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef __kbookmarkmenu_h__ -#define __kbookmarkmenu_h__ - -#include - -#include -#include -#include -#include - -#include -#include -#include - -#include "kbookmark.h" -#include "kbookmarkmanager.h" - -class TQString; -class TQPopupMenu; -class TQPushButton; -class TQListView; -class KLineEdit; -class KBookmark; -class KBookmarkGroup; -class KAction; -class KActionMenu; -class KActionCollection; -class KBookmarkOwner; -class KBookmarkMenu; -class KPopupMenu; - -namespace TDEIO { class Job; } - -/** - * This class provides a bookmark menu. It is typically used in - * cooperation with KActionMenu but doesn't have to be. - * - * If you use this class by itself, then it will use KDE defaults for - * everything -- the bookmark path, bookmark editor, bookmark launcher.. - * everything. These defaults reside in the classes - * KBookmarkOwner (editing bookmarks) and KBookmarkManager - * (almost everything else). If you wish to change the defaults in - * any way, you must reimplement and instantiate those classes - * before this class is ever called. - * - * Using this class is very simple: - * - * 1) Create a popup menu (either KActionMenu or KPopupMenu will do) - * 2) Instantiate a new KBookmarkMenu object using the above popup - * menu as a parameter - * 3) Insert your (now full) popup menu wherever you wish - * - * Again, if you wish to modify any defaults, the procedure is: - * - * 1a) Reimplement your own KBookmarkOwner - * 1b) Reimplement and instantiate your own KBookmarkManager - */ -class TDEIO_EXPORT KBookmarkMenu : public TQObject -{ - Q_OBJECT - friend class KBookmarkMenuNSImporter; - friend class RMB; -public: - /** - * Fills a bookmark menu - * (one instance of KBookmarkMenu is created for the toplevel menu, - * but also one per submenu). - * - * @param mgr The bookmark manager to use (i.e. for reading and writing) - * @param owner implementation of the KBookmarkOwner callback interface. - * @param parentMenu menu to be filled - * @param collec parent collection for the KActions. - * Only used for other menus than the toplevel one. - * @param root true for the toplevel menu - * @param add true to show the "Add Bookmark" and "New Folder" entries - * @param parentAddress the address of the group containing the items - * that we want to show. - * @see KBookmark::address. - * Be careful : - * A _null_ parentAddress denotes a NS-bookmark menu. - * An _empty_ parentAddress denotes the toplevel bookmark menu - */ - KBookmarkMenu( KBookmarkManager* mgr, - KBookmarkOwner * owner, KPopupMenu * parentMenu, - KActionCollection * collec, bool root, bool add = true, - const TQString & parentAddress = "" ); - - ~KBookmarkMenu(); - - /** - * Even if you think you need to use this, you are probably wrong. - * It fills a bookmark menu starting a given KBookmark. - * This is public for KBookmarkBar. - */ - void fillBookmarkMenu(); - - /** - * Call ensureUpToDate() if you need KBookmarkMenu to adjust to its - * final size before it is executed. - **/ - void ensureUpToDate(); - - /** - * Structure used for storing information about - * the dynamic menu setting - * @since 3.2 - */ - // TODO - transform into class - struct DynMenuInfo { - bool show; - TQString location; - TQString type; - TQString name; - class DynMenuInfoPrivate *d; - }; - - /** - * @return dynmenu info block for the given dynmenu name - * @since 3.2 - */ - static DynMenuInfo showDynamicBookmarks( const TQString &id ); - - /** - * Shows an extra menu for the given bookmarks file and type. - * Upgrades from option inside XBEL to option in rc file - * on first call of this function. - * @param id the unique identification for the dynamic menu - * @param info a DynMenuInfo struct containing the to be added/modified data - * @since 3.2 - */ - static void setDynamicBookmarks( const TQString &id, const DynMenuInfo &info ); - - /** - * @return list of dynamic menu ids - * @since 3.2 - */ - static TQStringList dynamicBookmarksList(); - -signals: - void aboutToShowContextMenu( const KBookmark &, TQPopupMenu * ); - /** - * @since 3.4 - */ - void openBookmark( const TQString& url, TQt::ButtonState state ); - -public slots: // public for bookmark bar - void slotBookmarksChanged( const TQString & ); - -protected slots: - void slotAboutToShow(); - void slotAboutToShowContextMenu( KPopupMenu *, int, TQPopupMenu * ); - void slotActionHighlighted( KAction * ); - - void slotRMBActionRemove( int ); - void slotRMBActionInsert( int ); - void slotRMBActionCopyLocation( int ); - void slotRMBActionEditAt( int ); - void slotRMBActionProperties( int ); - - void slotBookmarkSelected(); - /** - * @ since 3.4 - */ - void slotBookmarkSelected( KAction::ActivationReason reason, TQt::ButtonState state ); - void slotAddBookmarksList(); - void slotAddBookmark(); - void slotNewFolder(); - - /** - * load Netscape's bookmarks - */ - void slotNSLoad(); - -protected: - KExtendedBookmarkOwner* extOwner(); - void refill(); - void addAddBookmark(); - void addAddBookmarksList(); - void addEditBookmarks(); - void addNewFolder(); - - void fillContextMenu( TQPopupMenu *, const TQString &, int ); - - bool m_bIsRoot:1; - bool m_bAddBookmark:1; - bool m_bDirty:1; - bool m_bNSBookmark:1; - bool m_bAddShortcuts:1; - - KBookmarkManager * m_pManager; - KBookmarkOwner *m_pOwner; - /** - * The menu in which we plug our actions. - * Supplied in the constructor. - */ - KPopupMenu * m_parentMenu; - /** - * List of our sub menus - */ - TQPtrList m_lstSubMenus; - KActionCollection * m_actionCollection; - /** - * List of our actions. - */ - TQPtrList m_actions; - /** - * Parent bookmark for this menu. - */ - TQString m_parentAddress; - - // TODO make non static! - static TQString s_highlightedAddress; - static TQString s_highlightedImportLocation; - static TQString s_highlightedImportType; -}; - -/** - * A class connected to KNSBookmarkImporter, to fill KActionMenus. - */ -class TDEIO_EXPORT KBookmarkMenuNSImporter : public TQObject -{ - Q_OBJECT -public: - KBookmarkMenuNSImporter( KBookmarkManager* mgr, KBookmarkMenu * menu, KActionCollection * act ) : - m_menu(menu), m_actionCollection(act), m_pManager(mgr) {} - - void openNSBookmarks(); - void openBookmarks( const TQString &location, const TQString &type ); - void connectToImporter( const TQObject &importer ); - -protected slots: - void newBookmark( const TQString & text, const TQCString & url, const TQString & ); - void newFolder( const TQString & text, bool, const TQString & ); - void newSeparator(); - void endFolder(); - -protected: - TQPtrStack mstack; - KBookmarkMenu * m_menu; - KActionCollection * m_actionCollection; - KBookmarkManager* m_pManager; -}; - -#endif diff --git a/kio/bookmarks/kbookmarkmenu_p.h b/kio/bookmarks/kbookmarkmenu_p.h deleted file mode 100644 index cb88607fe..000000000 --- a/kio/bookmarks/kbookmarkmenu_p.h +++ /dev/null @@ -1,224 +0,0 @@ -// -*- c-basic-offset:4; indent-tabs-mode:nil -*- -// vim: set ts=4 sts=4 sw=4 et: -/* This file is part of the KDE project - Copyright (C) 2003 Alexander Kellett - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef __kbookmarkmenu_p_h__ -#define __kbookmarkmenu_p_h__ - -#include - -#include -#include -#include -#include - -#include -#include -#include - -#include "kbookmark.h" -#include "kbookmarkimporter.h" -#include "kbookmarkmanager.h" - -class TQString; -class TQPopupMenu; -class TQPushButton; -class TQListView; -class KLineEdit; -class KBookmark; -class KBookmarkGroup; -class KAction; -class KActionMenu; -class KActionCollection; -class KBookmarkOwner; -class KBookmarkMenu; -class KBookmarkBar; -class KPopupMenu; - -class KImportedBookmarksActionMenu : public KActionMenu { - Q_OBJECT - TQ_PROPERTY( TQString type READ type WRITE setType ) - TQ_PROPERTY( TQString location READ location WRITE setLocation ) -public: - const TQString type() const { return m_type; } - void setType(const TQString &type) { m_type = type; } - const TQString location() const { return m_location; } - void setLocation(const TQString &location) { m_location = location; } -private: - TQString m_type; - TQString m_location; -public: - KImportedBookmarksActionMenu( - const TQString &text, const TQString& sIconName, - KActionCollection* parent, const char* name) - : KActionMenu(text, sIconName, parent, name) { - ; - } -}; - -class KBookmarkActionMenu : public KActionMenu { - Q_OBJECT - TQ_PROPERTY( TQString url READ url WRITE setUrl ) - TQ_PROPERTY( TQString address READ address WRITE setAddress ) - TQ_PROPERTY( bool readOnly READ readOnly WRITE setReadOnly ) -public: - const TQString url() const { return m_url; } - void setUrl(const TQString &url) { m_url = url; } - const TQString address() const { return m_address; } - void setAddress(const TQString &address) { m_address = address; } - bool readOnly() const { return m_readOnly; } - void setReadOnly(bool readOnly) { m_readOnly = readOnly; } -private: - TQString m_url; - TQString m_address; - bool m_readOnly; -public: - KBookmarkActionMenu( - const TQString &text, const TQString& sIconName, - KActionCollection* parent, const char* name) - : KActionMenu(text, sIconName, parent, name) { - ; - } -}; - -class KBookmarkAction : public KAction { - Q_OBJECT - TQ_PROPERTY( TQString url READ url WRITE setUrl ) - TQ_PROPERTY( TQString address READ address WRITE setAddress ) -public: - const TQString url() const { return m_url; } - void setUrl(const TQString &url) { m_url = url; } - const TQString address() const { return m_address; } - void setAddress(const TQString &address) { m_address = address; } -private: - TQString m_url; - TQString m_address; -public: - // KDE4: remove - KBookmarkAction( - const TQString& text, const TQString& sIconName, const KShortcut& cut, - const TQObject* receiver, const char* slot, - KActionCollection* parent, const char* name) - : KAction(text, sIconName, cut, receiver, slot, parent, name) { - } - KBookmarkAction( - const TQString& text, const TQString& sIconName, const KShortcut& cut, - KActionCollection* parent, const char* name) - : KAction(text, sIconName, cut, parent, name) { - } -}; - -class KBookmarkEditFields { -public: - typedef enum { FolderFieldsSet, BookmarkFieldsSet } FieldsSet; - KLineEdit * m_url; - KLineEdit * m_title; - KBookmarkEditFields(TQWidget *main, TQBoxLayout *vbox, FieldsSet isFolder); - void setName(const TQString &str); - void setLocation(const TQString &str); -}; - -class KBookmarkEditDialog : public KDialogBase -{ - Q_OBJECT - -public: - typedef enum { ModifyMode, InsertionMode } BookmarkEditType; - - KBookmarkEditDialog( const TQString& title, const TQString& url, KBookmarkManager *, BookmarkEditType editType, const TQString& address = TQString::null, - TQWidget * = 0, const char * = 0, const TQString& caption = i18n( "Add Bookmark" ) ); - - TQString finalUrl() const; - TQString finalTitle() const; - TQString finalAddress() const; - -protected slots: - void slotOk(); - void slotCancel(); - void slotUser1(); - void slotDoubleClicked(TQListViewItem* item); - -private: - TQWidget * m_main; - KBookmarkEditFields * m_fields; - TQListView * m_folderTree; - TQPushButton * m_button; - KBookmarkManager * m_mgr; - BookmarkEditType m_editType; - TQString m_address; -}; - -class KBookmarkFolderTreeItem : public TQListViewItem -{ - // make this an accessor - friend class KBookmarkFolderTree; -public: - KBookmarkFolderTreeItem( TQListView *, const KBookmark & ); - KBookmarkFolderTreeItem( KBookmarkFolderTreeItem *, TQListViewItem *, const KBookmarkGroup & ); -private: - KBookmark m_bookmark; -}; - -class KBookmarkFolderTree -{ -public: - static TQListView* createTree( KBookmarkManager *, TQWidget * = 0, const char * = 0, const TQString& = TQString::null ); - static void fillTree( TQListView*, KBookmarkManager *, const TQString& = TQString::null ); - static TQString selectedAddress( TQListView* ); - static void setAddress( TQListView *, const TQString & ); -}; - -class KBookmarkSettings -{ -public: - bool m_advancedaddbookmark; - bool m_contextmenu; - bool m_quickactions; - bool m_filteredtoolbar; - static KBookmarkSettings *s_self; - static void readSettings(); - static KBookmarkSettings *self(); -}; - -class RMB -{ -public: - static void begin_rmb_action(KBookmarkMenu *); - static void begin_rmb_action(KBookmarkBar *); - bool invalid( int val ); - KBookmark atAddress(const TQString & address); - void fillContextMenu( TQPopupMenu* contextMenu, const TQString & address, int val ); - void fillContextMenu2( TQPopupMenu* contextMenu, const TQString & address, int val ); - void slotRMBActionEditAt( int val ); - void slotRMBActionProperties( int val ); - void slotRMBActionInsert( int val ); - void slotRMBActionRemove( int val ); - void slotRMBActionCopyLocation( int val ); - void hidePopup(); -public: - TQObject *recv; - KBookmarkManager *m_pManager; - TQString s_highlightedAddress; - TQString m_parentAddress; - KBookmarkOwner *m_pOwner; - TQWidget *m_parentMenu; -}; - -#endif diff --git a/kio/bookmarks/kbookmarknotifier.h b/kio/bookmarks/kbookmarknotifier.h deleted file mode 100644 index f99e570bc..000000000 --- a/kio/bookmarks/kbookmarknotifier.h +++ /dev/null @@ -1,45 +0,0 @@ -// -*- c-basic-offset:4; indent-tabs-mode:nil -*- -// vim: set ts=4 sts=4 sw=4 et: -/* This file is part of the KDE libraries - Copyright (C) 2001, 2003 Alexander Kellett - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef __kbookmarknotifier_h__ -#define __kbookmarknotifier_h__ - -#include - -/** - * DCOP interface for a bookmark notifier (an object which emits signals - * upon changes to the bookmarks) - */ -class TDEIO_EXPORT KBookmarkNotifier : virtual public DCOPObject -{ - K_DCOP - -public: - KBookmarkNotifier(TQCString objId = "KBookmarkNotifier") : DCOPObject(objId) {} - -k_dcop_signals: - void addedBookmark( TQString filename, TQString url, TQString text, TQString address, TQString icon ); - void createdNewFolder( TQString filename, TQString text, TQString address ); - void updatedAccessMetadata( TQString filename, TQString url ); -}; - -#endif - diff --git a/kio/data.protocol b/kio/data.protocol deleted file mode 100644 index 85b0e8b66..000000000 --- a/kio/data.protocol +++ /dev/null @@ -1,71 +0,0 @@ -[Protocol] -protocol=data -input=stream -output=none -reading=true -Icon=www -Class=:internet -Description=A kioslave for data URIs (rfc2397) -Description[af]= ´n kioslave vir data URIs (rfc2397) -Description[be]=Модуль kioslave для URI з даннямі (rfc2397) -Description[br]=Ur kioslave evit an URIoù roadoù (rfc2397) -Description[bs]=Kioslave za data URIs (rfc2397) -Description[ca]=Un kioslave per a URIs de dades (rfc2397) -Description[cs]=Kioslave pro datová URI (rfc2397) -Description[csb]=Plugins protokółu pòdôwków URI (rfc2397) -Description[da]=En kioslave for data-URI'er (rfc2397) -Description[de]=Ein-/Ausgabemodul für Daten-URIs (rfc2397) -Description[el]=Ένα kioslave για URI δεδομένων (rfc2397) -Description[es]=Un kioslave para datos URIs (rfc2397) -Description[et]=Andme-URI-de I/O-moodul (rfc2397) -Description[eu]=Datuen URLen (rfc2397) kioslave-a -Description[fa]=یک kioslave برای URIهای داده )rfc2397( -Description[fi]=kioslave data URI:lle (rfc2397) -Description[fr]=Un module d'entrée / sortie pour les URI de données (rfc2397) -Description[fy]=In kioslave foar data-URI-adresse (rfc2397) -Description[gl]=Un kioslave para URIs de dados (rfc2397) -Description[hi]=डाटा यूआरआई (आरएफसी2397) के लिए एक के-आई-ओ-स्लेव -Description[hr]=kioslave za podatkovne URI-ije (rfc2397) -Description[hu]=KDE-protokoll adat-URI-k használataához (RFC 2397) -Description[id]=Kioslave for URI data (rfc2397) -Description[is]=kioslave fyrir gagnaslóðir (rfc2397) -Description[it]=Un kioslave per il protocollo di URI di dati (rfc2397) -Description[ja]=データ URIs (rfc2397) の kioslave -Description[ka]=URI მონაცემთა (rfc2397) დამმუშავებელი -Description[kk]=URI деректерді өңдеу kioslave модулі (rfc2397) -Description[km]=kioslave មួយ​សម្រាប់​ទិន្នន័យ URIs (rfc2397) -Description[lb]=E kioslave fir Donnéen-URIs (rfc2397) -Description[lt]=Antrinė KDE programa duomenų URI (rfc2397) -Description[mk]=kio-служител за податочни URI (rfc2397) -Description[ms]=Kioslave untuk URI data (rfc2397) -Description[nb]=kioslave for data URI-er (rfc2397) -Description[nds]=In-/Utgaavmoduul för Daten-URIs (rfc2397) -Description[ne]=डेटा URIs का लागि किओस्लेभ (rfc2397) -Description[nl]=Een kioslave voor data-URI-adressen (rfc2397) -Description[nn]=A kioslave for data URI-ar (rfc2397) -Description[pa]= ਡਾਟਾ URI ਲਈ kioslave(rfc2397) -Description[pl]=Wtyczka protokołu URI danych (rfc2397) -Description[pt]=Um 'kioslave' para URIs data (rfc2397) -Description[pt_BR]=Uma implementação para o protocolo de URIs de dados (rfc2397) -Description[ro]=Un dispozitiv de I/E pentru URI-urile de date (rfc2397) -Description[ru]=Обработчик URI данных (rfc2397) -Description[rw]=Kioslave y'ibyatanzwe URI (rfc2397) -Description[se]=kiošláva dáhta-URI:aid várás (rfc2397) -Description[sk]=IO klient pre dátové URI (rfc2397) -Description[sl]=kioslave za podatkovne URI-je (rfc2397) -Description[sr]=kioslave за URI-ије података (rfc2397) -Description[sr@Latn]=kioslave za URI-ije podataka (rfc2397) -Description[sv]=En I/O-slav för datawebbadresser (RFC 2397) -Description[ta]=தரவு வலைமனைகளுக்கான ஒரு kioslave (rfc2397) -Description[te]=దత్తాంశం యుఆరైల కొరకు కెఐఓబానిస (rfc2397) -Description[tg]=kioslave барои URIs (rfc2397) -Description[th]=kioslave สำหรับข้อมูล URIs (rfc2397) -Description[tr]= Veri adresleri için bir kioslave (rfc2397) -Description[tt]=Biremle URI öçen kioslave (rfc2397) -Description[uk]=Підлеглий В/В для адрес (URI) даних (rfc2397) -Description[vi]=Một kioslave cho các địa điểm URI kiểu dữ liệu (rfc2397). -Description[zh_CN]=data URI(rfc2397) 的 kioslave -DocPath=kioslave/data.html -URIMode=rawuri -defaultMimetype=application/octet-stream -determineMimetypeFromExtension=false diff --git a/kio/httpfilter/CMakeLists.txt b/kio/httpfilter/CMakeLists.txt deleted file mode 100644 index eec4e78a7..000000000 --- a/kio/httpfilter/CMakeLists.txt +++ /dev/null @@ -1,32 +0,0 @@ -################################################# -# -# (C) 2010 Serghei Amelian -# serghei (DOT) amelian (AT) gmail.com -# -# Improvements and feedback are welcome -# -# This file is released under GPL >= 2 -# -################################################# - -include_directories( - ${TQT_INCLUDE_DIRS} - ${CMAKE_CURRENT_BINARY_DIR} - ${CMAKE_BINARY_DIR} - ${CMAKE_BINARY_DIR}/tdecore - ${CMAKE_SOURCE_DIR}/tdecore - ${CMAKE_SOURCE_DIR}/kio -) - - -##### httpfilter ################################ - -set( target httpfilter ) - -set( ${target}_SRCS - httpfilter.cc -) - -tde_add_library( ${target} STATIC_PIC AUTOMOC - SOURCES ${${target}_SRCS} -) diff --git a/kio/httpfilter/Makefile.am b/kio/httpfilter/Makefile.am deleted file mode 100644 index 2da25d1b6..000000000 --- a/kio/httpfilter/Makefile.am +++ /dev/null @@ -1,8 +0,0 @@ -AM_CPPFLAGS = $(all_includes) -METASOURCES = AUTO -noinst_LTLIBRARIES = libhttpfilter.la -libhttpfilter_la_SOURCES = httpfilter.cc -libhttpfilter_la_LIBADD = $(LIBZ) -libhttpfilter_la_LDFLAGS = $(all_libraries) - -include $(top_srcdir)/admin/Doxyfile.am diff --git a/kio/httpfilter/httpfilter.cc b/kio/httpfilter/httpfilter.cc deleted file mode 100644 index 0f2adf20a..000000000 --- a/kio/httpfilter/httpfilter.cc +++ /dev/null @@ -1,372 +0,0 @@ -/* - This file is part of the KDE libraries - Copyright (c) 2002 Waldo Bastian - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License version 2 as published by the Free Software Foundation. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include - -#include - -#include "httpfilter.h" - -HTTPFilterBase::HTTPFilterBase() - : last(0) -{ -} - -HTTPFilterBase::~HTTPFilterBase() -{ - delete last; -} - -void -HTTPFilterBase::chain(HTTPFilterBase *previous) -{ - last = previous; - connect(last, TQT_SIGNAL(output(const TQByteArray &)), - this, TQT_SLOT(slotInput(const TQByteArray &))); -} - -HTTPFilterChain::HTTPFilterChain() - : first(0) -{ -} - -void -HTTPFilterChain::addFilter(HTTPFilterBase *filter) -{ - if (!last) - { - first = filter; - } - else - { - disconnect(last, TQT_SIGNAL(output(const TQByteArray &)), 0, 0); - filter->chain(last); - } - last = filter; - connect(filter, TQT_SIGNAL(output(const TQByteArray &)), - this, TQT_SIGNAL(output(const TQByteArray &))); - connect(filter, TQT_SIGNAL(error(int, const TQString &)), - this, TQT_SIGNAL(error(int, const TQString &))); -} - -void -HTTPFilterChain::slotInput(const TQByteArray &d) -{ - if (first) - first->slotInput(d); - else - emit output(d); -} - -HTTPFilterMD5::HTTPFilterMD5() -{ -} - -TQString -HTTPFilterMD5::md5() -{ - return TQString::fromLatin1(context.base64Digest()); -} - -void -HTTPFilterMD5::slotInput(const TQByteArray &d) -{ - context.update(d); - emit output(d); -} - - -HTTPFilterGZip::HTTPFilterGZip() -{ -#ifdef DO_GZIP - bHasHeader = false; - bHasFinished = false; - bPlainText = false; - bEatTrailer = false; - bEof = false; - zstr.next_in = (Bytef *) Z_NULL; - zstr.avail_in = 0; - zstr.zalloc = Z_NULL; - zstr.zfree = Z_NULL; - zstr.opaque = Z_NULL; - - inflateInit2(&zstr, -MAX_WBITS); - - iTrailer = 8; -#endif -} - -HTTPFilterGZip::~HTTPFilterGZip() -{ -#ifdef DO_GZIP - inflateEnd(&zstr); -#endif - -} - -/* The get_byte() and checkHeader() functions are modified version from */ -/* the correpsonding functions that can be found in zlib, the following */ -/* copyright notice applies to these functions: */ - -/* zlib.h -- interface of the 'zlib' general purpose compression library - version 1.1.3, July 9th, 1998 - - Copyright (C) 1995-1998 Jean-loup Gailly and Mark Adler - - This software is provided 'as-is', without any express or implied - warranty. In no event will the authors be held liable for any damages - arising from the use of this software. - - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute it - freely, subject to the following restrictions: - - 1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original software. - 3. This notice may not be removed or altered from any source distribution. - - Jean-loup Gailly Mark Adler - jloup@gzip.org madler@alumni.caltech.edu - - - The data format used by the zlib library is described by RFCs (Request for - Comments) 1950 to 1952 in the files ftp://ds.internic.net/rfc/rfc1950.txt - (zlib format), rfc1951.txt (deflate format) and rfc1952.txt (gzip format). -*/ - -int -HTTPFilterGZip::get_byte() -{ -#ifdef DO_GZIP - if (bEof) return EOF; - if (zstr.avail_in == 0) - { - bEof = true; - return EOF; - } - zstr.avail_in--; - zstr.total_in++; - return *(zstr.next_in)++; -#else - return 0; -#endif -} - -#ifdef DO_GZIP - -static int gz_magic[2] = {0x1f, 0x8b}; /* gzip magic header */ - -/* gzip flag byte */ -#define ASCII_FLAG 0x01 /* bit 0 set: file probably ascii text */ -#define HEAD_CRC 0x02 /* bit 1 set: header CRC present */ -#define EXTRA_FIELD 0x04 /* bit 2 set: extra field present */ -#define ORIG_NAME 0x08 /* bit 3 set: original file name present */ -#define COMMENT 0x10 /* bit 4 set: file comment present */ -#define RESERVED 0xE0 /* bits 5..7: reserved */ -#endif - -// 0 : ok -// 1 : not gzip -// 2 : no header -int -HTTPFilterGZip::checkHeader() -{ -#ifdef DO_GZIP - uInt len; - int c; - - /* Check the gzip magic header */ - for (len = 0; len < 2; len++) { - c = get_byte(); - if (c != gz_magic[len]) { - if (len != 0) - { - zstr.avail_in++; - zstr.next_in--; - } - if (c != EOF) { - zstr.avail_in++; - zstr.next_in--; - return 1; - } - return 2; - } - } - - int method = get_byte(); /* method byte */ - int flags = get_byte(); /* flags byte */ - - if (method != Z_DEFLATED || (flags & RESERVED) != 0) { - return bEof ? 2 : 1; - } - - /* Discard time, xflags and OS code: */ - for (len = 0; len < 6; len++) (void)get_byte(); - - if ((flags & EXTRA_FIELD) != 0) { /* skip the extra field */ - len = (uInt)get_byte(); - len += ((uInt)get_byte())<<8; - /* len is garbage if EOF but the loop below will quit anyway */ - while (len-- != 0 && get_byte() != EOF) ; - } - if ((flags & ORIG_NAME) != 0) { /* skip the original file name */ - while ((c = get_byte()) != 0 && c != EOF) ; - } - if ((flags & COMMENT) != 0) { /* skip the .gz file comment */ - while ((c = get_byte()) != 0 && c != EOF) ; - } - if ((flags & HEAD_CRC) != 0) { /* skip the header crc */ - for (len = 0; len < 2; len++) (void)get_byte(); - } - - return bEof ? 2 : 0; -#else - return 0; -#endif -} - -void -HTTPFilterGZip::slotInput(const TQByteArray &d) -{ -#ifdef DO_GZIP - if (bPlainText) - { - emit output(d); - return; - } - if (d.size() == 0) - { - if (bEatTrailer) - bHasFinished = true; - if (!bHasFinished) - { - // Make sure we get the last bytes still in the pipe. - // Needed with "deflate". - TQByteArray flush(4); - flush.fill(0); - slotInput(flush); - if (!bHasFinished && !bHasHeader) - { - // Send as-is - emit output(headerData); - bHasFinished = true; - // End of data - emit output(TQByteArray()); - } - } - if (!bHasFinished) - emit error( TDEIO::ERR_SLAVE_DEFINED, i18n("Unexpected end of data, some information may be lost.")); - return; - } - if (bHasFinished) - return; - - if (bEatTrailer) - { - iTrailer -= d.size(); - if (iTrailer <= 0) - { - bHasFinished = true; - // End of data - emit output(TQByteArray()); - } - return; - } - - if (!bHasHeader) - { - bEof = false; - - // Add data to header. - int orig_size = headerData.size(); - headerData.resize(orig_size+d.size()); - memcpy(headerData.data()+orig_size, d.data(), d.size()); - - zstr.avail_in = headerData.size(); - zstr.next_in = (Bytef *) headerData.data(); - - int result = checkHeader(); - if (result == 1) - { - bPlainText = true; - output(headerData); - return; - } - - if (result != 0) - return; // next time better - - bHasHeader = true; - } - else - { - zstr.avail_in = d.size(); - zstr.next_in = (Bytef *) d.data(); - } - - while( zstr.avail_in ) - { - char buf[8192]; - zstr.next_out = (Bytef *) buf; - zstr.avail_out = 8192; - int result = inflate( &zstr, Z_NO_FLUSH ); - if ((result != Z_OK) && (result != Z_STREAM_END)) - { - emit error( TDEIO::ERR_SLAVE_DEFINED, i18n("Receiving corrupt data.")); - break; - } - int bytesOut = 8192 - zstr.avail_out; - if (bytesOut) - { - TQByteArray d; - d.setRawData( buf, bytesOut ); - emit output(d); - d.resetRawData( buf, bytesOut ); - } - if (result == Z_STREAM_END) - { - if (iTrailer) - { - bEatTrailer = true; - } - else - { - bHasFinished = true; - // End of data - emit output(TQByteArray()); - } - return; - } - } -#endif -} - -HTTPFilterDeflate::HTTPFilterDeflate() -{ -#ifdef DO_GZIP - bHasHeader = true; - iTrailer = 0; -#endif -} - -#include "httpfilter.moc" diff --git a/kio/httpfilter/httpfilter.h b/kio/httpfilter/httpfilter.h deleted file mode 100644 index 520a1c627..000000000 --- a/kio/httpfilter/httpfilter.h +++ /dev/null @@ -1,119 +0,0 @@ -/* - This file is part of the KDE libraries - Copyright (c) 2002 Waldo Bastian - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License version 2 as published by the Free Software Foundation. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef _HTTPFILTER_H_ -#define _HTTPFILTER_H_ - -#include - -#ifdef HAVE_LIBZ -#define DO_GZIP -#endif - -#ifdef DO_GZIP -#include -#endif - -#include -#include - -class HTTPFilterBase : public TQObject -{ - Q_OBJECT -public: - HTTPFilterBase(); - ~HTTPFilterBase(); - - void chain(HTTPFilterBase *previous); - -public slots: - virtual void slotInput(const TQByteArray &d) = 0; - -signals: - void output(const TQByteArray &d); - void error(int, const TQString &); - -protected: - HTTPFilterBase *last; -}; - -class HTTPFilterChain : public HTTPFilterBase -{ - Q_OBJECT -public: - HTTPFilterChain(); - - void addFilter(HTTPFilterBase *filter); - -public slots: - void slotInput(const TQByteArray &d); - -private: - HTTPFilterBase *first; -}; - -class HTTPFilterMD5 : public HTTPFilterBase -{ - Q_OBJECT -public: - HTTPFilterMD5(); - - TQString md5(); - -public slots: - void slotInput(const TQByteArray &d); - -private: - KMD5 context; -}; - - -class HTTPFilterGZip : public HTTPFilterBase -{ - Q_OBJECT -public: - HTTPFilterGZip(); - ~HTTPFilterGZip(); - -public slots: - void slotInput(const TQByteArray &d); - -protected: - int get_byte(); - int checkHeader(); -#ifdef DO_GZIP - z_stream zstr; - bool bEof : 1; - bool bHasHeader : 1; - bool bHasFinished : 1; - bool bPlainText : 1; - bool bEatTrailer : 1; - TQByteArray headerData; - int iTrailer; -#endif -}; - -class HTTPFilterDeflate : public HTTPFilterGZip -{ - Q_OBJECT -public: - HTTPFilterDeflate(); -}; - -#endif diff --git a/kio/kcomprfilter.desktop b/kio/kcomprfilter.desktop deleted file mode 100644 index 017bf987d..000000000 --- a/kio/kcomprfilter.desktop +++ /dev/null @@ -1,82 +0,0 @@ -[Desktop Entry] -Type=ServiceType -X-TDE-ServiceType=TDECompressionFilter -Name=TDE Compression Filter -Name[af]=TDE Kompakteer Filter -Name[az]=TDE Sıxışdırma Filtri -Name[bg]=Компресиращ филтър -Name[bn]=কে.ডি.ই. সংকোচন ফিল্টার -Name[bs]=TDE filter za kompresovanje -Name[ca]=Filtre de compressió per al TDE -Name[cs]=Kompresní filtr TDE -Name[csb]=Filter kòmpresëji TDE -Name[cy]=Hidl Cywasgiad TDE -Name[da]=TDE Komprimeringsfilter -Name[de]=TDE-Komprimierungsfilter -Name[el]=Φίλτρο συμπίεσης του TDE -Name[eo]=TDE-kunpremo-filtrilo -Name[es]=Filtro de compresión de TDE -Name[et]=TDE pakkimise filter -Name[eu]=TDEren konpresio-iragazkia -Name[fa]=پالایۀ فشرده‌سازی TDE -Name[fi]=TDE:n pakkaussuodin -Name[fr]=Filtre de compression de TDE -Name[fy]=TDE kompresjefilter -Name[ga]=Scagaire Comhbhrúite TDE -Name[gl]=Filtro de Compresón de TDE -Name[he]=מסנן הדחיסה של TDE -Name[hi]=केडीई कंप्रेशन फ़िल्टर -Name[hr]=TDE filtr kompresije -Name[hu]=TDE tömörítésszűrő -Name[id]=Filter Kompresi TDE -Name[is]=TDE þjöppunarsía -Name[it]=Filtro di compressione TDE -Name[ja]=TDE 圧縮フィルタ -Name[ka]=TDE-ს შეკუმშვის ფილტრი -Name[kk]=TDE сығу сүзгісі -Name[km]=តម្រង​បង្ហាប់ TDE -Name[ko]=TDE 압축 거르개 -Name[lb]=TDE-Kompressiounsfilter -Name[lt]=TDE suspaudimo filtras -Name[lv]=TDE Kompresijas FIltrs -Name[mk]=TDE филтер за компресија -Name[mn]=TDE-шахагчийн шүүлтүүр -Name[ms]=Penapis Pemadatan TDE -Name[mt]=Filtru tal-kompressjoni TDE -Name[nb]=Komprimeringsfilter for TDE -Name[nds]=TDE-Komprimerenfilter -Name[ne]=TDE सङ्खुचन फिल्टर -Name[nl]=TDE Compressiefilter -Name[nn]=TDE Kompresjonsfilter -Name[nso]=Sesekodi sa Pitleletso ya TDE -Name[pa]=TDE ਨਪੀੜਨ ਫਿਲਟਰ -Name[pl]=Filtr kompresji TDE -Name[pt]=Filtro de Compressão do TDE -Name[pt_BR]=Filtro de compressão do TDE -Name[ro]=Filtru de compresie TDE -Name[ru]=Фильтр сжатия TDE -Name[rw]=Muyunguruzi y'Iyegeranya TDE -Name[se]=TDE čoahkkáibáhkkenfilter -Name[sk]=TDE filter pre kompresiu -Name[sl]=Filter za stiskanje s TDE -Name[sq]=Filter për Ngjeshje - TDE -Name[sr]=TDE-ов компресиони филтер -Name[sr@Latn]=TDE-ov kompresioni filter -Name[ss]=Sisefo seminyenalisa se TDE -Name[sv]=TDE-kompressionsfilter -Name[ta]=கேடிஇ அழுத்த வடிகட்டி -Name[te]=కెడిఈ సంక్షిప్తపరిచె గలని -Name[tg]=TDE Газполои Фушурдашуда -Name[th]=ตัวกรองการบีบอัดของ TDE -Name[tr]=TDE Sıkıştırma Filtresi -Name[tt]=TDE'nıñ Qısu Sözgeçe -Name[uk]=Фільтр стискання TDE -Name[uz]=TDE qisish filteri -Name[uz@cyrillic]=TDE қисиш филтери -Name[ven]=Filithara yau tsikeledza ya TDE -Name[vi]=Bộ lọc nén TDE -Name[xh]=Isihluzi Sodibaniso se TDE -Name[zh_CN]=TDE 压缩过滤程序 -Name[zh_HK]=TDE 壓縮過濾器 -Name[zh_TW]=TDE 壓縮過濾器 -Name[zu]=Ihluzo Lokunciphisa le-TDE diff --git a/kio/kdatatool.desktop b/kio/kdatatool.desktop deleted file mode 100644 index a58357d41..000000000 --- a/kio/kdatatool.desktop +++ /dev/null @@ -1,96 +0,0 @@ -[Desktop Entry] -Type=ServiceType -X-TDE-ServiceType=KDataTool -Comment=TDE Data Tool -Comment[af]=TDE Data Program -Comment[ar]=أداة كيدي للبيانات -Comment[az]=TDE Verilənlər Vasitəsi -Comment[be]=Інструмент працы з даннямі TDE -Comment[bn]=কে.ডি.ই তথ্য টুল -Comment[br]=Ostilh roadoù evit TDE -Comment[bs]=TDE alat za podatke -Comment[ca]=Eina per a la gestió de dades per al TDE -Comment[cs]=Datový nástroj TDE -Comment[csb]=Nôrzãdze pòdôwków TDE -Comment[cy]=Erfyn Data TDE -Comment[da]=TDE-dataværktøj -Comment[de]=TDE-Datenprogramm -Comment[el]=Εργαλείο δεδομένων του TDE -Comment[eo]=Datumilo -Comment[es]=Herramienta TDE de datos -Comment[et]=TDE andmete rakendus -Comment[eu]=TDEren datuen tresna -Comment[fa]=ابزار دادۀ TDE -Comment[fi]=TDE:n datatyökalu -Comment[fr]=Outil de données TDE -Comment[fy]=TDE data-helpprogramma -Comment[ga]=Uirlis Sonraí TDE -Comment[gl]=Ferramenta de Dados de TDE -Comment[he]=כלי נתונים של TDE -Comment[hi]=केडीई डाटा टूल -Comment[hr]=TDE alat za podatke -Comment[hu]=TDE adatkezelő segédprogram -Comment[id]=Tool Data TDE -Comment[is]=TDE gagnatól -Comment[it]=Strumenti dati di TDE -Comment[ja]=TDE データツール -Comment[ka]=TDE-ს მონაცემების დამმუშავებელი -Comment[kk]=TDE дерек өңдеу құралы -Comment[km]=ឧបករណ៍​ទិន្នន័យ TDE -Comment[ko]=TDE 자료 연장 -Comment[lb]=TDE-Donnéen-Hëllefsprogramm -Comment[lt]=TDE duomenų priemonė -Comment[lv]=TDE Datu Rīks -Comment[mk]=TDE податочна алатка -Comment[mn]=TDE-Өгөгдөл боловсруулах программ -Comment[ms]=Alatan Data TDE -Comment[mt]=Għodda għal data TDE -Comment[nb]=TDE Dataverktøy -Comment[nds]=TDE-Datenwarktüüch -Comment[ne]=TDE डेटा उपकरण -Comment[nl]=TDE Data-hulpprogramma -Comment[nn]=TDE Dataverktøy -Comment[nso]=Sebereka sa Data ya TDE -Comment[pa]=TDE ਡਾਟਾ ਸੰਦ -Comment[pl]=Narzędzie danych TDE -Comment[pt]=Ferramenta de Dados do TDE -Comment[pt_BR]=Ferramenta de Dados do TDE -Comment[ro]=Utilitar de date TDE -Comment[ru]=Утилита обработки информации TDE -Comment[rw]=Igikoresho cy'Ibyatanzwe TDE -Comment[se]=TDE dáhtareaidu -Comment[sk]=Dátový nástroj TDE -Comment[sl]=Podatkovno orodje za TDE -Comment[sq]=Vegla për të Dhëna - TDE -Comment[sr]=TDE-ов алат за податке -Comment[sr@Latn]=TDE-ov alat za podatke -Comment[ss]=Lithulusi lemniningwane lengakahlutwa ye TDE -Comment[sv]=TDE-dataverktyg -Comment[ta]=கேடிஇ தகவல் கருவி -Comment[te]=కెడిఈ దత్తాంశం పనిముట్టు -Comment[tg]=TDE Асбоби Сана -Comment[th]=เครื่องมือข้อมูลของ TDE -Comment[tr]=TDE Veri Aracı -Comment[tt]=TDE'nıñ Eşkärtü Qoralı -Comment[uk]=Засіб роботи з даними TDE -Comment[uz]=TDE maʼlumot vositasi -Comment[uz@cyrillic]=TDE маълумот воситаси -Comment[ven]=Tshishumiswa tsha data tsha TDE -Comment[vi]=Công cụ dữ liệu TDE. -Comment[xh]=Isihluzi se Data ye TDE -Comment[zh_CN]=TDE 数据工具 -Comment[zh_HK]=TDE 資料工具 -Comment[zh_TW]=TDE 資料工具 -Comment[zu]=Ithuluzi Ledata le-TDE - -[PropertyDef::Commands] -Type=TQStringList - -[PropertyDef::DataType] -Type=TQString - -[PropertyDef::DataMimeTypes] -Type=TQStringList - -[PropertyDef::ExcludeFrom] -Type=TQStringList diff --git a/kio/kfile/CMakeLists.txt b/kio/kfile/CMakeLists.txt deleted file mode 100644 index 3444fa0da..000000000 --- a/kio/kfile/CMakeLists.txt +++ /dev/null @@ -1,76 +0,0 @@ -################################################# -# -# (C) 2010 Serghei Amelian -# serghei (DOT) amelian (AT) gmail.com -# -# Improvements and feedback are welcome -# -# This file is released under GPL >= 2 -# -################################################# - -include_directories( - ${TQT_INCLUDE_DIRS} - ${CMAKE_CURRENT_BINARY_DIR} - ${CMAKE_BINARY_DIR} - ${CMAKE_CURRENT_SOURCE_DIR} - ${CMAKE_BINARY_DIR}/tdecore - ${CMAKE_SOURCE_DIR} - ${CMAKE_SOURCE_DIR}/dcop - ${CMAKE_SOURCE_DIR}/tdefx - ${CMAKE_SOURCE_DIR}/tdecore - ${CMAKE_SOURCE_DIR}/tdeui - ${CMAKE_SOURCE_DIR}/kio - ${CMAKE_SOURCE_DIR}/kio/kio - ${CMAKE_SOURCE_DIR}/kio/bookmarks - ${LIBART_INCLUDE_DIRS} -) - - -##### headers ################################### - -install( FILES - kfiledialog.h kencodingfiledialog.h - kdiroperator.h kfileview.h kfilefiltercombo.h - kfiledetailview.h kcombiview.h kdiskfreesp.h - kfileiconview.h krecentdocument.h - kurlrequester.h kfilepreview.h kfile.h - kurlcombobox.h kurlrequesterdlg.h kopenwith.h kpropsdlg.h - kicondialog.h kdirsize.h kpreviewwidgetbase.h kimagefilepreview.h kfilesharedlg.h - kfiletreeview.h kfiletreeviewitem.h kfiletreebranch.h - kdirselectdialog.h kurlbar.h kpropertiesdialog.h knotifydialog.h - kcustommenueditor.h ${CMAKE_CURRENT_BINARY_DIR}/knotifywidgetbase.h - DESTINATION ${INCLUDE_INSTALL_DIR} ) - - -##### other data ################################ - -install( FILES - kpropsdlgplugin.desktop - DESTINATION ${SERVICETYPES_INSTALL_DIR} ) - - -##### kfile ##################################### - -set( target kfile ) - -set( ${target}_SRCS - kfilefiltercombo.cpp kfileview.cpp kfileiconview.cpp - krecentdocument.cpp kfiledialog.cpp kdiroperator.cpp - kfiledetailview.cpp kcombiview.cpp kurlrequester.cpp - kfilepreview.cpp kurlcombobox.cpp kurlrequesterdlg.cpp - kopenwith.cpp kpropertiesdialog.cpp kicondialog.cpp - kdirsize.cpp krecentdirs.cpp kdiskfreesp.cpp kimagefilepreview.cpp - kfilesharedlg.cpp kurlbar.cpp kmetaprops.cpp kpreviewprops.cpp - kfiletreeview.cpp kfiletreeviewitem.cpp kfiletreebranch.cpp - kdirselectdialog.cpp kfilebookmarkhandler.cpp kfilemetainfowidget.cpp - kcustommenueditor.cpp knotifywidgetbase.ui knotifydialog.cpp - kfilespeedbar.cpp kpreviewwidgetbase.cpp kfilemetapreview.cpp - kpropertiesdesktopbase.ui kpropertiesdesktopadvbase.ui - kpropertiesmimetypebase.ui kencodingfiledialog.cpp - kacleditwidget.cpp -) - -tde_add_library( ${target} STATIC_PIC AUTOMOC - SOURCES ${${target}_SRCS} -) diff --git a/kio/kfile/ChangeLog b/kio/kfile/ChangeLog deleted file mode 100644 index 2c9651390..000000000 --- a/kio/kfile/ChangeLog +++ /dev/null @@ -1,725 +0,0 @@ -Sat Feb 26 00:26:55 2000 Carsten Pfeiffer - - * kdiroperator.cpp: - lottsa changes, e.g. action handling more clear now. - fixed completed item not clearning the previous selection - - * kfileviewitem.cpp: - fixed unreadable pixmap not shown, when files were deleted - - * kfiledialog.cpp (selectedURLs): - re-enabled the hack to support multi-selection, until we have something - better - - * kcombiview.*: - forward the sorting to the right view (or should it apply to the dir- - view as well?) Sort of broken tho. - -Sun Feb 20 01:50:44 2000 Carsten Pfeiffer - - * kdiroperator.*, kfiledialog.* (saveConfig): - implemented loading, saving and applying configuration - - * kfiledialog.cpp (setURL): - KDirComboBox is now a combo for recent directories as well as the - root-dir, home-dir and Desktop-dir. - Recent dirs will be saved in kdeglobals. - -Fri Feb 18 23:35:04 2000 Carsten Pfeiffer - - * kfilefilter.cpp (eventFilter): - intercept Key_Return and Key_Enter in the filter-combo and emit - filterChanged instead of letting the dialog close - -Thu Feb 17 19:09:54 2000 Carsten Pfeiffer - - * kfiledialog.{cpp,h} (KDirComboBox): - Added KDirComboBox and replaced the directory combobox with it. It - even does something now :) Items need to be indented tho. - - * kfilereader.cpp, kdiroperator.{cpp,h}: - fixed showHidden default - -Tue Feb 15 14:21:41 2000 Carsten Pfeiffer - - * kfile.h (class KFile): - added a small class that contains all the enums now. - cleaned up the enums (hope not too many apps will be broken) - added flags for "Existing files only" and "local files only" - - * all views (setSelected()): - replaced highlightItem(item) with setSelected(item, bool) which makes - it more suitable and more consistent with Qt. - added selectionChanged() method (necessary for multiselection) - - * kfileview.*: - added invertSelection() - - * kfiledialog.cpp: - made it work with multiselection - added static methods for multiselection - added getOpenURL(), getOpenURLs and getSaveURL() - - * kdiroperator.cpp (setSorting): - added setSorting() and sorting() to keep sorting when switching views - a few cosmetic and KAction changes - -Sun Feb 13 00:45:12 2000 Carsten Pfeiffer - - * kfiledialog.cpp (completion): - small fix: completion and auto-directory following works also - without protocol-part in the location. - -Sat Feb 12 15:30:40 2000 Carsten Pfeiffer - - * kfileview.h: - made setSorting() and sortReversed() virtual so that subclasses - can intercept that to show sorting order - - * kfiledetailview.cpp,h (setSortIndicator): - enable header-clicking again to set the sorting - -Fri Feb 11 12:17:59 2000 Carsten Pfeiffer - - * kfiledialog.cpp (KFileDialog): - fixed filefilter not being applied in constructor - -Thu Feb 10 17:06:36 2000 Carsten Pfeiffer - - * kdiroperator.cpp (connectView): - - Now that KToggleAction is fixed, I can commit the new stuff: - Offer Actions for all the common functionality, i.e. sorting, setting - the view, home(), cdUp(), back, forward, etc. - All actions are exposed through a QActionCollection - - BTW, I'd really like to have a way to change the state of an action - without it calling the associated slot. For now I use blockSignals() - (thanks, Simon), but this sucks. - - - renamed fileList to fileView (that was an old relic of KDE 1) - - * kfiledialog.*: - - make use of the new Actions and fill the toolbar again (up, back, - forward, reload, home). - - - the combo in the toolbar is going to change, it does nothing now - (only shows the Root and Desktop dirs with a nice icon). - -Thu Feb 10 12:59:29 2000 Carsten Pfeiffer - - * kdiroperator.cpp (insertNewFiles): - aahhh, finally fixed that infinite loop in KFileView::mergeLists - clear the view before calling view->addItemList( currentContents ); - - * kfilereader.cpp (setURL): - don't disable dirWatch update (setAutoUpdate) when setting a remote URL - -Fri Feb 4 12:42:37 2000 Carsten Pfeiffer - - * kfiledetailview.cpp (insertItem): - - don't let QListView sort the items - I disabled clicking at the headers for now, will fix that later - - don't flicker on mimetype-pixmap update - -Thu Feb 3 12:15:16 2000 Carsten Pfeiffer - - * kfileview.h + all views where necessary - added selectAll() - added isSelected( const KFileViewItem * ) - added const KFileViewItemList * selectedItems() - added const KFileViewItemList * items() - - spiced up documentation of KFileView a bit - -Sun Jan 30 22:20:14 2000 Carsten Pfeiffer - - * kfileviewitem.cpp (pixmap): - fixed some issues for different pixmap sizes - - * kfileiconview.{h,cpp} (setPixmapSize): - added configurability for different pixmap sizes - -Sun Jan 30 16:49:12 2000 Carsten Pfeiffer - - * kfileview.h + all views: - A view can now have a name (setViewName() and viewName()) - This is useful to differentiate views and to display the names in a - popupmenu for switching between views. - -Sun Jan 30 12:41:04 2000 Werner Trobin - The preview mode works again. It's very similar to the Qt-2.1 QFD - preview mode - but it's not totally the same. There are some rough - edges which have to be ironed out, but it works :) - For further information, see kfilepreview.* - Note: kpreview and so on are obsolete (IMHO) - -Sat Jan 29 15:33:37 2000 Carsten Pfeiffer - - Time to add some changelogs again, all the recent hard work of the - restructuring is only in CVS-log... - - * kfileview.cpp (compareItems): - - added support to disable sorting directories first (QDir::DirsFirst) - - added support to sort by date and to sort reversed - - removed unused findCompletion method - - sort case insensitive by default - - some optimization for mergeList - - fixed infinite loop in mergeLists, when the lists are the same - (I think another one is still there, but I'm tired now) - - changed setSortMode stuff: Switching-mode replaced with - sortReversed(). The enum Switching will be removed, soon. - - made setSortMode public - - * kfileviewitem.cpp: - - added time_t mTime() to enable sorting by modification time - - * kdiroperator.cpp: - - offer sorting options in popupmenu - - use checkAccess before creating directories. I guess this will again - change when the new kio will be used, tho. - - show progress widget at the bottom (otherwise the header of e.g. - the detail-view would be covered). - - Added LGPL copyright header - - * kfilewidget.cpp (connectSignals): - - connect to all signals of KDirOperator - - directly connect SIGNAL to SIGNAL -> removed slotFileHighlighted etc. - - fixed some sorting/merging bugs - - * {kfiledialog,kdiroperator}.{cpp,h}; - - support for disabling chdir (some apps may not want KFileDialog / - KFileReader change the working directory under their feet) - - Added LGPL header in cpp-file - - * kfilereader.cpp (stat): - - fixed: some special files were recognized as directories - - * kfstest.cpp: - - added test for KFileWidget (widget -> KFileWidget, - diroperator -> KDirOperator) - -Sun Oct 31 00:56:23 1999 Carsten Pfeiffer - - * kfileinfo.cpp (readUserInfo): Don't call getpwnam() and getgrgid() - all the time over and over again! This opens and parses /etc/passwd - or /etc/group with every call! - Now we load /etc/passwd and /etc/group once and store the interesting - stuff in static QMaps, which need to be freed with KFileInfo::cleanup() - cleanup() is called from KFileBaseDialog's destructor. - - This speeds up KFileDialog a LOT! - -Sat Oct 23 01:55:00 1999 Carsten Pfeiffer - - * kfiledetaillist.cpp (key): hopefully implemented correct mapping - from KFileInfo to QListViewItem and back. I had a hard time convincing - QListView that KFileInfoContents knows best where to insert an item - Now the detaillist is even usable :) - Fixed a problem with selection and highlighting - Disable clicking on listview headers that can't be used for sorting - - * kfileinfocontents.cpp (setSorting): call insertItem() with a correct - (is it?) index, instead of -1 - -Thu Oct 21 23:18:54 1999 Carsten Pfeiffer - - * kfiledialog.cpp (init): removed "[development only] from tooltip - (sorry to break the translations, but this HAD to go) - - * don't update anything when leaving the configure-dialog with Cancel - -Wed Oct 20 15:07:16 1999 Carsten Pfeiffer - - * kfileinfo.cpp,h: implemented KFileInfo::filePath() and fixed - KFileInfo::absURL() not being set in some cases - - * kdir.cpp: fixed a buglet in the path (double slashes) - - * kfiledetaillist.cpp (KFileDetailList): improved selecting files - (single click, double click, Return-key) - but the mapping from QListViewItem to KFileInfo is still quite broken - -1999-06-09 Woohyun JANG - - * kdir.cpp: used QString::local8Bit() instead of QString::ascii() - for file names and directory names. - - * kfiledialog.cpp: used QStringList instead of QStrIList. - -1999-01-14 Stephan Kulow - - * kfiledialog.cpp: fixed some GUI problems and moved all default - configurations into config-kfile.h. - Changed some default values, so that users that never looked into - the config dialog gets a nice suprise with 1.1 ;-) - - * kfiledialog.cpp: changed selectedFile to return decoded path instead - of encoded one - -Thu Jan 7 23:14:39 1999 Carsten Pfeiffer - - * kfilesimpleview.cpp (keyPressEvent): fixed segfault on keypress, - when there were no files at all in the list - -1998-12-19 Stephan Kulow - - * kfiledialog.cpp: fixing an ugly bug when "." is used as argument - -Mon Dec 14 23:00:41 1998 Carsten Pfeiffer - - * kfilebookmark.cpp: renamed class KBookmark to KFileBookmark to - avoid problems with KFM's KBookmark class. Renamed bookmark.* to - kfilebookmark.*, too and changed all occurrences of bookmark.* to - kfilebookmark.* (especially all the .po-files) - -Wed Dec 2 15:59:13 1998 Carsten Pfeiffer - - * kfilesimpleview.cpp: Fixed some more keyboard navigation bugs. - Added method isColCompletelyVisible( int col ), now you can scroll - perfectly to make items completely visible. - Moreover, in resizeEvent() the number of columns was not calculated - correctly in a special case. - And the currently selected item is rehighlighted correctly after - resizing, now. - -1998-10-12 Jochen Kpper - - * kfiledialog.cpp (okPressed): Changed okPressed to store the correct - filename before leaving the dialog. - -1998-06-07 Stephan Kulow - - * kfilesimpleview.cpp: added some checks to prevent division with - zero using the latest qt snapshots - - * kfilesimpleview.cpp: added a repaint call after a resize - - * kfiledialog.cpp: new experimental button order - - * kfiledialog.cpp: added lastDirectory to remember the last visited - directory for next open - -1998-05-24 Stephan Kulow - - * kfiledialog.cpp: use setSelection also for the initial filename - given - - * kfiledialog.cpp: introduced KFileFilter to make an abstraction - for the used filter widget. Currently only QComboBox is supported, - but this may change in the future - -1998-05-20 Stephan Kulow - - * kfiledialog.cpp: changed the accelerator for completion - to CTRL-T - - * kfiledialog.cpp: fixed the setSelection() feature - -1998-05-19 Stephan Kulow - - * kfiledialog.h: added setSelection - -1998-05-18 Stephan Kulow - - * kfiledialog.cpp: bugfixes - -1998-05-15 Stephan Kulow - - * kfileinfocontents.cpp: some more changes and speed ups - (caching and some other little things) - -1998-05-14 Stephan Kulow - - * kfileinfocontents.cpp: added addItemList - - * kfileinfocontents.h: introduced KFileInfoContentsSignaler - - * kfileinfocontents.cpp: some more speed improvment - -1998-05-10 Stephan Kulow - - * kfiledialog.cpp: tried to speed up the refresh - -1998-04-17 Stephan Kulow - - * kfiledetaillist.cpp: implemented the date field - - * kfiledetaillist.cpp: made the columns wider - - * kfileinfocontents.cpp: use the new icons by Mark - -Thu Apr 16 10:51:24 1998 Daniel Grana - - * kfiledialog.*: some small fixes concerning preview - - * kfileinfocontents.cpp: fixed sorting bug in preview - - * kfilepreview.*: small bug fixes - - * kpreview.*: small bug fixes - - * added some documentation - -1998-04-15 Stephan Kulow - - * kfilepreview.cpp: use a list box instead of simple view - - * kfiledialog.cpp: fixed an ugly bug - -1998-04-14 Stephan Kulow - - * kfiledialogconf.cpp: removed the width/height sliders - - * kfiledialog.cpp: save the width and height on exit - - * kfiledialogconf.cpp: added more guys to the about box - - * kfiledialog.h: removed init*Children. They were useless - - * kfiledialog.cpp: set the default size to a useful value - -Mon Apr 6 17:30:18 1998 Daniel Grana - - * kfilepreview.*: restructured previewing, one can now easily - use custom previewers, dynamically - - * kpreview.*: changes for allowing custom previewers, two previewers - are hardcoded so far - - * kfiledialog.*: changes changes for allowing custom previewers - - * kfstest.cpp: changes to preview mode - - * xview.*: QimageIO module allowing the visual-schnauzer generated - images to be loaded - -1998-04-06 Stephan Kulow - - * debug.h: added debugC. An empty macro to hide debug output - -Thu Apr 2 19:39:37 1998 Daniel Grana - - * kpreview.*: widget which for now shows some info about a - file/folder along with the first 20-30 lines of it - - * kfilepreview.*: added a new view which has a preview of any text - file in the right part - - * kfstest.cpp: added the new mode "preview" which shows the above - view - -1998-03-30 Stephan Kulow - - * kfilesimpleview.cpp: fixed highlightning - - * kfiledialog.cpp: some fixes for the dir selection - - * kfiledialog.h: Moved KFileDialog into KFileBaseDialog and made - KFileDialog and KDirDialog a derived class of KFileBaseDialog to - make this virtual functions work - -Mon Mar 30 17:53:20 1998 Daniel Grana - - * kcombiview.cpp: bug fixes for completion & corresponding - highlighting - - * kfiledialog.cpp: small bug fix, too much copying into location - - * kfileinfocontents.cpp: completion slightly remodeled, should - work in all views now - - * kfileinfocontents.h: changed nameList to case insensitive - list - -1998-03-28 Stephan Kulow - - * kfiledialog.cpp: changed the filter separator to \n. - This looks nicer in the source code of the call - -Sat Mar 28 14:49:00 1998 Stephan Kulow - - * kfiledialog.cpp: changed the meaning of the dirName argument - - * kfiledialog.h: added getShowFilter - -Thu Mar 26 12:47:42 1998 Stephan Kulow - - * kfilesimpleview.cpp: improved scrolling in simple view - - * kfileinfocontents.cpp: add a / after a found dir - - * kfiledialog.cpp: fixed bug for !showFilter - -Wed Mar 25 18:39:09 1998 Daniel Grana - - * kfileinfocontents.cpp: completion now working - - * kcombiview.cpp: changed behavior for completion, it - now highlights completed directory and file - -Tue Mar 24 16:08:46 1998 Daniel Grana - - * kfileinfocontents.cpp: sorting now fully working - - * kfiledialog.cpp: modifications for sorting in the on the - fly reconfiguration - - * kfileinfocontents.*: modification to the constructor - to pass along the sorting - - * kfiledetaillist.*: modification to the constructor - to pass along the sorting - - * kcombiview.*: modification to the constructor - to pass along the sorting - - * kfilesimpleview.*: modification to the constructor - to pass along the sorting - -Tue Mar 24 10:45:15 1998 Daniel Grana - - * kfileinfocontents.cpp: sorting fixed, the feature of keeping - directories grouped is still missing though - -Mon Mar 23 22:59:18 1998 Stephan Kulow - - * kfiledetaillist.h: added acceptsFiles() and acceptsDirs() to - make dirs-only views useful - - * kfileinfocontents.cpp: OK, completion is back again, but - currently not working, because the code is missing ;-) - -Mon Mar 23 00:08:02 1998 Stephan Kulow - - * kfiledialog.cpp: moved all GM related things into initGUI() to - make recreation possible - -Sun Mar 22 00:22:46 1998 Stephan Kulow - - * kfiledialog.cpp: use KShellProcess now - - * kfiledialog.h: added virtual function initFileList to made - KFileDialog customable - - * kfiledialog.cpp: show a combo box, in case more filters are given - - * kfiledialog.cpp: some bug fixes. I can't get the sorting to work - - * Makefile.am: install some toolbar pixmaps - - * kfiledetailview.cpp: added pixmaps to the detail view - - * Kfiledialog.cpp: made KComboView customable through virtual - functions - - * kcombiview.cpp: took out the completion for now, added - kcombiview and some little changes in setCurrentItem - - * kdirlistbox.cpp: fixed the use of single click - - * kdir.h: moved the header files a little bit to remove - some dependencies - - * kdirlistbox.cpp: KDirListBox is now a KFileInfoContents too - - * kfiledialog.cpp: another change in the API. It uses now QSignal. - I didn't liked the old way - -1998-03-21 Stephan Kulow - - * kfiledialog.cpp: implemented mixDirsAndFiles. Need some work and currently - only supported by the simple view - -Sat Mar 21 01:00:48 1998 Stephan Kulow - - * kfilesimpleview.cpp: added pixmaps to indicate access on the file - - * kfilesimpleview.cpp: improved keyboard navigation - - * kfilesimpleview.cpp: first almost working simple view - - * kfilesimpleview.cpp: started implementing a simple view. Needs - still some work - - -Fri Mar 20 22:42:31 1998 Stephan Kulow - - * kfileinfocontents.h: bugfixes - - * kfileinfo.cpp: KFileInfo is no longer a derived class of - QFileInfo. This should reduce memory use too - - * kfileinfocontents.h: moved the actual sorting in - KFileInfoContents. Derived classes are for viewing only - - * kfiledialog.h: fixed some header files locations - -1998-03-20 Stephan Kulow - - * kfileinfo.cpp: show lockedfolder.xpm for folders, that are not - allowed to enter or read - - * kfiledialog.cpp: bug fixes - -Fri Mar 20 13:10:11 1998 Daniel Grana - * kfilgdialog.*, remodeled the configuration dialog to reflect the - current possible settings - * kfiledetailList.cpp: added the PageUp PageDown navigation - -1998-03-19 Stephan Kulow - - * kfiledialog.cpp: fixed the forward/back back reported by - Stefan Tafener - -1998-03-18 Stephan Kulow - - * kfiledialog.cpp: set the initial focus to the line edit - - * kfiledialog.cpp: use kapp->invokeHTMLHelp now - - * kfiledialog.h: removed treeList, since it's not implemented - -Wed Mar 18 02:56:32 1998 Stephan Kulow - - * kfiledetaillist.cpp: fixed sorting again - -1998-03-17 Stephan Kulow - - * added a virtual class KInfoListContent to make an abstraction - for the file contents. Currently there is just one implementation - KFileDetailList - -1998-03-16 Stephan Kulow - - * kfiledialog.cpp: don't accept the first entry of the combo - box as a file name - - * kfiledialog.cpp: added an accelerator for completion, since - KCombo no longer emits such a thing (currently CTRL-A) - - * kdir.cpp: disable parent button in / - - * kfiledialog.cpp: fixed layout of mkdir dialog - - * kdir.cpp: use currentDir instead of homeDir as default - - * kfiledialog.cpp: added member acceptOnlyExisting and set it - for now to always false. I guess, we need an extra parameter for this - - * kfiledialog.cpp: changed dirList and fileList to fix the - focus handling - - * kfileinfolistwidget.cpp: added focus handling - - * kfileinfolistwidget.cpp: added keyevent handling to handle - cursor and enter - - * kfiledialog.cpp: changed the filter edit to a QLineEdit, since - we don't need the completion, but the tabing for focus changes - -Mon Mar 16 11:36:07 1998 Daniel Grana - * added create directory, pops up a modal dialog, should add - a mkdir method to kdir in near future - -Mon Mar 16 20:04:00 1998 Martin Jones - * Added booktoken.* to remove dependancy on tdehtmlw and jscript - -Thu Mar 12 09:32:06 1998 Daniel Grana - * worked on the dir and file completion, should do both now, - text in the location box will be added as much as possible - (right now it's the lowest denominator of dir&file&location-text) - * added sorting for the detailed list, so far only name and size - sorting implemented - * added single click selection for directories - * added a status line, which shows the number of directories and - files showed - -Thu Mar 12 00:36:05 1998 Stephan Kulow - - * kfiledialog.cpp: made a library out of the file selector - * kfiledialog.cpp: added an extra parameter acceptURLs to seperate - between getOpenFileName and getOpenFileURL - -Sun Feb 15 23:13:47 1998 Richard Moore - - * More work on the bookmarks - they should work properly now, you - must create the directory ~/.kde/share/apps/tdeui to store the - bookmarks in. - - * Regenerated docs - -Thu Feb 12 17:27:51 1998 Stephan Kulow - - * kfileinfo.cpp: added determination of group and other things to - be display the correct values in the kfileinfolistwidget - -Thu Feb 12 16:01:44 1998 Stephan Kulow - - * kfiledialog.cpp: removed the #ifdef code. Now the combo box for - the path is the only option - -Tue Feb 10 01:09:16 1998 Richard Moore - - * Added details widget - this is currently selected by a config - file entry, but it there should be a toolbar button. Many changes - to kfiledialog to allow the switch (need an abstract fileview class). - -Fri Feb 6 18:08:14 1998 Stephan Kulow - - * kfiledialog.cpp: replaced the location lineedit with an combo - box. Currently configurable with a compiler define. - -Fri Feb 6 17:07:26 1998 Stephan Kulow - - * kfiledialog.cpp: fixed the en- and decoding of URLs. Now it's - possible to move into directories called "sdasd#sdsd" for example - -Sat Jan 24 17:18:10 1998 Mario Weilguni - - * fixed a bug in kdir.cpp/parsePermissions() - - * implemented error handling for KFM URL errors - -Tue Jan 20 00:51:55 1998 Stephan Kulow - - * kfiledialog.cpp: some fixes to make kfm support more robust - -Mon Jan 19 01:10:11 1998 Stephan Kulow - - * kdir.cpp: re-added ftp support - - * kfiledialog.cpp: take care of the case, when the user enters a - complete filename - - * kdir.cpp: added isReadable() to indicate, that the dir is not - correct - - * kfiledialog.cpp: played a little bit with the geometry management - - -Sun Jan 18 15:00:06 1998 Stephan Kulow - - * kfiledialog.cpp: - back/forward work now as expected - - show the correct filter - - the combo box works now as expected - - * kdir.cpp: check if the directory is correct (for local - files). If not, go back to the old value - - * kfiledialog.cpp: - disable parent button, when in root - - treat the case, that the URL ends with "/" - - strip white spaces out of the location text - - * kfileinfo.cpp: don't insert broken links - - * kfiledialog.cpp: just set the dir, if it's different - from the already set one - -Sun Jan 18 11:53:32 1998 Mario Weilguni - - * symbolic links to subdirectories are now correctly reported as - directories - - * symbolic links are show as italic text - - * The toolbar button "Home" works now as expected diff --git a/kio/kfile/Makefile.am b/kio/kfile/Makefile.am deleted file mode 100644 index 1951f30c0..000000000 --- a/kio/kfile/Makefile.am +++ /dev/null @@ -1,78 +0,0 @@ -# This file is part of the KDE libraries -# Copyright (C) 1997 Stephan Kulow (coolo@kde.org) - -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Library General Public -# License as published by the Free Software Foundation; either -# version 2 of the License, or (at your option) any later version. - -# This library 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 -# Library General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this library; see the file COPYING. If not, write to -# the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -# Boston, MA 02110-1301, USA. - - -INCLUDES= -I$(srcdir)/../libltdl/ -I$(top_srcdir) -I$(top_srcdir)/tdefx \ - -I$(top_builddir)/kio/kio -I$(top_srcdir)/kio/bookmarks $(all_includes) $(LIBART_CFLAGS) - -noinst_LTLIBRARIES = libkfile.la - -METASOURCES = AUTO - -#SUBDIRS = . acl_prop_page - -include_HEADERS = kfiledialog.h kencodingfiledialog.h\ - kdiroperator.h kfileview.h kfilefiltercombo.h \ - kfiledetailview.h kcombiview.h kdiskfreesp.h \ - kfileiconview.h krecentdocument.h \ - kurlrequester.h kfilepreview.h kfile.h \ - kurlcombobox.h kurlrequesterdlg.h kopenwith.h kpropsdlg.h \ - kicondialog.h kdirsize.h kpreviewwidgetbase.h kimagefilepreview.h kfilesharedlg.h \ - kfiletreeview.h kfiletreeviewitem.h kfiletreebranch.h \ - kdirselectdialog.h kurlbar.h kpropertiesdialog.h knotifydialog.h \ - kcustommenueditor.h knotifywidgetbase.h - -noinst_HEADERS = config-kfile.h krecentdirs.h kmetaprops.h \ - kfilebookmarkhandler.h kfilemetainfowidget.h kopenwith_p.h \ - kfilespeedbar.h kpreviewprops.h kacleditwidget.h kacleditwidget_p.h images.h - -libkfile_la_SOURCES = \ - kfilefiltercombo.cpp \ - kfileview.cpp kfileiconview.cpp \ - krecentdocument.cpp kfiledialog.cpp kdiroperator.cpp \ - kfiledetailview.cpp kcombiview.cpp kurlrequester.cpp \ - kfilepreview.cpp kurlcombobox.cpp kurlrequesterdlg.cpp \ - kopenwith.cpp kpropertiesdialog.cpp kicondialog.cpp kdirsize.cpp \ - krecentdirs.cpp kdiskfreesp.cpp kimagefilepreview.cpp kfilesharedlg.cpp \ - kurlbar.cpp kmetaprops.cpp kpreviewprops.cpp \ - kfiletreeview.cpp kfiletreeviewitem.cpp kfiletreebranch.cpp \ - kdirselectdialog.cpp kfilebookmarkhandler.cpp \ - kfilemetainfowidget.cpp kcustommenueditor.cpp knotifywidgetbase.ui \ - knotifydialog.cpp kfilespeedbar.cpp kpreviewwidgetbase.cpp \ - kfilemetapreview.cpp kpropertiesdesktopbase.ui \ - kpropertiesdesktopadvbase.ui kpropertiesmimetypebase.ui \ - kencodingfiledialog.cpp kacleditwidget.cpp - -libkfile_la_COMPILE_FIRST = $(srcdir)/../kio/kdirnotify_stub.h - -EXTRA_DIST = NOTES - -# convenience lib - no _LDFLAGS or _LIBADD ! - -servicetype_DATA = kpropsdlgplugin.desktop -servicetypedir = $(kde_servicetypesdir) - - -#Can't be a module, we need to link to it for readConfig -#kde_module_LTLIBRARIES = libkfileshare.la -#libkfileshare_la_SOURCES = kfileshare.cpp -#libkfileshare_la_LIBADD = libkfile.la -#libkfileshare_la_LDFLAGS = -module $(KDE_PLUGIN) -#kde_services_DATA = kfilesharepropsplugin.desktop - -include $(top_srcdir)/admin/Doxyfile.am diff --git a/kio/kfile/NOTES b/kio/kfile/NOTES deleted file mode 100644 index c3fb6fbcb..000000000 --- a/kio/kfile/NOTES +++ /dev/null @@ -1,100 +0,0 @@ -Rewrite -======= - -Here is the result of a long discussion between the kfile developers -(Carsten) and the konqueror developers (Simon and David), about the plans -for more integration between kfile and konqueror. 16/08/2000. - - - - KDirLister -----(1)---------------------> KFileView (3) - <----(2)------ [Signaller] --- | | - | | - | | - | | - | | - KFileIconView KFileListView - (4) (5) - - -(1) Gives items found when listing, and the key for each item - (KDirLister has all the sorting code) -(2) KFileView inherited classes emit requests for listing a new - directory (with a bool for treeviews), and emit requests for - the mimetype of a given item. If all KFileView inherited classes - are QScrollViews, then it could even implement the "ask for mimetype - of the visible icons first" algorithm, currently in KonqIconView. -(3) KFileView, the base class for any view, knows about KFileItem, has - signals for dropped(), popupMenu(list of actions provided by the view), - has a QWidget * canvas() method, xOffset() and yOffset() -(4) KFileIconView holds a QPtrDict to look up a QIconViewItem quickly from a - given KFileItem. This will help for e.g. deleteItems and refreshItems. -(5) KFileListView holds a QPtrDict to find the QListViewItem for a - KFileItem. It implements different modes if we want the tree view in - kfile ? - - - KFileChooserWidget - -This (base) class is the container widget that can contain any kfileview and -switch between them. It is embeddable into an application that wants a widget -for choosing a file or directory. Features listing, selecting, popupmenu for -switching modes, and a virtual createView( viewmode ) method, which -only knows about the builtin views, in this class. -It knows the current URL, has setURL(), and triggers the listing, connecting -KFileView's requests to KDirLister's methods. - - KFileManagerWidget - -This class inherits from KFileChooserWidget and adds the file management -operations. It uses a KFileOperations class (taken from the current -KonqOperations) for all KIO operations, and it uses KFileUndo, taken from -the KonqUndo stuff. The popupMenu method is reimplemented to add those -operations to it. - - KFileWidget - -This class is the full widget that can be seen in the dialog. It has the -toolbar buttons, the combo, etc. It embeds a KFileChooserWidget or a -KFileManagerWidget, the latter being a specialisation of the former. - -The Konqueror side of things -============================ - - KonqFileIconView - -Inherits KFileIconView and adds image preview - unless we want it in -KFileIconView, and the line-up-icons algorithm, etc. - - KonqFileListView - -Inherits KFileListView to add more stuff if needed. The mc-like text view -could be implemented here as well, unless we want it in kfile. Same for the -tree view. - - KonqFileManagerWidget - -This class inherits KFileManagerWidget and adds the konqueror stuff, like -the enableAction signal. It also reimplements createView to create the -konqueror versions of the views. - - KonqDirPart - -This class inherits KParts::ReadOnlyPart, and provides a BrowserExtension. -It integrates KonqFileManagerWidget as its KParts widget, and provides -KActions for it. - -Important : - -Make sure to take kfind into account. It would be nice if it could use the -same views as konqueror, to have access to all the view modes, as well as -image preview, etc. - -Unrelated: -To Add -====== - -Mime Mappings? - -Filter= ( Mime Type | shell glob list ) -Mime Type -> shell glob list diff --git a/kio/kfile/TODO b/kio/kfile/TODO deleted file mode 100644 index b7bf74ea5..000000000 --- a/kio/kfile/TODO +++ /dev/null @@ -1,17 +0,0 @@ -TODO-List for the KFileDialog and associated classes (in order of importance) - -- are more messageboxes necessary? -- KFD's default dirs configurable -- drag&drop support for the views (somehow into baseclass KFileView? -- KFileView::setSelected( const QRegExp& ) -- separate KDirOperator, location-combo, filter-combo etc. from KFileDialog - to another widget (everything besides OK/Cancel buttons). -- implement in-place editing (rename) + make it configurable in all views -- make a simple fileview based on QListBox -- implement KFile::PreviewInfo -- signal KFileView::selectionCleared() - -If anyone wants to implement some of those, please do. In case of questions, -don't hesitate to ask me. - -Carsten Pfeiffer diff --git a/kio/kfile/config-kfile.h b/kio/kfile/config-kfile.h deleted file mode 100644 index 8715ed273..000000000 --- a/kio/kfile/config-kfile.h +++ /dev/null @@ -1,32 +0,0 @@ -#ifndef CONFIG_KFILE_H -#define CONFIG_KFILE_H - -const int kfile_area = 250; - -#define DefaultViewStyle TQString::fromLatin1("SimpleView") -#define DefaultPannerPosition 40 -#define DefaultMixDirsAndFiles false -#define DefaultShowStatusLine false -#define DefaultShowHidden false -#define DefaultCaseInsensitive true -#define DefaultDirsFirst true -#define DefaultSortReversed false -#define DefaultRecentURLsNumber 15 -#define DefaultDirectoryFollowing true -#define DefaultAutoSelectExtChecked true -#define ConfigGroup TQString::fromLatin1("KFileDialog Settings") -#define RecentURLs TQString::fromLatin1("Recent URLs") -#define RecentFiles TQString::fromLatin1("Recent Files") -#define RecentURLsNumber TQString::fromLatin1("Maximum of recent URLs") -#define RecentFilesNumber TQString::fromLatin1("Maximum of recent files") -#define DialogWidth TQString::fromLatin1("Width (%1)") -#define DialogHeight TQString::fromLatin1("Height (%1)") -#define ConfigShowStatusLine TQString::fromLatin1("ShowStatusLine") -#define AutoDirectoryFollowing TQString::fromLatin1("Automatic directory following") -#define PathComboCompletionMode TQString::fromLatin1("PathCombo Completionmode") -#define LocationComboCompletionMode TQString::fromLatin1("LocationCombo Completionmode") -#define ShowSpeedbar TQString::fromLatin1("Show Speedbar") -#define ShowBookmarks TQString::fromLatin1("Show Bookmarks") -#define AutoSelectExtChecked TQString::fromLatin1("Automatically select filename extension") - -#endif diff --git a/kio/kfile/images.h b/kio/kfile/images.h deleted file mode 100644 index f544e2f0a..000000000 --- a/kio/kfile/images.h +++ /dev/null @@ -1,277 +0,0 @@ -#ifdef USE_POSIX_ACL -#ifndef _QEMBED_1804289383 -#define _QEMBED_1804289383 -#include -#include -static const QRgb group_grey_data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x42484848,0xc39b9b9b,0xeab1b1b1,0xce9d9d9d,0x5a4d4d4d,0x0, - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x563b3b3b,0xfdaeaeae,0xffcfcfcf,0xffcccccc,0xffcecece, - 0xffbababa,0x62393939,0x0,0x0,0x0,0x0,0x0,0x0,0x4525252,0x9383838,0x0,0xd0515151,0xff969696,0xff959595, - 0xff969696,0xff959595,0xff969696,0xdd505050,0x6000000,0x0,0x0,0x0,0xa191919,0x908f8f8f,0xebc1c1c1,0xf6c6c6c6,0xc0a1a1a1,0xf74f4f4f, - 0xff626262,0xff6a6a6a,0xff6c6c6c,0xff6a6a6a,0xff636363,0xfb4a4a4a,0x1a000000,0x0,0x0,0x0,0xa3828282,0xffdfdfdf,0xffdedede,0xffdddddd, - 0xffe0e0e0,0xffa4a4a4,0xff636363,0xff666666,0xff6a6a6a,0xff676767,0xff5f5f5f,0xe6494949,0xd000000,0x0,0x0,0x21232323,0xfca2a2a2,0xffc3c3c3, - 0xffc6c6c6,0xffc6c6c6,0xffc4c4c4,0xffbababa,0xff717171,0xff7e7e7e,0xff7e7e7e,0xff7d7d7d,0xfe6f6f6f,0x812b2b2b,0x0,0x0,0x0,0x3e303030, - 0xffa6a6a6,0xffb7b7b7,0xffbdbdbd,0xffbebebe,0xffb9b9b9,0xffacacac,0xff808080,0xff8f8f8f,0xff939393,0xff909090,0xf86b6b6b,0x34202020,0x0,0x0, - 0x0,0x1c191919,0xf8a5a5a5,0xffc2c2c2,0xffcccccc,0xffcecece,0xffc5c5c5,0xffbababa,0xff888888,0xffa5a5a5,0xffa4a4a4,0xffa5a5a5,0xffa1a1a1,0xd3515151, - 0x8030303,0x0,0x0,0x0,0x8f6f6f6f,0xffd3d3d3,0xffe2e2e2,0xffe3e3e3,0xffdbdbdb,0xff9b9b9b,0xff6f6f6f,0xff727272,0xff6e6e6e,0xff717171, - 0xff707070,0xff606060,0x62363636,0x0,0x0,0x0,0x6e5b5b5b,0xffb4b4b4,0xffd4d4d4,0xffdadada,0xffcecece,0xff737373,0xff656565,0xff676767, - 0xff696969,0xff676767,0xff636363,0xff5d5d5d,0xc44b4b4b,0x0,0x0,0x27343434,0xf5a5a5a5,0xffd1d1d1,0xffd2d2d2,0xffd1d1d1,0xffd1d1d1,0xffc3c3c3, - 0xff7b7b7b,0xff6f6f6f,0xff727272,0xff6f6f6f,0xff696969,0xff626262,0xf7606060,0x16050505,0x0,0xa07d7d7d,0xffb8b8b8,0xffc0c0c0,0xffc2c2c2,0xffc1c1c1, - 0xffc1c1c1,0xffbbbbbb,0xffa6a6a6,0xff868686,0xff858585,0xff838383,0xff838383,0xff878787,0xe95e5e5e,0x19050505,0xd141414,0xf0a2a2a2,0xffbdbdbd,0xffc6c6c6, - 0xffcbcbcb,0xffcbcbcb,0xffc8c8c8,0xffc0c0c0,0xffb8b8b8,0xef8b8b8b,0xd6707070,0xd26a6a6a,0xbb595959,0x82363636,0x24070707,0x0,0x44505050,0xffc0c0c0, - 0xffc7c7c7,0xffd2d2d2,0xffd9d9d9,0xffdadada,0xffd4d4d4,0xffcacaca,0xffc1c1c1,0xc8979797,0x3000000,0x4000000,0x0,0x0,0x0,0x0, - 0x2b393939,0xeeaaaaaa,0xffdadada,0xffe4e4e4,0xffeaeaea,0xffeaeaea,0xffe4e4e4,0xffdddddd,0xffd1d1d1,0xae797979,0x0,0x0,0x0,0x0, - 0x0,0x0,0x0,0x1e0f0f0f,0x76575757,0xae898989,0xc49c9c9c,0xc6a0a0a0,0xbc9a9a9a,0x98808080,0x57414141,0xb000000,0x0,0x0, - 0x0,0x0,0x0,0x0 -}; - -/* Generated by qembed */ -static const QRgb group_data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x4223731d,0xc37fbb7c,0xea9bca98,0xce86b982,0x5a316e2c,0x0, - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x56146610,0xfd8fce8e,0xffbae4bb,0xffb7e2b7,0xffbae3ba, - 0xff9ed89d,0x62166112,0x0,0x0,0x0,0x0,0x0,0x0,0x4003ca5,0x9003171,0x0,0xd0198b17,0xff6ac468,0xff6ec665, - 0xff70c865,0xff6ec665,0xff6ac468,0xdd1a8918,0x6000000,0x0,0x0,0x0,0xa001333,0x905b8cc4,0xeb9fc0e4,0xf6a8c5e4,0xc07a9dc9,0xf7108e1e, - 0xff2eb113,0xff42be17,0xff49c216,0xff44be17,0xff31b214,0xfb109301,0x1a000000,0x0,0x0,0x0,0xa3497ebb,0xffc6def8,0xffc6ddf6,0xffc5ddf6, - 0xffc9e0f8,0xff77abd2,0xff31af18,0xff50cd00,0xff5cd400,0xff52ce00,0xff3bbe00,0xe6218f03,0xd000000,0x0,0x0,0x21042043,0xfc61a0e3,0xff97c3f0, - 0xff9cc7f1,0xff9cc8f1,0xff98c4f0,0xff85b8ef,0xff469d88,0xff7de517,0xff87ed10,0xff7ce417,0xfe5bca14,0x811b5304,0x0,0x0,0x0,0x3e082e58, - 0xff60a7ed,0xff7fbaef,0xff8ac3f1,0xff8bc4f1,0xff83beef,0xff6caeec,0xff4e98b3,0xff88d54a,0xff98e343,0xff89d64a,0xf846a630,0x340c4100,0x0,0x0, - 0x0,0x1c021631,0xf867a7e3,0xff90c9f4,0xffa1d6f8,0xffa4d8f8,0xff96cef5,0xff82bef2,0xff65aca9,0xff8ad576,0xff86d276,0xff88d377,0xff80d072,0xd3279310, - 0x8000700,0x0,0x0,0x0,0x8f3f6f9f,0xffaedcf9,0xffc7effe,0xffc9f0fe,0xffbbe5fc,0xff73b7c4,0xff45ba25,0xff51c61e,0xff50c617,0xff51c61c, - 0xff4bc120,0xff30b50c,0x62206705,0x0,0x0,0x0,0x6e1d5899,0xff81b2e7,0xffb4d7f4,0xffbddcf7,0xffa8cef4,0xff4698a0,0xff45c407,0xff53ce00, - 0xff59d200,0xff54cf00,0xff46c600,0xff34bb00,0xc42d9105,0x0,0x0,0x270a305f,0xf567a5e3,0xffaed3f4,0xffafd4f5,0xffaed4f4,0xffaed3f4,0xff94c2f3, - 0xff4fa782,0xff6cdf00,0xff74e400,0xff6cdf00,0xff5ad300,0xff43c401,0xf742b110,0x16060b00,0x0,0xa0407dba,0xff80bcf1,0xff8ec5f2,0xff92c8f2,0xff91c8f2, - 0xff90c6f2,0xff86bff0,0xff67a8e6,0xff80e02c,0xff95f615,0xff8aee18,0xff7de323,0xff76db33,0xe951a31a,0x19040a00,0xd000f28,0xf066a4de,0xff88c4f2,0xff97cef5, - 0xffa0d4f7,0xffa0d5f7,0xff9ad0f6,0xff8dc7f3,0xff7ebcf2,0xef6ea88b,0xd679b12f,0xd271a82d,0xbb5c9221,0x8235600c,0x24060d02,0x0,0x44184c89,0xff8cc6f4, - 0xff99d0f6,0xffabddfa,0xffb7e6fc,0xffb8e6fc,0xffaee0fb,0xff9ed4f7,0xff90c9f3,0xc86697c9,0x3000000,0x4000000,0x0,0x0,0x0,0x0, - 0x2b0e3664,0xee7caed8,0xffb9e4fc,0xffcaf1fe,0xffd5f6ff,0xffd6f7ff,0xffcbf2fe,0xffbee8fc,0xffa9d6f9,0xae5378a0,0x0,0x0,0x0,0x0, - 0x0,0x0,0x0,0x1e020c1d,0x7634547a,0xae6a88a8,0xc4849bb4,0xc689a0b8,0xbc7d9ab7,0x98627f9f,0x572c3e56,0xb000000,0x0,0x0, - 0x0,0x0,0x0,0x0 -}; - -static const QRgb mask_data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x11c84a00,0x1000000,0x0,0x0,0x0,0x0,0x0, - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x68d14e00,0xffda6400,0x72bf4700,0x3000000,0x0,0x0, - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x14d04d00,0xefda6400,0xfffec300,0xf2d86300,0x24742b00, - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x98d14e00,0xfff3b537,0xfffffed6, - 0xfff3b537,0xa5c04800,0x6000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x30cf4d00,0xfbe17803, - 0xfff1e7ad,0xffcacaba,0xfff1e7ac,0xfce07803,0x42973800,0x1000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, - 0xc4d35300,0xfffad45c,0xffc0c0b2,0xff979797,0xffb2b2a9,0xfffad45a,0xccca5000,0xa000000,0x0,0x0,0x0,0x0,0x0,0x0, - 0x0,0x58d14e00,0xffe89410,0xfffffcbd,0xffc6c6af,0xff929292,0xffbdbda8,0xfffffcb9,0xffe8930e,0x69b04100,0x2000000,0x0,0x0,0x0, - 0x0,0x0,0x8cb4c00,0xe3d76000,0xfffeec6c,0xffffffbe,0xffe2e2b2,0xff878787,0xffd5d5a8,0xffffffb7,0xfffeeb62,0xe8d35e00,0x17491b00,0x0, - 0x0,0x0,0x0,0x0,0x84d14e00,0xfff0b41a,0xfffffea3,0xffffffa8,0xfffbfba7,0xff7b7b76,0xfff6f6a0,0xffffff9c,0xfffffe8e,0xfff0b414, - 0x92bd4600,0x4000000,0x0,0x0,0x0,0x20d04d00,0xf7dd7400,0xfffff85e,0xffffff89,0xffffff8b,0xffffff8a,0xffc3c376,0xffffff82,0xffffff7b, - 0xffffff71,0xfffff746,0xf9db7300,0x32873200,0x0,0x0,0x0,0xa8d25200,0xfff6d518,0xffffff61,0xffffff65,0xffffff65,0xffecec60,0xff9f9f52, - 0xffe6e657,0xffffff54,0xffffff4c,0xffffff44,0xfff6d50e,0xb4c54c00,0x8000000,0x0,0x40d04e00,0xffe49001,0xfffffd2b,0xffffff3a,0xffffff3d,0xffffff3d, - 0xff9b9b33,0xff272727,0xff84842a,0xffffff2e,0xffffff28,0xffffff22,0xfffffd18,0xffe49000,0x52a33c00,0x2000000,0xd0d55b00,0xfffcef07,0xffffff17,0xffffff1a, - 0xffffff1b,0xffffff1b,0xffeaea19,0xff8c8c16,0xffdbdb13,0xffffff10,0xffffff0d,0xffffff0a,0xffffff07,0xfffcef02,0xd7ce5800,0xc000000,0xe4d55d00,0xffe49204, - 0xffe4940a,0xffe4950c,0xffe4960d,0xffe4950c,0xffe4950c,0xffe4940a,0xffe49308,0xffe49307,0xffe49205,0xffe39204,0xffe39102,0xffe39100,0xead05b00,0x1c000000, - 0x13582100,0x3c702900,0x40692700,0x40692700,0x40692700,0x40692700,0x40692700,0x40692700,0x40692700,0x40692700,0x40692700,0x40692700,0x40692700,0x40692700, - 0x29290f00,0xc000000,0x0,0x2000000,0x2000000,0x2000000,0x2000000,0x2000000,0x2000000,0x2000000,0x2000000,0x2000000,0x2000000,0x2000000, - 0x2000000,0x2000000,0x2000000,0x0 -}; - -static const QRgb others_grey_data[] = { - 0x0,0x0,0x0,0xa4c4c4c,0x5d676767,0x777c7c7c,0x3d555555,0x0,0x0,0x0,0x0,0x0,0x0,0x0, - 0x0,0x0,0x0,0x0,0x17535353,0xd2afafaf,0xffebebeb,0xffe5e5e5,0xfec2c2c2,0x906d6d6d,0x0,0x0,0x0,0x0, - 0x0,0x0,0x0,0x0,0x0,0x0,0xa09c9c9c,0xfff1f1f1,0xfff5f5f5,0xffe6e6e6,0xffd4d4d4,0xffbebebe,0x4c424242,0x117b7b7b, - 0x357d7d7d,0x177c7c7c,0x0,0x0,0x0,0x0,0x0,0x606060,0xe4b4b4b4,0xffe1e1e1,0xffe4e4e4,0xffdcdcdc,0xffcecece,0xffc0c0c0, - 0xd9858585,0xf3d5d5d5,0xffe6e6e6,0xf8cdcdcd,0x8c828282,0x2030303,0x0,0x0,0x0,0x0,0xdcaaaaaa,0xffd0d0d0,0xffd2d2d2,0xffcecece, - 0xffc5c5c5,0xffa3a3a3,0xffe8e8e8,0xfffbfbfb,0xfff4f4f4,0xffeaeaea,0xffe0e0e0,0x6f767676,0x0,0x0,0x0,0x0,0x7e848484,0xffc3c3c3, - 0xffc3c3c3,0xffbfbfbf,0xffaeaeae,0xffaaaaaa,0xfff1f1f1,0xfff2f2f2,0xffefefef,0xffe6e6e6,0xffe0e0e0,0xcba6a6a6,0x0,0x0,0x0,0xc3f3f3f, - 0xb8858585,0xff8f8f8f,0xff969696,0xff919191,0xff787878,0xffa5a5a5,0xffe7e7e7,0xffe8e8e8,0xffe5e5e5,0xffe1e1e1,0xffdcdcdc,0xd4a6a6a6,0x0,0x0, - 0x0,0xa1959595,0xffdbdbdb,0xffe3e3e3,0xff999999,0xff7a7a7a,0xffb9b9b9,0xffb5b5b5,0xffdedede,0xffe0e0e0,0xffdfdfdf,0xffdbdbdb,0xffd1d1d1,0x8e898989, - 0x0,0x0,0x28363636,0xfcb2b2b2,0xffdadada,0xffededed,0xfff5f5f5,0xffd5d5d5,0xfff5f5f5,0xffcbcbcb,0xffb7b7b7,0xffd2d2d2,0xffd3d3d3,0xffc8c8c8, - 0xffb2b2b2,0x78979797,0x0,0x0,0x694b4b4b,0xffafafaf,0xffc8c8c8,0xffd1d1d1,0xffd8d8d8,0xffdbdbdb,0xffb9b9b9,0xffd7d7d7,0xffe4e4e4,0xffc3c3c3, - 0xffa0a0a0,0xffb9b9b9,0xffd2d2d2,0xffdbdbdb,0x5e979797,0x0,0x70434343,0xff9c9c9c,0xffadadad,0xffb6b6b6,0xffbbbbbb,0xffbbbbbb,0xffb0b0b0,0xffdfdfdf, - 0xfff5f5f5,0xfff8f8f8,0xfff2f2f2,0xfff8f8f8,0xfff6f6f6,0xffe3e3e3,0xe6bababa,0x90b0b0b,0x30232323,0xfb767676,0xff939393,0xff9a9a9a,0xff9f9f9f,0xff969696, - 0xffbbbbbb,0xffdadada,0xffe3e3e3,0xffe8e8e8,0xffeaeaea,0xffe9e9e9,0xffe5e5e5,0xffdedede,0xffc8c8c8,0x41363636,0x0,0x5a2e2e2e,0xde5b5b5b,0xfe707070, - 0xff7a7a7a,0xff727272,0xffb3b3b3,0xffcbcbcb,0xffd1d1d1,0xffd6d6d6,0xffd8d8d8,0xffd7d7d7,0xffd3d3d3,0xffcecece,0xffbfbfbf,0x57424242,0x0,0x0, - 0x4000000,0x20050505,0x33070707,0x3b181818,0xf2959595,0xffbababa,0xffbfbfbf,0xffc3c3c3,0xffc5c5c5,0xffc4c4c4,0xffc1c1c1,0xffbcbcbc,0xfe9f9f9f,0x321d1d1d, - 0x0,0x0,0x0,0x0,0x0,0x0,0x5c5f5f5f,0xf08a8a8a,0xffa7a7a7,0xffb0b0b0,0xffb2b2b2,0xffb0b0b0,0xffa9a9a9,0xf98e8e8e, - 0x874c4c4c,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xf101010,0x4a2b2b2b,0x65424242,0x6c4a4a4a,0x67444444, - 0x542e2e2e,0x200f0f0f,0x0,0x0 -}; - -static const QRgb others_data[] = { - 0x0,0x0,0x0,0xa804618,0x5d95643a,0x77a77c52,0x3d855126,0x0,0x0,0x0,0x0,0x0,0x0,0x0, - 0x0,0x0,0x0,0x0,0x17964f11,0xd2cfb190,0xfff8efdf,0xffffeccb,0xfeedce98,0x909b703f,0x0,0x0,0x0,0x0, - 0x0,0x0,0x0,0x0,0x0,0x0,0xa0d29e66,0xfffff7e3,0xfffff8ec,0xffffedce,0xffffe0a9,0xfff5cd88,0x4c6f4316,0x11f72300, - 0x35fb2b00,0x17f82200,0x0,0x0,0x0,0x0,0x0,0xc15b00,0xe4ebbc7d,0xffffeac4,0xffffecca,0xffffe5b9,0xfffedb9e,0xfff4d38d, - 0xd9c76844,0xf3f6b8b4,0xfffcdad0,0xf8f5b3a6,0x8cba524a,0x2070000,0x0,0x0,0x0,0x0,0xdce9b56b,0xfffedda3,0xffffdea6,0xfffedb9e, - 0xfff8d592,0xffdf9f67,0xfffadad6,0xfffffaf8,0xfffef0ea,0xfffee2d6,0xfffed4c3,0x6fac4f41,0x0,0x0,0x0,0x0,0x7ecd933c,0xfff7d390, - 0xfff6d390,0xfff3d08b,0xffe6c377,0xffe29c73,0xfffeece4,0xfffeeee7,0xfffee9e0,0xfffddecf,0xfff9d8c8,0xcbd0927d,0x0,0x0,0x0,0xc007f00, - 0xb85db05a,0xffbbae64,0xffd4ab58,0xffd0a952,0xffba9636,0xffd9a571,0xfffddfd2,0xfffee0d3,0xfffdddce,0xfffbd8c8,0xfff6d2c2,0xd4d3927a,0x0,0x0, - 0x0,0xa171b973,0xffd4e9ce,0xffd4f2d5,0xffb2a680,0xffdb301a,0xff9cde94,0xffd3c097,0xfffbd4c2,0xfffad7c6,0xfff9d6c6,0xfff6d2c0,0xfff8c2ab,0x8ec26d51, - 0x0,0x0,0x28026b11,0xfc9ed391,0xffd4efc6,0xffeaf8e2,0xfff2fcee,0xffe5cdc6,0xfff4fcee,0xffb5cbe1,0xffd19da5,0xfff9c2ab,0xfff8c5ae,0xfff9b398, - 0xffd6918f,0x785982d5,0x0,0x0,0x691d792e,0xff9edc82,0xffbdeaa7,0xffc8edb6,0xffd0f0c0,0xffd4f2c4,0xffa8cac2,0xffbdccf2,0xffcfdefa,0xffbcb5d2, - 0xff9a91b0,0xffaba8ca,0xffaaccfb,0xffc4d1f2,0x5e6184ce,0x0,0x70196d2d,0xff88d663,0xff9dde7c,0xffa8e28a,0xffaee493,0xffb0e493,0xff89add8,0xffc6dbf8, - 0xffebf5ff,0xfff1f7ff,0xffe6f3ff,0xfff2f8ff,0xffeef6ff,0xffcfe0f8,0xe694b1e1,0x9000317,0x30004626,0xfb57b03d,0xff7ed651,0xff86d75e,0xff8cd966,0xff7cc16b, - 0xff84aff2,0xffb6dafe,0xffc8e4ff,0xffd2eaff,0xffd6ebff,0xffd4eaff,0xffcce6ff,0xffbee0ff,0xff96c2fb,0x410e1f5e,0x0,0x5a104c2a,0xde3b882f,0xfe51aa37, - 0xff5cb83c,0xff4e9c49,0xff70a8f6,0xff98cdff,0xffa4d3ff,0xffaed7ff,0xffb1d8ff,0xffb0d8ff,0xffa8d4ff,0xff9dcfff,0xff81bcfe,0x57132571,0x0,0x0, - 0x4000001,0x2000020a,0x3300080f,0x3b000d31,0xf24a83e0,0xff76bdff,0xff80c2ff,0xff88c5ff,0xff8cc6ff,0xff8ac6ff,0xff84c2ff,0xff7abeff,0xfe5694e9,0x32030738, - 0x0,0x0,0x0,0x0,0x0,0x0,0x5c1429ab,0xf03d77d8,0xff57a3f7,0xff62b0fe,0xff65b2ff,0xff63b1fe,0xff5aa6f9,0xf9427edb, - 0x87152a83,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xf000021,0x4a020554,0x650b167a,0x6c0e1d86,0x670c187d, - 0x5403065a,0x2000001e,0x0,0x0 -}; - -static const QRgb user_green_data[] = { - 0x0,0x0,0x0,0x0,0x5029,0x6c1c6e21,0xe332aa3b,0xf83ac841,0xf838c83f,0xda369a3b,0x5a145819,0x0,0x0,0x0, - 0x0,0x0,0x0,0x0,0x0,0x0,0x7e1a6c1e,0xff32da39,0xff3de341,0xff3ee045,0xff3ee042,0xff3de345,0xff27d930,0x68125817, - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1f013105,0xf721a328,0xff22de27,0xff23dd27,0xff26dc26,0xff26dc2a,0xff22de27, - 0xff22de27,0xee268c2b,0x12001402,0x0,0x0,0x0,0x0,0x0,0x0,0x5c0b590f,0xff19b51d,0xff1ecc1e,0xff1dd31d,0xff22d41e, - 0xff1ed41e,0xff1cd21c,0xff1dcb21,0xff18b01b,0x4d093d0d,0x0,0x0,0x0,0x0,0x0,0x0,0x640f5f13,0xff18bc18,0xff1ec61a, - 0xff1ed119,0xff22d519,0xff22d519,0xff22ce1a,0xff1fc31b,0xff16be1a,0x5a0e4211,0x0,0x0,0x0,0x0,0x0,0x0,0x38033507, - 0xff1db91d,0xff21d818,0xff24e616,0xff2aec16,0xff2aec16,0xff24e416,0xff21d418,0xfd20b020,0x35031b05,0x0,0x0,0x0,0x0,0x0, - 0x0,0x2000000,0xbb2a702c,0xff2df018,0xff3af41c,0xff48f620,0xff46fa1c,0xff39f21a,0xff23ef13,0xb929632c,0x4000000,0x0,0x0,0x0, - 0x0,0x0,0x0,0x0,0x2e012703,0xfc279129,0xff3fe729,0xff5ff537,0xff5bf632,0xff2ef11f,0xf6298f2e,0x29010d02,0x0,0x0, - 0x0,0x0,0x0,0x0,0x0,0x6000e07,0xc41f7721,0xff1ee01e,0xff29dd2d,0xff22de27,0xff22de27,0xff2bdf34,0xff1ddf21,0xab227226, - 0x1000000,0x0,0x0,0x0,0x0,0x0,0x0,0x6d136117,0xff1bc31b,0xff1ee01e,0xff24e020,0xff25e220,0xff25e220,0xff20e020, - 0xff20dc20,0xff1bbf1e,0x561b571f,0x0,0x0,0x0,0x0,0x0,0x8001205,0xe2268e29,0xff1eca1a,0xff23d41a,0xff23d81a,0xff23d81a, - 0xff23d81a,0xff23d81a,0xff24d11b,0xff1fc71b,0xd12a882c,0x4000000,0x0,0x0,0x0,0x0,0x4a0e5012,0xff1cc818,0xff21d119,0xff25db17, - 0xff25e117,0xff24e616,0xff24e616,0xff27df19,0xff21da18,0xff22cf19,0xff18c418,0x3a173d19,0x0,0x0,0x0,0x0,0x982b732c,0xff1ed915, - 0xff25dd17,0xff28ec14,0xff32f018,0xff34f21a,0xff32f218,0xff2af016,0xff28ea14,0xff20db17,0xff1bd317,0x85316f34,0x0,0x0,0x0,0x0, - 0xbf318131,0xff22e818,0xff2aea16,0xff39ef1b,0xff44fa1a,0xff4dfa1e,0xff4dfa1e,0xff3ff71b,0xff30f016,0xff2ae616,0xff20e616,0xb3337936,0x0,0x0, - 0x0,0x0,0x51134b16,0xed369834,0xff2ef11f,0xff54f828,0xff67fc2c,0xff6bfb33,0xff6ffc30,0xff5ffc28,0xff48f925,0xff30f41c,0xec33a135,0x561b3d1e, - 0x0,0x0,0x0,0x0,0x0,0x18000802,0x60113b14,0x9d315f33,0xbb417143,0xc6467848,0xc6467a48,0xbc417942,0x9e3c663e,0x64224225, - 0x1c020604,0x0,0x0,0x0 -}; - -static const QRgb user_grey_data[] = { - 0x0,0x0,0x0,0x0,0x404040,0x6c6e6e6e,0xe3b0b0b0,0xf8cecece,0xf8cccccc,0xdaa6a6a6,0x5a575757,0x0,0x0,0x0, - 0x0,0x0,0x0,0x0,0x0,0x0,0x7e6b6b6b,0xffd6d6d6,0xffe6e6e6,0xffe4e4e4,0xffe4e4e4,0xffe6e6e6,0xffcccccc,0x68555555, - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1f282828,0xf79d9d9d,0xffcccccc,0xffcdcdcd,0xffcecece,0xffcecece,0xffcccccc, - 0xffcccccc,0xee8f8f8f,0x12101010,0x0,0x0,0x0,0x0,0x0,0x0,0x5c515151,0xffa5a5a5,0xffbbbbbb,0xffc0c0c0,0xffc1c1c1, - 0xffc1c1c1,0xffbfbfbf,0xffbababa,0xffa0a0a0,0x4d383838,0x0,0x0,0x0,0x0,0x0,0x0,0x64585858,0xffaaaaaa,0xffb4b4b4, - 0xffbcbcbc,0xffbfbfbf,0xffbfbfbf,0xffbababa,0xffb2b2b2,0xffa9a9a9,0x5a404040,0x0,0x0,0x0,0x0,0x0,0x0,0x382e2e2e, - 0xffababab,0xffc0c0c0,0xffc9c9c9,0xffcfcfcf,0xffcecece,0xffc8c8c8,0xffbdbdbd,0xfda6a6a6,0x35181818,0x0,0x0,0x0,0x0,0x0, - 0x0,0x2000000,0xbb7c7c7c,0xffd3d3d3,0xffd9d9d9,0xffdfdfdf,0xffdedede,0xffd7d7d7,0xffcecece,0xb9717171,0x4000000,0x0,0x0,0x0, - 0x0,0x0,0x0,0x0,0x2e202020,0xfc939393,0xffdadada,0xfff0f0f0,0xffededed,0xffdadada,0xf6949494,0x290c0c0c,0x0,0x0, - 0x0,0x0,0x0,0x0,0x0,0x60c0c0c,0xc4787878,0xffcbcbcb,0xffd2d2d2,0xffcccccc,0xffcccccc,0xffd4d4d4,0xffc9c9c9,0xab777777, - 0x1000000,0x0,0x0,0x0,0x0,0x0,0x0,0x6d5d5d5d,0xffb2b2b2,0xffcbcbcb,0xffcccccc,0xffcecece,0xffcecece,0xffcccccc, - 0xffcacaca,0xffafafaf,0x565c5c5c,0x0,0x0,0x0,0x0,0x0,0x80f0f0f,0xe2909090,0xffb7b7b7,0xffbebebe,0xffc1c1c1,0xffc1c1c1, - 0xffc1c1c1,0xffc1c1c1,0xffbdbdbd,0xffb5b5b5,0xd18f8f8f,0x4000000,0x0,0x0,0x0,0x0,0x4a4c4c4c,0xffb3b3b3,0xffbbbbbb,0xffc2c2c2, - 0xffc7c7c7,0xffc9c9c9,0xffc9c9c9,0xffc6c6c6,0xffc1c1c1,0xffb9b9b9,0xffb0b0b0,0x3a434343,0x0,0x0,0x0,0x0,0x987e7e7e,0xffbfbfbf, - 0xffc4c4c4,0xffcdcdcd,0xffd3d3d3,0xffd6d6d6,0xffd5d5d5,0xffd1d1d1,0xffcbcbcb,0xffc2c2c2,0xffbbbbbb,0x85808080,0x0,0x0,0x0,0x0, - 0xbf8e8e8e,0xffcccccc,0xffcccccc,0xffd5d5d5,0xffdddddd,0xffe0e0e0,0xffe0e0e0,0xffdbdbdb,0xffd2d2d2,0xffcacaca,0xffcacaca,0xb38a8a8a,0x0,0x0, - 0x0,0x0,0x514b4b4b,0xeda4a4a4,0xffdadada,0xffe7e7e7,0xffededed,0xfff1f1f1,0xfff0f0f0,0xffeaeaea,0xffe4e4e4,0xffdadada,0xeca9a9a9,0x56474747, - 0x0,0x0,0x0,0x0,0x0,0x18070707,0x603e3e3e,0x9d747474,0xbb8e8e8e,0xc6989898,0xc69a9a9a,0xbc959595,0x9e828282,0x64505050, - 0x1c070707,0x0,0x0,0x0 -}; - -static const QRgb user_data[] = { - 0x0,0x0,0x0,0x0,0x7f,0x6c2c68af,0xe384abdb,0xf8b2ccea,0xf8aecae9,0xda7ba3d1,0x5a20508d,0x0,0x0,0x0, - 0x0,0x0,0x0,0x0,0x0,0x0,0x7e2a66ac,0xffb8d4f3,0xffd2e5f9,0xffd0e3f8,0xffcfe3f8,0xffd3e5f9,0xffa7c9f0,0x681d4e8c, - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1f02244d,0xf75c9ade,0xffa6cbf2,0xffa7ccf2,0xffa9cef2,0xffa9cdf2,0xffa6ccf2, - 0xffa6ccf2,0xee4d8bd0,0x12000d1f,0x0,0x0,0x0,0x0,0x0,0x0,0x5c124c8f,0xff60a4ea,0xff88bcee,0xff8fc1f0,0xff92c4f0, - 0xff92c3f0,0xff8ec0f0,0xff85baee,0xff579fe9,0x4d0f3460,0x0,0x0,0x0,0x0,0x0,0x0,0x64185598,0xff67acec,0xff7ab8ee, - 0xff87c1f1,0xff8cc5f2,0xff8cc5f2,0xff84c0f0,0xff76b6ed,0xff63a9ee,0x5a173d69,0x0,0x0,0x0,0x0,0x0,0x0,0x38052a56, - 0xff6caee9,0xff8cc6f3,0xff9cd2f6,0xffa5d8f8,0xffa4d7f8,0xff99d0f6,0xff88c3f2,0xfd68a7e4,0x3505152b,0x0,0x0,0x0,0x0,0x0, - 0x0,0x2000000,0xbb447bb3,0xffabdbfa,0xffb6e4fc,0xffc0ecfe,0xffbeebfe,0xffb3e2fb,0xffa2d6f9,0xb9426e9f,0x4000000,0x0,0x0,0x0, - 0x0,0x0,0x0,0x0,0x2e011c3e,0xfc5491d2,0xffbce2f8,0xffe1f6fe,0xffdcf5fe,0xffb9e0fb,0xf65790d0,0x29010b17,0x0,0x0, - 0x0,0x0,0x0,0x0,0x0,0x6000017,0xc43276be,0xffa2cbf3,0xffb0d1f3,0xffa6cbf2,0xffa6cbf2,0xffb4d2f4,0xff9ec9f3,0xab3774b7, - 0x1000000,0x0,0x0,0x0,0x0,0x0,0x0,0x6d1f599b,0xff76b3ed,0xffa3ccf3,0xffa5cff3,0xffa7d0f4,0xffa7d0f4,0xffa5cef3, - 0xffa2ccf2,0xff71afed,0x562c578c,0x0,0x0,0x0,0x0,0x0,0x800071e,0xe24f8fd0,0xff7ebaef,0xff8bc4f1,0xff90c7f2,0xff8fc7f2, - 0xff8fc6f2,0xff8fc6f2,0xff89c2f0,0xff7bb8ee,0xd1538dca,0x4000000,0x0,0x0,0x0,0x0,0x4a164781,0xff77b8ef,0xff85c2f1,0xff90caf4, - 0xff98cff5,0xff9cd2f6,0xff9bd1f6,0xff97cef5,0xff8ec8f3,0xff82bff0,0xff72b2ee,0x3a244062,0x0,0x0,0x0,0x0,0x98447db7,0xff8ac5f4, - 0xff94ccf4,0xffa1d6f8,0xffabddfa,0xffb0e0fb,0xffafe0fb,0xffa8dbfa,0xff9ed4f7,0xff90c9f4,0xff83c0f3,0x854d7cb2,0x0,0x0,0x0,0x0, - 0xbf5a8fc1,0xffa1d2f6,0xffa0d6f7,0xffafe0fa,0xffbceafe,0xffc2eefe,0xffc2eefe,0xffb9e8fd,0xffaaddfa,0xff9ed3f6,0xff9dd0f6,0xb35a88ba,0x0,0x0, - 0x0,0x0,0x511f4776,0xed77a7d1,0xffb8e0fb,0xffcff1fe,0xffdaf8ff,0xffe2f9ff,0xffe0f9ff,0xffd5f6ff,0xffcaeefe,0xffb8e1fc,0xec7ca9d6,0x562c4462, - 0x0,0x0,0x0,0x0,0x0,0x1800030d,0x601b3a61,0x9d4f7198,0xbb6e8cad,0xc67d96b3,0xc67d98b6,0xbc7494b5,0x9e6180a3,0x64364c69, - 0x1c040409,0x0,0x0,0x0 -}; - -static const QRgb yes_data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, - 0x0,0x0,0x0,0x0,0x11049c00,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, - 0x0,0x0,0x0,0x1005a200,0x800ba600,0xd512a700,0xe1009d00,0x34007700,0x1000000,0x0,0x0,0x0,0x0,0x0, - 0x0,0x0,0x0,0x8009500,0x78009b00,0xf0039f03,0xe2009800,0x46003700,0xbb009300,0xeb11a111,0x35006f00,0x1000000,0x0,0x0, - 0x0,0x0,0x0,0x8008d00,0x70009300,0xe819ab19,0xff3ec63e,0xd4099109,0x45002c00,0xf000000,0x6f008900,0xff33d633,0xeb0a9e0a,0x35006800, - 0x1000000,0x0,0x0,0x4008900,0x6c008a00,0xe8099e09,0xff2cd52c,0xff3bd93b,0xcb048404,0x3c001c00,0xc000000,0x0,0x28007a00,0xff0abc0a, - 0xff10f410,0xeb019701,0x35006100,0x5006d00,0x60008100,0xdc009800,0xff06d206,0xff13fd13,0xff11ce11,0xc2017801,0x32000b00,0xa000000,0x0,0x0, - 0x1000000,0xde009100,0xff00f700,0xff00eb00,0xeb008e00,0xde008700,0xff00c400,0xff00f500,0xff00f700,0xff00c100,0xae006700,0x30000b00,0x8000000,0x0, - 0x0,0x0,0x0,0x97007100,0xff00dc00,0xff00eb00,0xff00e500,0xff00e700,0xff00eb00,0xff00eb00,0xff00a800,0xa2005c00,0x29000000,0x6000000, - 0x0,0x0,0x0,0x0,0x0,0x4c006600,0xff00af00,0xff00de00,0xff00de00,0xff00de00,0xff00dc00,0xff009600,0x96005100,0x24000000, - 0x5000000,0x0,0x0,0x0,0x0,0x0,0x0,0xa004e00,0xf8008200,0xff00d200,0xff00d200,0xff00ce00,0xfc008700,0x80004100, - 0x21000000,0x4000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xbb005f00,0xff00c300,0xff00c100,0xf6007500, - 0x76003800,0x1d000000,0x2000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x6f005800,0xff009700, - 0xf4006d00,0x6c003200,0x19000000,0x2000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, - 0x28005300,0xed005900,0x5a002800,0x16000000,0x1000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, - 0x0,0x0,0x1000000,0x15000000,0x12000000,0x1000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, - 0x0,0x0,0x0,0x0 -}; - -static const QRgb yespartial_data[] = { - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, - 0x0,0x0,0x0,0x0,0x114e4e4e,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, - 0x0,0x0,0x0,0x10515151,0x80535353,0xd5535353,0xe14e4e4e,0x343b3b3b,0x1000000,0x0,0x0,0x0,0x0,0x0, - 0x0,0x0,0x0,0x84a4a4a,0x784d4d4d,0x9e515151,0xe24c4c4c,0x461b1b1b,0xbb494949,0xeb595959,0x35373737,0x1000000,0x0,0x0, - 0x0,0x0,0x0,0x8464646,0x70494949,0xe8626262,0x93828282,0xc34d4d4d,0x45161616,0xf000000,0x6f444444,0x8c848484,0xcf545454,0x35343434, - 0x1000000,0x0,0x0,0x4444444,0x6c454545,0xe5535353,0x57808080,0x5e8a8a8a,0xcb444444,0x3c0e0e0e,0xc000000,0x0,0x283d3d3d,0xa7636363, - 0x32828282,0xeb4c4c4c,0x35303030,0x5363636,0x60404040,0xdc4c4c4c,0x756c6c6c,0x2b888888,0x7b6f6f6f,0xc23c3c3c,0x32050505,0xa000000,0x0,0x0, - 0x1000000,0xde484848,0x3c7b7b7b,0x1f757575,0xeb474747,0xde434343,0x80626262,0x3c7a7a7a,0x337b7b7b,0x56606060,0xae333333,0x30050505,0x8000000,0x0, - 0x0,0x0,0x0,0x97383838,0x4c6e6e6e,0xa757575,0x3727272,0x24737373,0x2b757575,0x27757575,0x75545454,0x952e2e2e,0x29000000,0x6000000, - 0x0,0x0,0x0,0x0,0x0,0x4c333333,0x8e575757,0x1c6f6f6f,0x46f6f6f,0xb6f6f6f,0x2b6e6e6e,0x994b4b4b,0x85282828,0x24000000, - 0x5000000,0x0,0x0,0x0,0x0,0x0,0x0,0xa272727,0xdc414141,0x3d696969,0x11696969,0x1e676767,0x91434343,0x77202020, - 0x21000000,0x4000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xbb2f2f2f,0x5d616161,0x36606060,0x893a3a3a, - 0x761c1c1c,0x1d000000,0x2000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x6f2c2c2c,0x9a4b4b4b, - 0x9b363636,0x6c191919,0x19000000,0x2000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, - 0x28292929,0xed2c2c2c,0x5a141414,0x16000000,0x1000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, - 0x0,0x0,0x1000000,0x15000000,0x12000000,0x1000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, - 0x0,0x0,0x0,0x0 -}; - -static struct EmbedImage { - int width, height, depth; - const unsigned char *data; - int numColors; - const QRgb *colorTable; - bool alpha; - const char *name; -} embed_image_vec[] = { - { 16, 16, 32, (const unsigned char*)group_grey_data, 0, 0, TRUE, "group-grey" }, - { 16, 16, 32, (const unsigned char*)group_data, 0, 0, TRUE, "group" }, - { 16, 16, 32, (const unsigned char*)mask_data, 0, 0, TRUE, "mask" }, - { 16, 16, 32, (const unsigned char*)others_grey_data, 0, 0, TRUE, "others-grey" }, - { 16, 16, 32, (const unsigned char*)others_data, 0, 0, TRUE, "others" }, - { 16, 16, 32, (const unsigned char*)user_green_data, 0, 0, TRUE, "user-green" }, - { 16, 16, 32, (const unsigned char*)user_grey_data, 0, 0, TRUE, "user-grey" }, - { 16, 16, 32, (const unsigned char*)user_data, 0, 0, TRUE, "user" }, - { 16, 16, 32, (const unsigned char*)yes_data, 0, 0, TRUE, "yes" }, - { 16, 16, 32, (const unsigned char*)yespartial_data, 0, 0, TRUE, "yespartial" }, - { 0, 0, 0, 0, 0, 0, 0, 0 } -}; - -static const TQImage& qembed_findImage( const TQString& name ) -{ - static TQDict dict; - TQImage* img = dict.find( name ); - if ( !img ) { - for ( int i = 0; embed_image_vec[i].data; i++ ) { - if ( strcmp(embed_image_vec[i].name, name.latin1()) == 0 ) { - img = new TQImage((uchar*)embed_image_vec[i].data, - embed_image_vec[i].width, - embed_image_vec[i].height, - embed_image_vec[i].depth, - (QRgb*)embed_image_vec[i].colorTable, - embed_image_vec[i].numColors, - TQImage::BigEndian ); - if ( embed_image_vec[i].alpha ) - img->setAlphaBuffer( TRUE ); - dict.insert( name, img ); - break; - } - } - if ( !img ) { - static TQImage dummy; - return dummy; - } - } - return *img; -} - -#endif -#endif diff --git a/kio/kfile/kacleditwidget.cpp b/kio/kfile/kacleditwidget.cpp deleted file mode 100644 index 7f253f8c5..000000000 --- a/kio/kfile/kacleditwidget.cpp +++ /dev/null @@ -1,1054 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2005 by Sean Harmer * - * Till Adam * - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU Library 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 "kacleditwidget.h" -#include "kacleditwidget_p.h" - -#ifdef USE_POSIX_ACL - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -#ifdef HAVE_ACL_LIBACL_H -# include -#endif -extern "C" { -#include -#include -} -#include - -#include "images.h" - -static struct { - const char* label; - const char* pixmapName; - TQPixmap* pixmap; -} s_itemAttributes[] = { - { I18N_NOOP( "Owner" ), "user-grey", 0 }, - { I18N_NOOP( "Owning Group" ), "group-grey", 0 }, - { I18N_NOOP( "Others" ), "others-grey", 0 }, - { I18N_NOOP( "Mask" ), "mask", 0 }, - { I18N_NOOP( "Named User" ), "user", 0 }, - { I18N_NOOP( "Named Group" ), "group", 0 }, -}; - -KACLEditWidget::KACLEditWidget( TQWidget *parent, const char *name ) - :TQWidget( parent, name ) -{ - TQHBox *hbox = new TQHBox( parent ); - hbox->setSpacing( KDialog::spacingHint() ); - m_listView = new KACLListView( hbox, "acl_listview" ); - connect( m_listView, TQT_SIGNAL( selectionChanged() ), - this, TQT_SLOT( slotUpdateButtons() ) ); - TQVBox *vbox = new TQVBox( hbox ); - vbox->setSpacing( KDialog::spacingHint() ); - m_AddBtn = new TQPushButton( i18n( "Add Entry..." ), vbox, "add_entry_button" ); - connect( m_AddBtn, TQT_SIGNAL( clicked() ), m_listView, TQT_SLOT( slotAddEntry() ) ); - m_EditBtn = new TQPushButton( i18n( "Edit Entry..." ), vbox, "edit_entry_button" ); - connect( m_EditBtn, TQT_SIGNAL( clicked() ), m_listView, TQT_SLOT( slotEditEntry() ) ); - m_DelBtn = new TQPushButton( i18n( "Delete Entry" ), vbox, "delete_entry_button" ); - connect( m_DelBtn, TQT_SIGNAL( clicked() ), m_listView, TQT_SLOT( slotRemoveEntry() ) ); - TQWidget *spacer = new TQWidget( vbox ); - spacer->setSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Expanding ); - slotUpdateButtons(); -} - -void KACLEditWidget::slotUpdateButtons() -{ - bool atLeastOneIsNotDeletable = false; - bool atLeastOneIsNotAllowedToChangeType = false; - int selectedCount = 0; - TQListViewItemIterator it( m_listView, TQListViewItemIterator::Selected ); - while ( KACLListViewItem *item = dynamic_cast( it.current() ) ) { - ++it; ++selectedCount; - if ( !item->isDeletable() ) - atLeastOneIsNotDeletable = true; - if ( !item->isAllowedToChangeType() ) - atLeastOneIsNotAllowedToChangeType = true; - } - m_EditBtn->setEnabled( selectedCount && !atLeastOneIsNotAllowedToChangeType ); - m_DelBtn->setEnabled( selectedCount && !atLeastOneIsNotDeletable ); -} - -KACL KACLEditWidget::getACL() const -{ - return m_listView->getACL(); -} - -KACL KACLEditWidget::getDefaultACL() const -{ - return m_listView->getDefaultACL(); -} - -void KACLEditWidget::setACL( const KACL &acl ) -{ - return m_listView->setACL( acl ); -} - -void KACLEditWidget::setDefaultACL( const KACL &acl ) -{ - return m_listView->setDefaultACL( acl ); -} - -void KACLEditWidget::setAllowDefaults( bool value ) -{ - m_listView->setAllowDefaults( value ); -} - -void KACLEditWidget::setReadOnly( bool on ) -{ - m_listView->setEnabled( !on ); - m_AddBtn->setEnabled( !on ); - if ( !on ) - slotUpdateButtons(); -} - -KACLListViewItem::KACLListViewItem( TQListView* parent, - KACLListView::EntryType _type, - unsigned short _value, bool defaults, - const TQString& _qualifier ) - : KListViewItem( parent, parent->lastItem() ), // we want to append - type( _type ), value( _value ), isDefault( defaults ), - qualifier( _qualifier ), isPartial( false ) -{ - m_pACLListView = dynamic_cast( parent ); - repaint(); -} - - -KACLListViewItem::~ KACLListViewItem() -{ - -} - -TQString KACLListViewItem::key( int, bool ) const -{ - TQString key; - if ( !isDefault ) - key = "A"; - else - key = "B"; - switch ( type ) - { - case KACLListView::User: - key += "A"; - break; - case KACLListView::Group: - key += "B"; - break; - case KACLListView::Others: - key += "C"; - break; - case KACLListView::Mask: - key += "D"; - break; - case KACLListView::NamedUser: - key += "E" + text( 1 ); - break; - case KACLListView::NamedGroup: - key += "F" + text( 1 ); - break; - default: - key += text( 0 ); - break; - } - return key; -} - -void KACLListViewItem::paintCell( TQPainter* p, const TQColorGroup &cg, - int column, int width, int alignment ) -{ - TQColorGroup mycg = cg; - if ( isDefault ) { - mycg.setColor( TQColorGroup::Text, TQColor( 0, 0, 255 ) ); - } - if ( isPartial ) { - TQFont font = p->font(); - font.setItalic( true ); - mycg.setColor( TQColorGroup::Text, TQColor( 100, 100, 100 ) ); - p->setFont( font ); - } - KListViewItem::paintCell( p, mycg, column, width, alignment ); - - KACLListViewItem *below =0; - if ( itemBelow() ) - below = static_cast( itemBelow() ); - const bool lastUser = type == KACLListView::NamedUser && below && below->type == KACLListView::NamedGroup; - const bool lastNonDefault = !isDefault && below && below->isDefault; - if ( type == KACLListView::Mask || lastUser || lastNonDefault ) - { - p->setPen( TQPen( Qt::gray, 0, TQPen::DotLine ) ); - if ( type == KACLListView::Mask ) - p->drawLine( 0, 0, width - 1, 0 ); - p->drawLine( 0, height() - 1, width - 1, height() - 1 ); - } -} - - -void KACLListViewItem::updatePermPixmaps() -{ - unsigned int partialPerms = value; - - if ( value & ACL_READ ) - setPixmap( 2, m_pACLListView->getYesPixmap() ); - else if ( partialPerms & ACL_READ ) - setPixmap( 2, m_pACLListView->getYesPartialPixmap() ); - else - setPixmap( 2, TQPixmap() ); - - if ( value & ACL_WRITE ) - setPixmap( 3, m_pACLListView->getYesPixmap() ); - else if ( partialPerms & ACL_WRITE ) - setPixmap( 3, m_pACLListView->getYesPartialPixmap() ); - else - setPixmap( 3, TQPixmap() ); - - if ( value & ACL_EXECUTE ) - setPixmap( 4, m_pACLListView->getYesPixmap() ); - else if ( partialPerms & ACL_EXECUTE ) - setPixmap( 4, m_pACLListView->getYesPartialPixmap() ); - else - setPixmap( 4, TQPixmap() ); -} - -void KACLListViewItem::repaint() -{ - int idx = 0; - switch ( type ) - { - case KACLListView::User: - idx = KACLListView::OWNER_IDX; - break; - case KACLListView::Group: - idx = KACLListView::GROUP_IDX; - break; - case KACLListView::Others: - idx = KACLListView::OTHERS_IDX; - break; - case KACLListView::Mask: - idx = KACLListView::MASK_IDX; - break; - case KACLListView::NamedUser: - idx = KACLListView::NAMED_USER_IDX; - break; - case KACLListView::NamedGroup: - idx = KACLListView::NAMED_GROUP_IDX; - break; - default: - idx = KACLListView::OWNER_IDX; - break; - } - setText( 0, i18n(s_itemAttributes[idx].label) ); - setPixmap( 0, *s_itemAttributes[idx].pixmap ); - if ( isDefault ) - setText( 0, text( 0 ) + i18n( " (Default)" ) ); - setText( 1, qualifier ); - // Set the pixmaps for which of the perms are set - updatePermPixmaps(); -} - -void KACLListViewItem::calcEffectiveRights() -{ - TQString strEffective = TQString( "---" ); - - // Do we need to worry about the mask entry? It applies to named users, - // owning group, and named groups - if ( m_pACLListView->hasMaskEntry() - && ( type == KACLListView::NamedUser - || type == KACLListView::Group - || type == KACLListView::NamedGroup ) - && !isDefault ) - { - - strEffective[0] = ( m_pACLListView->maskPermissions() & value & ACL_READ ) ? 'r' : '-'; - strEffective[1] = ( m_pACLListView->maskPermissions() & value & ACL_WRITE ) ? 'w' : '-'; - strEffective[2] = ( m_pACLListView->maskPermissions() & value & ACL_EXECUTE ) ? 'x' : '-'; -/* - // What about any partial perms? - if ( maskPerms & partialPerms & ACL_READ || // Partial perms on entry - maskPartialPerms & perms & ACL_READ || // Partial perms on mask - maskPartialPerms & partialPerms & ACL_READ ) // Partial perms on mask and entry - strEffective[0] = 'R'; - if ( maskPerms & partialPerms & ACL_WRITE || // Partial perms on entry - maskPartialPerms & perms & ACL_WRITE || // Partial perms on mask - maskPartialPerms & partialPerms & ACL_WRITE ) // Partial perms on mask and entry - strEffective[1] = 'W'; - if ( maskPerms & partialPerms & ACL_EXECUTE || // Partial perms on entry - maskPartialPerms & perms & ACL_EXECUTE || // Partial perms on mask - maskPartialPerms & partialPerms & ACL_EXECUTE ) // Partial perms on mask and entry - strEffective[2] = 'X'; -*/ - } - else - { - // No, the effective value are just the value in this entry - strEffective[0] = ( value & ACL_READ ) ? 'r' : '-'; - strEffective[1] = ( value & ACL_WRITE ) ? 'w' : '-'; - strEffective[2] = ( value & ACL_EXECUTE ) ? 'x' : '-'; - - /* - // What about any partial perms? - if ( partialPerms & ACL_READ ) - strEffective[0] = 'R'; - if ( partialPerms & ACL_WRITE ) - strEffective[1] = 'W'; - if ( partialPerms & ACL_EXECUTE ) - strEffective[2] = 'X'; - */ - } - setText( 5, strEffective ); -} - -bool KACLListViewItem::isDeletable() const -{ - bool isMaskAndDeletable = false; - if (type == KACLListView::Mask ) { - if ( !isDefault && m_pACLListView->maskCanBeDeleted() ) - isMaskAndDeletable = true; - else if ( isDefault && m_pACLListView->defaultMaskCanBeDeleted() ) - isMaskAndDeletable = true; - } - return type != KACLListView::User && - type != KACLListView::Group && - type != KACLListView::Others && - ( type != KACLListView::Mask || isMaskAndDeletable ); -} - -bool KACLListViewItem::isAllowedToChangeType() const -{ - return type != KACLListView::User && - type != KACLListView::Group && - type != KACLListView::Others && - type != KACLListView::Mask; -} - -void KACLListViewItem::togglePerm( acl_perm_t perm ) -{ - value ^= perm; // Toggle the perm - if ( type == KACLListView::Mask && !isDefault ) { - m_pACLListView->setMaskPermissions( value ); - } - calcEffectiveRights(); - updatePermPixmaps(); -/* - // If the perm is in the partial perms then remove it. i.e. Once - // a user changes a partial perm it then applies to all selected files. - if ( m_pEntry->m_partialPerms & perm ) - m_pEntry->m_partialPerms ^= perm; - - m_pEntry->setPartialEntry( false ); - // Make sure that all entries have their effective rights calculated if - // we are changing the ACL_MASK entry. - if ( type == Mask ) - { - m_pACLListView->setMaskPartialPermissions( m_pEntry->m_partialPerms ); - m_pACLListView->setMaskPermissions( value ); - m_pACLListView->calculateEffectiveRights(); - } -*/ -} - - - -EditACLEntryDialog::EditACLEntryDialog( KACLListView *listView, KACLListViewItem *item, - const TQStringList &users, - const TQStringList &groups, - const TQStringList &defaultUsers, - const TQStringList &defaultGroups, - int allowedTypes, int allowedDefaultTypes, - bool allowDefaults ) - : KDialogBase( listView, "edit_entry_dialog", true, - i18n( "Edit ACL Entry" ), KDialogBase::Ok|KDialogBase::Cancel, - KDialogBase::Ok, false ), - m_listView( listView ), m_item( item ), m_users( users ), m_groups( groups ), - m_defaultUsers( defaultUsers ), m_defaultGroups( defaultGroups ), - m_allowedTypes( allowedTypes ), m_allowedDefaultTypes( allowedDefaultTypes ), - m_defaultCB( 0 ) -{ - TQWidget *page = new TQWidget( this ); - setMainWidget( page ); - TQVBoxLayout *mainLayout = new TQVBoxLayout( page, 0, spacingHint(), "mainLayout" ); - m_buttonGroup = new TQVButtonGroup( i18n("Entry Type"), page, "bg" ); - - if ( allowDefaults ) { - m_defaultCB = new TQCheckBox( i18n("Default for new files in this folder"), page, "defaultCB" ); - mainLayout->addWidget( m_defaultCB ); - connect( m_defaultCB, TQT_SIGNAL( toggled( bool ) ), - this, TQT_SLOT( slotUpdateAllowedUsersAndGroups() ) ); - connect( m_defaultCB, TQT_SIGNAL( toggled( bool ) ), - this, TQT_SLOT( slotUpdateAllowedTypes() ) ); - - } - - mainLayout->addWidget( m_buttonGroup ); - - TQRadioButton *ownerType = new TQRadioButton( i18n("Owner"), m_buttonGroup, "ownerType" ); - m_buttonGroup->insert( ownerType, KACLListView::User ); - TQRadioButton *owningGroupType = new TQRadioButton( i18n("Owning Group"), m_buttonGroup, "owningGroupType" ); - m_buttonGroup->insert( owningGroupType, KACLListView::Group ); - TQRadioButton *othersType = new TQRadioButton( i18n("Others"), m_buttonGroup, "othersType" ); - m_buttonGroup->insert( othersType, KACLListView::Others ); - TQRadioButton *maskType = new TQRadioButton( i18n("Mask"), m_buttonGroup, "maskType" ); - m_buttonGroup->insert( maskType, KACLListView::Mask ); - TQRadioButton *namedUserType = new TQRadioButton( i18n("Named User"), m_buttonGroup, "namesUserType" ); - m_buttonGroup->insert( namedUserType, KACLListView::NamedUser ); - TQRadioButton *namedGroupType = new TQRadioButton( i18n("Named Group"), m_buttonGroup, "namedGroupType" ); - m_buttonGroup->insert( namedGroupType, KACLListView::NamedGroup ); - - connect( m_buttonGroup, TQT_SIGNAL( clicked( int ) ), - this, TQT_SLOT( slotSelectionChanged( int ) ) ); - - m_widgetStack = new TQWidgetStack( page ); - mainLayout->addWidget( m_widgetStack ); - - TQHBox *usersBox = new TQHBox( m_widgetStack ); - m_widgetStack->addWidget( usersBox, KACLListView::NamedUser ); - - TQHBox *groupsBox = new TQHBox( m_widgetStack ); - m_widgetStack->addWidget( groupsBox, KACLListView::NamedGroup ); - - TQLabel *usersLabel = new TQLabel( i18n( "User: " ), usersBox ); - m_usersCombo = new TQComboBox( false, usersBox, "users" ); - usersLabel->setBuddy( m_usersCombo ); - - TQLabel *groupsLabel = new TQLabel( i18n( "Group: " ), groupsBox ); - m_groupsCombo = new TQComboBox( false, groupsBox, "groups" ); - groupsLabel->setBuddy( m_groupsCombo ); - - if ( m_item ) { - m_buttonGroup->setButton( m_item->type ); - if ( m_defaultCB ) - m_defaultCB->setChecked( m_item->isDefault ); - slotUpdateAllowedTypes(); - slotSelectionChanged( m_item->type ); - slotUpdateAllowedUsersAndGroups(); - if ( m_item->type == KACLListView::NamedUser ) { - m_usersCombo->setCurrentText( m_item->qualifier ); - } else if ( m_item->type == KACLListView::NamedGroup ) { - m_groupsCombo->setCurrentText( m_item->qualifier ); - } - } else { - // new entry, preselect "named user", arguably the most common one - m_buttonGroup->setButton( KACLListView::NamedUser ); - slotUpdateAllowedTypes(); - slotSelectionChanged( KACLListView::NamedUser ); - slotUpdateAllowedUsersAndGroups(); - } - incInitialSize( TQSize( 100, 0 ) ); -} - -void EditACLEntryDialog::slotUpdateAllowedTypes() -{ - int allowedTypes = m_allowedTypes; - if ( m_defaultCB && m_defaultCB->isChecked() ) { - allowedTypes = m_allowedDefaultTypes; - } - for ( int i=1; i < KACLListView::AllTypes; i=i*2 ) { - if ( allowedTypes & i ) - m_buttonGroup->find( i )->show(); - else - m_buttonGroup->find( i )->hide(); - } -} - -void EditACLEntryDialog::slotUpdateAllowedUsersAndGroups() -{ - const TQString oldUser = m_usersCombo->currentText(); - const TQString oldGroup = m_groupsCombo->currentText(); - m_usersCombo->clear(); - m_groupsCombo->clear(); - if ( m_defaultCB && m_defaultCB->isChecked() ) { - m_usersCombo->insertStringList( m_defaultUsers ); - if ( m_defaultUsers.find( oldUser ) != m_defaultUsers.end() ) - m_usersCombo->setCurrentText( oldUser ); - m_groupsCombo->insertStringList( m_defaultGroups ); - if ( m_defaultGroups.find( oldGroup ) != m_defaultGroups.end() ) - m_groupsCombo->setCurrentText( oldGroup ); - } else { - m_usersCombo->insertStringList( m_users ); - if ( m_users.find( oldUser ) != m_users.end() ) - m_usersCombo->setCurrentText( oldUser ); - m_groupsCombo->insertStringList( m_groups ); - if ( m_groups.find( oldGroup ) != m_groups.end() ) - m_groupsCombo->setCurrentText( oldGroup ); - } -} -void EditACLEntryDialog::slotOk() -{ - KACLListView::EntryType type = static_cast( m_buttonGroup->selectedId() ); - - TQString qualifier; - if ( type == KACLListView::NamedUser ) - qualifier = m_usersCombo->currentText(); - if ( type == KACLListView::NamedGroup ) - qualifier = m_groupsCombo->currentText(); - - if ( !m_item ) { - m_item = new KACLListViewItem( m_listView, type, ACL_READ | ACL_WRITE | ACL_EXECUTE, false, qualifier ); - } else { - m_item->type = type; - m_item->qualifier = qualifier; - } - if ( m_defaultCB ) - m_item->isDefault = m_defaultCB->isChecked(); - m_item->repaint(); - - KDialogBase::slotOk(); -} - -void EditACLEntryDialog::slotSelectionChanged( int id ) -{ - switch ( id ) { - case KACLListView::User: - case KACLListView::Group: - case KACLListView::Others: - case KACLListView::Mask: - m_widgetStack->setEnabled( false ); - break; - case KACLListView::NamedUser: - m_widgetStack->setEnabled( true ); - m_widgetStack->raiseWidget( KACLListView::NamedUser ); - break; - case KACLListView::NamedGroup: - m_widgetStack->setEnabled( true ); - m_widgetStack->raiseWidget( KACLListView::NamedGroup ); - break; - default: - break; - } -} - - -KACLListView::KACLListView( TQWidget* parent, const char* name ) - : KListView( parent, name ), - m_hasMask( false ), m_allowDefaults( false ) -{ - // Add the columns - addColumn( i18n( "Type" ) ); - addColumn( i18n( "Name" ) ); - addColumn( i18n( "read permission", "r" ) ); - addColumn( i18n( "write permission", "w" ) ); - addColumn( i18n( "execute permission", "x" ) ); - addColumn( i18n( "Effective" ) ); - - header()->setClickEnabled( false ); - - // Load the avatars - for ( int i=0; i < LAST_IDX; ++i ) { - s_itemAttributes[i].pixmap = new TQPixmap( qembed_findImage( s_itemAttributes[i].pixmapName ) ); - } - m_yesPixmap = new TQPixmap( qembed_findImage( "yes" ) ); - m_yesPartialPixmap = new TQPixmap( qembed_findImage( "yespartial" ) ); - - setSelectionMode( TQListView::Extended ); - - // fill the lists of all legal users and groups - struct passwd *user = 0; - setpwent(); - while ( ( user = getpwent() ) != 0 ) { - m_allUsers << TQString::fromLatin1( user->pw_name ); - } - endpwent(); - - struct group *gr = 0; - setgrent(); - while ( ( gr = getgrent() ) != 0 ) { - m_allGroups << TQString::fromLatin1( gr->gr_name ); - } - endgrent(); - m_allUsers.sort(); - m_allGroups.sort(); -} - - -KACLListView::~KACLListView() -{ - for ( int i=0; i < LAST_IDX; ++i ) { - delete s_itemAttributes[i].pixmap; - } - delete m_yesPixmap; - delete m_yesPartialPixmap; -} - -TQStringList KACLListView::allowedUsers( bool defaults, KACLListViewItem *allowedItem ) -{ - TQStringList allowedUsers = m_allUsers; - TQListViewItemIterator it( this ); - while ( it.current() ) { - const KACLListViewItem *item = static_cast( *it ); - ++it; - if ( !item->type == NamedUser || item->isDefault != defaults ) continue; - if ( allowedItem && item == allowedItem && allowedItem->isDefault == defaults ) continue; - allowedUsers.remove( item->qualifier ); - } - return allowedUsers; -} - -TQStringList KACLListView::allowedGroups( bool defaults, KACLListViewItem *allowedItem ) -{ - TQStringList allowedGroups = m_allGroups; - TQListViewItemIterator it( this ); - while ( it.current() ) { - const KACLListViewItem *item = static_cast( *it ); - ++it; - if ( !item->type == NamedGroup || item->isDefault != defaults ) continue; - if ( allowedItem && item == allowedItem && allowedItem->isDefault == defaults ) continue; - allowedGroups.remove( item->qualifier ); - } - return allowedGroups; -} - -void KACLListView::fillItemsFromACL( const KACL &pACL, bool defaults ) -{ - // clear out old entries of that ilk - TQListViewItemIterator it( this ); - while ( KACLListViewItem *item = static_cast( it.current() ) ) { - ++it; - if ( item->isDefault == defaults ) - delete item; - } - KACLListViewItem *item = - new KACLListViewItem( this, User, pACL.ownerPermissions(), defaults ); - - item = new KACLListViewItem( this, Group, pACL.owningGroupPermissions(), defaults ); - - item = new KACLListViewItem( this, Others, pACL.othersPermissions(), defaults ); - - bool hasMask = false; - unsigned short mask = pACL.maskPermissions( hasMask ); - if ( hasMask ) { - item = new KACLListViewItem( this, Mask, mask, defaults ); - } - - // read all named user entries - const ACLUserPermissionsList &userList = pACL.allUserPermissions(); - ACLUserPermissionsConstIterator itu = userList.begin(); - while ( itu != userList.end() ) { - new KACLListViewItem( this, NamedUser, (*itu).second, defaults, (*itu).first ); - ++itu; - } - - // and now all named groups - const ACLUserPermissionsList &groupList = pACL.allGroupPermissions(); - ACLUserPermissionsConstIterator itg = groupList.begin(); - while ( itg != groupList.end() ) { - new KACLListViewItem( this, NamedGroup, (*itg).second, defaults, (*itg).first ); - ++itg; - } -} - -void KACLListView::setACL( const KACL &acl ) -{ - if ( !acl.isValid() ) return; - // Remove any entries left over from displaying a previous ACL - m_ACL = acl; - fillItemsFromACL( m_ACL ); - - m_mask = acl.maskPermissions( m_hasMask ); - calculateEffectiveRights(); -} - -void KACLListView::setDefaultACL( const KACL &acl ) -{ - if ( !acl.isValid() ) return; - m_defaultACL = acl; - fillItemsFromACL( m_defaultACL, true ); - calculateEffectiveRights(); -} - -KACL KACLListView::itemsToACL( bool defaults ) const -{ - KACL newACL( 0 ); - bool atLeastOneEntry = false; - ACLUserPermissionsList users; - ACLGroupPermissionsList groups; - TQListViewItemIterator it( const_cast( this ) ); - while ( TQListViewItem* qlvi = it.current() ) { - ++it; - const KACLListViewItem* item = static_cast( qlvi ); - if ( item->isDefault != defaults ) continue; - atLeastOneEntry = true; - switch ( item->type ) { - case User: - newACL.setOwnerPermissions( item->value ); - break; - case Group: - newACL.setOwningGroupPermissions( item->value ); - break; - case Others: - newACL.setOthersPermissions( item->value ); - break; - case Mask: - newACL.setMaskPermissions( item->value ); - break; - case NamedUser: - users.append( qMakePair( item->text( 1 ), item->value ) ); - break; - case NamedGroup: - groups.append( qMakePair( item->text( 1 ), item->value ) ); - break; - default: - break; - } - } - if ( atLeastOneEntry ) { - newACL.setAllUserPermissions( users ); - newACL.setAllGroupPermissions( groups ); - if ( newACL.isValid() ) - return newACL; - } - return KACL(); -} - -KACL KACLListView::getACL() -{ - return itemsToACL( false ); -} - - -KACL KACLListView::getDefaultACL() -{ - return itemsToACL( true ); -} - -void KACLListView::contentsMousePressEvent( TQMouseEvent * e ) -{ - TQListViewItem *clickedItem = itemAt( contentsToViewport( e->pos() ) ); - if ( !clickedItem ) return; - // if the click is on an as yet unselected item, select it first - if ( !clickedItem->isSelected() ) - KListView::contentsMousePressEvent( e ); - - if ( !currentItem() ) return; - int column = header()->sectionAt( e->x() ); - acl_perm_t perm; - switch ( column ) - { - case 2: - perm = ACL_READ; - break; - case 3: - perm = ACL_WRITE; - break; - case 4: - perm = ACL_EXECUTE; - break; - default: - return KListView::contentsMousePressEvent( e ); - } - KACLListViewItem* referenceItem = static_cast( clickedItem ); - unsigned short referenceHadItSet = referenceItem->value & perm; - TQListViewItemIterator it( this ); - while ( KACLListViewItem* item = static_cast( it.current() ) ) { - ++it; - if ( !item->isSelected() ) continue; - // toggle those with the same value as the clicked item, leave the others - if ( referenceHadItSet == ( item->value & perm ) ) - item->togglePerm( perm ); - } -} - -void KACLListView::entryClicked( TQListViewItem* pItem, const TQPoint& /*pt*/, int col ) -{ - if ( !pItem ) return; - - TQListViewItemIterator it( this ); - while ( KACLListViewItem* item = static_cast( it.current() ) ) { - ++it; - if ( !item->isSelected() ) continue; - switch ( col ) - { - case 2: - item->togglePerm( ACL_READ ); - break; - case 3: - item->togglePerm( ACL_WRITE ); - break; - case 4: - item->togglePerm( ACL_EXECUTE ); - break; - - default: - ; // Do nothing - } - } - /* - // Has the user changed one of the required entries in a default ACL? - if ( m_pACL->aclType() == ACL_TYPE_DEFAULT && - ( col == 2 || col == 3 || col == 4 ) && - ( pACLItem->entryType() == ACL_USER_OBJ || - pACLItem->entryType() == ACL_GROUP_OBJ || - pACLItem->entryType() == ACL_OTHER ) ) - { - // Mark the required entries as no longer being partial entries. - // That is, they will get applied to all selected directories. - KACLListViewItem* pUserObj = findACLEntryByType( this, ACL_USER_OBJ ); - pUserObj->entry()->setPartialEntry( false ); - - KACLListViewItem* pGroupObj = findACLEntryByType( this, ACL_GROUP_OBJ ); - pGroupObj->entry()->setPartialEntry( false ); - - KACLListViewItem* pOther = findACLEntryByType( this, ACL_OTHER ); - pOther->entry()->setPartialEntry( false ); - - update(); - } - */ -} - - -void KACLListView::calculateEffectiveRights() -{ - TQListViewItemIterator it( this ); - KACLListViewItem* pItem; - while ( ( pItem = dynamic_cast( it.current() ) ) != 0 ) - { - ++it; - pItem->calcEffectiveRights(); - } -} - - -unsigned short KACLListView::maskPermissions() const -{ - return m_mask; -} - - -void KACLListView::setMaskPermissions( unsigned short maskPerms ) -{ - m_mask = maskPerms; - calculateEffectiveRights(); -} - - -acl_perm_t KACLListView::maskPartialPermissions() const -{ - // return m_pMaskEntry->m_partialPerms; - return 0; -} - - -void KACLListView::setMaskPartialPermissions( acl_perm_t /*maskPartialPerms*/ ) -{ - //m_pMaskEntry->m_partialPerms = maskPartialPerms; - calculateEffectiveRights(); -} - -bool KACLListView::hasDefaultEntries() const -{ - TQListViewItemIterator it( const_cast( this ) ); - while ( it.current() ) { - const KACLListViewItem *item = static_cast( it.current() ); - ++it; - if ( item->isDefault ) return true; - } - return false; -} - -const KACLListViewItem* KACLListView::findDefaultItemByType( EntryType type ) const -{ - return findItemByType( type, true ); -} - -const KACLListViewItem* KACLListView::findItemByType( EntryType type, bool defaults ) const -{ - TQListViewItemIterator it( const_cast( this ) ); - while ( it.current() ) { - const KACLListViewItem *item = static_cast( it.current() ); - ++it; - if ( item->isDefault == defaults && item->type == type ) { - return item; - } - } - return 0; -} - - -unsigned short KACLListView::calculateMaskValue( bool defaults ) const -{ - // KACL auto-adds the relevant maks entries, so we can simply query - bool dummy; - return itemsToACL( defaults ).maskPermissions( dummy ); -} - -void KACLListView::slotAddEntry() -{ - int allowedTypes = NamedUser | NamedGroup; - if ( !m_hasMask ) - allowedTypes |= Mask; - int allowedDefaultTypes = NamedUser | NamedGroup; - if ( !findDefaultItemByType( Mask ) ) - allowedDefaultTypes |= Mask; - if ( !hasDefaultEntries() ) - allowedDefaultTypes |= User | Group; - EditACLEntryDialog dlg( this, 0, - allowedUsers( false ), allowedGroups( false ), - allowedUsers( true ), allowedGroups( true ), - allowedTypes, allowedDefaultTypes, m_allowDefaults ); - dlg.exec(); - KACLListViewItem *item = dlg.item(); - if ( !item ) return; // canceled - if ( item->type == Mask && !item->isDefault ) { - m_hasMask = true; - m_mask = item->value; - } - if ( item->isDefault && !hasDefaultEntries() ) { - // first default entry, fill in what is needed - if ( item->type != User ) { - unsigned short v = findDefaultItemByType( User )->value; - new KACLListViewItem( this, User, v, true ); - } - if ( item->type != Group ) { - unsigned short v = findDefaultItemByType( Group )->value; - new KACLListViewItem( this, Group, v, true ); - } - if ( item->type != Others ) { - unsigned short v = findDefaultItemByType( Others )->value; - new KACLListViewItem( this, Others, v, true ); - } - } - const KACLListViewItem *defaultMaskItem = findDefaultItemByType( Mask ); - if ( item->isDefault && !defaultMaskItem ) { - unsigned short v = calculateMaskValue( true ); - new KACLListViewItem( this, Mask, v, true ); - } - if ( !item->isDefault && !m_hasMask && - ( item->type == Group - || item->type == NamedUser - || item->type == NamedGroup ) ) { - // auto-add a mask entry - unsigned short v = calculateMaskValue( false ); - new KACLListViewItem( this, Mask, v, false ); - m_hasMask = true; - m_mask = v; - } - calculateEffectiveRights(); - sort(); - setCurrentItem( item ); - // TQListView doesn't seem to emit, in this case, and we need to update - // the buttons... - if ( childCount() == 1 ) - emit currentChanged( item ); -} - -void KACLListView::slotEditEntry() -{ - TQListViewItem * current = currentItem(); - if ( !current ) return; - KACLListViewItem *item = static_cast( current ); - int allowedTypes = item->type | NamedUser | NamedGroup; - bool itemWasMask = item->type == Mask; - if ( !m_hasMask || itemWasMask ) - allowedTypes |= Mask; - int allowedDefaultTypes = item->type | NamedUser | NamedGroup; - if ( !findDefaultItemByType( Mask ) ) - allowedDefaultTypes |= Mask; - if ( !hasDefaultEntries() ) - allowedDefaultTypes |= User | Group; - - EditACLEntryDialog dlg( this, item, - allowedUsers( false, item ), allowedGroups( false, item ), - allowedUsers( true, item ), allowedGroups( true, item ), - allowedTypes, allowedDefaultTypes, m_allowDefaults ); - dlg.exec(); - if ( itemWasMask && item->type != Mask ) { - m_hasMask = false; - m_mask = 0; - } - if ( !itemWasMask && item->type == Mask ) { - m_mask = item->value; - m_hasMask = true; - } - calculateEffectiveRights(); - sort(); -} - -void KACLListView::slotRemoveEntry() -{ - TQListViewItemIterator it( this, TQListViewItemIterator::Selected ); - while ( it.current() ) { - KACLListViewItem *item = static_cast( it.current() ); - ++it; - /* First check if it's a mask entry and if so, make sure that there is - * either no name user or group entry, which means the mask can be - * removed, or don't remove it, but reset it. That is allowed. */ - if ( item->type == Mask ) { - bool itemWasDefault = item->isDefault; - if ( !itemWasDefault && maskCanBeDeleted() ) { - m_hasMask= false; - m_mask = 0; - delete item; - } else if ( itemWasDefault && defaultMaskCanBeDeleted() ) { - delete item; - } else { - item->value = 0; - item->repaint(); - } - if ( !itemWasDefault ) - calculateEffectiveRights(); - } else { - // for the base permissions, disable them, which is what libacl does - if ( !item->isDefault && - ( item->type == User - || item->type == Group - || item->type == Others ) ) { - item->value = 0; - item->repaint(); - } else { - delete item; - } - } - } -} - -bool KACLListView::maskCanBeDeleted() const -{ - return !findItemByType( NamedUser ) && !findItemByType( NamedGroup ); -} - -bool KACLListView::defaultMaskCanBeDeleted() const -{ - return !findDefaultItemByType( NamedUser ) && !findDefaultItemByType( NamedGroup ); -} - -#include "kacleditwidget.moc" -#include "kacleditwidget_p.moc" -#endif -// vim:set ts=8 sw=4: diff --git a/kio/kfile/kacleditwidget.h b/kio/kfile/kacleditwidget.h deleted file mode 100644 index d0f30f60a..000000000 --- a/kio/kfile/kacleditwidget.h +++ /dev/null @@ -1,65 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2005 by Sean Harmer * - * Till Adam * - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU Library 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 KACLEDITWIDGET_H -#define KACLEDITWIDGET_H - -#ifdef HAVE_CONFIG_H -#include -#endif - -#ifdef Q_MOC_RUN -#define USE_POSIX_ACL -#endif // Q_MOC_RUN - -#ifdef USE_POSIX_ACL - -#include -#include -#include - -class KACLListViewItem; -class KACLListView; -class TQPushButton; - -class KACLEditWidget : TQWidget -{ - Q_OBJECT - -public: - KACLEditWidget( TQWidget *parent = 0, const char *name = 0 ); - KACL getACL() const; - KACL getDefaultACL() const; - void setACL( const KACL & ); - void setDefaultACL( const KACL & ); - void setAllowDefaults( bool value ); - void setReadOnly( bool value ); -private slots: - void slotUpdateButtons(); - -private: - KACLListView* m_listView; - TQPushButton *m_AddBtn; - TQPushButton *m_EditBtn; - TQPushButton *m_DelBtn; -}; - - -#endif -#endif diff --git a/kio/kfile/kacleditwidget_p.h b/kio/kfile/kacleditwidget_p.h deleted file mode 100644 index 166725638..000000000 --- a/kio/kfile/kacleditwidget_p.h +++ /dev/null @@ -1,206 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2005 by Sean Harmer * - * Till Adam * - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU Library 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 KACLEDITWIDGET_P_H -#define KACLEDITWIDGET_P_H - -#ifdef HAVE_CONFIG_H -#include -#endif - -#ifdef Q_MOC_RUN -#define USE_POSIX_ACL -#endif // Q_MOC_RUN - -#ifdef USE_POSIX_ACL -#include -#include -#include -#include -#include -#include -#include - -class KACLListViewItem; -class TQPushButton; -class TQVButtonGroup; -class KACLListView; -class TQWidgetStack; -class TQCheckBox; - -/** -@author Sean Harmer -*/ -class KACLListView : public KListView -{ - Q_OBJECT - - friend class KACLListViewItem; -public: - enum Types - { - OWNER_IDX = 0, - GROUP_IDX, - OTHERS_IDX, - MASK_IDX, - NAMED_USER_IDX, - NAMED_GROUP_IDX, - LAST_IDX - }; - enum EntryType { User = 1, - Group = 2, - Others = 4, - Mask = 8, - NamedUser = 16, - NamedGroup = 32, - AllTypes = 63 }; - - KACLListView( TQWidget* parent = 0, const char* name = 0 ); - ~KACLListView(); - - bool hasMaskEntry() const { return m_hasMask; } - bool hasDefaultEntries() const; - bool allowDefaults() const { return m_allowDefaults; } - void setAllowDefaults( bool v ) { m_allowDefaults = v; } - unsigned short maskPermissions() const; - void setMaskPermissions( unsigned short maskPerms ); - acl_perm_t maskPartialPermissions() const; - void setMaskPartialPermissions( acl_perm_t maskPerms ); - - bool maskCanBeDeleted() const; - bool defaultMaskCanBeDeleted() const; - - const KACLListViewItem* findDefaultItemByType( EntryType type ) const; - const KACLListViewItem* findItemByType( EntryType type, - bool defaults = false ) const; - unsigned short calculateMaskValue( bool defaults ) const; - void calculateEffectiveRights(); - - TQStringList allowedUsers( bool defaults, KACLListViewItem *allowedItem = 0 ); - TQStringList allowedGroups( bool defaults, KACLListViewItem *allowedItem = 0 ); - - const KACL getACL() const { return getACL(); } - KACL getACL(); - - const KACL getDefaultACL() const { return getDefaultACL(); } - KACL getDefaultACL(); - - TQPixmap getYesPixmap() const { return *m_yesPixmap; } - TQPixmap getYesPartialPixmap() const { return *m_yesPartialPixmap; } - -public slots: - void slotAddEntry(); - void slotEditEntry(); - void slotRemoveEntry(); - void setACL( const KACL &anACL ); - void setDefaultACL( const KACL &anACL ); - -protected slots: - void entryClicked( TQListViewItem* pItem, const TQPoint& pt, int col ); -protected: - void contentsMousePressEvent( TQMouseEvent * e ); - -private: - void fillItemsFromACL( const KACL &pACL, bool defaults = false ); - KACL itemsToACL( bool defaults ) const; - - KACL m_ACL; - KACL m_defaultACL; - unsigned short m_mask; - bool m_hasMask; - bool m_allowDefaults; - TQStringList m_allUsers; - TQStringList m_allGroups; - TQPixmap* m_yesPixmap; - TQPixmap* m_yesPartialPixmap; -}; - -class EditACLEntryDialog : public KDialogBase -{ - Q_OBJECT - -public: - EditACLEntryDialog( KACLListView *listView, KACLListViewItem *item, - const TQStringList &users, - const TQStringList &groups, - const TQStringList &defaultUsers, - const TQStringList &defaultGroups, - int allowedTypes = KACLListView::AllTypes, - int allowedDefaultTypes = KACLListView::AllTypes, - bool allowDefault = false ); - KACLListViewItem* item() const { return m_item; } -public slots: - void slotOk(); - void slotSelectionChanged( int id ); -private slots: - void slotUpdateAllowedUsersAndGroups(); - void slotUpdateAllowedTypes(); -private: - KACLListView *m_listView; - KACLListViewItem *m_item; - TQStringList m_users; - TQStringList m_groups; - TQStringList m_defaultUsers; - TQStringList m_defaultGroups; - int m_allowedTypes; - int m_allowedDefaultTypes; - TQVButtonGroup *m_buttonGroup; - TQComboBox *m_usersCombo; - TQComboBox *m_groupsCombo; - TQWidgetStack *m_widgetStack; - TQCheckBox *m_defaultCB; -}; - - -class KACLListViewItem : public KListViewItem -{ -public: - KACLListViewItem( TQListView* parent, KACLListView::EntryType type, - unsigned short value, - bool defaultEntry, - const TQString& qualifier = TQString::null ); - virtual ~KACLListViewItem(); - virtual TQString key( int column, bool ascending ) const; - - void calcEffectiveRights(); - - bool isDeletable() const; - bool isAllowedToChangeType() const; - - void togglePerm( acl_perm_t perm ); - - virtual void paintCell( TQPainter *p, const TQColorGroup &cg, - int column, int width, int alignment ); - - void updatePermPixmaps(); - void repaint(); - - KACLListView::EntryType type; - unsigned short value; - bool isDefault; - TQString qualifier; - bool isPartial; - -private: - KACLListView* m_pACLListView; -}; - - -#endif -#endif diff --git a/kio/kfile/kcombiview.cpp b/kio/kfile/kcombiview.cpp deleted file mode 100644 index 3f199fb92..000000000 --- a/kio/kfile/kcombiview.cpp +++ /dev/null @@ -1,371 +0,0 @@ -/* This file is part of the KDE libraries - Copyright (C) 1998 Stephan Kulow - 1998 Daniel Grana - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -// $Id$ - -#include - -#include "kfileitem.h" -#include "kcombiview.h" -#include "kfileiconview.h" -#include "kfiledetailview.h" -#include "config-kfile.h" - -#include - -#include - -#include -#include -#include -#include - -#include - -KCombiView::KCombiView( TQWidget *parent, const char *name) - : TQSplitter( parent, name), - KFileView(), - right(0), - m_lastViewForNextItem(0), - m_lastViewForPrevItem(0) -{ - left = new KFileIconView( this, "left" ); - left->setAcceptDrops(false); - left->viewport()->setAcceptDrops(false); - left->setGridX( 160 ); - left->KFileView::setViewMode( Directories ); - left->setArrangement( TQIconView::LeftToRight ); - left->setParentView( this ); - left->setAcceptDrops(false); - left->installEventFilter( this ); - - connect( sig, TQT_SIGNAL( sortingChanged( TQDir::SortSpec ) ), - TQT_SLOT( slotSortingChanged( TQDir::SortSpec ) )); -} - -KCombiView::~KCombiView() -{ - delete right; -} - -void KCombiView::setRight(KFileView *view) -{ - delete right; - right = view; - right->KFileView::setViewMode( Files ); - setViewName( right->viewName() ); - - TQValueList lst; - lst << left->gridX() + 2 * left->spacing(); - setSizes( lst ); - setResizeMode( left, TQSplitter::KeepSize ); - - right->setParentView( this ); - right->widget()->setAcceptDrops(acceptDrops()); - right->setDropOptions(dropOptions()); - right->widget()->installEventFilter( this ); -} - - -void KCombiView::insertItem( KFileItem *item ) -{ - KFileView::insertItem( item ); - - if ( item->isDir() ) { - left->updateNumbers( item ); - left->insertItem( item ); - } - else { - right->updateNumbers( item ); - right->insertItem( item ); - } -} - -void KCombiView::setSorting( TQDir::SortSpec sort ) -{ - if ( !right ) - kdFatal() << "You need to call setRight( someview ) before!" << endl; - right->setSorting( sort ); - left->setSorting( sort ); - - KFileView::setSorting( right->sorting() ); -} - -void KCombiView::clearView() -{ - left->clearView(); - if ( right ) - right->clearView(); -} - -void KCombiView::updateView( bool b ) -{ - left->updateView( b ); - if ( right ) - right->updateView( b ); -} - -void KCombiView::updateView( const KFileItem *i ) -{ - left->updateView( i ); - if ( right ) - right->updateView( i ); -} - -void KCombiView::removeItem( const KFileItem *i ) -{ - left->removeItem( i ); - if ( right ) - right->removeItem( i ); - KFileView::removeItem( i ); -} - -void KCombiView::listingCompleted() -{ - left->listingCompleted(); - if ( right ) - right->listingCompleted(); -} - -void KCombiView::clear() -{ - KFileView::clear(); - left->KFileView::clear(); - if ( right ) - right->clear(); -} - -void KCombiView::clearSelection() -{ - left->clearSelection(); - if ( right ) - right->clearSelection(); -} - -void KCombiView::selectAll() -{ - left->selectAll(); - if ( right ) - right->selectAll(); -} - -void KCombiView::invertSelection() -{ - left->invertSelection(); - if ( right ) - right->invertSelection(); -} - -bool KCombiView::isSelected( const KFileItem *item ) const -{ - assert( right ); // for performance reasons no if ( right ) check. - return (right->isSelected( item ) || left->isSelected( item )); -} - -void KCombiView::setSelectionMode( KFile::SelectionMode sm ) -{ - // I think the left view (directories should always be in - // Single-Mode, right? - // left->setSelectionMode( sm ); - if ( !right ) - kdFatal() << "You need to call setRight( someview ) before!" << endl; - right->setSelectionMode( sm ); -} - -void KCombiView::setSelected( const KFileItem *item, bool enable ) -{ - left->setSelected( item, enable ); - if ( right ) - right->setSelected( item, enable ); -} - -void KCombiView::setCurrentItem( const KFileItem *item ) -{ - left->setCurrentItem( item ); - if ( right ) - right->setCurrentItem( item ); -} - -KFileItem * KCombiView::currentFileItem() const -{ - // we can actually have two current items, one in each view. So we simply - // prefer the fileview's item over the directory's. - // Smarter: if the right view has focus, prefer that over the left. - if ( !right ) - return left->currentFileItem(); - - KFileView *preferredView = focusView( right ); - KFileItem *item = preferredView->currentFileItem(); - if ( !item && preferredView != left ) - item = left->currentFileItem(); - - return item; -} - -void KCombiView::ensureItemVisible(const KFileItem *item) -{ - left->ensureItemVisible( item ); - if ( right ) - right->ensureItemVisible( item ); -} - -KFileItem * KCombiView::firstFileItem() const -{ - if ( !right ) - return left->firstFileItem(); - - KFileView *preferredView = focusView( left ); - KFileView *otherView = (preferredView == left) ? right : left; - KFileItem *item = preferredView->firstFileItem(); - if ( !item ) - item = otherView->firstFileItem(); - - return item; -} - -KFileItem * KCombiView::nextItem( const KFileItem *fileItem ) const -{ - if ( !right ) - return left->nextItem( fileItem ); - - KFileView *preferredView = focusView( left ); - KFileView *otherView = (preferredView == left) ? right : left; - KFileItem *item = preferredView->nextItem( fileItem ); - - if ( item ) - m_lastViewForNextItem = preferredView; - else { // no item, check other view - // when changing from one to another view, we need to continue - // with the next view's first item! - if ( m_lastViewForNextItem != otherView ) { - m_lastViewForNextItem = otherView; - return otherView->firstFileItem(); - } - - item = otherView->nextItem( fileItem ); - m_lastViewForNextItem = otherView; - } - - return item; -} - -KFileItem * KCombiView::prevItem( const KFileItem *fileItem ) const -{ - if ( !right ) - return left->nextItem( fileItem ); - - KFileView *preferredView = focusView( left ); - KFileView *otherView = (preferredView == left) ? right : left; - KFileItem *item = preferredView->prevItem( fileItem ); - if ( item ) - m_lastViewForPrevItem = preferredView; - - else { // no item, check other view - // when changing from one to another view, we need to continue - // with the next view's last item! - if ( m_lastViewForPrevItem != otherView ) { - fileItem = otherView->firstFileItem(); - while ( otherView->nextItem( fileItem ) ) // find the last item - fileItem = otherView->nextItem( fileItem ); - } - - item = otherView->prevItem( fileItem ); - m_lastViewForPrevItem = otherView; - } - - return item; -} - -void KCombiView::slotSortingChanged( TQDir::SortSpec sorting ) -{ - KFileView::setSorting( sorting ); -} - -KFileView *KCombiView::focusView( KFileView *preferred ) const -{ - TQWidget *w = focusWidget(); - KFileView *other = (right == preferred) ? left : right; - return (preferred && w == preferred->widget()) ? preferred : other; -} - -void KCombiView::readConfig( TDEConfig *config, const TQString& group ) -{ - left->readConfig( config, group ); - if ( right ) - right->readConfig( config, group ); -} - -void KCombiView::writeConfig( TDEConfig *config, const TQString& group ) -{ - left->writeConfig( config, group ); - if ( right ) - right->writeConfig( config, group ); -} - -KActionCollection * KCombiView::actionCollection() const -{ - return focusView( right )->actionCollection(); -} - -void KCombiView::setAcceptDrops(bool b) -{ - left->setAcceptDrops(b); - if (right) - right->widget()->setAcceptDrops(b); - TQSplitter::setAcceptDrops(b); -} - -void KCombiView::setDropOptions_impl(int options) -{ - KFileView::setDropOptions_impl(options); - left->setDropOptions(options); - if (right) - right->setDropOptions(options); -} - -void KCombiView::virtual_hook( int id, void* data ) -{ - switch(id) { - case VIRTUAL_SET_DROP_OPTIONS: - setDropOptions_impl(*(int *)data); - break; - default: - KFileView::virtual_hook( id, data ); - } -} - -bool KCombiView::eventFilter( TQObject *o, TQEvent *e ) -{ - int type = e->type(); - - // only the focused view may have a selection - if ( type == TQEvent::FocusIn ) - { - if ( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(left) ) - right->clearSelection(); - else if ( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(right->widget()) ) - left->clearSelection(); - } - - return TQSplitter::eventFilter( o, e ); -} - -#include "kcombiview.moc" - diff --git a/kio/kfile/kcombiview.h b/kio/kfile/kcombiview.h deleted file mode 100644 index 5d56b8257..000000000 --- a/kio/kfile/kcombiview.h +++ /dev/null @@ -1,133 +0,0 @@ -/* -*- c++ -*- - This file is part of the KDE libraries - Copyright (C) 1998 Stephan Kulow - 1998 Daniel Grana - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef _KCOMBIVIEW_H -#define _KCOMBIVIEW_H - -#include -#include - -#include -#include - -class KFileIconView; -class TQEvent; -class TQIconViewItem; - -/** - * This view is designed to combine two KFileViews into one widget, to show - * directories on the left side and files on the right side. - * - * Methods like selectedItems() to query status _only_ work on the right side, - * i.e. on the files. - * - * After creating the KCombiView, you need to supply the view shown in the - * right, (see setRight()). Available KFileView implementations are - * KFileIconView and KFileDetailView. - * - * Most of the below methods are just implementations of the baseclass - * KFileView, so look there for documentation. - * - * @see KFileView - * @see KFileIconView - * @see KFileDetailView - * @see KDirOperator - */ -class TDEIO_EXPORT KCombiView : public TQSplitter, - public KFileView -{ - Q_OBJECT - -public: - KCombiView( TQWidget *parent, const char *name); - virtual ~KCombiView(); - - virtual TQWidget *widget() { return this; } - virtual void clearView(); - - virtual void updateView( bool ); - virtual void updateView(const KFileItem*); - virtual void removeItem( const KFileItem * ); - virtual void listingCompleted(); - - /** - * Sets the view to be shown in the right. You need to call this before - * doing anything else with this widget. - */ - void setRight(KFileView *view); - - virtual void setSelectionMode( KFile::SelectionMode sm ); - - virtual void setSelected(const KFileItem *, bool); - virtual bool isSelected( const KFileItem * ) const; - virtual void clearSelection(); - virtual void selectAll(); - virtual void invertSelection(); - - virtual void setCurrentItem( const KFileItem * ); - virtual KFileItem * currentFileItem() const; - virtual KFileItem * firstFileItem() const; - virtual KFileItem * nextItem( const KFileItem * ) const; - virtual KFileItem * prevItem( const KFileItem * ) const; - - virtual void insertItem( KFileItem *i ); - virtual void clear(); - - virtual void setSorting( TQDir::SortSpec sort ); - - virtual void readConfig( TDEConfig *, const TQString& group = TQString::null ); - virtual void writeConfig( TDEConfig *, const TQString& group = TQString::null); - - void ensureItemVisible( const KFileItem * ); - - virtual KActionCollection * actionCollection() const; - - virtual void setAcceptDrops(bool b); - -protected: - KFileIconView *left; - KFileView *right; - -protected slots: - void slotSortingChanged( TQDir::SortSpec ); - -private: - KFileView *focusView( KFileView *preferred ) const; - - // in nextItem() and prevItem(), we have to switch views, when the first - // view returns 0L. So we need to remember which view was used in the - // previous call to next/prevItem(). Yes, it's a hack, but it works for - // some cases at least. - mutable KFileView *m_lastViewForNextItem; - mutable KFileView *m_lastViewForPrevItem; - -protected: - virtual bool eventFilter( TQObject *o, TQEvent *e ); - void setDropOptions_impl(int options); - - virtual void virtual_hook( int id, void* data ); -private: - class KCombiViewPrivate; - KCombiViewPrivate *d; - -}; - -#endif diff --git a/kio/kfile/kcustommenueditor.cpp b/kio/kfile/kcustommenueditor.cpp deleted file mode 100644 index 2049860d1..000000000 --- a/kio/kfile/kcustommenueditor.cpp +++ /dev/null @@ -1,242 +0,0 @@ -/* This file is part of the KDE libraries - Copyright (C) 2002 Waldo Bastian (bastian@kde.org) - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; version 2 - of the License. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "kcustommenueditor.h" - -class KCustomMenuEditor::Item : public TQListViewItem -{ -public: - Item(TQListView *parent, KService::Ptr service) - : TQListViewItem(parent), - s(service) - { - init(); - } - - Item(TQListViewItem *parent, KService::Ptr service) - : TQListViewItem(parent), - s(service) - { - init(); - } - - void init() - { - TQString serviceName = s->name(); - - // item names may contain ampersands. To avoid them being converted - // to accelators, replace them with two ampersands. - serviceName.replace("&", "&&"); - - TQPixmap normal = TDEGlobal::instance()->iconLoader()->loadIcon(s->icon(), KIcon::Small, - 0, KIcon::DefaultState, 0L, true); - - // make sure they are not larger than 16x16 - if (normal.width() > 16 || normal.height() > 16) { - TQImage tmp = normal.convertToImage(); - tmp = tmp.smoothScale(16, 16); - normal.convertFromImage(tmp); - } - setText(0, serviceName); - setPixmap(0, normal); - } - - KService::Ptr s; -}; - -class KCustomMenuEditor::KCustomMenuEditorPrivate -{ -public: - TQPushButton * pbRemove; - TQPushButton * pbMoveUp; - TQPushButton * pbMoveDown; -}; - -KCustomMenuEditor::KCustomMenuEditor(TQWidget *parent) - : KDialogBase(parent, "custommenueditor", true, i18n("Menu Editor"), Ok|Cancel, Ok, true), - m_listView(0) -{ - d = new KCustomMenuEditorPrivate; - TQHBox *page = makeHBoxMainWidget(); - m_listView = new KListView(page); - m_listView->addColumn(i18n("Menu")); - m_listView->setFullWidth(true); - m_listView->setSorting(-1); - KButtonBox *buttonBox = new KButtonBox(page, Qt::Vertical); - buttonBox->addButton(i18n("New..."), TQT_TQOBJECT(this), TQT_SLOT(slotNewItem())); - d->pbRemove=buttonBox->addButton(i18n("Remove"), TQT_TQOBJECT(this), TQT_SLOT(slotRemoveItem())); - d->pbMoveUp=buttonBox->addButton(i18n("Move Up"), TQT_TQOBJECT(this), TQT_SLOT(slotMoveUp())); - d->pbMoveDown=buttonBox->addButton(i18n("Move Down"), TQT_TQOBJECT(this), TQT_SLOT(slotMoveDown())); - buttonBox->layout(); - connect( m_listView, TQT_SIGNAL( selectionChanged () ), this, TQT_SLOT( refreshButton() ) ); - refreshButton(); -} - -KCustomMenuEditor::~KCustomMenuEditor() -{ - delete d; - d=0; -} - -void KCustomMenuEditor::refreshButton() -{ - TQListViewItem *item = m_listView->currentItem(); - d->pbRemove->setEnabled( item ); - d->pbMoveUp->setEnabled( item && item->itemAbove() ); - d->pbMoveDown->setEnabled( item && item->itemBelow() ); -} - -void -KCustomMenuEditor::load(TDEConfigBase *cfg) -{ - cfg->setGroup(TQString::null); - int count = cfg->readNumEntry("NrOfItems"); - TQListViewItem *last = 0; - for(int i = 0; i < count; i++) - { - TQString entry = cfg->readPathEntry(TQString("Item%1").arg(i+1)); - if (entry.isEmpty()) - continue; - - // Try KSycoca first. - KService::Ptr menuItem = KService::serviceByDesktopPath( entry ); - if (!menuItem) - menuItem = KService::serviceByDesktopName( entry ); - if (!menuItem) - menuItem = new KService( entry ); - - if (!menuItem->isValid()) - continue; - - TQListViewItem *item = new Item(m_listView, menuItem); - item->moveItem(last); - last = item; - } -} - -void -KCustomMenuEditor::save(TDEConfigBase *cfg) -{ - // First clear the whole config file. - TQStringList groups = cfg->groupList(); - for(TQStringList::ConstIterator it = groups.begin(); - it != groups.end(); ++it) - { - cfg->deleteGroup(*it); - } - - cfg->setGroup(TQString::null); - Item * item = (Item *) m_listView->firstChild(); - int i = 0; - while(item) - { - i++; - TQString path = item->s->desktopEntryPath(); - if (TQDir::isRelativePath(path) || TQDir::isRelativePath(TDEGlobal::dirs()->relativeLocation("xdgdata-apps", path))) - path = item->s->desktopEntryName(); - cfg->writePathEntry(TQString("Item%1").arg(i), path); - item = (Item *) item->nextSibling(); - } - cfg->writeEntry("NrOfItems", i); -} - -void -KCustomMenuEditor::slotNewItem() -{ - TQListViewItem *item = m_listView->currentItem(); - - KOpenWithDlg dlg(this); - dlg.setSaveNewApplications(true); - - if (dlg.exec()) - { - KService::Ptr s = dlg.service(); - if (s && s->isValid()) - { - Item *newItem = new Item(m_listView, s); - newItem->moveItem(item); - } - refreshButton(); - } -} - -void -KCustomMenuEditor::slotRemoveItem() -{ - TQListViewItem *item = m_listView->currentItem(); - if (!item) - return; - - delete item; - refreshButton(); -} - -void -KCustomMenuEditor::slotMoveUp() -{ - TQListViewItem *item = m_listView->currentItem(); - if (!item) - return; - - TQListViewItem *searchItem = m_listView->firstChild(); - while(searchItem) - { - TQListViewItem *next = searchItem->nextSibling(); - if (next == item) - { - searchItem->moveItem(item); - break; - } - searchItem = next; - } - refreshButton(); -} - -void -KCustomMenuEditor::slotMoveDown() -{ - TQListViewItem *item = m_listView->currentItem(); - if (!item) - return; - - TQListViewItem *after = item->nextSibling(); - if (!after) - return; - - item->moveItem( after ); - refreshButton(); -} - -#include "kcustommenueditor.moc" diff --git a/kio/kfile/kcustommenueditor.h b/kio/kfile/kcustommenueditor.h deleted file mode 100644 index 108e9c477..000000000 --- a/kio/kfile/kcustommenueditor.h +++ /dev/null @@ -1,67 +0,0 @@ -/* This file is part of the KDE libraries - Copyright (C) 2002 Waldo Bastian (bastian@kde.org) - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; version 2 - of the License. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ -#ifndef _KCUSTOMMENUEDITOR_H_ -#define _KCUSTOMMENUEDITOR_H_ - -#include - -class KListView; -class TDEConfigBase; - - /* - * Dialog for editing custom menus. - * - * @author Waldo Bastian (bastian@kde.org) - * @since 3.1 - */ -class TDEIO_EXPORT KCustomMenuEditor : public KDialogBase -{ - Q_OBJECT -public: - /** - * Create a dialog for editing a custom menu - */ - KCustomMenuEditor(TQWidget *parent); - ~KCustomMenuEditor(); - /** - * load the custom menu - */ - void load(TDEConfigBase *); - - /** - * save the custom menu - */ - void save(TDEConfigBase *); - -public slots: - void slotNewItem(); - void slotRemoveItem(); - void slotMoveUp(); - void slotMoveDown(); - void refreshButton(); - -protected: - class Item; - KListView *m_listView; - - class KCustomMenuEditorPrivate; - KCustomMenuEditorPrivate *d; -}; - -#endif diff --git a/kio/kfile/kdiroperator.cpp b/kio/kfile/kdiroperator.cpp deleted file mode 100644 index 1b7e11356..000000000 --- a/kio/kfile/kdiroperator.cpp +++ /dev/null @@ -1,1740 +0,0 @@ -/* This file is part of the KDE libraries - Copyright (C) 1999,2000 Stephan Kulow - 1999,2000,2001,2002,2003 Carsten Pfeiffer - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "config-kfile.h" -#include "kcombiview.h" -#include "kdiroperator.h" -#include "kfiledetailview.h" -#include "kfileiconview.h" -#include "kfilepreview.h" -#include "kfileview.h" -#include "kfileitem.h" -#include "kfilemetapreview.h" - - -template class TQPtrStack; -template class TQDict; - - -class KDirOperator::KDirOperatorPrivate -{ -public: - KDirOperatorPrivate() { - onlyDoubleClickSelectsFiles = false; - progressDelayTimer = 0L; - dirHighlighting = false; - config = 0L; - dropOptions = 0; - } - - ~KDirOperatorPrivate() { - delete progressDelayTimer; - } - - bool dirHighlighting; - TQString lastURL; // used for highlighting a directory on cdUp - bool onlyDoubleClickSelectsFiles; - TQTimer *progressDelayTimer; - KActionSeparator *viewActionSeparator; - int dropOptions; - - TDEConfig *config; - TQString configGroup; -}; - -KDirOperator::KDirOperator(const KURL& _url, - TQWidget *parent, const char* _name) - : TQWidget(parent, _name), - dir(0), - m_fileView(0), - progress(0) -{ - myPreview = 0L; - myMode = KFile::File; - m_viewKind = KFile::Simple; - mySorting = static_cast(TQDir::Name | TQDir::DirsFirst); - d = new KDirOperatorPrivate; - - if (_url.isEmpty()) { // no dir specified -> current dir - TQString strPath = TQDir::currentDirPath(); - strPath.append('/'); - currUrl = KURL(); - currUrl.setProtocol(TQString::fromLatin1("file")); - currUrl.setPath(strPath); - } - else { - currUrl = _url; - if ( currUrl.protocol().isEmpty() ) - currUrl.setProtocol(TQString::fromLatin1("file")); - - currUrl.addPath("/"); // make sure we have a trailing slash! - } - - setDirLister( new KDirLister( true ) ); - - connect(&myCompletion, TQT_SIGNAL(match(const TQString&)), - TQT_SLOT(slotCompletionMatch(const TQString&))); - - progress = new KProgress(this, "progress"); - progress->adjustSize(); - progress->move(2, height() - progress->height() -2); - - d->progressDelayTimer = new TQTimer( this, "progress delay timer" ); - connect( d->progressDelayTimer, TQT_SIGNAL( timeout() ), - TQT_SLOT( slotShowProgress() )); - - myCompleteListDirty = false; - - backStack.setAutoDelete( true ); - forwardStack.setAutoDelete( true ); - - // action stuff - setupActions(); - setupMenu(); - - setFocusPolicy(TQ_WheelFocus); -} - -KDirOperator::~KDirOperator() -{ - resetCursor(); - if ( m_fileView ) - { - if ( d->config ) - m_fileView->writeConfig( d->config, d->configGroup ); - - delete m_fileView; - m_fileView = 0L; - } - - delete myPreview; - delete dir; - delete d; -} - - -void KDirOperator::setSorting( TQDir::SortSpec spec ) -{ - if ( m_fileView ) - m_fileView->setSorting( spec ); - mySorting = spec; - updateSortActions(); -} - -void KDirOperator::resetCursor() -{ - TQApplication::restoreOverrideCursor(); - progress->hide(); -} - -void KDirOperator::insertViewDependentActions() -{ - // If we have a new view actionCollection(), insert its actions - // into viewActionMenu. - - if( !m_fileView ) - return; - - if ( (viewActionMenu->popupMenu()->count() == 0) || // Not yet initialized or... - (viewActionCollection != m_fileView->actionCollection()) ) // ...changed since. - { - if (viewActionCollection) - { - disconnect( viewActionCollection, TQT_SIGNAL( inserted( KAction * )), - this, TQT_SLOT( slotViewActionAdded( KAction * ))); - disconnect( viewActionCollection, TQT_SIGNAL( removed( KAction * )), - this, TQT_SLOT( slotViewActionRemoved( KAction * ))); - } - - viewActionMenu->popupMenu()->clear(); -// viewActionMenu->insert( shortAction ); -// viewActionMenu->insert( detailedAction ); -// viewActionMenu->insert( actionSeparator ); - viewActionMenu->insert( myActionCollection->action( "short view" ) ); - viewActionMenu->insert( myActionCollection->action( "detailed view" ) ); - viewActionMenu->insert( actionSeparator ); - viewActionMenu->insert( showHiddenAction ); -// viewActionMenu->insert( myActionCollection->action( "single" )); - viewActionMenu->insert( separateDirsAction ); - // Warning: adjust slotViewActionAdded() and slotViewActionRemoved() - // when you add/remove actions here! - - viewActionCollection = m_fileView->actionCollection(); - if (!viewActionCollection) - return; - - if ( !viewActionCollection->isEmpty() ) - { - viewActionMenu->insert( d->viewActionSeparator ); - - // first insert the normal actions, then the grouped ones - TQStringList groups = viewActionCollection->groups(); - groups.prepend( TQString::null ); // actions without group - TQStringList::ConstIterator git = groups.begin(); - KActionPtrList list; - KAction *sep = actionCollection()->action("separator"); - for ( ; git != groups.end(); ++git ) - { - if ( git != groups.begin() ) - viewActionMenu->insert( sep ); - - list = viewActionCollection->actions( *git ); - KActionPtrList::ConstIterator it = list.begin(); - for ( ; it != list.end(); ++it ) - viewActionMenu->insert( *it ); - } - } - - connect( viewActionCollection, TQT_SIGNAL( inserted( KAction * )), - TQT_SLOT( slotViewActionAdded( KAction * ))); - connect( viewActionCollection, TQT_SIGNAL( removed( KAction * )), - TQT_SLOT( slotViewActionRemoved( KAction * ))); - } -} - -void KDirOperator::activatedMenu( const KFileItem *, const TQPoint& pos ) -{ - setupMenu(); - updateSelectionDependentActions(); - - actionMenu->popup( pos ); -} - -void KDirOperator::updateSelectionDependentActions() -{ - bool hasSelection = m_fileView && m_fileView->selectedItems() && - !m_fileView->selectedItems()->isEmpty(); - myActionCollection->action( "trash" )->setEnabled( hasSelection ); - myActionCollection->action( "delete" )->setEnabled( hasSelection ); - myActionCollection->action( "properties" )->setEnabled( hasSelection ); -} - -void KDirOperator::setPreviewWidget(const TQWidget *w) -{ - if(w != 0L) - m_viewKind = (m_viewKind | KFile::PreviewContents); - else - m_viewKind = (m_viewKind & ~KFile::PreviewContents); - - delete myPreview; - myPreview = w; - - KToggleAction *preview = static_cast(myActionCollection->action("preview")); - preview->setEnabled( w != 0L ); - preview->setChecked( w != 0L ); - setView( static_cast(m_viewKind) ); -} - -int KDirOperator::numDirs() const -{ - return m_fileView ? m_fileView->numDirs() : 0; -} - -int KDirOperator::numFiles() const -{ - return m_fileView ? m_fileView->numFiles() : 0; -} - -void KDirOperator::slotDetailedView() -{ - KFile::FileView view = static_cast( (m_viewKind & ~KFile::Simple) | KFile::Detail ); - setView( view ); -} - -void KDirOperator::slotSimpleView() -{ - KFile::FileView view = static_cast( (m_viewKind & ~KFile::Detail) | KFile::Simple ); - setView( view ); -} - -void KDirOperator::slotToggleHidden( bool show ) -{ - dir->setShowingDotFiles( show ); - updateDir(); - if ( m_fileView ) - m_fileView->listingCompleted(); -} - -void KDirOperator::slotSeparateDirs() -{ - if (separateDirsAction->isChecked()) - { - KFile::FileView view = static_cast( m_viewKind | KFile::SeparateDirs ); - setView( view ); - } - else - { - KFile::FileView view = static_cast( m_viewKind & ~KFile::SeparateDirs ); - setView( view ); - } -} - -void KDirOperator::slotDefaultPreview() -{ - m_viewKind = m_viewKind | KFile::PreviewContents; - if ( !myPreview ) { - myPreview = new KFileMetaPreview( this ); - (static_cast( myActionCollection->action("preview") ))->setChecked(true); - } - - setView( static_cast(m_viewKind) ); -} - -void KDirOperator::slotSortByName() -{ - int sorting = (m_fileView->sorting()) & ~TQDir::SortByMask; - m_fileView->setSorting( static_cast( sorting | TQDir::Name )); - mySorting = m_fileView->sorting(); - caseInsensitiveAction->setEnabled( true ); -} - -void KDirOperator::slotSortBySize() -{ - int sorting = (m_fileView->sorting()) & ~TQDir::SortByMask; - m_fileView->setSorting( static_cast( sorting | TQDir::Size )); - mySorting = m_fileView->sorting(); - caseInsensitiveAction->setEnabled( false ); -} - -void KDirOperator::slotSortByDate() -{ - int sorting = (m_fileView->sorting()) & ~TQDir::SortByMask; - m_fileView->setSorting( static_cast( sorting | TQDir::Time )); - mySorting = m_fileView->sorting(); - caseInsensitiveAction->setEnabled( false ); -} - -void KDirOperator::slotSortReversed() -{ - if ( m_fileView ) - m_fileView->sortReversed(); -} - -void KDirOperator::slotToggleDirsFirst() -{ - TQDir::SortSpec sorting = m_fileView->sorting(); - if ( !KFile::isSortDirsFirst( sorting ) ) - m_fileView->setSorting( static_cast( sorting | TQDir::DirsFirst )); - else - m_fileView->setSorting( static_cast( sorting & ~TQDir::DirsFirst)); - mySorting = m_fileView->sorting(); -} - -void KDirOperator::slotToggleIgnoreCase() -{ - TQDir::SortSpec sorting = m_fileView->sorting(); - if ( !KFile::isSortCaseInsensitive( sorting ) ) - m_fileView->setSorting( static_cast( sorting | TQDir::IgnoreCase )); - else - m_fileView->setSorting( static_cast( sorting & ~TQDir::IgnoreCase)); - mySorting = m_fileView->sorting(); -} - -void KDirOperator::mkdir() -{ - bool ok; - TQString where = url().pathOrURL(); - TQString name = i18n( "New Folder" ); - if ( url().isLocalFile() && TQFileInfo( url().path(+1) + name ).exists() ) - name = TDEIO::RenameDlg::suggestName( url(), name ); - - TQString dir = KInputDialog::getText( i18n( "New Folder" ), - i18n( "Create new folder in:\n%1" ).arg( where ), - name, &ok, this); - if (ok) - mkdir( TDEIO::encodeFileName( dir ), true ); -} - -bool KDirOperator::mkdir( const TQString& directory, bool enterDirectory ) -{ - // Creates "directory", relative to the current directory (currUrl). - // The given path may contain any number directories, existant or not. - // They will all be created, if possible. - - bool writeOk = false; - bool exists = false; - KURL url( currUrl ); - - TQStringList dirs = TQStringList::split( TQDir::separator(), directory ); - TQStringList::ConstIterator it = dirs.begin(); - - for ( ; it != dirs.end(); ++it ) - { - url.addPath( *it ); - exists = TDEIO::NetAccess::exists( url, false, 0 ); - writeOk = !exists && TDEIO::NetAccess::mkdir( url, topLevelWidget() ); - } - - if ( exists ) // url was already existant - { - KMessageBox::sorry(viewWidget(), i18n("A file or folder named %1 already exists.").arg(url.pathOrURL())); - enterDirectory = false; - } - else if ( !writeOk ) { - KMessageBox::sorry(viewWidget(), i18n("You do not have permission to " - "create that folder." )); - } - else if ( enterDirectory ) { - setURL( url, true ); - } - - return writeOk; -} - -TDEIO::DeleteJob * KDirOperator::del( const KFileItemList& items, - bool ask, bool showProgress ) -{ - return del( items, this, ask, showProgress ); -} - -TDEIO::DeleteJob * KDirOperator::del( const KFileItemList& items, - TQWidget *parent, - bool ask, bool showProgress ) -{ - if ( items.isEmpty() ) { - KMessageBox::information( parent, - i18n("You did not select a file to delete."), - i18n("Nothing to Delete") ); - return 0L; - } - - KURL::List urls; - TQStringList files; - KFileItemListIterator it( items ); - - for ( ; it.current(); ++it ) { - KURL url = (*it)->url(); - urls.append( url ); - if ( url.isLocalFile() ) - files.append( url.path() ); - else - files.append( url.prettyURL() ); - } - - bool doIt = !ask; - if ( ask ) { - int ret; - if ( items.count() == 1 ) { - ret = KMessageBox::warningContinueCancel( parent, - i18n( "Do you really want to delete\n '%1'?" ) - .arg( files.first() ), - i18n("Delete File"), - KStdGuiItem::del(), "AskForDelete" ); - } - else - ret = KMessageBox::warningContinueCancelList( parent, - i18n("Do you really want to delete this item?", "Do you really want to delete these %n items?", items.count() ), - files, - i18n("Delete Files"), - KStdGuiItem::del(), "AskForDelete" ); - doIt = (ret == KMessageBox::Continue); - } - - if ( doIt ) { - TDEIO::DeleteJob *job = TDEIO::del( urls, false, showProgress ); - job->setWindow (topLevelWidget()); - job->setAutoErrorHandlingEnabled( true, parent ); - return job; - } - - return 0L; -} - -void KDirOperator::deleteSelected() -{ - if ( !m_fileView ) - return; - - const KFileItemList *list = m_fileView->selectedItems(); - if ( list ) - del( *list ); -} - -TDEIO::CopyJob * KDirOperator::trash( const KFileItemList& items, - TQWidget *parent, - bool ask, bool showProgress ) -{ - if ( items.isEmpty() ) { - KMessageBox::information( parent, - i18n("You did not select a file to trash."), - i18n("Nothing to Trash") ); - return 0L; - } - - KURL::List urls; - TQStringList files; - KFileItemListIterator it( items ); - - for ( ; it.current(); ++it ) { - KURL url = (*it)->url(); - urls.append( url ); - if ( url.isLocalFile() ) - files.append( url.path() ); - else - files.append( url.prettyURL() ); - } - - bool doIt = !ask; - if ( ask ) { - int ret; - if ( items.count() == 1 ) { - ret = KMessageBox::warningContinueCancel( parent, - i18n( "Do you really want to trash\n '%1'?" ) - .arg( files.first() ), - i18n("Trash File"), - KGuiItem(i18n("to trash", "&Trash"),"edittrash"), "AskForTrash" ); - } - else - ret = KMessageBox::warningContinueCancelList( parent, - i18n("translators: not called for n == 1", "Do you really want to trash these %n items?", items.count() ), - files, - i18n("Trash Files"), - KGuiItem(i18n("to trash", "&Trash"),"edittrash"), "AskForTrash" ); - doIt = (ret == KMessageBox::Continue); - } - - if ( doIt ) { - TDEIO::CopyJob *job = TDEIO::trash( urls, showProgress ); - job->setWindow (topLevelWidget()); - job->setAutoErrorHandlingEnabled( true, parent ); - return job; - } - - return 0L; -} - -void KDirOperator::trashSelected(KAction::ActivationReason reason, TQt::ButtonState state) -{ - if ( !m_fileView ) - return; - - if ( reason == KAction::PopupMenuActivation && ( state & ShiftButton ) ) { - deleteSelected(); - return; - } - - const KFileItemList *list = m_fileView->selectedItems(); - if ( list ) - trash( *list, this ); -} - -void KDirOperator::close() -{ - resetCursor(); - pendingMimeTypes.clear(); - myCompletion.clear(); - myDirCompletion.clear(); - myCompleteListDirty = true; - dir->stop(); -} - -void KDirOperator::checkPath(const TQString &, bool /*takeFiles*/) // SLOT -{ -#if 0 - // copy the argument in a temporary string - TQString text = _txt; - // it's unlikely to happen, that at the beginning are spaces, but - // for the end, it happens quite often, I guess. - text = text.stripWhiteSpace(); - // if the argument is no URL (the check is quite fragil) and it's - // no absolute path, we add the current directory to get a correct url - if (text.find(':') < 0 && text[0] != '/') - text.insert(0, currUrl); - - // in case we have a selection defined and someone patched the file- - // name, we check, if the end of the new name is changed. - if (!selection.isNull()) { - int position = text.findRev('/'); - ASSERT(position >= 0); // we already inserted the current dir in case - TQString filename = text.mid(position + 1, text.length()); - if (filename != selection) - selection = TQString::null; - } - - KURL u(text); // I have to take care of entered URLs - bool filenameEntered = false; - - if (u.isLocalFile()) { - // the empty path is kind of a hack - KFileItem i("", u.path()); - if (i.isDir()) - setURL(text, true); - else { - if (takeFiles) - if (acceptOnlyExisting && !i.isFile()) - warning("you entered an invalid URL"); - else - filenameEntered = true; - } - } else - setURL(text, true); - - if (filenameEntered) { - filename_ = u.url(); - emit fileSelected(filename_); - - TQApplication::restoreOverrideCursor(); - - accept(); - } -#endif - kdDebug(kfile_area) << "TODO KDirOperator::checkPath()" << endl; -} - -void KDirOperator::setURL(const KURL& _newurl, bool clearforward) -{ - KURL newurl; - - if ( !_newurl.isValid() ) - newurl.setPath( TQDir::homeDirPath() ); - else - newurl = _newurl; - - TQString pathstr = newurl.path(+1); - newurl.setPath(pathstr); - - // already set - if ( newurl.equals( currUrl, true ) ) - return; - - if ( !isReadable( newurl ) ) { - // maybe newurl is a file? check its parent directory - newurl.cd(TQString::fromLatin1("..")); - if ( !isReadable( newurl ) ) { - resetCursor(); - KMessageBox::error(viewWidget(), - i18n("The specified folder does not exist " - "or was not readable.")); - return; - } - } - - if (clearforward) { - // autodelete should remove this one - backStack.push(new KURL(currUrl)); - forwardStack.clear(); - } - - d->lastURL = currUrl.url(-1); - currUrl = newurl; - - pathChanged(); - emit urlEntered(newurl); - - // enable/disable actions - forwardAction->setEnabled( !forwardStack.isEmpty() ); - backAction->setEnabled( !backStack.isEmpty() ); - upAction->setEnabled( !isRoot() ); - - openURL( newurl ); -} - -void KDirOperator::updateDir() -{ - dir->emitChanges(); - if ( m_fileView ) - m_fileView->listingCompleted(); -} - -void KDirOperator::rereadDir() -{ - pathChanged(); - openURL( currUrl, false, true ); -} - - -bool KDirOperator::openURL( const KURL& url, bool keep, bool reload ) -{ - bool result = dir->openURL( url, keep, reload ); - if ( !result ) // in that case, neither completed() nor canceled() will be emitted by KDL - slotCanceled(); - - return result; -} - -// Protected -void KDirOperator::pathChanged() -{ - if (!m_fileView) - return; - - pendingMimeTypes.clear(); - m_fileView->clear(); - myCompletion.clear(); - myDirCompletion.clear(); - - // it may be, that we weren't ready at this time - TQApplication::restoreOverrideCursor(); - - // when TDEIO::Job emits finished, the slot will restore the cursor - TQApplication::setOverrideCursor( tqwaitCursor ); - - if ( !isReadable( currUrl )) { - KMessageBox::error(viewWidget(), - i18n("The specified folder does not exist " - "or was not readable.")); - if (backStack.isEmpty()) - home(); - else - back(); - } -} - -void KDirOperator::slotRedirected( const KURL& newURL ) -{ - currUrl = newURL; - pendingMimeTypes.clear(); - myCompletion.clear(); - myDirCompletion.clear(); - myCompleteListDirty = true; - emit urlEntered( newURL ); -} - -// Code pinched from kfm then hacked -void KDirOperator::back() -{ - if ( backStack.isEmpty() ) - return; - - forwardStack.push( new KURL(currUrl) ); - - KURL *s = backStack.pop(); - - setURL(*s, false); - delete s; -} - -// Code pinched from kfm then hacked -void KDirOperator::forward() -{ - if ( forwardStack.isEmpty() ) - return; - - backStack.push(new KURL(currUrl)); - - KURL *s = forwardStack.pop(); - setURL(*s, false); - delete s; -} - -KURL KDirOperator::url() const -{ - return currUrl; -} - -void KDirOperator::cdUp() -{ - KURL tmp(currUrl); - tmp.cd(TQString::fromLatin1("..")); - setURL(tmp, true); -} - -void KDirOperator::home() -{ - KURL u; - u.setPath( TQDir::homeDirPath() ); - setURL(u, true); -} - -void KDirOperator::clearFilter() -{ - dir->setNameFilter( TQString::null ); - dir->clearMimeFilter(); - checkPreviewSupport(); -} - -void KDirOperator::setNameFilter(const TQString& filter) -{ - dir->setNameFilter(filter); - checkPreviewSupport(); -} - -void KDirOperator::setMimeFilter( const TQStringList& mimetypes ) -{ - dir->setMimeFilter( mimetypes ); - checkPreviewSupport(); -} - -bool KDirOperator::checkPreviewSupport() -{ - KToggleAction *previewAction = static_cast( myActionCollection->action( "preview" )); - - bool hasPreviewSupport = false; - TDEConfig *kc = TDEGlobal::config(); - TDEConfigGroupSaver cs( kc, ConfigGroup ); - if ( kc->readBoolEntry( "Show Default Preview", true ) ) - hasPreviewSupport = checkPreviewInternal(); - - previewAction->setEnabled( hasPreviewSupport ); - return hasPreviewSupport; -} - -bool KDirOperator::checkPreviewInternal() const -{ - TQStringList supported = TDEIO::PreviewJob::supportedMimeTypes(); - // no preview support for directories? - if ( dirOnlyMode() && supported.findIndex( "inode/directory" ) == -1 ) - return false; - - TQStringList mimeTypes = dir->mimeFilters(); - TQStringList nameFilter = TQStringList::split( " ", dir->nameFilter() ); - - if ( mimeTypes.isEmpty() && nameFilter.isEmpty() && !supported.isEmpty() ) - return true; - else { - TQRegExp r; - r.setWildcard( true ); // the "mimetype" can be "image/*" - - if ( !mimeTypes.isEmpty() ) { - TQStringList::Iterator it = supported.begin(); - - for ( ; it != supported.end(); ++it ) { - r.setPattern( *it ); - - TQStringList result = mimeTypes.grep( r ); - if ( !result.isEmpty() ) { // matches! -> we want previews - return true; - } - } - } - - if ( !nameFilter.isEmpty() ) { - // find the mimetypes of all the filter-patterns and - KServiceTypeFactory *fac = KServiceTypeFactory::self(); - TQStringList::Iterator it1 = nameFilter.begin(); - for ( ; it1 != nameFilter.end(); ++it1 ) { - if ( (*it1) == "*" ) { - return true; - } - - KMimeType *mt = fac->findFromPattern( *it1 ); - if ( !mt ) - continue; - TQString mime = mt->name(); - delete mt; - - // the "mimetypes" we get from the PreviewJob can be "image/*" - // so we need to check in wildcard mode - TQStringList::Iterator it2 = supported.begin(); - for ( ; it2 != supported.end(); ++it2 ) { - r.setPattern( *it2 ); - if ( r.search( mime ) != -1 ) { - return true; - } - } - } - } - } - - return false; -} - -KFileView* KDirOperator::createView( TQWidget* parent, KFile::FileView view ) -{ - KFileView* new_view = 0L; - bool separateDirs = KFile::isSeparateDirs( view ); - bool preview = ( KFile::isPreviewInfo(view) || KFile::isPreviewContents( view ) ); - - if ( separateDirs || preview ) { - KCombiView *combi = 0L; - if (separateDirs) - { - combi = new KCombiView( parent, "combi view" ); - combi->setOnlyDoubleClickSelectsFiles(d->onlyDoubleClickSelectsFiles); - } - - KFileView* v = 0L; - if ( KFile::isSimpleView( view ) ) - v = createView( combi, KFile::Simple ); - else - v = createView( combi, KFile::Detail ); - - v->setOnlyDoubleClickSelectsFiles(d->onlyDoubleClickSelectsFiles); - - if (combi) - combi->setRight( v ); - - if (preview) - { - KFilePreview* pView = new KFilePreview( combi ? combi : v, parent, "preview" ); - pView->setOnlyDoubleClickSelectsFiles(d->onlyDoubleClickSelectsFiles); - new_view = pView; - } - else - new_view = combi; - } - else if ( KFile::isDetailView( view ) && !preview ) { - new_view = new KFileDetailView( parent, "detail view"); - new_view->setViewName( i18n("Detailed View") ); - } - else /* if ( KFile::isSimpleView( view ) && !preview ) */ { - KFileIconView *iconView = new KFileIconView( parent, "simple view"); - new_view = iconView; - new_view->setViewName( i18n("Short View") ); - } - - new_view->widget()->setAcceptDrops(acceptDrops()); - return new_view; -} - -void KDirOperator::setAcceptDrops(bool b) -{ - if (m_fileView) - m_fileView->widget()->setAcceptDrops(b); - TQWidget::setAcceptDrops(b); -} - -void KDirOperator::setDropOptions(int options) -{ - d->dropOptions = options; - if (m_fileView) - m_fileView->setDropOptions(options); -} - -void KDirOperator::setView( KFile::FileView view ) -{ - bool separateDirs = KFile::isSeparateDirs( view ); - bool preview=( KFile::isPreviewInfo(view) || KFile::isPreviewContents( view ) ); - - if (view == KFile::Default) { - if ( KFile::isDetailView( (KFile::FileView) defaultView ) ) - view = KFile::Detail; - else - view = KFile::Simple; - - separateDirs = KFile::isSeparateDirs( static_cast(defaultView) ); - preview = ( KFile::isPreviewInfo( static_cast(defaultView) ) || - KFile::isPreviewContents( static_cast(defaultView) ) ) - && myActionCollection->action("preview")->isEnabled(); - - if ( preview ) { // instantiates KFileMetaPreview and calls setView() - m_viewKind = defaultView; - slotDefaultPreview(); - return; - } - else if ( !separateDirs ) - separateDirsAction->setChecked(true); - } - - // if we don't have any files, we can't separate dirs from files :) - if ( (mode() & KFile::File) == 0 && - (mode() & KFile::Files) == 0 ) { - separateDirs = false; - separateDirsAction->setEnabled( false ); - } - - m_viewKind = static_cast(view) | (separateDirs ? KFile::SeparateDirs : 0); - view = static_cast(m_viewKind); - - KFileView *new_view = createView( this, view ); - if ( preview ) { - // we keep the preview-_widget_ around, but not the KFilePreview. - // KFilePreview::setPreviewWidget handles the reparenting for us - static_cast(new_view)->setPreviewWidget(myPreview, url()); - } - - setView( new_view ); -} - - -void KDirOperator::connectView(KFileView *view) -{ - // TODO: do a real timer and restart it after that - pendingMimeTypes.clear(); - bool listDir = true; - - if ( dirOnlyMode() ) - view->setViewMode(KFileView::Directories); - else - view->setViewMode(KFileView::All); - - if ( myMode & KFile::Files ) - view->setSelectionMode( KFile::Extended ); - else - view->setSelectionMode( KFile::Single ); - - if (m_fileView) - { - if ( d->config ) // save and restore the views' configuration - { - m_fileView->writeConfig( d->config, d->configGroup ); - view->readConfig( d->config, d->configGroup ); - } - - // transfer the state from old view to new view - view->clear(); - view->addItemList( *m_fileView->items() ); - listDir = false; - - if ( m_fileView->widget()->hasFocus() ) - view->widget()->setFocus(); - - KFileItem *oldCurrentItem = m_fileView->currentFileItem(); - if ( oldCurrentItem ) { - view->setCurrentItem( oldCurrentItem ); - view->setSelected( oldCurrentItem, false ); - view->ensureItemVisible( oldCurrentItem ); - } - - const KFileItemList *oldSelected = m_fileView->selectedItems(); - if ( !oldSelected->isEmpty() ) { - KFileItemListIterator it( *oldSelected ); - for ( ; it.current(); ++it ) - view->setSelected( it.current(), true ); - } - - m_fileView->widget()->hide(); - delete m_fileView; - } - - else - { - if ( d->config ) - view->readConfig( d->config, d->configGroup ); - } - - m_fileView = view; - m_fileView->setDropOptions(d->dropOptions); - viewActionCollection = 0L; - KFileViewSignaler *sig = view->signaler(); - - connect(sig, TQT_SIGNAL( activatedMenu(const KFileItem *, const TQPoint& ) ), - this, TQT_SLOT( activatedMenu(const KFileItem *, const TQPoint& ))); - connect(sig, TQT_SIGNAL( dirActivated(const KFileItem *) ), - this, TQT_SLOT( selectDir(const KFileItem*) ) ); - connect(sig, TQT_SIGNAL( fileSelected(const KFileItem *) ), - this, TQT_SLOT( selectFile(const KFileItem*) ) ); - connect(sig, TQT_SIGNAL( fileHighlighted(const KFileItem *) ), - this, TQT_SLOT( highlightFile(const KFileItem*) )); - connect(sig, TQT_SIGNAL( sortingChanged( TQDir::SortSpec ) ), - this, TQT_SLOT( slotViewSortingChanged( TQDir::SortSpec ))); - connect(sig, TQT_SIGNAL( dropped(const KFileItem *, TQDropEvent*, const KURL::List&) ), - this, TQT_SIGNAL( dropped(const KFileItem *, TQDropEvent*, const KURL::List&)) ); - - if ( reverseAction->isChecked() != m_fileView->isReversed() ) - slotSortReversed(); - - updateViewActions(); - m_fileView->widget()->resize(size()); - m_fileView->widget()->show(); - - if ( listDir ) { - TQApplication::setOverrideCursor( tqwaitCursor ); - openURL( currUrl ); - } - else - view->listingCompleted(); -} - -KFile::Mode KDirOperator::mode() const -{ - return myMode; -} - -void KDirOperator::setMode(KFile::Mode m) -{ - if (myMode == m) - return; - - myMode = m; - - dir->setDirOnlyMode( dirOnlyMode() ); - - // reset the view with the different mode - setView( static_cast(m_viewKind) ); -} - -void KDirOperator::setView(KFileView *view) -{ - if ( view == m_fileView ) { - return; - } - - setFocusProxy(view->widget()); - view->setSorting( mySorting ); - view->setOnlyDoubleClickSelectsFiles( d->onlyDoubleClickSelectsFiles ); - connectView(view); // also deletes the old view - - emit viewChanged( view ); -} - -void KDirOperator::setDirLister( KDirLister *lister ) -{ - if ( lister == dir ) // sanity check - return; - - delete dir; - dir = lister; - - dir->setAutoUpdate( true ); - - TQWidget* mainWidget = topLevelWidget(); - dir->setMainWindow (mainWidget); - kdDebug (kfile_area) << "mainWidget=" << mainWidget << endl; - - connect( dir, TQT_SIGNAL( percent( int )), - TQT_SLOT( slotProgress( int ) )); - connect( dir, TQT_SIGNAL(started( const KURL& )), TQT_SLOT(slotStarted())); - connect( dir, TQT_SIGNAL(newItems(const KFileItemList &)), - TQT_SLOT(insertNewFiles(const KFileItemList &))); - connect( dir, TQT_SIGNAL(completed()), TQT_SLOT(slotIOFinished())); - connect( dir, TQT_SIGNAL(canceled()), TQT_SLOT(slotCanceled())); - connect( dir, TQT_SIGNAL(deleteItem(KFileItem *)), - TQT_SLOT(itemDeleted(KFileItem *))); - connect( dir, TQT_SIGNAL(redirection( const KURL& )), - TQT_SLOT( slotRedirected( const KURL& ))); - connect( dir, TQT_SIGNAL( clear() ), TQT_SLOT( slotClearView() )); - connect( dir, TQT_SIGNAL( refreshItems( const KFileItemList& ) ), - TQT_SLOT( slotRefreshItems( const KFileItemList& ) ) ); -} - -void KDirOperator::insertNewFiles(const KFileItemList &newone) -{ - if ( newone.isEmpty() || !m_fileView ) - return; - - myCompleteListDirty = true; - m_fileView->addItemList( newone ); - emit updateInformation(m_fileView->numDirs(), m_fileView->numFiles()); - - KFileItem *item; - KFileItemListIterator it( newone ); - - while ( (item = it.current()) ) { - // highlight the dir we come from, if possible - if ( d->dirHighlighting && item->isDir() && - item->url().url(-1) == d->lastURL ) { - m_fileView->setCurrentItem( item ); - m_fileView->ensureItemVisible( item ); - } - - ++it; - } - - TQTimer::singleShot(200, this, TQT_SLOT(resetCursor())); -} - -void KDirOperator::selectDir(const KFileItem *item) -{ - setURL(item->url(), true); -} - -void KDirOperator::itemDeleted(KFileItem *item) -{ - pendingMimeTypes.removeRef( item ); - if ( m_fileView ) - { - m_fileView->removeItem( static_cast( item )); - emit updateInformation(m_fileView->numDirs(), m_fileView->numFiles()); - } -} - -void KDirOperator::selectFile(const KFileItem *item) -{ - TQApplication::restoreOverrideCursor(); - - emit fileSelected( item ); -} - -void KDirOperator::setCurrentItem( const TQString& filename ) -{ - if ( m_fileView ) { - const KFileItem *item = 0L; - - if ( !filename.isNull() ) - item = static_cast(dir->findByName( filename )); - - m_fileView->clearSelection(); - if ( item ) { - m_fileView->setCurrentItem( item ); - m_fileView->setSelected( item, true ); - m_fileView->ensureItemVisible( item ); - } - } -} - -TQString KDirOperator::makeCompletion(const TQString& string) -{ - if ( string.isEmpty() ) { - m_fileView->clearSelection(); - return TQString::null; - } - - prepareCompletionObjects(); - return myCompletion.makeCompletion( string ); -} - -TQString KDirOperator::makeDirCompletion(const TQString& string) -{ - if ( string.isEmpty() ) { - m_fileView->clearSelection(); - return TQString::null; - } - - prepareCompletionObjects(); - return myDirCompletion.makeCompletion( string ); -} - -void KDirOperator::prepareCompletionObjects() -{ - if ( !m_fileView ) - return; - - if ( myCompleteListDirty ) { // create the list of all possible completions - KFileItemListIterator it( *(m_fileView->items()) ); - for( ; it.current(); ++it ) { - KFileItem *item = it.current(); - - myCompletion.addItem( item->name() ); - if ( item->isDir() ) - myDirCompletion.addItem( item->name() ); - } - myCompleteListDirty = false; - } -} - -void KDirOperator::slotCompletionMatch(const TQString& match) -{ - setCurrentItem( match ); - emit completion( match ); -} - -void KDirOperator::setupActions() -{ - myActionCollection = new KActionCollection( topLevelWidget(), TQT_TQOBJECT(this), "KDirOperator::myActionCollection" ); - - actionMenu = new KActionMenu( i18n("Menu"), myActionCollection, "popupMenu" ); - upAction = KStdAction::up( TQT_TQOBJECT(this), TQT_SLOT( cdUp() ), myActionCollection, "up" ); - upAction->setText( i18n("Parent Folder") ); - backAction = KStdAction::back( TQT_TQOBJECT(this), TQT_SLOT( back() ), myActionCollection, "back" ); - forwardAction = KStdAction::forward( TQT_TQOBJECT(this), TQT_SLOT(forward()), myActionCollection, "forward" ); - homeAction = KStdAction::home( TQT_TQOBJECT(this), TQT_SLOT( home() ), myActionCollection, "home" ); - homeAction->setText(i18n("Home Folder")); - reloadAction = KStdAction::redisplay( TQT_TQOBJECT(this), TQT_SLOT(rereadDir()), myActionCollection, "reload" ); - actionSeparator = new KActionSeparator( myActionCollection, "separator" ); - d->viewActionSeparator = new KActionSeparator( myActionCollection, - "viewActionSeparator" ); - mkdirAction = new KAction( i18n("New Folder..."), 0, - TQT_TQOBJECT(this), TQT_SLOT( mkdir() ), myActionCollection, "mkdir" ); - KAction* trash = new KAction( i18n( "Move to Trash" ), "edittrash", Key_Delete, myActionCollection, "trash" ); - connect( trash, TQT_SIGNAL( activated( KAction::ActivationReason, TQt::ButtonState ) ), - this, TQT_SLOT( trashSelected( KAction::ActivationReason, TQt::ButtonState ) ) ); - new KAction( i18n( "Delete" ), "editdelete", SHIFT+Key_Delete, TQT_TQOBJECT(this), - TQT_SLOT( deleteSelected() ), myActionCollection, "delete" ); - mkdirAction->setIcon( TQString::fromLatin1("folder_new") ); - reloadAction->setText( i18n("Reload") ); - reloadAction->setShortcut( KStdAccel::shortcut( KStdAccel::Reload )); - - - // the sort menu actions - sortActionMenu = new KActionMenu( i18n("Sorting"), myActionCollection, "sorting menu"); - byNameAction = new KRadioAction( i18n("By Name"), 0, - TQT_TQOBJECT(this), TQT_SLOT( slotSortByName() ), - myActionCollection, "by name" ); - byDateAction = new KRadioAction( i18n("By Date"), 0, - TQT_TQOBJECT(this), TQT_SLOT( slotSortByDate() ), - myActionCollection, "by date" ); - bySizeAction = new KRadioAction( i18n("By Size"), 0, - TQT_TQOBJECT(this), TQT_SLOT( slotSortBySize() ), - myActionCollection, "by size" ); - reverseAction = new KToggleAction( i18n("Reverse"), 0, - TQT_TQOBJECT(this), TQT_SLOT( slotSortReversed() ), - myActionCollection, "reversed" ); - - TQString sortGroup = TQString::fromLatin1("sort"); - byNameAction->setExclusiveGroup( sortGroup ); - byDateAction->setExclusiveGroup( sortGroup ); - bySizeAction->setExclusiveGroup( sortGroup ); - - - dirsFirstAction = new KToggleAction( i18n("Folders First"), 0, - myActionCollection, "dirs first"); - caseInsensitiveAction = new KToggleAction(i18n("Case Insensitive"), 0, - myActionCollection, "case insensitive" ); - - connect( dirsFirstAction, TQT_SIGNAL( toggled( bool ) ), - TQT_SLOT( slotToggleDirsFirst() )); - connect( caseInsensitiveAction, TQT_SIGNAL( toggled( bool ) ), - TQT_SLOT( slotToggleIgnoreCase() )); - - - - // the view menu actions - viewActionMenu = new KActionMenu( i18n("&View"), myActionCollection, "view menu" ); - connect( viewActionMenu->popupMenu(), TQT_SIGNAL( aboutToShow() ), - TQT_SLOT( insertViewDependentActions() )); - - shortAction = new KRadioAction( i18n("Short View"), "view_multicolumn", - KShortcut(), myActionCollection, "short view" ); - detailedAction = new KRadioAction( i18n("Detailed View"), "view_detailed", - KShortcut(), myActionCollection, "detailed view" ); - - showHiddenAction = new KToggleAction( i18n("Show Hidden Files"), KShortcut(), - myActionCollection, "show hidden" ); -// showHiddenAction->setCheckedState( i18n("Hide Hidden Files") ); - separateDirsAction = new KToggleAction( i18n("Separate Folders"), KShortcut(), - TQT_TQOBJECT(this), - TQT_SLOT(slotSeparateDirs()), - myActionCollection, "separate dirs" ); - KToggleAction *previewAction = new KToggleAction(i18n("Show Preview"), - "thumbnail", KShortcut(), - myActionCollection, - "preview" ); - previewAction->setCheckedState(i18n("Hide Preview")); - connect( previewAction, TQT_SIGNAL( toggled( bool )), - TQT_SLOT( togglePreview( bool ))); - - - TQString viewGroup = TQString::fromLatin1("view"); - shortAction->setExclusiveGroup( viewGroup ); - detailedAction->setExclusiveGroup( viewGroup ); - - connect( shortAction, TQT_SIGNAL( activated() ), - TQT_SLOT( slotSimpleView() )); - connect( detailedAction, TQT_SIGNAL( activated() ), - TQT_SLOT( slotDetailedView() )); - connect( showHiddenAction, TQT_SIGNAL( toggled( bool ) ), - TQT_SLOT( slotToggleHidden( bool ) )); - - new KAction( i18n("Properties"), KShortcut(ALT+Key_Return), TQT_TQOBJECT(this), - TQT_SLOT(slotProperties()), myActionCollection, "properties" ); -} - -void KDirOperator::setupMenu() -{ - setupMenu(AllActions); -} - -void KDirOperator::setupMenu(int whichActions) -{ - // first fill the submenus (sort and view) - sortActionMenu->popupMenu()->clear(); - sortActionMenu->insert( byNameAction ); - sortActionMenu->insert( byDateAction ); - sortActionMenu->insert( bySizeAction ); - sortActionMenu->insert( actionSeparator ); - sortActionMenu->insert( reverseAction ); - sortActionMenu->insert( dirsFirstAction ); - sortActionMenu->insert( caseInsensitiveAction ); - - // now plug everything into the popupmenu - actionMenu->popupMenu()->clear(); - if (whichActions & NavActions) - { - actionMenu->insert( upAction ); - actionMenu->insert( backAction ); - actionMenu->insert( forwardAction ); - actionMenu->insert( homeAction ); - actionMenu->insert( actionSeparator ); - } - - if (whichActions & FileActions) - { - actionMenu->insert( mkdirAction ); - if (currUrl.isLocalFile() && !(TDEApplication::keyboardMouseState() & TQt::ShiftButton)) - actionMenu->insert( myActionCollection->action( "trash" ) ); - TDEConfig *globalconfig = TDEGlobal::config(); - TDEConfigGroupSaver cs( globalconfig, TQString::fromLatin1("KDE") ); - if (!currUrl.isLocalFile() || (TDEApplication::keyboardMouseState() & TQt::ShiftButton) || - globalconfig->readBoolEntry("ShowDeleteCommand", false)) - actionMenu->insert( myActionCollection->action( "delete" ) ); - actionMenu->insert( actionSeparator ); - } - - if (whichActions & SortActions) - { - actionMenu->insert( sortActionMenu ); - actionMenu->insert( actionSeparator ); - } - - if (whichActions & ViewActions) - { - actionMenu->insert( viewActionMenu ); - actionMenu->insert( actionSeparator ); - } - - if (whichActions & FileActions) - { - actionMenu->insert( myActionCollection->action( "properties" ) ); - } -} - -void KDirOperator::updateSortActions() -{ - if ( KFile::isSortByName( mySorting ) ) - byNameAction->setChecked( true ); - else if ( KFile::isSortByDate( mySorting ) ) - byDateAction->setChecked( true ); - else if ( KFile::isSortBySize( mySorting ) ) - bySizeAction->setChecked( true ); - - dirsFirstAction->setChecked( KFile::isSortDirsFirst( mySorting ) ); - caseInsensitiveAction->setChecked( KFile::isSortCaseInsensitive(mySorting) ); - caseInsensitiveAction->setEnabled( KFile::isSortByName( mySorting ) ); - - if ( m_fileView ) - reverseAction->setChecked( m_fileView->isReversed() ); -} - -void KDirOperator::updateViewActions() -{ - KFile::FileView fv = static_cast( m_viewKind ); - - separateDirsAction->setChecked( KFile::isSeparateDirs( fv ) && - separateDirsAction->isEnabled() ); - - shortAction->setChecked( KFile::isSimpleView( fv )); - detailedAction->setChecked( KFile::isDetailView( fv )); -} - -void KDirOperator::readConfig( TDEConfig *kc, const TQString& group ) -{ - if ( !kc ) - return; - TQString oldGroup = kc->group(); - if ( !group.isEmpty() ) - kc->setGroup( group ); - - defaultView = 0; - int sorting = 0; - - TQString viewStyle = kc->readEntry( TQString::fromLatin1("View Style"), - TQString::fromLatin1("Simple") ); - if ( viewStyle == TQString::fromLatin1("Detail") ) - defaultView |= KFile::Detail; - else - defaultView |= KFile::Simple; - if ( kc->readBoolEntry( TQString::fromLatin1("Separate Directories"), - DefaultMixDirsAndFiles ) ) - defaultView |= KFile::SeparateDirs; - if ( kc->readBoolEntry(TQString::fromLatin1("Show Preview"), false)) - defaultView |= KFile::PreviewContents; - - if ( kc->readBoolEntry( TQString::fromLatin1("Sort case insensitively"), - DefaultCaseInsensitive ) ) - sorting |= TQDir::IgnoreCase; - if ( kc->readBoolEntry( TQString::fromLatin1("Sort directories first"), - DefaultDirsFirst ) ) - sorting |= TQDir::DirsFirst; - - - TQString name = TQString::fromLatin1("Name"); - TQString sortBy = kc->readEntry( TQString::fromLatin1("Sort by"), name ); - if ( sortBy == name ) - sorting |= TQDir::Name; - else if ( sortBy == TQString::fromLatin1("Size") ) - sorting |= TQDir::Size; - else if ( sortBy == TQString::fromLatin1("Date") ) - sorting |= TQDir::Time; - - mySorting = static_cast( sorting ); - setSorting( mySorting ); - - - if ( kc->readBoolEntry( TQString::fromLatin1("Show hidden files"), - DefaultShowHidden ) ) { - showHiddenAction->setChecked( true ); - dir->setShowingDotFiles( true ); - } - if ( kc->readBoolEntry( TQString::fromLatin1("Sort reversed"), - DefaultSortReversed ) ) - reverseAction->setChecked( true ); - - kc->setGroup( oldGroup ); -} - -void KDirOperator::writeConfig( TDEConfig *kc, const TQString& group ) -{ - if ( !kc ) - return; - - const TQString oldGroup = kc->group(); - - if ( !group.isEmpty() ) - kc->setGroup( group ); - - TQString sortBy = TQString::fromLatin1("Name"); - if ( KFile::isSortBySize( mySorting ) ) - sortBy = TQString::fromLatin1("Size"); - else if ( KFile::isSortByDate( mySorting ) ) - sortBy = TQString::fromLatin1("Date"); - kc->writeEntry( TQString::fromLatin1("Sort by"), sortBy ); - - kc->writeEntry( TQString::fromLatin1("Sort reversed"), - reverseAction->isChecked() ); - kc->writeEntry( TQString::fromLatin1("Sort case insensitively"), - caseInsensitiveAction->isChecked() ); - kc->writeEntry( TQString::fromLatin1("Sort directories first"), - dirsFirstAction->isChecked() ); - - // don't save the separate dirs or preview when an application specific - // preview is in use. - bool appSpecificPreview = false; - if ( myPreview ) { - TQWidget *preview = const_cast( myPreview ); // grmbl - KFileMetaPreview *tmp = dynamic_cast( preview ); - appSpecificPreview = (tmp == 0L); - } - - if ( !appSpecificPreview ) { - if ( separateDirsAction->isEnabled() ) - kc->writeEntry( TQString::fromLatin1("Separate Directories"), - separateDirsAction->isChecked() ); - - KToggleAction *previewAction = static_cast(myActionCollection->action("preview")); - if ( previewAction->isEnabled() ) { - bool hasPreview = previewAction->isChecked(); - kc->writeEntry( TQString::fromLatin1("Show Preview"), hasPreview ); - } - } - - kc->writeEntry( TQString::fromLatin1("Show hidden files"), - showHiddenAction->isChecked() ); - - KFile::FileView fv = static_cast( m_viewKind ); - TQString style; - if ( KFile::isDetailView( fv ) ) - style = TQString::fromLatin1("Detail"); - else if ( KFile::isSimpleView( fv ) ) - style = TQString::fromLatin1("Simple"); - kc->writeEntry( TQString::fromLatin1("View Style"), style ); - - kc->setGroup( oldGroup ); -} - - -void KDirOperator::resizeEvent( TQResizeEvent * ) -{ - if (m_fileView) - m_fileView->widget()->resize( size() ); - - if ( TQT_BASE_OBJECT(progress->parent()) == TQT_BASE_OBJECT(this) ) // might be reparented into a statusbar - progress->move(2, height() - progress->height() -2); -} - -void KDirOperator::setOnlyDoubleClickSelectsFiles( bool enable ) -{ - d->onlyDoubleClickSelectsFiles = enable; - if ( m_fileView ) - m_fileView->setOnlyDoubleClickSelectsFiles( enable ); -} - -bool KDirOperator::onlyDoubleClickSelectsFiles() const -{ - return d->onlyDoubleClickSelectsFiles; -} - -void KDirOperator::slotStarted() -{ - progress->setProgress( 0 ); - // delay showing the progressbar for one second - d->progressDelayTimer->start( 1000, true ); -} - -void KDirOperator::slotShowProgress() -{ - progress->raise(); - progress->show(); - TQApplication::flushX(); -} - -void KDirOperator::slotProgress( int percent ) -{ - progress->setProgress( percent ); - // we have to redraw this as fast as possible - if ( progress->isVisible() ) - TQApplication::flushX(); -} - - -void KDirOperator::slotIOFinished() -{ - d->progressDelayTimer->stop(); - slotProgress( 100 ); - progress->hide(); - emit finishedLoading(); - resetCursor(); - - if ( m_fileView ) - m_fileView->listingCompleted(); -} - -void KDirOperator::slotCanceled() -{ - emit finishedLoading(); - resetCursor(); - - if ( m_fileView ) - m_fileView->listingCompleted(); -} - -KProgress * KDirOperator::progressBar() const -{ - return progress; -} - -void KDirOperator::clearHistory() -{ - backStack.clear(); - backAction->setEnabled( false ); - forwardStack.clear(); - forwardAction->setEnabled( false ); -} - -void KDirOperator::slotViewActionAdded( KAction *action ) -{ - if ( viewActionMenu->popupMenu()->count() == 5 ) // need to add a separator - viewActionMenu->insert( d->viewActionSeparator ); - - viewActionMenu->insert( action ); -} - -void KDirOperator::slotViewActionRemoved( KAction *action ) -{ - viewActionMenu->remove( action ); - - if ( viewActionMenu->popupMenu()->count() == 6 ) // remove the separator - viewActionMenu->remove( d->viewActionSeparator ); -} - -void KDirOperator::slotViewSortingChanged( TQDir::SortSpec sort ) -{ - mySorting = sort; - updateSortActions(); -} - -void KDirOperator::setEnableDirHighlighting( bool enable ) -{ - d->dirHighlighting = enable; -} - -bool KDirOperator::dirHighlighting() const -{ - return d->dirHighlighting; -} - -void KDirOperator::slotProperties() -{ - if ( m_fileView ) { - const KFileItemList *list = m_fileView->selectedItems(); - if ( !list->isEmpty() ) - (void) new KPropertiesDialog( *list, this, "props dlg", true); - } -} - -void KDirOperator::slotClearView() -{ - if ( m_fileView ) - m_fileView->clearView(); -} - -// ### temporary code -#include -bool KDirOperator::isReadable( const KURL& url ) -{ - if ( !url.isLocalFile() ) - return true; // what else can we say? - - KDE_struct_stat buf; - TQString ts = url.path(+1); - bool readable = ( KDE_stat( TQFile::encodeName( ts ), &buf) == 0 ); - if (readable) { // further checks - DIR *test; - test = opendir( TQFile::encodeName( ts )); // we do it just to test here - readable = (test != 0); - if (test) - closedir(test); - } - return readable; -} - -void KDirOperator::togglePreview( bool on ) -{ - if ( on ) - slotDefaultPreview(); - else - setView( (KFile::FileView) (m_viewKind & ~(KFile::PreviewContents|KFile::PreviewInfo)) ); -} - -void KDirOperator::slotRefreshItems( const KFileItemList& items ) -{ - if ( !m_fileView ) - return; - - KFileItemListIterator it( items ); - for ( ; it.current(); ++it ) - m_fileView->updateView( it.current() ); -} - -void KDirOperator::setViewConfig( TDEConfig *config, const TQString& group ) -{ - d->config = config; - d->configGroup = group; -} - -TDEConfig * KDirOperator::viewConfig() -{ - return d->config; -} - -TQString KDirOperator::viewConfigGroup() const -{ - return d->configGroup; -} - -void KDirOperator::virtual_hook( int, void* ) -{ /*BASE::virtual_hook( id, data );*/ } - -#include "kdiroperator.moc" diff --git a/kio/kfile/kdiroperator.h b/kio/kfile/kdiroperator.h deleted file mode 100644 index 3dbd42759..000000000 --- a/kio/kfile/kdiroperator.h +++ /dev/null @@ -1,950 +0,0 @@ -// -*- c++ -*- -/* This file is part of the KDE libraries - Copyright (C) 1999 Stephan Kulow - 2000,2001 Carsten Pfeiffer - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ -#ifndef KDIROPERATOR_H_ -#define KDIROPERATOR_H_ - -#include -#include - -#include -#include -#include -#include -#include -#include - -class TQPopupMenu; -class TQTimer; - -class KAction; -class KDirLister; -class KToggleAction; -class KActionSeparator; -class KActionMenu; -class TQWidgetStack; -class KProgress; -namespace TDEIO { - class CopyJob; - class DeleteJob; -} - -/** - * This widget works as a network transparent filebrowser. You specify a URL - * to display and this url will be loaded via KDirLister. The user can - * browse through directories, highlight and select files, delete or rename - * files. - * - * It supports different views, e.g. a detailed view (see KFileDetailView), - * a simple icon view (see KFileIconView), a combination of two views, - * separating directories and files ( KCombiView). - * - * Additionally, a preview view is available (see KFilePreview), which can - * show either a simple or detailed view and additionally a preview widget - * (see setPreviewWidget()). KImageFilePreview is one implementation - * of a preview widget, that displays previews for all supported filetypes - * utilizing TDEIO::PreviewJob. - * - * Currently, those classes don't support Drag&Drop out of the box -- there - * you have to use your own view-classes. You can use some DnD-aware views - * from Bj�n Sahlstr� until they will be integrated - * into this library. See http://devel-home.kde.org/~pfeiffer/DnD-classes.tar.gz - * - * This widget is the one used in the KFileDialog. - * - * Basic usage is like this: - * \code - * KDirOperator *op = new KDirOperator( KURL( "file:/home/gis" ), this ); - * // some signals you might be interested in - * connect(op, TQT_SIGNAL(urlEntered(const KURL&)), - * TQT_SLOT(urlEntered(const KURL&))); - * connect(op, TQT_SIGNAL(fileHighlighted(const KFileItem *)), - * TQT_SLOT(fileHighlighted(const KFileItem *))); - * connect(op, TQT_SIGNAL(fileSelected(const KFileItem *)), - * TQT_SLOT(fileSelected(const KFileItem *))); - * connect(op, TQT_SIGNAL(finishedLoading()), - * TQT_SLOT(slotLoadingFinished())); - * - * op->readConfig( TDEGlobal::config(), "Your KDiroperator ConfigGroup" ); - * op->setView(KFile::Default); - * \endcode - * - * This will create a childwidget of 'this' showing the directory contents - * of /home/gis in the default-view. The view is determined by the readConfig() - * call, which will read the KDirOperator settings, the user left your program - * with (and which you saved with op->writeConfig()). - * - * @short A widget for displaying files and browsing directories. - * @author Stephan Kulow , Carsten Pfeiffer - */ -class TDEIO_EXPORT KDirOperator : public TQWidget -{ - Q_OBJECT - - public: - /** - * The various action types. These values can be or'd together - * @since 3.1 - */ - enum ActionTypes { SortActions = 1, - ViewActions = 2, - NavActions = 4, - FileActions = 8, - AllActions = 15 }; - /** - * Constructs the KDirOperator with no initial view. As the views are - * configurable, call readConfig() to load the user's configuration - * and then setView to explicitly set a view. - * - * This constructor doesn't start loading the url, setView will do it. - */ - KDirOperator(const KURL& urlName = KURL(), - TQWidget *parent = 0, const char* name = 0); - /** - * Destroys the KDirOperator. - */ - virtual ~KDirOperator(); - - /** - * Enables/disables showing hidden files. - */ - // ### KDE4: make virtual - void setShowHiddenFiles ( bool s ) { showHiddenAction->setChecked( s ); } - - /** - * @returns true when hidden files are shown or false otherwise. - */ - bool showHiddenFiles () const { return showHiddenAction->isChecked(); } - - /** - * Stops loading immediately. You don't need to call this, usually. - */ - void close(); - /// Reimplemented to avoid "hidden virtual" warnings - virtual bool close( bool alsoDelete ) { return TQWidget::close( alsoDelete ); } - - /** - * Sets a filter like "*.cpp *.h *.o". Only files matching that filter - * will be shown. Call updateDir() to apply it. - * - * @see KDirLister::setNameFilter - * @see nameFilter - */ - void setNameFilter(const TQString& filter); - - /** - * @returns the current namefilter. - * @see setNameFilter - */ - const TQString& nameFilter() const { return dir->nameFilter(); } - - /** - * Sets a list of mimetypes as filter. Only files of those mimetypes - * will be shown. - * - * Example: - * \code - * TQStringList filter; - * filter << "text/html" << "image/png" << "inode/directory"; - * dirOperator->setMimefilter( filter ); - * \endcode - * - * Node: Without the mimetype inode/directory, only files would be shown. - * Call updateDir() to apply it. - * - * @see KDirLister::setMimeFilter - * @see mimeFilter - */ - void setMimeFilter( const TQStringList& mimetypes ); - - /** - * @returns the current mime filter. - */ - TQStringList mimeFilter() const { return dir->mimeFilters(); } - - /** - * Clears both the namefilter and mimetype filter, so that all files and - * directories will be shown. Call updateDir() to apply it. - * - * @see setMimeFilter - * @see setNameFilter - */ - void clearFilter(); - - /** - * @returns the current url - */ - KURL url() const; - - /** - * Sets a new url to list. - * @param clearforward specifies whether the "forward" history should be cleared. - * @param url the URL to set - */ - // ### KDE4: make virtual - void setURL(const KURL& url, bool clearforward); - - /** - * Clears the current selection and attempts to set @p filename - * the current file. filename is just the name, no path or url. - */ - void setCurrentItem( const TQString& filename ); - - /** - * Sets a new KFileView to be used for showing and browsing files. - * Note: this will read the current url() to fill the view. - * - * @see KFileView - * @see KFileIconView - * @see KFileDetailView - * @see KCombiView - * @see view - */ - // ### KDE4: make virtual - void setView(KFileView *view); - - /** - * @returns the currently used view. - * @see setView - */ - KFileView * view() const { return m_fileView; } - - /** - * Returns the widget of the current view. 0L if there is no view/widget. - * (KFileView itself is not a widget.) - */ - TQWidget * viewWidget() const { return m_fileView ? m_fileView->widget() : 0L; } - - /** - * Sets one of the predefined fileviews - * @see KFile::FileView - */ - // ### KDE4: make virtual - void setView(KFile::FileView view); - - /** - * Sets the way to sort files and directories. - */ - void setSorting( TQDir::SortSpec ); - - /** - * @returns the current way of sorting files and directories - */ - TQDir::SortSpec sorting() const { return mySorting; } - - /** - * @returns true if we are displaying the root directory of the current url - */ - bool isRoot() const { return url().path() == TQChar('/'); } - - /** - * @returns the object listing the directory - */ - KDirLister *dirLister() const { return dir; } - - /** - * @returns the progress widget, that is shown during directory listing. - * You can for example reparent() it to put it into a statusbar. - */ - KProgress * progressBar() const; - - /** - * Sets the listing/selection mode for the views, an OR'ed combination of - * @li File - * @li Directory - * @li Files - * @li ExistingOnly - * @li LocalOnly - * - * You cannot mix File and Files of course, as the former means - * single-selection mode, the latter multi-selection. - */ - // ### KDE4: make virtual - void setMode( KFile::Mode m ); - /** - * @returns the listing/selection mode. - */ - KFile::Mode mode() const; - - /** - * Sets a preview-widget to be shown next to the file-view. - * The ownership of @p w is transferred to KDirOperator, so don't - * delete it yourself! - */ - // ### KDE4: make virtual - void setPreviewWidget(const TQWidget *w); - - /** - * @returns a list of all currently selected items. If there is no view, - * then 0L is returned. - */ - const KFileItemList * selectedItems() const { - return ( m_fileView ? m_fileView->selectedItems() : 0L ); - } - - /** - * @returns true if @p item is currently selected, or false otherwise. - */ - inline bool isSelected( const KFileItem *item ) const { - return ( m_fileView ? m_fileView->isSelected( item ) : false ); - } - - /** - * @returns the number of directories in the currently listed url. - * Returns 0 if there is no view. - */ - int numDirs() const; - - /** - * @returns the number of files in the currently listed url. - * Returns 0 if there is no view. - */ - int numFiles() const; - - /** - * @returns a KCompletion object, containing all filenames and - * directories of the current directory/URL. - * You can use it to insert it into a KLineEdit or KComboBox - * Note: it will only contain files, after prepareCompletionObjects() - * has been called. It will be implicitly called from makeCompletion() - * or makeDirCompletion() - */ - KCompletion * completionObject() const { - return const_cast( &myCompletion ); - } - - /** - * @returns a KCompletion object, containing only all directories of the - * current directory/URL. - * You can use it to insert it into a KLineEdit or KComboBox - * Note: it will only contain directories, after - * prepareCompletionObjects() has been called. It will be implicitly - * called from makeCompletion() or makeDirCompletion() - */ - KCompletion *dirCompletionObject() const { - return const_cast( &myDirCompletion ); - } - - /** - * an accessor to a collection of all available Actions. The actions - * are static, they will be there all the time (no need to connect to - * the signals KActionCollection::inserted() or removed(). - * - * There are the following actions: - * - * @li popupMenu : an ActionMenu presenting a popupmenu with all actions - * @li up : changes to the parent directory - * @li back : goes back to the previous directory - * @li forward : goes forward in the history - * @li home : changes to the user's home directory - * @li reload : reloads the current directory - * @li separator : a separator - * @li mkdir : opens a dialog box to create a directory - * @li delete : deletes the selected files/directories - * @li sorting menu : an ActionMenu containing all sort-options - * @li by name : sorts by name - * @li by date : sorts by date - * @li by size : sorts by size - * @li reversed : reverses the sort order - * @li dirs first : sorts directories before files - * @li case insensitive : sorts case insensitively - * @li view menu : an ActionMenu containing all actions concerning the view - * @li short view : shows a simple fileview - * @li detailed view : shows a detailed fileview (dates, permissions ,...) - * @li show hidden : shows hidden files - * @li separate dirs : shows directories in a separate pane - * @li preview : shows a preview next to the fileview - * @li single : hides the separate view for directories or the preview - * @li properties : shows a KPropertiesDialog for the selected files - * - * The short and detailed view are in an exclusive group. The sort-by - * actions are in an exclusive group as well. Also the "separate dirs", - * "preview" and "single" actions are in an exclusive group. - * - * You can e.g. use - * \code - * actionCollection()->action( "up" )->plug( someToolBar ); - * \endcode - * to add a button into a toolbar, which makes the dirOperator change to - * its parent directory. - * - * @returns all available Actions - */ - KActionCollection * actionCollection() const { return myActionCollection; } - - /** - * Sets the config object and the to be used group in KDirOperator. This - * will be used to store the view's configuration via - * KFileView::writeConfig() (and for KFileView::readConfig()). - * If you don't set this, the views cannot save and restore their - * configuration. - * - * Usually you call this right after KDirOperator creation so that the view - * instantiation can make use of it already. - * - * Note that KDirOperator does NOT take ownership of that object (typically - * it's TDEGlobal::config() anyway. - * - * @see viewConfig - * @see viewConfigGroup - * @since 3.1 - */ - // ### KDE4: make virtual - void setViewConfig( TDEConfig *config, const TQString& group ); - - /** - * Returns the TDEConfig object used for saving and restoring view's - * configuration. - * @returns the TDEConfig object used for saving and restoring view's - * configuration. - * @since 3.1 - */ - TDEConfig *viewConfig(); - - /** - * Returns the group name used for saving and restoring view's - * configuration. - * @returns the group name used for saving and restoring view's - * configuration. - * @since 3.1 - */ - TQString viewConfigGroup() const; - - /** - * Reads the default settings for a view, i.e. the default KFile::FileView. - * Also reads the sorting and whether hidden files should be shown. - * Note: the default view will not be set - you have to call - * \code - * setView( KFile::Default ) - * \endcode - * to apply it. - * - * @see setView - * @see setViewConfig - * @see writeConfig - */ - virtual void readConfig( TDEConfig *, const TQString& group = TQString::null ); - - /** - * Saves the current settings like sorting, simple or detailed view. - * - * @see readConfig - * @see setViewConfig - */ - virtual void writeConfig( TDEConfig *, const TQString& group = TQString::null ); - - - /** - * This is a KFileDialog specific hack: we want to select directories with - * single click, but not files. But as a generic class, we have to be able - * to select files on single click as well. - * - * This gives us the opportunity to do both. - * - * The default is false, set it to true if you don't want files selected - * with single click. - */ - void setOnlyDoubleClickSelectsFiles( bool enable ); - - /** - * @returns whether files (not directories) should only be select()ed by - * double-clicks. - * @see setOnlyDoubleClickSelectsFiles - */ - bool onlyDoubleClickSelectsFiles() const; - - /** - * Creates the given directory/url. If it is a relative path, - * it will be completed with the current directory. - * If enterDirectory is true, the directory will be entered after a - * successful operation. If unsuccessful, a messagebox will be presented - * to the user. - * @returns true if the directory could be created. - */ - // ### KDE4: make virtual and turn TQString into KURL - bool mkdir( const TQString& directory, bool enterDirectory = true ); - - /** - * Starts and returns a TDEIO::DeleteJob to delete the given @p items. - * - * @param items the list of items to be deleted - * @param ask specifies whether a confirmation dialog should be shown - * @param showProgress passed to the DeleteJob to show a progress dialog - */ - // ### KDE4: make virtual - TDEIO::DeleteJob * del( const KFileItemList& items, - bool ask = true, bool showProgress = true ); - - /** - * Starts and returns a TDEIO::DeleteJob to delete the given @p items. - * - * @param items the list of items to be deleted - * @param parent the parent widget used for the confirmation dialog - * @param ask specifies whether a confirmation dialog should be shown - * @param showProgress passed to the DeleteJob to show a progress dialog - * @since 3.1 - */ - // ### KDE4: make virtual - TDEIO::DeleteJob * del( const KFileItemList& items, TQWidget *parent, - bool ask = true, bool showProgress = true ); - - /** - * Clears the forward and backward history. - */ - void clearHistory(); - - /** - * When going up in the directory hierarchy, KDirOperator can highlight - * the directory that was just left. - * - * I.e. when you go from /home/gis/src to /home/gis, the item "src" will - * be made the current item. - * - * Default is off, because this behavior introduces bug #136630. - * Don't enable until this bug is fixed. - */ - // ### KDE4: make virtual - void setEnableDirHighlighting( bool enable ); - - /** - * @returns whether the last directory will be made the current item - * when going up in the directory hierarchy. - * - * Default is false. - */ - bool dirHighlighting() const; - - /** - * @returns true if we are in directory-only mode, that is, no files are - * shown. - */ - bool dirOnlyMode() const { return dirOnlyMode( myMode ); } - - static bool dirOnlyMode( uint mode ) { - return ( (mode & KFile::Directory) && - (mode & (KFile::File | KFile::Files)) == 0 ); - } - - /** - * Sets up the action menu. - * @param whichActions is an value of OR'd ActionTypes that controls which actions to show in the action menu - */ - void setupMenu(int whichActions); - - /** - * Reimplemented - allow dropping of files if @p b is true - * @param b true if the widget should allow dropping of files - */ - virtual void setAcceptDrops(bool b); - - /** - * Sets the options for dropping files. - * @see KFileView::DropOptions - * @since 3.2 - */ - // ### KDE4: make virtual - void setDropOptions(int options); - - /** - * Starts and returns a TDEIO::CopyJob to trash the given @p items. - * - * @param items the list of items to be trashed - * @param parent the parent widget used for the confirmation dialog - * @param ask specifies whether a confirmation dialog should be shown - * @param showProgress passed to the CopyJob to show a progress dialog - * @since 3.4 - */ - // ### KDE4: make virtual - TDEIO::CopyJob * trash( const KFileItemList& items, TQWidget *parent, - bool ask = true, bool showProgress = true ); - -protected: - /** - * A view factory for creating predefined fileviews. Called internally by setView - * , but you can also call it directly. Reimplement this if you depend on self defined fileviews. - * @param parent is the TQWidget to be set as parent - * @param view is the predefined view to be set, note: this can be several ones OR:ed together. - * @returns the created KFileView - * @see KFileView - * @see KCombiView - * @see KFileDetailView - * @see KFileIconView - * @see KFilePreview - * @see KFile::FileView - * @see setView - */ - virtual KFileView* createView( TQWidget* parent, KFile::FileView view ); - /** - * Sets a custom KDirLister to list directories. - */ - // ### KDE4: make virtual - void setDirLister( KDirLister *lister ); - - virtual void resizeEvent( TQResizeEvent * ); - - /** - * Sets up all the actions. Called from the constructor, you usually - * better not call this. - */ - void setupActions(); - - /** - * Updates the sorting-related actions to comply with the current sorting - * @see sorting - */ - void updateSortActions(); - - /** - * Updates the view-related actions to comply with the current - * KFile::FileView - */ - void updateViewActions(); - - /** - * Sets up the context-menu with all the necessary actions. Called from the - * constructor, you usually don't need to call this. - * @since 3.1 - */ - void setupMenu(); - - /** - * Synchronizes the completion objects with the entries of the - * currently listed url. - * - * Automatically called from makeCompletion() and - * makeDirCompletion() - */ - void prepareCompletionObjects(); - - /** - * Checks if there support from TDEIO::PreviewJob for the currently - * shown files, taking mimeFilter() and nameFilter() into account - * Enables/disables the preview-action accordingly. - */ - bool checkPreviewSupport(); - -public slots: - /** - * Goes one step back in the history and opens that url. - */ - // ### KDE4: make virtual - void back(); - - /** - * Goes one step forward in the history and opens that url. - */ - // ### KDE4: make virtual - void forward(); - - /** - * Enters the home directory. - */ - // ### KDE4: make virtual - void home(); - - /** - * Goes one directory up from the current url. - */ - // ### KDE4: make virtual - void cdUp(); - - /** - * to update the view after changing the settings - */ - void updateDir(); - - /** - * Re-reads the current url. - */ - // ### KDE4: make virtual - void rereadDir(); - - /** - * Opens a dialog to create a new directory. - */ - // ### KDE4: make virtual - void mkdir(); - - /** - * Deletes the currently selected files/directories. - */ - // ### KDE4: make virtual - void deleteSelected(); - - /** - * Enables/disables actions that are selection dependent. Call this e.g. - * when you are about to show a popup menu using some of KDirOperators - * actions. - */ - void updateSelectionDependentActions(); - - /** - * Tries to complete the given string (only completes files). - */ - TQString makeCompletion(const TQString&); - - /** - * Tries to complete the given string (only completes directores). - */ - TQString makeDirCompletion(const TQString&); - - /** - * Trashes the currently selected files/directories. - * @since 3.4 - */ - // ### KDE4: make virtual - void trashSelected(KAction::ActivationReason, TQt::ButtonState); - -protected slots: - /** - * Restores the normal cursor after showing the busy-cursor. Also hides - * the progressbar. - */ - void resetCursor(); - - /** - * Called after setURL() to load the directory, update the history, - * etc. - */ - void pathChanged(); - - /** - * Adds a new list of KFileItems to the view - * (coming from KDirLister) - */ - void insertNewFiles(const KFileItemList &newone); - - /** - * Removes the given KFileItem item from the view (usually called from - * KDirLister). - */ - void itemDeleted(KFileItem *); - - /** - * Enters the directory specified by the given @p item. - */ - // ### KDE4: make virtual - void selectDir(const KFileItem *item ); - - /** - * Emits fileSelected( item ) - */ - void selectFile(const KFileItem *item); - - /** - * Emits fileHighlighted( i ) - */ - void highlightFile(const KFileItem* i) { emit fileHighlighted( i ); } - - /** - * Called upon right-click to activate the popupmenu. - */ - virtual void activatedMenu( const KFileItem *, const TQPoint& pos ); - - /** - * Changes sorting to sort by name - */ - void sortByName() { byNameAction->setChecked( true ); } - - /** - * Changes sorting to sort by size - */ - void sortBySize() { bySizeAction->setChecked( true ); } - - /** - * Changes sorting to sort by date - */ - void sortByDate() { byDateAction->setChecked( true ); } - - /** - * Changes sorting to reverse sorting - */ - void sortReversed() { reverseAction->setChecked( !reverseAction->isChecked() ); } - - /** - * Toggles showing directories first / having them sorted like files. - */ - void toggleDirsFirst() { dirsFirstAction->setChecked( !dirsFirstAction->isChecked() ); } - - /** - * Toggles case sensitive / case insensitive sorting - */ - void toggleIgnoreCase() { caseInsensitiveAction->setChecked( !caseInsensitiveAction->isChecked() ); } - - /** - * Tries to make the given @p match as current item in the view and emits - * completion( match ) - */ - void slotCompletionMatch(const TQString& match); - -signals: - void urlEntered(const KURL& ); - void updateInformation(int files, int dirs); - void completion(const TQString&); - void finishedLoading(); - - /** - * Emitted whenever the current fileview is changed, either by an explicit - * call to setView() or by the user selecting a different view thru - * the GUI. - */ - void viewChanged( KFileView * newView ); - - /** - * Emitted when a file is highlighted or generally the selection changes in - * multiselection mode. In the latter case, @p item is 0L. You can access - * the selected items with selectedItems(). - */ - void fileHighlighted( const KFileItem *item ); - void dirActivated( const KFileItem *item ); - void fileSelected( const KFileItem *item ); - /** - * Emitted when files are dropped. Dropping files is disabled by - * default. You need to enable it with setAcceptDrops() - * @param item the item on which the drop occurred or 0. - * @param event the drop event itself. - * @param urls the urls that where dropped. - * @since 3.2 - */ - void dropped(const KFileItem *item, TQDropEvent*event, const KURL::List&urls); -private: - /** - * Contains all URLs you can reach with the back button. - */ - TQPtrStack backStack; - - /** - * Contains all URLs you can reach with the forward button. - */ - TQPtrStack forwardStack; - - KDirLister *dir; - KURL currUrl; - - KCompletion myCompletion; - KCompletion myDirCompletion; - bool myCompleteListDirty; - TQDir::SortSpec mySorting; - - /** - * Checks whether we preview support is available for the current - * mimetype/namefilter - */ - bool checkPreviewInternal() const; - - /** - * takes action on the new location. If it's a directory, change - * into it, if it's a file, correct the name, etc. - */ - void checkPath(const TQString& txt, bool takeFiles = false); - - void connectView(KFileView *); - - bool openURL( const KURL& url, bool keep = false, bool reload = false ); - - KFileView *m_fileView; - KFileItemList pendingMimeTypes; - - // the enum KFile::FileView as an int - int m_viewKind; - int defaultView; - - KFile::Mode myMode; - KProgress *progress; - - const TQWidget *myPreview; // temporary pointer for the preview widget - - // actions for the popupmenus - // ### clean up all those -- we have them all in the actionMenu! - KActionMenu *actionMenu; - - KAction *backAction; - KAction *forwardAction; - KAction *homeAction; - KAction *upAction; - KAction *reloadAction; - KActionSeparator *actionSeparator; - KAction *mkdirAction; - - KActionMenu *sortActionMenu; - KRadioAction *byNameAction; - KRadioAction *byDateAction; - KRadioAction *bySizeAction; - KToggleAction *reverseAction; - KToggleAction *dirsFirstAction; - KToggleAction *caseInsensitiveAction; - - KActionMenu *viewActionMenu; - KRadioAction *shortAction; - KRadioAction *detailedAction; - KToggleAction *showHiddenAction; - KToggleAction *separateDirsAction; - - KActionCollection *myActionCollection; - KActionCollection *viewActionCollection; - -private slots: - /** - * @internal - */ - void slotDetailedView(); - void slotSimpleView(); - void slotToggleHidden( bool ); - - void slotSeparateDirs(); - void slotDefaultPreview(); - void togglePreview( bool ); - - void slotSortByName(); - void slotSortBySize(); - void slotSortByDate(); - void slotSortReversed(); - void slotToggleDirsFirst(); - void slotToggleIgnoreCase(); - - void slotStarted(); - void slotProgress( int ); - void slotShowProgress(); - void slotIOFinished(); - void slotCanceled(); - void slotRedirected( const KURL& ); - - void slotViewActionAdded( KAction * ); - void slotViewActionRemoved( KAction * ); - void slotViewSortingChanged( TQDir::SortSpec ); - - void slotClearView(); - void slotRefreshItems( const KFileItemList& items ); - - void slotProperties(); - - void insertViewDependentActions(); - -private: - static bool isReadable( const KURL& url ); - -protected: - virtual void virtual_hook( int id, void* data ); -private: - class KDirOperatorPrivate; - KDirOperatorPrivate *d; -}; - -#endif diff --git a/kio/kfile/kdirselectdialog.cpp b/kio/kfile/kdirselectdialog.cpp deleted file mode 100644 index 48dd3a2e4..000000000 --- a/kio/kfile/kdirselectdialog.cpp +++ /dev/null @@ -1,481 +0,0 @@ -/* - Copyright (C) 2001,2002 Carsten Pfeiffer - Copyright (C) 2001 Michael Jarrett - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License version 2 as published by the Free Software Foundation. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "kfiletreeview.h" -#include "kdirselectdialog.h" - -// ### add mutator for treeview! - -class KDirSelectDialog::KDirSelectDialogPrivate -{ -public: - KDirSelectDialogPrivate() - { - urlCombo = 0L; - branch = 0L; - comboLocked = false; - } - - KFileSpeedBar *speedBar; - KHistoryCombo *urlCombo; - KFileTreeBranch *branch; - TQString recentDirClass; - KURL startURL; - TQValueStack dirsToList; - - bool comboLocked : 1; -}; - -static KURL rootUrl(const KURL &url) -{ - KURL root = url; - root.setPath( "/" ); - - if (!kapp->authorizeURLAction("list", KURL(), root)) - { - root = KURL::fromPathOrURL( TQDir::homeDirPath() ); - if (!kapp->authorizeURLAction("list", KURL(), root)) - { - root = url; - } - } - return root; -} - -KDirSelectDialog::KDirSelectDialog(const TQString &startDir, bool localOnly, - TQWidget *parent, const char *name, - bool modal) - : KDialogBase( parent, name, modal, i18n("Select Folder"), - Ok|Cancel|User1, Ok, false, - KGuiItem( i18n("New Folder..."), "folder_new" ) ), - m_localOnly( localOnly ) -{ - d = new KDirSelectDialogPrivate; - d->branch = 0L; - - TQFrame *page = makeMainWidget(); - TQHBoxLayout *hlay = new TQHBoxLayout( page, 0, spacingHint() ); - m_mainLayout = new TQVBoxLayout(); - d->speedBar = new KFileSpeedBar( page, "speedbar" ); - connect( d->speedBar, TQT_SIGNAL( activated( const KURL& )), - TQT_SLOT( setCurrentURL( const KURL& )) ); - hlay->addWidget( d->speedBar, 0 ); - hlay->addLayout( m_mainLayout, 1 ); - - // Create dir list - m_treeView = new KFileTreeView( page ); - m_treeView->addColumn( i18n("Folders") ); - m_treeView->setColumnWidthMode( 0, TQListView::Maximum ); - m_treeView->setResizeMode( TQListView::AllColumns ); - - d->urlCombo = new KHistoryCombo( page, "url combo" ); - d->urlCombo->setTrapReturnKey( true ); - d->urlCombo->setPixmapProvider( new KURLPixmapProvider() ); - KURLCompletion *comp = new KURLCompletion(); - comp->setMode( KURLCompletion::DirCompletion ); - d->urlCombo->setCompletionObject( comp, true ); - d->urlCombo->setAutoDeleteCompletionObject( true ); - d->urlCombo->setDuplicatesEnabled( false ); - connect( d->urlCombo, TQT_SIGNAL( textChanged( const TQString& ) ), - TQT_SLOT( slotComboTextChanged( const TQString& ) )); - - m_contextMenu = new TQPopupMenu( this ); - KAction* newFolder = new KAction( i18n("New Folder..."), "folder_new", 0, TQT_TQOBJECT(this), TQT_SLOT( slotMkdir() ), TQT_TQOBJECT(this)); - newFolder->plug(m_contextMenu); - m_contextMenu->insertSeparator(); - m_showHiddenFolders = new KToggleAction ( i18n( "Show Hidden Folders" ), 0, TQT_TQOBJECT(this), - TQT_SLOT( slotShowHiddenFoldersToggled() ), TQT_TQOBJECT(this)); - m_showHiddenFolders->plug(m_contextMenu); - - d->startURL = KFileDialog::getStartURL( startDir, d->recentDirClass ); - if ( localOnly && !d->startURL.isLocalFile() ) - { - d->startURL = KURL(); - TQString docPath = TDEGlobalSettings::documentPath(); - if (TQDir(docPath).exists()) - d->startURL.setPath( docPath ); - else - d->startURL.setPath( TQDir::homeDirPath() ); - } - - KURL root = rootUrl(d->startURL); - - m_startDir = d->startURL.url(); - - d->branch = createBranch( root ); - - readConfig( TDEGlobal::config(), "DirSelect Dialog" ); - - m_mainLayout->addWidget( m_treeView, 1 ); - m_mainLayout->addWidget( d->urlCombo, 0 ); - - connect( m_treeView, TQT_SIGNAL( currentChanged( TQListViewItem * )), - TQT_SLOT( slotCurrentChanged() )); - connect( m_treeView, TQT_SIGNAL( contextMenu( KListView *, TQListViewItem *, const TQPoint & )), - TQT_SLOT( slotContextMenu( KListView *, TQListViewItem *, const TQPoint & ))); - - connect( d->urlCombo, TQT_SIGNAL( activated( const TQString& )), - TQT_SLOT( slotURLActivated( const TQString& ))); - connect( d->urlCombo, TQT_SIGNAL( returnPressed( const TQString& )), - TQT_SLOT( slotURLActivated( const TQString& ))); - - setCurrentURL( d->startURL ); -} - - -KDirSelectDialog::~KDirSelectDialog() -{ - delete d; -} - -void KDirSelectDialog::setCurrentURL( const KURL& url ) -{ - if ( !url.isValid() ) - return; - - KURL root = rootUrl(url); - - d->startURL = url; - if ( !d->branch || - url.protocol() != d->branch->url().protocol() || - url.host() != d->branch->url().host() ) - { - if ( d->branch ) - { - // removing the root-item causes the currentChanged() signal to be - // emitted, but we don't want to update the location-combo yet. - d->comboLocked = true; - view()->removeBranch( d->branch ); - d->comboLocked = false; - } - - d->branch = createBranch( root ); - } - - d->branch->disconnect( TQT_SIGNAL( populateFinished( KFileTreeViewItem * )), - this, TQT_SLOT( slotNextDirToList( KFileTreeViewItem *))); - connect( d->branch, TQT_SIGNAL( populateFinished( KFileTreeViewItem * )), - TQT_SLOT( slotNextDirToList( KFileTreeViewItem * ) )); - - KURL dirToList = root; - d->dirsToList.clear(); - TQString path = url.path(+1); - int pos = path.length(); - - if ( path.isEmpty() ) // e.g. ftp://host.com/ -> just list the root dir - d->dirsToList.push( root ); - - else - { - while ( pos > 0 ) - { - pos = path.findRev( '/', pos -1 ); - if ( pos >= 0 ) - { - dirToList.setPath( path.left( pos +1 ) ); - d->dirsToList.push( dirToList ); -// tqDebug( "List: %s", dirToList.url().latin1()); - } - } - } - - if ( !d->dirsToList.isEmpty() ) - openNextDir( d->branch->root() ); -} - -void KDirSelectDialog::openNextDir( KFileTreeViewItem * /*parent*/ ) -{ - if ( !d->branch ) - return; - - KURL url = d->dirsToList.pop(); - - KFileTreeViewItem *item = view()->findItem( d->branch, url.path().mid(1)); - if ( item ) - { - if ( !item->isOpen() ) - item->setOpen( true ); - else // already open -> go to next one - slotNextDirToList( item ); - } -// else -// tqDebug("###### openNextDir: item not found!"); -} - -void KDirSelectDialog::slotNextDirToList( KFileTreeViewItem *item ) -{ - // scroll to make item the topmost item - view()->ensureItemVisible( item ); - TQRect r = view()->itemRect( item ); - if ( r.isValid() ) - { - int x, y; - view()->viewportToContents( view()->contentsX(), r.y(), x, y ); - view()->setContentsPos( x, y ); - } - - if ( !d->dirsToList.isEmpty() ) - openNextDir( item ); - else - { - d->branch->disconnect( TQT_SIGNAL( populateFinished( KFileTreeViewItem * )), - this, TQT_SLOT( slotNextDirToList( KFileTreeViewItem *))); - view()->setCurrentItem( item ); - item->setSelected( true ); - } -} - -void KDirSelectDialog::readConfig( TDEConfig *config, const TQString& group ) -{ - d->urlCombo->clear(); - - TDEConfigGroup conf( config, group ); - d->urlCombo->setHistoryItems( conf.readPathListEntry( "History Items" )); - - TQSize defaultSize( 400, 450 ); - resize( conf.readSizeEntry( "DirSelectDialog Size", &defaultSize )); -} - -void KDirSelectDialog::saveConfig( TDEConfig *config, const TQString& group ) -{ - TDEConfigGroup conf( config, group ); - conf.writePathEntry( "History Items", d->urlCombo->historyItems(), ',', - true, true); - conf.writeEntry( "DirSelectDialog Size", size(), true, true ); - - d->speedBar->save( config ); - - config->sync(); -} - -void KDirSelectDialog::slotUser1() -{ - slotMkdir(); -} - -void KDirSelectDialog::accept() -{ - KFileTreeViewItem *item = m_treeView->currentKFileTreeViewItem(); - if ( !item ) - return; - - if ( !d->recentDirClass.isEmpty() ) - { - KURL dir = item->url(); - if ( !item->isDir() ) - dir = dir.upURL(); - - KRecentDirs::add(d->recentDirClass, dir.url()); - } - - d->urlCombo->addToHistory( item->url().prettyURL() ); - KFileDialog::setStartDir( url() ); - - KDialogBase::accept(); - saveConfig( TDEGlobal::config(), "DirSelect Dialog" ); -} - - -KURL KDirSelectDialog::url() const -{ - return m_treeView->currentURL(); -} - -void KDirSelectDialog::slotCurrentChanged() -{ - if ( d->comboLocked ) - return; - - KFileTreeViewItem *current = view()->currentKFileTreeViewItem(); - KURL u = current ? current->url() : (d->branch ? d->branch->rootUrl() : KURL()); - - if ( u.isValid() ) - { - if ( u.isLocalFile() ) - d->urlCombo->setEditText( u.path() ); - - else // remote url - d->urlCombo->setEditText( u.prettyURL() ); - } - else - d->urlCombo->setEditText( TQString::null ); -} - -void KDirSelectDialog::slotURLActivated( const TQString& text ) -{ - if ( text.isEmpty() ) - return; - - KURL url = KURL::fromPathOrURL( text ); - d->urlCombo->addToHistory( url.prettyURL() ); - - if ( localOnly() && !url.isLocalFile() ) - return; // ### messagebox - - KURL oldURL = m_treeView->currentURL(); - if ( oldURL.isEmpty() ) - oldURL = KURL::fromPathOrURL( m_startDir ); - - setCurrentURL( url ); -} - -KFileTreeBranch * KDirSelectDialog::createBranch( const KURL& url ) -{ - TQString title = url.isLocalFile() ? url.path() : url.prettyURL(); - KFileTreeBranch *branch = view()->addBranch( url, title, m_showHiddenFolders->isChecked() ); - branch->setChildRecurse( false ); - view()->setDirOnlyMode( branch, true ); - - return branch; -} - -void KDirSelectDialog::slotComboTextChanged( const TQString& text ) -{ - if ( d->branch ) - { - KURL url = KURL::fromPathOrURL( KShell::tildeExpand( text ) ); - KFileTreeViewItem *item = d->branch->findTVIByURL( url ); - if ( item ) - { - view()->setCurrentItem( item ); - view()->setSelected( item, true ); - view()->ensureItemVisible( item ); - return; - } - } - - TQListViewItem *item = view()->currentItem(); - if ( item ) - { - item->setSelected( false ); - // 2002/12/27, deselected item is not repainted, so force it - item->repaint(); - } -} - -void KDirSelectDialog::slotContextMenu( KListView *, TQListViewItem *, const TQPoint& pos ) -{ - m_contextMenu->popup( pos ); -} - -void KDirSelectDialog::slotMkdir() -{ - bool ok; - TQString where = url().pathOrURL(); - TQString name = i18n( "New Folder" ); - if ( url().isLocalFile() && TQFileInfo( url().path(+1) + name ).exists() ) - name = TDEIO::RenameDlg::suggestName( url(), name ); - - TQString directory = TDEIO::encodeFileName( KInputDialog::getText( i18n( "New Folder" ), - i18n( "Create new folder in:\n%1" ).arg( where ), - name, &ok, this)); - if (!ok) - return; - - bool selectDirectory = true; - bool writeOk = false; - bool exists = false; - KURL folderurl( url() ); - - TQStringList dirs = TQStringList::split( TQDir::separator(), directory ); - TQStringList::ConstIterator it = dirs.begin(); - - for ( ; it != dirs.end(); ++it ) - { - folderurl.addPath( *it ); - exists = TDEIO::NetAccess::exists( folderurl, false, 0 ); - writeOk = !exists && TDEIO::NetAccess::mkdir( folderurl, topLevelWidget() ); - } - - if ( exists ) // url was already existant - { - TQString which = folderurl.isLocalFile() ? folderurl.path() : folderurl.prettyURL(); - KMessageBox::sorry(this, i18n("A file or folder named %1 already exists.").arg(which)); - selectDirectory = false; - } - else if ( !writeOk ) { - KMessageBox::sorry(this, i18n("You do not have permission to create that folder." )); - } - else if ( selectDirectory ) { - setCurrentURL( folderurl ); - } -} - -void KDirSelectDialog::slotShowHiddenFoldersToggled() -{ - KURL currentURL = url(); - - d->comboLocked = true; - view()->removeBranch( d->branch ); - d->comboLocked = false; - - KURL root = rootUrl(d->startURL); - d->branch = createBranch( root ); - - setCurrentURL( currentURL ); -} - -// static -KURL KDirSelectDialog::selectDirectory( const TQString& startDir, - bool localOnly, - TQWidget *parent, - const TQString& caption) -{ - KDirSelectDialog myDialog( startDir, localOnly, parent, - "kdirselect dialog", true ); - - if ( !caption.isNull() ) - myDialog.setCaption( caption ); - - if ( myDialog.exec() == TQDialog::Accepted ) - return TDEIO::NetAccess::mostLocalURL(myDialog.url(),parent); - else - return KURL(); -} - -void KDirSelectDialog::virtual_hook( int id, void* data ) -{ KDialogBase::virtual_hook( id, data ); } - -#include "kdirselectdialog.moc" diff --git a/kio/kfile/kdirselectdialog.h b/kio/kfile/kdirselectdialog.h deleted file mode 100644 index 746064c68..000000000 --- a/kio/kfile/kdirselectdialog.h +++ /dev/null @@ -1,131 +0,0 @@ -/* - Copyright (C) 2001 Michael Jarrett - Copyright (C) 2001 Carsten Pfeiffer - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License version 2 as published by the Free Software Foundation. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef KDIRSELECTDIALOG_H -#define KDIRSELECTDIALOG_H - -#include -#include - -class TQPopupMenu; -class TQVBoxLayout; -class TDEConfig; -class KFileTreeBranch; -class KFileTreeView; -class KFileTreeViewItem; -class KToggleAction; - -/** - * A pretty dialog for a KDirSelect control for selecting directories. - * @author Michael Jarrett - * @see KFileDialog - */ -class TDEIO_EXPORT KDirSelectDialog : public KDialogBase -{ - Q_OBJECT - -public: - /** - * The constructor. Creates a dialog to select a directory (url). - * @internal use the static selectDirectory function - * @param startDir the directory, initially shown - * @param localOnly unused. You can only select paths below the startDir - * @param parent the parent for the dialog, usually 0L - * @param name the TQObject::name - * @param modal if the dialog is modal or not - */ - KDirSelectDialog(const TQString& startDir = TQString::null, - bool localOnly = false, - TQWidget *parent = 0L, - const char *name = 0, bool modal = false); - - /** - */ - ~KDirSelectDialog(); - - /** - * Returns the currently-selected URL, or a blank URL if none is selected. - * @return The currently-selected URL, if one was selected. - */ - KURL url() const; - - KFileTreeView * view() const { return m_treeView; } - - bool localOnly() const { return m_localOnly; } - - /** - * Creates a KDirSelectDialog, and returns the result. - * @param startDir the directory, initially shown - * The tree will display this directory and subdirectories of it. - * @param localOnly unused. You can only select paths below the startDir - * @param parent the parent widget to use for the dialog, or NULL to create a parent-less dialog - * @param caption the caption to use for the dialog, or TQString::null for the default caption - * @return The URL selected, or an empty URL if the user canceled - * or no URL was selected. - */ - static KURL selectDirectory( const TQString& startDir = TQString::null, - bool localOnly = false, TQWidget *parent = 0L, - const TQString& caption = TQString::null); - - /** - * @return The path for the root node - */ - TQString startDir() const { return m_startDir; } - -public slots: - void setCurrentURL( const KURL& url ); - -protected slots: - virtual void slotUser1(); - -protected: - virtual void accept(); - - // Layouts protected so that subclassing is easy - TQVBoxLayout *m_mainLayout; - TQString m_startDir; - -private slots: - void slotCurrentChanged(); - void slotURLActivated( const TQString& ); - void slotNextDirToList( KFileTreeViewItem *dirItem ); - void slotComboTextChanged( const TQString& text ); - void slotContextMenu( KListView *, TQListViewItem *, const TQPoint & ); - void slotShowHiddenFoldersToggled(); - void slotMkdir(); - -private: - void readConfig( TDEConfig *config, const TQString& group ); - void saveConfig( TDEConfig *config, const TQString& group ); - void openNextDir( KFileTreeViewItem *parent ); - KFileTreeBranch * createBranch( const KURL& url ); - - KFileTreeView *m_treeView; - TQPopupMenu *m_contextMenu; - KToggleAction *m_showHiddenFolders; - bool m_localOnly; - -protected: - virtual void virtual_hook( int id, void* data ); -private: - class KDirSelectDialogPrivate; - KDirSelectDialogPrivate *d; -}; - -#endif diff --git a/kio/kfile/kdirsize.cpp b/kio/kfile/kdirsize.cpp deleted file mode 100644 index 14936679a..000000000 --- a/kio/kfile/kdirsize.cpp +++ /dev/null @@ -1,166 +0,0 @@ -/* This file is part of the KDE libraries - Copyright (C) 2000 David Faure - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include "kdirsize.h" -#include -#include -#include -#include -#include - -using namespace TDEIO; - -KDirSize::KDirSize( const KURL & directory ) - : TDEIO::Job(false /*No GUI*/), m_bAsync(true), m_totalSize(0L), m_totalFiles(0L), m_totalSubdirs(0L) -{ - startNextJob( directory ); -} - -KDirSize::KDirSize( const KFileItemList & lstItems ) - : TDEIO::Job(false /*No GUI*/), m_bAsync(true), m_totalSize(0L), m_totalFiles(0L), m_totalSubdirs(0L), m_lstItems(lstItems) -{ - TQTimer::singleShot( 0, this, TQT_SLOT(processList()) ); -} - -void KDirSize::processList() -{ - while (!m_lstItems.isEmpty()) - { - KFileItem * item = m_lstItems.first(); - m_lstItems.removeFirst(); - if ( !item->isLink() ) - { - if ( item->isDir() ) - { - kdDebug(kfile_area) << "KDirSize::processList dir -> listing" << endl; - KURL url = item->url(); - startNextJob( url ); - return; // we'll come back later, when this one's finished - } - else - { - m_totalSize += item->size(); -// no long long with kdDebug() -// kdDebug(kfile_area) << "KDirSize::processList file -> " << m_totalSize << endl; - } - } - } - kdDebug(kfile_area) << "KDirSize::processList finished" << endl; - if ( !m_bAsync ) - tqApp->exit_loop(); - emitResult(); -} - -void KDirSize::startNextJob( const KURL & url ) -{ - TDEIO::ListJob * listJob = TDEIO::listRecursive( url, false /* no GUI */ ); - connect( listJob, TQT_SIGNAL(entries( TDEIO::Job *, - const TDEIO::UDSEntryList& )), - TQT_SLOT( slotEntries( TDEIO::Job*, - const TDEIO::UDSEntryList& ))); - addSubjob( listJob ); -} - -void KDirSize::slotEntries( TDEIO::Job*, const TDEIO::UDSEntryList & list ) -{ - static const TQString& dot = TDEGlobal::staticQString( "." ); - static const TQString& dotdot = TDEGlobal::staticQString( ".." ); - TDEIO::UDSEntryListConstIterator it = list.begin(); - TDEIO::UDSEntryListConstIterator end = list.end(); - for (; it != end; ++it) { - TDEIO::UDSEntry::ConstIterator it2 = (*it).begin(); - TDEIO::filesize_t size = 0; - bool isLink = false; - bool isDir = false; - TQString name; - for( ; it2 != (*it).end(); it2++ ) { - switch( (*it2).m_uds ) { - case TDEIO::UDS_NAME: - name = (*it2).m_str; - break; - case TDEIO::UDS_LINK_DEST: - isLink = !(*it2).m_str.isEmpty(); - break; - case TDEIO::UDS_SIZE: - size = ((*it2).m_long); - break; - case TDEIO::UDS_FILE_TYPE: - isDir = S_ISDIR((*it2).m_long); - break; - default: - break; - } - } - if ( name == dot ) - m_totalSize += size; - else if ( name != dotdot ) - { - if (!isLink) - m_totalSize += size; - if (!isDir) - m_totalFiles++; - else - m_totalSubdirs++; - //kdDebug(kfile_area) << name << ":" << size << endl; - } - } -} - -//static -KDirSize * KDirSize::dirSizeJob( const KURL & directory ) -{ - return new KDirSize( directory ); // useless - but consistent with other jobs -} - -//static -KDirSize * KDirSize::dirSizeJob( const KFileItemList & lstItems ) -{ - return new KDirSize( lstItems ); -} - -//static -TDEIO::filesize_t KDirSize::dirSize( const KURL & directory ) -{ - KDirSize * dirSize = dirSizeJob( directory ); - dirSize->setSync(); - tqApp->enter_loop(); - return dirSize->totalSize(); -} - - -void KDirSize::slotResult( TDEIO::Job * job ) -{ - kdDebug(kfile_area) << " KDirSize::slotResult( TDEIO::Job * job ) m_lstItems:" << m_lstItems.count() << endl; - if ( !m_lstItems.isEmpty() ) - { - subjobs.remove(job); // Remove job, but don't kill this job. - processList(); - } - else - { - if ( !m_bAsync ) - tqApp->exit_loop(); - TDEIO::Job::slotResult( job ); - } -} - -void KDirSize::virtual_hook( int id, void* data ) -{ TDEIO::Job::virtual_hook( id, data ); } - -#include "kdirsize.moc" diff --git a/kio/kfile/kdirsize.h b/kio/kfile/kdirsize.h deleted file mode 100644 index b0f2c8fc2..000000000 --- a/kio/kfile/kdirsize.h +++ /dev/null @@ -1,106 +0,0 @@ -/* This file is part of the KDE libraries - Copyright (C) 2000 David Faure - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef __KDIRSIZE_H -#define __KDIRSIZE_H - -#include -#include - -/** - * Computes a directory size (similar to "du", but doesn't give the same results - * since we simply sum up the dir and file sizes, whereas du speaks disk blocks) - */ -class TDEIO_EXPORT KDirSize : public TDEIO::Job -{ - Q_OBJECT -protected: - KDirSize( const KURL & directory ); - KDirSize( const KFileItemList & lstItems ); - ~KDirSize() {} - -public: - /** - * @return the size we found - */ - TDEIO::filesize_t totalSize() const { return m_totalSize; } - - /** - * @return the total number of files (counting symlinks to files, sockets - * and character devices as files) in this directory and all sub-directories - * @since 3.3 - */ - TDEIO::filesize_t totalFiles() const { return m_totalFiles; } - - /** - * @return the total number of sub-directories found (not including the - * directory the search started from and treating symlinks to directories - * as directories) - * @since 3.3 - */ - TDEIO::filesize_t totalSubdirs() const { return m_totalSubdirs; } - - /** - * Asynchronous method. Connect to the result signal. - * This one lists a single directory. - */ - static KDirSize * dirSizeJob( const KURL & directory ); - - /** - * Asynchronous method. Connect to the result signal. - * This one lists the items from @p lstItems. - * The reason we asks for items instead of just urls, is so that - * we directly know if the item is a file or a directory, - * and in case of a file, we already have its size. - */ - static KDirSize * dirSizeJob( const KFileItemList & lstItems ); - - /** - * Synchronous method - you get the result as soon as - * the call returns. - */ - static TDEIO::filesize_t dirSize( const KURL & directory ); - -protected: - /** - * @internal - */ - void setSync() { m_bAsync = false; } - - void startNextJob( const KURL & url ); - -protected slots: - - virtual void slotResult( TDEIO::Job *job ); - void slotEntries( TDEIO::Job * , const TDEIO::UDSEntryList &); - void processList(); - -private: - bool m_bAsync; - TDEIO::filesize_t m_totalSize; - TDEIO::filesize_t m_totalFiles; - TDEIO::filesize_t m_totalSubdirs; - KFileItemList m_lstItems; -protected: - virtual void virtual_hook( int id, void* data ); -private: - class KDirSize* d; -}; - -#endif diff --git a/kio/kfile/kdiskfreesp.cpp b/kio/kfile/kdiskfreesp.cpp deleted file mode 100644 index 18245bdcd..000000000 --- a/kio/kfile/kdiskfreesp.cpp +++ /dev/null @@ -1,169 +0,0 @@ -/* - * kdiskfreesp.cpp - * - * Copyright (c) 1999 Michael Kropfberger - * - * Requires the Qt widget libraries, available at no cost at - * http://www.troll.no/ - * - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License version 2 as published by the Free Software Foundation. - * - * This library 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 - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public License - * along with this library; see the file COPYING.LIB. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - */ - -#include "kdiskfreesp.h" -#include -#include - -#include -#include -#include -#include - -#include "kdiskfreesp.moc" - -#define DF_COMMAND "df" -#define DF_ARGS "-k" -#define NO_FS_TYPE true - -#define BLANK ' ' -#define FULL_PERCENT 95.0 - -/*************************************************************************** - * constructor -**/ -KDiskFreeSp::KDiskFreeSp(TQObject *parent, const char *name) - : TQObject(parent,name) -{ - dfProc = new TDEProcess(); TQ_CHECK_PTR(dfProc); - dfProc->setEnvironment("LANGUAGE", "C"); - connect( dfProc, TQT_SIGNAL(receivedStdout(TDEProcess *, char *, int) ), - this, TQT_SLOT (receivedDFStdErrOut(TDEProcess *, char *, int)) ); - connect(dfProc,TQT_SIGNAL(processExited(TDEProcess *) ), - this, TQT_SLOT(dfDone() ) ); - - readingDFStdErrOut=false; -} - - -/*************************************************************************** - * destructor -**/ -KDiskFreeSp::~KDiskFreeSp() -{ - delete dfProc; -} - -/*************************************************************************** - * is called, when the df-command writes on StdOut -**/ -void KDiskFreeSp::receivedDFStdErrOut(TDEProcess *, char *data, int len) -{ - TQCString tmp(data,len+1); // adds a zero-byte - dfStringErrOut.append(tmp); -} - -/*************************************************************************** - * reads the df-commands results -**/ -int KDiskFreeSp::readDF( const TQString & mountPoint ) -{ - if (readingDFStdErrOut || dfProc->isRunning()) - return -1; - m_mountPoint = mountPoint; - dfStringErrOut=""; // yet no data received - dfProc->clearArguments(); - (*dfProc) << TQString::fromLocal8Bit(DF_COMMAND) << TQString::fromLocal8Bit(DF_ARGS); - if (!dfProc->start( TDEProcess::NotifyOnExit, TDEProcess::AllOutput )) - kdError() << "could not execute ["<< DF_COMMAND << "]" << endl; - return 1; -} - - -/*************************************************************************** - * is called, when the df-command has finished -**/ -void KDiskFreeSp::dfDone() -{ - readingDFStdErrOut=true; - - TQTextStream t (dfStringErrOut, IO_ReadOnly); - TQString s=t.readLine(); - if ( (s.isEmpty()) || ( s.left(10) != TQString::fromLatin1("Filesystem") ) ) - kdError() << "Error running df command... got [" << s << "]" << endl; - while ( !t.eof() ) { - TQString u,v; - s=t.readLine(); - s=s.simplifyWhiteSpace(); - if ( !s.isEmpty() ) { - //kdDebug(kfile_area) << "GOT: [" << s << "]" << endl; - - if (s.find(BLANK)<0) // devicename was too long, rest in next line - if ( !t.eof() ) { // just appends the next line - v=t.readLine(); - s=s.append(v); - s=s.simplifyWhiteSpace(); - //kdDebug(kfile_area) << "SPECIAL GOT: [" << s << "]" << endl; - }//if silly linefeed - - //kdDebug(kfile_area) << "[" << s << "]" << endl; - - //TQString deviceName = s.left(s.find(BLANK)); - s=s.remove(0,s.find(BLANK)+1 ); - //kdDebug(kfile_area) << " DeviceName: [" << deviceName << "]" << endl; - - if (!NO_FS_TYPE) - s=s.remove(0,s.find(BLANK)+1 ); // eat fs type - - u=s.left(s.find(BLANK)); - unsigned long kBSize = u.toULong(); - s=s.remove(0,s.find(BLANK)+1 ); - //kdDebug(kfile_area) << " Size: [" << kBSize << "]" << endl; - - u=s.left(s.find(BLANK)); - unsigned long kBUsed = u.toULong(); - s=s.remove(0,s.find(BLANK)+1 ); - //kdDebug(kfile_area) << " Used: [" << kBUsed << "]" << endl; - - u=s.left(s.find(BLANK)); - unsigned long kBAvail = u.toULong(); - s=s.remove(0,s.find(BLANK)+1 ); - //kdDebug(kfile_area) << " Avail: [" << kBAvail << "]" << endl; - - - s=s.remove(0,s.find(BLANK)+1 ); // delete the capacity 94% - TQString mountPoint = s.stripWhiteSpace(); - //kdDebug(kfile_area) << " MountPoint: [" << mountPoint << "]" << endl; - - if ( mountPoint == m_mountPoint ) - { - //kdDebug(kfile_area) << "Found mount point. Emitting" << endl; - emit foundMountPoint( mountPoint, kBSize, kBUsed, kBAvail ); - emit foundMountPoint( kBSize, kBUsed, kBAvail, mountPoint ); // sic! - } - }//if not header - }//while further lines available - - readingDFStdErrOut=false; - emit done(); - delete this; -} - -KDiskFreeSp * KDiskFreeSp::findUsageInfo( const TQString & path ) -{ - KDiskFreeSp * job = new KDiskFreeSp; - TQString mountPoint = TDEIO::findPathMountPoint( path ); - job->readDF( mountPoint ); - return job; -} diff --git a/kio/kfile/kdiskfreesp.h b/kio/kfile/kdiskfreesp.h deleted file mode 100644 index 5ffa47d9a..000000000 --- a/kio/kfile/kdiskfreesp.h +++ /dev/null @@ -1,89 +0,0 @@ -/* - * kdiskfreesp.h - * - * Copyright (c) 1999 Michael Kropfberger - * - * Requires the Qt widget libraries, available at no cost at - * http://www.troll.no/ - * - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License version 2 as published by the Free Software Foundation. - * - * This library 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 - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public License - * along with this library; see the file COPYING.LIB. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - */ - - -#ifndef __KDISKFREESP_H__ -#define __KDISKFREESP_H__ - -#include -#include - -#include - -class TDEProcess; - -/** - * This class parses the output of "df" to find the disk usage - * information for a given partition (mount point). - */ -class TDEIO_EXPORT KDiskFreeSp : public TQObject -{ Q_OBJECT -public: - KDiskFreeSp( TQObject *parent=0, const char *name=0 ); - /** - * Destructor - this object autodeletes itself when it's done - */ - ~KDiskFreeSp(); - /** - * Call this to fire a search on the disk usage information - * for @p mountPoint. foundMountPoint will be emitted - * if this mount point is found, with the info requested. - * done is emitted in any case. - */ - int readDF( const TQString & mountPoint ); - - /** - * Call this to fire a search on the disk usage information - * for the mount point containing @p path. - * foundMountPoint will be emitted - * if this mount point is found, with the info requested. - * done is emitted in any case. - */ - static KDiskFreeSp * findUsageInfo( const TQString & path ); - -signals: - void foundMountPoint( const TQString & mountPoint, unsigned long kBSize, unsigned long kBUsed, unsigned long kBAvail ); - - // This one is a hack around a weird (compiler?) bug. In the former signal, - // the slot in KPropsDlg would get 0L, 0L as the last two parameters. - // When using const ulong& instead, all is ok. - void foundMountPoint( const unsigned long&, const unsigned long&, const unsigned long&, const TQString& ); - void done(); - -private slots: - void receivedDFStdErrOut(TDEProcess *, char *data, int len); - void dfDone(); - -private: - TDEProcess *dfProc; - TQCString dfStringErrOut; - TQString m_mountPoint; - bool readingDFStdErrOut; - class KDiskFreeSpPrivate; - KDiskFreeSpPrivate * d; -}; -/***************************************************************************/ - - -#endif diff --git a/kio/kfile/kencodingfiledialog.cpp b/kio/kfile/kencodingfiledialog.cpp deleted file mode 100644 index 183023cf5..000000000 --- a/kio/kfile/kencodingfiledialog.cpp +++ /dev/null @@ -1,223 +0,0 @@ -// -*- c++ -*- -/* This file is part of the KDE libraries - Copyright (C) 2003 Joseph Wenninger - 2003 Andras Mantia - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include "config-kfile.h" - -#include "kencodingfiledialog.h" -#include -#include -#include -#include -#include -#include -#include -#include - -struct KEncodingFileDialogPrivate -{ - KComboBox *encoding; -}; - -KEncodingFileDialog::KEncodingFileDialog(const TQString& startDir, const TQString& encoding , const TQString& filter, - const TQString& caption, KFileDialog::OperationMode type, TQWidget *parent, const char* name, bool modal) - : KFileDialog(startDir,filter,parent,name,modal), d(new KEncodingFileDialogPrivate) -{ - setCaption(caption); - - setOperationMode( type ); - - KToolBar *tb = toolBar(); - tb->insertSeparator(); - int index = tb->insertCombo(TQStringList(), -1 /*id*/, false /*writable*/, 0 /*signal*/, 0 /*receiver*/, 0 /*slot*/ ); - d->encoding = tb->getCombo( tb->idAt( index ) ); - if ( !d->encoding ) - return; - - d->encoding->clear (); - TQString sEncoding = encoding; - if (sEncoding.isEmpty()) - sEncoding = TQString::fromLatin1(TDEGlobal::locale()->encoding()); - - TQStringList encodings (TDEGlobal::charsets()->availableEncodingNames()); - int insert = 0; - for (uint i=0; i < encodings.count(); i++) - { - bool found = false; - TQTextCodec *codecForEnc = TDEGlobal::charsets()->codecForName(encodings[i], found); - - if (found) - { - d->encoding->insertItem (encodings[i]); - if ( (codecForEnc->name() == sEncoding) || (encodings[i] == sEncoding) ) - { - d->encoding->setCurrentItem(insert); - } - - insert++; - } - } - - -} - -KEncodingFileDialog::~KEncodingFileDialog() -{ - delete d; -} - - -TQString KEncodingFileDialog::selectedEncoding() const -{ - if (d->encoding) - return d->encoding->currentText(); - else - return TQString::null; -} - - -KEncodingFileDialog::Result KEncodingFileDialog::getOpenFileNameAndEncoding(const TQString& encoding, - const TQString& startDir, - const TQString& filter, - TQWidget *parent, const TQString& caption) -{ - KEncodingFileDialog dlg(startDir, encoding,filter,caption.isNull() ? i18n("Open") : caption,Opening,parent, - "filedialog", true); - - dlg.setMode( KFile::File | KFile::LocalOnly ); - dlg.ops->clearHistory(); - dlg.exec(); - - Result res; - res.fileNames<clearHistory(); - dlg.exec(); - - Result res; - res.fileNames=dlg.selectedFiles(); - res.encoding=dlg.selectedEncoding(); - return res; -} - -KEncodingFileDialog::Result KEncodingFileDialog::getOpenURLAndEncoding(const TQString& encoding, const TQString& startDir, - const TQString& filter, TQWidget *parent, const TQString& caption) -{ - KEncodingFileDialog dlg(startDir, encoding,filter,caption.isNull() ? i18n("Open") : caption,Opening,parent, - "filedialog", true); - - dlg.setMode( KFile::File ); - dlg.ops->clearHistory(); - dlg.exec(); - - Result res; - res.URLs<clearHistory(); - dlg.exec(); - - Result res; - res.URLs=dlg.selectedURLs(); - res.encoding=dlg.selectedEncoding(); - return res; -} - - -KEncodingFileDialog::Result KEncodingFileDialog::getSaveFileNameAndEncoding(const TQString& encoding, - const TQString& dir, - const TQString& filter, - TQWidget *parent, - const TQString& caption) -{ - bool specialDir = dir.at(0) == ':'; - KEncodingFileDialog dlg(specialDir?dir:TQString::null, encoding,filter,caption.isNull() ? i18n("Save As") : caption, - Saving,parent, "filedialog", true); - - if ( !specialDir ) - dlg.setSelection( dir ); // may also be a filename - dlg.exec(); - - TQString filename = dlg.selectedFile(); - if (!filename.isEmpty()) - KRecentDocument::add(filename); - - Result res; - res.fileNames< - 2003 Andras Mantia - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef __KENCODINGFILEDIALOG_H__ -#define __KENCODINGFILEDIALOG_H__ - -#include - -struct KEncodingFileDialogPrivate; - -/** - * Provides a user (and developer) friendly way to - * select files with support for choosing encoding - * - * - * The dialog has been designed to allow applications to customise it - * by subclassing. It uses geometry management to ensure that subclasses - * can easily add children that will be incorporated into the layout. - */ - -class TDEIO_EXPORT KEncodingFileDialog : public KFileDialog -{ - Q_OBJECT - -public: - class Result { - public: - TQStringList fileNames; - KURL::List URLs; - TQString encoding; - }; - - /** - * Constructs a file dialog for text files with encoding selection possibility. - * - * @param startDir This can either be - * @li The URL of the directory to start in. - * @li TQString::null to start in the current working - * directory, or the last directory where a file has been - * selected. - * @li ':<keyword>' to start in the directory last used - * by a filedialog in the same application that specified - * the same keyword. - * @li '::<keyword>' to start in the directory last used - * by a filedialog in any application that specified the - * same keyword. - * - * @param encoding The encoding shown in the encoding combo. If it's - * TQString::null, the global default encoding will be shown. - * - * @param filter This is a space separated list of shell globs. - * You can set the text to be displayed for the glob, and - * provide multiple globs. See setFilter() for details on - * how to do this... - * - * @param caption The caption of the dialog - * - * @param type This can either be - * @li Opening (open dialog, the default setting) - * @li Saving - * @param parent The parent widget of this dialog - * @param name The name of this object - * @param modal Whether to create a modal dialog or not - * - * @since 3.2 - */ - KEncodingFileDialog (const TQString& startDir = TQString::null, - const TQString& encoding = TQString::null, - const TQString& filter = TQString::null, - const TQString& caption = TQString::null, KFileDialog::OperationMode type = KFileDialog::Opening, - TQWidget *parent= 0, const char *name="", bool modal = true); - /** - * Destructs the file dialog. - */ - ~KEncodingFileDialog(); - - - /** - * @returns The selected encoding if the constructor with the encoding parameter was used, otherwise TQString::null. - */ - TQString selectedEncoding() const; - - - /** - * Creates a modal file dialog and return the selected - * filename or an empty string if none was chosen additionally a chosen - * encoding value is returned. - * - * Note that with - * this method the user must select an existing filename. - * - * @param startDir This can either be - * @li The URL of the directory to start in. - * @li TQString::null to start in the current working - * directory, or the last directory where a file has been - * selected. - * @li ':<keyword>' to start in the directory last used - * by a filedialog in the same application that specified - * the same keyword. - * @li '::<keyword>' to start in the directory last used - * by a filedialog in any application that specified the - * same keyword. - * @param encoding The encoding shown in the encoding combo. - * @param filter This is a space separated list of shell globs. - * You can set the text to be displayed for the glob, and - * provide multiple globs. See setFilter() for details on - * how to do this... - * @param parent The widget the dialog will be centered on initially. - * @param caption The name of the dialog widget. - */ - static Result getOpenFileNameAndEncoding(const TQString& encoding=TQString::null, - const TQString& startDir= TQString::null, - const TQString& filter= TQString::null, - TQWidget *parent= 0, - const TQString& caption = TQString::null); - - /** - * Creates a modal file dialog and returns the selected encoding and the selected - * filenames or an empty list if none was chosen. - * - * Note that with - * this method the user must select an existing filename. - * - * @param startDir This can either be - * @li The URL of the directory to start in. - * @li TQString::null to start in the current working - * directory, or the last directory where a file has been - * selected. - * @li ':<keyword>' to start in the directory last used - * by a filedialog in the same application that specified - * the same keyword. - * @li '::<keyword>' to start in the directory last used - * by a filedialog in any application that specified the - * same keyword. - * @param encoding The encoding shown in the encoding combo. - * @param filter This is a space separated list of shell globs. - * You can set the text to be displayed for the glob, and - * provide multiple globs. See setFilter() for details on - * how to do this. - * @param parent The widget the dialog will be centered on initially. - * @param caption The name of the dialog widget. - */ - static Result getOpenFileNamesAndEncoding(const TQString& encoding=TQString::null, - const TQString& startDir= TQString::null, - const TQString& filter= TQString::null, - TQWidget *parent = 0, - const TQString& caption= TQString::null); - - /** - * Creates a modal file dialog and returns the selected encoding and - * URL or an empty string if none was chosen. - * - * Note that with - * this method the user must select an existing URL. - * - * @param startDir This can either be - * @li The URL of the directory to start in. - * @li TQString::null to start in the current working - * directory, or the last directory where a file has been - * selected. - * @li ':<keyword>' to start in the directory last used - * by a filedialog in the same application that specified - * the same keyword. - * @li '::<keyword>' to start in the directory last used - * by a filedialog in any application that specified the - * same keyword. - * @param encoding The encoding shown in the encoding combo. - * @param filter This is a space separated list of shell globs. - * You can set the text to be displayed for the glob, and - * provide multiple globs. See setFilter() for details on - * how to do this... - * @param parent The widget the dialog will be centered on initially. - * @param caption The name of the dialog widget. - */ - static Result getOpenURLAndEncoding(const TQString& encoding=TQString::null, - const TQString& startDir = TQString::null, - const TQString& filter= TQString::null, - TQWidget *parent= 0, - const TQString& caption = TQString::null); - - - - - /** - * Creates a modal file dialog and returns the selected encoding - * URLs or an empty list if none was chosen. - * - * Note that with - * this method the user must select an existing filename. - * - * @param startDir This can either be - * @li The URL of the directory to start in. - * @li TQString::null to start in the current working - * directory, or the last directory where a file has been - * selected. - * @li ':<keyword>' to start in the directory last used - * by a filedialog in the same application that specified - * the same keyword. - * @li '::<keyword>' to start in the directory last used - * by a filedialog in any application that specified the - * same keyword. - * @param encoding The encoding shown in the encoding combo. - * @param filter This is a space separated list of shell globs. - * You can set the text to be displayed for the glob, and - * provide multiple globs. See setFilter() for details on - * how to do this... - * @param parent The widget the dialog will be centered on initially. - * @param caption The name of the dialog widget. - */ - static Result getOpenURLsAndEncoding(const TQString& encoding=TQString::null, - const TQString& startDir= TQString::null, - const TQString& filter= TQString::null, - TQWidget *parent = 0, - const TQString& caption= TQString::null); - - - - /** - * Creates a modal file dialog and returns the selected encoding and - * filename or an empty string if none was chosen. - * - * Note that with this - * method the user need not select an existing filename. - * - * @param startDir This can either be - * @li The URL of the directory to start in. - * @li a relative path or a filename determining the - * directory to start in and the file to be selected. - * @li TQString::null to start in the current working - * directory, or the last directory where a file has been - * selected. - * @li ':<keyword>' to start in the directory last used - * by a filedialog in the same application that specified - * the same keyword. - * @li '::<keyword>' to start in the directory last used - * by a filedialog in any application that specified the - * same keyword. - * @param encoding The encoding shown in the encoding combo. - * @param filter This is a space separated list of shell globs. - * You can set the text to be displayed for the glob, and - * provide multiple globs. See setFilter() for details on - * how to do this... - * @param parent The widget the dialog will be centered on initially. - * @param caption The name of the dialog widget. - */ - static Result getSaveFileNameAndEncoding(const TQString& encoding=TQString::null, - const TQString& startDir=TQString::null, - const TQString& filter= TQString::null, - TQWidget *parent= 0, - const TQString& caption = TQString::null); - - - /** - * Creates a modal file dialog and returns the selected encoding and - * filename or an empty string if none was chosen. - * - * Note that with this - * method the user need not select an existing filename. - * - * @param startDir This can either be - * @li The URL of the directory to start in. - * @li a relative path or a filename determining the - * directory to start in and the file to be selected. - * @li TQString::null to start in the current working - * directory, or the last directory where a file has been - * selected. - * @li ':<keyword>' to start in the directory last used - * by a filedialog in the same application that specified - * the same keyword. - * @li '::<keyword>' to start in the directory last used - * by a filedialog in any application that specified the - * same keyword. - * @param encoding The encoding shown in the encoding combo. - * @param filter This is a space separated list of shell globs. - * You can set the text to be displayed for the glob, and - * provide multiple globs. See setFilter() for details on - * how to do this... - * @param parent The widget the dialog will be centered on initially. - * @param caption The name of the dialog widget. - */ - static Result getSaveURLAndEncoding(const TQString& encoding=TQString::null, - const TQString& startDir= TQString::null, - const TQString& filter= TQString::null, - TQWidget *parent= 0, - const TQString& caption = TQString::null); - - - -protected: - virtual void virtual_hook( int id, void* data ); -private: - KEncodingFileDialogPrivate *d; -}; - -#endif diff --git a/kio/kfile/kfile.h b/kio/kfile/kfile.h deleted file mode 100644 index 7209a1d25..000000000 --- a/kio/kfile/kfile.h +++ /dev/null @@ -1,129 +0,0 @@ -/* This file is part of the KDE libraries - Copyright (C) 2000 Carsten Pfeiffer - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - version 2, License as published by the Free Software Foundation. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ -#ifndef KFILE_H -#define KFILE_H - -#include - -#include "tdelibs_export.h" - -/** - * KFile is a class which provides a namespace for some enumerated - * values associated with the kfile library. You will never need to - * construct a KFile object itself. - */ - -class TDEIO_EXPORT KFile -{ -public: - /** - * Modes of operation for the dialog. - * @li @p File - Get a single file name from the user. - * @li @p Directory - Get a directory name from the user. - * @li @p Files - Get multiple file names from the user. - * @li @p ExistingOnly - Never return a filename which does not exist yet - * @li @p LocalOnly - Don't return remote filenames - */ - enum Mode { - File = 1, - Directory = 2, - Files = 4, - ExistingOnly = 8, - LocalOnly = 16, - ModeMax = 65536 - }; - - enum FileView { - Default = 0, - Simple = 1, - Detail = 2, - SeparateDirs = 4, - PreviewContents = 8, - PreviewInfo = 16, - FileViewMax = 65536 - }; - - enum SelectionMode { - Single = 1, - Multi = 2, - Extended = 4, - NoSelection = 8 - }; - - - // - // some bittests - // - - - // sorting specific - - // grr, who had the idea to set TQDir::Name to 0x0? - static bool isSortByName( const TQDir::SortSpec& sort ) { - return (sort & TQDir::Time) != TQDir::Time && - (sort & TQDir::Size) != TQDir::Size; - } - - static bool isSortBySize( const TQDir::SortSpec& sort ) { - return (sort & TQDir::Size) == TQDir::Size; - } - - static bool isSortByDate( const TQDir::SortSpec& sort ) { - return (sort & TQDir::Time) == TQDir::Time; - } - - static bool isSortDirsFirst( const TQDir::SortSpec& sort ) { - return (sort & TQDir::DirsFirst) == TQDir::DirsFirst; - } - - static bool isSortCaseInsensitive( const TQDir::SortSpec& sort ) { - return (sort & TQDir::IgnoreCase) == TQDir::IgnoreCase; - } - - - // view specific - static bool isDefaultView( const FileView& view ) { - return (view & Default) == Default; - } - - static bool isSimpleView( const FileView& view ) { - return (view & Simple) == Simple; - } - - static bool isDetailView( const FileView& view ) { - return (view & Detail) == Detail; - } - - static bool isSeparateDirs( const FileView& view ) { - return (view & SeparateDirs) == SeparateDirs; - } - - static bool isPreviewContents( const FileView& view ) { - return (view & PreviewContents) == PreviewContents; - } - - /** - * @since 3.1 - */ - static bool isPreviewInfo( const FileView& view ) { - return (view & PreviewInfo) == PreviewInfo; - } - -}; - -#endif // KFILE_H diff --git a/kio/kfile/kfilebookmarkhandler.cpp b/kio/kfile/kfilebookmarkhandler.cpp deleted file mode 100644 index f78fe2547..000000000 --- a/kio/kfile/kfilebookmarkhandler.cpp +++ /dev/null @@ -1,81 +0,0 @@ -/* This file is part of the KDE libraries - Copyright (C) 2002 Carsten Pfeiffer - - library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation, version 2. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include -#include - -#include -#include -#include -#include - -#include "kfiledialog.h" -#include "kfilebookmarkhandler.h" - -KFileBookmarkHandler::KFileBookmarkHandler( KFileDialog *dialog ) - : TQObject( dialog, "KFileBookmarkHandler" ), - KBookmarkOwner(), - m_dialog( dialog ) -{ - m_menu = new KPopupMenu( dialog, "bookmark menu" ); - - TQString file = locate( "data", "kfile/bookmarks.xml" ); - if ( file.isEmpty() ) - file = locateLocal( "data", "kfile/bookmarks.xml" ); - - KBookmarkManager *manager = KBookmarkManager::managerForFile( file, false); - - // import old bookmarks - if ( !KStandardDirs::exists( file ) ) { - TQString oldFile = locate( "data", "kfile/bookmarks.html" ); - if ( !oldFile.isEmpty() ) - importOldBookmarks( oldFile, manager ); - } - - manager->setUpdate( true ); - manager->setShowNSBookmarks( false ); - - m_bookmarkMenu = new KBookmarkMenu( manager, this, m_menu, - dialog->actionCollection(), true ); -} - -KFileBookmarkHandler::~KFileBookmarkHandler() -{ - delete m_bookmarkMenu; -} - -TQString KFileBookmarkHandler::currentURL() const -{ - return m_dialog->baseURL().url(); -} - -void KFileBookmarkHandler::importOldBookmarks( const TQString& path, - KBookmarkManager *manager ) -{ - KBookmarkDomBuilder *builder = new KBookmarkDomBuilder( manager->root(), manager ); - KNSBookmarkImporter importer( path ); - builder->connectImporter( &importer ); - importer.parseNSBookmarks(); - delete builder; - manager->save(); -} - -void KFileBookmarkHandler::virtual_hook( int id, void* data ) -{ KBookmarkOwner::virtual_hook( id, data ); } - -#include "kfilebookmarkhandler.moc" diff --git a/kio/kfile/kfilebookmarkhandler.h b/kio/kfile/kfilebookmarkhandler.h deleted file mode 100644 index 9b615c87e..000000000 --- a/kio/kfile/kfilebookmarkhandler.h +++ /dev/null @@ -1,63 +0,0 @@ -/* This file is part of the KDE libraries - Copyright (C) 2002 Carsten Pfeiffer - - library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation, version 2. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef KFILEBOOKMARKHANDLER_H -#define KFILEBOOKMARKHANDLER_H - -#include -#include - -class TQTextStream; -class KPopupMenu; - - -class TDEIO_EXPORT KFileBookmarkHandler : public TQObject, public KBookmarkOwner -{ - Q_OBJECT - -public: - KFileBookmarkHandler( KFileDialog *dialog ); - ~KFileBookmarkHandler(); - - TQPopupMenu * popupMenu(); - - // KBookmarkOwner interface: - virtual void openBookmarkURL( const TQString& url ) { emit openURL( url ); } - virtual TQString currentURL() const; - - KPopupMenu *menu() const { return m_menu; } - -signals: - void openURL( const TQString& url ); - -private: - void importOldBookmarks( const TQString& path, KBookmarkManager *manager ); - - KFileDialog *m_dialog; - KPopupMenu *m_menu; - KBookmarkMenu *m_bookmarkMenu; - -protected: - virtual void virtual_hook( int id, void* data ); -private: - class KFileBookmarkHandlerPrivate; - KFileBookmarkHandlerPrivate *d; -}; - - -#endif // KFILEBOOKMARKHANDLER_H diff --git a/kio/kfile/kfiledetailview.cpp b/kio/kfile/kfiledetailview.cpp deleted file mode 100644 index da61d0a9f..000000000 --- a/kio/kfile/kfiledetailview.cpp +++ /dev/null @@ -1,686 +0,0 @@ -// -*- c++ -*- -/* This file is part of the KDE libraries - Copyright (C) 1997 Stephan Kulow - 2000, 2001 Carsten Pfeiffer - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "kfiledetailview.h" -#include "config-kfile.h" - -#define COL_NAME 0 -#define COL_SIZE 1 -#define COL_DATE 2 -#define COL_PERM 3 -#define COL_OWNER 4 -#define COL_GROUP 5 - -class KFileDetailView::KFileDetailViewPrivate -{ -public: - KFileDetailViewPrivate() : dropItem(0) - { } - - KFileListViewItem *dropItem; - TQTimer autoOpenTimer; -}; - -KFileDetailView::KFileDetailView(TQWidget *parent, const char *name) - : KListView(parent, name), KFileView(), d(new KFileDetailViewPrivate()) -{ - // this is always the static section, not the index depending on column order - m_sortingCol = COL_NAME; - m_blockSortingSignal = false; - setViewName( i18n("Detailed View") ); - - addColumn( i18n( "Name" ) ); - addColumn( i18n( "Size" ) ); - addColumn( i18n( "Date" ) ); - addColumn( i18n( "Permissions" ) ); - addColumn( i18n( "Owner" ) ); - addColumn( i18n( "Group" ) ); - setShowSortIndicator( true ); - setAllColumnsShowFocus( true ); - setDragEnabled(true); - - connect( header(), TQT_SIGNAL( clicked(int)), - TQT_SLOT(slotSortingChanged(int) )); - - - connect( this, TQT_SIGNAL( returnPressed(TQListViewItem *) ), - TQT_SLOT( slotActivate( TQListViewItem *) ) ); - - connect( this, TQT_SIGNAL( clicked(TQListViewItem *, const TQPoint&, int)), - TQT_SLOT( selected( TQListViewItem *) ) ); - connect( this, TQT_SIGNAL( doubleClicked(TQListViewItem *, const TQPoint&, int)), - TQT_SLOT( slotActivate( TQListViewItem *) ) ); - - connect( this, TQT_SIGNAL(contextMenuRequested( TQListViewItem *, - const TQPoint &, int )), - this, TQT_SLOT( slotActivateMenu( TQListViewItem *, const TQPoint& ))); - - KFile::SelectionMode sm = KFileView::selectionMode(); - switch ( sm ) { - case KFile::Multi: - TQListView::setSelectionMode( TQListView::Multi ); - break; - case KFile::Extended: - TQListView::setSelectionMode( TQListView::Extended ); - break; - case KFile::NoSelection: - TQListView::setSelectionMode( TQListView::NoSelection ); - break; - default: // fall through - case KFile::Single: - TQListView::setSelectionMode( TQListView::Single ); - break; - } - - // for highlighting - if ( sm == KFile::Multi || sm == KFile::Extended ) - connect( this, TQT_SIGNAL( selectionChanged() ), - TQT_SLOT( slotSelectionChanged() )); - else - connect( this, TQT_SIGNAL( selectionChanged( TQListViewItem * ) ), - TQT_SLOT( highlighted( TQListViewItem * ) )); - - // DND - connect( &(d->autoOpenTimer), TQT_SIGNAL( timeout() ), - this, TQT_SLOT( slotAutoOpen() )); - - setSorting( sorting() ); - - m_resolver = - new KMimeTypeResolver( this ); -} - -KFileDetailView::~KFileDetailView() -{ - delete m_resolver; - delete d; -} - -void KFileDetailView::readConfig( TDEConfig *config, const TQString& group ) -{ - restoreLayout( config, group ); -} - -void KFileDetailView::writeConfig( TDEConfig *config, const TQString& group ) -{ - saveLayout( config, group ); -} - -void KFileDetailView::setSelected( const KFileItem *info, bool enable ) -{ - if ( !info ) - return; - - // we can only hope that this casts works - KFileListViewItem *item = (KFileListViewItem*)info->extraData( this ); - - if ( item ) - KListView::setSelected( item, enable ); -} - -void KFileDetailView::setCurrentItem( const KFileItem *item ) -{ - if ( !item ) - return; - KFileListViewItem *it = (KFileListViewItem*) item->extraData( this ); - if ( it ) - KListView::setCurrentItem( it ); -} - -KFileItem * KFileDetailView::currentFileItem() const -{ - KFileListViewItem *current = static_cast( currentItem() ); - if ( current ) - return current->fileInfo(); - - return 0L; -} - -void KFileDetailView::clearSelection() -{ - KListView::clearSelection(); -} - -void KFileDetailView::selectAll() -{ - if (KFileView::selectionMode() == KFile::NoSelection || - KFileView::selectionMode() == KFile::Single) - return; - - KListView::selectAll( true ); -} - -void KFileDetailView::invertSelection() -{ - KListView::invertSelection(); -} - -void KFileDetailView::slotActivateMenu (TQListViewItem *item,const TQPoint& pos ) -{ - if ( !item ) { - sig->activateMenu( 0, pos ); - return; - } - KFileListViewItem *i = (KFileListViewItem*) item; - sig->activateMenu( i->fileInfo(), pos ); -} - -void KFileDetailView::clearView() -{ - m_resolver->m_lstPendingMimeIconItems.clear(); - KListView::clear(); -} - -void KFileDetailView::insertItem( KFileItem *i ) -{ - KFileView::insertItem( i ); - - KFileListViewItem *item = new KFileListViewItem( (TQListView*) this, i ); - - setSortingKey( item, i ); - - i->setExtraData( this, item ); - - if ( !i->isMimeTypeKnown() ) - m_resolver->m_lstPendingMimeIconItems.append( item ); -} - -void KFileDetailView::slotActivate( TQListViewItem *item ) -{ - if ( !item ) - return; - - const KFileItem *fi = ( (KFileListViewItem*)item )->fileInfo(); - if ( fi ) - sig->activate( fi ); -} - -void KFileDetailView::selected( TQListViewItem *item ) -{ - if ( !item ) - return; - - if ( TDEGlobalSettings::singleClick() ) { - const KFileItem *fi = ( (KFileListViewItem*)item )->fileInfo(); - if ( fi && (fi->isDir() || !onlyDoubleClickSelectsFiles()) ) - sig->activate( fi ); - } -} - -void KFileDetailView::highlighted( TQListViewItem *item ) -{ - if ( !item ) - return; - - const KFileItem *fi = ( (KFileListViewItem*)item )->fileInfo(); - if ( fi ) - sig->highlightFile( fi ); -} - - -void KFileDetailView::setSelectionMode( KFile::SelectionMode sm ) -{ - disconnect( this, TQT_SIGNAL( selectionChanged() )); - disconnect( this, TQT_SIGNAL( selectionChanged( TQListViewItem * ) )); - - KFileView::setSelectionMode( sm ); - - switch ( KFileView::selectionMode() ) { - case KFile::Multi: - TQListView::setSelectionMode( TQListView::Multi ); - break; - case KFile::Extended: - TQListView::setSelectionMode( TQListView::Extended ); - break; - case KFile::NoSelection: - TQListView::setSelectionMode( TQListView::NoSelection ); - break; - default: // fall through - case KFile::Single: - TQListView::setSelectionMode( TQListView::Single ); - break; - } - - if ( sm == KFile::Multi || sm == KFile::Extended ) - connect( this, TQT_SIGNAL( selectionChanged() ), - TQT_SLOT( slotSelectionChanged() )); - else - connect( this, TQT_SIGNAL( selectionChanged( TQListViewItem * )), - TQT_SLOT( highlighted( TQListViewItem * ))); -} - -bool KFileDetailView::isSelected( const KFileItem *i ) const -{ - if ( !i ) - return false; - - KFileListViewItem *item = (KFileListViewItem*) i->extraData( this ); - return (item && item->isSelected()); -} - - -void KFileDetailView::updateView( bool b ) -{ - if ( !b ) - return; - - TQListViewItemIterator it( (TQListView*)this ); - for ( ; it.current(); ++it ) { - KFileListViewItem *item=static_cast(it.current()); - item->setPixmap( 0, item->fileInfo()->pixmap(KIcon::SizeSmall) ); - } -} - -void KFileDetailView::updateView( const KFileItem *i ) -{ - if ( !i ) - return; - - KFileListViewItem *item = (KFileListViewItem*) i->extraData( this ); - if ( !item ) - return; - - item->init(); - setSortingKey( item, i ); - - //item->repaint(); // only repaints if visible -} - -void KFileDetailView::setSortingKey( KFileListViewItem *item, - const KFileItem *i ) -{ - // see also setSorting() - TQDir::SortSpec spec = KFileView::sorting(); - - if ( spec & TQDir::Time ) - item->setKey( sortingKey( i->time( TDEIO::UDS_MODIFICATION_TIME ), - i->isDir(), spec )); - else if ( spec & TQDir::Size ) - item->setKey( sortingKey( i->size(), i->isDir(), spec )); - - else // Name or Unsorted - item->setKey( sortingKey( i->text(), i->isDir(), spec )); -} - - -void KFileDetailView::removeItem( const KFileItem *i ) -{ - if ( !i ) - return; - - KFileListViewItem *item = (KFileListViewItem*) i->extraData( this ); - m_resolver->m_lstPendingMimeIconItems.remove( item ); - delete item; - - KFileView::removeItem( i ); -} - -void KFileDetailView::slotSortingChanged( int col ) -{ - // col is the section here, not the index! - - TQDir::SortSpec sort = sorting(); - int sortSpec = -1; - bool reversed = (col == m_sortingCol) && (sort & TQDir::Reversed) == 0; - m_sortingCol = col; - - switch( col ) { - case COL_NAME: - sortSpec = (sort & ~TQDir::SortByMask | TQDir::Name); - break; - case COL_SIZE: - sortSpec = (sort & ~TQDir::SortByMask | TQDir::Size); - break; - case COL_DATE: - sortSpec = (sort & ~TQDir::SortByMask | TQDir::Time); - break; - - // the following columns have no equivalent in TQDir, so we set it - // to TQDir::Unsorted and remember the column (m_sortingCol) - case COL_OWNER: - case COL_GROUP: - case COL_PERM: - // grmbl, TQDir::Unsorted == SortByMask. - sortSpec = (sort & ~TQDir::SortByMask);// | TQDir::Unsorted; - break; - default: - break; - } - - if ( reversed ) - sortSpec |= TQDir::Reversed; - else - sortSpec &= ~TQDir::Reversed; - - if ( sort & TQDir::IgnoreCase ) - sortSpec |= TQDir::IgnoreCase; - else - sortSpec &= ~TQDir::IgnoreCase; - - - KFileView::setSorting( static_cast( sortSpec ) ); - - KFileItem *item; - KFileItemListIterator it( *items() ); - - if ( sortSpec & TQDir::Time ) { - for ( ; (item = it.current()); ++it ) - viewItem(item)->setKey( sortingKey( item->time( TDEIO::UDS_MODIFICATION_TIME ), item->isDir(), sortSpec )); - } - - else if ( sortSpec & TQDir::Size ) { - for ( ; (item = it.current()); ++it ) - viewItem(item)->setKey( sortingKey( item->size(), item->isDir(), - sortSpec )); - } - else { // Name or Unsorted -> use column text - for ( ; (item = it.current()); ++it ) { - KFileListViewItem *i = viewItem( item ); - i->setKey( sortingKey( i->text(m_sortingCol), item->isDir(), - sortSpec )); - } - } - - KListView::setSorting( m_sortingCol, !reversed ); - KListView::sort(); - - if ( !m_blockSortingSignal ) - sig->changeSorting( static_cast( sortSpec ) ); -} - - -void KFileDetailView::setSorting( TQDir::SortSpec spec ) -{ - int col = 0; - if ( spec & TQDir::Time ) - col = COL_DATE; - else if ( spec & TQDir::Size ) - col = COL_SIZE; - else if ( spec & TQDir::Unsorted ) - col = m_sortingCol; - else - col = COL_NAME; - - // inversed, because slotSortingChanged will reverse it - if ( spec & TQDir::Reversed ) - spec = (TQDir::SortSpec) (spec & ~TQDir::Reversed); - else - spec = (TQDir::SortSpec) (spec | TQDir::Reversed); - - m_sortingCol = col; - KFileView::setSorting( (TQDir::SortSpec) spec ); - - - // don't emit sortingChanged() when called via setSorting() - m_blockSortingSignal = true; // can't use blockSignals() - slotSortingChanged( col ); - m_blockSortingSignal = false; -} - -void KFileDetailView::ensureItemVisible( const KFileItem *i ) -{ - if ( !i ) - return; - - KFileListViewItem *item = (KFileListViewItem*) i->extraData( this ); - - if ( item ) - KListView::ensureItemVisible( item ); -} - -// we're in multiselection mode -void KFileDetailView::slotSelectionChanged() -{ - sig->highlightFile( 0L ); -} - -KFileItem * KFileDetailView::firstFileItem() const -{ - KFileListViewItem *item = static_cast( firstChild() ); - if ( item ) - return item->fileInfo(); - return 0L; -} - -KFileItem * KFileDetailView::nextItem( const KFileItem *fileItem ) const -{ - if ( fileItem ) { - KFileListViewItem *item = viewItem( fileItem ); - if ( item && item->itemBelow() ) - return ((KFileListViewItem*) item->itemBelow())->fileInfo(); - else - return 0L; - } - else - return firstFileItem(); -} - -KFileItem * KFileDetailView::prevItem( const KFileItem *fileItem ) const -{ - if ( fileItem ) { - KFileListViewItem *item = viewItem( fileItem ); - if ( item && item->itemAbove() ) - return ((KFileListViewItem*) item->itemAbove())->fileInfo(); - else - return 0L; - } - else - return firstFileItem(); -} - -void KFileDetailView::keyPressEvent( TQKeyEvent *e ) -{ - KListView::keyPressEvent( e ); - - if ( e->key() == Key_Return || e->key() == Key_Enter ) { - if ( e->state() & ControlButton ) - e->ignore(); - else - e->accept(); - } -} - -// -// mimetype determination on demand -// -void KFileDetailView::mimeTypeDeterminationFinished() -{ - // anything to do? -} - -void KFileDetailView::determineIcon( KFileListViewItem *item ) -{ - (void) item->fileInfo()->determineMimeType(); - updateView( item->fileInfo() ); -} - -void KFileDetailView::listingCompleted() -{ - m_resolver->start(); -} - -TQDragObject *KFileDetailView::dragObject() -{ - // create a list of the URL:s that we want to drag - KURL::List urls; - KFileItemListIterator it( * KFileView::selectedItems() ); - for ( ; it.current(); ++it ){ - urls.append( (*it)->url() ); - } - TQPixmap pixmap; - if( urls.count() > 1 ) - pixmap = DesktopIcon( "tdemultiple", KIcon::SizeSmall ); - if( pixmap.isNull() ) - pixmap = currentFileItem()->pixmap( KIcon::SizeSmall ); - - TQPoint hotspot; - hotspot.setX( pixmap.width() / 2 ); - hotspot.setY( pixmap.height() / 2 ); - TQDragObject* myDragObject = new KURLDrag( urls, widget() ); - myDragObject->setPixmap( pixmap, hotspot ); - return myDragObject; -} - -void KFileDetailView::slotAutoOpen() -{ - d->autoOpenTimer.stop(); - if( !d->dropItem ) - return; - - KFileItem *fileItem = d->dropItem->fileInfo(); - if (!fileItem) - return; - - if( fileItem->isFile() ) - return; - - if ( fileItem->isDir() || fileItem->isLink()) - sig->activate( fileItem ); -} - -bool KFileDetailView::acceptDrag(TQDropEvent* e) const -{ - return KURLDrag::canDecode( e ) && - (e->source()!= const_cast(this)) && - ( e->action() == TQDropEvent::Copy - || e->action() == TQDropEvent::Move - || e->action() == TQDropEvent::Link ); -} - -void KFileDetailView::contentsDragEnterEvent( TQDragEnterEvent *e ) -{ - if ( ! acceptDrag( e ) ) { // can we decode this ? - e->ignore(); // No - return; - } - e->acceptAction(); // Yes - - if ((dropOptions() & AutoOpenDirs) == 0) - return; - - KFileListViewItem *item = dynamic_cast(itemAt( contentsToViewport( e->pos() ) )); - if ( item ) { // are we over an item ? - d->dropItem = item; - d->autoOpenTimer.start( autoOpenDelay() ); // restart timer - } - else - { - d->dropItem = 0; - d->autoOpenTimer.stop(); - } -} - -void KFileDetailView::contentsDragMoveEvent( TQDragMoveEvent *e ) -{ - if ( ! acceptDrag( e ) ) { // can we decode this ? - e->ignore(); // No - return; - } - e->acceptAction(); // Yes - - if ((dropOptions() & AutoOpenDirs) == 0) - return; - - KFileListViewItem *item = dynamic_cast(itemAt( contentsToViewport( e->pos() ) )); - if ( item ) { // are we over an item ? - if (d->dropItem != item) - { - d->dropItem = item; - d->autoOpenTimer.start( autoOpenDelay() ); // restart timer - } - } - else - { - d->dropItem = 0; - d->autoOpenTimer.stop(); - } -} - -void KFileDetailView::contentsDragLeaveEvent( TQDragLeaveEvent * ) -{ - d->dropItem = 0; - d->autoOpenTimer.stop(); -} - -void KFileDetailView::contentsDropEvent( TQDropEvent *e ) -{ - d->dropItem = 0; - d->autoOpenTimer.stop(); - - if ( ! acceptDrag( e ) ) { // can we decode this ? - e->ignore(); // No - return; - } - e->acceptAction(); // Yes - - KFileListViewItem *item = dynamic_cast(itemAt( contentsToViewport( e->pos() ) )); - KFileItem * fileItem = 0; - if (item) - fileItem = item->fileInfo(); - - emit dropped(e, fileItem); - - KURL::List urls; - if (KURLDrag::decode( e, urls ) && !urls.isEmpty()) - { - emit dropped(e, urls, fileItem ? fileItem->url() : KURL()); - sig->dropURLs(fileItem, e, urls); - } -} - - -///////////////////////////////////////////////////////////////// - - -void KFileListViewItem::init() -{ - KFileListViewItem::setPixmap( COL_NAME, inf->pixmap(KIcon::SizeSmall)); - - setText( COL_NAME, inf->text() ); - setText( COL_SIZE, TDEGlobal::locale()->formatNumber( inf->size(), 0)); - setText( COL_DATE, inf->timeString() ); - setText( COL_PERM, inf->permissionsString() ); - setText( COL_OWNER, inf->user() ); - setText( COL_GROUP, inf->group() ); -} - - -void KFileDetailView::virtual_hook( int id, void* data ) -{ KListView::virtual_hook( id, data ); - KFileView::virtual_hook( id, data ); } - -#include "kfiledetailview.moc" diff --git a/kio/kfile/kfiledetailview.h b/kio/kfile/kfiledetailview.h deleted file mode 100644 index 37e71720f..000000000 --- a/kio/kfile/kfiledetailview.h +++ /dev/null @@ -1,219 +0,0 @@ -// -*- c++ -*- -/* This file is part of the KDE libraries - Copyright (C) 1997 Stephan Kulow - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef KFILEDETAILVIEW_H -#define KFILEDETAILVIEW_H - -class KFileItem; -class TQWidget; -class TQKeyEvent; - -#include -#include - -#include "kfileview.h" - -/** - * An item for the listiew, that has a reference to its corresponding - * KFileItem. - */ -class TDEIO_EXPORT KFileListViewItem : public KListViewItem -{ -public: - KFileListViewItem( TQListView *parent, const TQString &text, - const TQPixmap &icon, KFileItem *fi ) - : KListViewItem( parent, text ), inf( fi ) { - setPixmap( 0, icon ); - setText( 0, text ); - } - - /** - * @since 3.1 - */ - KFileListViewItem( TQListView *parent, KFileItem *fi ) - : KListViewItem( parent ), inf( fi ) { - init(); - } - - KFileListViewItem( TQListView *parent, const TQString &text, - const TQPixmap &icon, KFileItem *fi, - TQListViewItem *after) - : KListViewItem( parent, after ), inf( fi ) { - setPixmap( 0, icon ); - setText( 0, text ); - } - ~KFileListViewItem() { - inf->removeExtraData( listView() ); - } - - /** - * @returns the corresponding KFileItem - */ - KFileItem *fileInfo() const { - return inf; - } - - virtual TQString key( int /*column*/, bool /*ascending*/ ) const { - return m_key; - } - - void setKey( const TQString& key ) { m_key = key; } - - TQRect rect() const - { - TQRect r = listView()->itemRect(this); - return TQRect( listView()->viewportToContents( r.topLeft() ), - TQSize( r.width(), r.height() ) ); - } - - /** - * @since 3.1 - */ - void init(); - -private: - KFileItem *inf; - TQString m_key; - -private: - class KFileListViewItemPrivate; - KFileListViewItemPrivate *d; - -}; - -/** - * A list-view capable of showing KFileItem'. Used in the filedialog - * for example. Most of the documentation is in KFileView class. - * - * @see KDirOperator - * @see KCombiView - * @see KFileIconView - */ -class TDEIO_EXPORT KFileDetailView : public KListView, public KFileView -{ - Q_OBJECT - -public: - KFileDetailView(TQWidget *parent, const char *name); - virtual ~KFileDetailView(); - - virtual TQWidget *widget() { return this; } - virtual void clearView(); - virtual void setAutoUpdate( bool ) {} // ### unused. remove in KDE4 - - virtual void setSelectionMode( KFile::SelectionMode sm ); - - virtual void updateView( bool ); - virtual void updateView(const KFileItem*); - virtual void removeItem( const KFileItem *); - virtual void listingCompleted(); - - virtual void setSelected(const KFileItem *, bool); - virtual bool isSelected(const KFileItem *i) const; - virtual void clearSelection(); - virtual void selectAll(); - virtual void invertSelection(); - - virtual void setCurrentItem( const KFileItem * ); - virtual KFileItem * currentFileItem() const; - virtual KFileItem * firstFileItem() const; - virtual KFileItem * nextItem( const KFileItem * ) const; - virtual KFileItem * prevItem( const KFileItem * ) const; - - virtual void insertItem( KFileItem *i ); - - // implemented to get noticed about sorting changes (for sortingIndicator) - virtual void setSorting( TQDir::SortSpec ); - - void ensureItemVisible( const KFileItem * ); - - // for KMimeTypeResolver - void mimeTypeDeterminationFinished(); - void determineIcon( KFileListViewItem *item ); - TQScrollView *scrollWidget() const { return (TQScrollView*) this; } - - virtual void readConfig( TDEConfig *, const TQString& group = TQString::null ); - virtual void writeConfig( TDEConfig *, const TQString& group = TQString::null); - -signals: - /** - * The user dropped something. - * @p fileItem points to the item dropped on or can be 0 if the - * user dropped on empty space. - * @since 3.2 - */ - void dropped(TQDropEvent *event, KFileItem *fileItem); - /** - * The user dropped the URLs @p urls. - * @p url points to the item dropped on or can be empty if the - * user dropped on empty space. - * @since 3.2 - */ - void dropped(TQDropEvent *event, const KURL::List &urls, const KURL &url); - -protected: - virtual void keyPressEvent( TQKeyEvent * ); - - // DND support - virtual TQDragObject *dragObject(); - virtual void contentsDragEnterEvent( TQDragEnterEvent *e ); - virtual void contentsDragMoveEvent( TQDragMoveEvent *e ); - virtual void contentsDragLeaveEvent( TQDragLeaveEvent *e ); - virtual void contentsDropEvent( TQDropEvent *ev ); - virtual bool acceptDrag(TQDropEvent* e ) const; - - int m_sortingCol; - -protected slots: - void slotSelectionChanged(); - -private slots: - void slotSortingChanged( int ); - void selected( TQListViewItem *item ); - void slotActivate( TQListViewItem *item ); - void highlighted( TQListViewItem *item ); - void slotActivateMenu ( TQListViewItem *item, const TQPoint& pos ); - void slotAutoOpen(); - -private: - virtual void insertItem(TQListViewItem *i) { KListView::insertItem(i); } - virtual void setSorting(int i, bool b) { KListView::setSorting(i, b); } - virtual void setSelected(TQListViewItem *i, bool b) { KListView::setSelected(i, b); } - - inline KFileListViewItem * viewItem( const KFileItem *item ) const { - if ( item ) - return (KFileListViewItem *) item->extraData( this ); - return 0L; - } - - void setSortingKey( KFileListViewItem *item, const KFileItem *i ); - - - bool m_blockSortingSignal; - KMimeTypeResolver *m_resolver; - -protected: - virtual void virtual_hook( int id, void* data ); -private: - class KFileDetailViewPrivate; - KFileDetailViewPrivate *d; -}; - -#endif // KFILEDETAILVIEW_H diff --git a/kio/kfile/kfiledialog.cpp b/kio/kfile/kfiledialog.cpp deleted file mode 100644 index 1538d5dbc..000000000 --- a/kio/kfile/kfiledialog.cpp +++ /dev/null @@ -1,2380 +0,0 @@ -// -*- c++ -*- -/* This file is part of the KDE libraries - Copyright (C) 1997, 1998 Richard Moore - 1998 Stephan Kulow - 1998 Daniel Grana - 1999,2000,2001,2002,2003 Carsten Pfeiffer - 2003 Clarence Dang - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include "kfiledialog.h" - -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "config-kfile.h" -#include "kpreviewwidgetbase.h" - -#include -#include -#include -#include -#include -#include - -#include -#include - -#ifdef Q_WS_X11 -#include -#include -#endif - -enum Buttons { HOTLIST_BUTTON, - PATH_COMBO, CONFIGURE_BUTTON }; - -template class TQPtrList; - -namespace { - static void silenceQToolBar(TQtMsgType, const char *) - { - } -} - -struct KFileDialogPrivate -{ - // the last selected url - KURL url; - - // the selected filenames in multiselection mode -- FIXME - TQString filenames; - - // the name of the filename set by setSelection - TQString selection; - - // now following all kind of widgets, that I need to rebuild - // the geometry management - TQBoxLayout *boxLayout; - TQWidget *mainWidget; - - TQLabel *locationLabel; - - // @deprecated remove in KDE4 - TQLabel *filterLabel; - KURLComboBox *pathCombo; - KPushButton *okButton, *cancelButton; - KFileSpeedBar *urlBar; - TQHBoxLayout *urlBarLayout; - TQWidget *customWidget; - - // Automatically Select Extension stuff - TQCheckBox *autoSelectExtCheckBox; - bool autoSelectExtChecked; // whether or not the _user_ has checked the above box - TQString extension; // current extension for this filter - - TQPtrList statJobs; - - KURL::List urlList; //the list of selected urls - - TQStringList mimetypes; //the list of possible mimetypes to save as - - // indicates if the location edit should be kept or cleared when changing - // directories - bool keepLocation :1; - - // the KDirOperators view is set in KFileDialog::show(), so to avoid - // setting it again and again, we have this nice little boolean :) - bool hasView :1; - - bool hasDefaultFilter :1; // necessary for the operationMode - KFileDialog::OperationMode operationMode; - - // The file class used for KRecentDirs - TQString fileClass; - - KFileBookmarkHandler *bookmarkHandler; - - // the ID of the path drop down so subclasses can place their custom widgets properly - int m_pathComboIndex; -}; - -KURL *KFileDialog::lastDirectory; // to set the start path - -static KStaticDeleter ldd; - -KFileDialog::KFileDialog(const TQString& startDir, const TQString& filter, - TQWidget *parent, const char* name, bool modal) - : KDialogBase( parent, name, modal, TQString::null, 0 ) -{ - init( startDir, filter, 0 ); -} - -KFileDialog::KFileDialog(const TQString& startDir, const TQString& filter, - TQWidget *parent, const char* name, bool modal, TQWidget* widget) - : KDialogBase( parent, name, modal, TQString::null, 0 ) -{ - init( startDir, filter, widget ); -} - - -KFileDialog::~KFileDialog() -{ - hide(); - - TDEConfig *config = TDEGlobal::config(); - - if (d->urlBar) - d->urlBar->save( config ); - - config->sync(); - - delete d->bookmarkHandler; // Should be deleted before ops! - delete ops; - delete d; -} - -void KFileDialog::setLocationLabel(const TQString& text) -{ - d->locationLabel->setText(text); -} - -void KFileDialog::setFilter(const TQString& filter) -{ - int pos = filter.find('/'); - - // Check for an un-escaped '/', if found - // interpret as a MIME filter. - - if (pos > 0 && filter[pos - 1] != '\\') { - TQStringList filters = TQStringList::split( " ", filter ); - setMimeFilter( filters ); - return; - } - - // Strip the escape characters from - // escaped '/' characters. - - TQString copy (filter); - for (pos = 0; (pos = copy.find("\\/", pos)) != -1; ++pos) - copy.remove(pos, 1); - - ops->clearFilter(); - filterWidget->setFilter(copy); - ops->setNameFilter(filterWidget->currentFilter()); - d->hasDefaultFilter = false; - filterWidget->setEditable( true ); - - updateAutoSelectExtension (); -} - -TQString KFileDialog::currentFilter() const -{ - return filterWidget->currentFilter(); -} - -// deprecated -void KFileDialog::setFilterMimeType(const TQString &label, - const KMimeType::List &types, - const KMimeType::Ptr &defaultType) -{ - d->mimetypes.clear(); - d->filterLabel->setText(label); - - KMimeType::List::ConstIterator it; - for( it = types.begin(); it != types.end(); ++it) - d->mimetypes.append( (*it)->name() ); - - setMimeFilter( d->mimetypes, defaultType->name() ); -} - -void KFileDialog::setMimeFilter( const TQStringList& mimeTypes, - const TQString& defaultType ) -{ - d->mimetypes = mimeTypes; - filterWidget->setMimeFilter( mimeTypes, defaultType ); - - TQStringList types = TQStringList::split(" ", filterWidget->currentFilter()); - types.append( TQString::fromLatin1( "inode/directory" )); - ops->clearFilter(); - ops->setMimeFilter( types ); - d->hasDefaultFilter = !defaultType.isEmpty(); - filterWidget->setEditable( !d->hasDefaultFilter || - d->operationMode != Saving ); - - updateAutoSelectExtension (); -} - -void KFileDialog::clearFilter() -{ - d->mimetypes.clear(); - filterWidget->setFilter( TQString::null ); - ops->clearFilter(); - d->hasDefaultFilter = false; - filterWidget->setEditable( true ); - - updateAutoSelectExtension (); -} - -TQString KFileDialog::currentMimeFilter() const -{ - int i = filterWidget->currentItem(); - if (filterWidget->showsAllTypes()) - i--; - - if ((i >= 0) && (i < (int) d->mimetypes.count())) - return d->mimetypes[i]; - return TQString::null; // The "all types" item has no mimetype -} - -KMimeType::Ptr KFileDialog::currentFilterMimeType() -{ - return KMimeType::mimeType( currentMimeFilter() ); -} - -void KFileDialog::setPreviewWidget(const TQWidget *w) { - ops->setPreviewWidget(w); - ops->clearHistory(); - d->hasView = true; -} - -void KFileDialog::setPreviewWidget(const KPreviewWidgetBase *w) { - ops->setPreviewWidget(w); - ops->clearHistory(); - d->hasView = true; -} - -KURL KFileDialog::getCompleteURL(const TQString &_url) -{ - TQString url = KShell::tildeExpand(_url); - KURL u; - - if ( KURL::isRelativeURL(url) ) // only a full URL isn't relative. Even /path is. - { - if (!url.isEmpty() && !TQDir::isRelativePath(url) ) // absolute path - u.setPath( url ); - else - { - u = ops->url(); - u.addPath( url ); // works for filenames and relative paths - u.cleanPath(); // fix "dir/.." - } - } - else // complete URL - u = url; - - return u; -} - -// FIXME: check for "existing" flag here? -void KFileDialog::slotOk() -{ - kdDebug(kfile_area) << "slotOK\n"; - - // a list of all selected files/directories (if any) - // can only be used if the user didn't type any filenames/urls himself - const KFileItemList *items = ops->selectedItems(); - - if ( (mode() & KFile::Directory) != KFile::Directory ) { - if ( locationEdit->currentText().stripWhiteSpace().isEmpty() ) { - if ( !items || items->isEmpty() ) - { - TQString msg; - if ( d->operationMode == Saving ) - msg = i18n("Please specify the filename to save to."); - else - msg = i18n("Please select the file to open."); - KMessageBox::information(this, msg); - return; - } - - // weird case: the location edit is empty, but there are - // highlighted files - else { - - bool multi = (mode() & KFile::Files) != 0; - KFileItemListIterator it( *items ); - TQString endQuote = TQString::fromLatin1("\" "); - TQString name, files; - while ( it.current() ) { - name = (*it)->name(); - if ( multi ) { - name.prepend( '"' ); - name.append( endQuote ); - } - - files.append( name ); - ++it; - } - setLocationText( files ); - return; - } - } - } - - bool dirOnly = ops->dirOnlyMode(); - - // we can use our kfileitems, no need to parse anything - if ( items && !locationEdit->lineEdit()->edited() && - !(items->isEmpty() && !dirOnly) ) { - - d->urlList.clear(); - d->filenames = TQString::null; - - if ( dirOnly ) { - d->url = ops->url(); - } - else { - if ( !(mode() & KFile::Files) ) {// single selection - d->url = items->getFirst()->url(); - } - - else { // multi (dirs and/or files) - d->url = ops->url(); - KFileItemListIterator it( *items ); - while ( it.current() ) { - d->urlList.append( (*it)->url() ); - ++it; - } - } - } - - KURL url = TDEIO::NetAccess::mostLocalURL(d->url,topLevelWidget()); - if ( (mode() & KFile::LocalOnly) == KFile::LocalOnly && - !url.isLocalFile() ) { -// ### after message freeze, add message for directories! - KMessageBox::sorry( d->mainWidget, - i18n("You can only select local files."), - i18n("Remote Files Not Accepted") ); - return; - } - - d->url = url; - accept(); - return; - } - - - KURL selectedURL; - - if ( (mode() & KFile::Files) == KFile::Files ) {// multiselection mode - TQString locationText = locationEdit->currentText(); - if ( locationText.contains( '/' )) { - // relative path? -> prepend the current directory - KURL u( ops->url(), KShell::tildeExpand(locationText)); - if ( u.isValid() ) - selectedURL = u; - else - selectedURL = ops->url(); - } - else // simple filename -> just use the current URL - selectedURL = ops->url(); - } - - else { - selectedURL = getCompleteURL(locationEdit->currentText()); - - // appendExtension() may change selectedURL - appendExtension (selectedURL); - } - - if ( !selectedURL.isValid() ) { - KMessageBox::sorry( d->mainWidget, i18n("%1\ndoes not appear to be a valid URL.\n").arg(d->url.url()), i18n("Invalid URL") ); - return; - } - - KURL url = TDEIO::NetAccess::mostLocalURL(selectedURL,topLevelWidget()); - if ( (mode() & KFile::LocalOnly) == KFile::LocalOnly && - !url.isLocalFile() ) { - KMessageBox::sorry( d->mainWidget, - i18n("You can only select local files."), - i18n("Remote Files Not Accepted") ); - return; - } - - d->url = url; - - // d->url is a correct URL now - - if ( (mode() & KFile::Directory) == KFile::Directory ) { - kdDebug(kfile_area) << "Directory" << endl; - bool done = true; - if ( d->url.isLocalFile() ) { - if ( locationEdit->currentText().stripWhiteSpace().isEmpty() ) { - TQFileInfo info( d->url.path() ); - if ( info.isDir() ) { - d->filenames = TQString::null; - d->urlList.clear(); - d->urlList.append( d->url ); - accept(); - } - else if (!info.exists() && (mode() & KFile::File) != KFile::File) { - // directory doesn't exist, create and enter it - if ( ops->mkdir( d->url.url(), true )) - return; - else - accept(); - } - else { // d->url is not a directory, - // maybe we are in File(s) | Directory mode - if ( (mode() & KFile::File) == KFile::File || - (mode() & KFile::Files) == KFile::Files ) - done = false; - } - } - else // Directory mode, with file[s]/dir[s] selected - { - if ( mode() & KFile::ExistingOnly ) - { - if ( ops->dirOnlyMode() ) - { - KURL fullURL(d->url, locationEdit->currentText()); - if ( TQFile::exists( fullURL.path() ) ) - { - d->url = fullURL; - d->filenames = TQString::null; - d->urlList.clear(); - accept(); - return; - } - else // doesn't exist -> reject - return; - } - } - - d->filenames = locationEdit->currentText(); - accept(); // what can we do? - } - - } - else { // FIXME: remote directory, should we allow that? -// tqDebug( "**** Selected remote directory: %s", d->url.url().latin1()); - d->filenames = TQString::null; - d->urlList.clear(); - d->urlList.append( d->url ); - - if ( mode() & KFile::ExistingOnly ) - done = false; - else - accept(); - } - - if ( done ) - return; - } - - if (!kapp->authorizeURLAction("open", KURL(), d->url)) - { - TQString msg = TDEIO::buildErrorString(TDEIO::ERR_ACCESS_DENIED, d->url.prettyURL()); - KMessageBox::error( d->mainWidget, msg); - return; - } - - TDEIO::StatJob *job = 0L; - d->statJobs.clear(); - d->filenames = KShell::tildeExpand(locationEdit->currentText()); - - if ( (mode() & KFile::Files) == KFile::Files && - !locationEdit->currentText().contains( '/' )) { - kdDebug(kfile_area) << "Files\n"; - KURL::List list = parseSelectedURLs(); - for ( KURL::List::ConstIterator it = list.begin(); - it != list.end(); ++it ) - { - if (!kapp->authorizeURLAction("open", KURL(), *it)) - { - TQString msg = TDEIO::buildErrorString(TDEIO::ERR_ACCESS_DENIED, (*it).prettyURL()); - KMessageBox::error( d->mainWidget, msg); - return; - } - } - for ( KURL::List::ConstIterator it = list.begin(); - it != list.end(); ++it ) - { - job = TDEIO::stat( *it, !(*it).isLocalFile() ); - job->setWindow (topLevelWidget()); - TDEIO::Scheduler::scheduleJob( job ); - d->statJobs.append( job ); - connect( job, TQT_SIGNAL( result(TDEIO::Job *) ), - TQT_SLOT( slotStatResult( TDEIO::Job *) )); - } - return; - } - - job = TDEIO::stat(d->url,!d->url.isLocalFile()); - job->setWindow (topLevelWidget()); - d->statJobs.append( job ); - connect(job, TQT_SIGNAL(result(TDEIO::Job*)), TQT_SLOT(slotStatResult(TDEIO::Job*))); -} - - -static bool isDirectory (const TDEIO::UDSEntry &t) -{ - bool isDir = false; - - for (TDEIO::UDSEntry::ConstIterator it = t.begin(); - it != t.end(); - it++) - { - if ((*it).m_uds == TDEIO::UDS_FILE_TYPE) - { - isDir = S_ISDIR ((mode_t) ((*it).m_long)); - break; - } - } - - return isDir; -} - -// FIXME : count all errors and show messagebox when d->statJobs.count() == 0 -// in case of an error, we cancel the whole operation (clear d->statJobs and -// don't call accept) -void KFileDialog::slotStatResult(TDEIO::Job* job) -{ - kdDebug(kfile_area) << "slotStatResult" << endl; - TDEIO::StatJob *sJob = static_cast( job ); - - if ( !d->statJobs.removeRef( sJob ) ) { - return; - } - - int count = d->statJobs.count(); - - // errors mean in general, the location is no directory ;/ - // Can we be sure that it is exististant at all? (pfeiffer) - if (sJob->error() && count == 0 && !ops->dirOnlyMode()) - { - accept(); - return; - } - - TDEIO::UDSEntry t = sJob->statResult(); - if (isDirectory (t)) - { - if ( ops->dirOnlyMode() ) - { - d->filenames = TQString::null; - d->urlList.clear(); - accept(); - } - else // in File[s] mode, directory means error -> cd into it - { - if ( count == 0 ) { - locationEdit->clearEdit(); - locationEdit->lineEdit()->setEdited( false ); - setURL( sJob->url() ); - } - } - d->statJobs.clear(); - return; - } - else if ( ops->dirOnlyMode() ) - { - return; // ### error message? - } - - kdDebug(kfile_area) << "filename " << sJob->url().url() << endl; - - if ( count == 0 ) - accept(); -} - -void KFileDialog::accept() -{ - setResult( TQDialog::Accepted ); // parseSelectedURLs() checks that - - *lastDirectory = ops->url(); - if (!d->fileClass.isEmpty()) - KRecentDirs::add(d->fileClass, ops->url().url()); - - // clear the topmost item, we insert it as full path later on as item 1 - locationEdit->changeItem( TQString::null, 0 ); - - KURL::List list = selectedURLs(); - TQValueListConstIterator it = list.begin(); - for ( ; it != list.end(); ++it ) { - const KURL& url = *it; - // we strip the last slash (-1) because KURLComboBox does that as well - // when operating in file-mode. If we wouldn't , dupe-finding wouldn't - // work. - TQString file = url.isLocalFile() ? url.path(-1) : url.prettyURL(-1); - - // remove dupes - for ( int i = 1; i < locationEdit->count(); i++ ) { - if ( locationEdit->text( i ) == file ) { - locationEdit->removeItem( i-- ); - break; - } - } - locationEdit->insertItem( file, 1 ); - } - - TDEConfig *config = TDEGlobal::config(); - config->setForceGlobal( true ); - writeConfig( config, ConfigGroup ); - config->setForceGlobal( false ); - - saveRecentFiles( config ); - config->sync(); - - KDialogBase::accept(); - - addToRecentDocuments(); - - if ( (mode() & KFile::Files) != KFile::Files ) // single selection - emit fileSelected(d->url.url()); - - ops->close(); - emit okClicked(); -} - - -void KFileDialog::fileHighlighted(const KFileItem *i) -{ - if (i && i->isDir()) - return; - - - if ( (ops->mode() & KFile::Files) != KFile::Files ) { - if ( !i ) - return; - - d->url = i->url(); - - if ( !locationEdit->hasFocus() ) { // don't disturb while editing - setLocationText( i->name() ); - } - emit fileHighlighted(d->url.url()); - } - - else { - multiSelectionChanged(); - emit selectionChanged(); - } -} - -void KFileDialog::fileSelected(const KFileItem *i) -{ - if (i && i->isDir()) - return; - - if ( (ops->mode() & KFile::Files) != KFile::Files ) { - if ( !i ) - return; - - d->url = i->url(); - setLocationText( i->name() ); - } - else { - multiSelectionChanged(); - emit selectionChanged(); - } - slotOk(); -} - - -// I know it's slow to always iterate thru the whole filelist -// (ops->selectedItems()), but what can we do? -void KFileDialog::multiSelectionChanged() -{ - if ( locationEdit->hasFocus() ) // don't disturb - return; - - locationEdit->lineEdit()->setEdited( false ); - KFileItem *item; - const KFileItemList *list = ops->selectedItems(); - if ( !list ) { - locationEdit->clearEdit(); - return; - } - - static const TQString &begin = TDEGlobal::staticQString(" \""); - KFileItemListIterator it ( *list ); - TQString text; - while ( (item = it.current()) ) { - text.append( begin ).append( item->name() ).append( '\"' ); - ++it; - } - - setLocationText( text.stripWhiteSpace() ); -} - -void KFileDialog::setLocationText( const TQString& text ) -{ - // setCurrentItem() will cause textChanged() being emitted, - // so slotLocationChanged() will be called. Make sure we don't clear - // the KDirOperator's view-selection in there - disconnect( locationEdit, TQT_SIGNAL( textChanged( const TQString& ) ), - this, TQT_SLOT( slotLocationChanged( const TQString& ) ) ); - locationEdit->setCurrentItem( 0 ); - connect( locationEdit, TQT_SIGNAL( textChanged( const TQString& ) ), - TQT_SLOT( slotLocationChanged( const TQString& )) ); - locationEdit->setEditText( text ); - - // don't change selection when user has clicked on an item - if ( d->operationMode == Saving && !locationEdit->isVisible()) - setNonExtSelection(); -} - -static const char autocompletionWhatsThisText[] = I18N_NOOP("

While typing in the text area, you may be presented " - "with possible matches. " - "This feature can be controlled by clicking with the right mouse button " - "and selecting a preferred mode from the Text Completion menu.") ""; -void KFileDialog::updateLocationWhatsThis (void) -{ - TQString whatsThisText; - if (d->operationMode == KFileDialog::Saving) - { - whatsThisText = "" + i18n("This is the name to save the file as.") + - i18n (autocompletionWhatsThisText); - } - else if (ops->mode() & KFile::Files) - { - whatsThisText = "" + i18n("This is the list of files to open. More than " - "one file can be specified by listing several " - "files, separated by spaces.") + - i18n (autocompletionWhatsThisText); - } - else - { - whatsThisText = "" + i18n("This is the name of the file to open.") + - i18n (autocompletionWhatsThisText); - } - - TQWhatsThis::add(d->locationLabel, whatsThisText); - TQWhatsThis::add(locationEdit, whatsThisText); -} - -void KFileDialog::init(const TQString& startDir, const TQString& filter, TQWidget* widget) -{ - initStatic(); - d = new KFileDialogPrivate(); - - d->boxLayout = 0; - d->keepLocation = false; - d->operationMode = Opening; - d->bookmarkHandler = 0; - d->hasDefaultFilter = false; - d->hasView = false; - d->mainWidget = new TQWidget( this, "KFileDialog::mainWidget"); - setMainWidget( d->mainWidget ); - d->okButton = new KPushButton( KStdGuiItem::ok(), d->mainWidget ); - d->okButton->setDefault( true ); - d->cancelButton = new KPushButton(KStdGuiItem::cancel(), d->mainWidget); - connect( d->okButton, TQT_SIGNAL( clicked() ), TQT_SLOT( slotOk() )); - connect( d->cancelButton, TQT_SIGNAL( clicked() ), TQT_SLOT( slotCancel() )); - d->customWidget = widget; - d->autoSelectExtCheckBox = 0; // delayed loading - d->autoSelectExtChecked = false; - d->urlBar = 0; // delayed loading - - TQtMsgHandler oldHandler = tqInstallMsgHandler( silenceQToolBar ); - toolbar = new KToolBar( d->mainWidget, "KFileDialog::toolbar", true); - toolbar->setFlat(true); - tqInstallMsgHandler( oldHandler ); - - d->pathCombo = new KURLComboBox( KURLComboBox::Directories, true, - toolbar, "path combo" ); - TQToolTip::add( d->pathCombo, i18n("Current location") ); - TQWhatsThis::add( d->pathCombo, "" + i18n("This is the currently listed location. " - "The drop-down list also lists commonly used locations. " - "This includes standard locations, such as your home folder, as well as " - "locations that have been visited recently.") + i18n (autocompletionWhatsThisText)); - - KURL u; - u.setPath( TQDir::rootDirPath() ); - TQString text = i18n("Root Folder: %1").arg( u.path() ); - d->pathCombo->addDefaultURL( u, - KMimeType::pixmapForURL( u, 0, KIcon::Small ), - text ); - - u.setPath( TQDir::homeDirPath() ); - text = i18n("Home Folder: %1").arg( u.path( +1 ) ); - d->pathCombo->addDefaultURL( u, KMimeType::pixmapForURL( u, 0, KIcon::Small ), - text ); - - KURL docPath; - docPath.setPath( TDEGlobalSettings::documentPath() ); - if ( (u.path(+1) != docPath.path(+1)) && - TQDir(docPath.path(+1)).exists() ) - { - text = i18n("Documents: %1").arg( docPath.path( +1 ) ); - d->pathCombo->addDefaultURL( docPath, - KMimeType::pixmapForURL( docPath, 0, KIcon::Small ), - text ); - } - - u.setPath( TDEGlobalSettings::desktopPath() ); - text = i18n("Desktop: %1").arg( u.path( +1 ) ); - d->pathCombo->addDefaultURL( u, - KMimeType::pixmapForURL( u, 0, KIcon::Small ), - text ); - - d->url = getStartURL( startDir, d->fileClass ); - d->selection = d->url.url(); - - // If local, check it exists. If not, go up until it exists. - if ( d->url.isLocalFile() ) - { - if ( !TQFile::exists( d->url.path() ) ) - { - d->url = d->url.upURL(); - TQDir dir( d->url.path() ); - while ( !dir.exists() ) - { - d->url = d->url.upURL(); - dir.setPath( d->url.path() ); - } - } - } - - ops = new KDirOperator(d->url, d->mainWidget, "KFileDialog::ops"); - ops->setOnlyDoubleClickSelectsFiles( true ); - connect(ops, TQT_SIGNAL(urlEntered(const KURL&)), - TQT_SLOT(urlEntered(const KURL&))); - connect(ops, TQT_SIGNAL(fileHighlighted(const KFileItem *)), - TQT_SLOT(fileHighlighted(const KFileItem *))); - connect(ops, TQT_SIGNAL(fileSelected(const KFileItem *)), - TQT_SLOT(fileSelected(const KFileItem *))); - connect(ops, TQT_SIGNAL(finishedLoading()), - TQT_SLOT(slotLoadingFinished())); - - ops->setupMenu(KDirOperator::SortActions | - KDirOperator::FileActions | - KDirOperator::ViewActions); - KActionCollection *coll = ops->actionCollection(); - - // plug nav items into the toolbar - coll->action( "up" )->plug( toolbar ); - coll->action( "up" )->setWhatsThis(i18n("Click this button to enter the parent folder.

" - "For instance, if the current location is file:/home/%1 clicking this " - "button will take you to file:/home.").arg( KUser().loginName() )); - coll->action( "back" )->plug( toolbar ); - coll->action( "back" )->setWhatsThis(i18n("Click this button to move backwards one step in the browsing history.")); - coll->action( "forward" )->plug( toolbar ); - coll->action( "forward" )->setWhatsThis(i18n("Click this button to move forward one step in the browsing history.")); - coll->action( "reload" )->plug( toolbar ); - coll->action( "reload" )->setWhatsThis(i18n("Click this button to reload the contents of the current location.")); - coll->action( "mkdir" )->setShortcut(Key_F10); - coll->action( "mkdir" )->plug( toolbar ); - coll->action( "mkdir" )->setWhatsThis(i18n("Click this button to create a new folder.")); - - KToggleAction *showSidebarAction = - new KToggleAction(i18n("Show Quick Access Navigation Panel"), Key_F9, coll,"toggleSpeedbar"); - showSidebarAction->setCheckedState(i18n("Hide Quick Access Navigation Panel")); - connect( showSidebarAction, TQT_SIGNAL( toggled( bool ) ), - TQT_SLOT( toggleSpeedbar( bool )) ); - - KToggleAction *showBookmarksAction = - new KToggleAction(i18n("Show Bookmarks"), 0, coll, "toggleBookmarks"); - showBookmarksAction->setCheckedState(i18n("Hide Bookmarks")); - connect( showBookmarksAction, TQT_SIGNAL( toggled( bool ) ), - TQT_SLOT( toggleBookmarks( bool )) ); - - KActionMenu *menu = new KActionMenu( i18n("Configure"), "configure", TQT_TQOBJECT(this), "extra menu" ); - menu->setWhatsThis(i18n("This is the configuration menu for the file dialog. " - "Various options can be accessed from this menu including:

    " - "
  • how files are sorted in the list
  • " - "
  • types of view, including icon and list
  • " - "
  • showing of hidden files
  • " - "
  • the Quick Access navigation panel
  • " - "
  • file previews
  • " - "
  • separating folders from files
")); - menu->insert( coll->action( "sorting menu" )); - menu->insert( coll->action( "separator" )); - coll->action( "short view" )->setShortcut(Key_F6); - menu->insert( coll->action( "short view" )); - coll->action( "detailed view" )->setShortcut(Key_F7); - menu->insert( coll->action( "detailed view" )); - menu->insert( coll->action( "separator" )); - coll->action( "show hidden" )->setShortcut(Key_F8); - menu->insert( coll->action( "show hidden" )); - menu->insert( showSidebarAction ); - menu->insert( showBookmarksAction ); - coll->action( "preview" )->setShortcut(Key_F11); - menu->insert( coll->action( "preview" )); - coll->action( "separate dirs" )->setShortcut(Key_F12); - menu->insert( coll->action( "separate dirs" )); - - menu->setDelayed( false ); - connect( menu->popupMenu(), TQT_SIGNAL( aboutToShow() ), - ops, TQT_SLOT( updateSelectionDependentActions() )); - menu->plug( toolbar ); - - //Insert a separator. - KToolBarSeparator* spacerWidget = new KToolBarSeparator(Qt::Horizontal, false /*no line*/, - toolbar); - d->m_pathComboIndex = toolbar->insertWidget(-1, -1, spacerWidget); - toolbar->insertWidget(PATH_COMBO, 0, d->pathCombo); - - - toolbar->setItemAutoSized (PATH_COMBO); - toolbar->setIconText(KToolBar::IconOnly); - toolbar->setBarPos(KToolBar::Top); - toolbar->setMovingEnabled(false); - toolbar->adjustSize(); - - KURLCompletion *pathCompletionObj = new KURLCompletion( KURLCompletion::DirCompletion ); - d->pathCombo->setCompletionObject( pathCompletionObj ); - d->pathCombo->setAutoDeleteCompletionObject( true ); - - connect( d->pathCombo, TQT_SIGNAL( urlActivated( const KURL& )), - this, TQT_SLOT( enterURL( const KURL& ) )); - connect( d->pathCombo, TQT_SIGNAL( returnPressed( const TQString& )), - this, TQT_SLOT( enterURL( const TQString& ) )); - - TQString whatsThisText; - - // the Location label/edit - d->locationLabel = new TQLabel(i18n("&Location:"), d->mainWidget); - locationEdit = new KURLComboBox(KURLComboBox::Files, true, - d->mainWidget, "LocationEdit"); - locationEdit->setSizePolicy(TQSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Fixed)); - connect( locationEdit, TQT_SIGNAL( textChanged( const TQString& ) ), - TQT_SLOT( slotLocationChanged( const TQString& )) ); - - updateLocationWhatsThis (); - d->locationLabel->setBuddy(locationEdit); - - locationEdit->setFocus(); - KURLCompletion *fileCompletionObj = new KURLCompletion( KURLCompletion::FileCompletion ); - TQString dir = d->url.url(+1); - pathCompletionObj->setDir( dir ); - fileCompletionObj->setDir( dir ); - locationEdit->setCompletionObject( fileCompletionObj ); - locationEdit->setAutoDeleteCompletionObject( true ); - connect( fileCompletionObj, TQT_SIGNAL( match( const TQString& ) ), - TQT_SLOT( fileCompletion( const TQString& )) ); - - connect( locationEdit, TQT_SIGNAL( returnPressed() ), - this, TQT_SLOT( slotOk())); - connect(locationEdit, TQT_SIGNAL( activated( const TQString& )), - this, TQT_SLOT( locationActivated( const TQString& ) )); - - // the Filter label/edit - whatsThisText = i18n("This is the filter to apply to the file list. " - "File names that do not match the filter will not be shown.

" - "You may select from one of the preset filters in the " - "drop down menu, or you may enter a custom filter " - "directly into the text area.

" - "Wildcards such as * and ? are allowed."); - d->filterLabel = new TQLabel(i18n("&Filter:"), d->mainWidget); - TQWhatsThis::add(d->filterLabel, whatsThisText); - filterWidget = new KFileFilterCombo(d->mainWidget, - "KFileDialog::filterwidget"); - filterWidget->setSizePolicy(TQSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Fixed)); - TQWhatsThis::add(filterWidget, whatsThisText); - setFilter(filter); - d->filterLabel->setBuddy(filterWidget); - connect(filterWidget, TQT_SIGNAL(filterChanged()), TQT_SLOT(slotFilterChanged())); - - // the Automatically Select Extension checkbox - // (the text, visibility etc. is set in updateAutoSelectExtension(), which is called by readConfig()) - d->autoSelectExtCheckBox = new TQCheckBox (d->mainWidget); - connect(d->autoSelectExtCheckBox, TQT_SIGNAL(clicked()), TQT_SLOT(slotAutoSelectExtClicked())); - - initGUI(); // activate GM - - TDEConfig* config = TDEGlobal::config(); - readRecentFiles( config ); - - adjustSize(); - - ops->setViewConfig( config, ConfigGroup ); - readConfig( config, ConfigGroup ); - setSelection(d->selection); -} - -void KFileDialog::initSpeedbar() -{ - d->urlBar = new KFileSpeedBar( d->mainWidget, "url bar" ); - connect( d->urlBar, TQT_SIGNAL( activated( const KURL& )), - TQT_SLOT( enterURL( const KURL& )) ); - - // need to set the current url of the urlbar manually (not via urlEntered() - // here, because the initial url of KDirOperator might be the same as the - // one that will be set later (and then urlEntered() won't be emitted). - // ### REMOVE THIS when KDirOperator's initial URL (in the c'tor) is gone. - d->urlBar->setCurrentItem( d->url ); - - d->urlBarLayout->insertWidget( 0, d->urlBar ); -} - -void KFileDialog::initGUI() -{ - delete d->boxLayout; // deletes all sub layouts - - d->boxLayout = new TQVBoxLayout( d->mainWidget, 0, KDialog::spacingHint()); - d->boxLayout->addWidget(toolbar, AlignTop); - - d->urlBarLayout = new TQHBoxLayout( d->boxLayout ); // needed for the urlBar that may appear - TQVBoxLayout *vbox = new TQVBoxLayout( d->urlBarLayout ); - - vbox->addWidget(ops, 4); - vbox->addSpacing(3); - - TQGridLayout* lafBox= new TQGridLayout(2, 3, KDialog::spacingHint()); - - lafBox->addWidget(d->locationLabel, 0, 0, Qt::AlignVCenter); - lafBox->addWidget(locationEdit, 0, 1, Qt::AlignVCenter); - lafBox->addWidget(d->okButton, 0, 2, Qt::AlignVCenter); - - lafBox->addWidget(d->filterLabel, 1, 0, Qt::AlignVCenter); - lafBox->addWidget(filterWidget, 1, 1, Qt::AlignVCenter); - lafBox->addWidget(d->cancelButton, 1, 2, Qt::AlignVCenter); - - lafBox->setColStretch(1, 4); - - vbox->addLayout(TQT_TQLAYOUT(lafBox), 0); - vbox->addSpacing(3); - - // add the Automatically Select Extension checkbox - vbox->addWidget (d->autoSelectExtCheckBox); - vbox->addSpacing (3); - - setTabOrder(ops, d->autoSelectExtCheckBox); - setTabOrder (d->autoSelectExtCheckBox, locationEdit); - setTabOrder(locationEdit, filterWidget); - setTabOrder(filterWidget, d->okButton); - setTabOrder(d->okButton, d->cancelButton); - setTabOrder(d->cancelButton, d->pathCombo); - setTabOrder(d->pathCombo, ops); - - // If a custom widget was specified... - if ( d->customWidget != 0 ) - { - // ...add it to the dialog, below the filter list box. - - // Change the parent so that this widget is a child of the main widget - d->customWidget->reparent( d->mainWidget, TQPoint() ); - - vbox->addWidget( d->customWidget ); - vbox->addSpacing(3); - - // FIXME: This should adjust the tab orders so that the custom widget - // comes after the Cancel button. The code appears to do this, but the result - // somehow screws up the tab order of the file path combo box. Not a major - // problem, but ideally the tab order with a custom widget should be - // the same as the order without one. - setTabOrder(d->cancelButton, d->customWidget); - setTabOrder(d->customWidget, d->pathCombo); - } - else - { - setTabOrder(d->cancelButton, d->pathCombo); - } - - setTabOrder(d->pathCombo, ops); -} - -void KFileDialog::slotFilterChanged() -{ - TQString filter = filterWidget->currentFilter(); - ops->clearFilter(); - - if ( filter.find( '/' ) > -1 ) { - TQStringList types = TQStringList::split( " ", filter ); - types.prepend( "inode/directory" ); - ops->setMimeFilter( types ); - } - else - ops->setNameFilter( filter ); - - ops->updateDir(); - - updateAutoSelectExtension (); - - emit filterChanged( filter ); -} - - -void KFileDialog::setURL(const KURL& url, bool clearforward) -{ - d->selection = TQString::null; - ops->setURL( url, clearforward); -} - -// Protected -void KFileDialog::urlEntered(const KURL& url) -{ - TQString filename = locationEdit->currentText(); - d->selection = TQString::null; - - if ( d->pathCombo->count() != 0 ) { // little hack - d->pathCombo->setURL( url ); - } - - if (url.protocol()=="beagle" && url.path()=="/") { - d->pathCombo->setEditText("beagle:/<"+i18n("search term")+">"); - d->pathCombo->lineEdit()->setSelection(8,255); - d->pathCombo->setFocus(); - } - - locationEdit->blockSignals( true ); - locationEdit->setCurrentItem( 0 ); - if ( d->keepLocation ) - locationEdit->setEditText( filename ); - - locationEdit->blockSignals( false ); - - TQString dir = url.url(+1); - static_cast( d->pathCombo->completionObject() )->setDir( dir ); - static_cast( locationEdit->completionObject() )->setDir( dir ); - - if ( d->urlBar ) - d->urlBar->setCurrentItem( url ); -} - -void KFileDialog::locationActivated( const TQString& url ) -{ - // This guard prevents any URL _typed_ by the user from being interpreted - // twice (by returnPressed/slotOk and here, activated/locationActivated) - // after the user presses Enter. Without this, _both_ setSelection and - // slotOk would "u.addPath( url )" ...so instead we leave it up to just - // slotOk.... - if (!locationEdit->lineEdit()->edited()) - setSelection( url ); -} - -void KFileDialog::enterURL( const KURL& url) -{ - setURL( url ); -} - -void KFileDialog::enterURL( const TQString& url ) -{ - setURL( KURL::fromPathOrURL( KURLCompletion::replacedPath( url, true, true )) ); -} - -void KFileDialog::toolbarCallback(int) // SLOT -{ - /* - * yes, nothing uses this anymore. - * it used to be used to show the configure dialog - */ -} - - -void KFileDialog::setSelection(const TQString& url) -{ - kdDebug(kfile_area) << "setSelection " << url << endl; - - if (url.isEmpty()) { - d->selection = TQString::null; - return; - } - - KURL u = getCompleteURL(url); - if (!u.isValid()) { // if it still is - kdWarning() << url << " is not a correct argument for setSelection!" << endl; - return; - } - - if (!KProtocolInfo::supportsListing(u)) { - locationEdit->lineEdit()->setEdited( true ); - return; - } - - /* we strip the first / from the path to avoid file://usr which means - * / on host usr - */ - KFileItem i(KFileItem::Unknown, KFileItem::Unknown, u, true ); - // KFileItem i(u.path()); - if ( i.isDir() && u.isLocalFile() && TQFile::exists( u.path() ) ) { - // trust isDir() only if the file is - // local (we cannot stat non-local urls) and if it exists! - // (as KFileItem does not check if the file exists or not - // -> the statbuffer is undefined -> isDir() is unreliable) (Simon) - setURL(u, true); - } - else { - TQString filename = u.url(); - int sep = filename.findRev('/'); - if (sep >= 0) { // there is a / in it - if ( KProtocolInfo::supportsListing( u )) { - KURL dir(u); - dir.setQuery( TQString::null ); - dir.setFileName( TQString::null ); - setURL(dir, true ); - } - - // filename must be decoded, or "name with space" would become - // "name%20with%20space", so we use KURL::fileName() - filename = u.fileName(); - kdDebug(kfile_area) << "filename " << filename << endl; - d->selection = filename; - setLocationText( filename ); - - // tell the line edit that it has been edited - // otherwise we won't know this was set by the user - // and it will be ignored if there has been an - // auto completion. this caused bugs where automcompletion - // would start, the user would pick something from the - // history and then hit Ok only to get the autocompleted - // selection. OOOPS. - locationEdit->lineEdit()->setEdited( true ); - } - - d->url = ops->url(); - d->url.addPath(filename); - } -} - -void KFileDialog::slotLoadingFinished() -{ - if ( !d->selection.isNull() ) - ops->setCurrentItem( d->selection ); -} - -// ### remove in KDE4 -void KFileDialog::pathComboChanged( const TQString& ) -{ -} -void KFileDialog::dirCompletion( const TQString& ) // SLOT -{ -} -void KFileDialog::fileCompletion( const TQString& match ) -{ - if ( match.isEmpty() && ops->view() ) - ops->view()->clearSelection(); - else - ops->setCurrentItem( match ); -} - -void KFileDialog::slotLocationChanged( const TQString& text ) -{ - if ( text.isEmpty() && ops->view() ) - ops->view()->clearSelection(); - - updateFilter(); -} - -void KFileDialog::updateStatusLine(int /* dirs */, int /* files */) -{ - kdWarning() << "KFileDialog::updateStatusLine is deprecated! The status line no longer exists. Do not try and use it!" << endl; -} - -TQString KFileDialog::getOpenFileName(const TQString& startDir, - const TQString& filter, - TQWidget *parent, const TQString& caption) -{ - KFileDialog dlg(startDir, filter, parent, "filedialog", true); - dlg.setOperationMode( Opening ); - - dlg.setMode( KFile::File | KFile::LocalOnly ); - dlg.setCaption(caption.isNull() ? i18n("Open") : caption); - - dlg.ops->clearHistory(); - dlg.exec(); - - return dlg.selectedFile(); -} - -TQString KFileDialog::getOpenFileNameWId(const TQString& startDir, - const TQString& filter, - WId parent_id, const TQString& caption) -{ - TQWidget* parent = TQT_TQWIDGET(TQWidget::find( parent_id )); - KFileDialog dlg(startDir, filter, parent, "filedialog", true); -#ifdef Q_WS_X11 - if( parent == NULL && parent_id != 0 ) - XSetTransientForHint( tqt_xdisplay(), dlg.winId(), parent_id ); -#else - // TODO -#endif - - dlg.setOperationMode( KFileDialog::Opening ); - - dlg.setMode( KFile::File | KFile::LocalOnly ); - dlg.setCaption(caption.isNull() ? i18n("Open") : caption); - - dlg.ops->clearHistory(); - dlg.exec(); - - return dlg.selectedFile(); -} - -TQStringList KFileDialog::getOpenFileNames(const TQString& startDir, - const TQString& filter, - TQWidget *parent, - const TQString& caption) -{ - KFileDialog dlg(startDir, filter, parent, "filedialog", true); - dlg.setOperationMode( Opening ); - - dlg.setCaption(caption.isNull() ? i18n("Open") : caption); - dlg.setMode(KFile::Files | KFile::LocalOnly); - dlg.ops->clearHistory(); - dlg.exec(); - - return dlg.selectedFiles(); -} - -KURL KFileDialog::getOpenURL(const TQString& startDir, const TQString& filter, - TQWidget *parent, const TQString& caption) -{ - KFileDialog dlg(startDir, filter, parent, "filedialog", true); - dlg.setOperationMode( Opening ); - - dlg.setCaption(caption.isNull() ? i18n("Open") : caption); - dlg.setMode( KFile::File ); - dlg.ops->clearHistory(); - dlg.exec(); - - return dlg.selectedURL(); -} - -KURL::List KFileDialog::getOpenURLs(const TQString& startDir, - const TQString& filter, - TQWidget *parent, - const TQString& caption) -{ - KFileDialog dlg(startDir, filter, parent, "filedialog", true); - dlg.setOperationMode( Opening ); - - dlg.setCaption(caption.isNull() ? i18n("Open") : caption); - dlg.setMode(KFile::Files); - dlg.ops->clearHistory(); - dlg.exec(); - - return dlg.selectedURLs(); -} - -KURL KFileDialog::getExistingURL(const TQString& startDir, - TQWidget *parent, - const TQString& caption) -{ - return KDirSelectDialog::selectDirectory(startDir, false, parent, caption); -} - -TQString KFileDialog::getExistingDirectory(const TQString& startDir, - TQWidget *parent, - const TQString& caption) -{ -#ifdef Q_WS_WIN - return TQFileDialog::getExistingDirectory(startDir, parent, "getExistingDirectory", - caption, true, true); -#else - KURL url = KDirSelectDialog::selectDirectory(startDir, true, parent, - caption); - if ( url.isValid() ) - return url.path(); - - return TQString::null; -#endif -} - -KURL KFileDialog::getImageOpenURL( const TQString& startDir, TQWidget *parent, - const TQString& caption) -{ - TQStringList mimetypes = KImageIO::mimeTypes( KImageIO::Reading ); - KFileDialog dlg(startDir, - mimetypes.join(" "), - parent, "filedialog", true); - dlg.setOperationMode( Opening ); - dlg.setCaption( caption.isNull() ? i18n("Open") : caption ); - dlg.setMode( KFile::File ); - - KImageFilePreview *ip = new KImageFilePreview( &dlg ); - dlg.setPreviewWidget( ip ); - dlg.exec(); - - return dlg.selectedURL(); -} - -KURL KFileDialog::selectedURL() const -{ - if ( result() == TQDialog::Accepted ) - return d->url; - else - return KURL(); -} - -KURL::List KFileDialog::selectedURLs() const -{ - KURL::List list; - if ( result() == TQDialog::Accepted ) { - if ( (ops->mode() & KFile::Files) == KFile::Files ) - list = parseSelectedURLs(); - else - list.append( d->url ); - } - return list; -} - - -KURL::List& KFileDialog::parseSelectedURLs() const -{ - if ( d->filenames.isEmpty() ) { - return d->urlList; - } - - d->urlList.clear(); - if ( d->filenames.contains( '/' )) { // assume _one_ absolute filename - static const TQString &prot = TDEGlobal::staticQString(":/"); - KURL u; - if ( d->filenames.find( prot ) != -1 ) - u = d->filenames; - else - u.setPath( d->filenames ); - - if ( u.isValid() ) - d->urlList.append( u ); - else - KMessageBox::error( d->mainWidget, - i18n("The chosen filenames do not\n" - "appear to be valid."), - i18n("Invalid Filenames") ); - } - - else - d->urlList = tokenize( d->filenames ); - - d->filenames = TQString::null; // indicate that we parsed that one - - return d->urlList; -} - - -// FIXME: current implementation drawback: a filename can't contain quotes -KURL::List KFileDialog::tokenize( const TQString& line ) const -{ - KURL::List urls; - KURL u( ops->url() ); - TQString name; - - int count = line.contains( '"' ); - if ( count == 0 ) { // no " " -> assume one single file - u.setFileName( line ); - if ( u.isValid() ) - urls.append( u ); - - return urls; - } - - if ( (count % 2) == 1 ) { // odd number of " -> error - TQWidget *that = const_cast(this); - KMessageBox::sorry(that, i18n("The requested filenames\n" - "%1\n" - "do not appear to be valid;\n" - "make sure every filename is enclosed in double quotes.").arg(line), - i18n("Filename Error")); - return urls; - } - - int start = 0; - int index1 = -1, index2 = -1; - while ( true ) { - index1 = line.find( '"', start ); - index2 = line.find( '"', index1 + 1 ); - - if ( index1 < 0 ) - break; - - // get everything between the " " - name = line.mid( index1 + 1, index2 - index1 - 1 ); - u.setFileName( name ); - if ( u.isValid() ) - urls.append( u ); - - start = index2 + 1; - } - return urls; -} - - -TQString KFileDialog::selectedFile() const -{ - if ( result() == TQDialog::Accepted ) - { - KURL url = TDEIO::NetAccess::mostLocalURL(d->url,topLevelWidget()); - if (url.isLocalFile()) - return url.path(); - else { - KMessageBox::sorry( d->mainWidget, - i18n("You can only select local files."), - i18n("Remote Files Not Accepted") ); - } - } - return TQString::null; -} - -TQStringList KFileDialog::selectedFiles() const -{ - TQStringList list; - KURL url; - - if ( result() == TQDialog::Accepted ) { - if ( (ops->mode() & KFile::Files) == KFile::Files ) { - KURL::List urls = parseSelectedURLs(); - TQValueListConstIterator it = urls.begin(); - while ( it != urls.end() ) { - url = TDEIO::NetAccess::mostLocalURL(*it,topLevelWidget()); - if ( url.isLocalFile() ) - list.append( url.path() ); - ++it; - } - } - - else { // single-selection mode - if ( d->url.isLocalFile() ) - list.append( d->url.path() ); - } - } - - return list; -} - -KURL KFileDialog::baseURL() const -{ - return ops->url(); -} - -TQString KFileDialog::getSaveFileName(const TQString& dir, const TQString& filter, - TQWidget *parent, - const TQString& caption) -{ - bool specialDir = dir.at(0) == ':'; - KFileDialog dlg( specialDir ? dir : TQString::null, filter, parent, "filedialog", true); - if ( !specialDir ) - dlg.setSelection( dir ); // may also be a filename - - dlg.setOperationMode( Saving ); - dlg.setCaption(caption.isNull() ? i18n("Save As") : caption); - - dlg.exec(); - - TQString filename = dlg.selectedFile(); - if (!filename.isEmpty()) - KRecentDocument::add(filename); - - return filename; -} - -TQString KFileDialog::getSaveFileNameWId(const TQString& dir, const TQString& filter, - WId parent_id, - const TQString& caption) -{ - bool specialDir = dir.at(0) == ':'; - TQWidget* parent = TQT_TQWIDGET(TQWidget::find( parent_id )); - KFileDialog dlg( specialDir ? dir : TQString::null, filter, parent, "filedialog", true); -#ifdef Q_WS_X11 - if( parent == NULL && parent_id != 0 ) - XSetTransientForHint(tqt_xdisplay(), dlg.winId(), parent_id); -#else - // TODO -#endif - - if ( !specialDir ) - dlg.setSelection( dir ); // may also be a filename - - dlg.setOperationMode( KFileDialog::Saving); - dlg.setCaption(caption.isNull() ? i18n("Save As") : caption); - - dlg.exec(); - - TQString filename = dlg.selectedFile(); - if (!filename.isEmpty()) - KRecentDocument::add(filename); - - return filename; -} - -KURL KFileDialog::getSaveURL(const TQString& dir, const TQString& filter, - TQWidget *parent, const TQString& caption) -{ - bool specialDir = dir.at(0) == ':'; - KFileDialog dlg(specialDir ? dir : TQString::null, filter, parent, "filedialog", true); - if ( !specialDir ) - dlg.setSelection( dir ); // may also be a filename - - dlg.setCaption(caption.isNull() ? i18n("Save As") : caption); - dlg.setOperationMode( Saving ); - - dlg.exec(); - - KURL url = dlg.selectedURL(); - if (url.isValid()) - KRecentDocument::add( url ); - - return url; -} - -void KFileDialog::show() -{ - if ( !d->hasView ) { // delayed view-creation - ops->setView(KFile::Default); - ops->clearHistory(); - d->hasView = true; - } - - KDialogBase::show(); -} - -void KFileDialog::setMode( KFile::Mode m ) -{ - ops->setMode(m); - if ( ops->dirOnlyMode() ) { - filterWidget->setDefaultFilter( i18n("*|All Folders") ); - } - else { - filterWidget->setDefaultFilter( i18n("*|All Files") ); - } - - updateAutoSelectExtension (); -} - -void KFileDialog::setMode( unsigned int m ) -{ - setMode(static_cast( m )); -} - -KFile::Mode KFileDialog::mode() const -{ - return ops->mode(); -} - - -void KFileDialog::readConfig( TDEConfig *kc, const TQString& group ) -{ - if ( !kc ) - return; - - TQString oldGroup = kc->group(); - if ( !group.isEmpty() ) - kc->setGroup( group ); - - ops->readConfig( kc, group ); - - KURLComboBox *combo = d->pathCombo; - combo->setURLs( kc->readPathListEntry( RecentURLs ), KURLComboBox::RemoveTop ); - combo->setMaxItems( kc->readNumEntry( RecentURLsNumber, - DefaultRecentURLsNumber ) ); - combo->setURL( ops->url() ); - autoDirectoryFollowing = kc->readBoolEntry( AutoDirectoryFollowing, - DefaultDirectoryFollowing ); - - TDEGlobalSettings::Completion cm = (TDEGlobalSettings::Completion) - kc->readNumEntry( PathComboCompletionMode, - TDEGlobalSettings::completionMode() ); - if ( cm != TDEGlobalSettings::completionMode() ) - combo->setCompletionMode( cm ); - - cm = (TDEGlobalSettings::Completion) - kc->readNumEntry( LocationComboCompletionMode, - TDEGlobalSettings::completionMode() ); - if ( cm != TDEGlobalSettings::completionMode() ) - locationEdit->setCompletionMode( cm ); - - // show or don't show the speedbar - toggleSpeedbar( kc->readBoolEntry(ShowSpeedbar, true) ); - - // show or don't show the bookmarks - toggleBookmarks( kc->readBoolEntry(ShowBookmarks, false) ); - - // does the user want Automatically Select Extension? - d->autoSelectExtChecked = kc->readBoolEntry (AutoSelectExtChecked, DefaultAutoSelectExtChecked); - updateAutoSelectExtension (); - - int w1 = minimumSize().width(); - int w2 = toolbar->sizeHint().width() + 10; - if (w1 < w2) - setMinimumWidth(w2); - - TQSize size = configDialogSize( group ); - resize( size ); - kc->setGroup( oldGroup ); -} - -void KFileDialog::writeConfig( TDEConfig *kc, const TQString& group ) -{ - if ( !kc ) - return; - - TQString oldGroup = kc->group(); - if ( !group.isEmpty() ) - kc->setGroup( group ); - - kc->writePathEntry( RecentURLs, d->pathCombo->urls() ); - saveDialogSize( group, true ); - kc->writeEntry( PathComboCompletionMode, static_cast(d->pathCombo->completionMode()) ); - kc->writeEntry( LocationComboCompletionMode, static_cast(locationEdit->completionMode()) ); - kc->writeEntry( ShowSpeedbar, d->urlBar && !d->urlBar->isHidden() ); - kc->writeEntry( ShowBookmarks, d->bookmarkHandler != 0 ); - kc->writeEntry( AutoSelectExtChecked, d->autoSelectExtChecked ); - - ops->writeConfig( kc, group ); - kc->setGroup( oldGroup ); -} - - -void KFileDialog::readRecentFiles( TDEConfig *kc ) -{ - TQString oldGroup = kc->group(); - kc->setGroup( ConfigGroup ); - - locationEdit->setMaxItems( kc->readNumEntry( RecentFilesNumber, - DefaultRecentURLsNumber ) ); - locationEdit->setURLs( kc->readPathListEntry( RecentFiles ), - KURLComboBox::RemoveBottom ); - locationEdit->insertItem( TQString::null, 0 ); // dummy item without pixmap - locationEdit->setCurrentItem( 0 ); - - kc->setGroup( oldGroup ); -} - -void KFileDialog::saveRecentFiles( TDEConfig *kc ) -{ - TQString oldGroup = kc->group(); - kc->setGroup( ConfigGroup ); - - kc->writePathEntry( RecentFiles, locationEdit->urls() ); - - kc->setGroup( oldGroup ); -} - -KPushButton * KFileDialog::okButton() const -{ - return d->okButton; -} - -KPushButton * KFileDialog::cancelButton() const -{ - return d->cancelButton; -} - -KURLBar * KFileDialog::speedBar() -{ - return d->urlBar; -} - -void KFileDialog::slotCancel() -{ - ops->close(); - KDialogBase::slotCancel(); - - TDEConfig *config = TDEGlobal::config(); - config->setForceGlobal( true ); - writeConfig( config, ConfigGroup ); - config->setForceGlobal( false ); -} - -void KFileDialog::setKeepLocation( bool keep ) -{ - d->keepLocation = keep; -} - -bool KFileDialog::keepsLocation() const -{ - return d->keepLocation; -} - -void KFileDialog::setOperationMode( OperationMode mode ) -{ - d->operationMode = mode; - d->keepLocation = (mode == Saving); - filterWidget->setEditable( !d->hasDefaultFilter || mode != Saving ); - if ( mode == Opening ) - d->okButton->setGuiItem( KGuiItem( i18n("&Open"), "fileopen") ); - else if ( mode == Saving ) { - d->okButton->setGuiItem( KStdGuiItem::save() ); - setNonExtSelection(); - } - else - d->okButton->setGuiItem( KStdGuiItem::ok() ); - updateLocationWhatsThis (); - updateAutoSelectExtension (); -} - -KFileDialog::OperationMode KFileDialog::operationMode() const -{ - return d->operationMode; -} - -void KFileDialog::slotAutoSelectExtClicked() -{ - kdDebug (kfile_area) << "slotAutoSelectExtClicked(): " - << d->autoSelectExtCheckBox->isChecked () << endl; - - // whether the _user_ wants it on/off - d->autoSelectExtChecked = d->autoSelectExtCheckBox->isChecked (); - - // update the current filename's extension - updateLocationEditExtension (d->extension /* extension hasn't changed */); -} - -static TQString getExtensionFromPatternList (const TQStringList &patternList) -{ - TQString ret; - kdDebug (kfile_area) << "\tgetExtension " << patternList << endl; - - TQStringList::ConstIterator patternListEnd = patternList.end (); - for (TQStringList::ConstIterator it = patternList.begin (); - it != patternListEnd; - it++) - { - kdDebug (kfile_area) << "\t\ttry: \'" << (*it) << "\'" << endl; - - // is this pattern like "*.BMP" rather than useless things like: - // - // README - // *. - // *.* - // *.JP*G - // *.JP? - if ((*it).startsWith ("*.") && - (*it).length () > 2 && - (*it).find ('*', 2) < 0 && (*it).find ('?', 2) < 0) - { - ret = (*it).mid (1); - break; - } - } - - return ret; -} - -static TQString stripUndisplayable (const TQString &string) -{ - TQString ret = string; - - ret.remove (':'); - ret.remove ('&'); - - return ret; -} - - -TQString KFileDialog::currentFilterExtension (void) -{ - return d->extension; -} - -void KFileDialog::updateAutoSelectExtension (void) -{ - if (!d->autoSelectExtCheckBox) return; - - // - // Figure out an extension for the Automatically Select Extension thing - // (some Windows users apparently don't know what to do when confronted - // with a text file called "COPYING" but do know what to do with - // COPYING.txt ...) - // - - kdDebug (kfile_area) << "Figure out an extension: " << endl; - TQString lastExtension = d->extension; - d->extension = TQString::null; - - // Automatically Select Extension is only valid if the user is _saving_ a _file_ - if ((operationMode () == Saving) && (mode () & KFile::File)) - { - // - // Get an extension from the filter - // - - TQString filter = currentFilter (); - if (!filter.isEmpty ()) - { - // e.g. "*.cpp" - if (filter.find ('/') < 0) - { - d->extension = getExtensionFromPatternList (TQStringList::split (" ", filter)).lower (); - kdDebug (kfile_area) << "\tsetFilter-style: pattern ext=\'" - << d->extension << "\'" << endl; - } - // e.g. "text/html" - else - { - KMimeType::Ptr mime = KMimeType::mimeType (filter); - - // first try X-TDE-NativeExtension - TQString nativeExtension = mime->property ("X-TDE-NativeExtension").toString (); - if (nativeExtension.at (0) == '.') - { - d->extension = nativeExtension.lower (); - kdDebug (kfile_area) << "\tsetMimeFilter-style: native ext=\'" - << d->extension << "\'" << endl; - } - - // no X-TDE-NativeExtension - if (d->extension.isEmpty ()) - { - d->extension = getExtensionFromPatternList (mime->patterns ()).lower (); - kdDebug (kfile_area) << "\tsetMimeFilter-style: pattern ext=\'" - << d->extension << "\'" << endl; - } - } - } - - - // - // GUI: checkbox - // - - TQString whatsThisExtension; - if (!d->extension.isEmpty ()) - { - // remember: sync any changes to the string with below - d->autoSelectExtCheckBox->setText (i18n ("Automatically select filename e&xtension (%1)").arg (d->extension)); - whatsThisExtension = i18n ("the extension %1").arg (d->extension); - - d->autoSelectExtCheckBox->setEnabled (true); - d->autoSelectExtCheckBox->setChecked (d->autoSelectExtChecked); - } - else - { - // remember: sync any changes to the string with above - d->autoSelectExtCheckBox->setText (i18n ("Automatically select filename e&xtension")); - whatsThisExtension = i18n ("a suitable extension"); - - d->autoSelectExtCheckBox->setChecked (false); - d->autoSelectExtCheckBox->setEnabled (false); - } - - const TQString locationLabelText = stripUndisplayable (d->locationLabel->text ()); - const TQString filterLabelText = stripUndisplayable (d->filterLabel->text ()); - TQWhatsThis::add (d->autoSelectExtCheckBox, - "" + - i18n ( - "This option enables some convenient features for " - "saving files with extensions:
" - "

    " - "
  1. Any extension specified in the %1 text " - "area will be updated if you change the file type " - "to save in.
    " - "
  2. " - "
  3. If no extension is specified in the %2 " - "text area when you click " - "Save, %3 will be added to the end of the " - "filename (if the filename does not already exist). " - "This extension is based on the file type that you " - "have chosen to save in.
    " - "
    " - "If you do not want TDE to supply an extension for the " - "filename, you can either turn this option off or you " - "can suppress it by adding a period (.) to the end of " - "the filename (the period will be automatically " - "removed)." - "
  4. " - "
" - "If unsure, keep this option enabled as it makes your " - "files more manageable." - ) - .arg (locationLabelText) - .arg (locationLabelText) - .arg (whatsThisExtension) - + "
" - ); - - d->autoSelectExtCheckBox->show (); - - - // update the current filename's extension - updateLocationEditExtension (lastExtension); - } - // Automatically Select Extension not valid - else - { - d->autoSelectExtCheckBox->setChecked (false); - d->autoSelectExtCheckBox->hide (); - } -} - -// Updates the extension of the filename specified in locationEdit if the -// Automatically Select Extension feature is enabled. -// (this prevents you from accidently saving "file.kwd" as RTF, for example) -void KFileDialog::updateLocationEditExtension (const TQString &lastExtension) -{ - if (!d->autoSelectExtCheckBox->isChecked () || d->extension.isEmpty ()) - return; - - TQString urlStr = locationEdit->currentText (); - if (urlStr.isEmpty ()) - return; - - KURL url = getCompleteURL (urlStr); - kdDebug (kfile_area) << "updateLocationEditExtension (" << url << ")" << endl; - - const int fileNameOffset = urlStr.findRev ('/') + 1; - TQString fileName = urlStr.mid (fileNameOffset); - - const int dot = fileName.findRev ('.'); - const int len = fileName.length (); - if (dot > 0 && // has an extension already and it's not a hidden file - // like ".hidden" (but we do accept ".hidden.ext") - dot != len - 1 // and not deliberately suppressing extension - ) - { - // exists? - TDEIO::UDSEntry t; - if (TDEIO::NetAccess::stat (url, t, topLevelWidget())) - { - kdDebug (kfile_area) << "\tfile exists" << endl; - - if (isDirectory (t)) - { - kdDebug (kfile_area) << "\tisDir - won't alter extension" << endl; - return; - } - - // --- fall through --- - } - - - // - // try to get rid of the current extension - // - - // catch "double extensions" like ".tar.gz" - if (lastExtension.length () && fileName.endsWith (lastExtension)) - fileName.truncate (len - lastExtension.length ()); - // can only handle "single extensions" - else - fileName.truncate (dot); - - // add extension - const TQString newText = urlStr.left (fileNameOffset) + fileName + d->extension; - if ( newText != locationEdit->currentText() ) - { - locationEdit->setCurrentText (urlStr.left (fileNameOffset) + fileName + d->extension); - locationEdit->lineEdit()->setEdited (true); - } - } -} - -// Updates the filter if the extension of the filename specified in locationEdit is changed -// (this prevents you from accidently saving "file.kwd" as RTF, for example) -void KFileDialog::updateFilter () -{ - if ((operationMode() == Saving) && (mode() & KFile::File) ) { - const TQString urlStr = locationEdit->currentText (); - if (urlStr.isEmpty ()) - return; - - KMimeType::Ptr mime = KMimeType::findByPath(urlStr, 0, true); - if (mime && mime->name() != KMimeType::defaultMimeType()) { - if (filterWidget->currentFilter() != mime->name() && - filterWidget->filters.findIndex(mime->name()) != -1) { - filterWidget->setCurrentFilter(mime->name()); - } - } - } -} - -// applies only to a file that doesn't already exist -void KFileDialog::appendExtension (KURL &url) -{ - if (!d->autoSelectExtCheckBox->isChecked () || d->extension.isEmpty ()) - return; - - TQString fileName = url.fileName (); - if (fileName.isEmpty ()) - return; - - kdDebug (kfile_area) << "appendExtension(" << url << ")" << endl; - - const int len = fileName.length (); - const int dot = fileName.findRev ('.'); - - const bool suppressExtension = (dot == len - 1); - const bool unspecifiedExtension = (dot <= 0); - - // don't TDEIO::NetAccess::Stat if unnecessary - if (!(suppressExtension || unspecifiedExtension)) - return; - - // exists? - TDEIO::UDSEntry t; - if (TDEIO::NetAccess::stat (url, t, topLevelWidget())) - { - kdDebug (kfile_area) << "\tfile exists - won't append extension" << endl; - return; - } - - // suppress automatically append extension? - if (suppressExtension) - { - // - // Strip trailing dot - // This allows lazy people to have autoSelectExtCheckBox->isChecked - // but don't want a file extension to be appended - // e.g. "README." will make a file called "README" - // - // If you really want a name like "README.", then type "README.." - // and the trailing dot will be removed (or just stop being lazy and - // turn off this feature so that you can type "README.") - // - kdDebug (kfile_area) << "\tstrip trailing dot" << endl; - url.setFileName (fileName.left (len - 1)); - } - // evilmatically append extension :) if the user hasn't specified one - else if (unspecifiedExtension) - { - kdDebug (kfile_area) << "\tappending extension \'" << d->extension << "\'..." << endl; - url.setFileName (fileName + d->extension); - kdDebug (kfile_area) << "\tsaving as \'" << url << "\'" << endl; - } -} - - -// adds the selected files/urls to 'recent documents' -void KFileDialog::addToRecentDocuments() -{ - int m = ops->mode(); - - if ( m & KFile::LocalOnly ) { - TQStringList files = selectedFiles(); - TQStringList::ConstIterator it = files.begin(); - for ( ; it != files.end(); ++it ) - KRecentDocument::add( *it ); - } - - else { // urls - KURL::List urls = selectedURLs(); - KURL::List::ConstIterator it = urls.begin(); - for ( ; it != urls.end(); ++it ) { - if ( (*it).isValid() ) - KRecentDocument::add( *it ); - } - } -} - -KActionCollection * KFileDialog::actionCollection() const -{ - return ops->actionCollection(); -} - -void KFileDialog::keyPressEvent( TQKeyEvent *e ) -{ - if ( e->key() == Key_Escape ) - { - e->accept(); - d->cancelButton->animateClick(); - } - else - KDialogBase::keyPressEvent( e ); -} - -void KFileDialog::toggleSpeedbar( bool show ) -{ - if ( show ) - { - if ( !d->urlBar ) - initSpeedbar(); - - d->urlBar->show(); - - // check to see if they have a home item defined, if not show the home button - KURLBarItem *urlItem = static_cast( d->urlBar->listBox()->firstItem() ); - KURL homeURL; - homeURL.setPath( TQDir::homeDirPath() ); - while ( urlItem ) - { - if ( homeURL.equals( urlItem->url(), true ) ) - { - ops->actionCollection()->action( "home" )->unplug( toolbar ); - break; - } - - urlItem = static_cast( urlItem->next() ); - } - } - else - { - if (d->urlBar) - d->urlBar->hide(); - - if ( !ops->actionCollection()->action( "home" )->isPlugged( toolbar ) ) - ops->actionCollection()->action( "home" )->plug( toolbar, 3 ); - } - - static_cast(actionCollection()->action("toggleSpeedbar"))->setChecked( show ); -} - -void KFileDialog::toggleBookmarks(bool show) -{ - if (show) - { - if (d->bookmarkHandler) - { - return; - } - - d->bookmarkHandler = new KFileBookmarkHandler( this ); - connect( d->bookmarkHandler, TQT_SIGNAL( openURL( const TQString& )), - TQT_SLOT( enterURL( const TQString& ))); - - toolbar->insertButton(TQString::fromLatin1("bookmark"), - (int)HOTLIST_BUTTON, true, - i18n("Bookmarks"), 5); - toolbar->getButton(HOTLIST_BUTTON)->setPopup(d->bookmarkHandler->menu(), - true); - TQWhatsThis::add(toolbar->getButton(HOTLIST_BUTTON), - i18n("This button allows you to bookmark specific locations. " - "Click on this button to open the bookmark menu where you may add, " - "edit or select a bookmark.

" - "These bookmarks are specific to the file dialog, but otherwise operate " - "like bookmarks elsewhere in TDE.")); - } - else if (d->bookmarkHandler) - { - delete d->bookmarkHandler; - d->bookmarkHandler = 0; - toolbar->removeItem(HOTLIST_BUTTON); - } - - static_cast(actionCollection()->action("toggleBookmarks"))->setChecked( show ); -} - -int KFileDialog::pathComboIndex() -{ - return d->m_pathComboIndex; -} - -// static -void KFileDialog::initStatic() -{ - if ( lastDirectory ) - return; - - lastDirectory = ldd.setObject(lastDirectory, new KURL()); -} - -// static -KURL KFileDialog::getStartURL( const TQString& startDir, - TQString& recentDirClass ) -{ - initStatic(); - - recentDirClass = TQString::null; - KURL ret; - - bool useDefaultStartDir = startDir.isEmpty(); - if ( !useDefaultStartDir ) - { - if (startDir[0] == ':') - { - recentDirClass = startDir; - ret = KURL::fromPathOrURL( KRecentDirs::dir(recentDirClass) ); - } - else - { - ret = TDECmdLineArgs::makeURL( TQFile::encodeName(startDir) ); - // If we won't be able to list it (e.g. http), then use default - if ( !KProtocolInfo::supportsListing( ret ) ) - useDefaultStartDir = true; - } - } - - if ( useDefaultStartDir ) - { - if (lastDirectory->isEmpty()) { - lastDirectory->setPath(TDEGlobalSettings::documentPath()); - KURL home; - home.setPath( TQDir::homeDirPath() ); - // if there is no docpath set (== home dir), we prefer the current - // directory over it. We also prefer the homedir when our CWD is - // different from our homedirectory or when the document dir - // does not exist - if ( lastDirectory->path(+1) == home.path(+1) || - TQDir::currentDirPath() != TQDir::homeDirPath() || - !TQDir(lastDirectory->path(+1)).exists() ) - lastDirectory->setPath(TQDir::currentDirPath()); - } - ret = *lastDirectory; - } - - return ret; -} - -void KFileDialog::setStartDir( const KURL& directory ) -{ - initStatic(); - if ( directory.isValid() ) - *lastDirectory = directory; -} - -void KFileDialog::setNonExtSelection() -{ - // Enhanced rename: Don't highlight the file extension. - TQString pattern, filename = locationEdit->currentText().stripWhiteSpace(); - KServiceTypeFactory::self()->findFromPattern( filename, &pattern ); - - if ( !pattern.isEmpty() && pattern.at( 0 ) == '*' && pattern.find( '*' , 1 ) == -1 ) - locationEdit->lineEdit()->setSelection( 0, filename.length() - pattern.stripWhiteSpace().length()+1 ); - else - { - int lastDot = filename.findRev( '.' ); - if ( lastDot > 0 ) - locationEdit->lineEdit()->setSelection( 0, lastDot ); - } -} - -void KFileDialog::virtual_hook( int id, void* data ) -{ KDialogBase::virtual_hook( id, data ); } - - -#include "kfiledialog.moc" diff --git a/kio/kfile/kfiledialog.h b/kio/kfile/kfiledialog.h deleted file mode 100644 index 2f986d351..000000000 --- a/kio/kfile/kfiledialog.h +++ /dev/null @@ -1,989 +0,0 @@ -// -*- c++ -*- -/* This file is part of the KDE libraries - Copyright (C) 1997, 1998 Richard Moore - 1998 Stephan Kulow - 1998 Daniel Grana - 2000,2001 Carsten Pfeiffer - 2001 Frerich Raabe - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef __KFILEDIALOG_H__ -#define __KFILEDIALOG_H__ - -#include - -#include -#include -#include -#include -#include - -class TQCheckBox; -class TQHBoxLayout; -class TQGridLayout; -class TQLabel; -class TQPopupMenu; -class TQVBoxLayout; - -class KActionCollection; -class KDirOperator; -class KURLBar; -class KURLComboBox; -class KFileFilterCombo; -class KFileView; -class KFileItem; -class KPushButton; -class KToolBar; -class KPreviewWidgetBase; - -struct KFileDialogPrivate; - -/** - * Provides a user (and developer) friendly way to - * select files and directories. - * - * The widget can be used as a drop in replacement for the - * TQFileDialog widget, but has greater functionality and a nicer GUI. - * - * You will usually want to use one of the static methods - * getOpenFileName(), getSaveFileName(), getOpenURL() - * or for multiple files getOpenFileNames() or getOpenURLs(). - * - * The dialog has been designed to allow applications to customise it - * by subclassing. It uses geometry management to ensure that subclasses - * can easily add children that will be incorporated into the layout. - * - * \image html kfiledialog.png "KDE File Dialog" - * - * @short A file selection dialog. - * - * @author Richard J. Moore , Carsten Pfeiffer - */ -class TDEIO_EXPORT KFileDialog : public KDialogBase -{ - Q_OBJECT - -public: - - /** - * Defines some default behavior of the filedialog. - * E.g. in mode @p Opening and @p Saving, the selected files/urls will - * be added to the "recent documents" list. The Saving mode also implies - * setKeepLocation() being set. - * - * @p Other means that no default actions are performed. - * - * @see setOperationMode - * @see operationMode - */ - enum OperationMode { Other = 0, Opening, Saving }; - - /** - * Constructs a file dialog. - * - * @param startDir This can either be - * @li The URL of the directory to start in. - * @li TQString::null to start in the current working - * directory, or the last directory where a file has been - * selected. - * @li ':<keyword>' to start in the directory last used - * by a filedialog in the same application that specified - * the same keyword. - * @li '::<keyword>' to start in the directory last used - * by a filedialog in any application that specified the - * same keyword. - * - * @param filter A shell glob or a mime-type-filter that specifies - * which files to display. - * @param parent The parent widget of this dialog - * @param name The name of this object - * @param modal Whether to create a modal dialog or not - * See setFilter() for details on how to use this argument. - * - */ - KFileDialog(const TQString& startDir, const TQString& filter, - TQWidget *parent, const char *name, - bool modal); - - /** - * Constructs a file dialog. - * - * The parameters here are identical to the first constructor except - * for the addition of a TQWidget parameter. - * - * Historical note: The original version of KFileDialog did not have this extra - * parameter. It was added later, and, in order to maintain binary compatibility, - * it was placed in a new constructor instead of added to the original one. - * - * @param startDir This can either be - * @li The URL of the directory to start in. - * @li TQString::null to start in the current working - * directory, or the last directory where a file has been - * selected. - * @li ':<keyword>' to start in the directory last used - * by a filedialog in the same application that specified - * the same keyword. - * @li '::<keyword>' to start in the directory last used - * by a filedialog in any application that specified the - * same keyword. - * - * @param filter A shell glob or a mime-type-filter that specifies - * which files to display. - * See setFilter() for details on how to use this argument. - * - * @param widget A widget, or a widget of widgets, for displaying custom - * data in the dialog. This can be used, for example, to - * display a check box with the caption "Open as read-only". - * When creating this widget, you don't need to specify a parent, - * since the widget's parent will be set automatically by KFileDialog. - * @param parent The parent widget of this dialog - * @param name The name of this object - * @param modal Whether to create a modal dialog or not - * @since 3.1 - */ - KFileDialog(const TQString& startDir, const TQString& filter, - TQWidget *parent, const char *name, - bool modal, TQWidget* widget); - - - /** - * Destructs the file dialog. - */ - ~KFileDialog(); - - /** - * @returns The selected fully qualified filename. - */ - KURL selectedURL() const; - - /** - * @returns The list of selected URLs. - */ - KURL::List selectedURLs() const; - - /** - * @returns the currently shown directory. - */ - KURL baseURL() const; - - /** - * Returns the full path of the selected file in the local filesystem. - * (Local files only) - */ - TQString selectedFile() const; - - /** - * Returns a list of all selected local files. - */ - TQStringList selectedFiles() const; - - /** - * Sets the directory to view. - * - * @param url URL to show. - * @param clearforward Indicates whether the forward queue - * should be cleared. - */ - void setURL(const KURL &url, bool clearforward = true); - - /** - * Sets the file name to preselect to @p name - * - * This takes absolute URLs and relative file names. - */ - void setSelection(const TQString& name); - - /** - * Sets the operational mode of the filedialog to @p Saving, @p Opening - * or @p Other. This will set some flags that are specific to loading - * or saving files. E.g. setKeepLocation() makes mostly sense for - * a save-as dialog. So setOperationMode( KFileDialog::Saving ); sets - * setKeepLocation for example. - * - * The mode @p Saving, together with a default filter set via - * setMimeFilter() will make the filter combobox read-only. - * - * The default mode is @p Opening. - * - * Call this method right after instantiating KFileDialog. - * - * @see operationMode - * @see KFileDialog::OperationMode - */ - void setOperationMode( KFileDialog::OperationMode ); - - /** - * @returns the current operation mode, Opening, Saving or Other. Default - * is Other. - * - * @see operationMode - * @see KFileDialog::OperationMode - */ - OperationMode operationMode() const; - - /** - * Sets whether the filename/url should be kept when changing directories. - * This is for example useful when having a predefined filename where - * the full path for that file is searched. - * - * This is implicitly set when operationMode() is KFileDialog::Saving - * - * getSaveFileName() and getSaveURL() set this to true by default, so that - * you can type in the filename and change the directory without having - * to type the name again. - */ - void setKeepLocation( bool keep ); - - /** - * @returns whether the contents of the location edit are kept when - * changing directories. - */ - bool keepsLocation() const; - - /** - * Sets the filter to be used to @p filter. - * - * You can set more - * filters for the user to select separated by '\n'. Every - * filter entry is defined through namefilter|text to diplay. - * If no | is found in the expression, just the namefilter is - * shown. Examples: - * - * \code - * kfile->setFilter("*.cpp|C++ Source Files\n*.h|Header files"); - * kfile->setFilter("*.cpp"); - * kfile->setFilter("*.cpp|Sources (*.cpp)"); - * kfile->setFilter("*.cpp|" + i18n("Sources (*.cpp)")); - * kfile->setFilter("*.cpp *.cc *.C|C++ Source Files\n*.h *.H|Header files"); - * \endcode - * - * Note: The text to display is not parsed in any way. So, if you - * want to show the suffix to select by a specific filter, you must - * repeat it. - * - * If the filter contains an unescaped '/', a mimetype-filter is assumed. - * If you would like a '/' visible in your filter it can be escaped with - * a '\'. You can specify multiple mimetypes like this (separated with - * space): - * - * \code - * kfile->setFilter( "image/png text/html text/plain" ); - * kfile->setFilter( "*.cue|CUE\\/BIN Files (*.cue)" ); - * \endcode - * - * @see filterChanged - * @see setMimeFilter - */ - void setFilter(const TQString& filter); - - /** - * Returns the current filter as entered by the user or one of the - * predefined set via setFilter(). - * - * @see setFilter() - * @see filterChanged() - */ - TQString currentFilter() const; - - /** - * Sets the filter up to specify the output type. - * - * @param label the label to use instead of "Filter:" - * @param types a list of mimetypes that can be used as output format - * @param defaultType the default mimetype to use as output format. - * - * Do not use in conjunction with setFilter() - * @deprecated - */ - void setFilterMimeType(const TQString &label, const KMimeType::List &types, const KMimeType::Ptr &defaultType) KDE_DEPRECATED; - - /** - * Returns the mimetype for the desired output format. - * - * This is only valid if setFilterMimeType() has been called - * previously. - * - * @see setFilterMimeType() - */ - KMimeType::Ptr currentFilterMimeType(); - - /** - * Sets the filter up to specify the output type. - * - * @param types a list of mimetypes that can be used as output format - * @param defaultType the default mimetype to use as output format, if any. - * If @p defaultType is set, it will be set as the current item. - * Otherwise, a first item showing all the mimetypes will be created. - * Typically, @p defaultType should be empty for loading and set for saving. - * - * Do not use in conjunction with setFilter() - */ - void setMimeFilter( const TQStringList& types, - const TQString& defaultType = TQString::null ); - - /** - * The mimetype for the desired output format. - * - * This is only valid if setMimeFilter() has been called - * previously. - * - * @see setMimeFilter() - */ - TQString currentMimeFilter() const; - - /** - * Clears any mime- or namefilter. Does not reload the directory. - */ - void clearFilter(); - - /** - * @deprecated - * Add a preview widget and enter the preview mode. - * - * In this mode - * the dialog is split and the right part contains your widget. - * This widget has to inherit TQWidget and it has to implement - * a slot showPreview(const KURL &); which is called - * every time the file changes. You may want to look at - * koffice/lib/kofficecore/koFilterManager.cc for some hints :) - * - * Ownership is transferred to KFileDialog. You need to create the - * preview-widget with "new", i.e. on the heap. - */ - void setPreviewWidget(const TQWidget *w) KDE_DEPRECATED; - - /** - * Adds a preview widget and enters the preview mode. - * - * In this mode the dialog is split and the right part contains your - * preview widget. - * - * Ownership is transferred to KFileDialog. You need to create the - * preview-widget with "new", i.e. on the heap. - * - * @param w The widget to be used for the preview. - */ - void setPreviewWidget(const KPreviewWidgetBase *w); - - /** - * Creates a modal file dialog and return the selected - * filename or an empty string if none was chosen. - * - * Note that with - * this method the user must select an existing filename. - * - * @param startDir This can either be - * @li The URL of the directory to start in. - * @li TQString::null to start in the current working - * directory, or the last directory where a file has been - * selected. - * @li ':<keyword>' to start in the directory last used - * by a filedialog in the same application that specified - * the same keyword. - * @li '::<keyword>' to start in the directory last used - * by a filedialog in any application that specified the - * same keyword. - * @param filter This is a space separated list of shell globs. - * You can set the text to be displayed for the glob, and - * provide multiple globs. See setFilter() for details on - * how to do this... - * @param parent The widget the dialog will be centered on initially. - * @param caption The name of the dialog widget. - */ - static TQString getOpenFileName(const TQString& startDir= TQString::null, - const TQString& filter= TQString::null, - TQWidget *parent= 0, - const TQString& caption = TQString::null); - - - /** - * Use this version only if you have no TQWidget available as - * parent widget. This can be the case if the parent widget is - * a widget in another process or if the parent widget is a - * non-Qt widget. For example, in a GTK program. - * - * @since 3.4 - */ - static TQString getOpenFileNameWId(const TQString& startDir, - const TQString& filter, - WId parent_id, const TQString& caption); - - /** - * Creates a modal file dialog and returns the selected - * filenames or an empty list if none was chosen. - * - * Note that with - * this method the user must select an existing filename. - * - * @param startDir This can either be - * @li The URL of the directory to start in. - * @li TQString::null to start in the current working - * directory, or the last directory where a file has been - * selected. - * @li ':<keyword>' to start in the directory last used - * by a filedialog in the same application that specified - * the same keyword. - * @li '::<keyword>' to start in the directory last used - * by a filedialog in any application that specified the - * same keyword. - * @param filter This is a space separated list of shell globs. - * You can set the text to be displayed for the glob, and - * provide multiple globs. See setFilter() for details on - * how to do this... - * @param parent The widget the dialog will be centered on initially. - * @param caption The name of the dialog widget. - */ - static TQStringList getOpenFileNames(const TQString& startDir= TQString::null, - const TQString& filter= TQString::null, - TQWidget *parent = 0, - const TQString& caption= TQString::null); - - - - /** - * Creates a modal file dialog and returns the selected - * URL or an empty string if none was chosen. - * - * Note that with - * this method the user must select an existing URL. - * - * @param startDir This can either be - * @li The URL of the directory to start in. - * @li TQString::null to start in the current working - * directory, or the last directory where a file has been - * selected. - * @li ':<keyword>' to start in the directory last used - * by a filedialog in the same application that specified - * the same keyword. - * @li '::<keyword>' to start in the directory last used - * by a filedialog in any application that specified the - * same keyword. - * @param filter This is a space separated list of shell globs. - * You can set the text to be displayed for the glob, and - * provide multiple globs. See setFilter() for details on - * how to do this... - * @param parent The widget the dialog will be centered on initially. - * @param caption The name of the dialog widget. - */ - static KURL getOpenURL(const TQString& startDir = TQString::null, - const TQString& filter= TQString::null, - TQWidget *parent= 0, - const TQString& caption = TQString::null); - - - - /** - * Creates a modal file dialog and returns the selected - * URLs or an empty list if none was chosen. - * - * Note that with - * this method the user must select an existing filename. - * - * @param startDir This can either be - * @li The URL of the directory to start in. - * @li TQString::null to start in the current working - * directory, or the last directory where a file has been - * selected. - * @li ':<keyword>' to start in the directory last used - * by a filedialog in the same application that specified - * the same keyword. - * @li '::<keyword>' to start in the directory last used - * by a filedialog in any application that specified the - * same keyword. - * @param filter This is a space separated list of shell globs. - * You can set the text to be displayed for the glob, and - * provide multiple globs. See setFilter() for details on - * how to do this... - * @param parent The widget the dialog will be centered on initially. - * @param caption The name of the dialog widget. - */ - static KURL::List getOpenURLs(const TQString& startDir= TQString::null, - const TQString& filter= TQString::null, - TQWidget *parent = 0, - const TQString& caption= TQString::null); - - - - /** - * Creates a modal file dialog and returns the selected - * filename or an empty string if none was chosen. - * - * Note that with this - * method the user need not select an existing filename. - * - * @param startDir This can either be - * @li The URL of the directory to start in. - * @li a relative path or a filename determining the - * directory to start in and the file to be selected. - * @li TQString::null to start in the current working - * directory, or the last directory where a file has been - * selected. - * @li ':<keyword>' to start in the directory last used - * by a filedialog in the same application that specified - * the same keyword. - * @li '::<keyword>' to start in the directory last used - * by a filedialog in any application that specified the - * same keyword. - * @param filter This is a space separated list of shell globs. - * You can set the text to be displayed for the glob, and - * provide multiple globs. See setFilter() for details on - * how to do this... - * @param parent The widget the dialog will be centered on initially. - * @param caption The name of the dialog widget. - */ - static TQString getSaveFileName(const TQString& startDir= TQString::null, - const TQString& filter= TQString::null, - TQWidget *parent= 0, - const TQString& caption = TQString::null); - - - /** - * This function accepts the window id of the parent window, instead - * of TQWidget*. It should be used only when necessary. - * @since 3.4 - */ - static TQString getSaveFileNameWId(const TQString& dir, const TQString& filter, - WId parent_id, - const TQString& caption); - - /** - * Creates a modal file dialog and returns the selected - * filename or an empty string if none was chosen. - * - * Note that with this - * method the user need not select an existing filename. - * - * @param startDir This can either be - * @li The URL of the directory to start in. - * @li a relative path or a filename determining the - * directory to start in and the file to be selected. - * @li TQString::null to start in the current working - * directory, or the last directory where a file has been - * selected. - * @li ':<keyword>' to start in the directory last used - * by a filedialog in the same application that specified - * the same keyword. - * @li '::<keyword>' to start in the directory last used - * by a filedialog in any application that specified the - * same keyword. - * @param filter This is a space separated list of shell globs. - * You can set the text to be displayed for the glob, and - * provide multiple globs. See setFilter() for details on - * how to do this... - * @param parent The widget the dialog will be centered on initially. - * @param caption The name of the dialog widget. - */ - static KURL getSaveURL(const TQString& startDir= TQString::null, - const TQString& filter= TQString::null, - TQWidget *parent= 0, - const TQString& caption = TQString::null); - - - /** - * Creates a modal file dialog and returns the selected - * directory or an empty string if none was chosen. - * - * @param startDir This can either be - * @li The URL of the directory to start in. - * @li TQString::null to start in the current working - * directory, or the last directory where a file has been - * selected. - * @li ':<keyword>' to start in the directory last used - * by a filedialog in the same application that specified - * the same keyword. - * @li '::<keyword>' to start in the directory last used - * by a filedialog in any application that specified the - * same keyword. - * @param parent The widget the dialog will be centered on initially. - * @param caption The name of the dialog widget. - */ - static TQString getExistingDirectory(const TQString & startDir = TQString::null, - TQWidget * parent = 0, - const TQString& caption= TQString::null); - - /** - * Creates a modal file dialog and returns the selected - * directory or an empty string if none was chosen. - * - * Contrary to getExistingDirectory(), this method allows the - * selection of a remote directory. - * - * @param startDir This can either be - * @li The URL of the directory to start in. - * @li TQString::null to start in the current working - * directory, or the last directory where a file has been - * selected. - * @li ':<keyword>' to start in the directory last used - * by a filedialog in the same application that specified - * the same keyword. - * @li '::<keyword>' to start in the directory last used - * by a filedialog in any application that specified the - * same keyword. - * @param parent The widget the dialog will be centered on initially. - * @param caption The name of the dialog widget. - * @since 3.1 - */ - static KURL getExistingURL(const TQString & startDir = TQString::null, - TQWidget * parent = 0, - const TQString& caption= TQString::null); - /** - * Creates a modal file dialog with an image previewer and returns the - * selected url or an empty string if none was chosen. - * - * @param startDir This can either be - * @li The URL of the directory to start in. - * @li TQString::null to start in the current working - * directory, or the last directory where a file has been - * selected. - * @li ':<keyword>' to start in the directory last used - * by a filedialog in the same application that specified - * the same keyword. - * @li '::<keyword>' to start in the directory last used - * by a filedialog in any application that specified the - * same keyword. - * @param parent The widget the dialog will be centered on initially. - * @param caption The name of the dialog widget. - */ - static KURL getImageOpenURL( const TQString& startDir = TQString::null, - TQWidget *parent = 0, - const TQString& caption = TQString::null ); - virtual void show(); - - /** - * Convenient overload of the other setMode(unsigned int) method. - */ - void setMode( KFile::Mode m ); - - /** - * Sets the mode of the dialog. - * - * The mode is defined as (in kfile.h): - * \code - * enum Mode { - * File = 1, - * Directory = 2, - * Files = 4, - * ExistingOnly = 8, - * LocalOnly = 16 - * }; - * \endcode - * You can OR the values, e.g. - * \code - * KFile::Mode mode = static_cast( KFile::Files | - * KFile::ExistingOnly | - * KFile::LocalOnly ); - * setMode( mode ); - * \endcode - */ - void setMode( unsigned int m ); - - /** - * Returns the mode of the filedialog. - * @see setMode() - */ - KFile::Mode mode() const; - - /** - * Sets the text to be displayed in front of the selection. - * - * The default is "Location". - * Most useful if you want to make clear what - * the location is used for. - */ - void setLocationLabel(const TQString& text); - - /** - * Returns a pointer to the toolbar. - * - * You can use this to insert custom - * items into it, e.g.: - * \code - * yourAction = new KAction( i18n("Your Action"), 0, - * this, TQT_SLOT( yourSlot() ), - * this, "action name" ); - * yourAction->plug( kfileDialog->toolBar() ); - * \endcode - */ - KToolBar *toolBar() const { return toolbar; } - - /** - * @returns a pointer to the OK-Button in the filedialog. You may use it - * e.g. to set a custom text to it. - */ - KPushButton *okButton() const; - - /** - * @returns a pointer to the Cancel-Button in the filedialog. You may use - * it e.g. to set a custom text to it. - */ - KPushButton *cancelButton() const; - - /** - * @returns the KURLBar object used as the "speed bar". You can add custom - * entries to it like that: - * \code - * KURLBar *urlBar = fileDialog->speedBar(); - * if ( urlBar ) - * urlBar->insertDynamicItem( someURL, i18n("The URL's description") ); - * \endcode - * - * Note that this method may return a null-pointer if the user configured - * to not use the speed-bar. - * @see KURLBar - * @see KURLBar::insertDynamicItem - * @since 3.2 - */ - KURLBar *speedBar(); - - /** - * @returns a pointer to the action collection, holding all the used - * KActions. - */ - KActionCollection *actionCollection() const; - - /** - * @returns the index of the path combobox so when inserting widgets into - * the dialog (e.g. subclasses) they can do so without hardcoding in an index - */ - int pathComboIndex(); - - /** - * This method implements the logic to determine the user's default directory - * to be listed. E.g. the documents direcory, home directory or a recently - * used directory. - * @param startDir A url/directory, to be used. May use the ':' and '::' syntax - * as documented in the KFileDialog() constructor. - * @param recentDirClass If the ':' or '::' syntax is used, recentDirClass - * will contain the string to be used later for KRecentDir::dir() - * @return The URL that should be listed by default (e.g. by KFileDialog or - * KDirSelectDialog). - * @since 3.1 - */ - static KURL getStartURL( const TQString& startDir, TQString& recentDirClass ); - - /** - * @internal - * Used by KDirSelectDialog to share the dialog's start directory. - */ - static void setStartDir( const KURL& directory ); - -signals: - /** - * Emitted when the user selects a file. It is only emitted in single- - * selection mode. The best way to get notified about selected file(s) - * is to connect to the okClicked() signal inherited from KDialogBase - * and call selectedFile(), selectedFiles(), - * selectedURL() or selectedURLs(). - */ - void fileSelected(const TQString&); - - /** - * Emitted when the user highlights a file. - */ - void fileHighlighted(const TQString&); - - /** - * Emitted when the user hilights one or more files in multiselection mode. - * - * Note: fileHighlighted() or fileSelected() are @em not - * emitted in multiselection mode. You may use selectedItems() to - * ask for the current highlighted items. - * @see fileSelected - */ - void selectionChanged(); - - /** - * Emitted when the filter changed, i.e. the user entered an own filter - * or chose one of the predefined set via setFilter(). - * - * @param filter contains the new filter (only the extension part, - * not the explanation), i.e. "*.cpp" or "*.cpp *.cc". - * - * @see setFilter() - * @see currentFilter() - */ - void filterChanged( const TQString& filter ); - -protected: - KToolBar *toolbar; - - static KURL *lastDirectory; - - KURLComboBox *locationEdit; - - KFileFilterCombo *filterWidget; - - /** - * Reimplemented to animate the cancel button. - */ - virtual void keyPressEvent( TQKeyEvent *e ); - - /** - * Perform basic initialization tasks. Called by constructors. - * @since 3.1 - */ - void init(const TQString& startDir, const TQString& filter, TQWidget* widget); - - /** - * rebuild geometry management. - * - */ - virtual void initGUI(); - - /** - * called when an item is highlighted/selected in multiselection mode. - * handles setting the locationEdit. - */ - void multiSelectionChanged(); - - /** - * Reads configuration and applies it (size, recent directories, ...) - */ - virtual void readConfig( TDEConfig *, const TQString& group = TQString::null ); - - /** - * Saves the current configuration - */ - virtual void writeConfig( TDEConfig *, const TQString& group = TQString::null ); - - /** - * Reads the recent used files and inserts them into the location combobox - */ - virtual void readRecentFiles( TDEConfig * ); - - /** - * Saves the entries from the location combobox. - */ - virtual void saveRecentFiles( TDEConfig * ); - - /** - * Parses the string "line" for files. If line doesn't contain any ", the - * whole line will be interpreted as one file. If the number of " is odd, - * an empty list will be returned. Otherwise, all items enclosed in " " - * will be returned as correct urls. - */ - KURL::List tokenize(const TQString& line) const; - - /** - * Returns the absolute version of the URL specified in locationEdit. - * @since 3.2 - */ - KURL getCompleteURL(const TQString&); - - /** - * Returns the filename extension associated with the currentFilter(). - * TQString::null is returned if an extension is not available or if - * operationMode() != Saving. - * @since 3.2 - */ - TQString currentFilterExtension(); - - /** - * Updates the currentFilterExtension and the availability of the - * Automatically Select Extension Checkbox (visible if operationMode() - * == Saving and enabled if an extension _will_ be associated with the - * currentFilter(), _after_ this call). You should call this after - * filterWidget->setCurrentItem(). - * @since 3.2 - */ - void updateAutoSelectExtension(); - - -protected slots: - void urlEntered( const KURL& ); - void enterURL( const KURL& url ); - void enterURL( const TQString& url ); - void locationActivated( const TQString& url ); - - /** - * @deprecated, - */ - // ### remove in KDE4 - void toolbarCallback(int); - /** - * @deprecated - */ - // ### remove in KDE4 - void pathComboChanged( const TQString& ); - /** - * @deprecated - */ - // ### remove in KDE4 - void dirCompletion( const TQString& ); - - void slotFilterChanged(); - void fileHighlighted(const KFileItem *i); - void fileSelected(const KFileItem *i); - void slotStatResult(TDEIO::Job* job); - void slotLoadingFinished(); - - void fileCompletion( const TQString& ); - /** - * @since 3.1 - */ - void toggleSpeedbar( bool ); - - /** - * @since 3.4 - */ - void toggleBookmarks(bool show); - - /** - * @deprecated - */ - virtual void updateStatusLine(int dirs, int files); - - virtual void slotOk(); - virtual void accept(); - virtual void slotCancel(); - - void slotAutoSelectExtClicked(); - void addToRecentDocuments(); - void initSpeedbar(); - -private slots: - void slotLocationChanged( const TQString& text ); - -private: - KFileDialog(const KFileDialog&); - KFileDialog operator=(const KFileDialog&); - - void setLocationText( const TQString& text ); - void updateLocationWhatsThis(); - - void appendExtension(KURL &url); - void updateLocationEditExtension(const TQString &); - void updateFilter(); - - static void initStatic(); - - void setNonExtSelection(); - -protected: - KDirOperator *ops; - bool autoDirectoryFollowing; - - KURL::List& parseSelectedURLs() const; - -protected: - virtual void virtual_hook( int id, void* data ); -private: - KFileDialogPrivate *d; -}; - -#endif diff --git a/kio/kfile/kfilefiltercombo.cpp b/kio/kfile/kfilefiltercombo.cpp deleted file mode 100644 index 12a51db8e..000000000 --- a/kio/kfile/kfilefiltercombo.cpp +++ /dev/null @@ -1,203 +0,0 @@ -/* This file is part of the KDE libraries - Copyright (C) Stephan Kulow - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include -#include -#include -#include - -#include "kfilefiltercombo.h" - -class KFileFilterCombo::KFileFilterComboPrivate -{ -public: - KFileFilterComboPrivate() { - hasAllSupportedFiles = false; - defaultFilter = i18n("*|All Files"); - isMimeFilter = false; - } - - // when we have more than 3 mimefilters and no default-filter, - // we don't show the comments of all mimefilters in one line, - // instead we show "All supported files". We have to translate - // that back to the list of mimefilters in currentFilter() tho. - bool hasAllSupportedFiles; - // true when setMimeFilter was called - bool isMimeFilter; - TQString lastFilter; - TQString defaultFilter; -}; - -KFileFilterCombo::KFileFilterCombo( TQWidget *parent, const char *name) - : KComboBox(true, parent, name), d( new KFileFilterComboPrivate ) -{ - setTrapReturnKey( true ); - setInsertionPolicy(NoInsertion); - connect( this, TQT_SIGNAL( activated( int )), this, TQT_SIGNAL( filterChanged() )); - connect( this, TQT_SIGNAL( returnPressed() ), this, TQT_SIGNAL( filterChanged() )); - connect( this, TQT_SIGNAL( filterChanged() ), TQT_SLOT( slotFilterChanged() )); - m_allTypes = false; -} - -KFileFilterCombo::~KFileFilterCombo() -{ - delete d; -} - -void KFileFilterCombo::setFilter(const TQString& filter) -{ - clear(); - filters.clear(); - d->hasAllSupportedFiles = false; - - if (!filter.isEmpty()) { - TQString tmp = filter; - int index = tmp.find('\n'); - while (index > 0) { - filters.append(tmp.left(index)); - tmp = tmp.mid(index + 1); - index = tmp.find('\n'); - } - filters.append(tmp); - } - else - filters.append( d->defaultFilter ); - - TQStringList::ConstIterator it; - TQStringList::ConstIterator end(filters.end()); - for (it = filters.begin(); it != end; ++it) { - int tab = (*it).find('|'); - insertItem((tab < 0) ? *it : - (*it).mid(tab + 1)); - } - - d->lastFilter = currentText(); - d->isMimeFilter = false; -} - -TQString KFileFilterCombo::currentFilter() const -{ - TQString f = currentText(); - if (f == text(currentItem())) { // user didn't edit the text - f = *filters.at(currentItem()); - if ( d->isMimeFilter || (currentItem() == 0 && d->hasAllSupportedFiles) ) { - return f; // we have a mimetype as filter - } - } - - int tab = f.find('|'); - if (tab < 0) - return f; - else - return f.left(tab); -} - -void KFileFilterCombo::setCurrentFilter( const TQString& filter ) -{ - int pos = 0; - for( TQStringList::ConstIterator it = filters.begin(); - it != filters.end(); - ++it, ++pos ) { - if( *it == filter ) { - setCurrentItem( pos ); - filterChanged(); - return; - } - } - setCurrentText( filter ); - filterChanged(); -} - -void KFileFilterCombo::setMimeFilter( const TQStringList& types, - const TQString& defaultType ) -{ - clear(); - filters.clear(); - TQString delim = TQString::fromLatin1(", "); - d->hasAllSupportedFiles = false; - - m_allTypes = defaultType.isEmpty() && (types.count() > 1); - - TQString allComments, allTypes; - int i = 0; - for(TQStringList::ConstIterator it = types.begin(); it != types.end(); ++it, ++i) - { - if ( m_allTypes && it != types.begin() ) { - allComments += delim; - allTypes += ' '; - } - - kdDebug(kfile_area) << *it << endl; - KMimeType::Ptr type = KMimeType::mimeType( *it ); - filters.append( type->name() ); - if ( m_allTypes ) - { - allTypes += type->name(); - allComments += type->comment(); - } - insertItem( type->comment() ); - if ( type->name() == defaultType ) - setCurrentItem( i ); - } - - if ( m_allTypes ) - { - if ( i < 3 ) // show the mime-comments of at max 3 types - insertItem( allComments, 0 ); - else { - insertItem( i18n("All Supported Files"), 0 ); - d->hasAllSupportedFiles = true; - } - - filters.prepend( allTypes ); - } - - d->lastFilter = currentText(); - d->isMimeFilter = true; -} - -void KFileFilterCombo::slotFilterChanged() -{ - d->lastFilter = currentText(); -} - -bool KFileFilterCombo::eventFilter( TQObject *o, TQEvent *e ) -{ - if ( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(lineEdit()) && e->type() == TQEvent::FocusOut ) { - if ( currentText() != d->lastFilter ) - emit filterChanged(); - } - - return KComboBox::eventFilter( o, e ); -} - -void KFileFilterCombo::setDefaultFilter( const TQString& filter ) -{ - d->defaultFilter = filter; -} - -TQString KFileFilterCombo::defaultFilter() const -{ - return d->defaultFilter; -} - -void KFileFilterCombo::virtual_hook( int id, void* data ) -{ KComboBox::virtual_hook( id, data ); } - -#include "kfilefiltercombo.moc" diff --git a/kio/kfile/kfilefiltercombo.h b/kio/kfile/kfilefiltercombo.h deleted file mode 100644 index 589376d0c..000000000 --- a/kio/kfile/kfilefiltercombo.h +++ /dev/null @@ -1,104 +0,0 @@ -/* This file is part of the KDE libraries - Copyright (C) Stephan Kulow - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef KFILEFILTERCOMBO_H -#define KFILEFILTERCOMBO_H - -#include -#include - -#include -#include - -class KFileFilterComboPrivate; - -class TDEIO_EXPORT KFileFilterCombo : public KComboBox -{ - Q_OBJECT - - public: - KFileFilterCombo(TQWidget *parent= 0, const char *name= 0); - ~KFileFilterCombo(); - - void setFilter(const TQString& filter); - - /** - * @returns the current filter, either something like "*.cpp *.h" - * or the current mimetype, like "text/html", or a list of those, like - " "text/html text/plain image/png", all separated with one space. - */ - TQString currentFilter() const; - - /** - * Sets the current filter. Filter must match one of the filter items - * passed before to this widget. - * @since 3.4 - */ - void setCurrentFilter( const TQString& filter ); - - /** - * Sets a list of mimetypes. - * If @p defaultType is set, it will be set as the current item. - * Otherwise, a first item showing all the mimetypes will be created. - */ - void setMimeFilter( const TQStringList& types, const TQString& defaultType ); - - /** - * @return true if the filter's first item is the list of all mimetypes - */ - bool showsAllTypes() const { return m_allTypes; } - - /** - * This method allows you to set a default-filter, that is used when an - * empty filter is set. Make sure you call this before calling - * setFilter(). - * - * By default, this is set to i18n("*|All Files") - * @see defaultFilter - */ - void setDefaultFilter( const TQString& filter ); - - /** - * @return the default filter, used when an empty filter is set. - * @see setDefaultFilter - */ - TQString defaultFilter() const; - - protected: - virtual bool eventFilter( TQObject *o, TQEvent *e ); - -// KDE4: those variables are private. filters() was added - TQStringList filters; - bool m_allTypes; - - signals: - void filterChanged(); - -private slots: - void slotFilterChanged(); - -protected: - virtual void virtual_hook( int id, void* data ); -private: - friend class KFileDialog; // gone in KDE4 - class KFileFilterComboPrivate; - KFileFilterComboPrivate *d; -}; - -#endif diff --git a/kio/kfile/kfileiconview.cpp b/kio/kfile/kfileiconview.cpp deleted file mode 100644 index f0ef11bfe..000000000 --- a/kio/kfile/kfileiconview.cpp +++ /dev/null @@ -1,943 +0,0 @@ -// -*- c++ -*- -/* This file is part of the KDE libraries - Copyright (C) 1997 Stephan Kulow - 2000,2001,2002 Carsten Pfeiffer - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -#include "kfileiconview.h" -#include "config-kfile.h" - -#define DEFAULT_PREVIEW_SIZE 60 -#define DEFAULT_SHOW_PREVIEWS false -#define DEFAULT_VIEW_MODE "SmallColumns" - -KFileIconViewItem::~KFileIconViewItem() -{ - fileInfo()->removeExtraData( iconView() ); -} - -class KFileIconView::KFileIconViewPrivate -{ -public: - KFileIconViewPrivate( KFileIconView *parent ) { - previewIconSize = 60; - job = 0; - dropItem = 0; - - noArrangement = false; - ignoreMaximumSize = false; - smallColumns = new KRadioAction( i18n("Small Icons"), 0, TQT_TQOBJECT(parent), - TQT_SLOT( slotSmallColumns() ), - parent->actionCollection(), - "small columns" ); - - largeRows = new KRadioAction( i18n("Large Icons"), 0, TQT_TQOBJECT(parent), - TQT_SLOT( slotLargeRows() ), - parent->actionCollection(), - "large rows" ); - - smallColumns->setExclusiveGroup(TQString::fromLatin1("IconView mode")); - largeRows->setExclusiveGroup(TQString::fromLatin1("IconView mode")); - - previews = new KToggleAction( i18n("Thumbnail Previews"), 0, - parent->actionCollection(), - "show previews" ); - zoomIn = KStdAction::zoomIn( TQT_TQOBJECT(parent), TQT_SLOT( zoomIn() ), - parent->actionCollection(), "zoomIn" ); - zoomOut = KStdAction::zoomOut( TQT_TQOBJECT(parent), TQT_SLOT( zoomOut() ), - parent->actionCollection(), "zoomOut" ); - - previews->setGroup("previews"); - zoomIn->setGroup("previews"); - zoomOut->setGroup("previews"); - - connect( previews, TQT_SIGNAL( toggled( bool )), - parent, TQT_SLOT( slotPreviewsToggled( bool ))); - - connect( &previewTimer, TQT_SIGNAL( timeout() ), - parent, TQT_SLOT( showPreviews() )); - connect( &autoOpenTimer, TQT_SIGNAL( timeout() ), - parent, TQT_SLOT( slotAutoOpen() )); - } - - ~KFileIconViewPrivate() { - if ( job ) - job->kill(); - } - - KRadioAction *smallColumns, *largeRows; - KAction *zoomIn, *zoomOut; - KToggleAction *previews; - TDEIO::PreviewJob *job; - KFileIconViewItem *dropItem; - TQTimer previewTimer; - TQTimer autoOpenTimer; - TQStringList previewMimeTypes; - int previewIconSize; - bool noArrangement :1; - bool ignoreMaximumSize :1; -}; - -KFileIconView::KFileIconView(TQWidget *parent, const char *name) - : KIconView(parent, name), KFileView() -{ - d = new KFileIconViewPrivate( this ); - - setViewName( i18n("Icon View") ); - - toolTip = 0; - setResizeMode( Adjust ); - setMaxItemWidth( 300 ); - setWordWrapIconText( false ); - setArrangement( TopToBottom ); - setAutoArrange( true ); - setItemsMovable( false ); - setMode( KIconView::Select ); - KIconView::setSorting( true ); - // as long as TQIconView only shows tooltips when the cursor is over the - // icon (and not the text), we have to create our own tooltips - setShowToolTips( false ); - slotSmallColumns(); - d->smallColumns->setChecked( true ); - - connect( this, TQT_SIGNAL( returnPressed(TQIconViewItem *) ), - TQT_SLOT( slotActivate( TQIconViewItem *) ) ); - - // we want single click _and_ double click (as convenience) - connect( this, TQT_SIGNAL( clicked(TQIconViewItem *, const TQPoint&) ), - TQT_SLOT( selected( TQIconViewItem *) ) ); - connect( this, TQT_SIGNAL( doubleClicked(TQIconViewItem *, const TQPoint&) ), - TQT_SLOT( slotActivate( TQIconViewItem *) ) ); - - connect( this, TQT_SIGNAL( onItem( TQIconViewItem * ) ), - TQT_SLOT( showToolTip( TQIconViewItem * ) ) ); - connect( this, TQT_SIGNAL( onViewport() ), - TQT_SLOT( removeToolTip() ) ); - connect( this, TQT_SIGNAL( contextMenuRequested(TQIconViewItem*,const TQPoint&)), - TQT_SLOT( slotActivateMenu( TQIconViewItem*, const TQPoint& ) ) ); - - KFile::SelectionMode sm = KFileView::selectionMode(); - switch ( sm ) { - case KFile::Multi: - TQIconView::setSelectionMode( TQIconView::Multi ); - break; - case KFile::Extended: - TQIconView::setSelectionMode( TQIconView::Extended ); - break; - case KFile::NoSelection: - TQIconView::setSelectionMode( TQIconView::NoSelection ); - break; - default: // fall through - case KFile::Single: - TQIconView::setSelectionMode( TQIconView::Single ); - break; - } - - if ( sm == KFile::Multi || sm == KFile::Extended ) - connect( this, TQT_SIGNAL( selectionChanged() ), - TQT_SLOT( slotSelectionChanged() )); - else - connect( this, TQT_SIGNAL( selectionChanged( TQIconViewItem * )), - TQT_SLOT( highlighted( TQIconViewItem * ))); - - viewport()->installEventFilter( this ); - - // for mimetype resolving - m_resolver = new KMimeTypeResolver(this); -} - -KFileIconView::~KFileIconView() -{ - delete m_resolver; - removeToolTip(); - delete d; -} - -void KFileIconView::readConfig( TDEConfig *kc, const TQString& group ) -{ - TQString gr = group.isEmpty() ? TQString("KFileIconView") : group; - TDEConfigGroupSaver cs( kc, gr ); - TQString small = TQString::fromLatin1("SmallColumns"); - d->previewIconSize = kc->readNumEntry( "Preview Size", DEFAULT_PREVIEW_SIZE ); - d->previews->setChecked( kc->readBoolEntry( "ShowPreviews", DEFAULT_SHOW_PREVIEWS ) ); - - if ( kc->readEntry("ViewMode", DEFAULT_VIEW_MODE ) == small ) { - d->smallColumns->setChecked( true ); - slotSmallColumns(); - } - else { - d->largeRows->setChecked( true ); - slotLargeRows(); - } - - if ( d->previews->isChecked() ) - showPreviews(); -} - -void KFileIconView::writeConfig( TDEConfig *kc, const TQString& group ) -{ - TQString gr = group.isEmpty() ? TQString("KFileIconView") : group; - TDEConfigGroupSaver cs( kc, gr ); - - TQString viewMode = d->smallColumns->isChecked() ? - TQString::fromLatin1("SmallColumns") : - TQString::fromLatin1("LargeRows"); - if(!kc->hasDefault( "ViewMode" ) && viewMode == DEFAULT_VIEW_MODE ) - kc->revertToDefault( "ViewMode" ); - else - kc->writeEntry( "ViewMode", viewMode ); - - int previewsIconSize = d->previewIconSize; - if(!kc->hasDefault( "Preview Size" ) && previewsIconSize == DEFAULT_PREVIEW_SIZE ) - kc->revertToDefault( "Preview Size" ); - else - kc->writeEntry( "Preview Size", previewsIconSize ); - - bool showPreviews = d->previews->isChecked(); - if(!kc->hasDefault( "ShowPreviews" ) && showPreviews == DEFAULT_SHOW_PREVIEWS ) - kc->revertToDefault( "ShowPreviews" ); - else - kc->writeEntry( "ShowPreviews", showPreviews ); -} - -void KFileIconView::removeToolTip() -{ - delete toolTip; - toolTip = 0; -} - -void KFileIconView::showToolTip( TQIconViewItem *item ) -{ - delete toolTip; - toolTip = 0; - - if ( !item ) - return; - - int w = maxItemWidth() - ( itemTextPos() == TQIconView::Bottom ? 0 : - item->pixmapRect().width() ) - 4; - if ( fontMetrics().width( item->text() ) >= w ) { - toolTip = new TQLabel( TQString::fromLatin1(" %1 ").arg(item->text()), 0, - "myToolTip", - (WFlags)(WStyle_StaysOnTop | WStyle_Customize | WStyle_NoBorder | WStyle_Tool | WX11BypassWM) ); - toolTip->setFrameStyle( TQFrame::Plain | TQFrame::Box ); - toolTip->setLineWidth( 1 ); - toolTip->setAlignment( AlignLeft | AlignTop ); - toolTip->move( TQCursor::pos() + TQPoint( 14, 14 ) ); - toolTip->adjustSize(); - TQRect screen = TQApplication::desktop()->screenGeometry( - TQApplication::desktop()->screenNumber(TQCursor::pos())); - if (toolTip->x()+toolTip->width() > screen.right()) { - toolTip->move(toolTip->x()+screen.right()-toolTip->x()-toolTip->width(), toolTip->y()); - } - if (toolTip->y()+toolTip->height() > screen.bottom()) { - toolTip->move(toolTip->x(), screen.bottom()-toolTip->y()-toolTip->height()+toolTip->y()); - } - toolTip->setFont( TQToolTip::font() ); - toolTip->setPalette( TQToolTip::palette(), true ); - toolTip->show(); - } -} - -void KFileIconView::slotActivateMenu( TQIconViewItem* item, const TQPoint& pos ) -{ - if ( !item ) { - sig->activateMenu( 0, pos ); - return; - } - KFileIconViewItem *i = (KFileIconViewItem*) item; - sig->activateMenu( i->fileInfo(), pos ); -} - -void KFileIconView::hideEvent( TQHideEvent *e ) -{ - removeToolTip(); - KIconView::hideEvent( e ); -} - -void KFileIconView::keyPressEvent( TQKeyEvent *e ) -{ - KIconView::keyPressEvent( e ); - - // ignore Ctrl-Return so that the dialog can catch it. - if ( (e->state() & ControlButton) && - (e->key() == Key_Return || e->key() == Key_Enter) ) - e->ignore(); -} - -void KFileIconView::setSelected( const KFileItem *info, bool enable ) -{ - KFileIconViewItem *item = viewItem( info ); - if ( item ) - KIconView::setSelected( item, enable, true ); -} - -void KFileIconView::selectAll() -{ - if (KFileView::selectionMode() == KFile::NoSelection || - KFileView::selectionMode() == KFile::Single) - return; - - KIconView::selectAll( true ); -} - -void KFileIconView::clearSelection() -{ - KIconView::clearSelection(); -} - -void KFileIconView::invertSelection() -{ - KIconView::invertSelection(); -} - -void KFileIconView::clearView() -{ - m_resolver->m_lstPendingMimeIconItems.clear(); - - KIconView::clear(); - stopPreview(); -} - -void KFileIconView::insertItem( KFileItem *i ) -{ - KFileView::insertItem( i ); - - TQIconView* qview = static_cast( this ); - // Since creating and initializing an item leads to a repaint, - // we disable updates on the IconView for a while. - qview->setUpdatesEnabled( false ); - KFileIconViewItem *item = new KFileIconViewItem( qview, i ); - initItem( item, i, true ); - qview->setUpdatesEnabled( true ); - - if ( !i->isMimeTypeKnown() ) - m_resolver->m_lstPendingMimeIconItems.append( item ); - - i->setExtraData( this, item ); -} - -void KFileIconView::slotActivate( TQIconViewItem *item ) -{ - if ( !item ) - return; - const KFileItem *fi = ( (KFileIconViewItem*)item )->fileInfo(); - if ( fi ) - sig->activate( fi ); -} - -void KFileIconView::selected( TQIconViewItem *item ) -{ - if ( !item || (TDEApplication::keyboardMouseState() & (ShiftButton | ControlButton)) != 0 ) - return; - - if ( TDEGlobalSettings::singleClick() ) { - const KFileItem *fi = ( (KFileIconViewItem*)item )->fileInfo(); - if ( fi && (fi->isDir() || !onlyDoubleClickSelectsFiles()) ) - sig->activate( fi ); - } -} - -void KFileIconView::setCurrentItem( const KFileItem *item ) -{ - KFileIconViewItem *it = viewItem( item ); - if ( it ) - KIconView::setCurrentItem( it ); -} - -KFileItem * KFileIconView::currentFileItem() const -{ - KFileIconViewItem *current = static_cast( currentItem() ); - if ( current ) - return current->fileInfo(); - - return 0L; -} - -void KFileIconView::highlighted( TQIconViewItem *item ) -{ - if ( !item ) - return; - const KFileItem *fi = ( (KFileIconViewItem*)item )->fileInfo(); - if ( fi ) - sig->highlightFile( fi ); -} - -void KFileIconView::setSelectionMode( KFile::SelectionMode sm ) -{ - disconnect( TQT_SIGNAL( selectionChanged() ), this ); - disconnect( TQT_SIGNAL( selectionChanged( TQIconViewItem * )), this ); - - KFileView::setSelectionMode( sm ); - switch ( KFileView::selectionMode() ) { - case KFile::Multi: - TQIconView::setSelectionMode( TQIconView::Multi ); - break; - case KFile::Extended: - TQIconView::setSelectionMode( TQIconView::Extended ); - break; - case KFile::NoSelection: - TQIconView::setSelectionMode( TQIconView::NoSelection ); - break; - default: // fall through - case KFile::Single: - TQIconView::setSelectionMode( TQIconView::Single ); - break; - } - - if ( sm == KFile::Multi || sm == KFile::Extended ) - connect( this, TQT_SIGNAL( selectionChanged() ), - TQT_SLOT( slotSelectionChanged() )); - else - connect( this, TQT_SIGNAL( selectionChanged( TQIconViewItem * )), - TQT_SLOT( highlighted( TQIconViewItem * ))); -} - -bool KFileIconView::isSelected( const KFileItem *i ) const -{ - KFileIconViewItem *item = viewItem( i ); - return (item && item->isSelected()); -} - -void KFileIconView::updateView( bool b ) -{ - if ( !b ) - return; // eh? - - KFileIconViewItem *item = static_cast(TQIconView::firstItem()); - if ( item ) { - do { - if ( d->previews->isChecked() ) { - if ( canPreview( item->fileInfo() ) ) - item->setPixmapSize( TQSize( d->previewIconSize, d->previewIconSize ) ); - } - else { - // unset pixmap size (used for previews) - if ( !item->pixmapSize().isNull() ) - item->setPixmapSize( TQSize( 0, 0 ) ); - } - // recalculate item parameters but avoid an in-place repaint - item->setPixmap( (item->fileInfo())->pixmap( myIconSize ), true, false ); - item = static_cast(item->nextItem()); - } while ( item != 0L ); - } -} - -void KFileIconView::updateView( const KFileItem *i ) -{ - KFileIconViewItem *item = viewItem( i ); - if ( item ) - initItem( item, i, true ); -} - -void KFileIconView::removeItem( const KFileItem *i ) -{ - if ( !i ) - return; - - if ( d->job ) - d->job->removeItem( i ); - - KFileIconViewItem *item = viewItem( i ); - m_resolver->m_lstPendingMimeIconItems.remove( item ); - delete item; - - KFileView::removeItem( i ); -} - -void KFileIconView::setIconSize( int size ) -{ - myIconSize = size; - updateIcons(); -} - -void KFileIconView::setPreviewSize( int size ) -{ - if ( size < 30 ) - size = 30; // minimum - - d->previewIconSize = size; - if ( d->previews->isChecked() ) - showPreviews(); -} - -void KFileIconView::setIgnoreMaximumSize(bool ignoreSize) -{ - d->ignoreMaximumSize = ignoreSize; -} - -void KFileIconView::updateIcons() -{ - updateView( true ); - arrangeItemsInGrid(); -} - -void KFileIconView::ensureItemVisible( const KFileItem *i ) -{ - KFileIconViewItem *item = viewItem( i ); - if ( item ) - KIconView::ensureItemVisible( item ); -} - -void KFileIconView::slotSelectionChanged() -{ - sig->highlightFile( 0L ); -} - -void KFileIconView::slotSmallColumns() -{ - // setItemTextPos(), setArrangement(), setWordWrapIconText() and - // setIconSize() all call arrangeItemsInGrid() :( Prevent this. - d->noArrangement = true; // stop arrangeItemsInGrid()! - - // Make sure to uncheck previews if selected - if ( d->previews->isChecked() ) - { - stopPreview(); - d->previews->setChecked( false ); - } - setGridX( -1 ); - setMaxItemWidth( 300 ); - setItemTextPos( Right ); - setArrangement( TopToBottom ); - setWordWrapIconText( false ); - setSpacing( 0 ); - - d->noArrangement = false; // now we can arrange - setIconSize( KIcon::SizeSmall ); -} - -void KFileIconView::slotLargeRows() -{ - // setItemTextPos(), setArrangement(), setWordWrapIconText() and - // setIconSize() all call arrangeItemsInGrid() :( Prevent this. - d->noArrangement = true; // stop arrangeItemsInGrid()! - - setGridX( TDEGlobal::iconLoader()->currentSize( KIcon::Desktop ) + 50 ); - setItemTextPos( Bottom ); - setArrangement( LeftToRight ); - setWordWrapIconText( true ); - setSpacing( 5 ); // default in QIconView - - d->noArrangement = false; // now we can arrange - setIconSize( KIcon::SizeMedium ); -} - -void KFileIconView::stopPreview() -{ - if ( d->job ) { - d->job->kill(); - d->job = 0L; - } -} - -void KFileIconView::slotPreviewsToggled( bool on ) -{ - if ( on ) - showPreviews(); - else { - stopPreview(); - slotLargeRows(); - } -} - -void KFileIconView::showPreviews() -{ - if ( d->previewMimeTypes.isEmpty() ) - d->previewMimeTypes = TDEIO::PreviewJob::supportedMimeTypes(); - - stopPreview(); - d->previews->setChecked( true ); - - if ( !d->largeRows->isChecked() ) { - d->largeRows->setChecked( true ); - slotLargeRows(); // also sets the icon size and updates the grid - } - else { - updateIcons(); - } - - d->job = TDEIO::filePreview(*items(), d->previewIconSize,d->previewIconSize); - d->job->setIgnoreMaximumSize(d->ignoreMaximumSize); - - connect( d->job, TQT_SIGNAL( result( TDEIO::Job * )), - this, TQT_SLOT( slotPreviewResult( TDEIO::Job * ))); - connect( d->job, TQT_SIGNAL( gotPreview( const KFileItem*, const TQPixmap& )), - TQT_SLOT( gotPreview( const KFileItem*, const TQPixmap& ) )); -// connect( d->job, TQT_SIGNAL( failed( const KFileItem* )), -// this, TQT_SLOT( slotFailed( const KFileItem* ) )); -} - -void KFileIconView::slotPreviewResult( TDEIO::Job *job ) -{ - if ( job == d->job ) - d->job = 0L; -} - -void KFileIconView::gotPreview( const KFileItem *item, const TQPixmap& pix ) -{ - KFileIconViewItem *it = viewItem( item ); - if ( it ) - if( item->overlays() & KIcon::HiddenOverlay ) - { - TQPixmap p( pix ); - - KIconEffect::semiTransparent( p ); - it->setPixmap( p ); - } - else - it->setPixmap( pix ); -} - -bool KFileIconView::canPreview( const KFileItem *item ) const -{ - TQStringList::Iterator it = d->previewMimeTypes.begin(); - TQRegExp r; - r.setWildcard( true ); - - for ( ; it != d->previewMimeTypes.end(); ++it ) { - TQString type = *it; - // the "mimetype" can be "image/*" - if ( type.at( type.length() - 1 ) == '*' ) { - r.setPattern( type ); - if ( r.search( item->mimetype() ) != -1 ) - return true; - } - else - if ( item->mimetype() == type ) - return true; - } - - return false; -} - -KFileItem * KFileIconView::firstFileItem() const -{ - KFileIconViewItem *item = static_cast( firstItem() ); - if ( item ) - return item->fileInfo(); - return 0L; -} - -KFileItem * KFileIconView::nextItem( const KFileItem *fileItem ) const -{ - if ( fileItem ) { - KFileIconViewItem *item = viewItem( fileItem ); - if ( item && item->nextItem() ) - return ((KFileIconViewItem*) item->nextItem())->fileInfo(); - } - return 0L; -} - -KFileItem * KFileIconView::prevItem( const KFileItem *fileItem ) const -{ - if ( fileItem ) { - KFileIconViewItem *item = viewItem( fileItem ); - if ( item && item->prevItem() ) - return ((KFileIconViewItem*) item->prevItem())->fileInfo(); - } - return 0L; -} - -void KFileIconView::setSorting( TQDir::SortSpec spec ) -{ - KFileView::setSorting( spec ); - KFileItemListIterator it( *items() ); - - KFileItem *item; - - if ( spec & TQDir::Time ) { - for ( ; (item = it.current()); ++it ) - // warning, time_t is often signed -> cast it - viewItem(item)->setKey( sortingKey( (unsigned long)item->time( TDEIO::UDS_MODIFICATION_TIME ), item->isDir(), spec )); - } - - else if ( spec & TQDir::Size ) { - for ( ; (item = it.current()); ++it ) - viewItem(item)->setKey( sortingKey( item->size(), item->isDir(), - spec )); - } - else { // Name or Unsorted - for ( ; (item = it.current()); ++it ) - viewItem(item)->setKey( sortingKey( item->text(), item->isDir(), - spec )); - } - - KIconView::setSorting( true, !isReversed() ); - sort( !isReversed() ); -} - -// -// mimetype determination on demand -// -void KFileIconView::mimeTypeDeterminationFinished() -{ - // anything to do? -} - -void KFileIconView::determineIcon( KFileIconViewItem *item ) -{ - (void) item->fileInfo()->determineMimeType(); - updateView( item->fileInfo() ); -} - -void KFileIconView::listingCompleted() -{ - arrangeItemsInGrid(); - - // TQIconView doesn't set the current item automatically, so we have to do - // that. We don't want to emit selectionChanged() tho. - if ( !currentItem() ) { - bool block = signalsBlocked(); - blockSignals( true ); - TQIconViewItem *item = viewItem( firstFileItem() ); - KIconView::setCurrentItem( item ); - KIconView::setSelected( item, false ); - blockSignals( block ); - } - - m_resolver->start( d->previews->isChecked() ? 0 : 10 ); -} - -// need to remove our tooltip, eventually -bool KFileIconView::eventFilter( TQObject *o, TQEvent *e ) -{ - if ( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(viewport()) || TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(this) ) { - int type = e->type(); - if ( type == TQEvent::Leave || - type == TQEvent::FocusOut ) - removeToolTip(); - } - - return KIconView::eventFilter( o, e ); -} - -///////////////////////////////////////////////////////////////// - -// ### workaround for Qt3 Bug -void KFileIconView::showEvent( TQShowEvent *e ) -{ - KIconView::showEvent( e ); -} - - -void KFileIconView::initItem( KFileIconViewItem *item, const KFileItem *i, - bool updateTextAndPixmap ) -{ - if ( d->previews->isChecked() && canPreview( i ) ) - item->setPixmapSize( TQSize( d->previewIconSize, d->previewIconSize ) ); - - if ( updateTextAndPixmap ) - { - // this causes a repaint of the item, which we want to avoid during - // directory listing, when all items are created. We want to paint all - // items at once, not every single item in that case. - item->setText( i->text() , false, false ); - item->setPixmap( i->pixmap( myIconSize ) ); - } - - // see also setSorting() - TQDir::SortSpec spec = KFileView::sorting(); - - if ( spec & TQDir::Time ) - // warning, time_t is often signed -> cast it - item->setKey( sortingKey( (unsigned long) i->time( TDEIO::UDS_MODIFICATION_TIME ), - i->isDir(), spec )); - else if ( spec & TQDir::Size ) - item->setKey( sortingKey( i->size(), i->isDir(), spec )); - - else // Name or Unsorted - item->setKey( sortingKey( i->text(), i->isDir(), spec )); - - //tqDebug("** key for: %s: %s", i->text().latin1(), item->key().latin1()); - - if ( d->previews->isChecked() ) - d->previewTimer.start( 10, true ); -} - -void KFileIconView::arrangeItemsInGrid( bool update ) -{ - if ( d->noArrangement ) - return; - - KIconView::arrangeItemsInGrid( update ); -} - -void KFileIconView::zoomIn() -{ - setPreviewSize( d->previewIconSize + 30 ); -} - -void KFileIconView::zoomOut() -{ - setPreviewSize( d->previewIconSize - 30 ); -} - -TQDragObject *KFileIconView::dragObject() -{ - // create a list of the URL:s that we want to drag - KURL::List urls; - KFileItemListIterator it( * KFileView::selectedItems() ); - for ( ; it.current(); ++it ){ - urls.append( (*it)->url() ); - } - TQPixmap pixmap; - if( urls.count() > 1 ) - pixmap = DesktopIcon( "tdemultiple", iconSize() ); - if( pixmap.isNull() ) - pixmap = currentFileItem()->pixmap( iconSize() ); - - TQPoint hotspot; - hotspot.setX( pixmap.width() / 2 ); - hotspot.setY( pixmap.height() / 2 ); - TQDragObject* myDragObject = new KURLDrag( urls, widget() ); - myDragObject->setPixmap( pixmap, hotspot ); - return myDragObject; -} - -void KFileIconView::slotAutoOpen() -{ - d->autoOpenTimer.stop(); - if( !d->dropItem ) - return; - - KFileItem *fileItem = d->dropItem->fileInfo(); - if (!fileItem) - return; - - if( fileItem->isFile() ) - return; - - if ( fileItem->isDir() || fileItem->isLink()) - sig->activate( fileItem ); -} - -bool KFileIconView::acceptDrag(TQDropEvent* e) const -{ - return KURLDrag::canDecode( e ) && - (e->source()!=const_cast(this)) && - ( e->action() == TQDropEvent::Copy - || e->action() == TQDropEvent::Move - || e->action() == TQDropEvent::Link ); -} - -void KFileIconView::contentsDragEnterEvent( TQDragEnterEvent *e ) -{ - if ( ! acceptDrag( e ) ) { // can we decode this ? - e->ignore(); // No - return; - } - e->acceptAction(); // Yes - - if ((dropOptions() & AutoOpenDirs) == 0) - return; - - KFileIconViewItem *item = dynamic_cast(findItem( contentsToViewport( e->pos() ) )); - if ( item ) { // are we over an item ? - d->dropItem = item; - d->autoOpenTimer.start( autoOpenDelay() ); // restart timer - } - else - { - d->dropItem = 0; - d->autoOpenTimer.stop(); - } -} - -void KFileIconView::contentsDragMoveEvent( TQDragMoveEvent *e ) -{ - if ( ! acceptDrag( e ) ) { // can we decode this ? - e->ignore(); // No - return; - } - e->acceptAction(); // Yes - - if ((dropOptions() & AutoOpenDirs) == 0) - return; - - KFileIconViewItem *item = dynamic_cast(findItem( contentsToViewport( e->pos() ) )); - if ( item ) { // are we over an item ? - if (d->dropItem != item) - { - d->dropItem = item; - d->autoOpenTimer.start( autoOpenDelay() ); // restart timer - } - } - else - { - d->dropItem = 0; - d->autoOpenTimer.stop(); - } -} - -void KFileIconView::contentsDragLeaveEvent( TQDragLeaveEvent * ) -{ - d->dropItem = 0; - d->autoOpenTimer.stop(); -} - -void KFileIconView::contentsDropEvent( TQDropEvent *e ) -{ - d->dropItem = 0; - d->autoOpenTimer.stop(); - - if ( ! acceptDrag( e ) ) { // can we decode this ? - e->ignore(); // No - return; - } - e->acceptAction(); // Yes - - KFileIconViewItem *item = dynamic_cast(findItem( contentsToViewport( e->pos() ) )); - KFileItem * fileItem = 0; - if (item) - fileItem = item->fileInfo(); - - emit dropped(e, fileItem); - - KURL::List urls; - if (KURLDrag::decode( e, urls ) && !urls.isEmpty()) - { - emit dropped(e, urls, fileItem ? fileItem->url() : KURL()); - sig->dropURLs(fileItem, e, urls); - } -} - -void KFileIconView::virtual_hook( int id, void* data ) -{ KIconView::virtual_hook( id, data ); - KFileView::virtual_hook( id, data ); } - -#include "kfileiconview.moc" diff --git a/kio/kfile/kfileiconview.h b/kio/kfile/kfileiconview.h deleted file mode 100644 index 98afc0a6e..000000000 --- a/kio/kfile/kfileiconview.h +++ /dev/null @@ -1,267 +0,0 @@ -// -*- c++ -*- -/* This file is part of the KDE libraries - Copyright (C) 1997 Stephan Kulow - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef KFILEICONVIEW_H -#define KFILEICONVIEW_H - -#include - -#include -#include -#include -#include -#include - -class KFileItem; -class TQWidget; -class TQLabel; - -/** - * An item for the iconview, that has a reference to its corresponding - * KFileItem. - */ -class TDEIO_EXPORT KFileIconViewItem : public KIconViewItem -{ -public: - KFileIconViewItem( TQIconView *parent, const TQString &text, - const TQPixmap &pixmap, - KFileItem *fi ) - : KIconViewItem( parent, text, pixmap ), inf( fi ) {} - /** - * @since 3.1 - */ - KFileIconViewItem( TQIconView *parent, KFileItem *fi ) - : KIconViewItem( parent ), inf( fi ) {} - - virtual ~KFileIconViewItem(); - - /** - * @returns the corresponding KFileItem - */ - KFileItem *fileInfo() const { - return inf; - } - -private: - KFileItem *inf; - -private: - class KFileIconViewItemPrivate; - KFileIconViewItemPrivate *d; - -}; - -namespace TDEIO { - class Job; -} - -/** - * An icon-view capable of showing KFileItem's. Used in the filedialog - * for example. Most of the documentation is in KFileView class. - * - * @see KDirOperator - * @see KCombiView - * @see KFileDetailView - */ -class TDEIO_EXPORT KFileIconView : public KIconView, public KFileView -{ - Q_OBJECT - -public: - KFileIconView(TQWidget *parent, const char *name); - virtual ~KFileIconView(); - - virtual TQWidget *widget() { return this; } - virtual void clearView(); - virtual void setAutoUpdate( bool ) {} // ### unused. remove in KDE4 - - virtual void updateView( bool ); - virtual void updateView(const KFileItem*); - virtual void removeItem(const KFileItem*); - - virtual void listingCompleted(); - - virtual void insertItem( KFileItem *i ); - virtual void setSelectionMode( KFile::SelectionMode sm ); - - virtual void setSelected(const KFileItem *, bool); - virtual bool isSelected(const KFileItem *i) const; - virtual void clearSelection(); - virtual void selectAll(); - virtual void invertSelection(); - - virtual void setCurrentItem( const KFileItem * ); - virtual KFileItem * currentFileItem() const; - virtual KFileItem * firstFileItem() const; - virtual KFileItem * nextItem( const KFileItem * ) const; - virtual KFileItem * prevItem( const KFileItem * ) const; - - /** - * Sets the size of the icons to show. Defaults to KIcon::SizeSmall. - */ - void setIconSize( int size ); - - /** - * Sets the size of the previews. Defaults to KIcon::SizeLarge. - */ - void setPreviewSize( int size ); - - /** - * Disables the "Maximum file size" configuration option for previews - * - * Set this before calling showPreviews() - * - * @since 3.4 - **/ - void setIgnoreMaximumSize(bool ignoreSize=true); - - /** - * @returns the current size used for icons. - */ - int iconSize() const { return myIconSize; } - - void ensureItemVisible( const KFileItem * ); - - virtual void setSorting(TQDir::SortSpec sort); - - virtual void readConfig( TDEConfig *, const TQString& group = TQString::null ); - virtual void writeConfig( TDEConfig *, const TQString& group = TQString::null); - - // for KMimeTypeResolver - void mimeTypeDeterminationFinished(); - void determineIcon( KFileIconViewItem *item ); - TQScrollView *scrollWidget() const { return (TQScrollView*) this; } - void setAcceptDrops(bool b) - { - KIconView::setAcceptDrops(b); - viewport()->setAcceptDrops(b); - } - -public slots: - /** - * Starts loading previews for all files shown and shows them. Switches - * into 'large rows' mode, if that isn't the current mode yet. - * - * @sa setIgnoreMaximumSize - */ - void showPreviews(); - - void zoomIn(); - - void zoomOut(); - - /** - * Reimplemented for performance reasons. - * @since 3.1 - */ - virtual void arrangeItemsInGrid( bool updated = true ); - -protected: - /** - * Reimplemented to not let TQIconView eat return-key events - */ - virtual void keyPressEvent( TQKeyEvent * ); - - /** - * Reimplemented to remove an eventual tooltip - */ - virtual void hideEvent( TQHideEvent * ); - - // ### workaround for Qt3 bug (see #35080) - virtual void showEvent( TQShowEvent * ); - - virtual bool eventFilter( TQObject *o, TQEvent *e ); - - // DND support - virtual TQDragObject *dragObject(); - virtual void contentsDragEnterEvent( TQDragEnterEvent *e ); - virtual void contentsDragMoveEvent( TQDragMoveEvent *e ); - virtual void contentsDragLeaveEvent( TQDragLeaveEvent *e ); - virtual void contentsDropEvent( TQDropEvent *ev ); - - // KDE4: Make virtual - bool acceptDrag(TQDropEvent* e ) const; - -private slots: - void selected( TQIconViewItem *item ); - void slotActivate( TQIconViewItem * ); - void highlighted( TQIconViewItem *item ); - void showToolTip( TQIconViewItem *item ); - void removeToolTip(); - void slotActivateMenu( TQIconViewItem *, const TQPoint& ); - void slotSelectionChanged(); - - void slotSmallColumns(); - void slotLargeRows(); - void slotPreviewsToggled( bool ); - - void slotPreviewResult( TDEIO::Job * ); - void gotPreview( const KFileItem *item, const TQPixmap& pix ); - void slotAutoOpen(); - -signals: - /** - * The user dropped something. - * @p fileItem points to the item dropped on or can be 0 if the - * user dropped on empty space. - * @since 3.2 - */ - void dropped(TQDropEvent *event, KFileItem *fileItem); - /** - * The user dropped the URLs @p urls. - * @p url points to the item dropped on or can be empty if the - * user dropped on empty space. - * @since 3.2 - */ - void dropped(TQDropEvent *event, const KURL::List &urls, const KURL &url); - -private: - KMimeTypeResolver *m_resolver; - - TQLabel *toolTip; - int th; - int myIconSize; - - virtual void insertItem(TQIconViewItem *a, TQIconViewItem *b) { KIconView::insertItem(a, b); } - virtual void setSelectionMode(TQIconView::SelectionMode m) { KIconView::setSelectionMode(m); } - virtual void setSelected(TQIconViewItem *i, bool a, bool b) { KIconView::setSelected(i, a, b); } - - bool canPreview( const KFileItem * ) const; - void stopPreview(); - - void updateIcons(); - - inline KFileIconViewItem * viewItem( const KFileItem *item ) const { - if ( item ) - return (KFileIconViewItem *) item->extraData( this ); - return 0L; - } - - void initItem(KFileIconViewItem *item, const KFileItem *i, - bool updateTextAndPixmap ); - -protected: - virtual void virtual_hook( int id, void* data ); -private: - class KFileIconViewPrivate; - KFileIconViewPrivate *d; -}; - -#endif // KFILESIMPLEVIEW_H diff --git a/kio/kfile/kfilemetainfowidget.cpp b/kio/kfile/kfilemetainfowidget.cpp deleted file mode 100644 index c4df4a15d..000000000 --- a/kio/kfile/kfilemetainfowidget.cpp +++ /dev/null @@ -1,375 +0,0 @@ -/* This file is part of the KDE libraries - Copyright (C) 2001,2002 Rolf Magnus - - library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License version 2 as published by the Free Software Foundation. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. - - $Id$ - */ - -#include "kfilemetainfowidget.h" - -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -/* - Widgets used for different types: - - bool : QCheckBox - int : QSpinBox - TQString : KComboBox if the validator is a KStringListValidator, else lineedit - TQDateTime : QDateTimeEdit - -*/ - -KFileMetaInfoWidget::KFileMetaInfoWidget(KFileMetaInfoItem item, - TQValidator* val, - TQWidget* parent, const char* name) - : TQWidget(parent, name), - m_value(item.value()), - m_item(item), - m_validator(val) -{ - init(item, ReadWrite); -} - -KFileMetaInfoWidget::KFileMetaInfoWidget(KFileMetaInfoItem item, - Mode mode, - TQValidator* val, - TQWidget* parent, const char* name) - : TQWidget(parent, name), - m_value(item.value()), - m_item(item), - m_validator(val) -{ - init(item, mode); -} - -void KFileMetaInfoWidget::init(KFileMetaInfoItem item, Mode mode) -{ - kdDebug(7033) << "*** item " << m_item.key() - << " is a " << value().typeName() << endl; - - if (m_item.isEditable() && !(mode & ReadOnly)) - m_widget = makeWidget(); - else - switch (m_value.type()) - { - case TQVariant::Image : - m_widget = new TQLabel(this, "info image"); - static_cast(m_widget)->setPixmap(TQPixmap(m_value.toImage())); - break; - case TQVariant::Pixmap : - m_widget = new TQLabel(this, "info pixmap"); - static_cast(m_widget)->setPixmap(m_value.toPixmap()); - break; - default: - m_widget = new TQLabel(item.string(true), this, "info label"); - } - - (new TQHBoxLayout(this))->addWidget(m_widget); -} - -KFileMetaInfoWidget::~KFileMetaInfoWidget() -{ -} - -TQWidget* KFileMetaInfoWidget::makeWidget() -{ - TQString valClass; - TQWidget* w; - - switch (m_value.type()) - { - case TQVariant::Invalid: // no type - // just make a label - w = new TQLabel(i18n(""), this, "label"); - break; - - case TQVariant::Int: // an int - case TQVariant::UInt: // an unsigned int - w = makeIntWidget(); - break; - - case TQVariant::Bool: // a bool - w = makeBoolWidget(); - break; - - case TQVariant::Double: // a double - w = makeDoubleWidget(); - break; - - - case TQVariant::Date: // a QDate - w = makeDateWidget(); - break; - - case TQVariant::Time: // a QTime - w = makeTimeWidget(); - break; - - case TQVariant::DateTime: // a QDateTime - w = makeDateTimeWidget(); - break; - -#if 0 - case TQVariant::Size: // a QSize - case TQVariant::String: // a QString - case TQVariant::List: // a QValueList - case TQVariant::Map: // a QMap - case TQVariant::StringList: // a QStringList - case TQVariant::Font: // a QFont - case TQVariant::Pixmap: // a QPixmap - case TQVariant::Brush: // a QBrush - case TQVariant::Rect: // a QRect - case TQVariant::Color: // a QColor - case TQVariant::Palette: // a QPalette - case TQVariant::ColorGroup: // a QColorGroup - case TQVariant::IconSet: // a QIconSet - case TQVariant::Point: // a QPoint - case TQVariant::Image: // a QImage - case TQVariant::CString: // a QCString - case TQVariant::PointArray: // a QPointArray - case TQVariant::Region: // a QRegion - case TQVariant::Bitmap: // a QBitmap - case TQVariant::Cursor: // a QCursor - case TQVariant::ByteArray: // a QByteArray - case TQVariant::BitArray: // a QBitArray - case TQVariant::SizePolicy: // a QSizePolicy - case TQVariant::KeySequence: // a QKeySequence -#endif - default: - w = makeStringWidget(); - } - - kdDebug(7033) << "*** item " << m_item.key() - << "is a " << m_item.value().typeName() << endl; - if (m_validator) - kdDebug(7033) << " and validator is a " << m_validator->className() << endl; - - kdDebug(7033) << "*** created a " << w->className() << " for it\n"; - - return w; -} - -// **************************************************************** -// now the different methods to make the widgets for specific types -// **************************************************************** - -TQWidget* KFileMetaInfoWidget::makeBoolWidget() -{ - TQCheckBox* cb = new TQCheckBox(this, "metainfo bool widget"); - cb->setChecked(m_item.value().toBool()); - connect(cb, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotChanged(bool))); - return cb; -} - -TQWidget* KFileMetaInfoWidget::makeIntWidget() -{ - TQSpinBox* sb = new TQSpinBox(this, "metainfo integer widget"); - sb->setValue(m_item.value().toInt()); - - if (m_validator) - { - if (m_validator->inherits(TQINTVALIDATOR_OBJECT_NAME_STRING)) - { - sb->setMinValue(static_cast(m_validator)->bottom()); - sb->setMaxValue(static_cast(m_validator)->top()); - } - reparentValidator(sb, m_validator); - sb->setValidator(m_validator); - } - - // make sure that an uint cannot be set to a value < 0 - if (m_item.type() == TQVariant::UInt) - sb->setMinValue(QMAX(sb->minValue(), 0)); - - connect(sb, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotChanged(int))); - return sb; -} - -TQWidget* KFileMetaInfoWidget::makeDoubleWidget() -{ - KDoubleNumInput* dni = new KDoubleNumInput(m_item.value().toDouble(), - this, "metainfo double widget"); - - - if (m_validator) - { - if (m_validator->inherits("QDoubleValidator")) - { - dni->setMinValue(static_cast(m_validator)->bottom()); - dni->setMaxValue(static_cast(m_validator)->top()); - } - reparentValidator(dni, m_validator); - } - - connect(dni, TQT_SIGNAL(valueChanged(double)), this, TQT_SLOT(slotChanged(double))); - return dni; -} - -TQWidget* KFileMetaInfoWidget::makeStringWidget() -{ - if (m_validator && m_validator->inherits("KStringListValidator")) - { - KComboBox* b = new KComboBox(true, this, "metainfo combobox"); - KStringListValidator* val = static_cast - (m_validator); - b->insertStringList(val->stringList()); - b->setCurrentText(m_item.value().toString()); - connect(b, TQT_SIGNAL(activated(const TQString &)), this, TQT_SLOT(slotComboChanged(const TQString &))); - b->setValidator(val); - reparentValidator(b, val); - return b; - } - - if ( m_item.attributes() & KFileMimeTypeInfo::MultiLine ) { - KEdit *edit = new KEdit( this ); - edit->setText( m_item.value().toString() ); - connect( edit, TQT_SIGNAL( textChanged() ), - this, TQT_SLOT( slotMultiLineEditChanged() )); - // can't use a validator with a TQTextEdit, but we may need to delete it - if ( m_validator ) - reparentValidator( edit, m_validator ); - return edit; - } - - KLineEdit* e = new KLineEdit(m_item.value().toString(), this); - if (m_validator) - { - e->setValidator(m_validator); - reparentValidator(e, m_validator); - } - connect(e, TQT_SIGNAL(textChanged(const TQString&)), - this, TQT_SLOT(slotLineEditChanged(const TQString&))); - return e; -} - -TQWidget* KFileMetaInfoWidget::makeDateWidget() -{ - TQWidget *e = new TQDateEdit(m_item.value().toDate(), this); - connect(e, TQT_SIGNAL(valueChanged(const TQDate&)), - this, TQT_SLOT(slotDateChanged(const TQDate&))); - return e; -} - -TQWidget* KFileMetaInfoWidget::makeTimeWidget() -{ - return new TQTimeEdit(m_item.value().toTime(), this); -} - -TQWidget* KFileMetaInfoWidget::makeDateTimeWidget() -{ - return new TQDateTimeEdit(m_item.value().toDateTime(), this); -} - -void KFileMetaInfoWidget::reparentValidator( TQWidget *widget, - TQValidator *validator ) -{ - if ( !validator->parent() ) - widget->insertChild( validator ); -} - -// **************************************************************** -// now the slots that let us get notified if the value changed in the child -// **************************************************************** - -void KFileMetaInfoWidget::slotChanged(bool value) -{ - Q_ASSERT(m_widget->inherits(TQCOMBOBOX_OBJECT_NAME_STRING)); - m_value = TQVariant(value); - emit valueChanged(m_value); - m_dirty = true; -} - -void KFileMetaInfoWidget::slotChanged(int value) -{ - Q_ASSERT(m_widget->inherits(TQSPINBOX_OBJECT_NAME_STRING)); - m_value = TQVariant(value); - emit valueChanged(m_value); - m_dirty = true; -} - -void KFileMetaInfoWidget::slotChanged(double value) -{ - Q_ASSERT(m_widget->inherits("KDoubleNumInput")); - m_value = TQVariant(value); - emit valueChanged(m_value); - m_dirty = true; -} - -void KFileMetaInfoWidget::slotComboChanged(const TQString &value) -{ - Q_ASSERT(m_widget->inherits("KComboBox")); - m_value = TQVariant(value); - emit valueChanged(m_value); - m_dirty = true; -} - -void KFileMetaInfoWidget::slotLineEditChanged(const TQString& value) -{ - Q_ASSERT(m_widget->inherits("KLineEdit")); - m_value = TQVariant(value); - emit valueChanged(m_value); - m_dirty = true; -} - -// that may be a little expensive for long texts, but what can we do? -void KFileMetaInfoWidget::slotMultiLineEditChanged() -{ - Q_ASSERT(m_widget->inherits(TQTEXTEDIT_OBJECT_NAME_STRING)); - m_value = TQVariant( static_cast( sender() )->text() ); - emit valueChanged(m_value); - m_dirty = true; -} - -void KFileMetaInfoWidget::slotDateChanged(const TQDate& value) -{ - Q_ASSERT(m_widget->inherits(TQDATEEDIT_OBJECT_NAME_STRING)); - m_value = TQVariant(value); - emit valueChanged(m_value); - m_dirty = true; -} - -void KFileMetaInfoWidget::slotTimeChanged(const TQTime& value) -{ - Q_ASSERT(m_widget->inherits(TQTIMEEDIT_OBJECT_NAME_STRING)); - m_value = TQVariant(value); - emit valueChanged(m_value); - m_dirty = true; -} - -void KFileMetaInfoWidget::slotDateTimeChanged(const TQDateTime& value) -{ - Q_ASSERT(m_widget->inherits(TQDATETIMEEDIT_OBJECT_NAME_STRING)); - m_value = TQVariant(value); - emit valueChanged(m_value); - m_dirty = true; -} - -#include "kfilemetainfowidget.moc" diff --git a/kio/kfile/kfilemetainfowidget.h b/kio/kfile/kfilemetainfowidget.h deleted file mode 100644 index a42846bea..000000000 --- a/kio/kfile/kfilemetainfowidget.h +++ /dev/null @@ -1,95 +0,0 @@ -/* This file is part of the KDE libraries - Copyright (C) 2001,2002 Rolf Magnus - - library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License version 2 as published by the Free Software Foundation. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. - - */ - -#ifndef __KFILEMETAINFOWIDGET_H__ -#define __KFILEMETAINFOWIDGET_H__ - -#include -#include -#include - -/*! - * A widget to display file meta infos (like id3 for mp3) - */ -class TDEIO_EXPORT KFileMetaInfoWidget: public TQWidget -{ - Q_OBJECT -public: - enum Mode - { - ReadOnly = 1, ///Only display the meta infos, and do not permit the user to edit them - ReadWrite = 0, ///Permits user to edit the displayed meta-info - Reserve = 0xff - }; - - KFileMetaInfoWidget(KFileMetaInfoItem item, TQValidator* val = 0, - TQWidget* parent = 0, const char* name = 0); - - KFileMetaInfoWidget(KFileMetaInfoItem item, Mode mode, TQValidator* val = 0, - TQWidget* parent = 0, const char* name = 0); - - virtual ~KFileMetaInfoWidget(); - - bool apply() - { - return m_item.isEditable() && m_item.setValue(m_value); - } - - void setValue(const TQVariant& value) { m_value = value; } - TQVariant value()const { return m_value; } - TQValidator* validator() const { return m_validator; } - KFileMetaInfoItem item()const { return m_item; } - -signals: - void valueChanged(const TQVariant& value); - -protected: - void reparentValidator(TQWidget *widget, TQValidator *validator); - virtual TQWidget* makeWidget(); - - TQWidget* makeBoolWidget(); - TQWidget* makeIntWidget(); - TQWidget* makeDoubleWidget(); - TQWidget* makeStringWidget(); - TQWidget* makeDateWidget(); - TQWidget* makeTimeWidget(); - TQWidget* makeDateTimeWidget(); - -private slots: - void slotChanged(bool value); - void slotChanged(int value); - void slotChanged(double value); - void slotComboChanged(const TQString &value); - void slotLineEditChanged(const TQString& value); - void slotMultiLineEditChanged(); - void slotDateChanged(const TQDate& value); - void slotTimeChanged(const TQTime& value); - void slotDateTimeChanged(const TQDateTime& value); - -private: - void init(KFileMetaInfoItem item, Mode mode); - - TQVariant m_value; // the value will be saved here until apply() is called - KFileMetaInfoItem m_item; - TQWidget* m_widget; - TQValidator* m_validator; - bool m_dirty : 1; -}; - -#endif diff --git a/kio/kfile/kfilemetapreview.cpp b/kio/kfile/kfilemetapreview.cpp deleted file mode 100644 index 155e1194c..000000000 --- a/kio/kfile/kfilemetapreview.cpp +++ /dev/null @@ -1,196 +0,0 @@ -/* - * This file is part of the KDE project. - * Copyright (C) 2003 Carsten Pfeiffer - * - * You can Freely distribute this program under the GNU Library General Public - * License. See the file "COPYING" for the exact licensing terms. - */ - -#include "kfilemetapreview.h" - -#include - -#include -#include -#include -#include - -bool KFileMetaPreview::s_tryAudioPreview = true; - -KFileMetaPreview::KFileMetaPreview( TQWidget *parent, const char *name ) - : KPreviewWidgetBase( parent, name ), - haveAudioPreview( false ) -{ - TQHBoxLayout *layout = new TQHBoxLayout( this, 0, 0 ); - m_stack = new TQWidgetStack( this ); - layout->addWidget( m_stack ); - - // ### -// m_previewProviders.setAutoDelete( true ); - initPreviewProviders(); -} - -KFileMetaPreview::~KFileMetaPreview() -{ -} - -void KFileMetaPreview::initPreviewProviders() -{ - m_previewProviders.clear(); - // hardcoded so far - - // image previews - KImageFilePreview *imagePreview = new KImageFilePreview( m_stack ); - (void) m_stack->addWidget( imagePreview ); - m_stack->raiseWidget( imagePreview ); - resize( imagePreview->sizeHint() ); - - TQStringList mimeTypes = imagePreview->supportedMimeTypes(); - TQStringList::ConstIterator it = mimeTypes.begin(); - for ( ; it != mimeTypes.end(); ++it ) - { -// tqDebug(".... %s", (*it).latin1()); - m_previewProviders.insert( *it, imagePreview ); - } -} - -KPreviewWidgetBase * KFileMetaPreview::previewProviderFor( const TQString& mimeType ) -{ -// tqDebug("### looking for: %s", mimeType.latin1()); - // often the first highlighted item, where we can be sure, there is no plugin - // (this "folders reflect icons" is a konq-specific thing, right?) - if ( mimeType == "inode/directory" ) - return 0L; - - KPreviewWidgetBase *provider = m_previewProviders.find( mimeType ); - if ( provider ) - return provider; - -//tqDebug("#### didn't find anything for: %s", mimeType.latin1()); - - if ( s_tryAudioPreview && - !mimeType.startsWith("text/") && !mimeType.startsWith("image/") ) - { - if ( !haveAudioPreview ) - { - KPreviewWidgetBase *audioPreview = createAudioPreview( m_stack ); - if ( audioPreview ) - { - haveAudioPreview = true; - (void) m_stack->addWidget( audioPreview ); - TQStringList mimeTypes = audioPreview->supportedMimeTypes(); - TQStringList::ConstIterator it = mimeTypes.begin(); - for ( ; it != mimeTypes.end(); ++it ) - m_previewProviders.insert( *it, audioPreview ); - } - } - } - - // with the new mimetypes from the audio-preview, try again - provider = m_previewProviders.find( mimeType ); - if ( provider ) - return provider; - - // ### mimetype may be image/* for example, try that - int index = mimeType.find( '/' ); - if ( index > 0 ) - { - provider = m_previewProviders.find( mimeType.left( index + 1 ) + "*" ); - if ( provider ) - return provider; - } - - KMimeType::Ptr mimeInfo = KMimeType::mimeType( mimeType ); - if ( mimeInfo ) - { - // check mime type inheritance - TQString parentMimeType = mimeInfo->parentMimeType(); - while ( !parentMimeType.isEmpty() ) - { - provider = m_previewProviders.find( parentMimeType ); - if ( provider ) - return provider; - - KMimeType::Ptr parentMimeInfo = KMimeType::mimeType( parentMimeType ); - if ( !parentMimeInfo ) break; - - parentMimeType = parentMimeInfo->parentMimeType(); - } - - // check X-TDE-Text property - TQVariant textProperty = mimeInfo->property( "X-TDE-text" ); - if ( textProperty.isValid() && textProperty.type() == TQVariant::Bool ) - { - if ( textProperty.toBool() ) - { - provider = m_previewProviders.find( "text/plain" ); - if ( provider ) - return provider; - - provider = m_previewProviders.find( "text/*" ); - if ( provider ) - return provider; - } - } - } - - return 0L; -} - -void KFileMetaPreview::showPreview(const KURL &url) -{ - KMimeType::Ptr mt = KMimeType::findByURL( url ); - KPreviewWidgetBase *provider = previewProviderFor( mt->name() ); - if ( provider ) - { - if ( provider != m_stack->visibleWidget() ) // stop the previous preview - clearPreview(); - - m_stack->setEnabled( true ); - m_stack->raiseWidget( provider ); - provider->showPreview( url ); - } - else - { - clearPreview(); - m_stack->setEnabled( false ); - } -} - -void KFileMetaPreview::clearPreview() -{ - if ( m_stack->visibleWidget() ) - static_cast( m_stack->visibleWidget() )->clearPreview(); -} - -void KFileMetaPreview::addPreviewProvider( const TQString& mimeType, - KPreviewWidgetBase *provider ) -{ - m_previewProviders.insert( mimeType, provider ); -} - -void KFileMetaPreview::clearPreviewProviders() -{ - TQDictIterator it( m_previewProviders ); - for ( ; it.current(); ++it ) - m_stack->removeWidget( it.current() ); - - m_previewProviders.clear(); -} - -// static -KPreviewWidgetBase * KFileMetaPreview::createAudioPreview( TQWidget *parent ) -{ - KLibFactory *factory = KLibLoader::self()->factory( "kfileaudiopreview" ); - if ( !factory ) - { - s_tryAudioPreview = false; - return 0L; - } - - return dynamic_cast( factory->create( TQT_TQOBJECT(parent), "kfileaudiopreview" )); -} - -void KFileMetaPreview::virtual_hook( int, void* ) {} - -#include "kfilemetapreview.moc" diff --git a/kio/kfile/kfilemetapreview.h b/kio/kfile/kfilemetapreview.h deleted file mode 100644 index f26cd29b5..000000000 --- a/kio/kfile/kfilemetapreview.h +++ /dev/null @@ -1,56 +0,0 @@ -/* - * This file is part of the KDE project. - * Copyright (C) 2003 Carsten Pfeiffer - * - * You can Freely distribute this program under the GNU Library General Public - * License. See the file "COPYING" for the exact licensing terms. - */ - -#ifndef KFILEMETAPREVIEW_H -#define KFILEMETAPREVIEW_H - -#include -#include - -#include -#include - -class TDEIO_EXPORT KFileMetaPreview : public KPreviewWidgetBase -{ - Q_OBJECT - -public: - KFileMetaPreview(TQWidget *parent, const char *name = 0); - ~KFileMetaPreview(); - - virtual void addPreviewProvider( const TQString& mimeType, - KPreviewWidgetBase *provider ); - virtual void clearPreviewProviders(); - -public slots: - virtual void showPreview(const KURL &url); - virtual void clearPreview(); - -protected: - virtual KPreviewWidgetBase *previewProviderFor( const TQString& mimeType ); - -protected: - virtual void virtual_hook( int id, void* data ); - -private: - void initPreviewProviders(); - - TQWidgetStack *m_stack; - TQDict m_previewProviders; - bool haveAudioPreview; - - // may return 0L - static KPreviewWidgetBase * createAudioPreview( TQWidget *parent ); - static bool s_tryAudioPreview; - -private: - class KFileMetaPreviewPrivate; - KFileMetaPreviewPrivate *d; -}; - -#endif // KFILEMETAPREVIEW_H diff --git a/kio/kfile/kfilepreview.cpp b/kio/kfile/kfilepreview.cpp deleted file mode 100644 index 04124570b..000000000 --- a/kio/kfile/kfilepreview.cpp +++ /dev/null @@ -1,279 +0,0 @@ -/* This file is part of the KDE libraries - Copyright (C) 1998 Stephan Kulow - 1998 Daniel Grana - 2000 Werner Trobin - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include -#include -#include -#include - -#include - -#include "config-kfile.h" - -KFilePreview::KFilePreview(KFileView *view, TQWidget *parent, const char *name) - : TQSplitter(parent, name), KFileView() -{ - if ( view ) - init( view ); - else - init( new KFileIconView( (TQSplitter*) this, "left" )); -} - - -KFilePreview::KFilePreview(TQWidget *parent, const char *name) : - TQSplitter(parent, name), KFileView() -{ - init( new KFileIconView((TQSplitter*)this, "left") ); -} - -KFilePreview::~KFilePreview() -{ - // Why copy the actions in the first place? --ellis, 13 Jan 02. - //// don't delete the view's actions (inserted into our collection)! - //for ( uint i = 0; i < left->actionCollection()->count(); i++ ) - // actionCollection()->take( left->actionCollection()->action( i )); - - // don't delete the preview, we can reuse it - // (it will get deleted by ~KDirOperator) - if ( preview && preview->parentWidget() == this ) { - preview->reparent(0L, 0, TQPoint(0, 0), false); - } -} - -void KFilePreview::init( KFileView *view ) -{ - setViewName( i18n("Preview") ); - - left = 0L; - setFileView( view ); - - preview = new TQWidget((TQSplitter*)this, "preview"); - TQString tmp = i18n("No preview available."); - TQLabel *l = new TQLabel(tmp, preview); - l->setMinimumSize(l->sizeHint()); - l->move(10, 5); - preview->setMinimumWidth(l->sizeHint().width()+20); - setResizeMode(preview, TQSplitter::KeepSize); - - // Why copy the actions? --ellis, 13 Jan 02. - //for ( uint i = 0; i < view->actionCollection()->count(); i++ ) - // actionCollection()->insert( view->actionCollection()->action( i )); -} - -void KFilePreview::setFileView( KFileView *view ) -{ - Q_ASSERT( view ); - - // Why copy the actions? --ellis, 13 Jan 02. - //if ( left ) { // remove any previous actions - // for ( uint i = 0; i < left->actionCollection()->count(); i++ ) - // actionCollection()->take( left->actionCollection()->action( i )); - //} - - delete left; - view->widget()->reparent( this, TQPoint(0,0) ); - view->KFileView::setViewMode(All); - view->setParentView(this); - view->setSorting( sorting() ); - left = view; - - connect( left->signaler(), TQT_SIGNAL( fileHighlighted(const KFileItem*) ), - TQT_SLOT( slotHighlighted( const KFileItem * ))); - - // Why copy the actions? --ellis, 13 Jan 02. - //for ( uint i = 0; i < view->actionCollection()->count(); i++ ) - // actionCollection()->insert( view->actionCollection()->action( i )); -} - -// this url parameter is useless... it's the url of the current directory. -// what for? -void KFilePreview::setPreviewWidget(const TQWidget *w, const KURL &) -{ - left->setOnlyDoubleClickSelectsFiles( onlyDoubleClickSelectsFiles() ); - - if (w) { - connect(this, TQT_SIGNAL( showPreview(const KURL &) ), - w, TQT_SLOT( showPreview(const KURL &) )); - connect( this, TQT_SIGNAL( clearPreview() ), - w, TQT_SLOT( clearPreview() )); - } - else { - preview->hide(); - return; - } - - delete preview; - preview = const_cast(w); - preview->reparent((TQSplitter*)this, 0, TQPoint(0, 0), true); - preview->resize(preview->sizeHint()); - preview->show(); -} - -void KFilePreview::insertItem(KFileItem *item) -{ - KFileView::insertItem( item ); - left->insertItem(item); -} - -void KFilePreview::setSorting( TQDir::SortSpec sort ) -{ - left->setSorting( sort ); - KFileView::setSorting( left->sorting() ); -} - -void KFilePreview::clearView() -{ - left->clearView(); - emit clearPreview(); -} - -void KFilePreview::updateView(bool b) -{ - left->updateView(b); - if(preview) - preview->repaint(b); -} - -void KFilePreview::updateView(const KFileItem *i) -{ - left->updateView(i); -} - -void KFilePreview::removeItem(const KFileItem *i) -{ - if ( left->isSelected( i ) ) - emit clearPreview(); - - left->removeItem(i); - KFileView::removeItem( i ); -} - -void KFilePreview::listingCompleted() -{ - left->listingCompleted(); -} - -void KFilePreview::clear() -{ - KFileView::clear(); - left->KFileView::clear(); -} - -void KFilePreview::clearSelection() -{ - left->clearSelection(); - emit clearPreview(); -} - -void KFilePreview::selectAll() -{ - left->selectAll(); -} - -void KFilePreview::invertSelection() -{ - left->invertSelection(); -} - -bool KFilePreview::isSelected( const KFileItem *i ) const -{ - return left->isSelected( i ); -} - -void KFilePreview::setSelectionMode(KFile::SelectionMode sm) { - left->setSelectionMode( sm ); -} - -void KFilePreview::setSelected(const KFileItem *item, bool enable) { - left->setSelected( item, enable ); -} - -void KFilePreview::setCurrentItem( const KFileItem *item ) -{ - left->setCurrentItem( item ); -} - -KFileItem * KFilePreview::currentFileItem() const -{ - return left->currentFileItem(); -} - -void KFilePreview::slotHighlighted(const KFileItem* item) -{ - if ( item ) - emit showPreview( item->url() ); - - else { // item = 0 -> multiselection mode - const KFileItemList *items = selectedItems(); - if ( items->count() == 1 ) - emit showPreview( items->getFirst()->url() ); - else - emit clearPreview(); - } - - // the preview widget appears and takes some space of the left view, - // so we may have to scroll to make the current item visible - left->ensureItemVisible(item); - } - -void KFilePreview::ensureItemVisible(const KFileItem *item) -{ - left->ensureItemVisible(item); -} - -KFileItem * KFilePreview::firstFileItem() const -{ - return left->firstFileItem(); -} - -KFileItem * KFilePreview::nextItem( const KFileItem *item ) const -{ - return left->nextItem( item ); -} - -KFileItem * KFilePreview::prevItem( const KFileItem *item ) const -{ - return left->prevItem( item ); -} - -KActionCollection * KFilePreview::actionCollection() const -{ - if ( left ) - return left->actionCollection(); - else { - kdWarning() << "KFilePreview::actionCollection(): called before setFileView()." << endl; //ellis - return KFileView::actionCollection(); - } -} - -void KFilePreview::readConfig( TDEConfig *config, const TQString& group ) -{ - left->readConfig( config, group ); -} - -void KFilePreview::writeConfig( TDEConfig *config, const TQString& group ) -{ - left->writeConfig( config, group ); -} - -void KFilePreview::virtual_hook( int id, void* data ) -{ KFileView::virtual_hook( id, data ); } - diff --git a/kio/kfile/kfilepreview.h b/kio/kfile/kfilepreview.h deleted file mode 100644 index af6fe13d2..000000000 --- a/kio/kfile/kfilepreview.h +++ /dev/null @@ -1,122 +0,0 @@ -/* -*- c++ -*- - This file is part of the KDE libraries - Copyright (C) 1998 Stephan Kulow - 1998 Daniel Grana - 2000 Werner Trobin - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef _KFILEPREVIEW_H -#define _KFILEPREVIEW_H - -#include -#include -#include - -#include -#include -#include -#include -#include - -/*! - * This KFileView is an empbedded preview for some file types. - */ -class TDEIO_EXPORT KFilePreview : public TQSplitter, public KFileView -{ - Q_OBJECT - -public: - KFilePreview(TQWidget *parent, const char *name); - KFilePreview(KFileView *view, TQWidget *parent, const char *name); - virtual ~KFilePreview(); - - virtual TQWidget *widget() { return this; } - virtual void clearView(); - - /** - * Delets the current view and sets the view to the given @p view. - * The view is reparented to have this as parent, if necessary. - */ - void setFileView(KFileView *view); - - /** - * @returns the current fileview - */ - KFileView* fileView() const { return left; } - - virtual void updateView( bool ); - virtual void updateView(const KFileItem*); - virtual void removeItem(const KFileItem*); - virtual void listingCompleted(); - - virtual void setSelectionMode( KFile::SelectionMode sm ); - - virtual void setSelected(const KFileItem *, bool); - virtual bool isSelected( const KFileItem * ) const; - virtual void clearSelection(); - virtual void selectAll(); - virtual void invertSelection(); - - virtual void insertItem(KFileItem *); - virtual void clear(); - - virtual void setCurrentItem( const KFileItem * ); - virtual KFileItem * currentFileItem() const; - virtual KFileItem * firstFileItem() const; - virtual KFileItem * nextItem( const KFileItem * ) const; - virtual KFileItem * prevItem( const KFileItem * ) const; - - virtual void setSorting( TQDir::SortSpec sort ); - - virtual void readConfig( TDEConfig *, const TQString& group = TQString::null ); - virtual void writeConfig( TDEConfig *, const TQString& group = TQString::null); - - /** - * This overrides KFileView::actionCollection() by returning - * the actionCollection() of the KFileView (member left) it contains. - * This means that KFilePreview will never create a KActionCollection - * object of its own. - */ - virtual KActionCollection * actionCollection() const; - - void ensureItemVisible(const KFileItem *); - - void setPreviewWidget(const TQWidget *w, const KURL &u); - -protected slots: - virtual void slotHighlighted( const KFileItem * ); - -signals: - void showPreview(const KURL &); - void clearPreview(); - -private: - void init( KFileView *view ); - - KFileView *left; - TQWidget *preview; - TQString viewname; - -protected: - /** \internal */ - virtual void virtual_hook( int id, void* data ); -private: - class KFilePreviewPrivate; - KFilePreviewPrivate *d; -}; -#endif diff --git a/kio/kfile/kfilesharedlg.cpp b/kio/kfile/kfilesharedlg.cpp deleted file mode 100644 index e9b4c2673..000000000 --- a/kio/kfile/kfilesharedlg.cpp +++ /dev/null @@ -1,325 +0,0 @@ -/* This file is part of the KDE project - Copyright (c) 2001 David Faure - Copyright (c) 2001 Laurent Montel - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License version 2 as published by the Free Software Foundation. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include "kfilesharedlg.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -class KFileSharePropsPlugin::Private -{ -public: - TQVBox *m_vBox; - TDEProcess *m_configProc; - bool m_bAllShared; - bool m_bAllUnshared; - bool m_bAllReadOnly; -}; - -KFileSharePropsPlugin::KFileSharePropsPlugin( KPropertiesDialog *_props ) - : KPropsDlgPlugin( _props ) -{ - d = new Private; - d->m_vBox = _props->addVBoxPage( i18n("&Share") ); - d->m_configProc = 0; - properties->setFileSharingPage(d->m_vBox); - m_widget = 0L; - init(); -} - -KFileSharePropsPlugin::~KFileSharePropsPlugin() -{ - if (d->m_configProc) - d->m_configProc->detach(); // Detach to prevent that we kill the process - delete d; -} - -bool KFileSharePropsPlugin::supports( const KFileItemList& items ) -{ - // Do not show dialog if in advanced mode, - // because the advanced dialog is shown already. - if (KFileShare::shareMode() == KFileShare::Advanced) { - kdDebug() << "KFileSharePropsPlugin::supports: false because sharemode is advanced" << endl; - return false; - } - - KFileItemListIterator it( items ); - for ( ; it.current(); ++it ) - { - bool isLocal = ( *it )->isLocalFile(); - // We only support local dirs - if ( !(*it)->isDir() || !isLocal ) - return false; - // And sharing the trash doesn't make sense - if ( isLocal && (*it)->url().path( 1 ) == TDEGlobalSettings::trashPath() ) - return false; - } - return true; -} - -void KFileSharePropsPlugin::init() -{ - // We store the main widget, so that it's possible (later) to call init() - // more than once, to update the page if something changed (e.g. after - // the user has been authorized) - delete m_widget; - m_rbShare = 0L; - m_rbUnShare = 0L; - m_rbSharerw = 0L; - m_widget = new TQWidget( d->m_vBox ); - TQVBoxLayout * vbox = new TQVBoxLayout( m_widget ); - //TQHBoxLayout * hbox = new TQHBoxLayout( vbox ); - - switch ( KFileShare::authorization() ) { - case KFileShare::Authorized: - { - // Check if all selected dirs are in $HOME - TQString home = TQDir::homeDirPath(); - if ( home[home.length()-1] != '/' ) - home += '/'; - bool ok = true; - KFileItemList items = properties->items(); - // We have 3 possibilities: all shared, all unshared (ro,rw), or mixed. - d->m_bAllShared = true; - d->m_bAllUnshared = true; - d->m_bAllReadOnly = true; - KFileItemListIterator it( items ); - for ( ; it.current() && ok; ++it ) { - TQString path = (*it)->url().path(); - // 0 => not shared - // 1 => shared read only - // 3 => shared writeable - int dirStatus = KFileShare::isDirectoryShared( path ); - if ( !path.startsWith( home ) ) - ok = false; - if ( dirStatus == 1 ) { - d->m_bAllUnshared = false; - } - else if ( dirStatus == 3 ) { - d->m_bAllUnshared = false; - d->m_bAllReadOnly = false; - } - else { - d->m_bAllReadOnly = false; - } - } - if ( !ok ) - { - vbox->addWidget( new TQLabel( i18n( "Only folders in your home folder can be shared."), - m_widget ), 0 ); - } - else - { - // Everything ok, show the share/unshare GUI - vbox->setSpacing( KDialog::spacingHint() ); - vbox->setMargin( KDialog::marginHint() ); - - TQButtonGroup *rbGroup = new TQButtonGroup( m_widget ); - rbGroup->hide(); - m_rbUnShare = new TQRadioButton( i18n("Not shared"), m_widget ); - connect( m_rbUnShare, TQT_SIGNAL( toggled(bool) ), TQT_SIGNAL( changed() ) ); - vbox->addWidget( m_rbUnShare, 0 ); - rbGroup->insert( m_rbUnShare ); - - m_rbShare = new TQRadioButton( i18n("Shared - read only for others"), m_widget ); - connect( m_rbShare, TQT_SIGNAL( toggled(bool) ), TQT_SIGNAL( changed() ) ); - vbox->addWidget( m_rbShare, 0 ); - rbGroup->insert( m_rbShare ); - - m_rbSharerw = new TQRadioButton( i18n("Shared - writeable for others"), m_widget ); - connect( m_rbSharerw, TQT_SIGNAL( toggled(bool) ), TQT_SIGNAL( changed() ) ); - vbox->addWidget( m_rbSharerw, 0 ); - rbGroup->insert( m_rbSharerw ); - - //TQLabel *testlabel1 = new TQLabel(i18n("Enter Samba Share Name here"),m_widget); - //m_leSmbShareName = new TQLineEdit(m_widget); - //m_leSmbShareName->setMaxLength(12); - - //hbox->addWidget( testlabel1, 0 ); - //hbox->addWidget( m_leSmbShareName ); - //vbox->addLayout( hbox ); - - // Activate depending on status - if ( d->m_bAllShared ) - m_rbSharerw->setChecked(true); - if ( d->m_bAllUnshared ) - m_rbUnShare->setChecked(true); - if ( d->m_bAllReadOnly ) - m_rbShare->setChecked(true); - - // Some help text - TQLabel *label = new TQLabel( i18n("Sharing this folder makes it available under Linux/UNIX (NFS) and Windows (Samba).") , m_widget ); - label->setAlignment( TQt::AlignAuto | TQt::AlignVCenter | TQt::WordBreak ); - vbox->addWidget( label, 0 ); - - KSeparator* sep=new KSeparator(m_widget); - vbox->addWidget( sep, 0 ); - label = new TQLabel( i18n("You can also reconfigure file sharing authorization.") , m_widget ); - label->setAlignment( TQt::AlignAuto | TQt::AlignVCenter | TQt::WordBreak ); - vbox->addWidget( label, 0 ); - m_pbConfig = new TQPushButton( i18n("Configure File Sharing..."), m_widget ); - connect( m_pbConfig, TQT_SIGNAL( clicked() ), TQT_SLOT( slotConfigureFileSharing() ) ); - vbox->addWidget( m_pbConfig, 0, Qt::AlignHCenter ); - - vbox->addStretch( 10 ); - - if( !KFileShare::sambaActive() && !KFileShare::nfsActive()) - m_widget->setEnabled( false ); - } - } - break; - case KFileShare::ErrorNotFound: - vbox->addWidget( new TQLabel( i18n("Error running 'filesharelist'. Check if installed and in $PATH or /usr/sbin."), - m_widget ), 0 ); - break; - case KFileShare::UserNotAllowed: - { - vbox->setSpacing( 10 ); - if (KFileShare::sharingEnabled()) { - vbox->addWidget( new TQLabel( i18n("You need to be authorized to share folders."), - m_widget ), 0 ); - } else { - vbox->addWidget( new TQLabel( i18n("File sharing is disabled."), - m_widget ), 0 ); - } - TQHBoxLayout* hBox = new TQHBoxLayout( (TQWidget *)0L ); - vbox->addLayout( hBox, 0 ); - m_pbConfig = new TQPushButton( i18n("Configure File Sharing..."), m_widget ); - connect( m_pbConfig, TQT_SIGNAL( clicked() ), TQT_SLOT( slotConfigureFileSharing() ) ); - hBox->addWidget( m_pbConfig, 0, Qt::AlignHCenter ); - vbox->addStretch( 10 ); // align items on top - break; - } - case KFileShare::NotInitialized: - kdWarning() << "KFileShare Authorization still NotInitialized after calling authorization() - impossible" << endl; - break; - } - m_widget->show(); // In case the dialog was shown already. -} - -void KFileSharePropsPlugin::slotConfigureFileSharing() -{ - if (d->m_configProc) return; - - d->m_configProc = new TDEProcess(this); - (*d->m_configProc) << KStandardDirs::findExe("tdesu") << locate("exe", "kcmshell") << "fileshare"; - if (!d->m_configProc->start( TDEProcess::NotifyOnExit )) - { - delete d->m_configProc; - d->m_configProc = 0; - return; - } - connect(d->m_configProc, TQT_SIGNAL(processExited(TDEProcess *)), - this, TQT_SLOT(slotConfigureFileSharingDone())); - m_pbConfig->setEnabled(false); -} - -void KFileSharePropsPlugin::slotConfigureFileSharingDone() -{ - delete d->m_configProc; - d->m_configProc = 0; - KFileShare::readConfig(); - KFileShare::readShareList(); - init(); -} - -void KFileSharePropsPlugin::applyChanges() -{ - kdDebug() << "KFileSharePropsPlugin::applyChanges" << endl; - if ( m_rbShare && m_rbUnShare && m_rbSharerw ) - { - bool share = m_rbShare->isChecked(); - - if (share && d->m_bAllShared) - return; // Nothing to do - if (!share && d->m_bAllUnshared) - return; // Nothing to do - - KFileItemList items = properties->items(); - KFileItemListIterator it( items ); - bool ok = true; - for ( ; it.current() && ok; ++it ) { - TQString path = (*it)->url().path(); - ok = SuSEsetShared( path, share, m_rbSharerw->isChecked() ); - if (!ok) { - if (share) - KMessageBox::detailedError(properties, - i18n("Sharing folder '%1' failed.").arg(path), - i18n("An error occurred while trying to share folder '%1'. " - "Make sure that the Perl script 'fileshareset' is set suid root.") - .arg(path)); - else - KMessageBox::error(properties, - i18n("Unsharing folder '%1' failed.").arg(path), - i18n("An error occurred while trying to unshare folder '%1'. " - "Make sure that the Perl script 'fileshareset' is set suid root.") - .arg(path)); - - properties->abortApplying(); - break; - } - } - - // Get the change back into our cached info - KFileShare::readShareList(); - } -} - -bool KFileSharePropsPlugin::setShared( const TQString& path, bool shared ) -{ - return SuSEsetShared( path, shared, true ); -} - -bool KFileSharePropsPlugin::SuSEsetShared( const TQString& path, bool shared, bool readonly ) -{ - kdDebug() << "KFileSharePropsPlugin::setShared " << path << "," - << shared << readonly << endl; - return KFileShare::SuSEsetShared( path, shared, readonly ); -} - -TQWidget* KFileSharePropsPlugin::page() const -{ - return d->m_vBox; -} - -#include "kfilesharedlg.moc" - -//TODO: do we need to monitor /etc/security/fileshare.conf ? -// if the user is added to the 'fileshare' group, we wouldn't be notified -// Of course the config module can notify us. -// TODO: listen to such notifications ;) diff --git a/kio/kfile/kfilesharedlg.h b/kio/kfile/kfilesharedlg.h deleted file mode 100644 index e7998ad66..000000000 --- a/kio/kfile/kfilesharedlg.h +++ /dev/null @@ -1,70 +0,0 @@ -/* This file is part of the KDE project - Copyright (c) 2001 David Faure - Copyright (c) 2001 Laurent Montel - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License version 2 as published by the Free Software Foundation. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef kfilesharedlg_h -#define kfilesharedlg_h - -#include -class TQVBoxLayout; -class TQRadioButton; -class TQPushButton; - -/** - * This plugin provides a page to KPropsDlg, showing the "file sharing" options - * @author David Faure - * @since 3.1 - */ -class TDEIO_EXPORT KFileSharePropsPlugin : public KPropsDlgPlugin -{ - Q_OBJECT -public: - KFileSharePropsPlugin( KPropertiesDialog *_props ); - virtual ~KFileSharePropsPlugin(); - - /** - * Apply all changes to the file. - * This function is called when the user presses 'Ok'. The last plugin inserted - * is called first. - */ - virtual void applyChanges(); - - static bool supports( const KFileItemList& items ); - - TQWidget* page() const; - -protected slots: - void slotConfigureFileSharing(); - void slotConfigureFileSharingDone(); - -private: - void init(); - bool setShared( const TQString&path, bool shared ); - bool SuSEsetShared( const TQString&path, bool shared, bool readonly ); - - TQWidget *m_widget; - TQRadioButton *m_rbShare; - TQRadioButton *m_rbSharerw; - TQRadioButton *m_rbUnShare; - //TQLineEdit *m_leSmbShareName; - TQPushButton *m_pbConfig; - class Private; - Private *d; -}; - -#endif diff --git a/kio/kfile/kfilespeedbar.cpp b/kio/kfile/kfilespeedbar.cpp deleted file mode 100644 index 567d929eb..000000000 --- a/kio/kfile/kfilespeedbar.cpp +++ /dev/null @@ -1,147 +0,0 @@ -/* This file is part of the KDE libraries - Copyright (C) 2002 Carsten Pfeiffer - - library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation, version 2. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include "kfilespeedbar.h" -#include "config-kfile.h" - -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -KFileSpeedBar::KFileSpeedBar( TQWidget *parent, const char *name ) - : KURLBar( true, parent, name ) -{ - TDEConfig *config = TDEGlobal::config(); - TDEConfigGroupSaver cs( config, ConfigGroup ); - m_initializeSpeedbar = config->readBoolEntry( "Set speedbar defaults", - true ); - setIconSize(KIcon::SizeSmallMedium); - readConfig( TDEGlobal::config(), "KFileDialog Speedbar" ); - - if ( m_initializeSpeedbar ) - { - KURL u; - u.setPath( TDEGlobalSettings::desktopPath() ); - insertItem( u, i18n("Desktop"), false ); - -//TODO: win32 - if ((TDEGlobalSettings::documentPath() != (TQDir::homeDirPath()+"/")) && - TQDir(TDEGlobalSettings::documentPath()).exists()) - { - u.setPath( TDEGlobalSettings::documentPath() ); - insertItem( u, i18n("Documents"), false, "folder_txt" ); - } - - u.setPath( TQDir::homeDirPath() ); - insertItem( u, i18n("Home Folder"), false, - "folder_home" ); - - u = "media:/"; - if ( KProtocolInfo::isKnownProtocol( u ) ) - insertItem( u, i18n("Storage Media"), false, - KProtocolInfo::icon( "media" ) ); - - if ( TQFile::exists( TQDir::homeDirPath()+"/.config/user-dirs.dirs" ) ) - { - TQString download, music, pictures, videos, templates, publicShares; - - TQFile f( TQDir::homeDirPath()+"/.config/user-dirs.dirs" ); - if (!f.open(IO_ReadOnly)) - return; - - TQTextStream s( &f ); - s.setCodec( TQTextCodec::codecForLocale() ); - - // read the xdg user dirs - TQString line = s.readLine(); - while (!line.isNull()) - { - if (line.startsWith("XDG_DOWNLOAD_DIR=")) - download = line.remove("XDG_DOWNLOAD_DIR=").remove("\"").replace("$HOME", TQDir::homeDirPath()); - else if (line.startsWith("XDG_MUSIC_DIR=")) - music = line.remove("XDG_MUSIC_DIR=").remove("\"").replace("$HOME", TQDir::homeDirPath()); - else if (line.startsWith("XDG_PICTURES_DIR=")) - pictures = line.remove("XDG_PICTURES_DIR=").remove("\"").replace("$HOME", TQDir::homeDirPath()); - else if (line.startsWith("XDG_VIDEOS_DIR=")) - videos = line.remove("XDG_VIDEOS_DIR=").remove("\"").replace("$HOME", TQDir::homeDirPath()); - else if (line.startsWith("XDG_TEMPLATES_DIR=")) - templates = line.remove("XDG_TEMPLATES_DIR=").remove("\"").replace("$HOME", TQDir::homeDirPath()); - else if (line.startsWith("XDG_PUBLICSHARES_DIR=")) - publicShares = line.remove("XDG_PUBLICSHARES_DIR=").remove("\"").replace("$HOME", TQDir::homeDirPath()); - - line = s.readLine(); - } - // now add in the speedbar - if (!download.isEmpty()) - insertItem( download, i18n( "Download" ), false, "folder_html" ); - if (!music.isEmpty()) - insertItem( music, i18n( "Music" ), false, "folder_sound" ); - if (!pictures.isEmpty()) - insertItem( pictures, i18n( "Pictures" ), false, "folder_image" ); - if (!videos.isEmpty()) - insertItem( videos, i18n( "Videos" ), false, "folder_video" ); - if (!templates.isEmpty()) - insertItem( templates, i18n( "Templates" ), false, "folder_video" ); - if (!publicShares.isEmpty()) - insertItem( publicShares, i18n( "Public" ), false, "folder_video" ); - } - - u = "remote:/"; - if ( KProtocolInfo::isKnownProtocol( u ) ) - insertItem( u, i18n("Network Folders"), false, - KProtocolInfo::icon( "remote" ) ); - } -} - -KFileSpeedBar::~KFileSpeedBar() -{ -} - -void KFileSpeedBar::save( TDEConfig *config ) -{ - if ( m_initializeSpeedbar && isModified() ) - { - TDEConfigGroup conf( config, ConfigGroup ); - // write to kdeglobals - conf.writeEntry( "Set speedbar defaults", false, true, true ); - } - - writeConfig( config, "KFileDialog Speedbar" ); -} - -TQSize KFileSpeedBar::sizeHint() const -{ - TQSize sizeHint = KURLBar::sizeHint(); - int ems = fontMetrics().width("mmmmmmmmmmmm"); - if (sizeHint.width() < ems) - { - sizeHint.setWidth(ems); - } - return sizeHint; -} - -#include "kfilespeedbar.moc" diff --git a/kio/kfile/kfilespeedbar.h b/kio/kfile/kfilespeedbar.h deleted file mode 100644 index d1c2a689e..000000000 --- a/kio/kfile/kfilespeedbar.h +++ /dev/null @@ -1,41 +0,0 @@ -/* This file is part of the KDE libraries - Copyright (C) 2002 Carsten Pfeiffer - - library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation, version 2. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef KFILESPEEDBAR_H -#define KFILESPEEDBAR_H - -#include - -class TDEConfig; - -class TDEIO_EXPORT KFileSpeedBar : public KURLBar -{ - Q_OBJECT -public: - KFileSpeedBar( TQWidget *parent = 0, const char *name = 0 ); - ~KFileSpeedBar(); - - virtual void save( TDEConfig *config ); - virtual TQSize sizeHint() const; - -private: - bool m_initializeSpeedbar : 1; - -}; - -#endif // KFILESPEEDBAR_H diff --git a/kio/kfile/kfiletreebranch.cpp b/kio/kfile/kfiletreebranch.cpp deleted file mode 100644 index 352bd875e..000000000 --- a/kio/kfile/kfiletreebranch.cpp +++ /dev/null @@ -1,528 +0,0 @@ -/* This file is part of the KDEproject - Copyright (C) 2000 David Faure - 2000 Carsten Pfeiffer - 2002 Klaas Freitag - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License version 2 as published by the Free Software Foundation. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include - -#include -#include -#include - -#include -#include -#include - -#include "kfiletreeviewitem.h" -#include "kfiletreebranch.h" - - -/* --- KFileTreeViewToplevelItem --- */ -KFileTreeBranch::KFileTreeBranch( KFileTreeView *parent, const KURL& url, - const TQString& name, - const TQPixmap& pix, bool showHidden, - KFileTreeViewItem *branchRoot ) - - : KDirLister( false ), - m_root( branchRoot ), - m_startURL( url ), - m_name ( name ), - m_rootIcon( pix ), - m_openRootIcon( pix ), - m_recurseChildren(true), - m_showExtensions(true) -{ - kdDebug( 250) << "Creating branch for url " << url.prettyURL() << endl; - - /* if non exists, create one */ - if( ! branchRoot ) - { - m_root = new KFileTreeViewItem( parent, - new KFileItem( url, "inode/directory", - S_IFDIR ), - this ); - } - - m_root->setExpandable( true ); - m_root->setPixmap( 0, pix ); - m_root->setText( 0, name ); - - setShowingDotFiles( showHidden ); - - connect( this, TQT_SIGNAL( refreshItems(const KFileItemList&)), - this, TQT_SLOT ( slotRefreshItems( const KFileItemList& ))); - - connect( this, TQT_SIGNAL( newItems(const KFileItemList&)), - this, TQT_SLOT ( addItems( const KFileItemList& ))); - - connect( this, TQT_SIGNAL( completed(const KURL& )), - this, TQT_SLOT(slCompleted(const KURL&))); - - connect( this, TQT_SIGNAL( started( const KURL& )), - this, TQT_SLOT( slotListerStarted( const KURL& ))); - - connect( this, TQT_SIGNAL( deleteItem( KFileItem* )), - this, TQT_SLOT( slotDeleteItem( KFileItem* ))); - - connect( this, TQT_SIGNAL( canceled(const KURL&) ), - this, TQT_SLOT( slotCanceled(const KURL&) )); - - connect( this, TQT_SIGNAL( clear()), - this, TQT_SLOT( slotDirlisterClear())); - - connect( this, TQT_SIGNAL( clear(const KURL&)), - this, TQT_SLOT( slotDirlisterClearURL(const KURL&))); - - connect( this, TQT_SIGNAL( redirection( const KURL& , const KURL& ) ), - this, TQT_SLOT( slotRedirect( const KURL&, const KURL& ))); - - m_openChildrenURLs.append( url ); -} - -void KFileTreeBranch::setOpenPixmap( const TQPixmap& pix ) -{ - m_openRootIcon = pix; - - if( root()->isOpen()) - { - root()->setPixmap( 0, pix ); - } -} - -void KFileTreeBranch::slotListerStarted( const KURL &url ) -{ - /* set the parent correct if it is zero. */ - kdDebug( 250) << "Starting to list " << url.prettyURL() << endl; -} - - -KFileTreeViewItem *KFileTreeBranch::parentKFTVItem( KFileItem *item ) -{ - KFileTreeViewItem *parent = 0; - - if( ! item ) return 0; - - /* If it is a directory, check, if it exists in the dict. If not, go one up - * and check again. - */ - KURL url = item->url(); - // kdDebug(250) << "Item's url is " << url.prettyURL() << endl; - KURL dirUrl( url ); - dirUrl.setFileName( TQString::null ); - // kdDebug(250) << "Directory url is " << dirUrl.prettyURL() << endl; - - parent = findTVIByURL( dirUrl ); - // kdDebug(250) << "Returning as parent item <" << parent << ">" << endl; - return( parent ); -} - - -void KFileTreeBranch::slotRefreshItems( const KFileItemList& list ) -{ - KFileItemListIterator it( list ); - kdDebug(250) << "Refreshing " << list.count() << " items !" << endl; - KFileItem *currItem; - KFileTreeViewItem *item = 0; - - while ( (currItem = it.current()) != 0 ) - { - item = findTVIByURL(currItem->url()); - if (item) { - item->setPixmap(0, item->fileItem()->pixmap( KIcon::SizeSmall )); - item->setText( 0, item->fileItem()->text()); - } - ++it; - } -} - -void KFileTreeBranch::addItems( const KFileItemList& list ) -{ - KFileItemListIterator it( list ); - kdDebug(250) << "Adding " << list.count() << " items !" << endl; - KFileItem *currItem; - KFileTreeViewItemList treeViewItList; - KFileTreeViewItem *parentItem = 0; - - while ( (currItem = it.current()) != 0 ) - { - parentItem = parentKFTVItem( currItem ); - - - /* Only create a new KFileTreeViewItem if it does not yet exist */ - KFileTreeViewItem *newKFTVI = - static_cast(currItem->extraData( this )); - - if( ! newKFTVI ) - { - newKFTVI = createTreeViewItem( parentItem, currItem ); - if (!newKFTVI) - { - // TODO: Don't fail if parentItem == 0 - ++it; - continue; - } - currItem->setExtraData( this, newKFTVI ); - - /* Cut off the file extension in case it is not a directory */ - if( !m_showExtensions && !currItem->isDir() ) /* Need to cut the extension */ - { - TQString name = currItem->text(); - int mPoint = name.findRev( '.' ); - if( mPoint > 0 ) - name = name.left( mPoint ); - newKFTVI->setText( 0, name ); - } - } - - /* Now try to find out if there are children for dirs in the treeview */ - /* This stats a directory on the local file system and checks the */ - /* hardlink entry in the stat-buf. This works only for local directories. */ - if( dirOnlyMode() && !m_recurseChildren && currItem->isLocalFile( ) && currItem->isDir() ) - { - KURL url = currItem->url(); - TQString filename = url.directory( false, true ) + url.fileName(); - /* do the stat trick of Carsten. The problem is, that the hardlink - * count only contains directory links. Thus, this method only seem - * to work in dir-only mode */ - kdDebug(250) << "Doing stat on " << filename << endl; - KDE_struct_stat statBuf; - if( KDE_stat( TQFile::encodeName( filename ), &statBuf ) == 0 ) - { - int hardLinks = statBuf.st_nlink; /* Count of dirs */ - kdDebug(250) << "stat succeeded, hardlinks: " << hardLinks << endl; - // If the link count is > 2, the directory likely has subdirs. If it's < 2 - // it's something weird like a mounted SMB share. In that case we don't know - // if there are subdirs, thus show it as expandable. - - if( hardLinks != 2 ) - { - newKFTVI->setExpandable(true); - } - else - { - newKFTVI->setExpandable(false); - } - if( hardLinks >= 2 ) // "Normal" directory with subdirs - { - kdDebug(250) << "Emitting for " << url.prettyURL() << endl; - emit( directoryChildCount( newKFTVI, hardLinks-2)); // parentItem, hardLinks-1 )); - } - } - else - { - kdDebug(250) << "stat of " << filename << " failed !" << endl; - } - } - ++it; - - treeViewItList.append( newKFTVI ); - } - - emit newTreeViewItems( this, treeViewItList ); -} - -KFileTreeViewItem* KFileTreeBranch::createTreeViewItem( KFileTreeViewItem *parent, - KFileItem *fileItem ) -{ - KFileTreeViewItem *tvi = 0; - if( parent && fileItem ) - { - tvi = new KFileTreeViewItem( parent, - fileItem, - this ); - } - else - { - kdDebug(250) << "createTreeViewItem: Have no parent" << endl; - } - return( tvi ); -} - -void KFileTreeBranch::setChildRecurse( bool t ) -{ - m_recurseChildren = t; - if( t == false ) - m_openChildrenURLs.clear(); -} - - -void KFileTreeBranch::setShowExtensions( bool visible ) -{ - m_showExtensions = visible; -} - -bool KFileTreeBranch::showExtensions( ) const -{ - return( m_showExtensions ); -} - -/* - * The signal that tells that a directory was deleted may arrive before the signal - * for its children arrive. Thus, we must walk through the children of a dir and - * remove them before removing the dir itself. - */ -void KFileTreeBranch::slotDeleteItem( KFileItem *it ) -{ - if( !it ) return; - kdDebug(250) << "Slot Delete Item hitted for " << it->url().prettyURL() << endl; - - KFileTreeViewItem *kfti = static_cast(it->extraData(this)); - - if( kfti ) - { - kdDebug( 250 ) << "Child count: " << kfti->childCount() << endl; - if( kfti->childCount() > 0 ) - { - KFileTreeViewItem *child = static_cast(kfti->firstChild()); - - while( child ) - { - kdDebug(250) << "Calling child to be deleted !" << endl; - KFileTreeViewItem *nextChild = static_cast(child->nextSibling()); - slotDeleteItem( child->fileItem()); - child = nextChild; - } - } - - kdDebug(250) << "Found corresponding KFileTreeViewItem" << endl; - if( m_lastFoundURL.equals(it->url(), true )) - { - m_lastFoundURL = KURL(); - m_lastFoundItem = 0L; - } - delete( kfti ); - } - else - { - kdDebug(250) << "Error: kfiletreeviewitem: "<< kfti << endl; - } -} - - -void KFileTreeBranch::slotCanceled( const KURL& url ) -{ - // ### anything else to do? - // remove the url from the childrento-recurse-list - m_openChildrenURLs.remove( url); - - // stop animations etc. - KFileTreeViewItem *item = findTVIByURL(url); - if (!item) return; // Uh oh... - emit populateFinished(item); -} - -void KFileTreeBranch::slotDirlisterClear() -{ - kdDebug(250)<< "*** Clear all !" << endl; - /* this slots needs to clear all listed items, but NOT the root item */ - if( m_root ) - deleteChildrenOf( m_root ); -} - -void KFileTreeBranch::slotDirlisterClearURL( const KURL& url ) -{ - kdDebug(250)<< "*** Clear for URL !" << url.prettyURL() << endl; - KFileItem *item = findByURL( url ); - if( item ) - { - KFileTreeViewItem *ftvi = - static_cast(item->extraData( this )); - deleteChildrenOf( ftvi ); - } -} - -void KFileTreeBranch::deleteChildrenOf( TQListViewItem *parent ) -{ - // for some strange reason, slotDirlisterClearURL() sometimes calls us - // with a 0L parent. - if ( !parent ) - return; - - while ( parent->firstChild() ) - delete parent->firstChild(); -} - -void KFileTreeBranch::slotRedirect( const KURL& oldUrl, const KURL&newUrl ) -{ - if( oldUrl.equals( m_startURL, true )) - { - m_startURL = newUrl; - } -} - -KFileTreeViewItem* KFileTreeBranch::findTVIByURL( const KURL& url ) -{ - KFileTreeViewItem *resultItem = 0; - - if( m_startURL.equals(url, true) ) - { - kdDebug(250) << "findByURL: Returning root as a parent !" << endl; - resultItem = m_root; - } - else if( m_lastFoundURL.equals( url, true )) - { - kdDebug(250) << "findByURL: Returning from lastFoundURL!" << endl; - resultItem = m_lastFoundItem; - } - else - { - kdDebug(250) << "findByURL: searching by dirlister: " << url.url() << endl; - - KFileItem *it = findByURL( url ); - - if( it ) - { - resultItem = static_cast(it->extraData(this)); - m_lastFoundItem = resultItem; - m_lastFoundURL = url; - } - } - - return( resultItem ); -} - - -void KFileTreeBranch::slCompleted( const KURL& url ) -{ - kdDebug(250) << "SlotCompleted hit for " << url.prettyURL() << endl; - KFileTreeViewItem *currParent = findTVIByURL( url ); - if( ! currParent ) return; - - kdDebug(250) << "current parent " << currParent << " is already listed: " - << currParent->alreadyListed() << endl; - - emit( populateFinished(currParent)); - emit( directoryChildCount(currParent, currParent->childCount())); - - /* This is a walk through the children of the last populated directory. - * Here we start the dirlister on every child of the dir and wait for its - * finish. When it has finished, we go to the next child. - * This must be done for non local file systems in dirOnly- and Full-Mode - * and for local file systems only in full mode, because the stat trick - * (see addItem-Method) does only work for dirs, not for files in the directory. - */ - /* Set bit that the parent dir was listed completely */ - currParent->setListed(true); - - kdDebug(250) << "recurseChildren: " << m_recurseChildren << endl; - kdDebug(250) << "isLocalFile: " << m_startURL.isLocalFile() << endl; - kdDebug(250) << "dirOnlyMode: " << dirOnlyMode() << endl; - - - if( m_recurseChildren && (!m_startURL.isLocalFile() || ! dirOnlyMode()) ) - { - bool wantRecurseUrl = false; - /* look if the url is in the list for url to recurse */ - for ( KURL::List::Iterator it = m_openChildrenURLs.begin(); - it != m_openChildrenURLs.end(); ++it ) - { - /* it is only interesting that the url _is_in_ the list. */ - if( (*it).equals( url, true ) ) - wantRecurseUrl = true; - } - - KFileTreeViewItem *nextChild = 0; - kdDebug(250) << "Recursing " << url.prettyURL() << "? " << wantRecurseUrl << endl; - - if( wantRecurseUrl && currParent ) - { - - /* now walk again through the tree and populate the children to get +-signs */ - /* This is the starting point. The visible folder has finished, - processing the children has not yet started */ - nextChild = static_cast - (static_cast(currParent)->firstChild()); - - if( ! nextChild ) - { - /* This happens if there is no child at all */ - kdDebug( 250 ) << "No children to recuse" << endl; - } - - /* Since we have listed the children to recurse, we can remove the entry - * in the list of the URLs to see the children. - */ - m_openChildrenURLs.remove(url); - } - - if( nextChild ) /* This implies that idx > -1 */ - { - /* Next child is defined. We start a dirlister job on every child item - * which is a directory to find out how much children are in the child - * of the last opened dir - */ - - /* Skip non directory entries */ - while( nextChild ) - { - if( nextChild->isDir() && ! nextChild->alreadyListed()) - { - KFileItem *kfi = nextChild->fileItem(); - if( kfi && kfi->isReadable()) - { - KURL recurseUrl = kfi->url(); - kdDebug(250) << "Starting to recurse NOW " << recurseUrl.prettyURL() << endl; - openURL( recurseUrl, true ); - } - } - nextChild = static_cast(static_cast(nextChild->nextSibling())); - // kdDebug(250) << "Next child " << m_nextChild << endl; - } - } - } - else - { - kdDebug(250) << "skipping to recurse in complete-slot" << endl; - } -} - -/* This slot is called when a treeviewitem is expanded in the gui */ -bool KFileTreeBranch::populate( const KURL& url, KFileTreeViewItem *currItem ) -{ - bool ret = false; - if( ! currItem ) - return ret; - - kdDebug(250) << "Populating <" << url.prettyURL() << ">" << endl; - - /* Add this url to the list of urls to recurse for children */ - if( m_recurseChildren ) - { - m_openChildrenURLs.append( url ); - kdDebug(250) << "Appending to list " << url.prettyURL() << endl; - } - - if( ! currItem->alreadyListed() ) - { - /* start the lister */ - ret = openURL( url, true ); - } - else - { - kdDebug(250) << "Children already existing in treeview!" << endl; - slCompleted( url ); - ret = true; - } - return ret; -} - -void KFileTreeBranch::virtual_hook( int id, void* data ) -{ KDirLister::virtual_hook( id, data ); } - -#include "kfiletreebranch.moc" - diff --git a/kio/kfile/kfiletreebranch.h b/kio/kfile/kfiletreebranch.h deleted file mode 100644 index 31e6dcfc0..000000000 --- a/kio/kfile/kfiletreebranch.h +++ /dev/null @@ -1,242 +0,0 @@ - -/* This file is part of the KDE project - Copyright (C) 2000 David Faure - 2000 Carsten Pfeiffer - 2001 Klaas Freitag - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License version 2 as published by the Free Software Foundation. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef kfile_tree_branch_h -#define kfile_tree_branch_h - -#include -#include - -#include -#include -#include -#include -#include - -class KURL; -class KFileTreeView; - - -/** - * This is the branch class of the KFileTreeView, which represents one - * branch in the treeview. Every branch has a root which is an url. The branch - * lists the files under the root. Every branch uses its own dirlister and can - * have its own filter etc. - * - * @short Branch object for KFileTreeView object. - * - */ - -class TDEIO_EXPORT KFileTreeBranch : public KDirLister -{ - Q_OBJECT -public: - /** - * constructs a branch for KFileTreeView. Does not yet start to list it. - * @param url start url of the branch. - * @param name the name of the branch, which is displayed in the first column of the treeview. - * @param pix is a pixmap to display as an icon of the branch. - * @param showHidden flag to make hidden files visible or not. - * @param branchRoot is the KFileTreeViewItem to use as the root of the - * branch, with the default 0 meaning to let KFileTreeBranch create - * it for you. - */ - KFileTreeBranch( KFileTreeView*, const KURL& url, const TQString& name, - const TQPixmap& pix, bool showHidden = false, - KFileTreeViewItem *branchRoot = 0 ); - - /** - * @returns the root url of the branch. - */ - KURL rootUrl() const { return( m_startURL ); } - - /** - * sets a KFileTreeViewItem as root widget for the branch. - * That must be created outside of the branch. All KFileTreeViewItems - * the branch is allocating will become children of that object. - * @param r the KFileTreeViewItem to become the root item. - */ - virtual void setRoot( KFileTreeViewItem *r ){ m_root = r; }; - - /** - * @returns the root item. - */ - KFileTreeViewItem *root( ) { return( m_root );} - - /** - * @returns the name of the branch. - */ - TQString name() const { return( m_name ); } - - /** - * sets the name of the branch. - */ - virtual void setName( const TQString n ) { m_name = n; }; - - /* - * returns the current root item pixmap set in the constructor. The root - * item pixmap defaults to the icon for directories. - * @see openPixmap() - */ - const TQPixmap& pixmap(){ return(m_rootIcon); } - - /* - * returns the current root item pixmap set by setOpenPixmap() - * which is displayed if the branch is expanded. - * The root item pixmap defaults to the icon for directories. - * @see pixmap() - * Note that it depends on KFileTreeView::showFolderOpenPximap weather - * open pixmap are displayed or not. - */ - const TQPixmap& openPixmap() { return(m_openRootIcon); } - - /** - * @returns whether the items in the branch show their file extensions in the - * tree or not. See setShowExtensions for more information. - */ - bool showExtensions( ) const; - - /** - * sets the root of the branch open or closed. - */ - void setOpen( bool setopen = true ) - { if( root() ) root()->setOpen( setopen ); } - - /** - * sets if children recursion is wanted or not. If this is switched off, the - * child directories of a just opened directory are not listed internally. - * That means that it can not be determined if the sub directories are - * expandable or not. If this is switched off there will be no call to - * setExpandable. - * @param t set to true to switch on child recursion - */ - void setChildRecurse( bool t=true ); - - /** - * @returns if child recursion is on or off. - * @see setChildRecurse - */ - bool childRecurse() - { return m_recurseChildren; } - -public slots: - /** - * populates a branch. This method must be called after a branch was added - * to a KFileTreeView using method addBranch. - * @param url is the url of the root item where the branch starts. - * @param currItem is the current parent. - */ - virtual bool populate( const KURL &url, KFileTreeViewItem* currItem ); - - /** - * sets printing of the file extensions on or off. If you pass false to this - * slot, all items of this branch will not show their file extensions in the - * tree. - * @param visible flags if the extensions should be visible or not. - */ - virtual void setShowExtensions( bool visible = true ); - - void setOpenPixmap( const TQPixmap& pix ); - -protected: - /** - * allocates a KFileTreeViewItem for the branch - * for new items. - */ - virtual KFileTreeViewItem *createTreeViewItem( KFileTreeViewItem *parent, - KFileItem *fileItem ); - -public: - /** - * find the according KFileTreeViewItem by an url - */ - virtual KFileTreeViewItem *findTVIByURL( const KURL& ); - -signals: - /** - * emitted with the item of a directory which was finished to populate - */ - void populateFinished( KFileTreeViewItem * ); - - /** - * emitted with a list of new or updated KFileTreeViewItem which were - * found in a branch. Note that this signal is emitted very often and may slow - * down the performance of the treeview ! - */ - void newTreeViewItems( KFileTreeBranch*, const KFileTreeViewItemList& ); - - /** - * emitted with the exact count of children for a directory. - */ - void directoryChildCount( KFileTreeViewItem* item, int count ); - -private slots: - void slotRefreshItems( const KFileItemList& ); - void addItems( const KFileItemList& ); - void slCompleted( const KURL& ); - void slotCanceled( const KURL& ); - void slotListerStarted( const KURL& ); - void slotDeleteItem( KFileItem* ); - void slotDirlisterClear(); - void slotDirlisterClearURL( const KURL& url ); - void slotRedirect( const KURL& oldUrl, const KURL&newUrl ); - -private: - KFileTreeViewItem *parentKFTVItem( KFileItem *item ); - static void deleteChildrenOf( TQListViewItem *parent ); - - KFileTreeViewItem *m_root; - KURL m_startURL; - TQString m_name; - TQPixmap m_rootIcon; - TQPixmap m_openRootIcon; - - /* this list holds the url's which children are opened. */ - KURL::List m_openChildrenURLs; - - - /* The next two members are used for caching purposes in findTVIByURL. */ - KURL m_lastFoundURL; - KFileTreeViewItem *m_lastFoundItem; - - bool m_recurseChildren :1; - bool m_showExtensions :1; - -protected: - virtual void virtual_hook( int id, void* data ); -private: - class KFileTreeBranchPrivate; - KFileTreeBranchPrivate *d; -}; - - -/** - * List of KFileTreeBranches - */ -typedef TQPtrList KFileTreeBranchList; - -/** - * Iterator for KFileTreeBranchLists - */ -typedef TQPtrListIterator KFileTreeBranchIterator; - -#endif - diff --git a/kio/kfile/kfiletreeview.cpp b/kio/kfile/kfiletreeview.cpp deleted file mode 100644 index 0b8504fd6..000000000 --- a/kio/kfile/kfiletreeview.cpp +++ /dev/null @@ -1,677 +0,0 @@ -/* This file is part of the KDEproject - Copyright (C) 2000 David Faure - 2000 Carsten Pfeiffer - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License version 2 as published by the Free Software Foundation. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - - -#include "kfiletreeview.h" -#include "kfiletreebranch.h" -#include "kfiletreeviewitem.h" - -KFileTreeView::KFileTreeView( TQWidget *parent, const char *name ) - : KListView( parent, name ), - m_wantOpenFolderPixmaps( true ), - m_toolTip( this ) -{ - setDragEnabled(true); - setSelectionModeExt( KListView::Single ); - - m_animationTimer = new TQTimer( this ); - connect( m_animationTimer, TQT_SIGNAL( timeout() ), - this, TQT_SLOT( slotAnimation() ) ); - - m_currentBeforeDropItem = 0; - m_dropItem = 0; - - m_autoOpenTimer = new TQTimer( this ); - connect( m_autoOpenTimer, TQT_SIGNAL( timeout() ), - this, TQT_SLOT( slotAutoOpenFolder() ) ); - - /* The executed-Slot only opens a path, while the expanded-Slot populates it */ - connect( this, TQT_SIGNAL( executed( TQListViewItem * ) ), - this, TQT_SLOT( slotExecuted( TQListViewItem * ) ) ); - connect( this, TQT_SIGNAL( expanded ( TQListViewItem *) ), - this, TQT_SLOT( slotExpanded( TQListViewItem *) )); - connect( this, TQT_SIGNAL( collapsed( TQListViewItem *) ), - this, TQT_SLOT( slotCollapsed( TQListViewItem* ))); - - - /* connections from the konqtree widget */ - connect( this, TQT_SIGNAL( selectionChanged() ), - this, TQT_SLOT( slotSelectionChanged() ) ); - connect( this, TQT_SIGNAL( onItem( TQListViewItem * )), - this, TQT_SLOT( slotOnItem( TQListViewItem * ) ) ); - connect( this, TQT_SIGNAL(itemRenamed(TQListViewItem*, const TQString &, int)), - this, TQT_SLOT(slotItemRenamed(TQListViewItem*, const TQString &, int))); - - - m_bDrag = false; - m_branches.setAutoDelete( true ); - - m_openFolderPixmap = DesktopIcon( "folder_open",KIcon::SizeSmall,KIcon::ActiveState ); -} - -KFileTreeView::~KFileTreeView() -{ - // we must make sure that the KFileTreeViewItems are deleted _before_ the - // branches are deleted. Otherwise, the KFileItems would be destroyed - // and the KFileTreeViewItems had dangling pointers to them. - hide(); - clear(); - m_branches.clear(); // finally delete the branches and KFileItems -} - - -bool KFileTreeView::isValidItem( TQListViewItem *item) -{ - if (!item) - return false; - TQPtrList lst; - TQListViewItemIterator it( this ); - while ( it.current() ) - { - if ( it.current() == item ) - return true; - ++it; - } - return false; -} - -void KFileTreeView::contentsDragEnterEvent( TQDragEnterEvent *ev ) -{ - if ( ! acceptDrag( ev ) ) - { - ev->ignore(); - return; - } - ev->acceptAction(); - m_currentBeforeDropItem = selectedItem(); - - TQListViewItem *item = itemAt( contentsToViewport( ev->pos() ) ); - if( item ) - { - m_dropItem = item; - m_autoOpenTimer->start( KFileView::autoOpenDelay() ); - } - else - { - m_dropItem = 0; -} -} - -void KFileTreeView::contentsDragMoveEvent( TQDragMoveEvent *e ) -{ - if( ! acceptDrag( e ) ) - { - e->ignore(); - return; - } - e->acceptAction(); - - - TQListViewItem *afterme; - TQListViewItem *parent; - - findDrop( e->pos(), parent, afterme ); - - // "afterme" is 0 when aiming at a directory itself - TQListViewItem *item = afterme ? afterme : parent; - - if( item && item->isSelectable() ) - { - setSelected( item, true ); - if( item != m_dropItem ) { - m_autoOpenTimer->stop(); - m_dropItem = item; - m_autoOpenTimer->start( KFileView::autoOpenDelay() ); - } - } - else - { - m_autoOpenTimer->stop(); - m_dropItem = 0; - } -} - -void KFileTreeView::contentsDragLeaveEvent( TQDragLeaveEvent * ) -{ - // Restore the current item to what it was before the dragging (#17070) - if ( isValidItem(m_currentBeforeDropItem) ) - { - setSelected( m_currentBeforeDropItem, true ); - ensureItemVisible( m_currentBeforeDropItem ); - } - else if ( isValidItem(m_dropItem) ) - setSelected( m_dropItem, false ); // no item selected - m_currentBeforeDropItem = 0; - m_dropItem = 0; - -} - -void KFileTreeView::contentsDropEvent( TQDropEvent *e ) -{ - - m_autoOpenTimer->stop(); - m_dropItem = 0; - - kdDebug(250) << "contentsDropEvent !" << endl; - if( ! acceptDrag( e ) ) { - e->ignore(); - return; - } - - e->acceptAction(); - TQListViewItem *afterme; - TQListViewItem *parent; - findDrop(e->pos(), parent, afterme); - - //kdDebug(250) << " parent=" << (parent?parent->text(0):TQString::null) - // << " afterme=" << (afterme?afterme->text(0):TQString::null) << endl; - - if (e->source() == viewport() && itemsMovable()) - movableDropEvent(parent, afterme); - else - { - emit dropped(e, afterme); - emit dropped(this, e, afterme); - emit dropped(e, parent, afterme); - emit dropped(this, e, parent, afterme); - - KURL::List urls; - KURLDrag::decode( e, urls ); - emit dropped( this, e, urls ); - - KURL parentURL; - if( parent ) - parentURL = static_cast(parent)->url(); - else - // can happen when dropping above the root item - // Should we choose the first branch in such a case ?? - return; - - emit dropped( urls, parentURL ); - emit dropped( this , e, urls, parentURL ); - } -} - -bool KFileTreeView::acceptDrag(TQDropEvent* e ) const -{ - - bool ancestOK= acceptDrops(); - // kdDebug(250) << "Do accept drops: " << ancestOK << endl; - ancestOK = ancestOK && itemsMovable(); - // kdDebug(250) << "acceptDrag: " << ancestOK << endl; - // kdDebug(250) << "canDecode: " << KURLDrag::canDecode(e) << endl; - // kdDebug(250) << "action: " << e->action() << endl; - - /* KListView::acceptDrag(e); */ - /* this is what KListView does: - * acceptDrops() && itemsMovable() && (e->source()==viewport()); - * ask acceptDrops and itemsMovable, but not the third - */ - return ancestOK && KURLDrag::canDecode( e ) && - // Why this test? All DnDs are one of those AFAIK (DF) - ( e->action() == TQDropEvent::Copy - || e->action() == TQDropEvent::Move - || e->action() == TQDropEvent::Link ); -} - - - -TQDragObject * KFileTreeView::dragObject() -{ - - KURL::List urls; - const TQPtrList fileList = selectedItems(); - TQPtrListIterator it( fileList ); - for ( ; it.current(); ++it ) - { - urls.append( static_cast(it.current())->url() ); - } - TQPoint hotspot; - TQPixmap pixmap; - if( urls.count() > 1 ){ - pixmap = DesktopIcon( "tdemultiple", 16 ); - } - if( pixmap.isNull() ) - pixmap = currentKFileTreeViewItem()->fileItem()->pixmap( 16 ); - hotspot.setX( pixmap.width() / 2 ); - hotspot.setY( pixmap.height() / 2 ); - TQDragObject* dragObject = new KURLDrag( urls, this ); - if( dragObject ) - dragObject->setPixmap( pixmap, hotspot ); - return dragObject; -} - - - -void KFileTreeView::slotCollapsed( TQListViewItem *item ) -{ - KFileTreeViewItem *kftvi = static_cast(item); - kdDebug(250) << "hit slotCollapsed" << endl; - if( kftvi && kftvi->isDir()) - { - item->setPixmap( 0, itemIcon(kftvi)); - } -} - -void KFileTreeView::slotExpanded( TQListViewItem *item ) -{ - kdDebug(250) << "slotExpanded here !" << endl; - - if( ! item ) return; - - KFileTreeViewItem *it = static_cast(item); - KFileTreeBranch *branch = it->branch(); - - /* Start the animation for the branch object */ - if( it->isDir() && branch && item->childCount() == 0 ) - { - /* check here if the branch really needs to be populated again */ - kdDebug(250 ) << "starting to open " << it->url().prettyURL() << endl; - startAnimation( it ); - bool branchAnswer = branch->populate( it->url(), it ); - kdDebug(250) << "Branches answer: " << branchAnswer << endl; - if( ! branchAnswer ) - { - kdDebug(250) << "ERR: Could not populate!" << endl; - stopAnimation( it ); - } - } - - /* set a pixmap 'open folder' */ - if( it->isDir() && isOpen( item ) ) - { - kdDebug(250)<< "Setting open Pixmap" << endl; - item->setPixmap( 0, itemIcon( it )); // 0, m_openFolderPixmap ); - } -} - - - -void KFileTreeView::slotExecuted( TQListViewItem *item ) -{ - if ( !item ) - return; - /* This opens the dir and causes the Expanded-slot to be called, - * which strolls through the children. - */ - if( static_cast(item)->isDir()) - { - item->setOpen( !item->isOpen() ); - } -} - - -void KFileTreeView::slotAutoOpenFolder() -{ - m_autoOpenTimer->stop(); - - if ( !isValidItem(m_dropItem) || m_dropItem->isOpen() ) - return; - - m_dropItem->setOpen( true ); - m_dropItem->repaint(); -} - - -void KFileTreeView::slotSelectionChanged() -{ - if ( !m_dropItem ) // don't do this while the dragmove thing - { - } -} - - -KFileTreeBranch* KFileTreeView::addBranch( const KURL &path, const TQString& name, - bool showHidden ) -{ - const TQPixmap& folderPix = KMimeType::mimeType("inode/directory")->pixmap( KIcon::Desktop,KIcon::SizeSmall ); - - return addBranch( path, name, folderPix, showHidden); -} - -KFileTreeBranch* KFileTreeView::addBranch( const KURL &path, const TQString& name, - const TQPixmap& pix, bool showHidden ) -{ - kdDebug(250) << "adding another root " << path.prettyURL() << endl; - - /* Open a new branch */ - KFileTreeBranch *newBranch = new KFileTreeBranch( this, path, name, pix, - showHidden ); - return addBranch(newBranch); -} - -KFileTreeBranch *KFileTreeView::addBranch(KFileTreeBranch *newBranch) -{ - connect( newBranch, TQT_SIGNAL(populateFinished( KFileTreeViewItem* )), - this, TQT_SLOT( slotPopulateFinished( KFileTreeViewItem* ))); - - connect( newBranch, TQT_SIGNAL( newTreeViewItems( KFileTreeBranch*, - const KFileTreeViewItemList& )), - this, TQT_SLOT( slotNewTreeViewItems( KFileTreeBranch*, - const KFileTreeViewItemList& ))); - - m_branches.append( newBranch ); - return( newBranch ); -} - -KFileTreeBranch *KFileTreeView::branch( const TQString& searchName ) -{ - KFileTreeBranch *branch = 0; - TQPtrListIterator it( m_branches ); - - while ( (branch = it.current()) != 0 ) { - ++it; - TQString bname = branch->name(); - kdDebug(250) << "This is the branches name: " << bname << endl; - if( bname == searchName ) - { - kdDebug(250) << "Found branch " << bname << " and return ptr" << endl; - return( branch ); - } - } - return ( 0L ); -} - -KFileTreeBranchList& KFileTreeView::branches() -{ - return( m_branches ); -} - - -bool KFileTreeView::removeBranch( KFileTreeBranch *branch ) -{ - if(m_branches.contains(branch)) - { - delete (branch->root()); - m_branches.remove( branch ); - return true; - } - else - { - return false; - } -} - -void KFileTreeView::setDirOnlyMode( KFileTreeBranch* branch, bool bom ) -{ - if( branch ) - { - branch->setDirOnlyMode( bom ); - } -} - - -void KFileTreeView::slotPopulateFinished( KFileTreeViewItem *it ) -{ - if( it && it->isDir()) - stopAnimation( it ); -} - -void KFileTreeView::slotNewTreeViewItems( KFileTreeBranch* branch, const KFileTreeViewItemList& itemList ) -{ - if( ! branch ) return; - kdDebug(250) << "hitting slotNewTreeViewItems" << endl; - - /* Sometimes it happens that new items should become selected, i.e. if the user - * creates a new dir, he probably wants it to be selected. This can not be done - * right after creating the directory or file, because it takes some time until - * the item appears here in the treeview. Thus, the creation code sets the member - * m_neUrlToSelect to the required url. If this url appears here, the item becomes - * selected and the member nextUrlToSelect will be cleared. - */ - if( ! m_nextUrlToSelect.isEmpty() ) - { - KFileTreeViewItemListIterator it( itemList ); - - bool end = false; - for( ; !end && it.current(); ++it ) - { - KURL url = (*it)->url(); - - if( m_nextUrlToSelect.equals(url, true )) // ignore trailing / on dirs - { - setCurrentItem( static_cast(*it) ); - m_nextUrlToSelect = KURL(); - end = true; - } - } - } -} - -TQPixmap KFileTreeView::itemIcon( KFileTreeViewItem *item, int gap ) const -{ - TQPixmap pix; - kdDebug(250) << "Setting icon for column " << gap << endl; - - if( item ) - { - /* Check if it is a branch root */ - KFileTreeBranch *brnch = item->branch(); - if( item == brnch->root() ) - { - pix = brnch->pixmap(); - if( m_wantOpenFolderPixmaps && brnch->root()->isOpen() ) - { - pix = brnch->openPixmap(); - } - } - else - { - // TODO: different modes, user Pixmaps ? - pix = item->fileItem()->pixmap( KIcon::SizeSmall ); // , KIcon::DefaultState); - - /* Only if it is a dir and the user wants open dir pixmap and it is open, - * change the fileitem's pixmap to the open folder pixmap. */ - if( item->isDir() && m_wantOpenFolderPixmaps ) - { - if( isOpen( static_cast(item))) - pix = m_openFolderPixmap; - } - } - } - - return pix; -} - - -void KFileTreeView::slotAnimation() -{ - MapCurrentOpeningFolders::Iterator it = m_mapCurrentOpeningFolders.begin(); - MapCurrentOpeningFolders::Iterator end = m_mapCurrentOpeningFolders.end(); - for (; it != end;) - { - KFileTreeViewItem *item = it.key(); - if (!isValidItem(item)) - { - ++it; - m_mapCurrentOpeningFolders.remove(item); - continue; - } - - uint & iconNumber = it.data().iconNumber; - TQString icon = TQString::fromLatin1( it.data().iconBaseName ).append( TQString::number( iconNumber ) ); - // kdDebug(250) << "Loading icon " << icon << endl; - item->setPixmap( 0, DesktopIcon( icon,KIcon::SizeSmall,KIcon::ActiveState )); // KFileTreeViewFactory::instance() ) ); - - iconNumber++; - if ( iconNumber > it.data().iconCount ) - iconNumber = 1; - - ++it; - } -} - - -void KFileTreeView::startAnimation( KFileTreeViewItem * item, const char * iconBaseName, uint iconCount ) -{ - /* TODO: allow specific icons */ - if( ! item ) - { - kdDebug(250) << " startAnimation Got called without valid item !" << endl; - return; - } - - m_mapCurrentOpeningFolders.insert( item, - AnimationInfo( iconBaseName, - iconCount, - itemIcon(item, 0) ) ); - if ( !m_animationTimer->isActive() ) - m_animationTimer->start( 50 ); -} - -void KFileTreeView::stopAnimation( KFileTreeViewItem * item ) -{ - if( ! item ) return; - - kdDebug(250) << "Stoping Animation !" << endl; - - MapCurrentOpeningFolders::Iterator it = m_mapCurrentOpeningFolders.find(item); - if ( it != m_mapCurrentOpeningFolders.end() ) - { - if( item->isDir() && isOpen( item) ) - { - kdDebug(250) << "Setting folder open pixmap !" << endl; - item->setPixmap( 0, itemIcon( item )); - } - else - { - item->setPixmap( 0, it.data().originalPixmap ); - } - m_mapCurrentOpeningFolders.remove( item ); - } - else - { - if( item ) - kdDebug(250)<< "StopAnimation - could not find item " << item->url().prettyURL()<< endl; - else - kdDebug(250)<< "StopAnimation - item is zero !" << endl; - } - if (m_mapCurrentOpeningFolders.isEmpty()) - m_animationTimer->stop(); -} - -KFileTreeViewItem * KFileTreeView::currentKFileTreeViewItem() const -{ - return static_cast( selectedItem() ); -} - -KURL KFileTreeView::currentURL() const -{ - KFileTreeViewItem *item = currentKFileTreeViewItem(); - if ( item ) - return currentKFileTreeViewItem()->url(); - else - return KURL(); -} - -void KFileTreeView::slotOnItem( TQListViewItem *item ) -{ - KFileTreeViewItem *i = static_cast( item ); - if( i ) - { - const KURL url = i->url(); - if ( url.isLocalFile() ) - emit onItem( url.path() ); - else - emit onItem( url.prettyURL() ); - } -} - -void KFileTreeView::slotItemRenamed(TQListViewItem* item, const TQString &name, int col) -{ - (void) item; - kdDebug(250) << "Do not bother: " << name << col << endl; -} - -KFileTreeViewItem *KFileTreeView::findItem( const TQString& branchName, const TQString& relUrl ) -{ - KFileTreeBranch *br = branch( branchName ); - return( findItem( br, relUrl )); -} - -KFileTreeViewItem *KFileTreeView::findItem( KFileTreeBranch* brnch, const TQString& relUrl ) -{ - KFileTreeViewItem *ret = 0; - if( brnch ) - { - KURL url = brnch->rootUrl(); - - if( ! relUrl.isEmpty() && TQDir::isRelativePath(relUrl) ) - { - TQString partUrl( relUrl ); - - if( partUrl.endsWith("/")) - partUrl.truncate( relUrl.length()-1 ); - - url.addPath( partUrl ); - - kdDebug(250) << "assembled complete dir string " << url.prettyURL() << endl; - - KFileItem *fi = brnch->findByURL( url ); - if( fi ) - { - ret = static_cast( fi->extraData( brnch )); - kdDebug(250) << "Found item !" <root(); - } - } - return( ret ); -} - -/////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////// - - -void KFileTreeViewToolTip::maybeTip( const TQPoint & ) -{ -#if 0 - TQListViewItem *item = m_view->itemAt( point ); - if ( item ) { - TQString text = static_cast( item )->toolTipText(); - if ( !text.isEmpty() ) - tip ( m_view->itemRect( item ), text ); - } -#endif -} - -void KFileTreeView::virtual_hook( int id, void* data ) -{ KListView::virtual_hook( id, data ); } - -#include "kfiletreeview.moc" diff --git a/kio/kfile/kfiletreeview.h b/kio/kfile/kfiletreeview.h deleted file mode 100644 index f28f0f01e..000000000 --- a/kio/kfile/kfiletreeview.h +++ /dev/null @@ -1,273 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 2000 David Faure - 2000 Carsten Pfeiffer - 2002 Klaas Freitag - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License version 2 as published by the Free Software Foundation. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef kfile_tree_view_h -#define kfile_tree_view_h - -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -class TQTimer; - - - -class TDEIO_EXPORT KFileTreeViewToolTip : public TQToolTip -{ -public: - KFileTreeViewToolTip( TQListView *view ) : TQToolTip( view ), m_view( view ) {} - -protected: - virtual void maybeTip( const TQPoint & ); - -private: - TQListView *m_view; -}; - - -/** - * The filetreeview offers a treeview on the file system which behaves like - * a QTreeView showing files and/or directories in the file system. - * - * KFileTreeView is able to handle more than one URL, represented by - * KFileTreeBranch. - * - * Typical usage: - * 1. create a KFileTreeView fitting in your layout and add columns to it - * 2. call addBranch to create one or more branches - * 3. retrieve the root item with KFileTreeBranch::root() and set it open - * if desired. That starts the listing. - */ -class TDEIO_EXPORT KFileTreeView : public KListView -{ - Q_OBJECT -public: - KFileTreeView( TQWidget *parent, const char *name = 0 ); - virtual ~KFileTreeView(); - - /** - * @return the current (i.e. selected) item - */ - KFileTreeViewItem * currentKFileTreeViewItem() const; - - /** - * @return the URL of the current selected item. - */ - KURL currentURL() const; - - /** - * Adds a branch to the treeview item. - * - * This high-level function creates the branch, adds it to the treeview and - * connects some signals. Note that directory listing does not start until - * a branch is expanded either by opening the root item by user or by setOpen - * on the root item. - * - * @returns a pointer to the new branch or zero - * @param path is the base url of the branch - * @param name is the name of the branch, which will be the text for column 0 - * @param showHidden says if hidden files and directories should be visible - */ - KFileTreeBranch* addBranch( const KURL &path, const TQString& name, bool showHidden = false ); - - /** - * same as the function above but with a pixmap to set for the branch. - */ - virtual KFileTreeBranch* addBranch( const KURL &path, const TQString& name , - const TQPixmap& pix, bool showHidden = false ); - - /** - * same as the function above but letting the user create the branch. - */ - virtual KFileTreeBranch* addBranch( KFileTreeBranch * ); - - /** - * removes the branch from the treeview. - * @param branch is a pointer to the branch - * @returns true on success. - */ - virtual bool removeBranch( KFileTreeBranch *branch ); - - /** - * @returns a pointer to the KFileTreeBranch in the KFileTreeView or zero on failure. - * @param searchName is the name of a branch - */ - KFileTreeBranch *branch( const TQString& searchName ); - - - /** - * @returns a list of pointers to all existing branches in the treeview. - **/ - KFileTreeBranchList& branches(); - - /** - * set the directory mode for branches. If true is passed, only directories will be loaded. - * @param branch is a pointer to a KFileTreeBranch - */ - virtual void setDirOnlyMode( KFileTreeBranch *branch, bool ); - - /** - * searches a branch for a KFileTreeViewItem identified by the relative url given as - * second parameter. The method adds the branches base url to the relative path and finds - * the item. - * @returns a pointer to the item or zero if the item does not exist. - * @param brnch is a pointer to the branch to search in - * @param relUrl is the branch relativ url - */ - KFileTreeViewItem *findItem( KFileTreeBranch* brnch, const TQString& relUrl ); - - /** - * see method above, differs only in the first parameter. Finds the branch by its name. - */ - KFileTreeViewItem *findItem( const TQString& branchName, const TQString& relUrl ); - - /** - * @returns a flag indicating if extended folder pixmaps are displayed or not. - */ - bool showFolderOpenPixmap() const { return m_wantOpenFolderPixmaps; }; - -public slots: - - /** - * set the flag to show 'extended' folder icons on or off. If switched on, folders will - * have an open folder pixmap displayed if their children are visible, and the standard - * closed folder pixmap (from mimetype folder) if they are closed. - * If switched off, the plain mime pixmap is displayed. - * @param showIt = false displays mime type pixmap only - */ - virtual void setShowFolderOpenPixmap( bool showIt = true ) - { m_wantOpenFolderPixmaps = showIt; } - -protected: - /** - * @returns true if we can decode the drag and support the action - */ - - virtual bool acceptDrag(TQDropEvent* event) const; - virtual TQDragObject * dragObject(); - - virtual void startAnimation( KFileTreeViewItem* item, const char * iconBaseName = "kde", uint iconCount = 6 ); - virtual void stopAnimation( KFileTreeViewItem* item ); - virtual void contentsDragEnterEvent( TQDragEnterEvent *e ); - virtual void contentsDragMoveEvent( TQDragMoveEvent *e ); - virtual void contentsDragLeaveEvent( TQDragLeaveEvent *e ); - virtual void contentsDropEvent( TQDropEvent *ev ); - -protected slots: - virtual void slotNewTreeViewItems( KFileTreeBranch*, - const KFileTreeViewItemList& ); - - virtual void slotSetNextUrlToSelect( const KURL &url ) - { m_nextUrlToSelect = url; } - - virtual TQPixmap itemIcon( KFileTreeViewItem*, int gap = 0 ) const; - -private slots: - void slotExecuted( TQListViewItem * ); - void slotExpanded( TQListViewItem * ); - void slotCollapsed( TQListViewItem *item ); - - void slotSelectionChanged(); - - void slotAnimation(); - - void slotAutoOpenFolder(); - - void slotOnItem( TQListViewItem * ); - void slotItemRenamed(TQListViewItem*, const TQString &, int); - - void slotPopulateFinished( KFileTreeViewItem* ); - - -signals: - - void onItem( const TQString& ); - /* New signals if you like it ? */ - void dropped( TQWidget*, TQDropEvent* ); - void dropped( TQWidget*, TQDropEvent*, KURL::List& ); - void dropped( KURL::List&, KURL& ); - // The drop event allows to differentiate between move and copy - void dropped( TQWidget*, TQDropEvent*, KURL::List&, KURL& ); - - void dropped( TQDropEvent *e, TQListViewItem * after); - void dropped(KFileTreeView *, TQDropEvent *, TQListViewItem *); - void dropped(TQDropEvent *e, TQListViewItem * parent, TQListViewItem * after); - void dropped(KFileTreeView *, TQDropEvent *, TQListViewItem *, TQListViewItem *); - -protected: - KURL m_nextUrlToSelect; - - -private: - // Returns whether item is still a valid item in the tree - bool isValidItem( TQListViewItem *item); - void clearTree(); - - - /* List that holds the branches */ - KFileTreeBranchList m_branches; - - - struct AnimationInfo - { - AnimationInfo( const char * _iconBaseName, uint _iconCount, const TQPixmap & _originalPixmap ) - : iconBaseName(_iconBaseName), iconCount(_iconCount), iconNumber(1), originalPixmap(_originalPixmap) {} - AnimationInfo() : iconCount(0) {} - TQCString iconBaseName; - uint iconCount; - uint iconNumber; - TQPixmap originalPixmap; - }; - typedef TQMap MapCurrentOpeningFolders; - MapCurrentOpeningFolders m_mapCurrentOpeningFolders; - - - TQTimer *m_animationTimer; - - TQPoint m_dragPos; - bool m_bDrag; - - bool m_wantOpenFolderPixmaps; // Flag weather the folder should have open-folder pixmaps - - TQListViewItem *m_currentBeforeDropItem; // The item that was current before the drag-enter event happened - TQListViewItem *m_dropItem; // The item we are moving the mouse over (during a drag) - TQStrList m_lstDropFormats; - TQPixmap m_openFolderPixmap; - TQTimer *m_autoOpenTimer; - - KFileTreeViewToolTip m_toolTip; - - -protected: - virtual void virtual_hook( int id, void* data ); -private: - class KFileTreeViewPrivate; - KFileTreeViewPrivate *d; -}; - -#endif diff --git a/kio/kfile/kfiletreeviewitem.cpp b/kio/kfile/kfiletreeviewitem.cpp deleted file mode 100644 index 17e2d9abe..000000000 --- a/kio/kfile/kfiletreeviewitem.cpp +++ /dev/null @@ -1,83 +0,0 @@ -/* This file is part of the KDEproject - Copyright (C) 2000 David Faure - 2000 Carsten Pfeiffer - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License version 2 as published by the Free Software Foundation. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include -#include -#include - -#include "kfiletreeviewitem.h" - -/* --- KFileTreeViewItem --- */ -/* - */ -KFileTreeViewItem::KFileTreeViewItem( KFileTreeViewItem *parent, - KFileItem* item, - KFileTreeBranch *brnch ) - : KListViewItem( parent ), - m_kfileitem( item ), - m_branch( brnch ), - m_wasListed(false) -{ - setPixmap(0, item->pixmap( KIcon::SizeSmall )); - setText( 0, item->text()); - -} - -KFileTreeViewItem::KFileTreeViewItem( KFileTreeView* parent, - KFileItem* item, - KFileTreeBranch *brnch ) - :KListViewItem( (TQListView*)parent ), - m_kfileitem(item ), - m_branch( brnch ), - m_wasListed(false) -{ - setPixmap(0, item->pixmap( KIcon::SizeSmall )); - setText( 0, item->text()); -} - -KFileTreeViewItem::~KFileTreeViewItem() -{ - if ( m_kfileitem ) - m_kfileitem->removeExtraData( m_branch ); -} - -bool KFileTreeViewItem::alreadyListed() const -{ - return m_wasListed; -} - -void KFileTreeViewItem::setListed( bool wasListed ) -{ - m_wasListed = wasListed; -} - -KURL KFileTreeViewItem::url() const -{ - return m_kfileitem ? m_kfileitem->url() : KURL(); -} - -TQString KFileTreeViewItem::path() const -{ - return m_kfileitem ? m_kfileitem->url().path() : TQString::null; -} - -bool KFileTreeViewItem::isDir() const -{ - return m_kfileitem ? m_kfileitem->isDir() : false; -} diff --git a/kio/kfile/kfiletreeviewitem.h b/kio/kfile/kfiletreeviewitem.h deleted file mode 100644 index 0fefc5dc1..000000000 --- a/kio/kfile/kfiletreeviewitem.h +++ /dev/null @@ -1,106 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 2000 David Faure - 2000 Carsten Pfeiffer - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License version 2 as published by the Free Software Foundation. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef kfile_tree_view_item_h -#define kfile_tree_view_item_h - -#include -#include - -#include -#include -#include -#include - -class KURL; -class KFileTreeView; -class KFileTreeBranch; -class KFileTreeItem; - - -/** - * An item for a KFileTreeView that knows about its own KFileItem. - */ -class TDEIO_EXPORT KFileTreeViewItem : public KListViewItem -{ -public: - KFileTreeViewItem( KFileTreeViewItem*, KFileItem*, KFileTreeBranch * ); - KFileTreeViewItem( KFileTreeView*, KFileItem*, KFileTreeBranch * ); - ~KFileTreeViewItem(); - - /** - * @return the KFileTreeBranch the item is sorted in. - */ - KFileTreeBranch* branch() const { return m_branch; } - - /** - * @return the KFileItem the viewitem is representing. - */ - KFileItem *fileItem() const { return m_kfileitem; } - - /** - * @return the path of the item. - */ - TQString path() const; - - /** - * @return the items KURL - */ - KURL url() const; - - /** - * @return if the item represents a directory - */ - bool isDir() const; - - /** - * @return if this directory was already seen by a KDirLister. - */ - bool alreadyListed() const; - - /** - * set the flag if the directory was already listed. - */ - void setListed( bool wasListed ); - -protected: - -private: - - KFileItem *m_kfileitem; - KFileTreeBranch *m_branch; - bool m_wasListed; - class KFileTreeViewItemPrivate; - KFileTreeViewItemPrivate *d; -}; - - -/** - * List of KFileTreeViewItems - */ -typedef TQPtrList KFileTreeViewItemList; - -/** - * Iterator for KFileTreeViewItemList - */ -typedef TQPtrListIterator KFileTreeViewItemListIterator; - - -#endif - diff --git a/kio/kfile/kfileview.cpp b/kio/kfile/kfileview.cpp deleted file mode 100644 index a62b8aa50..000000000 --- a/kio/kfile/kfileview.cpp +++ /dev/null @@ -1,429 +0,0 @@ -/* This file is part of the KDE libraries - Copyright (C) 1998 Stephan Kulow - 1998 Daniel Grana - 2001 Carsten Pfeiffer - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include -#include - -#include -#include -#include -#include -#include -#include - -#include "config-kfile.h" -#include "kfileview.h" - -#ifdef Unsorted // the "I hate X.h" modus -#undef Unsorted -#endif - -TQDir::SortSpec KFileView::defaultSortSpec = static_cast(TQDir::Name | TQDir::IgnoreCase | TQDir::DirsFirst); - -class KFileView::KFileViewPrivate -{ -public: - KFileViewPrivate() - { - actions = 0; - dropOptions = 0; - } - - ~KFileViewPrivate() - { - if( actions ) { - actions->clear(); // so that the removed() signal is emitted! - delete actions; - } - } - - TQGuardedPtr actions; - int dropOptions; -}; - - -KFileView::KFileView() -{ - d = new KFileViewPrivate(); - m_sorting = KFileView::defaultSortSpec; - - sig = new KFileViewSignaler(); - sig->setName("view-signaller"); - - m_selectedList = 0L; - filesNumber = 0; - dirsNumber = 0; - - view_mode = All; - selection_mode = KFile::Single; - m_viewName = i18n("Unknown View"); - - myOnlyDoubleClickSelectsFiles = false; - m_itemList.setAutoDelete( false ); // just references -} - -KFileView::~KFileView() -{ - delete d; - delete sig; - delete m_selectedList; -} - -void KFileView::setParentView(KFileView *parent) -{ - if ( parent ) { // pass all signals right to our parent - TQObject::connect(sig, TQT_SIGNAL( activatedMenu(const KFileItem *, - const TQPoint& ) ), - parent->sig, TQT_SIGNAL( activatedMenu(const KFileItem *, - const TQPoint& ))); - TQObject::connect(sig, TQT_SIGNAL( dirActivated(const KFileItem *)), - parent->sig, TQT_SIGNAL( dirActivated(const KFileItem*))); - TQObject::connect(sig, TQT_SIGNAL( fileSelected(const KFileItem *)), - parent->sig, TQT_SIGNAL( fileSelected(const KFileItem*))); - TQObject::connect(sig, TQT_SIGNAL( fileHighlighted(const KFileItem *) ), - parent->sig,TQT_SIGNAL(fileHighlighted(const KFileItem*))); - TQObject::connect(sig, TQT_SIGNAL( sortingChanged( TQDir::SortSpec ) ), - parent->sig, TQT_SIGNAL(sortingChanged( TQDir::SortSpec))); - TQObject::connect(sig, TQT_SIGNAL( dropped(const KFileItem *, TQDropEvent*, const KURL::List&) ), - parent->sig, TQT_SIGNAL(dropped(const KFileItem *, TQDropEvent*, const KURL::List&))); - } -} - -bool KFileView::updateNumbers(const KFileItem *i) -{ - if (!( viewMode() & Files ) && i->isFile()) - return false; - - if (!( viewMode() & Directories ) && i->isDir()) - return false; - - if (i->isDir()) - dirsNumber++; - else - filesNumber++; - - return true; -} - -void qt_qstring_stats(); - -// filter out files if we're in directory mode and count files/directories -// and insert into the view -void KFileView::addItemList(const KFileItemList& list) -{ - KFileItem *tmp; - - for (KFileItemListIterator it(list); (tmp = it.current()); ++it) - { - if (!updateNumbers(tmp)) - continue; - - insertItem( tmp ); - } - -#ifdef Q2HELPER - qt_qstring_stats(); -#endif -} - -void KFileView::insertItem( KFileItem * ) -{ -} - -void KFileView::setSorting(TQDir::SortSpec new_sort) -{ - m_sorting = new_sort; -} - -void KFileView::clear() -{ - m_itemList.clear(); - filesNumber = 0; - dirsNumber = 0; - clearView(); -} - -void KFileView::sortReversed() -{ - int spec = sorting(); - - setSorting( static_cast( spec ^ TQDir::Reversed ) ); -} - -#if 0 -int KFileView::compareItems(const KFileItem *fi1, const KFileItem *fi2) const -{ - static const TQString &dirup = TDEGlobal::staticQString(".."); - bool bigger = true; - bool keepFirst = false; - bool dirsFirst = ((m_sorting & TQDir::DirsFirst) == TQDir::DirsFirst); - - if (fi1 == fi2) - return 0; - - // .. is always bigger, independent of the sort criteria - if ( fi1->name() == dirup ) { - bigger = false; - keepFirst = dirsFirst; - } - else if ( fi2->name() == dirup ) { - bigger = true; - keepFirst = dirsFirst; - } - - else { - if ( fi1->isDir() != fi2->isDir() && dirsFirst ) { - bigger = fi2->isDir(); - keepFirst = true; - } - else { - - TQDir::SortSpec sort = static_cast(m_sorting & TQDir::SortByMask); - - //if (fi1->isDir() || fi2->isDir()) - // sort = static_cast(KFileView::defaultSortSpec & TQDir::SortByMask); - - switch (sort) { - case TQDir::Name: - default: -sort_by_name: - if ( (m_sorting & TQDir::IgnoreCase) == TQDir::IgnoreCase ) - bigger = (fi1->name( true ) > fi2->name( true )); - else - bigger = (fi1->name() > fi2->name()); - break; - case TQDir::Time: - { - time_t t1 = fi1->time( TDEIO::UDS_MODIFICATION_TIME ); - time_t t2 = fi2->time( TDEIO::UDS_MODIFICATION_TIME ); - if ( t1 != t2 ) { - bigger = (t1 > t2); - break; - } - - // Sort by name if both items have the same timestamp. - // Don't honor the reverse flag tho. - else { - keepFirst = true; - goto sort_by_name; - } - } - case TQDir::Size: - { - TDEIO::filesize_t s1 = fi1->size(); - TDEIO::filesize_t s2 = fi2->size(); - if ( s1 != s2 ) { - bigger = (s1 > s2); - break; - } - - // Sort by name if both items have the same size. - // Don't honor the reverse flag tho. - else { - keepFirst = true; - goto sort_by_name; - } - } - case TQDir::Unsorted: - bigger = true; // nothing - break; - } - } - } - - if (reversed && !keepFirst ) // don't reverse dirs to the end! - bigger = !bigger; - - return (bigger ? 1 : -1); -} -#endif - -void KFileView::updateView(bool f) -{ - widget()->repaint(f); -} - -void KFileView::updateView(const KFileItem *) -{ -} - -void KFileView::setCurrentItem(const TQString &filename ) -{ - if (!filename.isNull()) { - KFileItem *item; - for ( (item = firstFileItem()); item; item = nextItem( item ) ) { - if (item->name() == filename) { - setCurrentItem( item ); - return; - } - } - } - - kdDebug(kfile_area) << "setCurrentItem: no match found: " << filename << endl; -} - -const KFileItemList * KFileView::items() const -{ - KFileItem *item = 0L; - - // only ever use m_itemList in this method! - m_itemList.clear(); - for ( (item = firstFileItem()); item; item = nextItem( item ) ) - m_itemList.append( item ); - - return &m_itemList; -} - - -const KFileItemList * KFileView::selectedItems() const -{ - if ( !m_selectedList ) - m_selectedList = new KFileItemList; - - m_selectedList->clear(); - - KFileItem *item; - for ( (item = firstFileItem()); item; item = nextItem( item ) ) { - if ( isSelected( item ) ) - m_selectedList->append( item ); - } - - return m_selectedList; -} - -void KFileView::selectAll() -{ - if (selection_mode == KFile::NoSelection || selection_mode== KFile::Single) - return; - - KFileItem *item = 0L; - for ( (item = firstFileItem()); item; item = nextItem( item ) ) - setSelected( item, true ); -} - - -void KFileView::invertSelection() -{ - KFileItem *item = 0L; - for ( (item = firstFileItem()); item; item = nextItem( item ) ) - setSelected( item, !isSelected( item ) ); -} - - -void KFileView::setSelectionMode( KFile::SelectionMode sm ) -{ - selection_mode = sm; -} - -KFile::SelectionMode KFileView::selectionMode() const -{ - return selection_mode; -} - -void KFileView::setViewMode( ViewMode vm ) -{ - view_mode = vm; -} - -void KFileView::removeItem( const KFileItem *item ) -{ - if ( !item ) - return; - - if ( item->isDir() ) - dirsNumber--; - else - filesNumber--; - - if ( m_selectedList ) - m_selectedList->removeRef( item ); -} - -void KFileView::listingCompleted() -{ - // empty default impl. -} - -KActionCollection * KFileView::actionCollection() const -{ - if ( !d->actions ) - d->actions = new KActionCollection( widget(), "KFileView::d->actions" ); - return d->actions; -} - -void KFileView::readConfig( TDEConfig *, const TQString& ) -{ -} - -void KFileView::writeConfig( TDEConfig *, const TQString& ) -{ -} - -TQString KFileView::sortingKey( const TQString& value, bool isDir, int sortSpec ) -{ - bool reverse = sortSpec & TQDir::Reversed; - bool dirsFirst = sortSpec & TQDir::DirsFirst; - char start = (isDir && dirsFirst) ? (reverse ? '2' : '0') : '1'; - TQString result = (sortSpec & TQDir::IgnoreCase) ? value.lower() : value; - return result.prepend( start ); -} - -TQString KFileView::sortingKey( TDEIO::filesize_t value, bool isDir, int sortSpec) -{ - bool reverse = sortSpec & TQDir::Reversed; - bool dirsFirst = sortSpec & TQDir::DirsFirst; - char start = (isDir && dirsFirst) ? (reverse ? '2' : '0') : '1'; - return TDEIO::number( value ).rightJustify( 24, '0' ).prepend( start ); -} - -void KFileView::setDropOptions(int options) -{ - virtual_hook(VIRTUAL_SET_DROP_OPTIONS, &options); // Virtual call -} - -void KFileView::setDropOptions_impl(int options) -{ - d->dropOptions = options; -} - -int KFileView::dropOptions() -{ - return d->dropOptions; -} - -int KFileView::autoOpenDelay() -{ - return (TQApplication::startDragTime() * 3) / 2; -} - -void KFileView::virtual_hook( int id, void* data) -{ - switch(id) { - case VIRTUAL_SET_DROP_OPTIONS: - setDropOptions_impl(*(int *)data); - break; - default: - /*BASE::virtual_hook( id, data );*/ - break; - } -} - -#include "kfileview.moc" diff --git a/kio/kfile/kfileview.h b/kio/kfile/kfileview.h deleted file mode 100644 index 7e88fc9d8..000000000 --- a/kio/kfile/kfileview.h +++ /dev/null @@ -1,444 +0,0 @@ -// -*- c++ -*- -/* This file is part of the KDE libraries - Copyright (C) 1997 Stephan Kulow - Copyright (C) 2001 Carsten Pfeiffer - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef KFILEVIEW_H -#define KFILEVIEW_H - -class TQPoint; -class KActionCollection; - -#include - -#include "kfileitem.h" -#include "kfile.h" - -/** - * internal class to make easier to use signals possible - * @internal - **/ -class TDEIO_EXPORT KFileViewSignaler : public TQObject -{ - Q_OBJECT - -public: - /** - * Call this method when an item is selected (depends on single click / - * double click configuration). Emits the appropriate signal. - **/ - void activate( const KFileItem *item ) { - if ( item->isDir() ) - emit dirActivated( item ); - else - emit fileSelected( item ); - } - /** - * emits the highlighted signal for item. Call this in your view class - * whenever the selection changes. - */ - void highlightFile(const KFileItem *i) { emit fileHighlighted(i); } - - void activateMenu( const KFileItem *i, const TQPoint& pos ) { - emit activatedMenu( i, pos ); - } - - void changeSorting( TQDir::SortSpec sorting ) { - emit sortingChanged( sorting ); - } - - void dropURLs(const KFileItem *i, TQDropEvent*e, const KURL::List&urls) { - emit dropped(i, e, urls); - } - -signals: - void dirActivated(const KFileItem*); - - void sortingChanged( TQDir::SortSpec ); - - /** - * the item maybe be 0L, indicating that we're in multiselection mode and - * the selection has changed. - */ - void fileHighlighted(const KFileItem*); - void fileSelected(const KFileItem*); - void activatedMenu( const KFileItem *i, const TQPoint& ); - void dropped(const KFileItem *, TQDropEvent*, const KURL::List&); -}; - -/** - * This class defines an interface to all file views. Its intent is - * to allow to switch the view of the files in the selector very easily. - * It defines some pure virtual functions, that must be implemented to - * make a file view working. - * - * Since this class is not a widget, but it's meant to be added to other - * widgets, its most important function is widget. This should return - * a pointer to the implemented widget. - * - * @short A base class for views of the KDE file selector - * @author Stephan Kulow - **/ -class TDEIO_EXPORT KFileView { - -public: - KFileView(); - - /** - * Destructor - */ - virtual ~KFileView(); - - /** - * inserts a list of items. - **/ - void addItemList(const KFileItemList &list); - - /** - * a pure virtual function to get a TQWidget, that can be added to - * other widgets. This function is needed to make it possible for - * derived classes to derive from other widgets. - **/ - virtual TQWidget *widget() = 0; - - /** - * ### As const-method, to be fixed in 3.0 - */ - TQWidget *widget() const { return const_cast(this)->widget(); } - - /** - * Sets @p filename the current item in the view, if available. - */ - void setCurrentItem( const TQString &filename ); - - /** - * Reimplement this to set @p item the current item in the view, e.g. - * the item having focus. - */ - virtual void setCurrentItem( const KFileItem *item ) = 0; - - /** - * @returns the "current" KFileItem, e.g. where the cursor is. - * Returns 0L when there is no current item (e.g. in an empty view). - * Subclasses have to implement this. - */ - virtual KFileItem *currentFileItem() const = 0; - - /** - * Clears the view and all item lists. - */ - virtual void clear(); - - /** - * does a repaint of the view. - * - * The default implementation calls - * \code - * widget()->repaint(f) - * \endcode - **/ - virtual void updateView(bool f = true); - - virtual void updateView(const KFileItem*); - - /** - * Removes an item from the list; has to be implemented by the view. - * Call KFileView::removeItem( item ) after removing it. - */ - virtual void removeItem(const KFileItem *item); - - /** - * This hook is called when all items of the currently listed directory - * are listed and inserted into the view, i.e. there won't come any new - * items anymore. - */ - virtual void listingCompleted(); - - /** - * Returns the sorting order of the internal list. Newly added files - * are added through this sorting. - */ - TQDir::SortSpec sorting() const { return m_sorting; } - - /** - * Sets the sorting order of the view. - * - * Default is TQDir::Name | TQDir::IgnoreCase | TQDir::DirsFirst - * Override this in your subclass and sort accordingly (usually by - * setting the sorting-key for every item and telling QIconView - * or TQListView to sort. - * - * A view may choose to use a different sorting than TQDir::Name, Time - * or Size. E.g. to sort by mimetype or any possible string. Set the - * sorting to TQDir::Unsorted for that and do the rest internally. - * - * @see sortingKey - */ - virtual void setSorting(TQDir::SortSpec sort); - - /** - * Tells whether the current items are in reversed order (shortcut to - * sorting() & TQDir::Reversed). - */ - bool isReversed() const { return (m_sorting & TQDir::Reversed); } - - void sortReversed(); - - /** - * @returns the number of dirs and files - **/ - uint count() const { return filesNumber + dirsNumber; } - - /** - * @returns the number of files. - **/ - uint numFiles() const { return filesNumber; } - - /** - * @returns the number of directories - **/ - uint numDirs() const { return dirsNumber; } - - virtual void setSelectionMode( KFile::SelectionMode sm ); - virtual KFile::SelectionMode selectionMode() const; - - enum ViewMode { - Files = 1, - Directories = 2, - All = Files | Directories - }; - virtual void setViewMode( ViewMode vm ); - virtual ViewMode viewMode() const { return view_mode; } - - /** - * @returns the localized name of the view, which could be displayed - * somewhere, e.g. in a menu, where the user can choose between views. - * @see setViewName - */ - TQString viewName() const { return m_viewName; } - - /** - * Sets the name of the view, which could be displayed somewhere. - * E.g. "Image Preview". - */ - void setViewName( const TQString& name ) { m_viewName = name; } - - virtual void setParentView(KFileView *parent); - - /** - * The derived view must implement this function to add - * the file in the widget. - * - * Make sure to call this implementation, i.e. - * KFileView::insertItem( i ); - * - */ - virtual void insertItem( KFileItem *i); - - /** - * pure virtual function, that should be implemented to clear - * the view. At this moment the list is already empty - **/ - virtual void clearView() = 0; - - /** - * pure virtual function, that should be implemented to make item i - * visible, i.e. by scrolling the view appropriately. - */ - virtual void ensureItemVisible( const KFileItem *i ) = 0; - - /** - * Clears any selection, unhighlights everything. Must be implemented by - * the view. - */ - virtual void clearSelection() = 0; - - /** - * Selects all items. You may want to override this, if you can implement - * it more efficiently than calling setSelected() with every item. - * This works only in Multiselection mode of course. - */ - virtual void selectAll(); - - /** - * Inverts the current selection, i.e. selects all items, that were up to - * now not selected and deselects the other. - */ - virtual void invertSelection(); - - /** - * Tells the view that it should highlight the item. - * This function must be implemented by the view. - **/ - virtual void setSelected(const KFileItem *, bool enable) = 0; - - /** - * @returns whether the given item is currently selected. - * Must be implemented by the view. - */ - virtual bool isSelected( const KFileItem * ) const = 0; - - /** - * @returns all currently highlighted items. - */ - const KFileItemList * selectedItems() const; - - /** - * @returns all items currently available in the current sort-order - */ - const KFileItemList * items() const; - - virtual KFileItem * firstFileItem() const = 0; - virtual KFileItem * nextItem( const KFileItem * ) const = 0; - virtual KFileItem * prevItem( const KFileItem * ) const = 0; - - /** - * This is a KFileDialog specific hack: we want to select directories with - * single click, but not files. But as a generic class, we have to be able - * to select files on single click as well. - * - * This gives us the opportunity to do both. - * - * Every view has to decide when to call select( item ) when a file was - * single-clicked, based on onlyDoubleClickSelectsFiles(). - */ - void setOnlyDoubleClickSelectsFiles( bool enable ) { - myOnlyDoubleClickSelectsFiles = enable; - } - - /** - * @returns whether files (not directories) should only be select()ed by - * double-clicks. - * @see setOnlyDoubleClickSelectsFiles - */ - bool onlyDoubleClickSelectsFiles() const { - return myOnlyDoubleClickSelectsFiles; - } - - /** - * increases the number of dirs and files. - * @returns true if the item fits the view mode - */ - bool updateNumbers(const KFileItem *i); - - /** - * @returns the view-specific action-collection. Every view should - * add its actions here (if it has any) to make them available to - * e.g. the KDirOperator's popup-menu. - */ - virtual KActionCollection * actionCollection() const; - - KFileViewSignaler * signaler() const { return sig; } - - virtual void readConfig( TDEConfig *, const TQString& group = TQString::null ); - virtual void writeConfig( TDEConfig *, const TQString& group = TQString::null); - - /** - * Various options for drag and drop support. - * These values can be or'd together. - * @li @p AutoOpenDirs Automatically open directory after hovering above it - * for a short while while dragging. - * @since 3.2 - */ - enum DropOptions { - AutoOpenDirs = 1 - }; - /** - * Specify DND options. See DropOptions for details. - * All options are disabled by default. - * @since 3.2 - */ - // KDE 4: Make virtual - void setDropOptions(int options); - - /** - * Returns the DND options in effect. - * See DropOptions for details. - * @since 3.2 - */ - int dropOptions(); - - /** - * This method calculates a TQString from the given parameters, that is - * suitable for sorting with e.g. TQIconView or TQListView. Their - * Item-classes usually have a setKey( const TQString& ) method or a virtual - * method TQString key() that is used for sorting. - * - * @param value Any string that should be used as sort criterion - * @param isDir Tells whether the key is computed for an item representing - * a directory (directories are usually sorted before files) - * @param sortSpec An ORed combination of TQDir::SortSpec flags. - * Currently, the values IgnoreCase, Reversed and - * DirsFirst are taken into account. - */ - static TQString sortingKey( const TQString& value, bool isDir, int sortSpec); - - /** - * An overloaded method that takes not a TQString, but a number as sort - * criterion. You can use this for file-sizes or dates/times for example. - * If you use a time_t, you need to cast that to TDEIO::filesize_t because - * of ambiguity problems. - */ - static TQString sortingKey( TDEIO::filesize_t value, bool isDir,int sortSpec); - - /** - * @internal - * delay before auto opening a directory - */ - static int autoOpenDelay(); - -protected: - /** - * @internal - * class to distribute the signals - **/ - KFileViewSignaler *sig; - -private: - static TQDir::SortSpec defaultSortSpec; - TQDir::SortSpec m_sorting; - TQString m_viewName; - - /** - * counters - **/ - uint filesNumber; - uint dirsNumber; - - ViewMode view_mode; - KFile::SelectionMode selection_mode; - - // never use! It's only guaranteed to contain valid items in the items() - // method! - mutable KFileItemList m_itemList; - - mutable KFileItemList *m_selectedList; - bool myOnlyDoubleClickSelectsFiles; - -protected: - virtual void virtual_hook( int id, void* data ); - /* @internal for virtual_hook */ - enum { VIRTUAL_SET_DROP_OPTIONS = 1 }; - void setDropOptions_impl(int options); -private: - class KFileViewPrivate; - KFileViewPrivate *d; -}; - -#endif // KFILEINFOLISTWIDGET_H diff --git a/kio/kfile/kicondialog.cpp b/kio/kfile/kicondialog.cpp deleted file mode 100644 index dfbf47d0d..000000000 --- a/kio/kfile/kicondialog.cpp +++ /dev/null @@ -1,772 +0,0 @@ -/* vi: ts=8 sts=4 sw=4 - * - * This file is part of the KDE project, module kfile. - * Copyright (C) 2000 Geert Jansen - * (C) 2000 Kurt Granroth - * (C) 1997 Christoph Neerfeld - * (C) 2002 Carsten Pfeiffer - * - * This is free software; it comes under the GNU Library General - * Public License, version 2. See the file "COPYING.LIB" for the - * exact licensing terms. - */ - -#include "kicondialog.h" - -#include - -#include - -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#ifdef HAVE_LIBART -#include -#include -#endif - -class KIconCanvas::KIconCanvasPrivate -{ - public: - KIconCanvasPrivate() { m_bLoading = false; } - ~KIconCanvasPrivate() {} - bool m_bLoading; -}; - -/** - * Helper class for sorting icon paths by icon name - */ -class IconPath : public TQString -{ -protected: - TQString m_iconName; - -public: - IconPath(const TQString &ip) : TQString (ip) - { - int n = findRev('/'); - m_iconName = (n==-1) ? static_cast(*this) : mid(n+1); - } - - - IconPath() : TQString () - { } - - bool operator== (const IconPath &ip) const - { return m_iconName == ip.m_iconName; } - - bool operator< (const IconPath &ip) const - { return m_iconName < ip.m_iconName; } - -}; - -/* - * KIconCanvas: Iconview for the iconloader dialog. - */ - -KIconCanvas::KIconCanvas(TQWidget *parent, const char *name) - : KIconView(parent, name) -{ - d = new KIconCanvasPrivate; - mpTimer = new TQTimer(this); - connect(mpTimer, TQT_SIGNAL(timeout()), TQT_SLOT(slotLoadFiles())); - connect(this, TQT_SIGNAL(currentChanged(TQIconViewItem *)), - TQT_SLOT(slotCurrentChanged(TQIconViewItem *))); - setGridX(80); - setWordWrapIconText(false); - setShowToolTips(true); -} - -KIconCanvas::~KIconCanvas() -{ - delete mpTimer; - delete d; -} - -void KIconCanvas::loadFiles(const TQStringList& files) -{ - clear(); - mFiles = files; - emit startLoading(mFiles.count()); - mpTimer->start(10, true); // #86680 - d->m_bLoading = false; -} - -void KIconCanvas::slotLoadFiles() -{ - setResizeMode(Fixed); - TQApplication::setOverrideCursor(tqwaitCursor); - - // disable updates to not trigger paint events when adding child items - setUpdatesEnabled( false ); - -#ifdef HAVE_LIBART - KSVGIconEngine *svgEngine = new KSVGIconEngine(); -#endif - - d->m_bLoading = true; - int i; - TQStringList::ConstIterator it; - uint emitProgress = 10; // so we will emit it once in the beginning - TQStringList::ConstIterator end(mFiles.end()); - for (it=mFiles.begin(), i=0; it!=end; ++it, i++) - { - // Calling kapp->processEvents() makes the iconview flicker like hell - // (it's being repainted once for every new item), so we don't do this. - // Instead, we directly repaint the progress bar without going through - // the event-loop. We do that just once for every 10th item so that - // the progress bar doesn't flicker in turn. (pfeiffer) - if ( emitProgress >= 10 ) { - emit progress(i); - emitProgress = 0; - } - - emitProgress++; -// kapp->processEvents(); - if ( !d->m_bLoading ) // user clicked on a button that will load another set of icons - break; - TQImage img; - - // Use the extension as the format. Works for XPM and PNG, but not for SVG - TQString path= *it; - TQString ext = path.right(3).upper(); - - if (ext != "SVG" && ext != "VGZ") - img.load(*it); -#ifdef HAVE_LIBART - else - if (svgEngine->load(60, 60, *it)) - img = *svgEngine->painter()->image(); -#endif - - if (img.isNull()) - continue; - if (img.width() > 60 || img.height() > 60) - { - if (img.width() > img.height()) - { - int height = (int) ((60.0 / img.width()) * img.height()); - img = img.smoothScale(60, height); - } else - { - int width = (int) ((60.0 / img.height()) * img.width()); - img = img.smoothScale(width, 60); - } - } - TQPixmap pm; - pm.convertFromImage(img); - TQFileInfo fi(*it); - TQIconViewItem *item = new TQIconViewItem(this, fi.baseName(), pm); - item->setKey(*it); - item->setDragEnabled(false); - item->setDropEnabled(false); - } - -#ifdef HAVE_LIBART - delete svgEngine; -#endif - - // enable updates since we have to draw the whole view now - setUpdatesEnabled( true ); - - TQApplication::restoreOverrideCursor(); - d->m_bLoading = false; - emit finished(); - setResizeMode(Adjust); -} - -TQString KIconCanvas::getCurrent() const -{ - if (!currentItem()) - return TQString::null; - return currentItem()->key(); -} - -void KIconCanvas::stopLoading() -{ - d->m_bLoading = false; -} - -void KIconCanvas::slotCurrentChanged(TQIconViewItem *item) -{ - emit nameChanged((item != 0L) ? item->text() : TQString::null); -} - -class KIconDialog::KIconDialogPrivate -{ - public: - KIconDialogPrivate() { - m_bStrictIconSize = true; - m_bLockUser = false; - m_bLockCustomDir = false; - searchLine = 0; - } - ~KIconDialogPrivate() {} - bool m_bStrictIconSize, m_bLockUser, m_bLockCustomDir; - TQString custom; - TQString customLocation; - KIconViewSearchLine *searchLine; -}; - -/* - * KIconDialog: Dialog for selecting icons. Both system and user - * specified icons can be chosen. - */ - -KIconDialog::KIconDialog(TQWidget *parent, const char *name) - : KDialogBase(parent, name, true, i18n("Select Icon"), Ok|Cancel, Ok) -{ - d = new KIconDialogPrivate; - mpLoader = TDEGlobal::iconLoader(); - init(); -} - -KIconDialog::KIconDialog(KIconLoader *loader, TQWidget *parent, - const char *name) - : KDialogBase(parent, name, true, i18n("Select Icon"), Ok|Cancel, Ok) -{ - d = new KIconDialogPrivate; - mpLoader = loader; - init(); -} - -void KIconDialog::init() -{ - mGroupOrSize = KIcon::Desktop; - mContext = KIcon::Any; - mType = 0; - mFileList = TDEGlobal::dirs()->findAllResources("appicon", TQString::fromLatin1("*.png")); - - TQWidget *main = new TQWidget( this ); - setMainWidget(main); - - TQVBoxLayout *top = new TQVBoxLayout(main); - top->setSpacing( spacingHint() ); - - TQButtonGroup *bgroup = new TQButtonGroup(0, Qt::Vertical, i18n("Icon Source"), main); - bgroup->layout()->setSpacing(KDialog::spacingHint()); - bgroup->layout()->setMargin(KDialog::marginHint()); - top->addWidget(bgroup); - connect(bgroup, TQT_SIGNAL(clicked(int)), TQT_SLOT(slotButtonClicked(int))); - TQGridLayout *grid = new TQGridLayout(bgroup->layout(), 3, 2); - mpRb1 = new TQRadioButton(i18n("S&ystem icons:"), bgroup); - grid->addWidget(mpRb1, 1, 0); - mpCombo = new TQComboBox(bgroup); - connect(mpCombo, TQT_SIGNAL(activated(int)), TQT_SLOT(slotContext(int))); - grid->addWidget(mpCombo, 1, 1); - mpRb2 = new TQRadioButton(i18n("O&ther icons:"), bgroup); - grid->addWidget(mpRb2, 2, 0); - mpBrowseBut = new TQPushButton(i18n("&Browse..."), bgroup); - grid->addWidget(mpBrowseBut, 2, 1); - - // - // ADD SEARCHLINE - // - TQHBoxLayout *searchLayout = new TQHBoxLayout(0, 0, KDialog::spacingHint()); - top->addLayout(searchLayout); - - TQToolButton *clearSearch = new TQToolButton(main); - clearSearch->setTextLabel(i18n("Clear Search"), true); - clearSearch->setIconSet(SmallIconSet(TQApplication::reverseLayout() ? "clear_left" :"locationbar_erase")); - searchLayout->addWidget(clearSearch); - - TQLabel *searchLabel = new TQLabel(i18n("&Search:"), main); - searchLayout->addWidget(searchLabel); - - d->searchLine = new KIconViewSearchLine(main, "searchLine"); - searchLayout->addWidget(d->searchLine); - searchLabel->setBuddy(d->searchLine); - - - // signals and slots connections - connect(clearSearch, TQT_SIGNAL(clicked()), d->searchLine, TQT_SLOT(clear())); - - TQString wtstr = i18n("Search interactively for icon names (e.g. folder)."); - TQWhatsThis::add(searchLabel, wtstr); - TQWhatsThis::add(d->searchLine, wtstr); - - - mpCanvas = new KIconCanvas(main); - connect(mpCanvas, TQT_SIGNAL(executed(TQIconViewItem *)), TQT_SLOT(slotAcceptIcons())); - connect(mpCanvas, TQT_SIGNAL(returnPressed(TQIconViewItem *)), TQT_SLOT(slotAcceptIcons())); - mpCanvas->setMinimumSize(400, 125); - top->addWidget(mpCanvas); - d->searchLine->setIconView(mpCanvas); - - mpProgress = new KProgress(main); - top->addWidget(mpProgress); - connect(mpCanvas, TQT_SIGNAL(startLoading(int)), TQT_SLOT(slotStartLoading(int))); - connect(mpCanvas, TQT_SIGNAL(progress(int)), TQT_SLOT(slotProgress(int))); - connect(mpCanvas, TQT_SIGNAL(finished()), TQT_SLOT(slotFinished())); - - // When pressing Ok or Cancel, stop loading icons - connect(this, TQT_SIGNAL(hidden()), mpCanvas, TQT_SLOT(stopLoading())); - - static const char* const context_text[] = { - I18N_NOOP( "Actions" ), - I18N_NOOP( "Animations" ), - I18N_NOOP( "Applications" ), - I18N_NOOP( "Categories" ), - I18N_NOOP( "Devices" ), - I18N_NOOP( "Emblems" ), - I18N_NOOP( "Emotes" ), - I18N_NOOP( "Filesystems" ), - I18N_NOOP( "International" ), - I18N_NOOP( "Mimetypes" ), - I18N_NOOP( "Places" ), - I18N_NOOP( "Status" ) }; - static const KIcon::Context context_id[] = { - KIcon::Action, - KIcon::Animation, - KIcon::Application, - KIcon::Category, - KIcon::Device, - KIcon::Emblem, - KIcon::Emote, - KIcon::FileSystem, - KIcon::International, - KIcon::MimeType, - KIcon::Place, - KIcon::StatusIcon }; - mNumContext = 0; - int cnt = sizeof( context_text ) / sizeof( context_text[ 0 ] ); - // check all 3 arrays have same sizes - assert( cnt == sizeof( context_id ) / sizeof( context_id[ 0 ] ) - && cnt == sizeof( mContextMap ) / sizeof( mContextMap[ 0 ] )); - for( int i = 0; - i < cnt; - ++i ) - { - if( mpLoader->hasContext( context_id[ i ] )) - { - mpCombo->insertItem(i18n( context_text[ i ] )); - mContextMap[ mNumContext++ ] = context_id[ i ]; - } - } - mpCombo->setFixedSize(mpCombo->sizeHint()); - - mpBrowseBut->setFixedWidth(mpCombo->width()); - - // Make the dialog a little taller - incInitialSize(TQSize(0,100)); -} - - -KIconDialog::~KIconDialog() -{ - delete d; -} - -void KIconDialog::slotAcceptIcons() -{ - d->custom=TQString::null; - slotOk(); -} - -void KIconDialog::showIcons() -{ - mpCanvas->clear(); - TQStringList filelist; - if (mType == 0) - if (d->m_bStrictIconSize) - filelist=mpLoader->queryIcons(mGroupOrSize, mContext); - else - filelist=mpLoader->queryIconsByContext(mGroupOrSize, mContext); - else if ( !d->customLocation.isNull() ) - filelist=mpLoader->queryIconsByDir( d->customLocation ); - else - filelist=mFileList; - - TQSortedList iconlist; - iconlist.setAutoDelete(true); - TQStringList::Iterator it; - for( it = filelist.begin(); it != filelist.end(); ++it ) - iconlist.append(new IconPath(*it)); - - iconlist.sort(); - filelist.clear(); - - for ( IconPath *ip=iconlist.first(); ip != 0; ip=iconlist.next() ) - filelist.append(*ip); - - d->searchLine->clear(); - mpCanvas->loadFiles(filelist); -} - -void KIconDialog::setStrictIconSize(bool b) -{ - d->m_bStrictIconSize=b; -} - -bool KIconDialog::strictIconSize() const -{ - return d->m_bStrictIconSize; -} - -void KIconDialog::setIconSize( int size ) -{ - // see KIconLoader, if you think this is weird - if ( size == 0 ) - mGroupOrSize = KIcon::Desktop; // default Group - else - mGroupOrSize = -size; // yes, KIconLoader::queryIconsByContext is weird -} - -int KIconDialog::iconSize() const -{ - // 0 or any other value ==> mGroupOrSize is a group, so we return 0 - return (mGroupOrSize < 0) ? -mGroupOrSize : 0; -} - -#ifndef KDE_NO_COMPAT -TQString KIconDialog::selectIcon(KIcon::Group group, KIcon::Context context, bool user) -{ - setup( group, context, false, 0, user ); - return openDialog(); -} -#endif - -void KIconDialog::setup(KIcon::Group group, KIcon::Context context, - bool strictIconSize, int iconSize, bool user ) -{ - d->m_bStrictIconSize = strictIconSize; - mGroupOrSize = (iconSize == 0) ? group : -iconSize; - mType = user ? 1 : 0; - mpRb1->setChecked(!user); - mpRb2->setChecked(user); - mpCombo->setEnabled(!user); - mpBrowseBut->setEnabled(user); - setContext( context ); -} - -void KIconDialog::setup(KIcon::Group group, KIcon::Context context, - bool strictIconSize, int iconSize, bool user, - bool lockUser, bool lockCustomDir ) -{ - d->m_bStrictIconSize = strictIconSize; - d->m_bLockUser = lockUser; - d->m_bLockCustomDir = lockCustomDir; - mGroupOrSize = (iconSize == 0) ? group : -iconSize; - mType = user ? 1 : 0; - mpRb1->setChecked(!user); - mpRb1->setEnabled( !lockUser || !user ); - mpRb2->setChecked(user); - mpRb2->setEnabled( !lockUser || user ); - mpCombo->setEnabled(!user); - mpBrowseBut->setEnabled( user && !lockCustomDir ); - setContext( context ); -} - -void KIconDialog::setContext( KIcon::Context context ) -{ - mContext = context; - for( int i = 0; - i < mNumContext; - ++i ) - if( mContextMap[ i ] == context ) - { - mpCombo->setCurrentItem( i ); - return; - } -} - -void KIconDialog::setCustomLocation( const TQString& location ) -{ - d->customLocation = location; -} - -TQString KIconDialog::openDialog() -{ - showIcons(); - - if ( exec() == Accepted ) - { - if (!d->custom.isNull()) - return d->custom; - TQString name = mpCanvas->getCurrent(); - if (name.isEmpty() || (mType == 1)) - return name; - TQFileInfo fi(name); - return fi.baseName(); - } - return TQString::null; -} - -void KIconDialog::showDialog() -{ - setModal(false); - showIcons(); - show(); -} - -void KIconDialog::slotOk() -{ - TQString name; - if (!d->custom.isNull()) - { - name = d->custom; - } - else - { - name = mpCanvas->getCurrent(); - if (!name.isEmpty() && (mType != 1)) - { - TQFileInfo fi(name); - name = fi.baseName(); - } - } - - emit newIconName(name); - KDialogBase::slotOk(); -} - -TQString KIconDialog::getIcon(KIcon::Group group, KIcon::Context context, - bool strictIconSize, int iconSize, bool user, - TQWidget *parent, const TQString &caption) -{ - KIconDialog dlg(parent, "icon dialog"); - dlg.setup( group, context, strictIconSize, iconSize, user ); - if (!caption.isNull()) - dlg.setCaption(caption); - - return dlg.openDialog(); -} - -void KIconDialog::slotButtonClicked(int id) -{ - TQString file; - - switch (id) - { - case 0: - if(mType!=0) - { - mType = 0; - mpBrowseBut->setEnabled(false); - mpCombo->setEnabled(true); - showIcons(); - } - break; - - case 1: - if(mType!=1) - { - mType = 1; - mpBrowseBut->setEnabled( !d->m_bLockCustomDir ); - mpCombo->setEnabled(false); - showIcons(); - } - break; - case 2: - { - // Create a file dialog to select a PNG, XPM or SVG file, - // with the image previewer shown. - // KFileDialog::getImageOpenURL doesn't allow svg. - KFileDialog dlg(TQString::null, i18n("*.png *.xpm *.svg *.svgz|Icon Files (*.png *.xpm *.svg *.svgz)"), - this, "filedialog", true); - dlg.setOperationMode( KFileDialog::Opening ); - dlg.setCaption( i18n("Open") ); - dlg.setMode( KFile::File ); - - KImageFilePreview *ip = new KImageFilePreview( &dlg ); - dlg.setPreviewWidget( ip ); - dlg.exec(); - - file = dlg.selectedFile(); - if (!file.isEmpty()) - { - d->custom = file; - if ( mType == 1 ) - d->customLocation = TQFileInfo( file ).dirPath( true ); - slotOk(); - } - } - break; - } -} - -void KIconDialog::slotContext(int id) -{ - mContext = static_cast( mContextMap[ id ] ); - showIcons(); -} - -void KIconDialog::slotStartLoading(int steps) -{ - if (steps < 10) - mpProgress->hide(); - else - { - mpProgress->setTotalSteps(steps); - mpProgress->setProgress(0); - mpProgress->show(); - } -} - -void KIconDialog::slotProgress(int p) -{ - mpProgress->setProgress(p); - // commented out the following since setProgress already paints ther - // progress bar. ->repaint() only makes it flicker - //mpProgress->repaint(); -} - -void KIconDialog::slotFinished() -{ - mpProgress->hide(); -} - -class KIconButton::KIconButtonPrivate -{ - public: - KIconButtonPrivate() { - m_bStrictIconSize = false; - iconSize = 0; // let KIconLoader choose the default - } - ~KIconButtonPrivate() {} - bool m_bStrictIconSize; - int iconSize; -}; - - -/* - * KIconButton: A "choose icon" pushbutton. - */ - -KIconButton::KIconButton(TQWidget *parent, const char *name) - : TQPushButton(parent, name) -{ - init( TDEGlobal::iconLoader() ); -} - -KIconButton::KIconButton(KIconLoader *loader, - TQWidget *parent, const char *name) - : TQPushButton(parent, name) -{ - init( loader ); -} - -void KIconButton::init( KIconLoader *loader ) -{ - d = new KIconButtonPrivate; - mGroup = KIcon::Desktop; - mContext = KIcon::Application; - mbUser = false; - - mpLoader = loader; - mpDialog = 0L; - connect(this, TQT_SIGNAL(clicked()), TQT_SLOT(slotChangeIcon())); -} - -KIconButton::~KIconButton() -{ - delete mpDialog; - delete d; -} - -void KIconButton::setStrictIconSize(bool b) -{ - d->m_bStrictIconSize=b; -} - -bool KIconButton::strictIconSize() const -{ - return d->m_bStrictIconSize; -} - -void KIconButton::setIconSize( int size ) -{ - d->iconSize = size; -} - -int KIconButton::iconSize() const -{ - return d->iconSize; -} - -void KIconButton::setIconType(KIcon::Group group, KIcon::Context context, bool user) -{ - mGroup = group; - mContext = context; - mbUser = user; -} - -void KIconButton::setIcon(const TQString& icon) -{ - mIcon = icon; - setIconSet(mpLoader->loadIconSet(mIcon, mGroup, d->iconSize)); - - if (!mpDialog) - { - mpDialog = new KIconDialog(mpLoader, this); - connect(mpDialog, TQT_SIGNAL(newIconName(const TQString&)), TQT_SLOT(newIconName(const TQString&))); - } - - if ( mbUser ) - mpDialog->setCustomLocation( TQFileInfo( mpLoader->iconPath(mIcon, mGroup, true) ).dirPath( true ) ); -} - -void KIconButton::resetIcon() -{ - mIcon = TQString::null; - setIconSet(TQIconSet()); -} - -void KIconButton::slotChangeIcon() -{ - if (!mpDialog) - { - mpDialog = new KIconDialog(mpLoader, this); - connect(mpDialog, TQT_SIGNAL(newIconName(const TQString&)), TQT_SLOT(newIconName(const TQString&))); - } - - mpDialog->setup( mGroup, mContext, d->m_bStrictIconSize, d->iconSize, mbUser ); - mpDialog->showDialog(); -} - -void KIconButton::newIconName(const TQString& name) -{ - if (name.isEmpty()) - return; - - TQIconSet iconset = mpLoader->loadIconSet(name, mGroup, d->iconSize); - setIconSet(iconset); - mIcon = name; - - if ( mbUser ) - mpDialog->setCustomLocation( TQFileInfo( mpLoader->iconPath(mIcon, mGroup, true) ).dirPath( true ) ); - - emit iconChanged(name); -} - -void KIconCanvas::virtual_hook( int id, void* data ) -{ KIconView::virtual_hook( id, data ); } - -void KIconDialog::virtual_hook( int id, void* data ) -{ KDialogBase::virtual_hook( id, data ); } - -#include "kicondialog.moc" diff --git a/kio/kfile/kicondialog.h b/kio/kfile/kicondialog.h deleted file mode 100644 index 30d9f1579..000000000 --- a/kio/kfile/kicondialog.h +++ /dev/null @@ -1,350 +0,0 @@ -/* vi: ts=8 sts=4 sw=4 - * - * This file is part of the KDE project, module kfile. - * Copyright (C) 2000 Geert Jansen - * (C) 2000 Kurt Granroth - * (C) 1997 Christoph Neerfeld - * (C) 2002 Carsten Pfeiffer - * - * This is free software; it comes under the GNU Library General - * Public License, version 2. See the file "COPYING.LIB" for the - * exact licensing terms. - */ - -#ifndef __KIconDialog_h__ -#define __KIconDialog_h__ - -#include -#include -#include - -#include -#include -#include - -class TQComboBox; -class TQTimer; -class TQKeyEvent; -class TQRadioButton; -class KProgress; -class KIconLoader; - -/** - * Icon canvas for KIconDialog. - */ -class TDEIO_EXPORT KIconCanvas: public KIconView -{ - Q_OBJECT - -public: - KIconCanvas(TQWidget *parent=0L, const char *name=0L); - ~KIconCanvas(); - - /** - * Load icons into the canvas. - */ - void loadFiles(const TQStringList& files); - - /** - * Returns the current icon. - */ - TQString getCurrent() const; - -public slots: - void stopLoading(); - -signals: - /** - * Emitted when the current icon has changed. - */ - void nameChanged(TQString); - /* KDE 4: Make it const TQString & */ - - void startLoading(int); - void progress(int); - void finished(); - -private slots: - void slotLoadFiles(); - void slotCurrentChanged(TQIconViewItem *item); - -private: - TQStringList mFiles; - TQTimer *mpTimer; - KIconLoader *mpLoader; // unused - -protected: - virtual void virtual_hook( int id, void* data ); - -private: - class KIconCanvasPrivate; - KIconCanvasPrivate *d; -}; - - -/** - * Dialog for interactive selection of icons. Use the function - * getIcon() let the user select an icon. - * - * @short An icon selection dialog. - */ -class TDEIO_EXPORT KIconDialog: public KDialogBase -{ - Q_OBJECT - -public: - /** - * Constructs an icon selection dialog using the global iconloader. - */ - KIconDialog(TQWidget *parent=0L, const char *name=0L); - /** - * Constructs an icon selection dialog using a specific iconloader. - */ - KIconDialog(KIconLoader *loader, TQWidget *parent=0, - const char *name=0); - /** - * Destructs the dialog. - */ - ~KIconDialog(); - - /** - * Sets a strict icon size policy for allowed icons. When true, - * only icons of the specified group's size in getIcon() are shown. - * When false, icons not available at the desired group's size will - * also be selectable. - */ - void setStrictIconSize(bool b); - /** - * Returns true if a strict icon size policy is set. - */ - bool strictIconSize() const; - /** - * sets a custom icon directory - * @since 3.1 - */ - void setCustomLocation( const TQString& location ); - - /** - * Sets the size of the icons to be shown / selected. - * @see KIcon::StdSizes - * @see iconSize - */ - void setIconSize(int size); - - /** - * Returns the iconsize set via setIconSize() or 0, if the default - * iconsize will be used. - */ - int iconSize() const; - -#ifndef KDE_NO_COMPAT - /** - * @deprecated in KDE 3.0, use the static method getIcon instead. - */ - TQString selectIcon(KIcon::Group group=KIcon::Desktop, KIcon::Context - context=KIcon::Application, bool user=false); -#endif - - /** - * Allows you to set the same parameters as in the class method - * getIcon(). - */ - void setup( KIcon::Group group, - KIcon::Context context = KIcon::Application, - bool strictIconSize = false, int iconSize = 0, - bool user = false ); - - /** - * Allows you to set the same parameters as in the class method - * getIcon(), as well as two additional parameters to lock - * the choice between system and user dirs and to lock the custom user - * dir itself. - * - * @since 3.3 - */ - - void setup( KIcon::Group group, KIcon::Context context, - bool strictIconSize, int iconSize, bool user, bool lockUser, - bool lockCustomDir ); - - /** - * exec()utes this modal dialog and returns the name of the selected icon, - * or TQString::null if the dialog was aborted. - * @returns the name of the icon, suitable for loading with KIconLoader. - * @see getIcon - */ - TQString openDialog(); - - /** - * show()es this dialog and emits a newIcon(const TQString&) signal when - * successful. TQString::null will be emitted if the dialog was aborted. - */ - void showDialog(); - - /** - * Pops up the dialog an lets the user select an icon. - * - * @param group The icon group this icon is intended for. Providing the - * group shows the icons in the dialog with the same appearance as when - * used outside the dialog. - * @param context The initial icon context. Initially, the icons having - * this context are shown in the dialog. The user can change this. - * @param strictIconSize When true, only icons of the specified group's size - * are shown, otherwise icon not available in the desired group's size - * will also be selectable. - * @param iconSize the size of the icons -- the default of the icongroup - * if set to 0 - * @param user Begin with the "user icons" instead of "system icons". - * @param parent The parent widget of the dialog. - * @param caption The caption to use for the dialog. - * @return The name of the icon, suitable for loading with KIconLoader. - * @version New in 3.0 - */ - static TQString getIcon(KIcon::Group group=KIcon::Desktop, - KIcon::Context context=KIcon::Application, - bool strictIconSize=false, int iconSize = 0, - bool user=false, TQWidget *parent=0, - const TQString &caption=TQString::null); - -signals: - void newIconName(const TQString&); - -protected slots: - void slotOk(); - -private slots: - void slotButtonClicked(int); - void slotContext(int); - void slotStartLoading(int); - void slotProgress(int); - void slotFinished(); - void slotAcceptIcons(); -private: - void init(); - void showIcons(); - void setContext( KIcon::Context context ); - - int mGroupOrSize; - KIcon::Context mContext; - int mType; - - TQStringList mFileList; - TQComboBox *mpCombo; - TQPushButton *mpBrowseBut; - TQRadioButton *mpRb1, *mpRb2; - KProgress *mpProgress; - KIconLoader *mpLoader; - KIconCanvas *mpCanvas; - int mNumContext; - KIcon::Context mContextMap[ 12 ]; // must match KIcon::Context size, code has assert - -protected: - virtual void virtual_hook( int id, void* data ); -private: - class KIconDialogPrivate; - KIconDialogPrivate *d; -}; - - -/** - * A pushbutton for choosing an icon. Pressing on the button will open a - * KIconDialog for the user to select an icon. The current icon will be - * displayed on the button. - * - * @see KIconDialog - * @short A push button that allows selection of an icon. - */ -class TDEIO_EXPORT KIconButton: public TQPushButton -{ - Q_OBJECT - TQ_PROPERTY( TQString icon READ icon WRITE setIcon RESET resetIcon ) - TQ_PROPERTY( int iconSize READ iconSize WRITE setIconSize) - TQ_PROPERTY( bool strictIconSize READ strictIconSize WRITE setStrictIconSize ) - -public: - /** - * Constructs a KIconButton using the global iconloader. - */ - KIconButton(TQWidget *parent=0L, const char *name=0L); - - /** - * Constructs a KIconButton using a specific KIconLoader. - */ - KIconButton(KIconLoader *loader, TQWidget *parent, const char *name=0L); - /** - * Destructs the button. - */ - ~KIconButton(); - - /** - * Sets a strict icon size policy for allowed icons. When true, - * only icons of the specified group's size in setIconType are allowed, - * and only icons of that size will be shown in the icon dialog. - */ - void setStrictIconSize(bool b); - /** - * Returns true if a strict icon size policy is set. - */ - bool strictIconSize() const; - - /** - * Sets the icon group and context. Use KIcon::NoGroup if you want to - * allow icons for any group in the given context. - */ - void setIconType(KIcon::Group group, KIcon::Context context, bool user=false); - - /** - * Sets the button's initial icon. - */ - void setIcon(const TQString& icon); - - /** - * Resets the icon (reverts to an empty button). - */ - void resetIcon(); - - /** - * Returns the name of the selected icon. - */ - TQString icon() const { return mIcon; } - - /** - * Sets the size of the icon to be shown / selected. - * @see KIcon::StdSizes - * @see iconSize - */ - void setIconSize( int size ); - - /** - * Returns the iconsize set via setIconSize() or 0, if the default - * iconsize will be used. - */ - int iconSize() const; - -signals: - /** - * Emitted when the icon has changed. - */ - void iconChanged(TQString icon); - /* KDE 4: Make it const TQString & */ - -private slots: - void slotChangeIcon(); - void newIconName(const TQString& name); - -private: - void init( KIconLoader *loader ); - - bool mbUser; - KIcon::Group mGroup; - KIcon::Context mContext; - - TQString mIcon; - KIconDialog *mpDialog; - KIconLoader *mpLoader; - class KIconButtonPrivate; - KIconButtonPrivate *d; -}; - - -#endif // __KIconDialog_h__ diff --git a/kio/kfile/kimagefilepreview.cpp b/kio/kfile/kimagefilepreview.cpp deleted file mode 100644 index 0cc0ef2a7..000000000 --- a/kio/kfile/kimagefilepreview.cpp +++ /dev/null @@ -1,187 +0,0 @@ -/* - * This file is part of the KDE project - * Copyright (C) 2001 Martin R. Jones - * 2001 Carsten Pfeiffer - * - * You can Freely distribute this program under the GNU Library General Public - * License. See the file "COPYING" for the exact licensing terms. - */ - -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "kimagefilepreview.h" -#include "config-kfile.h" - -/**** KImageFilePreview ****/ - -KImageFilePreview::KImageFilePreview( TQWidget *parent ) - : KPreviewWidgetBase( parent ), - m_job( 0L ) -{ - TDEConfig *config = TDEGlobal::config(); - TDEConfigGroupSaver cs( config, ConfigGroup ); - autoMode = config->readBoolEntry( "Automatic Preview", true ); - - TQVBoxLayout *vb = new TQVBoxLayout( this, 0, KDialog::spacingHint() ); - - imageLabel = new TQLabel( this ); - imageLabel->setFrameStyle( TQFrame::NoFrame ); - imageLabel->setAlignment( Qt::AlignHCenter | Qt::AlignVCenter ); - imageLabel->setSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Expanding) ); - vb->addWidget( imageLabel ); - - TQHBoxLayout *hb = new TQHBoxLayout( 0 ); - vb->addLayout( hb ); - - autoPreview = new TQCheckBox( i18n("&Automatic preview"), this ); - autoPreview->setChecked( autoMode ); - hb->addWidget( autoPreview ); - connect( autoPreview, TQT_SIGNAL(toggled(bool)), TQT_SLOT(toggleAuto(bool)) ); - - previewButton = new KPushButton( SmallIconSet("thumbnail"), i18n("&Preview"), this ); - hb->addWidget( previewButton ); - connect( previewButton, TQT_SIGNAL(clicked()), TQT_SLOT(showPreview()) ); - - timer = new TQTimer( this ); - connect( timer, TQT_SIGNAL(timeout()), TQT_SLOT(showPreview()) ); - - setSupportedMimeTypes( TDEIO::PreviewJob::supportedMimeTypes() ); -} - -KImageFilePreview::~KImageFilePreview() -{ - if ( m_job ) - m_job->kill(); - - TDEConfig *config = TDEGlobal::config(); - TDEConfigGroupSaver cs( config, ConfigGroup ); - config->writeEntry( "Automatic Preview", autoPreview->isChecked() ); -} - -void KImageFilePreview::showPreview() -{ - // Pass a copy since clearPreview() will clear currentURL - KURL url = currentURL; - showPreview( url, true ); -} - -// called via KPreviewWidgetBase interface -void KImageFilePreview::showPreview( const KURL& url ) -{ - showPreview( url, false ); -} - -void KImageFilePreview::showPreview( const KURL &url, bool force ) -{ - if ( !url.isValid() ) { - clearPreview(); - return; - } - - if ( url != currentURL || force ) - { - clearPreview(); - currentURL = url; - - if ( autoMode || force ) - { - int w = imageLabel->contentsRect().width() - 4; - int h = imageLabel->contentsRect().height() - 4; - - m_job = createJob( url, w, h ); - if ( force ) // explicitly requested previews shall always be generated! - m_job->setIgnoreMaximumSize( true ); - - connect( m_job, TQT_SIGNAL( result( TDEIO::Job * )), - this, TQT_SLOT( slotResult( TDEIO::Job * ))); - connect( m_job, TQT_SIGNAL( gotPreview( const KFileItem*, - const TQPixmap& )), - TQT_SLOT( gotPreview( const KFileItem*, const TQPixmap& ) )); - - connect( m_job, TQT_SIGNAL( failed( const KFileItem* )), - this, TQT_SLOT( slotFailed( const KFileItem* ) )); - } - } -} - -void KImageFilePreview::toggleAuto( bool a ) -{ - autoMode = a; - if ( autoMode ) - { - // Pass a copy since clearPreview() will clear currentURL - KURL url = currentURL; - showPreview( url, true ); - } -} - -void KImageFilePreview::resizeEvent( TQResizeEvent * ) -{ - timer->start( 100, true ); // forces a new preview -} - -TQSize KImageFilePreview::sizeHint() const -{ - return TQSize( 20, 200 ); // otherwise it ends up huge??? -} - -TDEIO::PreviewJob * KImageFilePreview::createJob( const KURL& url, int w, int h ) -{ - KURL::List urls; - urls.append( url ); - return TDEIO::filePreview( urls, w, h, 0, 0, true, false ); -} - -void KImageFilePreview::gotPreview( const KFileItem* item, const TQPixmap& pm ) -{ - if ( item->url() == currentURL ) // should always be the case - imageLabel->setPixmap( pm ); -} - -void KImageFilePreview::slotFailed( const KFileItem* item ) -{ - if ( item->isDir() ) - imageLabel->clear(); - else if ( item->url() == currentURL ) // should always be the case - imageLabel->setPixmap( SmallIcon( "file_broken", KIcon::SizeLarge, - KIcon::DisabledState )); -} - -void KImageFilePreview::slotResult( TDEIO::Job *job ) -{ - if ( job == m_job ) - m_job = 0L; -} - -void KImageFilePreview::clearPreview() -{ - if ( m_job ) { - m_job->kill(); - m_job = 0L; - } - - imageLabel->clear(); - currentURL = KURL(); -} - -void KImageFilePreview::virtual_hook( int id, void* data ) -{ KPreviewWidgetBase::virtual_hook( id, data ); } - -#include "kimagefilepreview.moc" diff --git a/kio/kfile/kimagefilepreview.h b/kio/kfile/kimagefilepreview.h deleted file mode 100644 index 0604e08f0..000000000 --- a/kio/kfile/kimagefilepreview.h +++ /dev/null @@ -1,77 +0,0 @@ -/* - * - * This file is part of the KDE project. - * Copyright (C) 2001 Martin R. Jones - * 2001 Carsten Pfeiffer - * - * You can Freely distribute this program under the GNU Library General Public - * License. See the file "COPYING" for the exact licensing terms. - */ - -#ifndef KIMAGEFILEPREVIEW_H -#define KIMAGEFILEPREVIEW_H - -#include - -#include -#include - -class TQCheckBox; -class TQPushButton; -class TQLabel; -class TQTimer; - -class KFileDialog; -class KFileItem; -namespace TDEIO { class Job; class PreviewJob; } - -/** - * Image preview widget for the file dialog. - */ -class TDEIO_EXPORT KImageFilePreview : public KPreviewWidgetBase -{ - Q_OBJECT - - public: - KImageFilePreview(TQWidget *parent); - ~KImageFilePreview(); - - virtual TQSize sizeHint() const; - - public slots: - virtual void showPreview(const KURL &url); - virtual void clearPreview(); - - protected slots: - void showPreview(); - void showPreview( const KURL& url, bool force ); - - void toggleAuto(bool); - virtual void gotPreview( const KFileItem*, const TQPixmap& ); - - protected: - virtual void resizeEvent(TQResizeEvent *e); - virtual TDEIO::PreviewJob * createJob( const KURL& url, - int w, int h ); - - private slots: - void slotResult( TDEIO::Job * ); - virtual void slotFailed( const KFileItem* ); - - private: - bool autoMode; - KURL currentURL; - TQTimer *timer; - TQLabel *imageLabel; - TQLabel *infoLabel; - TQCheckBox *autoPreview; - TQPushButton *previewButton; - TDEIO::PreviewJob *m_job; - protected: - virtual void virtual_hook( int id, void* data ); - private: - class KImageFilePreviewPrivate; - KImageFilePreviewPrivate *d; -}; - -#endif // KIMAGEFILEPREVIEW_H diff --git a/kio/kfile/kmetaprops.cpp b/kio/kfile/kmetaprops.cpp deleted file mode 100644 index c349693e5..000000000 --- a/kio/kfile/kmetaprops.cpp +++ /dev/null @@ -1,268 +0,0 @@ -/* This file is part of the KDE libraries - Copyright (C) 2001,2002 Rolf Magnus - - library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License version 2 as published by the Free Software Foundation. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. - - $Id$ - */ - -#include "kmetaprops.h" - -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -#undef Bool - -class MetaPropsScrollView : public TQScrollView -{ -public: - MetaPropsScrollView(TQWidget* parent = 0, const char* name = 0) - : TQScrollView(parent, name) - { - setFrameStyle(TQFrame::NoFrame); - m_frame = new TQFrame(viewport(), "MetaPropsScrollView::m_frame"); - m_frame->setFrameStyle(TQFrame::NoFrame); - addChild(m_frame, 0, 0); - }; - - TQFrame* frame() {return m_frame;}; - -protected: - virtual void viewportResizeEvent(TQResizeEvent* ev) - { - TQScrollView::viewportResizeEvent(ev); - m_frame->resize( kMax(m_frame->sizeHint().width(), ev->size().width()), - kMax(m_frame->sizeHint().height(), ev->size().height())); - }; - -private: - TQFrame* m_frame; -}; - -class KFileMetaPropsPlugin::KFileMetaPropsPluginPrivate -{ -public: - KFileMetaPropsPluginPrivate() {} - ~KFileMetaPropsPluginPrivate() {} - - TQFrame* m_frame; - TQGridLayout* m_framelayout; - KFileMetaInfo m_info; -// TQPushButton* m_add; - TQPtrList m_editWidgets; -}; - -KFileMetaPropsPlugin::KFileMetaPropsPlugin(KPropertiesDialog* props) - : KPropsDlgPlugin(props) -{ - d = new KFileMetaPropsPluginPrivate; - - KFileItem * fileitem = properties->item(); - kdDebug(250) << "KFileMetaPropsPlugin constructor" << endl; - - d->m_info = fileitem->metaInfo(); - if (!d->m_info.isValid()) - { - d->m_info = KFileMetaInfo(properties->kurl().path(-1)); - fileitem->setMetaInfo(d->m_info); - } - - if ( properties->items().count() > 1 ) - { - // not yet supported - // we should allow setting values for a list of files. Itt makes sense - // in some cases, like the album of a list of mp3s - return; - } - - createLayout(); - - setDirty(true); -} - -void KFileMetaPropsPlugin::createLayout() -{ - TQFileInfo file_info(properties->item()->url().path()); - - kdDebug(250) << "KFileMetaPropsPlugin::createLayout" << endl; - - // is there any valid and non-empty info at all? - if ( !d->m_info.isValid() || (d->m_info.preferredKeys()).isEmpty() ) - return; - - // now get a list of groups - KFileMetaInfoProvider* prov = KFileMetaInfoProvider::self(); - TQStringList groupList = d->m_info.preferredGroups(); - - const KFileMimeTypeInfo* mtinfo = prov->mimeTypeInfo(d->m_info.mimeType()); - if (!mtinfo) - { - kdDebug(7034) << "no mimetype info there\n"; - return; - } - - // let the dialog create the page frame - TQFrame* topframe = properties->addPage(i18n("&Meta Info")); - topframe->setFrameStyle(TQFrame::NoFrame); - TQVBoxLayout* tmp = new TQVBoxLayout(topframe); - - // create a scroll view in the page - MetaPropsScrollView* view = new MetaPropsScrollView(topframe); - - tmp->addWidget(view); - - d->m_frame = view->frame(); - - TQVBoxLayout *toplayout = new TQVBoxLayout(d->m_frame); - toplayout->setSpacing(KDialog::spacingHint()); - - for (TQStringList::Iterator git=groupList.begin(); - git!=groupList.end(); ++git) - { - kdDebug(7033) << *git << endl; - - TQStringList itemList = d->m_info.group(*git).preferredKeys(); - if (itemList.isEmpty()) - continue; - - TQGroupBox *groupBox = new TQGroupBox(2, Qt::Horizontal, - TQStyleSheet::escape(mtinfo->groupInfo(*git)->translatedName()), - d->m_frame); - - toplayout->addWidget(groupBox); - - TQValueList readItems; - TQValueList editItems; - - for (TQStringList::Iterator iit = itemList.begin(); - iit!=itemList.end(); ++iit) - { - KFileMetaInfoItem item = d->m_info[*git][*iit]; - if ( !item.isValid() ) continue; - - bool editable = file_info.isWritable() && item.isEditable(); - - if (editable) - editItems.append( item ); - else - readItems.append( item ); - } - - KFileMetaInfoWidget* w = 0L; - // then first add the editable items to the layout - for (TQValueList::Iterator iit= editItems.begin(); - iit!=editItems.end(); ++iit) - { - TQLabel* l = new TQLabel((*iit).translatedKey() + ":", groupBox); - l->setAlignment( AlignAuto | AlignTop | ExpandTabs ); - TQValidator* val = mtinfo->createValidator(*git, (*iit).key()); - if (!val) kdDebug(7033) << "didn't get a validator for " << *git << "/" << (*iit).key() << endl; - w = new KFileMetaInfoWidget(*iit, val, groupBox); - d->m_editWidgets.append( w ); - connect(w, TQT_SIGNAL(valueChanged(const TQVariant&)), this, TQT_SIGNAL(changed())); - } - - // and then the read only items - for (TQValueList::Iterator iit= readItems.begin(); - iit!=readItems.end(); ++iit) - { - TQLabel* l = new TQLabel((*iit).translatedKey() + ":", groupBox); - l->setAlignment( AlignAuto | AlignTop | ExpandTabs ); - (new KFileMetaInfoWidget(*iit, KFileMetaInfoWidget::ReadOnly, 0L, groupBox)); - } - } - - toplayout->addStretch(1); - - // the add key (disabled until fully implemented) -/* d->m_add = new TQPushButton(i18n("&Add"), topframe); - d->m_add->setSizePolicy(TQSizePolicy(TQSizePolicy::Fixed, - TQSizePolicy::Fixed)); - connect(d->m_add, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotAdd())); - tmp->addWidget(d->m_add); - - // if nothing can be added, deactivate it - if ( !d->m_info.supportsVariableKeys() ) - { - // if supportedKeys() does contain anything not in preferredKeys, - // we have something addable - - TQStringList sk = d->m_info.supportedKeys(); - d->m_add->setEnabled(false); - for (TQStringList::Iterator it = sk.begin(); it!=sk.end(); ++it) - { - if ( l.find(*it)==l.end() ) - { - d->m_add->setEnabled(true); - kdDebug(250) << "**first addable key is " << (*it).latin1() << "**" <url()); - return _items.count() == 1 && metaDataEnabled; -} - -void KFileMetaPropsPlugin::applyChanges() -{ - kdDebug(250) << "applying changes" << endl; - // insert the fields that changed into the info object - - TQPtrListIterator it( d->m_editWidgets ); - KFileMetaInfoWidget* w; - for (; (w = it.current()); ++it) w->apply(); - d->m_info.applyChanges(properties->kurl().path()); -} - -#include "kmetaprops.moc" diff --git a/kio/kfile/kmetaprops.h b/kio/kfile/kmetaprops.h deleted file mode 100644 index c842499dd..000000000 --- a/kio/kfile/kmetaprops.h +++ /dev/null @@ -1,69 +0,0 @@ -/* This file is part of the KDE libraries - Copyright (C) 2001,2002 Rolf Magnus - - library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License version 2 as published by the Free Software Foundation. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. - - */ - -#ifndef __KMETAPROPS_H__ -#define __KMETAPROPS_H__ -#include - - -class KFileMetaInfoItem; - -/*! - * 'MetaProps plugin - * In this plugin you can modify meta information like id3 tags of mp3 files - */ -class TDEIO_EXPORT KFileMetaPropsPlugin : public KPropsDlgPlugin -{ - Q_OBJECT -public: - /** - * Constructor - */ - KFileMetaPropsPlugin( KPropertiesDialog *_props ); - virtual ~KFileMetaPropsPlugin(); - - virtual void applyChanges(); - - /** - * Tests whether the file specified by _items has a 'MetaInfo' plugin. - */ - static bool supports( KFileItemList _items ); - -private: - void createLayout(); - - TQWidget* makeBoolWidget(const KFileMetaInfoItem& item, TQWidget* parent); - TQWidget* makeIntWidget(const KFileMetaInfoItem& item, TQWidget* parent, - TQString& valClass); - TQWidget* makeStringWidget(const KFileMetaInfoItem& item, TQWidget* parent, - TQString& valClass); - TQWidget* makeDateTimeWidget(const KFileMetaInfoItem& item, TQWidget* parent, - TQString& valClass); - -private slots: - // Code disabled until the "Add" button is implemented -// void slotAdd(); - -private: - - class KFileMetaPropsPluginPrivate; - KFileMetaPropsPluginPrivate *d; -}; - -#endif diff --git a/kio/kfile/knotifydialog.cpp b/kio/kfile/knotifydialog.cpp deleted file mode 100644 index 088f9be54..000000000 --- a/kio/kfile/knotifydialog.cpp +++ /dev/null @@ -1,1191 +0,0 @@ -/* - Copyright (C) 2000,2002 Carsten Pfeiffer - Copyright (C) 2002 Neil Stevens - - This program is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License version 2 as published by the Free Software Foundation; - - 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 Library General Public License - along with this library, If not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -*/ - -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -using namespace KNotify; - -enum -{ - COL_EXECUTE = 0, - COL_STDERR = 1, - COL_MESSAGE = 2, - COL_LOGFILE = 3, - COL_SOUND = 4, - COL_TASKBAR = 5, - COL_EVENT = 6 -}; - -// -// I don't feel like subclassing KComboBox and find ways to insert that into -// the .ui file... -// -namespace KNotify -{ - class SelectionCombo - { - public: - // - // Mind the order in fill() and type() - // - static void fill( KComboBox *combo ) - { - combo->insertItem( i18n("Sounds") ); - combo->insertItem( i18n("Logging") ); - combo->insertItem( i18n("Program Execution") ); - combo->insertItem( i18n("Message Windows") ); - combo->insertItem( i18n("Passive Windows") ); - combo->insertItem( i18n("Standard Error Output") ); - combo->insertItem( i18n("Taskbar") ); - } - - static int type( KComboBox *combo ) - { - switch( combo->currentItem() ) - { - case 0: - return KNotifyClient::Sound; - case 1: - return KNotifyClient::Logfile; - case 2: - return KNotifyClient::Execute; - case 3: - return KNotifyClient::Messagebox; - case 4: - return KNotifyClient::PassivePopup; - case 5: - return KNotifyClient::Stderr; - case 6: - return KNotifyClient::Taskbar; - } - - return KNotifyClient::None; - } - }; - - // Needed for displaying tooltips in the listview's QHeader - class KNotifyToolTip : public TQToolTip - { - public: - KNotifyToolTip( TQHeader *header ) - : TQToolTip( header ) - { - m_tips[COL_EXECUTE] = i18n("Execute a program"); - m_tips[COL_STDERR] = i18n("Print to Standard error output"); - m_tips[COL_MESSAGE] = i18n("Display a messagebox"); - m_tips[COL_LOGFILE] = i18n("Log to a file"); - m_tips[COL_SOUND] = i18n("Play a sound"); - m_tips[COL_TASKBAR] = i18n("Flash the taskbar entry"); - } - virtual ~KNotifyToolTip() {} - - protected: - virtual void maybeTip ( const TQPoint& p ) - { - TQHeader *header = static_cast( parentWidget() ); - int section = 0; - - if ( header->orientation() == Qt::Horizontal ) - section= header->sectionAt( p.x() ); - else - section= header->sectionAt( p.y() ); - - if ( ( section < 0 ) || ( static_cast( section ) >= (sizeof(m_tips) / sizeof(TQString)) ) ) - return; - - tip( header->sectionRect( section ), m_tips[section] ); - } - - private: - TQString m_tips[6]; - }; - -} - - -int KNotifyDialog::configure( TQWidget *parent, const char *name, - const TDEAboutData *aboutData ) -{ - KNotifyDialog dialog( parent, name, true, aboutData ); - return dialog.exec(); -} - -KNotifyDialog::KNotifyDialog( TQWidget *parent, const char *name, bool modal, - const TDEAboutData *aboutData ) - : KDialogBase(parent, name, modal, i18n("Notification Settings"), - Ok | Apply | Cancel | Default, Ok, true ) -{ - TQVBox *box = makeVBoxMainWidget(); - - m_notifyWidget = new KNotifyWidget( box, "knotify widget" ); - - if ( aboutData ) - addApplicationEvents( aboutData->appName() ); - - connect( this, TQT_SIGNAL( okClicked() ), m_notifyWidget, TQT_SLOT( save() )); - connect( this, TQT_SIGNAL( applyClicked() ), m_notifyWidget, TQT_SLOT( save() )); -} - -KNotifyDialog::~KNotifyDialog() -{ -} - -void KNotifyDialog::addApplicationEvents( const char *appName ) -{ - addApplicationEvents( TQString::fromUtf8( appName ) + - TQString::fromLatin1( "/eventsrc" ) ); -} - -void KNotifyDialog::addApplicationEvents( const TQString& path ) -{ - Application *app = m_notifyWidget->addApplicationEvents( path ); - if ( app ) - { - m_notifyWidget->addVisibleApp( app ); - m_notifyWidget->sort(); - } -} - -void KNotifyDialog::clearApplicationEvents() -{ - m_notifyWidget->clear(); -} - -void KNotifyDialog::slotDefault() -{ - m_notifyWidget->resetDefaults( true ); // ask user -} - - -////////////////////////////////////////////////////////////////////// -////////////////////////////////////////////////////////////////////// - - -class KNotifyWidget::Private -{ -public: - TQPixmap pixmaps[6]; - KNotifyToolTip *toolTip; -}; - -// simple access to all knotify-handled applications -KNotifyWidget::KNotifyWidget( TQWidget *parent, const char *name, - bool handleAllApps ) - : KNotifyWidgetBase( parent, name ? name : "KNotifyWidget" ) -{ - d = new Private; - - m_allApps.setAutoDelete( true ); - - if ( !handleAllApps ) - { - m_affectAllApps->hide(); - m_playerButton->hide(); - } - - SelectionCombo::fill( m_comboEnable ); - SelectionCombo::fill( m_comboDisable ); - - m_listview->setFullWidth( true ); - m_listview->setAllColumnsShowFocus( true ); - - TQPixmap pexec = SmallIcon("exec"); - TQPixmap pstderr = SmallIcon("terminal"); - TQPixmap pmessage = SmallIcon("info"); - TQPixmap plogfile = SmallIcon("log"); - TQPixmap psound = SmallIcon("sound"); - TQPixmap ptaskbar = SmallIcon("kicker"); - - d->pixmaps[COL_EXECUTE] = pexec; - d->pixmaps[COL_STDERR] = pstderr; - d->pixmaps[COL_MESSAGE] = pmessage; - d->pixmaps[COL_LOGFILE] = plogfile; - d->pixmaps[COL_SOUND] = psound; - d->pixmaps[COL_TASKBAR] = ptaskbar; - - int w = KIcon::SizeSmall + 6; - - TQHeader *header = m_listview->header(); - header->setLabel( COL_EXECUTE, pexec, TQString::null, w ); - header->setLabel( COL_STDERR, pstderr, TQString::null, w ); - header->setLabel( COL_MESSAGE, pmessage, TQString::null, w ); - header->setLabel( COL_LOGFILE, plogfile, TQString::null, w ); - header->setLabel( COL_SOUND, psound, TQString::null, w ); - header->setLabel( COL_TASKBAR, ptaskbar, TQString::null, w ); - - d->toolTip = new KNotifyToolTip( header ); - - m_playButton->setIconSet( SmallIconSet( "player_play" ) ); - connect( m_playButton, TQT_SIGNAL( clicked() ), TQT_SLOT( playSound() )); - - connect( m_listview, TQT_SIGNAL( currentChanged( TQListViewItem * ) ), - TQT_SLOT( slotEventChanged( TQListViewItem * ) )); - connect( m_listview, TQT_SIGNAL(clicked( TQListViewItem *, const TQPoint&, int)), - TQT_SLOT( slotItemClicked( TQListViewItem *, const TQPoint&, int ))); - - connect( m_playSound, TQT_SIGNAL( toggled( bool )), - TQT_SLOT( soundToggled( bool )) ); - connect( m_logToFile, TQT_SIGNAL( toggled( bool )), - TQT_SLOT( loggingToggled( bool )) ); - connect( m_execute, TQT_SIGNAL( toggled( bool )), - TQT_SLOT( executeToggled( bool )) ); - connect( m_messageBox, TQT_SIGNAL( toggled( bool )), - TQT_SLOT( messageBoxChanged() ) ); - connect( m_passivePopup, TQT_SIGNAL( toggled( bool )), - TQT_SLOT( messageBoxChanged() ) ); - connect( m_stderr, TQT_SIGNAL( toggled( bool )), - TQT_SLOT( stderrToggled( bool ) ) ); - connect( m_taskbar, TQT_SIGNAL( toggled( bool )), - TQT_SLOT( taskbarToggled( bool ) ) ); - - connect( m_soundPath, TQT_SIGNAL( textChanged( const TQString& )), - TQT_SLOT( soundFileChanged( const TQString& ))); - connect( m_logfilePath, TQT_SIGNAL( textChanged( const TQString& )), - TQT_SLOT( logfileChanged( const TQString& ) )); - connect( m_executePath, TQT_SIGNAL( textChanged( const TQString& )), - TQT_SLOT( commandlineChanged( const TQString& ) )); - - connect( m_soundPath, TQT_SIGNAL( openFileDialog( KURLRequester * )), - TQT_SLOT( openSoundDialog( KURLRequester * ))); - connect( m_logfilePath, TQT_SIGNAL( openFileDialog( KURLRequester * )), - TQT_SLOT( openLogDialog( KURLRequester * ))); - connect( m_executePath, TQT_SIGNAL( openFileDialog( KURLRequester * )), - TQT_SLOT( openExecDialog( KURLRequester * ))); - - connect( m_extension, TQT_SIGNAL( clicked() ), - TQT_SLOT( toggleAdvanced()) ); - - connect( m_buttonEnable, TQT_SIGNAL( clicked() ), TQT_SLOT( enableAll() )); - connect( m_buttonDisable, TQT_SIGNAL( clicked() ), TQT_SLOT( enableAll() )); - - TQString whatsThis = i18n("You may use the following macros
" - "in the commandline:
" - "%e: for the event name,
" - "%a: for the name of the application that sent the event,
" - "%s: for the notification message,
" - "%w: for the numeric window ID where the event originated,
" - "%i: for the numeric event ID."); - TQWhatsThis::add( m_execute, whatsThis ); - TQWhatsThis::add( m_executePath, whatsThis ); - - showAdvanced( false ); - - slotEventChanged( 0L ); // disable widgets by default -} - -KNotifyWidget::~KNotifyWidget() -{ - delete d->toolTip; - delete d; -} - -void KNotifyWidget::toggleAdvanced() -{ - showAdvanced( m_logToFile->isHidden() ); -} - -void KNotifyWidget::showAdvanced( bool show ) -{ - if ( show ) - { - m_extension->setText( i18n("Advanced <<") ); - TQToolTip::add( m_extension, i18n("Hide advanced options") ); - - m_logToFile->show(); - m_logfilePath->show(); - m_execute->show(); - m_executePath->show(); - m_messageBox->show(); - m_passivePopup->show(); - m_stderr->show(); - m_taskbar->show(); - - m_passivePopup->setEnabled( m_messageBox->isChecked() ); - m_actionsBoxLayout->setSpacing( KDialog::spacingHint() ); - } - else - { - m_extension->setText( i18n("Advanced >>") ); - TQToolTip::add( m_extension, i18n("Show advanced options") ); - - m_logToFile->hide(); - m_logfilePath->hide(); - m_execute->hide(); - m_executePath->hide(); - m_messageBox->hide(); - m_passivePopup->hide(); - m_stderr->hide(); - m_taskbar->hide(); - - m_actionsBoxLayout->setSpacing( 0 ); - } -} - -Application * KNotifyWidget::addApplicationEvents( const TQString& path ) -{ - kdDebug() << "**** knotify: adding path: " << path << endl; - TQString relativePath = path; - - if ( path.at(0) == '/' && KStandardDirs::exists( path ) ) - relativePath = makeRelative( path ); - - if ( !relativePath.isEmpty() ) - { - Application *app = new Application( relativePath ); - m_allApps.append( app ); - return app; - } - - return 0L; -} - -void KNotifyWidget::clear() -{ - clearVisible(); - m_allApps.clear(); -} - -void KNotifyWidget::clearVisible() -{ - m_visibleApps.clear(); - m_listview->clear(); - slotEventChanged( 0L ); // disable widgets -} - -void KNotifyWidget::showEvent( TQShowEvent *e ) -{ - selectItem( m_listview->firstChild() ); - KNotifyWidgetBase::showEvent( e ); -} - -void KNotifyWidget::slotEventChanged( TQListViewItem *item ) -{ - bool on = (item != 0L); - - m_actionsBox->setEnabled( on ); - m_controlsBox->setEnabled( on ); - - if ( !on ) - return; - - ListViewItem *lit = static_cast( item ); - updateWidgets( lit ); -} - -void KNotifyWidget::updateWidgets( ListViewItem *item ) -{ - bool enable; - bool checked; - - blockSignals( true ); // don't emit changed() signals - - const Event& event = item->event(); - - // sound settings - m_playButton->setEnabled( !event.soundfile.isEmpty() ); - m_soundPath->setURL( event.soundfile ); - enable = (event.dontShow & KNotifyClient::Sound) == 0; - checked = enable && !event.soundfile.isEmpty() && - (event.presentation & KNotifyClient::Sound); - m_playSound->setEnabled( enable ); - m_playSound->setChecked( checked ); - m_soundPath->setEnabled( checked ); - - - // logfile settings - m_logfilePath->setURL( event.logfile ); - enable = (event.dontShow & KNotifyClient::Logfile) == 0; - checked = enable && !event.logfile.isEmpty() && - (event.presentation & KNotifyClient::Logfile); - m_logToFile->setEnabled( enable ); - m_logToFile->setChecked( checked ); - m_logfilePath->setEnabled( checked ); - - - // execute program settings - m_executePath->setURL( event.commandline ); - enable = (event.dontShow & KNotifyClient::Execute) == 0; - checked = enable && !event.commandline.isEmpty() && - (event.presentation & KNotifyClient::Execute); - m_execute->setEnabled( enable ); - m_execute->setChecked( checked ); - m_executePath->setEnabled( checked ); - - - // other settings - m_messageBox->setChecked(event.presentation & (KNotifyClient::Messagebox | KNotifyClient::PassivePopup)); - enable = (event.dontShow & KNotifyClient::Messagebox) == 0; - m_messageBox->setEnabled( enable ); - - m_passivePopup->setChecked(event.presentation & KNotifyClient::PassivePopup); - enable = (event.dontShow & KNotifyClient::PassivePopup) == 0; - m_passivePopup->setEnabled( enable ); - - m_stderr->setChecked( event.presentation & KNotifyClient::Stderr ); - enable = (event.dontShow & KNotifyClient::Stderr) == 0; - m_stderr->setEnabled( enable ); - - m_taskbar->setChecked(event.presentation & KNotifyClient::Taskbar); - enable = (event.dontShow & KNotifyClient::Taskbar) == 0; - m_taskbar->setEnabled( enable ); - - updatePixmaps( item ); - - blockSignals( false ); -} - -void KNotifyWidget::updatePixmaps( ListViewItem *item ) -{ - TQPixmap emptyPix; - Event &event = item->event(); - - bool doIt = (event.presentation & KNotifyClient::Execute) && - !event.commandline.isEmpty(); - item->setPixmap( COL_EXECUTE, doIt ? d->pixmaps[COL_EXECUTE] : emptyPix ); - - doIt = (event.presentation & KNotifyClient::Sound) && - !event.soundfile.isEmpty(); - item->setPixmap( COL_SOUND, doIt ? d->pixmaps[COL_SOUND] : emptyPix ); - - doIt = (event.presentation & KNotifyClient::Logfile) && - !event.logfile.isEmpty(); - item->setPixmap( COL_LOGFILE, doIt ? d->pixmaps[COL_LOGFILE] : emptyPix ); - - item->setPixmap( COL_MESSAGE, - (event.presentation & - (KNotifyClient::Messagebox | KNotifyClient::PassivePopup)) ? - d->pixmaps[COL_MESSAGE] : emptyPix ); - - item->setPixmap( COL_STDERR, - (event.presentation & KNotifyClient::Stderr) ? - d->pixmaps[COL_STDERR] : emptyPix ); - item->setPixmap( COL_TASKBAR, - (event.presentation & KNotifyClient::Taskbar) ? - d->pixmaps[COL_TASKBAR] : emptyPix ); -} - -void KNotifyWidget::addVisibleApp( Application *app ) -{ - if ( !app || (m_visibleApps.findRef( app ) != -1) ) - return; - - m_visibleApps.append( app ); - addToView( app->eventList() ); - - TQListViewItem *item = m_listview->selectedItem(); - if ( !item ) - item = m_listview->firstChild(); - - selectItem( item ); -} - -void KNotifyWidget::addToView( const EventList& events ) -{ - ListViewItem *item = 0L; - - EventListIterator it( events ); - - for ( ; it.current(); ++it ) - { - Event *event = it.current(); - item = new ListViewItem( m_listview, event ); - - if ( (event->presentation & KNotifyClient::Execute) && - !event->commandline.isEmpty() ) - item->setPixmap( COL_EXECUTE, d->pixmaps[COL_EXECUTE] ); - if ( (event->presentation & KNotifyClient::Sound) && - !event->soundfile.isEmpty() ) - item->setPixmap( COL_SOUND, d->pixmaps[COL_SOUND] ); - if ( (event->presentation & KNotifyClient::Logfile) && - !event->logfile.isEmpty() ) - item->setPixmap( COL_LOGFILE, d->pixmaps[COL_LOGFILE] ); - if ( event->presentation & (KNotifyClient::Messagebox|KNotifyClient::PassivePopup) ) - item->setPixmap( COL_MESSAGE, d->pixmaps[COL_MESSAGE] ); - if ( event->presentation & KNotifyClient::Stderr ) - item->setPixmap( COL_STDERR, d->pixmaps[COL_STDERR] ); - if ( event->presentation & KNotifyClient::Taskbar ) - item->setPixmap( COL_TASKBAR, d->pixmaps[COL_TASKBAR] ); - } -} - -void KNotifyWidget::widgetChanged( TQListViewItem *item, - int what, bool on, TQWidget *buddy ) -{ - if ( signalsBlocked() ) - return; - - if ( buddy ) - buddy->setEnabled( on ); - - Event &e = static_cast( item )->event(); - if ( on ) - { - e.presentation |= what; - if ( buddy ) - buddy->setFocus(); - } - else - e.presentation &= ~what; - - emit changed( true ); -} - -void KNotifyWidget::soundToggled( bool on ) -{ - TQListViewItem *item = m_listview->currentItem(); - if ( !item ) - return; - bool doIcon = on && !m_soundPath->url().isEmpty(); - item->setPixmap( COL_SOUND, doIcon ? d->pixmaps[COL_SOUND] : TQPixmap() ); - widgetChanged( item, KNotifyClient::Sound, on, m_soundPath ); -} - -void KNotifyWidget::loggingToggled( bool on ) -{ - TQListViewItem *item = m_listview->currentItem(); - if ( !item ) - return; - bool doIcon = on && !m_logfilePath->url().isEmpty(); - item->setPixmap(COL_LOGFILE, doIcon ? d->pixmaps[COL_LOGFILE] : TQPixmap()); - widgetChanged( item, KNotifyClient::Logfile, on, m_logfilePath ); -} - -void KNotifyWidget::executeToggled( bool on ) -{ - TQListViewItem *item = m_listview->currentItem(); - if ( !item ) - return; - bool doIcon = on && !m_executePath->url().isEmpty(); - item->setPixmap(COL_EXECUTE, doIcon ? d->pixmaps[COL_EXECUTE] : TQPixmap()); - widgetChanged( item, KNotifyClient::Execute, on, m_executePath ); -} - -void KNotifyWidget::messageBoxChanged() -{ - if ( signalsBlocked() ) - return; - - m_passivePopup->setEnabled( m_messageBox->isChecked() ); - - TQListViewItem *item = m_listview->currentItem(); - if ( !item ) - return; - - bool on = m_passivePopup->isEnabled(); - item->setPixmap( COL_MESSAGE, on ? d->pixmaps[COL_MESSAGE] : TQPixmap() ); - - Event &e = static_cast( item )->event(); - - if ( m_messageBox->isChecked() ) { - if ( m_passivePopup->isChecked() ) { - e.presentation |= KNotifyClient::PassivePopup; - e.presentation &= ~KNotifyClient::Messagebox; - } - else { - e.presentation &= ~KNotifyClient::PassivePopup; - e.presentation |= KNotifyClient::Messagebox; - } - } - else { - e.presentation &= ~KNotifyClient::Messagebox; - e.presentation &= ~KNotifyClient::PassivePopup; - } - - emit changed( true ); -} - -void KNotifyWidget::stderrToggled( bool on ) -{ - TQListViewItem *item = m_listview->currentItem(); - if ( !item ) - return; - item->setPixmap( COL_STDERR, on ? d->pixmaps[COL_STDERR] : TQPixmap() ); - widgetChanged( item, KNotifyClient::Stderr, on ); -} - -void KNotifyWidget::taskbarToggled( bool on ) -{ - TQListViewItem *item = m_listview->currentItem(); - if ( !item ) - return; - item->setPixmap( COL_TASKBAR, on ? d->pixmaps[COL_TASKBAR] : TQPixmap() ); - widgetChanged( item, KNotifyClient::Taskbar, on ); -} - -void KNotifyWidget::soundFileChanged( const TQString& text ) -{ - if ( signalsBlocked() ) - return; - - TQListViewItem *item = m_listview->currentItem(); - if ( !item ) - return; - - m_playButton->setEnabled( !text.isEmpty() ); - - currentEvent()->soundfile = text; - bool ok = !text.isEmpty() && m_playSound->isChecked(); - item->setPixmap( COL_SOUND, ok ? d->pixmaps[COL_SOUND] : TQPixmap() ); - - emit changed( true ); -} - -void KNotifyWidget::logfileChanged( const TQString& text ) -{ - if ( signalsBlocked() ) - return; - - TQListViewItem *item = m_listview->currentItem(); - if ( !item ) - return; - - currentEvent()->logfile = text; - bool ok = !text.isEmpty() && m_logToFile->isChecked(); - item->setPixmap( COL_LOGFILE, ok ? d->pixmaps[COL_LOGFILE] : TQPixmap() ); - - emit changed( true ); -} - -void KNotifyWidget::commandlineChanged( const TQString& text ) -{ - if ( signalsBlocked() ) - return; - - TQListViewItem *item = m_listview->currentItem(); - if ( !item ) - return; - - currentEvent()->commandline = text; - bool ok = !text.isEmpty() && m_execute->isChecked(); - item->setPixmap( COL_EXECUTE, ok ? d->pixmaps[COL_EXECUTE] : TQPixmap() ); - - emit changed( true ); -} - -void KNotifyWidget::slotItemClicked( TQListViewItem *item, const TQPoint&, - int col ) -{ - if ( !item || !item->isSelected() ) - return; - - Event *event = currentEvent(); - if ( !event ) - return; // very unlikely, but safety first - - bool doShowAdvanced = false; - - switch( col ) - { - case COL_EXECUTE: - m_execute->toggle(); - m_executePath->setFocus(); - doShowAdvanced = true; - break; - case COL_STDERR: - m_stderr->toggle(); - break; - case COL_TASKBAR: - m_taskbar->toggle(); - break; - case COL_MESSAGE: - m_passivePopup->setChecked( true ); // default to passive popups - m_messageBox->toggle(); - break; - case COL_LOGFILE: - m_logToFile->toggle(); - m_logfilePath->setFocus(); - doShowAdvanced = true; - break; - case COL_SOUND: - m_playSound->toggle(); - break; - default: // do nothing - break; - } - - if ( doShowAdvanced && !m_logToFile->isVisible() ) - { - showAdvanced( true ); - m_listview->ensureItemVisible( m_listview->currentItem() ); - } -} - -void KNotifyWidget::sort( bool ascending ) -{ - m_listview->setSorting( COL_EVENT, ascending ); - m_listview->sort(); -} - -void KNotifyWidget::selectItem( TQListViewItem *item ) -{ - if ( item ) - { - m_listview->setCurrentItem( item ); - item->setSelected( true ); - slotEventChanged( item ); - } -} - -void KNotifyWidget::resetDefaults( bool ask ) -{ - if ( ask ) - { - if ( KMessageBox::warningContinueCancel(this, - i18n("This will cause the notifications " - "to be reset to their defaults."), - i18n("Are You Sure?"), - i18n("&Reset")) - != KMessageBox::Continue) - return; - } - - reload( true ); // defaults - emit changed( true ); -} - -void KNotifyWidget::reload( bool revertToDefaults ) -{ - m_listview->clear(); - ApplicationListIterator it( m_visibleApps ); - for ( ; it.current(); ++it ) - { - it.current()->reloadEvents( revertToDefaults ); - addToView( it.current()->eventList() ); - } - - m_listview->sort(); - selectItem( m_listview->firstChild() ); -} - -void KNotifyWidget::save() -{ - kdDebug() << "save\n"; - - ApplicationListIterator it( m_allApps ); - while ( it.current() ) - { - (*it)->save(); - ++it; - } - - if ( kapp ) - { - if ( !kapp->dcopClient()->isAttached() ) - kapp->dcopClient()->attach(); - kapp->dcopClient()->send("knotify", "", "reconfigure()", TQString("")); - } - - emit changed( false ); -} - -// returns e.g. "twin/eventsrc" from a given path -// "/opt/trinity/share/apps/twin/eventsrc" -TQString KNotifyWidget::makeRelative( const TQString& fullPath ) -{ - int slash = fullPath.findRev( '/' ) - 1; - slash = fullPath.findRev( '/', slash ); - - if ( slash < 0 ) - return TQString::null; - - return fullPath.mid( slash+1 ); -} - -Event * KNotifyWidget::currentEvent() -{ - TQListViewItem *current = m_listview->currentItem(); - if ( !current ) - return 0L; - - return &static_cast( current )->event(); -} - -void KNotifyWidget::openSoundDialog( KURLRequester *requester ) -{ - // only need to init this once - requester->disconnect( TQT_SIGNAL( openFileDialog( KURLRequester * )), - this, TQT_SLOT( openSoundDialog( KURLRequester * ))); - - KFileDialog *fileDialog = requester->fileDialog(); - fileDialog->setCaption( i18n("Select Sound File") ); - TQStringList filters; - filters << "audio/x-wav" << "audio/x-mp3" << "application/ogg" - << "audio/x-adpcm"; - fileDialog->setMimeFilter( filters ); - - // find the first "sound"-resource that contains files - const Application *app = currentEvent()->application(); - TQStringList soundDirs = - TDEGlobal::dirs()->findDirs("data", app->appName() + "/sounds"); - soundDirs += TDEGlobal::dirs()->resourceDirs( "sound" ); - - if ( !soundDirs.isEmpty() ) { - KURL soundURL; - TQDir dir; - dir.setFilter( TQDir::Files | TQDir::Readable ); - TQStringList::ConstIterator it = soundDirs.begin(); - while ( it != soundDirs.end() ) { - dir = *it; - if ( dir.isReadable() && dir.count() > 2 ) { - soundURL.setPath( *it ); - fileDialog->setURL( soundURL ); - break; - } - ++it; - } - } -} - -void KNotifyWidget::openLogDialog( KURLRequester *requester ) -{ - // only need to init this once - requester->disconnect( TQT_SIGNAL( openFileDialog( KURLRequester * )), - this, TQT_SLOT( openLogDialog( KURLRequester * ))); - - KFileDialog *fileDialog = requester->fileDialog(); - fileDialog->setCaption( i18n("Select Log File") ); - TQStringList filters; - filters << "text/x-log" << "text/plain"; - fileDialog->setMimeFilter( filters ); -} - -void KNotifyWidget::openExecDialog( KURLRequester *requester ) -{ - // only need to init this once - requester->disconnect( TQT_SIGNAL( openFileDialog( KURLRequester * )), - this, TQT_SLOT( openExecDialog( KURLRequester * ))); - - - KFileDialog *fileDialog = requester->fileDialog(); - fileDialog->setCaption( i18n("Select File to Execute") ); - TQStringList filters; - filters << "application/x-executable" << "application/x-shellscript" - << "application/x-perl" << "application/x-python"; - fileDialog->setMimeFilter( filters ); -} - -void KNotifyWidget::playSound() -{ - TQString soundPath = m_soundPath->url(); - if (!TDEIO::NetAccess::exists( m_soundPath->url(), true, 0 )) { - bool foundSound=false; - - // find the first "sound"-resource that contains files - const Application *app = currentEvent()->application(); - TQStringList soundDirs = TDEGlobal::dirs()->findDirs("data", app->appName() + "/sounds"); - soundDirs += TDEGlobal::dirs()->resourceDirs( "sound" ); - - if ( !soundDirs.isEmpty() ) { - TQDir dir; - dir.setFilter( TQDir::Files | TQDir::Readable ); - TQStringList::ConstIterator it = soundDirs.begin(); - while ( it != soundDirs.end() ) { - dir = *it; - if ( dir.isReadable() && dir.count() > 2 && - TDEIO::NetAccess::exists( *it + m_soundPath->url(), true, 0 )) { - foundSound=true; - soundPath = *it + m_soundPath->url(); - break; - } - ++it; - } - } - if ( !foundSound ) { - KMessageBox::sorry(this, i18n("The specified file does not exist." )); - return; - } - } - KAudioPlayer::play( soundPath ); -} - -void KNotifyWidget::enableAll() -{ - bool enable = (sender() == m_buttonEnable); - enableAll( SelectionCombo::type(enable ? m_comboEnable : m_comboDisable), - enable ); -} - -void KNotifyWidget::enableAll( int what, bool enable ) -{ - if ( m_listview->childCount() == 0 ) - return; - - bool affectAll = m_affectAllApps->isChecked(); // multi-apps mode - - ApplicationListIterator appIt( affectAll ? m_allApps : m_visibleApps ); - for ( ; appIt.current(); ++appIt ) - { - const EventList& events = appIt.current()->eventList(); - EventListIterator it( events ); - for ( ; it.current(); ++it ) - { - if ( enable ) - it.current()->presentation |= what; - else - it.current()->presentation &= ~what; - } - } - - // now make the listview reflect the changes - TQListViewItemIterator it( m_listview->firstChild() ); - for ( ; it.current(); ++it ) - { - ListViewItem *item = static_cast( it.current() ); - updatePixmaps( item ); - } - - TQListViewItem *item = m_listview->currentItem(); - if ( !item ) - item = m_listview->firstChild(); - selectItem( item ); - - emit changed( true ); -} - - -////////////////////////////////////////////////////////////////////// -////////////////////////////////////////////////////////////////////// - - -// -// path must be "appname/eventsrc", i.e. a relative path -// -Application::Application( const TQString &path ) -{ - TQString config_file = path; - config_file[config_file.find('/')] = '.'; - m_events = 0L; - config = new TDEConfig(config_file, false, false); - kc = new TDEConfig(path, true, false, "data"); - kc->setGroup( TQString::fromLatin1("!Global!") ); - m_icon = kc->readEntry(TQString::fromLatin1("IconName"), - TQString::fromLatin1("misc")); - m_description = kc->readEntry( TQString::fromLatin1("Comment"), - i18n("No description available") ); - - int index = path.find( '/' ); - if ( index >= 0 ) - m_appname = path.left( index ); - else - kdDebug() << "Cannot determine application name from path: " << path << endl; -} - -Application::~Application() -{ - delete config; - delete kc; - delete m_events; -} - - -const EventList& Application::eventList() -{ - if ( !m_events ) { - m_events = new EventList; - m_events->setAutoDelete( true ); - reloadEvents(); - } - - return *m_events; -} - - -void Application::save() -{ - if ( !m_events ) - return; - - EventListIterator it( *m_events ); - Event *e; - while ( (e = it.current()) ) { - config->setGroup( e->configGroup ); - config->writeEntry( "presentation", e->presentation ); - config->writePathEntry( "soundfile", e->soundfile ); - config->writePathEntry( "logfile", e->logfile ); - config->writePathEntry( "commandline", e->commandline ); - - ++it; - } - config->sync(); -} - - -void Application::reloadEvents( bool revertToDefaults ) -{ - if ( m_events ) - m_events->clear(); - else - { - m_events = new EventList; - m_events->setAutoDelete( true ); - } - - Event *e = 0L; - - TQString global = TQString::fromLatin1("!Global!"); - TQString default_group = TQString::fromLatin1(""); - TQString name = TQString::fromLatin1("Name"); - TQString comment = TQString::fromLatin1("Comment"); - - TQStringList conflist = kc->groupList(); - TQStringList::ConstIterator it = conflist.begin(); - - while ( it != conflist.end() ) { - if ( (*it) != global && (*it) != default_group ) { // event group - kc->setGroup( *it ); - - e = new Event( this ); - e->name = kc->readEntry( name ); - e->description = kc->readEntry( comment ); - e->dontShow = kc->readNumEntry("nopresentation", 0 ); - e->configGroup = *it; - if ( e->name.isEmpty() && e->description.isEmpty() ) - delete e; - else { // load the event - if( !e->name.isEmpty() && e->description.isEmpty() ) - e->description = e->name; - // default to passive popups over plain messageboxes - int default_rep = kc->readNumEntry("default_presentation", - 0 | KNotifyClient::PassivePopup); - TQString default_logfile = kc->readPathEntry("default_logfile"); - TQString default_soundfile = kc->readPathEntry("default_sound"); - TQString default_commandline = kc->readPathEntry("default_commandline"); - - config->setGroup(*it); - - if ( revertToDefaults ) - { - e->presentation = default_rep; - e->logfile = default_logfile; - e->soundfile = default_soundfile; - e->commandline = default_commandline; - } - - else - { - e->presentation = config->readNumEntry("presentation", - default_rep); - e->logfile = config->readPathEntry("logfile", - default_logfile); - e->soundfile = config->readPathEntry("soundfile", - default_soundfile); - e->commandline = config->readPathEntry("commandline", - default_commandline); - } - - m_events->append( e ); - } - } - - ++it; - } - - return; -} - -/////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////// - -ListViewItem::ListViewItem( TQListView *view, Event *event ) - : TQListViewItem( view ), - m_event( event ) -{ - setText( COL_EVENT, event->text() ); -} - -int ListViewItem::compare ( TQListViewItem * i, int col, bool ascending ) const -{ - ListViewItem *item = static_cast( i ); - int myPres = m_event->presentation; - int otherPres = item->event().presentation; - - int action = 0; - - switch ( col ) - { - case COL_EVENT: // use default sorting - return TQListViewItem::compare( i, col, ascending ); - - case COL_EXECUTE: - action = KNotifyClient::Execute; - break; - case COL_LOGFILE: - action = KNotifyClient::Logfile; - break; - case COL_MESSAGE: - action = (KNotifyClient::Messagebox | KNotifyClient::PassivePopup); - break; - case COL_SOUND: - action = KNotifyClient::Sound; - break; - case COL_STDERR: - action = KNotifyClient::Stderr; - break; - case COL_TASKBAR: - action = KNotifyClient::Taskbar; - break; - } - - if ( (myPres & action) == (otherPres & action) ) - { - // default sorting by event - return TQListViewItem::compare( i, COL_EVENT, true ); - } - - if ( myPres & action ) - return -1; - if ( otherPres & action ) - return 1; - - return 0; -} - -#include "knotifydialog.moc" diff --git a/kio/kfile/knotifydialog.h b/kio/kfile/knotifydialog.h deleted file mode 100644 index 9bb3210ea..000000000 --- a/kio/kfile/knotifydialog.h +++ /dev/null @@ -1,341 +0,0 @@ -/* - Copyright (C) 2000,2002 Carsten Pfeiffer - Copyright (C) 2002 Neil Stevens - - This program is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License version 2 as published by the Free Software Foundation; - - 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 Library General Public License - along with this library, If not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -*/ - -#ifndef KNOTIFYDIALOG_H -#define KNOTIFYDIALOG_H - -#include -#include -#include -#include - -#include "knotifywidgetbase.h" - -class TQShowEvent; - -namespace KNotify -{ - class KNotifyWidget; -} - -/** - * KNotifyDialog presents an interface for configuring an application's - * KNotify events. - * - * Rather than requiring the user to wade through the entire list of - * applications' events in KControl, your application can make the list - * of its own notifications available here. - * - * Typical usage is calling the static configure() method: - * \code - * (void) KNotifyDialog::configure( someParentWidget ); - * \endcode - * - * @since 3.1 - * @author Carsten Pfeiffer - */ -class TDEIO_EXPORT KNotifyDialog : public KDialogBase -{ - Q_OBJECT - -public: - /** - * If you want a non-modal dialog, you need to instantiate KNotifyDialog - * yourself instead of using the configure() method. - * - * KDE4.0 modal default will be false. - * - * @param parent The parent widget for the dialog - * @param name The widget name - * @param modal If true, this will be a modal dialog, otherwise non-modal. - * @param aboutData A pointer to a TDEAboutData object. TDEAboutData::appName() - * will be used to find the KNotify events (in the eventsrc file). - * Set this to 0L if you want to add all events yourself with - * addApplicationEvents(). - */ - KNotifyDialog( TQWidget *parent = 0, const char *name = 0, - bool modal = true, - const TDEAboutData *aboutData = - TDEGlobal::instance()->aboutData() ); - /** - * Destroys the KNotifyDialog - */ - virtual ~KNotifyDialog(); - - /** - * Convenience method to create exec() a modal KNotifyDialog. - * - * @param parent The parent widget for the dialog - * @param name The widget name - * @param aboutData A pointer to a TDEAboutData object. TDEAboutData::appName() - * will be used to find the KNotify events (in the eventsrc file). - * @see exec for the return values. - * @return The value of TQDialog::exec() - */ - static int configure( TQWidget *parent = 0, const char *name = 0, - const TDEAboutData *aboutData = TDEGlobal::instance()->aboutData() ); - - /** - * With this method, you can add the KNotify events of one eventsrc - * files to the view. - * KNotifyDialog can handle events for multiple applications (i.e. eventsrc files). - * Successive calls with a different @p appName will add them. - * @param appName The application's name, i.e. the name passed to the - * TDEApplication constructor or TDEAboutData. - * @see clearApplicationEvents() - */ - virtual void addApplicationEvents( const char *appName ); - - /** - * With this method, you can add the KNotify events of one eventsrc - * files to the view. - * KNotifyDialog can handle events for multiple applications (i.e. eventsrc files). - * Successive calls with a different @p path will add them. - * @param path The absolute or relative path to the eventsrc file to be configured. - * A relative path would be e.g. "twin/eventsrc". - * @see clearApplicationEvents() - */ - virtual void addApplicationEvents( const TQString& path ); - - /** - * Removes all the events added with addApplicationEvents() - * @see addApplicationEvents() - */ - virtual void clearApplicationEvents(); - -private slots: - void slotDefault(); - -private: - enum - { - COL_FILENAME = 1 - }; - - void updateView(); - - KNotify::KNotifyWidget * m_notifyWidget; - - class Private; - Private *d; -}; - - -namespace KNotify -{ - class Application; - class Event; - class ListViewItem; - typedef TQPtrList EventList; - typedef TQPtrListIterator ApplicationListIterator; - typedef TQPtrListIterator EventListIterator; - - /** - * @internal - */ - class TDEIO_EXPORT Application - { - public: - Application( const TQString &path ); - ~Application(); - - TQString text() const { return m_description; } - TQString icon() const { return m_icon; } - const EventList& eventList(); - void reloadEvents( bool revertToDefaults = false ); - void save(); - - TQString appName() const { return m_appname; } - - private: - TQString m_icon; - TQString m_description; - TQString m_appname; - EventList *m_events; - - TDEConfig *kc; // The file that defines the events. - TDEConfig *config; // The file that contains the settings for the events - }; - - - class TDEIO_EXPORT ApplicationList : public TQPtrList - { - virtual int compareItems ( TQPtrCollection::Item item1, - TQPtrCollection::Item item2 ) - { - return (static_cast( item1 )->text() >= - static_cast( item2 )->text()) ? 1 : -1; - } - }; - - /** - * @internal - */ - class TDEIO_EXPORT KNotifyWidget : public KNotifyWidgetBase - { - Q_OBJECT - - public: - KNotifyWidget( TQWidget* parent = 0, const char* name = 0, - bool handleAllApps = false ); - ~KNotifyWidget(); - - KListView * eventsView() { - return m_listview; - } - - void addVisibleApp( Application *app ); - ApplicationList& visibleApps() { return m_visibleApps; } - ApplicationList& allApps() { return m_allApps; } - - /** - * Returns 0L if no application events could be found - * The returned pointer must be freed by the caller (easiest done - * by putting it into an ApplicationList with setAutoDelete( true )). - */ - Application * addApplicationEvents( const TQString& path ); - - void resetDefaults( bool ask ); - void sort( bool ascending = true ); - - public slots: - /** - * Clears the view and all the Application events. - */ - virtual void clear(); - /** - * Clears only the view and the visible Application events. - * E.g. useful if you want to set new visible events with - * addVisibleApp() - */ - virtual void clearVisible(); - virtual void save(); - virtual void showAdvanced( bool show ); - void toggleAdvanced(); - - - signals: - void changed( bool hasChanges ); - - protected: - /** - * May return 0L, if there is no current event selected. - */ - Event * currentEvent(); - virtual void showEvent( TQShowEvent * ); - virtual void enableAll( int what, bool enable ); - - void reload( bool revertToDefaults = false ); - - protected slots: - void playSound(); - - private slots: - void slotItemClicked( TQListViewItem *item, const TQPoint& point, - int col ); - void slotEventChanged( TQListViewItem * ); - void soundToggled( bool on ); - void loggingToggled( bool on ); - void executeToggled( bool on ); - void messageBoxChanged(); - void stderrToggled( bool on ); - void taskbarToggled( bool on ); - - void soundFileChanged( const TQString& text ); - void logfileChanged( const TQString& text ); - void commandlineChanged( const TQString& text ); - - void openSoundDialog( KURLRequester * ); - void openLogDialog( KURLRequester * ); - void openExecDialog( KURLRequester * ); - - void enableAll(); - - private: - void updateWidgets( ListViewItem *item ); - void updatePixmaps( ListViewItem *item ); - - static TQString makeRelative( const TQString& ); - void addToView( const EventList& events ); - void widgetChanged( TQListViewItem *item, - int what, bool on, TQWidget *buddy = 0L ); - void selectItem( TQListViewItem *item ); - - ApplicationList m_visibleApps; - ApplicationList m_allApps; - - class Private; - Private *d; - - }; - - -/////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////// - - - /** - * @internal - */ - class Event - { - friend class Application; - - public: - TQString text() const { return description; } - - int presentation; - int dontShow; - TQString logfile; - TQString soundfile; - TQString commandline; - - const Application *application() const { return m_app; } - - private: - Event( const Application *app ) { - presentation = 0; - dontShow = 0; - m_app = app; - } - TQString name; - TQString description; - TQString configGroup; - - const Application *m_app; - }; - - /** - * @internal - */ - class ListViewItem : public TQListViewItem - { - public: - ListViewItem( TQListView *view, Event *event ); - - Event& event() { return *m_event; } - virtual int compare (TQListViewItem * i, int col, bool ascending) const; - - private: - Event * m_event; - }; - -} - - -#endif diff --git a/kio/kfile/knotifywidgetbase.ui b/kio/kfile/knotifywidgetbase.ui deleted file mode 100644 index d3c3103ff..000000000 --- a/kio/kfile/knotifywidgetbase.ui +++ /dev/null @@ -1,469 +0,0 @@ - -KNotifyWidgetBase - - - KNotifyWidgetBase - - - - 0 - 0 - 487 - 531 - - - - - unnamed - - - 0 - - - - - - - - true - - - false - - - - - - - - true - - - false - - - - - - - - true - - - false - - - - - - - - true - - - false - - - - - - - - true - - - false - - - - - - - - true - - - false - - - - - Events - - - true - - - true - - - - m_listview - - - - 7 - 7 - 10 - 0 - - - - - - m_controlsBox - - - Quick Controls - - - - unnamed - - - - m_affectAllApps - - - Apply to &all applications - - - - - Spacer3_2 - - - Horizontal - - - Fixed - - - - 30 - 20 - - - - - - Spacer17 - - - Horizontal - - - Expanding - - - - 318 - 16 - - - - - - m_buttonDisable - - - Turn O&ff All - - - Allows you to change the behavior for all events at once - - - - - m_buttonEnable - - - Turn O&n All - - - Allows you to change the behavior for all events at once - - - - - m_comboEnable - - - - - m_comboDisable - - - - - - - m_actionsBox - - - Actions - - - - unnamed - - - - m_stderr - - - Print a message to standard &error output - - - - - m_messageBox - - - Show a &message in a pop-up window - - - - - m_execute - - - E&xecute a program: - - - - - Layout25 - - - - unnamed - - - - m_playSound - - - Play a &sound: - - - - - m_playButton - - - - - - Test the Sound - - - - - - - m_taskbar - - - Mark &taskbar entry - - - - - m_logToFile - - - &Log to a file: - - - - - Spacer3 - - - Horizontal - - - Fixed - - - - 30 - 20 - - - - - - m_executePath - - - false - - - - 1 - 0 - 1 - 0 - - - - - - m_logfilePath - - - false - - - - 1 - 0 - 1 - 0 - - - - - - m_soundPath - - - false - - - - 1 - 0 - 0 - 0 - - - - - - m_passivePopup - - - false - - - &Use a passive window that does not interrupt other work - - - - - - - Layout8 - - - - unnamed - - - - m_extension - - - - 4 - 0 - 0 - 0 - - - - Less Options - - - false - - - - - Spacer7 - - - Horizontal - - - Expanding - - - - 20 - 0 - - - - - - m_playerButton - - - Player Settings - - - - - - - - - m_messageBox - toggled(bool) - m_passivePopup - setEnabled(bool) - - - m_execute - toggled(bool) - m_executePath - setEnabled(bool) - - - m_playSound - toggled(bool) - m_soundPath - setEnabled(bool) - - - m_logToFile - toggled(bool) - m_logfilePath - setEnabled(bool) - - - - m_listview - m_playSound - m_playButton - m_soundPath - m_logToFile - m_logfilePath - m_execute - m_executePath - m_messageBox - m_passivePopup - m_stderr - m_affectAllApps - m_buttonEnable - m_comboEnable - m_buttonDisable - m_comboDisable - m_extension - m_playerButton - - - kdialog.h - klistview.h - kurlrequester.h - klineedit.h - kpushbutton.h - kcombobox.h - - - - diff --git a/kio/kfile/kopenwith.cpp b/kio/kfile/kopenwith.cpp deleted file mode 100644 index 691487730..000000000 --- a/kio/kfile/kopenwith.cpp +++ /dev/null @@ -1,851 +0,0 @@ -/* This file is part of the KDE libraries - - Copyright (C) 1997 Torben Weis - Copyright (C) 1999 Dirk Mueller - Portions copyright (C) 1999 Preston Brown - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "kopenwith.h" -#include "kopenwith_p.h" - -#include -#include -#include - -#define SORT_SPEC (TQDir::DirsFirst | TQDir::Name | TQDir::IgnoreCase) - - -// ---------------------------------------------------------------------- - -KAppTreeListItem::KAppTreeListItem( KListView* parent, const TQString & name, - const TQPixmap& pixmap, bool parse, bool dir, const TQString &p, const TQString &c ) - : TQListViewItem( parent, name ) -{ - init(pixmap, parse, dir, p, c); -} - - -// ---------------------------------------------------------------------- - -KAppTreeListItem::KAppTreeListItem( TQListViewItem* parent, const TQString & name, - const TQPixmap& pixmap, bool parse, bool dir, const TQString &p, const TQString &c ) - : TQListViewItem( parent, name ) -{ - init(pixmap, parse, dir, p, c); -} - - -// ---------------------------------------------------------------------- - -void KAppTreeListItem::init(const TQPixmap& pixmap, bool parse, bool dir, const TQString &_path, const TQString &_exec) -{ - setPixmap(0, pixmap); - parsed = parse; - directory = dir; - path = _path; // relative path - exec = _exec; -} - - -/* Ensures that directories sort before non-directories */ -int KAppTreeListItem::compare(TQListViewItem *i, int col, bool ascending) const -{ - KAppTreeListItem *other = dynamic_cast(i); - - // Directories sort first - if (directory && !other->directory) - return -1; - - else if (!directory && other->directory) - return 1; - - else // both directories or both not - return TQListViewItem::compare(i, col, ascending); -} - -// ---------------------------------------------------------------------- -// Ensure that case is ignored -TQString KAppTreeListItem::key(int column, bool /*ascending*/) const -{ - return text(column).upper(); -} - -void KAppTreeListItem::activate() -{ - if ( directory ) - setOpen(!isOpen()); -} - -void KAppTreeListItem::setOpen( bool o ) -{ - if( o && !parsed ) { // fill the children before opening - ((TDEApplicationTree *) parent())->addDesktopGroup( path, this ); - parsed = true; - } - TQListViewItem::setOpen( o ); -} - -bool KAppTreeListItem::isDirectory() -{ - return directory; -} - -// ---------------------------------------------------------------------- - -TDEApplicationTree::TDEApplicationTree( TQWidget *parent ) - : KListView( parent ), currentitem(0) -{ - addColumn( i18n("Known Applications") ); - setRootIsDecorated( true ); - - addDesktopGroup( TQString::null ); - cleanupTree(); - - connect( this, TQT_SIGNAL( currentChanged(TQListViewItem*) ), - TQT_SLOT( slotItemHighlighted(TQListViewItem*) ) ); - connect( this, TQT_SIGNAL( selectionChanged(TQListViewItem*) ), - TQT_SLOT( slotSelectionChanged(TQListViewItem*) ) ); -} - -// ---------------------------------------------------------------------- - -bool TDEApplicationTree::isDirSel() -{ - if (!currentitem) return false; // if currentitem isn't set - return currentitem->isDirectory(); -} - -// ---------------------------------------------------------------------- - -static TQPixmap appIcon(const TQString &iconName) -{ - TQPixmap normal = TDEGlobal::iconLoader()->loadIcon(iconName, KIcon::Small, 0, KIcon::DefaultState, 0L, true); - // make sure they are not larger than 20x20 - if (normal.width() > 20 || normal.height() > 20) - { - TQImage tmp = normal.convertToImage(); - tmp = tmp.smoothScale(20, 20); - normal.convertFromImage(tmp); - } - return normal; -} - -void TDEApplicationTree::addDesktopGroup( const TQString &relPath, KAppTreeListItem *item) -{ - KServiceGroup::Ptr root = KServiceGroup::group(relPath); - if (!root || !root->isValid()) return; - - KServiceGroup::List list = root->entries(); - - KAppTreeListItem * newItem; - for( KServiceGroup::List::ConstIterator it = list.begin(); - it != list.end(); it++) - { - TQString icon; - TQString text; - TQString relPath; - TQString exec; - bool isDir = false; - KSycocaEntry *p = (*it); - if (p->isType(KST_KService)) - { - KService *service = static_cast(p); - - if (service->noDisplay()) - continue; - - icon = service->icon(); - text = service->name(); - exec = service->exec(); - } - else if (p->isType(KST_KServiceGroup)) - { - KServiceGroup *serviceGroup = static_cast(p); - - if (serviceGroup->noDisplay() || serviceGroup->childCount() == 0) - continue; - - icon = serviceGroup->icon(); - text = serviceGroup->caption(); - relPath = serviceGroup->relPath(); - isDir = true; - } - else - { - kdWarning(250) << "KServiceGroup: Unexpected object in list!" << endl; - continue; - } - - TQPixmap pixmap = appIcon( icon ); - - if (item) - newItem = new KAppTreeListItem( item, text, pixmap, false, isDir, - relPath, exec ); - else - newItem = new KAppTreeListItem( this, text, pixmap, false, isDir, - relPath, exec ); - if (isDir) - newItem->setExpandable( true ); - } -} - - -// ---------------------------------------------------------------------- - -void TDEApplicationTree::slotItemHighlighted(TQListViewItem* i) -{ - // i may be 0 (see documentation) - if(!i) - return; - - KAppTreeListItem *item = (KAppTreeListItem *) i; - - currentitem = item; - - if( (!item->directory ) && (!item->exec.isEmpty()) ) - emit highlighted( item->text(0), item->exec ); -} - - -// ---------------------------------------------------------------------- - -void TDEApplicationTree::slotSelectionChanged(TQListViewItem* i) -{ - // i may be 0 (see documentation) - if(!i) - return; - - KAppTreeListItem *item = (KAppTreeListItem *) i; - - currentitem = item; - - if( ( !item->directory ) && (!item->exec.isEmpty() ) ) - emit selected( item->text(0), item->exec ); -} - -// ---------------------------------------------------------------------- - -void TDEApplicationTree::resizeEvent( TQResizeEvent * e) -{ - setColumnWidth(0, width()-TQApplication::style().pixelMetric(TQStyle::PM_ScrollBarExtent) - -2*TQApplication::style().pixelMetric(TQStyle::PM_DefaultFrameWidth)); - KListView::resizeEvent(e); -} - -// Prune empty directories from the tree -void TDEApplicationTree::cleanupTree() -{ - TQListViewItem *item=firstChild(); - while(item!=0) - { - if(item->isExpandable()) - { - TQListViewItem *temp=item->itemBelow(); - if(item->text(0)!=i18n("Applications")) - item->setOpen(false); - item=temp; - continue; - } - item=item->itemBelow(); - } -} - -/*************************************************************** - * - * KOpenWithDlg - * - ***************************************************************/ -class KOpenWithDlgPrivate -{ -public: - KOpenWithDlgPrivate() : saveNewApps(false) { }; - TQPushButton* ok; - bool saveNewApps; - KService::Ptr curService; -}; - -KOpenWithDlg::KOpenWithDlg( const KURL::List& _urls, TQWidget* parent ) - :TQDialog( parent, "openwith", true ) -{ - setCaption( i18n( "Open With" ) ); - TQString text; - if( _urls.count() == 1 ) - { - text = i18n("Select the program that should be used to open %1. " - "If the program is not listed, enter the name or click " - "the browse button.").arg( _urls.first().fileName() ); - } - else - // Should never happen ?? - text = i18n( "Choose the name of the program with which to open the selected files." ); - setServiceType( _urls ); - init( text, TQString() ); -} - -KOpenWithDlg::KOpenWithDlg( const KURL::List& _urls, const TQString&_text, - const TQString& _value, TQWidget *parent) - :TQDialog( parent, "openwith", true ) -{ - TQString caption = KStringHandler::csqueeze( _urls.first().prettyURL() ); - if (_urls.count() > 1) - caption += TQString::fromLatin1("..."); - setCaption(caption); - setServiceType( _urls ); - init( _text, _value ); -} - -KOpenWithDlg::KOpenWithDlg( const TQString &serviceType, const TQString& value, - TQWidget *parent) - :TQDialog( parent, "openwith", true ) -{ - setCaption(i18n("Choose Application for %1").arg(serviceType)); - TQString text = i18n("Select the program for the file type: %1. " - "If the program is not listed, enter the name or click " - "the browse button.").arg(serviceType); - qServiceType = serviceType; - init( text, value ); - if (remember) - remember->hide(); -} - -KOpenWithDlg::KOpenWithDlg( TQWidget *parent) - :TQDialog( parent, "openwith", true ) -{ - setCaption(i18n("Choose Application")); - TQString text = i18n("Select a program. " - "If the program is not listed, enter the name or click " - "the browse button."); - qServiceType = TQString::null; - init( text, TQString::null ); -} - -void KOpenWithDlg::setServiceType( const KURL::List& _urls ) -{ - if ( _urls.count() == 1 ) - { - qServiceType = KMimeType::findByURL( _urls.first())->name(); - if (qServiceType == TQString::fromLatin1("application/octet-stream")) - qServiceType = TQString::null; - } - else - qServiceType = TQString::null; -} - -void KOpenWithDlg::init( const TQString& _text, const TQString& _value ) -{ - d = new KOpenWithDlgPrivate; - bool bReadOnly = kapp && !kapp->authorize("shell_access"); - m_terminaldirty = false; - m_pTree = 0L; - m_pService = 0L; - d->curService = 0L; - - TQBoxLayout *topLayout = new TQVBoxLayout( this, KDialog::marginHint(), - KDialog::spacingHint() ); - label = new TQLabel( _text, this ); - topLayout->addWidget(label); - - TQHBoxLayout* hbox = new TQHBoxLayout(topLayout); - - TQToolButton *clearButton = new TQToolButton( this ); - clearButton->setIconSet( BarIcon( "locationbar_erase" ) ); - clearButton->setFixedSize( clearButton->sizeHint() ); - connect( clearButton, TQT_SIGNAL( clicked() ), TQT_SLOT( slotClear() ) ); - TQToolTip::add( clearButton, i18n( "Clear input field" ) ); - - hbox->addWidget( clearButton ); - - if (!bReadOnly) - { - // init the history combo and insert it into the URL-Requester - KHistoryCombo *combo = new KHistoryCombo(); - combo->setDuplicatesEnabled( false ); - TDEConfig *kc = TDEGlobal::config(); - TDEConfigGroupSaver ks( kc, TQString::fromLatin1("Open-with settings") ); - int max = kc->readNumEntry( TQString::fromLatin1("Maximum history"), 15 ); - combo->setMaxCount( max ); - int mode = kc->readNumEntry(TQString::fromLatin1("CompletionMode"), - TDEGlobalSettings::completionMode()); - combo->setCompletionMode((TDEGlobalSettings::Completion)mode); - TQStringList list = kc->readListEntry( TQString::fromLatin1("History") ); - combo->setHistoryItems( list, true ); - edit = new KURLRequester( combo, this ); - } - else - { - clearButton->hide(); - edit = new KURLRequester( this ); - edit->lineEdit()->setReadOnly(true); - edit->button()->hide(); - } - - edit->setURL( _value ); - TQWhatsThis::add(edit,i18n( - "Following the command, you can have several place holders which will be replaced " - "with the actual values when the actual program is run:\n" - "%f - a single file name\n" - "%F - a list of files; use for applications that can open several local files at once\n" - "%u - a single URL\n" - "%U - a list of URLs\n" - "%d - the directory of the file to open\n" - "%D - a list of directories\n" - "%i - the icon\n" - "%m - the mini-icon\n" - "%c - the comment")); - - hbox->addWidget(edit); - - if ( edit->comboBox() ) { - KURLCompletion *comp = new KURLCompletion( KURLCompletion::ExeCompletion ); - edit->comboBox()->setCompletionObject( comp ); - edit->comboBox()->setAutoDeleteCompletionObject( true ); - } - - connect ( edit, TQT_SIGNAL(returnPressed()), TQT_SLOT(slotOK()) ); - connect ( edit, TQT_SIGNAL(textChanged(const TQString&)), TQT_SLOT(slotTextChanged()) ); - - m_pTree = new TDEApplicationTree( this ); - topLayout->addWidget(m_pTree); - - connect( m_pTree, TQT_SIGNAL( selected( const TQString&, const TQString& ) ), - TQT_SLOT( slotSelected( const TQString&, const TQString& ) ) ); - connect( m_pTree, TQT_SIGNAL( highlighted( const TQString&, const TQString& ) ), - TQT_SLOT( slotHighlighted( const TQString&, const TQString& ) ) ); - connect( m_pTree, TQT_SIGNAL( doubleClicked(TQListViewItem*) ), - TQT_SLOT( slotDbClick() ) ); - - terminal = new TQCheckBox( i18n("Run in &terminal"), this ); - if (bReadOnly) - terminal->hide(); - connect(terminal, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotTerminalToggled(bool))); - - topLayout->addWidget(terminal); - - TQBoxLayout* nocloseonexitLayout = new TQHBoxLayout( 0, 0, KDialog::spacingHint() ); - TQSpacerItem* spacer = new TQSpacerItem( 20, 0, TQSizePolicy::Fixed, TQSizePolicy::Minimum ); - nocloseonexitLayout->addItem( spacer ); - - nocloseonexit = new TQCheckBox( i18n("&Do not close when command exits"), this ); - nocloseonexit->setChecked( false ); - nocloseonexit->setDisabled( true ); - - // check to see if we use konsole if not disable the nocloseonexit - // because we don't know how to do this on other terminal applications - TDEConfigGroup confGroup( TDEGlobal::config(), TQString::fromLatin1("General") ); - TQString preferredTerminal = confGroup.readPathEntry("TerminalApplication", TQString::fromLatin1("konsole")); - - if (bReadOnly || preferredTerminal != "konsole") - nocloseonexit->hide(); - - nocloseonexitLayout->addWidget( nocloseonexit ); - topLayout->addLayout( nocloseonexitLayout ); - - if (!qServiceType.isNull()) - { - remember = new TQCheckBox(i18n("&Remember application association for this type of file"), this); - // remember->setChecked(true); - topLayout->addWidget(remember); - } - else - remember = 0L; - - // Use KButtonBox for the aligning pushbuttons nicely - KButtonBox* b = new KButtonBox( this ); - b->addStretch( 2 ); - - d->ok = b->addButton( KStdGuiItem::ok() ); - d->ok->setDefault( true ); - connect( d->ok, TQT_SIGNAL( clicked() ), TQT_SLOT( slotOK() ) ); - - TQPushButton* cancel = b->addButton( KStdGuiItem::cancel() ); - connect( cancel, TQT_SIGNAL( clicked() ), TQT_SLOT( reject() ) ); - - b->layout(); - topLayout->addWidget( b ); - - //edit->setText( _value ); - // This is what caused "can't click on items before clicking on Name header". - // Probably due to the resizeEvent handler using width(). - //resize( minimumWidth(), sizeHint().height() ); - edit->setFocus(); - slotTextChanged(); -} - - -// ---------------------------------------------------------------------- - -KOpenWithDlg::~KOpenWithDlg() -{ - delete d; - d = 0; -} - -// ---------------------------------------------------------------------- - -void KOpenWithDlg::slotClear() -{ - edit->setURL(TQString::null); - edit->setFocus(); -} - - -// ---------------------------------------------------------------------- - -void KOpenWithDlg::slotSelected( const TQString& /*_name*/, const TQString& _exec ) -{ - kdDebug(250)<<"KOpenWithDlg::slotSelected"<curService; - edit->setURL( _exec ); // calls slotTextChanged :( - d->curService = pService; -} - - -// ---------------------------------------------------------------------- - -void KOpenWithDlg::slotHighlighted( const TQString& _name, const TQString& ) -{ - kdDebug(250)<<"KOpenWithDlg::slotHighlighted"<curService = KService::serviceByName( qName ); - if (!m_terminaldirty) - { - // ### indicate that default value was restored - terminal->setChecked(d->curService->terminal()); - TQString terminalOptions = d->curService->terminalOptions(); - nocloseonexit->setChecked( (terminalOptions.contains( "--noclose" ) > 0) ); - m_terminaldirty = false; // slotTerminalToggled changed it - } -} - -// ---------------------------------------------------------------------- - -void KOpenWithDlg::slotTextChanged() -{ - kdDebug(250)<<"KOpenWithDlg::slotTextChanged"<curService = 0L; - d->ok->setEnabled( !edit->url().isEmpty()); -} - -// ---------------------------------------------------------------------- - -void KOpenWithDlg::slotTerminalToggled(bool) -{ - // ### indicate that default value was overridden - m_terminaldirty = true; - nocloseonexit->setDisabled( ! terminal->isChecked() ); -} - -// ---------------------------------------------------------------------- - -void KOpenWithDlg::slotDbClick() -{ - if (m_pTree->isDirSel() ) return; // check if a directory is selected - slotOK(); -} - -void KOpenWithDlg::setSaveNewApplications(bool b) -{ - d->saveNewApps = b; -} - -void KOpenWithDlg::slotOK() -{ - TQString typedExec(edit->url()); - TQString fullExec(typedExec); - - TQString serviceName; - TQString initialServiceName; - TQString preferredTerminal; - m_pService = d->curService; - if (!m_pService) { - // No service selected - check the command line - - // Find out the name of the service from the command line, removing args and paths - serviceName = KRun::binaryName( typedExec, true ); - if (serviceName.isEmpty()) - { - // TODO add a KMessageBox::error here after the end of the message freeze - return; - } - initialServiceName = serviceName; - kdDebug(250) << "initialServiceName=" << initialServiceName << endl; - int i = 1; // We have app, app-2, app-3... Looks better for the user. - bool ok = false; - // Check if there's already a service by that name, with the same Exec line - do { - kdDebug(250) << "looking for service " << serviceName << endl; - KService::Ptr serv = KService::serviceByDesktopName( serviceName ); - ok = !serv; // ok if no such service yet - // also ok if we find the exact same service (well, "kwrite" == "kwrite %U" - if ( serv && serv->type() == "Application") - { - TQString exec = serv->exec(); - fullExec = exec; - exec.replace("%u", "", false); - exec.replace("%f", "", false); - exec.replace("-caption %c", ""); - exec.replace("-caption \"%c\"", ""); - exec.replace("%i", ""); - exec.replace("%m", ""); - exec = exec.simplifyWhiteSpace(); - if (exec == typedExec) - { - ok = true; - m_pService = serv; - kdDebug(250) << k_funcinfo << "OK, found identical service: " << serv->desktopEntryPath() << endl; - } - } - if (!ok) // service was found, but it was different -> keep looking - { - ++i; - serviceName = initialServiceName + "-" + TQString::number(i); - } - } - while (!ok); - } - if ( m_pService ) - { - // Existing service selected - serviceName = m_pService->name(); - initialServiceName = serviceName; - fullExec = m_pService->exec(); - } - - if (terminal->isChecked()) - { - TDEConfigGroup confGroup( TDEGlobal::config(), TQString::fromLatin1("General") ); - preferredTerminal = confGroup.readPathEntry("TerminalApplication", TQString::fromLatin1("konsole")); - m_command = preferredTerminal; - // only add --noclose when we are sure it is konsole we're using - if (preferredTerminal == "konsole" && nocloseonexit->isChecked()) - m_command += TQString::fromLatin1(" --noclose"); - m_command += TQString::fromLatin1(" -e "); - m_command += edit->url(); - kdDebug(250) << "Setting m_command to " << m_command << endl; - } - if ( m_pService && terminal->isChecked() != m_pService->terminal() ) - m_pService = 0L; // It's not exactly this service we're running - - bool bRemember = remember && remember->isChecked(); - - if ( !bRemember && m_pService) - { - accept(); - return; - } - - if (!bRemember && !d->saveNewApps) - { - // Create temp service - m_pService = new KService(initialServiceName, fullExec, TQString::null); - if (terminal->isChecked()) - { - m_pService->setTerminal(true); - // only add --noclose when we are sure it is konsole we're using - if (preferredTerminal == "konsole" && nocloseonexit->isChecked()) - m_pService->setTerminalOptions("--noclose"); - } - accept(); - return; - } - - // if we got here, we can't seem to find a service for what they - // wanted. The other possibility is that they have asked for the - // association to be remembered. Create/update service. - - TQString newPath; - TQString oldPath; - TQString menuId; - if (m_pService) - { - oldPath = m_pService->desktopEntryPath(); - newPath = m_pService->locateLocal(); - menuId = m_pService->menuId(); - kdDebug(250) << "Updating exitsing service " << m_pService->desktopEntryPath() << " ( " << newPath << " ) " << endl; - } - else - { - newPath = KService::newServicePath(false /* hidden */, serviceName, &menuId); - kdDebug(250) << "Creating new service " << serviceName << " ( " << newPath << " ) " << endl; - } - - int maxPreference = 1; - if (!qServiceType.isEmpty()) - { - KServiceTypeProfile::OfferList offerList = KServiceTypeProfile::offers( qServiceType ); - if (!offerList.isEmpty()) - maxPreference = offerList.first().preference(); - } - - KDesktopFile *desktop = 0; - if (!oldPath.isEmpty() && (oldPath != newPath)) - { - KDesktopFile orig(oldPath, true); - desktop = orig.copyTo(newPath); - } - else - { - desktop = new KDesktopFile(newPath); - } - desktop->writeEntry("Type", TQString::fromLatin1("Application")); - desktop->writeEntry("Name", initialServiceName); - desktop->writePathEntry("Exec", fullExec); - if (terminal->isChecked()) - { - desktop->writeEntry("Terminal", true); - // only add --noclose when we are sure it is konsole we're using - if (preferredTerminal == "konsole" && nocloseonexit->isChecked()) - desktop->writeEntry("TerminalOptions", "--noclose"); - } - else - { - desktop->writeEntry("Terminal", false); - } - desktop->writeEntry("InitialPreference", maxPreference + 1); - - - if (bRemember || d->saveNewApps) - { - TQStringList mimeList = desktop->readListEntry("MimeType", ';'); - if (!qServiceType.isEmpty() && !mimeList.contains(qServiceType)) - mimeList.append(qServiceType); - desktop->writeEntry("MimeType", mimeList, ';'); - - if ( !qServiceType.isEmpty() ) - { - // Also make sure the "auto embed" setting for this mimetype is off - KDesktopFile mimeDesktop( locateLocal( "mime", qServiceType + ".desktop" ) ); - mimeDesktop.writeEntry( "X-TDE-AutoEmbed", false ); - mimeDesktop.sync(); - } - } - - // write it all out to the file - desktop->sync(); - delete desktop; - - KService::rebuildKSycoca(this); - - m_pService = KService::serviceByMenuId( menuId ); - - Q_ASSERT( m_pService ); - - accept(); -} - -TQString KOpenWithDlg::text() const -{ - if (!m_command.isEmpty()) - return m_command; - else - return edit->url(); -} - -void KOpenWithDlg::hideNoCloseOnExit() -{ - // uncheck the checkbox because the value could be used when "Run in Terminal" is selected - nocloseonexit->setChecked( false ); - nocloseonexit->hide(); -} - -void KOpenWithDlg::hideRunInTerminal() -{ - terminal->hide(); - hideNoCloseOnExit(); -} - -void KOpenWithDlg::accept() -{ - KHistoryCombo *combo = static_cast( edit->comboBox() ); - if ( combo ) { - combo->addToHistory( edit->url() ); - - TDEConfig *kc = TDEGlobal::config(); - TDEConfigGroupSaver ks( kc, TQString::fromLatin1("Open-with settings") ); - kc->writeEntry( TQString::fromLatin1("History"), combo->historyItems() ); - kc->writeEntry(TQString::fromLatin1("CompletionMode"), - combo->completionMode()); - // don't store the completion-list, as it contains all of KURLCompletion's - // executables - kc->sync(); - } - - TQDialog::accept(); -} - - -/////////////// - -#ifndef KDE_NO_COMPAT -bool KFileOpenWithHandler::displayOpenWithDialog( const KURL::List& urls ) -{ - KOpenWithDlg l( urls, i18n("Open with:"), TQString::null, 0L ); - if ( l.exec() ) - { - KService::Ptr service = l.service(); - if ( !!service ) - return KRun::run( *service, urls ); - - kdDebug(250) << "No service set, running " << l.text() << endl; - return KRun::run( l.text(), urls ); - } - return false; -} -#endif - -#include "kopenwith.moc" -#include "kopenwith_p.moc" - diff --git a/kio/kfile/kopenwith.h b/kio/kfile/kopenwith.h deleted file mode 100644 index 90c43ceb1..000000000 --- a/kio/kfile/kopenwith.h +++ /dev/null @@ -1,209 +0,0 @@ -// -/* This file is part of the KDE libraries - Copyright (C) 2000 David Faure - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ -#ifndef __open_with_h__ -#define __open_with_h__ - -#include - -#include -#include -#include - -class TDEApplicationTree; -class KURLRequester; - -class TQWidget; -class TQCheckBox; -class TQPushButton; -class TQLabel; - -class KOpenWithDlgPrivate; - -/* ------------------------------------------------------------------------- */ -/** - * "Open with" dialog box. - * Used automatically by KRun, and used by libkonq. - * - * @author David Faure - */ -class TDEIO_EXPORT KOpenWithDlg : public TQDialog //#TODO: Use KDialogBase for KDE4 -{ - Q_OBJECT -public: - - /** - * Create a dialog that asks for a application to open a given - * URL(s) with. - * - * @param urls the URLs that should be opened. The list can be empty, - * if the dialog is used to choose an application but not for some particular URLs. - * @param parent parent widget - */ - KOpenWithDlg( const KURL::List& urls, TQWidget *parent = 0L ); - - /** - * Create a dialog that asks for a application to open a given - * URL(s) with. - * - * @param urls is the URL that should be opened - * @param text appears as a label on top of the entry box. - * @param value is the initial value of the line - * @param parent parent widget - */ - KOpenWithDlg( const KURL::List& urls, const TQString& text, const TQString& value, - TQWidget *parent = 0L ); - - /** - * Create a dialog to select a service for a given service type. - * Note that this dialog doesn't apply to URLs. - * - * @param serviceType the service type we want to choose an application for. - * @param value is the initial value of the line - * @param parent parent widget - */ - KOpenWithDlg( const TQString& serviceType, const TQString& value, - TQWidget *parent = 0L ); - - /** - * Create a dialog to select an application - * Note that this dialog doesn't apply to URLs. - * - * @param parent parent widget - * @since 3.1 - */ - KOpenWithDlg( TQWidget *parent = 0L ); - - /** - * Destructor - */ - ~KOpenWithDlg(); - - /** - * @return the text the user entered - */ - TQString text() const; - /** - * Hide the "Do not &close when command exits" Checkbox - */ - void hideNoCloseOnExit(); - /** - * Hide the "Run in &terminal" Checkbox - */ - void hideRunInTerminal(); - /** - * @return the chosen service in the application tree - * Can be null, if the user typed some text and didn't select a service. - */ - KService::Ptr service() const { return m_pService; } - /** - * Set whether a new .desktop file should be created if the user selects an - * application for which no corresponding .desktop file can be found. - * - * Regardless of this setting a new .desktop file may still be created if - * the user has chosen to remember the file association. - * - * The default is false: no .desktop files are created. - * @since 3.2 - */ - void setSaveNewApplications(bool b); - -public slots: - /** - * The slot for clearing the edit widget - */ - void slotClear(); - void slotSelected( const TQString&_name, const TQString& _exec ); - void slotHighlighted( const TQString& _name, const TQString& _exec ); - void slotTextChanged(); - void slotTerminalToggled(bool); - void slotDbClick(); - void slotOK(); - -protected slots: - /** - * Reimplemented from TQDialog::accept() to save history of the combobox - */ - virtual void accept(); - -protected: - - /** - * Determine service type from URLs - */ - void setServiceType( const KURL::List& _urls ); - - /** - * Create a dialog that asks for a application to open a given - * URL(s) with. - * - * @param text appears as a label on top of the entry box. - * @param value is the initial value of the line - */ - void init( const TQString& text, const TQString& value ); - - KURLRequester * edit; - TQString m_command; - - TDEApplicationTree* m_pTree; - TQLabel *label; - - TQString qName, qServiceType; - bool m_terminaldirty; - TQCheckBox *terminal, *remember, *nocloseonexit; - TQPushButton *UNUSED; - TQPushButton *UNUSED2; - - KService::Ptr m_pService; - - KOpenWithDlgPrivate *d; -}; - -/* ------------------------------------------------------------------------- */ - -#ifndef KDE_NO_COMPAT -/** - * This class handles the displayOpenWithDialog call, made by KRun - * when it has no idea what to do with a URL. - * It displays the open-with dialog box. - * - * If you use KRun you _need_ to create an instance of KFileOpenWithHandler - * (except if you can make sure you only use it for executables or - * Type=Application desktop files) - * - * - */ -class TDEIO_EXPORT_DEPRECATED KFileOpenWithHandler : public KOpenWithHandler -{ -public: - KFileOpenWithHandler() : KOpenWithHandler() {} - virtual ~KFileOpenWithHandler() {} - - /** - * Opens an open-with dialog box for @p urls - * @returns true if the operation succeeded - */ - virtual bool displayOpenWithDialog( const KURL::List& urls ); -}; -#endif - - -/* ------------------------------------------------------------------------- */ - -#endif diff --git a/kio/kfile/kopenwith_p.h b/kio/kfile/kopenwith_p.h deleted file mode 100644 index 8231da27d..000000000 --- a/kio/kfile/kopenwith_p.h +++ /dev/null @@ -1,101 +0,0 @@ -// -/* This file is part of the KDE libraries - Copyright (C) 2000 David Faure - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ -#ifndef __open_with_p_h__ -#define __open_with_p_h__ - -#include -#include - -class KURLRequester; - -class TQWidget; -class TQCheckBox; -class TQPushButton; -class TQLabel; -class TQStringList; - - -/* ------------------------------------------------------------------------- */ - -/** - * @internal - */ -class KAppTreeListItem : public TQListViewItem -{ - bool parsed; - bool directory; - TQString path; - TQString exec; - -protected: - int compare(TQListViewItem *i, int col, bool ascending ) const; - TQString key(int column, bool ascending) const; - - void init(const TQPixmap& pixmap, bool parse, bool dir, const TQString &_path, const TQString &exec); - -public: - KAppTreeListItem( KListView* parent, const TQString & name, const TQPixmap& pixmap, - bool parse, bool dir, const TQString &p, const TQString &c ); - KAppTreeListItem( TQListViewItem* parent, const TQString & name, const TQPixmap& pixmap, - bool parse, bool dir, const TQString &p, const TQString &c ); - bool isDirectory(); - -protected: - virtual void activate(); - virtual void setOpen( bool o ); - - friend class TDEApplicationTree; -}; - -/* ------------------------------------------------------------------------- */ - -/** - * @internal - */ -class TDEApplicationTree : public KListView -{ - Q_OBJECT -public: - TDEApplicationTree( TQWidget *parent ); - - /** - * Add a group of .desktop/.kdelnk entries - */ - void addDesktopGroup( const TQString &relPath, KAppTreeListItem *item = 0 ); - - bool isDirSel(); - -protected: - void resizeEvent( TQResizeEvent *_ev ); - KAppTreeListItem* currentitem; - void cleanupTree(); - -public slots: - void slotItemHighlighted(TQListViewItem* i); - void slotSelectionChanged(TQListViewItem* i); - -signals: - void selected( const TQString& _name, const TQString& _exec ); - void highlighted( const TQString& _name, const TQString& _exec ); -}; - -/* ------------------------------------------------------------------------- */ - -#endif diff --git a/kio/kfile/kpreviewprops.cpp b/kio/kfile/kpreviewprops.cpp deleted file mode 100644 index 3672f4387..000000000 --- a/kio/kfile/kpreviewprops.cpp +++ /dev/null @@ -1,89 +0,0 @@ -/* This file is part of the KDE libraries - Copyright (C) 2005 Stephan Binner - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License version 2 as published by the Free Software Foundation. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. - - */ - -#include "kpreviewprops.h" - -#include - -#include -#include -#include - -class KPreviewPropsPlugin::KPreviewPropsPluginPrivate -{ -public: - KPreviewPropsPluginPrivate() {} - ~KPreviewPropsPluginPrivate() {} -}; - -KPreviewPropsPlugin::KPreviewPropsPlugin(KPropertiesDialog* props) - : KPropsDlgPlugin(props) -{ - d = new KPreviewPropsPluginPrivate; - - if (properties->items().count()>1) - return; - - createLayout(); -} - -void KPreviewPropsPlugin::createLayout() -{ - // let the dialog create the page frame - TQFrame* topframe = properties->addPage(i18n("P&review")); - topframe->setFrameStyle(TQFrame::NoFrame); - - TQVBoxLayout* tmp = new TQVBoxLayout(topframe, 0, 0); - - preview = new KFileMetaPreview(topframe); - - tmp->addWidget(preview) ; - connect( properties, TQT_SIGNAL( aboutToShowPage( TQWidget * ) ), TQT_SLOT( aboutToShowPage( TQWidget* ) ) ); -} - -KPreviewPropsPlugin::~KPreviewPropsPlugin() -{ - delete d; -} - -bool KPreviewPropsPlugin::supports( KFileItemList _items ) -{ - if ( _items.count() != 1) - return false; - if( !TDEGlobalSettings::showFilePreview(_items.first()->url())) - return false; - KMimeType::Ptr mt = KMimeType::findByURL( _items.first()->url() ); - if ( mt->inherits("inode/directory") || mt->name() == "application/octet-stream" ) - return false; - - //TODO Copy everything of KFileMetaPreview::previewProviderFor() ? - - return true; -} - -void KPreviewPropsPlugin::aboutToShowPage( TQWidget* widget ) -{ - if ( TQT_TQOBJECT(widget) != TQT_TQOBJECT(preview->parent()) ) - return; - - disconnect( properties, TQT_SIGNAL( aboutToShowPage( TQWidget * ) ), this, TQT_SLOT( aboutToShowPage( TQWidget* ) ) ); - preview->showPreview(properties->item()->url()); -} - -#include "kpreviewprops.moc" diff --git a/kio/kfile/kpreviewprops.h b/kio/kfile/kpreviewprops.h deleted file mode 100644 index d934af22a..000000000 --- a/kio/kfile/kpreviewprops.h +++ /dev/null @@ -1,57 +0,0 @@ -/* This file is part of the KDE libraries - Copyright (C) 2005 Stephan Binner - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License version 2 as published by the Free Software Foundation. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. - - */ - -#ifndef __KPREVIEWPROPS_H__ -#define __KPREVIEWPROPS_H__ - -#include - -class KFileMetaPreview; - -/*! - * PreviewProps plugin - * This plugin displays a preview of the given file - * @since 3.5 - */ -class TDEIO_EXPORT KPreviewPropsPlugin : public KPropsDlgPlugin -{ - Q_OBJECT - -public: - - KPreviewPropsPlugin( KPropertiesDialog *_props ); - virtual ~KPreviewPropsPlugin(); - - /** - * Tests whether a preview for the first item should be shown - */ - static bool supports( KFileItemList _items ); - -private slots: - void aboutToShowPage( TQWidget* ); - -private: - KFileMetaPreview* preview; - void createLayout(); - - class KPreviewPropsPluginPrivate; - KPreviewPropsPluginPrivate *d; -}; - -#endif diff --git a/kio/kfile/kpreviewwidgetbase.cpp b/kio/kfile/kpreviewwidgetbase.cpp deleted file mode 100644 index 979da919e..000000000 --- a/kio/kfile/kpreviewwidgetbase.cpp +++ /dev/null @@ -1,49 +0,0 @@ -/* - * This file is part of the KDE project. - * Copyright (C) 2003 Carsten Pfeiffer - * - * You can Freely distribute this program under the GNU Library General Public - * License. See the file "COPYING" for the exact licensing terms. - */ - -#include "kpreviewwidgetbase.h" -#include - -class KPreviewWidgetBase::KPreviewWidgetBasePrivate -{ -public: - TQStringList supportedMimeTypes; -}; - -TQPtrDict * KPreviewWidgetBase::s_private; - -KPreviewWidgetBase::KPreviewWidgetBase( TQWidget *parent, const char *name ) - : TQWidget( parent, name ) -{ - if ( !s_private ) - s_private = new TQPtrDict(); - - s_private->insert( this, new KPreviewWidgetBasePrivate() ); -} - -KPreviewWidgetBase::~KPreviewWidgetBase() -{ - s_private->remove( this ); - if ( s_private->isEmpty() ) - { - delete s_private; - s_private = 0L; - } -} - -void KPreviewWidgetBase::setSupportedMimeTypes( const TQStringList& mimeTypes ) -{ - d()->supportedMimeTypes = mimeTypes; -} - -TQStringList KPreviewWidgetBase::supportedMimeTypes() const -{ - return d()->supportedMimeTypes; -} - -#include "kpreviewwidgetbase.moc" diff --git a/kio/kfile/kpreviewwidgetbase.h b/kio/kfile/kpreviewwidgetbase.h deleted file mode 100644 index 3597070ee..000000000 --- a/kio/kfile/kpreviewwidgetbase.h +++ /dev/null @@ -1,92 +0,0 @@ -/* This file is part of the KDE libraries - * Copyright (C) 2001 Frerich Raabe - * 2003 Carsten Pfeiffer - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library 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 - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public License - * along with this library; see the file COPYING.LIB. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - */ - -#ifndef __KPREVIEWWIDGETBASE_H__ -#define __KPREVIEWWIDGETBASE_H__ - -#include -#include - -#include - -class KURL; - -/** - * Abstract baseclass for all preview widgets which shall be used via - * KFileDialog::setPreviewWidget(const KPreviewWidgetBase *). - * Ownership will be transferred to KFileDialog, so you have to create - * the preview with "new" and let KFileDialog delete it. - * - * Just derive your custom preview widget from KPreviewWidgetBase and implement - * all the pure virtual methods. The slot showPreview(const KURL &) is called - * every time the file selection changes. - * - * @short Abstract baseclass for all preview widgets. - * @author Frerich Raabe - */ -class TDEIO_EXPORT KPreviewWidgetBase : public TQWidget -{ - Q_OBJECT - -public: - /** - * Constructor. Construct the user interface of your preview widget here - * and pass the KFileDialog this preview widget is going to be used in as - * the parent. - * - * @param parent The KFileDialog this preview widget is going to be used in - * @param name The internal name of this object - */ - KPreviewWidgetBase(TQWidget *parent, const char *name=0); - ~KPreviewWidgetBase(); - -public slots: - /** - * This slot is called every time the user selects another file in the - * file dialog. Implement the stuff necessary to reflect the change here. - * - * @param url The URL of the currently selected file. - */ - virtual void showPreview(const KURL &url) = 0; - - /** - * Reimplement this to clear the preview. This is called when e.g. the - * selection is cleared or when multiple selections exist, or the directory - * is changed. - */ - virtual void clearPreview() = 0; - - TQStringList supportedMimeTypes() const; - -protected: - void setSupportedMimeTypes( const TQStringList& mimeTypes ); - -protected: - virtual void virtual_hook( int, void* ) {}; - -private: - class KPreviewWidgetBasePrivate; - KPreviewWidgetBasePrivate * d() const { - return s_private->find( const_cast( this ) ); - } - static TQPtrDict * s_private; -}; - -#endif diff --git a/kio/kfile/kpropertiesdesktopadvbase.ui b/kio/kfile/kpropertiesdesktopadvbase.ui deleted file mode 100644 index fd8e39781..000000000 --- a/kio/kfile/kpropertiesdesktopadvbase.ui +++ /dev/null @@ -1,280 +0,0 @@ - - -KPropertiesDesktopAdvBase - - - widget11 - - - - 0 - 0 - 463 - 294 - - - - - unnamed - - - 0 - - - - buttonGroup2 - - - Terminal - - - - unnamed - - - - spacer3 - - - Horizontal - - - Minimum - - - - 20 - 20 - - - - - - terminalCheck - - - &Run in terminal - - - Check this option if the application you want to run is a text mode application or if you want the information that is provided by the terminal emulator window. - - - - - terminalEditLabel - - - &Terminal options: - - - terminalEdit - - - - - terminalCloseCheck - - - Do not &close when command exits - - - Check this option if the text mode application offers relevant information on exit. Keeping the terminal emulator open allows you to retrieve this information. - - - - - terminalEdit - - - - - - - buttonGroup2_2 - - - User - - - - unnamed - - - - suidCheck - - - Ru&n as a different user - - - Check this option if you want to run this application with a different user id. Every process has a different user id associated with it. This id code determines file access and other permissions. The password of the user is required to use this option. - - - - - spacer3_2 - - - Horizontal - - - Minimum - - - - 20 - 20 - - - - - - suidEditLabel - - - &Username: - - - suidEdit - - - Enter the user name you want to run the application as. - - - - - suidEdit - - - Enter the user name you want to run the application as here. - - - - - - - buttonGroup4 - - - Startup - - - - unnamed - - - - startupInfoCheck - - - Enable &launch feedback - - - Check this option if you want to make clear that your application has started. This visual feedback may appear as a busy cursor or in the taskbar. - - - - - systrayCheck - - - &Place in system tray - - - Check this option if you want to have a system tray handle for your application. - - - - - textLabel12 - - - &DCOP registration: - - - dcopCombo - - - - - - None - - - - - Multiple Instances - - - - - Single Instance - - - - - Run Until Finished - - - - dcopCombo - - - - - spacer33 - - - Horizontal - - - Expanding - - - - 50 - 20 - - - - - - - - - - terminalCheck - toggled(bool) - terminalCloseCheck - setEnabled(bool) - - - terminalCheck - toggled(bool) - terminalEdit - setEnabled(bool) - - - terminalCheck - toggled(bool) - terminalEditLabel - setEnabled(bool) - - - suidCheck - toggled(bool) - suidEdit - setEnabled(bool) - - - suidCheck - toggled(bool) - suidEditLabel - setEnabled(bool) - - - - klineedit.h - - - diff --git a/kio/kfile/kpropertiesdesktopbase.ui b/kio/kfile/kpropertiesdesktopbase.ui deleted file mode 100644 index a0894dc70..000000000 --- a/kio/kfile/kpropertiesdesktopbase.ui +++ /dev/null @@ -1,316 +0,0 @@ - -KPropertiesDesktopBase - - - KPropertiesDesktopBase - - - - 0 - 0 - 449 - 304 - - - - - unnamed - - - 0 - - - - spacer6 - - - Vertical - - - Minimum - - - - 20 - 16 - - - - - - textLabel7 - - - &Supported file types: - - - filetypeList - - - <qt><p>This list should show the types of file that your application can handle. This list is organized by <u>mimetypes</u>.</p> -<p>MIME, Multipurpose Internet (e)Mail Extension, is a standard protocol for identifying the type of data based on filename extensions and correspondent <u>mimetypes</u>. Example: the "bmp" part that comes after the dot in flower.bmp indicates that it is a specific kind of image, <u>image/x-bmp</u>. To know which application should open each type of file, the system should be informed about the abilities of each application to handle these extensions and mimetypes.</p> -<p>If you want to associate this application with one or more mimetypes that are not in this list, click on the button <b>Add</b> below. If there are one or more filetypes that this application cannot handle, you may want to remove them from the list clicking on the button <b>Remove</b> below.</p></qt> - - - - - - Mimetype - - - true - - - true - - - - - Description - - - true - - - true - - - - filetypeList - - - - 7 - 7 - 0 - 1 - - - - true - - - <qt><p>This list should show the types of file that your application can handle. This list is organized by <u>mimetypes</u>.</p> -<p>MIME, Multipurpose Internet (e)Mail Extension, is a standard protocol for identifying the type of data based on filename extensions and correspondent <u>mimetypes</u>. Example: the "bmp" part that comes after the dot in flower.bmp indicates that it is a specific kind of image, <u>image/x-bmp</u>. To know which application should open each type of file, the system should be informed about the abilities of each application to handle these extensions and mimetypes.</p> -<p>If you want to associate this application with one or more mimetypes that are not in this list, click on the button <b>Add</b> below. If there are one or more filetypes that this application cannot handle, you may want to remove them from the list clicking on the button <b>Remove</b> below.</p></qt> - - - - - nameLabel - - - &Name: - - - nameEdit - - - Type the name you want to give to this application here. This application will appear under this name in the applications menu and in the panel. - - - - - nameEdit - - - Type the name you want to give to this application here. This application will appear under this name in the applications menu and in the panel. - - - - - textLabel2 - - - &Description: - - - genNameEdit - - - Type the description of this application, based on its use, here. Examples: a dial up application (KPPP) would be "Dial up tool". - - - - - genNameEdit - - - Type the description of this application, based on its use, here. Examples: a dial up application (KPPP) would be "Dial up tool". - - - - - textLabel3 - - - Comm&ent: - - - commentEdit - - - Type any comment you think is useful here. - - - - - commentEdit - - - Type any comment you think is useful here. - - - - - textLabel4 - - - Co&mmand: - - - commandEdit - - - Type the command to start this application here. - -Following the command, you can have several place holders which will be replaced with the actual values when the actual program is run: -%f - a single file name -%F - a list of files; use for applications that can open several local files at once -%u - a single URL -%U - a list of URLs -%d - the directory of the file to open -%D - a list of directories -%i - the icon -%m - the mini-icon -%c - the caption - - - - - commandEdit - - - Type the command to start this application here. - -Following the command, you can have several place holders which will be replaced with the actual values when the actual program is run: -%f - a single file name -%F - a list of files; use for applications that can open several local files at once -%u - a single URL -%U - a list of URLs -%d - the directory of the file to open -%D - a list of directories -%i - the icon -%m - the mini-icon -%c - the caption - - - - - browseButton - - - &Browse... - - - Click here to browse your file system in order to find the desired executable. - - - - - textLabel5 - - - &Work path: - - - pathEdit - - - Sets the working directory for your application. - - - - - pathEdit - - - Sets the working directory for your application. - - - - - addFiletypeButton - - - Add... - - - Click on this button if you want to add a type of file (mimetype) that your application can handle. - - - - - spacer31_2 - - - Horizontal - - - MinimumExpanding - - - - 53 - 20 - - - - - - delFiletypeButton - - - Remove - - - If you want to remove a type of file (mimetype) that your application cannot handle, select the mimetype in the list above and click on this button. - - - - - spacer31_3 - - - Horizontal - - - MinimumExpanding - - - - 53 - 20 - - - - - - advancedButton - - - Ad&vanced Options - - - Click here to modify the way this application will run, launch feedback, DCOP options or to run it as a different user. - - - - - - klineedit.h - kurlrequester.h - klistview.h - - - diff --git a/kio/kfile/kpropertiesdialog.cpp b/kio/kfile/kpropertiesdialog.cpp deleted file mode 100644 index 0b1f6c05b..000000000 --- a/kio/kfile/kpropertiesdialog.cpp +++ /dev/null @@ -1,4170 +0,0 @@ -/* This file is part of the KDE project - - Copyright (C) 1998, 1999 Torben Weis - Copyright (c) 1999, 2000 Preston Brown - Copyright (c) 2000 Simon Hausmann - Copyright (c) 2000 David Faure - Copyright (c) 2003 Waldo Bastian - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -/* - * kpropertiesdialog.cpp - * View/Edit Properties of files, locally or remotely - * - * some FilePermissionsPropsPlugin-changes by - * Henner Zeller - * some layout management by - * Bertrand Leconte - * the rest of the layout management, bug fixes, adaptation to libkio, - * template feature by - * David Faure - * More layout, cleanups, and fixes by - * Preston Brown - * Plugin capability, cleanups and port to KDialogBase by - * Simon Hausmann - * KDesktopPropsPlugin by - * Waldo Bastian - */ - -#include -extern "C" { -#include -#include -#include -#include -} -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#ifdef USE_POSIX_ACL -extern "C" { -#include -#ifdef HAVE_SYS_MOUNT_H -#include -#endif -#ifdef HAVE_SYS_XATTR_H -#include -#endif -} -#endif - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "kfilesharedlg.h" - -#include "kpropertiesdesktopbase.h" -#include "kpropertiesdesktopadvbase.h" -#include "kpropertiesmimetypebase.h" -#ifdef USE_POSIX_ACL -#include "kacleditwidget.h" -#endif - -#include "kpropertiesdialog.h" - -#ifdef Q_WS_WIN -# include -#endif - -static TQString nameFromFileName(TQString nameStr) -{ - if ( nameStr.endsWith(".desktop") ) - nameStr.truncate( nameStr.length() - 8 ); - if ( nameStr.endsWith(".kdelnk") ) - nameStr.truncate( nameStr.length() - 7 ); - // Make it human-readable (%2F => '/', ...) - nameStr = TDEIO::decodeFileName( nameStr ); - return nameStr; -} - -mode_t KFilePermissionsPropsPlugin::fperm[3][4] = { - {S_IRUSR, S_IWUSR, S_IXUSR, S_ISUID}, - {S_IRGRP, S_IWGRP, S_IXGRP, S_ISGID}, - {S_IROTH, S_IWOTH, S_IXOTH, S_ISVTX} - }; - -class KPropertiesDialog::KPropertiesDialogPrivate -{ -public: - KPropertiesDialogPrivate() - { - m_aborted = false; - fileSharePage = 0; - } - ~KPropertiesDialogPrivate() - { - } - bool m_aborted:1; - TQWidget* fileSharePage; -}; - -KPropertiesDialog::KPropertiesDialog (KFileItem* item, - TQWidget* parent, const char* name, - bool modal, bool autoShow) - : KDialogBase (KDialogBase::Tabbed, i18n( "Properties for %1" ).arg(TDEIO::decodeFileName(item->url().fileName())), - KDialogBase::Ok | KDialogBase::Cancel, KDialogBase::Ok, - parent, name, modal) -{ - d = new KPropertiesDialogPrivate; - assert( item ); - m_items.append( new KFileItem(*item) ); // deep copy - - m_singleUrl = item->url(); - assert(!m_singleUrl.isEmpty()); - - init (modal, autoShow); -} - -KPropertiesDialog::KPropertiesDialog (const TQString& title, - TQWidget* parent, const char* name, bool modal) - : KDialogBase (KDialogBase::Tabbed, i18n ("Properties for %1").arg(title), - KDialogBase::Ok | KDialogBase::Cancel, KDialogBase::Ok, - parent, name, modal) -{ - d = new KPropertiesDialogPrivate; - - init (modal, false); -} - -KPropertiesDialog::KPropertiesDialog (KFileItemList _items, - TQWidget* parent, const char* name, - bool modal, bool autoShow) - : KDialogBase (KDialogBase::Tabbed, - // TODO: replace with "Properties for 1 item". It's very confusing how it has to be translated otherwise - // (empty translation before the "\n" is not allowed by msgfmt...) - _items.count()>1 ? i18n( "","Properties for %n Selected Items",_items.count()) : - i18n( "Properties for %1" ).arg(TDEIO::decodeFileName(_items.first()->url().fileName())), - KDialogBase::Ok | KDialogBase::Cancel, KDialogBase::Ok, - parent, name, modal) -{ - d = new KPropertiesDialogPrivate; - - assert( !_items.isEmpty() ); - m_singleUrl = _items.first()->url(); - assert(!m_singleUrl.isEmpty()); - - KFileItemListIterator it ( _items ); - // Deep copy - for ( ; it.current(); ++it ) - m_items.append( new KFileItem( **it ) ); - - init (modal, autoShow); -} - -#ifndef KDE_NO_COMPAT -KPropertiesDialog::KPropertiesDialog (const KURL& _url, mode_t /* _mode is now unused */, - TQWidget* parent, const char* name, - bool modal, bool autoShow) - : KDialogBase (KDialogBase::Tabbed, - i18n( "Properties for %1" ).arg(TDEIO::decodeFileName(_url.fileName())), - KDialogBase::Ok | KDialogBase::Cancel, KDialogBase::Ok, - parent, name, modal), - m_singleUrl( _url ) -{ - d = new KPropertiesDialogPrivate; - - TDEIO::UDSEntry entry; - - TDEIO::NetAccess::stat(_url, entry, parent); - - m_items.append( new KFileItem( entry, _url ) ); - init (modal, autoShow); -} -#endif - -KPropertiesDialog::KPropertiesDialog (const KURL& _url, - TQWidget* parent, const char* name, - bool modal, bool autoShow) - : KDialogBase (KDialogBase::Tabbed, - i18n( "Properties for %1" ).arg(TDEIO::decodeFileName(_url.fileName())), - KDialogBase::Ok | KDialogBase::Cancel, KDialogBase::Ok, - parent, name, modal), - m_singleUrl( _url ) -{ - d = new KPropertiesDialogPrivate; - - TDEIO::UDSEntry entry; - - TDEIO::NetAccess::stat(_url, entry, parent); - - m_items.append( new KFileItem( entry, _url ) ); - init (modal, autoShow); -} - -KPropertiesDialog::KPropertiesDialog (const KURL& _tempUrl, const KURL& _currentDir, - const TQString& _defaultName, - TQWidget* parent, const char* name, - bool modal, bool autoShow) - : KDialogBase (KDialogBase::Tabbed, - i18n( "Properties for %1" ).arg(TDEIO::decodeFileName(_tempUrl.fileName())), - KDialogBase::Ok | KDialogBase::Cancel, KDialogBase::Ok, - parent, name, modal), - - m_singleUrl( _tempUrl ), - m_defaultName( _defaultName ), - m_currentDir( _currentDir ) -{ - d = new KPropertiesDialogPrivate; - - assert(!m_singleUrl.isEmpty()); - - // Create the KFileItem for the _template_ file, in order to read from it. - m_items.append( new KFileItem( KFileItem::Unknown, KFileItem::Unknown, m_singleUrl ) ); - init (modal, autoShow); -} - -bool KPropertiesDialog::showDialog(KFileItem* item, TQWidget* parent, - const char* name, bool modal) -{ -#ifdef Q_WS_WIN - TQString localPath = item->localPath(); - if (!localPath.isEmpty()) - return showWin32FilePropertyDialog(localPath); -#endif - new KPropertiesDialog(item, parent, name, modal); - return true; -} - -bool KPropertiesDialog::showDialog(const KURL& _url, TQWidget* parent, - const char* name, bool modal) -{ -#ifdef Q_WS_WIN - if (_url.isLocalFile()) - return showWin32FilePropertyDialog( _url.path() ); -#endif - new KPropertiesDialog(_url, parent, name, modal); - return true; -} - -bool KPropertiesDialog::showDialog(const KFileItemList& _items, TQWidget* parent, - const char* name, bool modal) -{ - if (_items.count()==1) - return KPropertiesDialog::showDialog(_items.getFirst(), parent, name, modal); - new KPropertiesDialog(_items, parent, name, modal); - return true; -} - -void KPropertiesDialog::init (bool modal, bool autoShow) -{ - m_pageList.setAutoDelete( true ); - m_items.setAutoDelete( true ); - - insertPages(); - - if (autoShow) - { - if (!modal) - show(); - else - exec(); - } -} - -void KPropertiesDialog::showFileSharingPage() -{ - if (d->fileSharePage) { - showPage( pageIndex( d->fileSharePage)); - } -} - -void KPropertiesDialog::setFileSharingPage(TQWidget* page) { - d->fileSharePage = page; -} - - -void KPropertiesDialog::setFileNameReadOnly( bool ro ) -{ - KPropsDlgPlugin *it; - - for ( it=m_pageList.first(); it != 0L; it=m_pageList.next() ) - { - KFilePropsPlugin* plugin = dynamic_cast(it); - if ( plugin ) { - plugin->setFileNameReadOnly( ro ); - break; - } - } -} - -void KPropertiesDialog::slotStatResult( TDEIO::Job * ) -{ -} - -KPropertiesDialog::~KPropertiesDialog() -{ - m_pageList.clear(); - delete d; -} - -void KPropertiesDialog::insertPlugin (KPropsDlgPlugin* plugin) -{ - connect (plugin, TQT_SIGNAL (changed ()), - plugin, TQT_SLOT (setDirty ())); - - m_pageList.append (plugin); -} - -bool KPropertiesDialog::canDisplay( KFileItemList _items ) -{ - // TODO: cache the result of those calls. Currently we parse .desktop files far too many times - return KFilePropsPlugin::supports( _items ) || - KFilePermissionsPropsPlugin::supports( _items ) || - KDesktopPropsPlugin::supports( _items ) || - KBindingPropsPlugin::supports( _items ) || - KURLPropsPlugin::supports( _items ) || - KDevicePropsPlugin::supports( _items ) || - KFileMetaPropsPlugin::supports( _items ) || - KPreviewPropsPlugin::supports( _items ); -} - -void KPropertiesDialog::slotOk() -{ - KPropsDlgPlugin *page; - d->m_aborted = false; - - KFilePropsPlugin * filePropsPlugin = 0L; - if ( m_pageList.first()->isA("KFilePropsPlugin") ) - filePropsPlugin = static_cast(m_pageList.first()); - - // If any page is dirty, then set the main one (KFilePropsPlugin) as - // dirty too. This is what makes it possible to save changes to a global - // desktop file into a local one. In other cases, it doesn't hurt. - for ( page = m_pageList.first(); page != 0L; page = m_pageList.next() ) - if ( page->isDirty() && filePropsPlugin ) - { - filePropsPlugin->setDirty(); - break; - } - - // Apply the changes in the _normal_ order of the tabs now - // This is because in case of renaming a file, KFilePropsPlugin will call - // KPropertiesDialog::rename, so other tab will be ok with whatever order - // BUT for file copied from templates, we need to do the renaming first ! - for ( page = m_pageList.first(); page != 0L && !d->m_aborted; page = m_pageList.next() ) - if ( page->isDirty() ) - { - kdDebug( 250 ) << "applying changes for " << page->className() << endl; - page->applyChanges(); - // applyChanges may change d->m_aborted. - } - else - kdDebug( 250 ) << "skipping page " << page->className() << endl; - - if ( !d->m_aborted && filePropsPlugin ) - filePropsPlugin->postApplyChanges(); - - if ( !d->m_aborted ) - { - emit applied(); - emit propertiesClosed(); - deleteLater(); - accept(); - } // else, keep dialog open for user to fix the problem. -} - -void KPropertiesDialog::slotCancel() -{ - emit canceled(); - emit propertiesClosed(); - - deleteLater(); - done( Rejected ); -} - -void KPropertiesDialog::insertPages() -{ - if (m_items.isEmpty()) - return; - - if ( KFilePropsPlugin::supports( m_items ) ) - { - KPropsDlgPlugin *p = new KFilePropsPlugin( this ); - insertPlugin (p); - } - - if ( KFilePermissionsPropsPlugin::supports( m_items ) ) - { - KPropsDlgPlugin *p = new KFilePermissionsPropsPlugin( this ); - insertPlugin (p); - } - - if ( KDesktopPropsPlugin::supports( m_items ) ) - { - KPropsDlgPlugin *p = new KDesktopPropsPlugin( this ); - insertPlugin (p); - } - - if ( KBindingPropsPlugin::supports( m_items ) ) - { - KPropsDlgPlugin *p = new KBindingPropsPlugin( this ); - insertPlugin (p); - } - - if ( KURLPropsPlugin::supports( m_items ) ) - { - KPropsDlgPlugin *p = new KURLPropsPlugin( this ); - insertPlugin (p); - } - - if ( KDevicePropsPlugin::supports( m_items ) ) - { - KPropsDlgPlugin *p = new KDevicePropsPlugin( this ); - insertPlugin (p); - } - - if ( KFileMetaPropsPlugin::supports( m_items ) ) - { - KPropsDlgPlugin *p = new KFileMetaPropsPlugin( this ); - insertPlugin (p); - } - - if ( KPreviewPropsPlugin::supports( m_items ) ) - { - KPropsDlgPlugin *p = new KPreviewPropsPlugin( this ); - insertPlugin (p); - } - - if ( kapp->authorizeKAction("sharefile") && - KFileSharePropsPlugin::supports( m_items ) ) - { - KPropsDlgPlugin *p = new KFileSharePropsPlugin( this ); - insertPlugin (p); - } - - //plugins - - if ( m_items.count() != 1 ) - return; - - KFileItem *item = m_items.first(); - TQString mimetype = item->mimetype(); - - if ( mimetype.isEmpty() ) - return; - - TQString query = TQString::fromLatin1( - "('KPropsDlg/Plugin' in ServiceTypes) and " - "((not exist [X-TDE-Protocol]) or " - " ([X-TDE-Protocol] == '%1' ) )" ).arg(item->url().protocol()); - - kdDebug( 250 ) << "trader query: " << query << endl; - KTrader::OfferList offers = KTrader::self()->query( mimetype, query ); - KTrader::OfferList::ConstIterator it = offers.begin(); - KTrader::OfferList::ConstIterator end = offers.end(); - for (; it != end; ++it ) - { - KPropsDlgPlugin *plugin = KParts::ComponentFactory - ::createInstanceFromLibrary( (*it)->library().local8Bit().data(), - TQT_TQOBJECT(this), - (*it)->name().latin1() ); - if ( !plugin ) - continue; - - insertPlugin( plugin ); - } -} - -void KPropertiesDialog::updateUrl( const KURL& _newUrl ) -{ - Q_ASSERT( m_items.count() == 1 ); - kdDebug(250) << "KPropertiesDialog::updateUrl (pre)" << _newUrl.url() << endl; - KURL newUrl = _newUrl; - emit saveAs(m_singleUrl, newUrl); - kdDebug(250) << "KPropertiesDialog::updateUrl (post)" << newUrl.url() << endl; - - m_singleUrl = newUrl; - m_items.first()->setURL( newUrl ); - assert(!m_singleUrl.isEmpty()); - // If we have an Desktop page, set it dirty, so that a full file is saved locally - // Same for a URL page (because of the Name= hack) - for ( TQPtrListIterator it(m_pageList); it.current(); ++it ) - if ( it.current()->isA("KExecPropsPlugin") || // KDE4 remove me - it.current()->isA("KURLPropsPlugin") || - it.current()->isA("KDesktopPropsPlugin")) - { - //kdDebug(250) << "Setting page dirty" << endl; - it.current()->setDirty(); - break; - } -} - -void KPropertiesDialog::rename( const TQString& _name ) -{ - Q_ASSERT( m_items.count() == 1 ); - kdDebug(250) << "KPropertiesDialog::rename " << _name << endl; - KURL newUrl; - // if we're creating from a template : use currentdir - if ( !m_currentDir.isEmpty() ) - { - newUrl = m_currentDir; - newUrl.addPath( _name ); - } - else - { - TQString tmpurl = m_singleUrl.url(); - if ( tmpurl.at(tmpurl.length() - 1) == '/') - // It's a directory, so strip the trailing slash first - tmpurl.truncate( tmpurl.length() - 1); - newUrl = tmpurl; - newUrl.setFileName( _name ); - } - updateUrl( newUrl ); -} - -void KPropertiesDialog::abortApplying() -{ - d->m_aborted = true; -} - -class KPropsDlgPlugin::KPropsDlgPluginPrivate -{ -public: - KPropsDlgPluginPrivate() - { - } - ~KPropsDlgPluginPrivate() - { - } - - bool m_bDirty; -}; - -KPropsDlgPlugin::KPropsDlgPlugin( KPropertiesDialog *_props ) -: TQObject( _props, 0L ) -{ - d = new KPropsDlgPluginPrivate; - properties = _props; - fontHeight = 2*properties->fontMetrics().height(); - d->m_bDirty = false; -} - -KPropsDlgPlugin::~KPropsDlgPlugin() -{ - delete d; -} - -bool KPropsDlgPlugin::isDesktopFile( KFileItem * _item ) -{ - // only local files - bool isLocal; - KURL url = _item->mostLocalURL( isLocal ); - if ( !isLocal ) - return false; - - // only regular files - if ( !S_ISREG( _item->mode() ) ) - return false; - - TQString t( url.path() ); - - // only if readable - FILE *f = fopen( TQFile::encodeName(t), "r" ); - if ( f == 0L ) - return false; - fclose(f); - - // return true if desktop file - return ( (_item->mimetype() == "application/x-desktop") - || (_item->mimetype() == "media/builtin-mydocuments") - || (_item->mimetype() == "media/builtin-mycomputer") - || (_item->mimetype() == "media/builtin-mynetworkplaces") - || (_item->mimetype() == "media/builtin-printers") - || (_item->mimetype() == "media/builtin-trash") - || (_item->mimetype() == "media/builtin-webbrowser") ); -} - -void KPropsDlgPlugin::setDirty( bool b ) -{ - d->m_bDirty = b; -} - -void KPropsDlgPlugin::setDirty() -{ - d->m_bDirty = true; -} - -bool KPropsDlgPlugin::isDirty() const -{ - return d->m_bDirty; -} - -void KPropsDlgPlugin::applyChanges() -{ - kdWarning(250) << "applyChanges() not implemented in page !" << endl; -} - -/////////////////////////////////////////////////////////////////////////////// - -class KFilePropsPlugin::KFilePropsPluginPrivate -{ -public: - KFilePropsPluginPrivate() - { - dirSizeJob = 0L; - dirSizeUpdateTimer = 0L; - m_lined = 0; - m_freeSpaceLabel = 0; - } - ~KFilePropsPluginPrivate() - { - if ( dirSizeJob ) - dirSizeJob->kill(); - } - - KDirSize * dirSizeJob; - TQTimer *dirSizeUpdateTimer; - TQFrame *m_frame; - bool bMultiple; - bool bIconChanged; - bool bKDesktopMode; - bool bDesktopFile; - TQLabel *m_freeSpaceLabel; - TQString mimeType; - TQString oldFileName; - KLineEdit* m_lined; -}; - -KFilePropsPlugin::KFilePropsPlugin( KPropertiesDialog *_props ) - : KPropsDlgPlugin( _props ) -{ - d = new KFilePropsPluginPrivate; - d->bMultiple = (properties->items().count() > 1); - d->bIconChanged = false; - d->bKDesktopMode = (TQCString(tqApp->name()) == "kdesktop"); // nasty heh? - d->bDesktopFile = KDesktopPropsPlugin::supports(properties->items()); - kdDebug(250) << "KFilePropsPlugin::KFilePropsPlugin bMultiple=" << d->bMultiple << endl; - - // We set this data from the first item, and we'll - // check that the other items match against it, resetting when not. - bool isLocal; - KFileItem * item = properties->item(); - KURL url = item->mostLocalURL( isLocal ); - bool isReallyLocal = item->url().isLocalFile(); - bool bDesktopFile = isDesktopFile(item); - kdDebug() << "url=" << url << " bDesktopFile=" << bDesktopFile << " isLocal=" << isLocal << " isReallyLocal=" << isReallyLocal << endl; - mode_t mode = item->mode(); - bool hasDirs = item->isDir() && !item->isLink(); - bool hasRoot = url.path() == TQString::fromLatin1("/"); - TQString iconStr = KMimeType::iconForURL(url, mode); - TQString directory = properties->kurl().directory(); - TQString protocol = properties->kurl().protocol(); - TQString mimeComment = item->mimeComment(); - d->mimeType = item->mimetype(); - bool hasTotalSize; - TDEIO::filesize_t totalSize = item->size(hasTotalSize); - TQString magicMimeComment; - if ( isLocal ) { - KMimeType::Ptr magicMimeType = KMimeType::findByFileContent( url.path() ); - if ( magicMimeType->name() != KMimeType::defaultMimeType() ) - magicMimeComment = magicMimeType->comment(); - } - - // Those things only apply to 'single file' mode - TQString filename = TQString::null; - bool isTrash = false; - bool isDevice = false; - m_bFromTemplate = false; - - // And those only to 'multiple' mode - uint iDirCount = hasDirs ? 1 : 0; - uint iFileCount = 1-iDirCount; - - d->m_frame = properties->addPage (i18n("&General")); - - TQVBoxLayout *vbl = new TQVBoxLayout( d->m_frame, 0, - KDialog::spacingHint(), "vbl"); - TQGridLayout *grid = new TQGridLayout(0, 3); // unknown rows - grid->setColStretch(0, 0); - grid->setColStretch(1, 0); - grid->setColStretch(2, 1); - grid->addColSpacing(1, KDialog::spacingHint()); - vbl->addLayout(TQT_TQLAYOUT(grid)); - int curRow = 0; - - if ( !d->bMultiple ) - { - TQString path; - if ( !m_bFromTemplate ) { - isTrash = ( properties->kurl().protocol().find( "trash", 0, false)==0 ); - if ( properties->kurl().protocol().find("device", 0, false)==0) - isDevice = true; - // Extract the full name, but without file: for local files - if ( isReallyLocal ) - path = properties->kurl().path(); - else - path = properties->kurl().prettyURL(); - } else { - path = properties->currentDir().path(1) + properties->defaultName(); - directory = properties->currentDir().prettyURL(); - } - - if (KExecPropsPlugin::supports(properties->items()) || // KDE4 remove me - d->bDesktopFile || - KBindingPropsPlugin::supports(properties->items())) { - determineRelativePath( path ); - } - - // Extract the file name only - filename = properties->defaultName(); - if ( filename.isEmpty() ) { // no template - filename = item->name(); // this gives support for UDS_NAME, e.g. for kio_trash or kio_system - } else { - m_bFromTemplate = true; - setDirty(); // to enforce that the copy happens - } - d->oldFileName = filename; - - // Make it human-readable - filename = nameFromFileName( filename ); - - if ( d->bKDesktopMode && d->bDesktopFile ) { - KDesktopFile config( url.path(), true /* readonly */ ); - if ( config.hasKey( "Name" ) ) { - filename = config.readName(); - } - } - - oldName = filename; - } - else - { - // Multiple items: see what they have in common - KFileItemList items = properties->items(); - KFileItemListIterator it( items ); - for ( ++it /*no need to check the first one again*/ ; it.current(); ++it ) - { - KURL url = (*it)->url(); - kdDebug(250) << "KFilePropsPlugin::KFilePropsPlugin " << url.prettyURL() << endl; - // The list of things we check here should match the variables defined - // at the beginning of this method. - if ( url.isLocalFile() != isLocal ) - isLocal = false; // not all local - if ( bDesktopFile && isDesktopFile(*it) != bDesktopFile ) - bDesktopFile = false; // not all desktop files - if ( (*it)->mode() != mode ) - mode = (mode_t)0; - if ( KMimeType::iconForURL(url, mode) != iconStr ) - iconStr = "tdemultiple"; - if ( url.directory() != directory ) - directory = TQString::null; - if ( url.protocol() != protocol ) - protocol = TQString::null; - if ( !mimeComment.isNull() && (*it)->mimeComment() != mimeComment ) - mimeComment = TQString::null; - if ( isLocal && !magicMimeComment.isNull() ) { - KMimeType::Ptr magicMimeType = KMimeType::findByFileContent( url.path() ); - if ( magicMimeType->comment() != magicMimeComment ) - magicMimeComment = TQString::null; - } - - if ( url.path() == TQString::fromLatin1("/") ) - hasRoot = true; - if ( (*it)->isDir() && !(*it)->isLink() ) - { - iDirCount++; - hasDirs = true; - } - else - { - iFileCount++; - bool hasSize; - totalSize += (*it)->size(hasSize); - hasTotalSize = hasTotalSize || hasSize; - } - } - } - - if (!isReallyLocal && !protocol.isEmpty()) - { - directory += ' '; - directory += '('; - directory += protocol; - directory += ')'; - } - - if ( !isDevice && !isTrash && (bDesktopFile || S_ISDIR(mode)) && !d->bMultiple /*not implemented for multiple*/ ) - { - KIconButton *iconButton = new KIconButton( d->m_frame ); - int bsize = 66 + 2 * iconButton->style().pixelMetric(TQStyle::PM_ButtonMargin); - iconButton->setFixedSize(bsize, bsize); - iconButton->setIconSize(48); - iconButton->setStrictIconSize(false); - // This works for everything except Device icons on unmounted devices - // So we have to really open .desktop files - TQString iconStr = KMimeType::findByURL( url, mode )->icon( url, isLocal ); - if ( bDesktopFile && isLocal ) - { - KDesktopFile config( url.path(), true ); - config.setDesktopGroup(); - iconStr = config.readEntry( "Icon" ); - if ( config.hasDeviceType() ) - iconButton->setIconType( KIcon::Desktop, KIcon::Device ); - else - iconButton->setIconType( KIcon::Desktop, KIcon::Application ); - } else - iconButton->setIconType( KIcon::Desktop, KIcon::Place ); - iconButton->setIcon(iconStr); - iconArea = iconButton; - connect( iconButton, TQT_SIGNAL( iconChanged(TQString) ), - this, TQT_SLOT( slotIconChanged() ) ); - } else { - TQLabel *iconLabel = new TQLabel( d->m_frame ); - int bsize = 66 + 2 * iconLabel->style().pixelMetric(TQStyle::PM_ButtonMargin); - iconLabel->setFixedSize(bsize, bsize); - iconLabel->setPixmap( TDEGlobal::iconLoader()->loadIcon( iconStr, KIcon::Desktop, 48) ); - iconArea = iconLabel; - } - grid->addWidget(iconArea, curRow, 0, Qt::AlignLeft); - - if (d->bMultiple || isTrash || isDevice || hasRoot) - { - TQLabel *lab = new TQLabel(d->m_frame ); - if ( d->bMultiple ) - lab->setText( TDEIO::itemsSummaryString( iFileCount + iDirCount, iFileCount, iDirCount, 0, false ) ); - else - lab->setText( filename ); - nameArea = lab; - } else - { - d->m_lined = new KLineEdit( d->m_frame ); - d->m_lined->setText(filename); - nameArea = d->m_lined; - d->m_lined->setFocus(); - - // Enhanced rename: Don't highlight the file extension. - TQString pattern; - KServiceTypeFactory::self()->findFromPattern( filename, &pattern ); - if (!pattern.isEmpty() && pattern.at(0)=='*' && pattern.find('*',1)==-1) - d->m_lined->setSelection(0, filename.length()-pattern.stripWhiteSpace().length()+1); - else - { - int lastDot = filename.findRev('.'); - if (lastDot > 0) - d->m_lined->setSelection(0, lastDot); - } - - connect( d->m_lined, TQT_SIGNAL( textChanged( const TQString & ) ), - this, TQT_SLOT( nameFileChanged(const TQString & ) ) ); - } - - grid->addWidget(nameArea, curRow++, 2); - - KSeparator* sep = new KSeparator( KSeparator::HLine, d->m_frame); - grid->addMultiCellWidget(sep, curRow, curRow, 0, 2); - ++curRow; - - TQLabel *l; - if ( !mimeComment.isEmpty() && !isDevice && !isTrash) - { - l = new TQLabel(i18n("Type:"), d->m_frame ); - - grid->addWidget(l, curRow, 0); - - TQHBox *box = new TQHBox(d->m_frame); - box->setSpacing(20); - l = new TQLabel(mimeComment, box ); - -#ifdef Q_WS_X11 - //TODO: wrap for win32 or mac? - TQPushButton *button = new TQPushButton(box); - - TQIconSet iconSet = SmallIconSet(TQString::fromLatin1("configure")); - TQPixmap pixMap = iconSet.pixmap( TQIconSet::Small, TQIconSet::Normal ); - button->setIconSet( iconSet ); - button->setFixedSize( pixMap.width()+8, pixMap.height()+8 ); - if ( d->mimeType == KMimeType::defaultMimeType() ) - TQToolTip::add(button, i18n("Create new file type")); - else - TQToolTip::add(button, i18n("Edit file type")); - - connect( button, TQT_SIGNAL( clicked() ), TQT_SLOT( slotEditFileType() )); - - if (!kapp->authorizeKAction("editfiletype")) - button->hide(); -#endif - - grid->addWidget(box, curRow++, 2); - } - - if ( !magicMimeComment.isEmpty() && magicMimeComment != mimeComment ) - { - l = new TQLabel(i18n("Contents:"), d->m_frame ); - grid->addWidget(l, curRow, 0); - - l = new TQLabel(magicMimeComment, d->m_frame ); - grid->addWidget(l, curRow++, 2); - } - - if ( !directory.isEmpty() ) - { - l = new TQLabel( i18n("Location:"), d->m_frame ); - grid->addWidget(l, curRow, 0); - - l = new KSqueezedTextLabel( d->m_frame ); - l->setText( directory ); - grid->addWidget(l, curRow++, 2); - } - - if( hasDirs || hasTotalSize ) { - l = new TQLabel(i18n("Size:"), d->m_frame ); - grid->addWidget(l, curRow, 0); - - m_sizeLabel = new TQLabel( d->m_frame ); - grid->addWidget( m_sizeLabel, curRow++, 2 ); - } else { - m_sizeLabel = 0; - } - - if ( !hasDirs ) // Only files [and symlinks] - { - if(hasTotalSize) { - m_sizeLabel->setText(TDEIO::convertSizeWithBytes(totalSize)); - } - - m_sizeDetermineButton = 0L; - m_sizeStopButton = 0L; - } - else // Directory - { - TQHBoxLayout * sizelay = new TQHBoxLayout(KDialog::spacingHint()); - grid->addLayout( sizelay, curRow++, 2 ); - - // buttons - m_sizeDetermineButton = new TQPushButton( i18n("Calculate"), d->m_frame ); - m_sizeStopButton = new TQPushButton( i18n("Stop"), d->m_frame ); - connect( m_sizeDetermineButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotSizeDetermine() ) ); - connect( m_sizeStopButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotSizeStop() ) ); - sizelay->addWidget(m_sizeDetermineButton, 0); - sizelay->addWidget(m_sizeStopButton, 0); - sizelay->addStretch(10); // so that the buttons don't grow horizontally - - // auto-launch for local dirs only, and not for '/' - if ( isLocal && !hasRoot ) - { - m_sizeDetermineButton->setText( i18n("Refresh") ); - slotSizeDetermine(); - } - else - m_sizeStopButton->setEnabled( false ); - } - - if (!d->bMultiple && item->isLink()) { - l = new TQLabel(i18n("Points to:"), d->m_frame ); - grid->addWidget(l, curRow, 0); - - l = new KSqueezedTextLabel(item->linkDest(), d->m_frame ); - grid->addWidget(l, curRow++, 2); - } - - if (!d->bMultiple) // Dates for multiple don't make much sense... - { - TQDateTime dt; - bool hasTime; - time_t tim = item->time(TDEIO::UDS_CREATION_TIME, hasTime); - if ( hasTime ) - { - l = new TQLabel(i18n("Created:"), d->m_frame ); - grid->addWidget(l, curRow, 0); - - dt.setTime_t( tim ); - l = new TQLabel(TDEGlobal::locale()->formatDateTime(dt), d->m_frame ); - grid->addWidget(l, curRow++, 2); - } - - tim = item->time(TDEIO::UDS_MODIFICATION_TIME, hasTime); - if ( hasTime ) - { - l = new TQLabel(i18n("Modified:"), d->m_frame ); - grid->addWidget(l, curRow, 0); - - dt.setTime_t( tim ); - l = new TQLabel(TDEGlobal::locale()->formatDateTime(dt), d->m_frame ); - grid->addWidget(l, curRow++, 2); - } - - tim = item->time(TDEIO::UDS_ACCESS_TIME, hasTime); - if ( hasTime ) - { - l = new TQLabel(i18n("Accessed:"), d->m_frame ); - grid->addWidget(l, curRow, 0); - - dt.setTime_t( tim ); - l = new TQLabel(TDEGlobal::locale()->formatDateTime(dt), d->m_frame ); - grid->addWidget(l, curRow++, 2); - } - } - - if ( isLocal && hasDirs ) // only for directories - { - sep = new KSeparator( KSeparator::HLine, d->m_frame); - grid->addMultiCellWidget(sep, curRow, curRow, 0, 2); - ++curRow; - - TQString mountPoint = TDEIO::findPathMountPoint( url.path() ); - - if (mountPoint != "/") - { - l = new TQLabel(i18n("Mounted on:"), d->m_frame ); - grid->addWidget(l, curRow, 0); - - l = new KSqueezedTextLabel( mountPoint, d->m_frame ); - grid->addWidget( l, curRow++, 2 ); - } - - l = new TQLabel(i18n("Free disk space:"), d->m_frame ); - grid->addWidget(l, curRow, 0); - - d->m_freeSpaceLabel = new TQLabel( d->m_frame ); - grid->addWidget( d->m_freeSpaceLabel, curRow++, 2 ); - - KDiskFreeSp * job = new KDiskFreeSp; - connect( job, TQT_SIGNAL( foundMountPoint( const unsigned long&, const unsigned long&, - const unsigned long&, const TQString& ) ), - this, TQT_SLOT( slotFoundMountPoint( const unsigned long&, const unsigned long&, - const unsigned long&, const TQString& ) ) ); - job->readDF( mountPoint ); - } - - vbl->addStretch(1); -} - -// TQString KFilePropsPlugin::tabName () const -// { -// return i18n ("&General"); -// } - -void KFilePropsPlugin::setFileNameReadOnly( bool ro ) -{ - if ( d->m_lined ) - { - d->m_lined->setReadOnly( ro ); - if (ro) - { - // Don't put the initial focus on the line edit when it is ro - TQPushButton *button = properties->actionButton(KDialogBase::Ok); - if (button) - button->setFocus(); - } - } -} - -void KFilePropsPlugin::slotEditFileType() -{ -#ifdef Q_WS_X11 - TQString mime; - if ( d->mimeType == KMimeType::defaultMimeType() ) { - int pos = d->oldFileName.findRev( '.' ); - if ( pos != -1 ) - mime = "*" + d->oldFileName.mid(pos); - else - mime = "*"; - } - else - mime = d->mimeType; - //TODO: wrap for win32 or mac? - TQString keditfiletype = TQString::fromLatin1("keditfiletype"); - KRun::runCommand( keditfiletype - + " --parent " + TQString::number( (ulong)properties->topLevelWidget()->winId()) - + " " + TDEProcess::quote(mime), - keditfiletype, keditfiletype /*unused*/); -#endif -} - -void KFilePropsPlugin::slotIconChanged() -{ - d->bIconChanged = true; - emit changed(); -} - -void KFilePropsPlugin::nameFileChanged(const TQString &text ) -{ - properties->enableButtonOK(!text.isEmpty()); - emit changed(); -} - -void KFilePropsPlugin::determineRelativePath( const TQString & path ) -{ - // now let's make it relative - TQStringList dirs; - if (KBindingPropsPlugin::supports(properties->items())) - { - m_sRelativePath =TDEGlobal::dirs()->relativeLocation("mime", path); - if (m_sRelativePath.startsWith("/")) - m_sRelativePath = TQString::null; - } - else - { - m_sRelativePath =TDEGlobal::dirs()->relativeLocation("apps", path); - if (m_sRelativePath.startsWith("/")) - { - m_sRelativePath =TDEGlobal::dirs()->relativeLocation("xdgdata-apps", path); - if (m_sRelativePath.startsWith("/")) - m_sRelativePath = TQString::null; - else - m_sRelativePath = path; - } - } - if ( m_sRelativePath.isEmpty() ) - { - if (KBindingPropsPlugin::supports(properties->items())) - kdWarning(250) << "Warning : editing a mimetype file out of the mimetype dirs!" << endl; - } -} - -void KFilePropsPlugin::slotFoundMountPoint( const TQString&, - unsigned long kBSize, - unsigned long /*kBUsed*/, - unsigned long kBAvail ) -{ - d->m_freeSpaceLabel->setText( - // xgettext:no-c-format -- Don't warn about translating the %1 out of %2 part. - i18n("Available space out of total partition size (percent used)", "%1 out of %2 (%3% used)") - .arg(TDEIO::convertSizeFromKB(kBAvail)) - .arg(TDEIO::convertSizeFromKB(kBSize)) - .arg( 100 - (int)(100.0 * kBAvail / kBSize) )); -} - -// attention: copy&paste below, due to compiler bug -// it doesn't like those unsigned long parameters -- unsigned long& are ok :-/ -void KFilePropsPlugin::slotFoundMountPoint( const unsigned long& kBSize, - const unsigned long& /*kBUsed*/, - const unsigned long& kBAvail, - const TQString& ) -{ - d->m_freeSpaceLabel->setText( - // xgettext:no-c-format -- Don't warn about translating the %1 out of %2 part. - i18n("Available space out of total partition size (percent used)", "%1 out of %2 (%3% used)") - .arg(TDEIO::convertSizeFromKB(kBAvail)) - .arg(TDEIO::convertSizeFromKB(kBSize)) - .arg( 100 - (int)(100.0 * kBAvail / kBSize) )); -} - -void KFilePropsPlugin::slotDirSizeUpdate() -{ - TDEIO::filesize_t totalSize = d->dirSizeJob->totalSize(); - TDEIO::filesize_t totalFiles = d->dirSizeJob->totalFiles(); - TDEIO::filesize_t totalSubdirs = d->dirSizeJob->totalSubdirs(); - m_sizeLabel->setText( i18n("Calculating... %1 (%2)\n%3, %4") - .arg(TDEIO::convertSize(totalSize)) - .arg(TDEGlobal::locale()->formatNumber(totalSize, 0)) - .arg(i18n("1 file","%n files",totalFiles)) - .arg(i18n("1 sub-folder","%n sub-folders",totalSubdirs))); -} - -void KFilePropsPlugin::slotDirSizeFinished( TDEIO::Job * job ) -{ - if (job->error()) - m_sizeLabel->setText( job->errorString() ); - else - { - TDEIO::filesize_t totalSize = static_cast(job)->totalSize(); - TDEIO::filesize_t totalFiles = static_cast(job)->totalFiles(); - TDEIO::filesize_t totalSubdirs = static_cast(job)->totalSubdirs(); - m_sizeLabel->setText( TQString::fromLatin1("%1 (%2)\n%3, %4") - .arg(TDEIO::convertSize(totalSize)) - .arg(TDEGlobal::locale()->formatNumber(totalSize, 0)) - .arg(i18n("1 file","%n files",totalFiles)) - .arg(i18n("1 sub-folder","%n sub-folders",totalSubdirs))); - } - m_sizeStopButton->setEnabled(false); - // just in case you change something and try again :) - m_sizeDetermineButton->setText( i18n("Refresh") ); - m_sizeDetermineButton->setEnabled(true); - d->dirSizeJob = 0L; - delete d->dirSizeUpdateTimer; - d->dirSizeUpdateTimer = 0L; -} - -void KFilePropsPlugin::slotSizeDetermine() -{ - m_sizeLabel->setText( i18n("Calculating...") ); - kdDebug(250) << " KFilePropsPlugin::slotSizeDetermine() properties->item()=" << properties->item() << endl; - kdDebug(250) << " URL=" << properties->item()->url().url() << endl; - d->dirSizeJob = KDirSize::dirSizeJob( properties->items() ); - d->dirSizeUpdateTimer = new TQTimer(this); - connect( d->dirSizeUpdateTimer, TQT_SIGNAL( timeout() ), - TQT_SLOT( slotDirSizeUpdate() ) ); - d->dirSizeUpdateTimer->start(500); - connect( d->dirSizeJob, TQT_SIGNAL( result( TDEIO::Job * ) ), - TQT_SLOT( slotDirSizeFinished( TDEIO::Job * ) ) ); - m_sizeStopButton->setEnabled(true); - m_sizeDetermineButton->setEnabled(false); - - // also update the "Free disk space" display - if ( d->m_freeSpaceLabel ) - { - bool isLocal; - KFileItem * item = properties->item(); - KURL url = item->mostLocalURL( isLocal ); - TQString mountPoint = TDEIO::findPathMountPoint( url.path() ); - - KDiskFreeSp * job = new KDiskFreeSp; - connect( job, TQT_SIGNAL( foundMountPoint( const unsigned long&, const unsigned long&, - const unsigned long&, const TQString& ) ), - this, TQT_SLOT( slotFoundMountPoint( const unsigned long&, const unsigned long&, - const unsigned long&, const TQString& ) ) ); - job->readDF( mountPoint ); - } -} - -void KFilePropsPlugin::slotSizeStop() -{ - if ( d->dirSizeJob ) - { - m_sizeLabel->setText( i18n("Stopped") ); - d->dirSizeJob->kill(); - d->dirSizeJob = 0; - } - if ( d->dirSizeUpdateTimer ) - d->dirSizeUpdateTimer->stop(); - - m_sizeStopButton->setEnabled(false); - m_sizeDetermineButton->setEnabled(true); -} - -KFilePropsPlugin::~KFilePropsPlugin() -{ - delete d; -} - -bool KFilePropsPlugin::supports( KFileItemList /*_items*/ ) -{ - return true; -} - -// Don't do this at home -void tqt_enter_modal( TQWidget *widget ); -void tqt_leave_modal( TQWidget *widget ); - -void KFilePropsPlugin::applyChanges() -{ - if ( d->dirSizeJob ) - slotSizeStop(); - - kdDebug(250) << "KFilePropsPlugin::applyChanges" << endl; - - if (nameArea->inherits(TQLINEEDIT_OBJECT_NAME_STRING)) - { - TQString n = ((TQLineEdit *) nameArea)->text(); - // Remove trailing spaces (#4345) - while ( n[n.length()-1].isSpace() ) - n.truncate( n.length() - 1 ); - if ( n.isEmpty() ) - { - KMessageBox::sorry( properties, i18n("The new file name is empty.")); - properties->abortApplying(); - return; - } - - // Do we need to rename the file ? - kdDebug(250) << "oldname = " << oldName << endl; - kdDebug(250) << "newname = " << n << endl; - if ( oldName != n || m_bFromTemplate ) { // true for any from-template file - TDEIO::Job * job = 0L; - KURL oldurl = properties->kurl(); - - TQString newFileName = TDEIO::encodeFileName(n); - if (d->bDesktopFile && !newFileName.endsWith(".desktop") && !newFileName.endsWith(".kdelnk")) - newFileName += ".desktop"; - - // Tell properties. Warning, this changes the result of properties->kurl() ! - properties->rename( newFileName ); - - // Update also relative path (for apps and mimetypes) - if ( !m_sRelativePath.isEmpty() ) - determineRelativePath( properties->kurl().path() ); - - kdDebug(250) << "New URL = " << properties->kurl().url() << endl; - kdDebug(250) << "old = " << oldurl.url() << endl; - - // Don't remove the template !! - if ( !m_bFromTemplate ) // (normal renaming) - job = TDEIO::move( oldurl, properties->kurl() ); - else // Copying a template - job = TDEIO::copy( oldurl, properties->kurl() ); - - connect( job, TQT_SIGNAL( result( TDEIO::Job * ) ), - TQT_SLOT( slotCopyFinished( TDEIO::Job * ) ) ); - connect( job, TQT_SIGNAL( renamed( TDEIO::Job *, const KURL &, const KURL & ) ), - TQT_SLOT( slotFileRenamed( TDEIO::Job *, const KURL &, const KURL & ) ) ); - // wait for job - TQWidget dummy(0,0,(WFlags)(WType_Dialog|WShowModal)); - tqt_enter_modal(&dummy); - tqApp->enter_loop(); - tqt_leave_modal(&dummy); - return; - } - properties->updateUrl(properties->kurl()); - // Update also relative path (for apps and mimetypes) - if ( !m_sRelativePath.isEmpty() ) - determineRelativePath( properties->kurl().path() ); - } - - // No job, keep going - slotCopyFinished( 0L ); -} - -void KFilePropsPlugin::slotCopyFinished( TDEIO::Job * job ) -{ - kdDebug(250) << "KFilePropsPlugin::slotCopyFinished" << endl; - if (job) - { - // allow apply() to return - tqApp->exit_loop(); - if ( job->error() ) - { - job->showErrorDialog( d->m_frame ); - // Didn't work. Revert the URL to the old one - properties->updateUrl( static_cast(job)->srcURLs().first() ); - properties->abortApplying(); // Don't apply the changes to the wrong file ! - return; - } - } - - assert( properties->item() ); - assert( !properties->item()->url().isEmpty() ); - - // Save the file where we can -> usually in ~/.trinity/... - if (KBindingPropsPlugin::supports(properties->items()) && !m_sRelativePath.isEmpty()) - { - KURL newURL; - newURL.setPath( locateLocal("mime", m_sRelativePath) ); - properties->updateUrl( newURL ); - } - else if (d->bDesktopFile && !m_sRelativePath.isEmpty()) - { - kdDebug(250) << "KFilePropsPlugin::slotCopyFinished " << m_sRelativePath << endl; - KURL newURL; - newURL.setPath( KDesktopFile::locateLocal(m_sRelativePath) ); - kdDebug(250) << "KFilePropsPlugin::slotCopyFinished path=" << newURL.path() << endl; - properties->updateUrl( newURL ); - } - - if ( d->bKDesktopMode && d->bDesktopFile ) { - // Renamed? Update Name field - if ( d->oldFileName != properties->kurl().fileName() || m_bFromTemplate ) { - KDesktopFile config( properties->kurl().path() ); - TQString nameStr = nameFromFileName(properties->kurl().fileName()); - config.writeEntry( "Name", nameStr ); - config.writeEntry( "Name", nameStr, true, false, true ); - } - } -} - -void KFilePropsPlugin::applyIconChanges() -{ - KIconButton *iconButton = ::tqqt_cast( iconArea ); - if ( !iconButton || !d->bIconChanged ) - return; - // handle icon changes - only local files (or pseudo-local) for now - // TODO: Use KTempFile and TDEIO::file_copy with overwrite = true - KURL url = properties->kurl(); - url = TDEIO::NetAccess::mostLocalURL( url, properties ); - if (url.isLocalFile()) { - TQString path; - - if (S_ISDIR(properties->item()->mode())) - { - path = url.path(1) + TQString::fromLatin1(".directory"); - // don't call updateUrl because the other tabs (i.e. permissions) - // apply to the directory, not the .directory file. - } - else - path = url.path(); - - // Get the default image - TQString str = KMimeType::findByURL( url, - properties->item()->mode(), - true )->KServiceType::icon(); - // Is it another one than the default ? - TQString sIcon; - if ( str != iconButton->icon() ) - sIcon = iconButton->icon(); - // (otherwise write empty value) - - kdDebug(250) << "**" << path << "**" << endl; - TQFile f( path ); - - // If default icon and no .directory file -> don't create one - if ( !sIcon.isEmpty() || f.exists() ) - { - if ( !f.open( IO_ReadWrite ) ) { - KMessageBox::sorry( 0, i18n("Could not save properties. You do not " - "have sufficient access to write to %1.").arg(path)); - return; - } - f.close(); - - KDesktopFile cfg(path); - kdDebug(250) << "sIcon = " << (sIcon) << endl; - kdDebug(250) << "str = " << (str) << endl; - cfg.writeEntry( "Icon", sIcon ); - cfg.sync(); - } - } -} - -void KFilePropsPlugin::slotFileRenamed( TDEIO::Job *, const KURL &, const KURL & newUrl ) -{ - // This is called in case of an existing local file during the copy/move operation, - // if the user chooses Rename. - properties->updateUrl( newUrl ); -} - -void KFilePropsPlugin::postApplyChanges() -{ - // Save the icon only after applying the permissions changes (#46192) - applyIconChanges(); - - KURL::List lst; - KFileItemList items = properties->items(); - for ( KFileItemListIterator it( items ); it.current(); ++it ) - lst.append((*it)->url()); - KDirNotify_stub allDirNotify("*", "KDirNotify*"); - allDirNotify.FilesChanged( lst ); -} - -class KFilePermissionsPropsPlugin::KFilePermissionsPropsPluginPrivate -{ -public: - KFilePermissionsPropsPluginPrivate() - { - } - ~KFilePermissionsPropsPluginPrivate() - { - } - - TQFrame *m_frame; - TQCheckBox *cbRecursive; - TQLabel *explanationLabel; - TQComboBox *ownerPermCombo, *groupPermCombo, *othersPermCombo; - TQCheckBox *extraCheckbox; - mode_t partialPermissions; - KFilePermissionsPropsPlugin::PermissionsMode pmode; - bool canChangePermissions; - bool isIrregular; - bool hasExtendedACL; - KACL extendedACL; - KACL defaultACL; - bool fileSystemSupportsACLs; -}; - -#define UniOwner (S_IRUSR|S_IWUSR|S_IXUSR) -#define UniGroup (S_IRGRP|S_IWGRP|S_IXGRP) -#define UniOthers (S_IROTH|S_IWOTH|S_IXOTH) -#define UniRead (S_IRUSR|S_IRGRP|S_IROTH) -#define UniWrite (S_IWUSR|S_IWGRP|S_IWOTH) -#define UniExec (S_IXUSR|S_IXGRP|S_IXOTH) -#define UniSpecial (S_ISUID|S_ISGID|S_ISVTX) - -// synced with PermissionsTarget -const mode_t KFilePermissionsPropsPlugin::permissionsMasks[3] = {UniOwner, UniGroup, UniOthers}; -const mode_t KFilePermissionsPropsPlugin::standardPermissions[4] = { 0, UniRead, UniRead|UniWrite, (mode_t)-1 }; - -// synced with PermissionsMode and standardPermissions -const char *KFilePermissionsPropsPlugin::permissionsTexts[4][4] = { - { I18N_NOOP("Forbidden"), - I18N_NOOP("Can Read"), - I18N_NOOP("Can Read & Write"), - 0 }, - { I18N_NOOP("Forbidden"), - I18N_NOOP("Can View Content"), - I18N_NOOP("Can View & Modify Content"), - 0 }, - { 0, 0, 0, 0}, // no texts for links - { I18N_NOOP("Forbidden"), - I18N_NOOP("Can View Content & Read"), - I18N_NOOP("Can View/Read & Modify/Write"), - 0 } -}; - - -KFilePermissionsPropsPlugin::KFilePermissionsPropsPlugin( KPropertiesDialog *_props ) - : KPropsDlgPlugin( _props ) -{ - d = new KFilePermissionsPropsPluginPrivate; - d->cbRecursive = 0L; - grpCombo = 0L; grpEdit = 0; - usrEdit = 0L; - TQString path = properties->kurl().path(-1); - TQString fname = properties->kurl().fileName(); - bool isLocal = properties->kurl().isLocalFile(); - bool isTrash = ( properties->kurl().protocol().find("trash", 0, false)==0 ); - bool IamRoot = (geteuid() == 0); - - KFileItem * item = properties->item(); - bool isLink = item->isLink(); - bool isDir = item->isDir(); // all dirs - bool hasDir = item->isDir(); // at least one dir - permissions = item->permissions(); // common permissions to all files - d->partialPermissions = permissions; // permissions that only some files have (at first we take everything) - d->isIrregular = isIrregular(permissions, isDir, isLink); - strOwner = item->user(); - strGroup = item->group(); - d->hasExtendedACL = item->ACL().isExtended() || item->defaultACL().isValid(); - d->extendedACL = item->ACL(); - d->defaultACL = item->defaultACL(); - d->fileSystemSupportsACLs = false; - - if ( properties->items().count() > 1 ) - { - // Multiple items: see what they have in common - KFileItemList items = properties->items(); - KFileItemListIterator it( items ); - for ( ++it /*no need to check the first one again*/ ; it.current(); ++it ) - { - if (!d->isIrregular) - d->isIrregular |= isIrregular((*it)->permissions(), - (*it)->isDir() == isDir, - (*it)->isLink() == isLink); - d->hasExtendedACL = d->hasExtendedACL || (*it)->hasExtendedACL(); - if ( (*it)->isLink() != isLink ) - isLink = false; - if ( (*it)->isDir() != isDir ) - isDir = false; - hasDir |= (*it)->isDir(); - if ( (*it)->permissions() != permissions ) - { - permissions &= (*it)->permissions(); - d->partialPermissions |= (*it)->permissions(); - } - if ( (*it)->user() != strOwner ) - strOwner = TQString::null; - if ( (*it)->group() != strGroup ) - strGroup = TQString::null; - } - } - - if (isLink) - d->pmode = PermissionsOnlyLinks; - else if (isDir) - d->pmode = PermissionsOnlyDirs; - else if (hasDir) - d->pmode = PermissionsMixed; - else - d->pmode = PermissionsOnlyFiles; - - // keep only what's not in the common permissions - d->partialPermissions = d->partialPermissions & ~permissions; - - bool isMyFile = false; - - if (isLocal && !strOwner.isEmpty()) { // local files, and all owned by the same person - struct passwd *myself = getpwuid( geteuid() ); - if ( myself != 0L ) - { - isMyFile = (strOwner == TQString::fromLocal8Bit(myself->pw_name)); - } else - kdWarning() << "I don't exist ?! geteuid=" << geteuid() << endl; - } else { - //We don't know, for remote files, if they are ours or not. - //So we let the user change permissions, and - //TDEIO::chmod will tell, if he had no right to do it. - isMyFile = true; - } - - d->canChangePermissions = (isMyFile || IamRoot) && (!isLink); - - - // create GUI - - d->m_frame = properties->addPage(i18n("&Permissions")); - - TQBoxLayout *box = new TQVBoxLayout( d->m_frame, 0, KDialog::spacingHint() ); - - TQWidget *l; - TQLabel *lbl; - TQGroupBox *gb; - TQGridLayout *gl; - TQPushButton* pbAdvancedPerm = 0; - - /* Group: Access Permissions */ - gb = new TQGroupBox ( 0, Qt::Vertical, i18n("Access Permissions"), d->m_frame ); - gb->layout()->setSpacing(KDialog::spacingHint()); - gb->layout()->setMargin(KDialog::marginHint()); - box->addWidget (gb); - - gl = new TQGridLayout (gb->layout(), 7, 2); - gl->setColStretch(1, 1); - - l = d->explanationLabel = new TQLabel( "", gb ); - if (isLink) - d->explanationLabel->setText(i18n("This file is a link and does not have permissions.", - "All files are links and do not have permissions.", - properties->items().count())); - else if (!d->canChangePermissions) - d->explanationLabel->setText(i18n("Only the owner can change permissions.")); - gl->addMultiCellWidget(l, 0, 0, 0, 1); - - lbl = new TQLabel( i18n("O&wner:"), gb); - gl->addWidget(lbl, 1, 0); - l = d->ownerPermCombo = new TQComboBox(gb); - lbl->setBuddy(l); - gl->addWidget(l, 1, 1); - connect(l, TQT_SIGNAL( highlighted(int) ), this, TQT_SIGNAL( changed() )); - TQWhatsThis::add(l, i18n("Specifies the actions that the owner is allowed to do.")); - - lbl = new TQLabel( i18n("Gro&up:"), gb); - gl->addWidget(lbl, 2, 0); - l = d->groupPermCombo = new TQComboBox(gb); - lbl->setBuddy(l); - gl->addWidget(l, 2, 1); - connect(l, TQT_SIGNAL( highlighted(int) ), this, TQT_SIGNAL( changed() )); - TQWhatsThis::add(l, i18n("Specifies the actions that the members of the group are allowed to do.")); - - lbl = new TQLabel( i18n("O&thers:"), gb); - gl->addWidget(lbl, 3, 0); - l = d->othersPermCombo = new TQComboBox(gb); - lbl->setBuddy(l); - gl->addWidget(l, 3, 1); - connect(l, TQT_SIGNAL( highlighted(int) ), this, TQT_SIGNAL( changed() )); - TQWhatsThis::add(l, i18n("Specifies the actions that all users, who are neither " - "owner nor in the group, are allowed to do.")); - - if (!isLink) { - l = d->extraCheckbox = new TQCheckBox(hasDir ? - i18n("Only own&er can rename and delete folder content") : - i18n("Is &executable"), - gb ); - connect( d->extraCheckbox, TQT_SIGNAL( clicked() ), this, TQT_SIGNAL( changed() ) ); - gl->addWidget(l, 4, 1); - TQWhatsThis::add(l, hasDir ? i18n("Enable this option to allow only the folder's owner to " - "delete or rename the contained files and folders. Other " - "users can only add new files, which requires the 'Modify " - "Content' permission.") - : i18n("Enable this option to mark the file as executable. This only makes " - "sense for programs and scripts. It is required when you want to " - "execute them.")); - - TQLayoutItem *spacer = TQT_TQLAYOUTITEM(new TQSpacerItem(0, 20, TQSizePolicy::Minimum, TQSizePolicy::Expanding)); - gl->addMultiCell(spacer, 5, 5, 0, 1); - - pbAdvancedPerm = new TQPushButton(i18n("A&dvanced Permissions"), gb); - gl->addMultiCellWidget(pbAdvancedPerm, 6, 6, 0, 1, Qt::AlignRight); - connect(pbAdvancedPerm, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotShowAdvancedPermissions() )); - } - else - d->extraCheckbox = 0; - - - /**** Group: Ownership ****/ - gb = new TQGroupBox ( 0, Qt::Vertical, i18n("Ownership"), d->m_frame ); - gb->layout()->setSpacing(KDialog::spacingHint()); - gb->layout()->setMargin(KDialog::marginHint()); - box->addWidget (gb); - - gl = new TQGridLayout (gb->layout(), 4, 3); - gl->addRowSpacing(0, 10); - - /*** Set Owner ***/ - l = new TQLabel( i18n("User:"), gb ); - gl->addWidget (l, 1, 0); - - /* GJ: Don't autocomplete more than 1000 users. This is a kind of random - * value. Huge sites having 10.000+ user have a fair chance of using NIS, - * (possibly) making this unacceptably slow. - * OTOH, it is nice to offer this functionality for the standard user. - */ - int i, maxEntries = 1000; - struct passwd *user; - struct group *ge; - - /* File owner: For root, offer a KLineEdit with autocompletion. - * For a user, who can never chown() a file, offer a TQLabel. - */ - if (IamRoot && isLocal) - { - usrEdit = new KLineEdit( gb ); - KCompletion *kcom = usrEdit->completionObject(); - kcom->setOrder(KCompletion::Sorted); - setpwent(); - for (i=0; ((user = getpwent()) != 0L) && (i < maxEntries); i++) - kcom->addItem(TQString::fromLatin1(user->pw_name)); - endpwent(); - usrEdit->setCompletionMode((i < maxEntries) ? TDEGlobalSettings::CompletionAuto : - TDEGlobalSettings::CompletionNone); - usrEdit->setText(strOwner); - gl->addWidget(usrEdit, 1, 1); - connect( usrEdit, TQT_SIGNAL( textChanged( const TQString & ) ), - this, TQT_SIGNAL( changed() ) ); - } - else - { - l = new TQLabel(strOwner, gb); - gl->addWidget(l, 1, 1); - } - - /*** Set Group ***/ - - TQStringList groupList; - TQCString strUser; - user = getpwuid(geteuid()); - if (user != 0L) - strUser = user->pw_name; - -#ifdef Q_OS_UNIX - setgrent(); - for (i=0; ((ge = getgrent()) != 0L) && (i < maxEntries); i++) - { - if (IamRoot) - groupList += TQString::fromLatin1(ge->gr_name); - else - { - /* pick the groups to which the user belongs */ - char ** members = ge->gr_mem; - char * member; - while ((member = *members) != 0L) { - if (strUser == member) { - groupList += TQString::fromLocal8Bit(ge->gr_name); - break; - } - ++members; - } - } - } - endgrent(); -#endif //Q_OS_UNIX - - /* add the effective Group to the list .. */ - ge = getgrgid (getegid()); - if (ge) { - TQString name = TQString::fromLatin1(ge->gr_name); - if (name.isEmpty()) - name.setNum(ge->gr_gid); - if (groupList.find(name) == groupList.end()) - groupList += name; - } - - bool isMyGroup = groupList.contains(strGroup); - - /* add the group the file currently belongs to .. - * .. if its not there already - */ - if (!isMyGroup) - groupList += strGroup; - - l = new TQLabel( i18n("Group:"), gb ); - gl->addWidget (l, 2, 0); - - /* Set group: if possible to change: - * - Offer a KLineEdit for root, since he can change to any group. - * - Offer a TQComboBox for a normal user, since he can change to a fixed - * (small) set of groups only. - * If not changeable: offer a TQLabel. - */ - if (IamRoot && isLocal) - { - grpEdit = new KLineEdit(gb); - KCompletion *kcom = new KCompletion; - kcom->setItems(groupList); - grpEdit->setCompletionObject(kcom, true); - grpEdit->setAutoDeleteCompletionObject( true ); - grpEdit->setCompletionMode(TDEGlobalSettings::CompletionAuto); - grpEdit->setText(strGroup); - gl->addWidget(grpEdit, 2, 1); - connect( grpEdit, TQT_SIGNAL( textChanged( const TQString & ) ), - this, TQT_SIGNAL( changed() ) ); - } - else if ((groupList.count() > 1) && isMyFile && isLocal) - { - grpCombo = new TQComboBox(gb, "combogrouplist"); - grpCombo->insertStringList(groupList); - grpCombo->setCurrentItem(groupList.findIndex(strGroup)); - gl->addWidget(grpCombo, 2, 1); - connect( grpCombo, TQT_SIGNAL( activated( int ) ), - this, TQT_SIGNAL( changed() ) ); - } - else - { - l = new TQLabel(strGroup, gb); - gl->addWidget(l, 2, 1); - } - - gl->setColStretch(2, 10); - - // "Apply recursive" checkbox - if ( hasDir && !isLink && !isTrash ) - { - d->cbRecursive = new TQCheckBox( i18n("Apply changes to all subfolders and their contents"), d->m_frame ); - connect( d->cbRecursive, TQT_SIGNAL( clicked() ), this, TQT_SIGNAL( changed() ) ); - box->addWidget( d->cbRecursive ); - } - - updateAccessControls(); - - - if ( isTrash || !d->canChangePermissions ) - { - //don't allow to change properties for file into trash - enableAccessControls(false); - if ( pbAdvancedPerm && !d->hasExtendedACL ) - pbAdvancedPerm->setEnabled(false); - } - - box->addStretch (10); -} - -#ifdef USE_POSIX_ACL -static bool fileSystemSupportsACL( const TQCString& pathCString ) -{ - bool fileSystemSupportsACLs = false; -#ifdef Q_OS_FREEBSD - struct statfs buf; - fileSystemSupportsACLs = ( statfs( pathCString.data(), &buf ) == 0 ) && ( buf.f_flags & MNT_ACLS ); -#else - fileSystemSupportsACLs = - getxattr( pathCString.data(), "system.posix_acl_access", NULL, 0 ) >= 0 -#ifdef ENODATA - || (errno == ENODATA) -#endif -#ifdef ENOATTR - || (errno == ENOATTR) -#endif - ; -#endif - return fileSystemSupportsACLs; -} -#endif - - -void KFilePermissionsPropsPlugin::slotShowAdvancedPermissions() { - - bool isDir = (d->pmode == PermissionsOnlyDirs) || (d->pmode == PermissionsMixed); - KDialogBase dlg(properties, 0, true, i18n("Advanced Permissions"), - KDialogBase::Ok|KDialogBase::Cancel); - - TQLabel *l, *cl[3]; - TQGroupBox *gb; - TQGridLayout *gl; - - TQVBox *mainVBox = dlg.makeVBoxMainWidget(); - - // Group: Access Permissions - gb = new TQGroupBox ( 0, Qt::Vertical, i18n("Access Permissions"), mainVBox ); - gb->layout()->setSpacing(KDialog::spacingHint()); - gb->layout()->setMargin(KDialog::marginHint()); - - gl = new TQGridLayout (gb->layout(), 6, 6); - gl->addRowSpacing(0, 10); - - TQValueVector theNotSpecials; - - l = new TQLabel(i18n("Class"), gb ); - gl->addWidget(l, 1, 0); - theNotSpecials.append( l ); - - if (isDir) - l = new TQLabel( i18n("Show\nEntries"), gb ); - else - l = new TQLabel( i18n("Read"), gb ); - gl->addWidget (l, 1, 1); - theNotSpecials.append( l ); - TQString readWhatsThis; - if (isDir) - readWhatsThis = i18n("This flag allows viewing the content of the folder."); - else - readWhatsThis = i18n("The Read flag allows viewing the content of the file."); - TQWhatsThis::add(l, readWhatsThis); - - if (isDir) - l = new TQLabel( i18n("Write\nEntries"), gb ); - else - l = new TQLabel( i18n("Write"), gb ); - gl->addWidget (l, 1, 2); - theNotSpecials.append( l ); - TQString writeWhatsThis; - if (isDir) - writeWhatsThis = i18n("This flag allows adding, renaming and deleting of files. " - "Note that deleting and renaming can be limited using the Sticky flag."); - else - writeWhatsThis = i18n("The Write flag allows modifying the content of the file."); - TQWhatsThis::add(l, writeWhatsThis); - - TQString execWhatsThis; - if (isDir) { - l = new TQLabel( i18n("Enter folder", "Enter"), gb ); - execWhatsThis = i18n("Enable this flag to allow entering the folder."); - } - else { - l = new TQLabel( i18n("Exec"), gb ); - execWhatsThis = i18n("Enable this flag to allow executing the file as a program."); - } - TQWhatsThis::add(l, execWhatsThis); - theNotSpecials.append( l ); - // GJ: Add space between normal and special modes - TQSize size = l->sizeHint(); - size.setWidth(size.width() + 15); - l->setFixedSize(size); - gl->addWidget (l, 1, 3); - - l = new TQLabel( i18n("Special"), gb ); - gl->addMultiCellWidget(l, 1, 1, 4, 5); - TQString specialWhatsThis; - if (isDir) - specialWhatsThis = i18n("Special flag. Valid for the whole folder, the exact " - "meaning of the flag can be seen in the right hand column."); - else - specialWhatsThis = i18n("Special flag. The exact meaning of the flag can be seen " - "in the right hand column."); - TQWhatsThis::add(l, specialWhatsThis); - - cl[0] = new TQLabel( i18n("User"), gb ); - gl->addWidget (cl[0], 2, 0); - theNotSpecials.append( cl[0] ); - - cl[1] = new TQLabel( i18n("Group"), gb ); - gl->addWidget (cl[1], 3, 0); - theNotSpecials.append( cl[1] ); - - cl[2] = new TQLabel( i18n("Others"), gb ); - gl->addWidget (cl[2], 4, 0); - theNotSpecials.append( cl[2] ); - - l = new TQLabel(i18n("Set UID"), gb); - gl->addWidget(l, 2, 5); - TQString setUidWhatsThis; - if (isDir) - setUidWhatsThis = i18n("If this flag is set, the owner of this folder will be " - "the owner of all new files."); - else - setUidWhatsThis = i18n("If this file is an executable and the flag is set, it will " - "be executed with the permissions of the owner."); - TQWhatsThis::add(l, setUidWhatsThis); - - l = new TQLabel(i18n("Set GID"), gb); - gl->addWidget(l, 3, 5); - TQString setGidWhatsThis; - if (isDir) - setGidWhatsThis = i18n("If this flag is set, the group of this folder will be " - "set for all new files."); - else - setGidWhatsThis = i18n("If this file is an executable and the flag is set, it will " - "be executed with the permissions of the group."); - TQWhatsThis::add(l, setGidWhatsThis); - - l = new TQLabel(i18n("File permission", "Sticky"), gb); - gl->addWidget(l, 4, 5); - TQString stickyWhatsThis; - if (isDir) - stickyWhatsThis = i18n("If the Sticky flag is set on a folder, only the owner " - "and root can delete or rename files. Otherwise everybody " - "with write permissions can do this."); - else - stickyWhatsThis = i18n("The Sticky flag on a file is ignored on Linux, but may " - "be used on some systems"); - TQWhatsThis::add(l, stickyWhatsThis); - - mode_t aPermissions, aPartialPermissions; - mode_t dummy1, dummy2; - - if (!d->isIrregular) { - switch (d->pmode) { - case PermissionsOnlyFiles: - getPermissionMasks(aPartialPermissions, - dummy1, - aPermissions, - dummy2); - break; - case PermissionsOnlyDirs: - case PermissionsMixed: - getPermissionMasks(dummy1, - aPartialPermissions, - dummy2, - aPermissions); - break; - case PermissionsOnlyLinks: - aPermissions = UniRead | UniWrite | UniExec | UniSpecial; - aPartialPermissions = 0; - break; - } - } - else { - aPermissions = permissions; - aPartialPermissions = d->partialPermissions; - } - - // Draw Checkboxes - TQCheckBox *cba[3][4]; - for (int row = 0; row < 3 ; ++row) { - for (int col = 0; col < 4; ++col) { - TQCheckBox *cb = new TQCheckBox( gb ); - if ( col != 3 ) theNotSpecials.append( cb ); - cba[row][col] = cb; - cb->setChecked(aPermissions & fperm[row][col]); - if ( aPartialPermissions & fperm[row][col] ) - { - cb->setTristate(); - cb->setNoChange(); - } - else if (d->cbRecursive && d->cbRecursive->isChecked()) - cb->setTristate(); - - cb->setEnabled( d->canChangePermissions ); - gl->addWidget (cb, row+2, col+1); - switch(col) { - case 0: - TQWhatsThis::add(cb, readWhatsThis); - break; - case 1: - TQWhatsThis::add(cb, writeWhatsThis); - break; - case 2: - TQWhatsThis::add(cb, execWhatsThis); - break; - case 3: - switch(row) { - case 0: - TQWhatsThis::add(cb, setUidWhatsThis); - break; - case 1: - TQWhatsThis::add(cb, setGidWhatsThis); - break; - case 2: - TQWhatsThis::add(cb, stickyWhatsThis); - break; - } - break; - } - } - } - gl->setColStretch(6, 10); - -#ifdef USE_POSIX_ACL - KACLEditWidget *extendedACLs = 0; - - // FIXME make it work with partial entries - if ( properties->items().count() == 1 ) { - TQCString pathCString = TQFile::encodeName( properties->item()->url().path() ); - d->fileSystemSupportsACLs = fileSystemSupportsACL( pathCString ); - } - if ( d->fileSystemSupportsACLs ) { - std::for_each( theNotSpecials.begin(), theNotSpecials.end(), std::mem_fun( &TQWidget::hide ) ); - extendedACLs = new KACLEditWidget( mainVBox ); - if ( d->extendedACL.isValid() && d->extendedACL.isExtended() ) - extendedACLs->setACL( d->extendedACL ); - else - extendedACLs->setACL( KACL( aPermissions ) ); - - if ( d->defaultACL.isValid() ) - extendedACLs->setDefaultACL( d->defaultACL ); - - if ( properties->items().first()->isDir() ) - extendedACLs->setAllowDefaults( true ); - if ( !d->canChangePermissions ) - extendedACLs->setReadOnly( true ); - - } -#endif - if (dlg.exec() != KDialogBase::Accepted) - return; - - mode_t andPermissions = mode_t(~0); - mode_t orPermissions = 0; - for (int row = 0; row < 3; ++row) - for (int col = 0; col < 4; ++col) { - switch (cba[row][col]->state()) - { - case TQCheckBox::On: - orPermissions |= fperm[row][col]; - //fall through - case TQCheckBox::Off: - andPermissions &= ~fperm[row][col]; - break; - default: // NoChange - break; - } - } - - d->isIrregular = false; - KFileItemList items = properties->items(); - for (KFileItemListIterator it(items); it.current(); ++it) { - if (isIrregular(((*it)->permissions() & andPermissions) | orPermissions, - (*it)->isDir(), (*it)->isLink())) { - d->isIrregular = true; - break; - } - } - - permissions = orPermissions; - d->partialPermissions = andPermissions; - -#ifdef USE_POSIX_ACL - // override with the acls, if present - if ( extendedACLs ) { - d->extendedACL = extendedACLs->getACL(); - d->defaultACL = extendedACLs->getDefaultACL(); - d->hasExtendedACL = d->extendedACL.isExtended() || d->defaultACL.isValid(); - permissions = d->extendedACL.basePermissions(); - permissions |= ( andPermissions | orPermissions ) & ( S_ISUID|S_ISGID|S_ISVTX ); - } -#endif - - updateAccessControls(); - emit changed(); -} - -// TQString KFilePermissionsPropsPlugin::tabName () const -// { -// return i18n ("&Permissions"); -// } - -KFilePermissionsPropsPlugin::~KFilePermissionsPropsPlugin() -{ - delete d; -} - -bool KFilePermissionsPropsPlugin::supports( KFileItemList _items ) -{ - KFileItemList::const_iterator it = _items.constBegin(); - for ( ; it != _items.constEnd(); ++it ) { - KFileItem *item = *it; - if( !item->user().isEmpty() || !item->group().isEmpty() ) - return true; - } - return false; -} - -// sets a combo box in the Access Control frame -void KFilePermissionsPropsPlugin::setComboContent(TQComboBox *combo, PermissionsTarget target, - mode_t permissions, mode_t partial) { - combo->clear(); - if (d->pmode == PermissionsOnlyLinks) { - combo->insertItem(i18n("Link")); - combo->setCurrentItem(0); - return; - } - - mode_t tMask = permissionsMasks[target]; - int textIndex; - for (textIndex = 0; standardPermissions[textIndex] != (mode_t)-1; textIndex++) - if ((standardPermissions[textIndex]&tMask) == (permissions&tMask&(UniRead|UniWrite))) - break; - Q_ASSERT(standardPermissions[textIndex] != (mode_t)-1); // must not happen, would be irreglar - - for (int i = 0; permissionsTexts[(int)d->pmode][i]; i++) - combo->insertItem(i18n(permissionsTexts[(int)d->pmode][i])); - - if (partial & tMask & ~UniExec) { - combo->insertItem(i18n("Varying (No Change)")); - combo->setCurrentItem(3); - } - else - combo->setCurrentItem(textIndex); -} - -// permissions are irregular if they cant be displayed in a combo box. -bool KFilePermissionsPropsPlugin::isIrregular(mode_t permissions, bool isDir, bool isLink) { - if (isLink) // links are always ok - return false; - - mode_t p = permissions; - if (p & (S_ISUID | S_ISGID)) // setuid/setgid -> irregular - return true; - if (isDir) { - p &= ~S_ISVTX; // ignore sticky on dirs - - // check supported flag combinations - mode_t p0 = p & UniOwner; - if ((p0 != 0) && (p0 != (S_IRUSR | S_IXUSR)) && (p0 != UniOwner)) - return true; - p0 = p & UniGroup; - if ((p0 != 0) && (p0 != (S_IRGRP | S_IXGRP)) && (p0 != UniGroup)) - return true; - p0 = p & UniOthers; - if ((p0 != 0) && (p0 != (S_IROTH | S_IXOTH)) && (p0 != UniOthers)) - return true; - return false; - } - if (p & S_ISVTX) // sticky on file -> irregular - return true; - - // check supported flag combinations - mode_t p0 = p & UniOwner; - bool usrXPossible = !p0; // true if this file could be an executable - if (p0 & S_IXUSR) { - if ((p0 == S_IXUSR) || (p0 == (S_IWUSR | S_IXUSR))) - return true; - usrXPossible = true; - } - else if (p0 == S_IWUSR) - return true; - - p0 = p & UniGroup; - bool grpXPossible = !p0; // true if this file could be an executable - if (p0 & S_IXGRP) { - if ((p0 == S_IXGRP) || (p0 == (S_IWGRP | S_IXGRP))) - return true; - grpXPossible = true; - } - else if (p0 == S_IWGRP) - return true; - if (p0 == 0) - grpXPossible = true; - - p0 = p & UniOthers; - bool othXPossible = !p0; // true if this file could be an executable - if (p0 & S_IXOTH) { - if ((p0 == S_IXOTH) || (p0 == (S_IWOTH | S_IXOTH))) - return true; - othXPossible = true; - } - else if (p0 == S_IWOTH) - return true; - - // check that there either all targets are executable-compatible, or none - return (p & UniExec) && !(usrXPossible && grpXPossible && othXPossible); -} - -// enables/disabled the widgets in the Access Control frame -void KFilePermissionsPropsPlugin::enableAccessControls(bool enable) { - d->ownerPermCombo->setEnabled(enable); - d->groupPermCombo->setEnabled(enable); - d->othersPermCombo->setEnabled(enable); - if (d->extraCheckbox) - d->extraCheckbox->setEnabled(enable); - if ( d->cbRecursive ) - d->cbRecursive->setEnabled(enable); -} - -// updates all widgets in the Access Control frame -void KFilePermissionsPropsPlugin::updateAccessControls() { - setComboContent(d->ownerPermCombo, PermissionsOwner, - permissions, d->partialPermissions); - setComboContent(d->groupPermCombo, PermissionsGroup, - permissions, d->partialPermissions); - setComboContent(d->othersPermCombo, PermissionsOthers, - permissions, d->partialPermissions); - - switch(d->pmode) { - case PermissionsOnlyLinks: - enableAccessControls(false); - break; - case PermissionsOnlyFiles: - enableAccessControls(d->canChangePermissions && !d->isIrregular && !d->hasExtendedACL); - if (d->canChangePermissions) - d->explanationLabel->setText(d->isIrregular || d->hasExtendedACL ? - i18n("This file uses advanced permissions", - "These files use advanced permissions.", - properties->items().count()) : ""); - if (d->partialPermissions & UniExec) { - d->extraCheckbox->setTristate(); - d->extraCheckbox->setNoChange(); - } - else { - d->extraCheckbox->setTristate(false); - d->extraCheckbox->setChecked(permissions & UniExec); - } - break; - case PermissionsOnlyDirs: - enableAccessControls(d->canChangePermissions && !d->isIrregular && !d->hasExtendedACL); - // if this is a dir, and we can change permissions, don't dis-allow - // recursive, we can do that for ACL setting. - if ( d->cbRecursive ) - d->cbRecursive->setEnabled( d->canChangePermissions && !d->isIrregular ); - - if (d->canChangePermissions) - d->explanationLabel->setText(d->isIrregular || d->hasExtendedACL ? - i18n("This folder uses advanced permissions.", - "These folders use advanced permissions.", - properties->items().count()) : ""); - if (d->partialPermissions & S_ISVTX) { - d->extraCheckbox->setTristate(); - d->extraCheckbox->setNoChange(); - } - else { - d->extraCheckbox->setTristate(false); - d->extraCheckbox->setChecked(permissions & S_ISVTX); - } - break; - case PermissionsMixed: - enableAccessControls(d->canChangePermissions && !d->isIrregular && !d->hasExtendedACL); - if (d->canChangePermissions) - d->explanationLabel->setText(d->isIrregular || d->hasExtendedACL ? - i18n("These files use advanced permissions.") : ""); - break; - if (d->partialPermissions & S_ISVTX) { - d->extraCheckbox->setTristate(); - d->extraCheckbox->setNoChange(); - } - else { - d->extraCheckbox->setTristate(false); - d->extraCheckbox->setChecked(permissions & S_ISVTX); - } - break; - } -} - -// gets masks for files and dirs from the Access Control frame widgets -void KFilePermissionsPropsPlugin::getPermissionMasks(mode_t &andFilePermissions, - mode_t &andDirPermissions, - mode_t &orFilePermissions, - mode_t &orDirPermissions) { - andFilePermissions = mode_t(~UniSpecial); - andDirPermissions = mode_t(~(S_ISUID|S_ISGID)); - orFilePermissions = 0; - orDirPermissions = 0; - if (d->isIrregular) - return; - - mode_t m = standardPermissions[d->ownerPermCombo->currentItem()]; - if (m != (mode_t) -1) { - orFilePermissions |= m & UniOwner; - if ((m & UniOwner) && - ((d->pmode == PermissionsMixed) || - ((d->pmode == PermissionsOnlyFiles) && (d->extraCheckbox->state() == TQButton::NoChange)))) - andFilePermissions &= ~(S_IRUSR | S_IWUSR); - else { - andFilePermissions &= ~(S_IRUSR | S_IWUSR | S_IXUSR); - if ((m & S_IRUSR) && (d->extraCheckbox->state() == TQButton::On)) - orFilePermissions |= S_IXUSR; - } - - orDirPermissions |= m & UniOwner; - if (m & S_IRUSR) - orDirPermissions |= S_IXUSR; - andDirPermissions &= ~(S_IRUSR | S_IWUSR | S_IXUSR); - } - - m = standardPermissions[d->groupPermCombo->currentItem()]; - if (m != (mode_t) -1) { - orFilePermissions |= m & UniGroup; - if ((m & UniGroup) && - ((d->pmode == PermissionsMixed) || - ((d->pmode == PermissionsOnlyFiles) && (d->extraCheckbox->state() == TQButton::NoChange)))) - andFilePermissions &= ~(S_IRGRP | S_IWGRP); - else { - andFilePermissions &= ~(S_IRGRP | S_IWGRP | S_IXGRP); - if ((m & S_IRGRP) && (d->extraCheckbox->state() == TQButton::On)) - orFilePermissions |= S_IXGRP; - } - - orDirPermissions |= m & UniGroup; - if (m & S_IRGRP) - orDirPermissions |= S_IXGRP; - andDirPermissions &= ~(S_IRGRP | S_IWGRP | S_IXGRP); - } - - m = standardPermissions[d->othersPermCombo->currentItem()]; - if (m != (mode_t) -1) { - orFilePermissions |= m & UniOthers; - if ((m & UniOthers) && - ((d->pmode == PermissionsMixed) || - ((d->pmode == PermissionsOnlyFiles) && (d->extraCheckbox->state() == TQButton::NoChange)))) - andFilePermissions &= ~(S_IROTH | S_IWOTH); - else { - andFilePermissions &= ~(S_IROTH | S_IWOTH | S_IXOTH); - if ((m & S_IROTH) && (d->extraCheckbox->state() == TQButton::On)) - orFilePermissions |= S_IXOTH; - } - - orDirPermissions |= m & UniOthers; - if (m & S_IROTH) - orDirPermissions |= S_IXOTH; - andDirPermissions &= ~(S_IROTH | S_IWOTH | S_IXOTH); - } - - if (((d->pmode == PermissionsMixed) || (d->pmode == PermissionsOnlyDirs)) && - (d->extraCheckbox->state() != TQButton::NoChange)) { - andDirPermissions &= ~S_ISVTX; - if (d->extraCheckbox->state() == TQButton::On) - orDirPermissions |= S_ISVTX; - } -} - -void KFilePermissionsPropsPlugin::applyChanges() -{ - mode_t orFilePermissions; - mode_t orDirPermissions; - mode_t andFilePermissions; - mode_t andDirPermissions; - - if (!d->canChangePermissions) - return; - - if (!d->isIrregular) - getPermissionMasks(andFilePermissions, - andDirPermissions, - orFilePermissions, - orDirPermissions); - else { - orFilePermissions = permissions; - andFilePermissions = d->partialPermissions; - orDirPermissions = permissions; - andDirPermissions = d->partialPermissions; - } - - TQString owner, group; - if (usrEdit) - owner = usrEdit->text(); - if (grpEdit) - group = grpEdit->text(); - else if (grpCombo) - group = grpCombo->currentText(); - - if (owner == strOwner) - owner = TQString::null; // no change - - if (group == strGroup) - group = TQString::null; - - bool recursive = d->cbRecursive && d->cbRecursive->isChecked(); - bool permissionChange = false; - - KFileItemList files, dirs; - KFileItemList items = properties->items(); - for (KFileItemListIterator it(items); it.current(); ++it) { - if ((*it)->isDir()) { - dirs.append(*it); - if ((*it)->permissions() != (((*it)->permissions() & andDirPermissions) | orDirPermissions)) - permissionChange = true; - } - else if ((*it)->isFile()) { - files.append(*it); - if ((*it)->permissions() != (((*it)->permissions() & andFilePermissions) | orFilePermissions)) - permissionChange = true; - } - } - - const bool ACLChange = ( d->extendedACL != properties->item()->ACL() ); - const bool defaultACLChange = ( d->defaultACL != properties->item()->defaultACL() ); - - if ( owner.isEmpty() && group.isEmpty() && !recursive - && !permissionChange && !ACLChange && !defaultACLChange ) - return; - - TDEIO::Job * job; - if (files.count() > 0) { - job = TDEIO::chmod( files, orFilePermissions, ~andFilePermissions, - owner, group, false ); - if ( ACLChange && d->fileSystemSupportsACLs ) - job->addMetaData( "ACL_STRING", d->extendedACL.isValid()?d->extendedACL.asString():"ACL_DELETE" ); - if ( defaultACLChange && d->fileSystemSupportsACLs ) - job->addMetaData( "DEFAULT_ACL_STRING", d->defaultACL.isValid()?d->defaultACL.asString():"ACL_DELETE" ); - - connect( job, TQT_SIGNAL( result( TDEIO::Job * ) ), - TQT_SLOT( slotChmodResult( TDEIO::Job * ) ) ); - // Wait for job - TQWidget dummy(0,0,(WFlags)(WType_Dialog|WShowModal)); - tqt_enter_modal(&dummy); - tqApp->enter_loop(); - tqt_leave_modal(&dummy); - } - if (dirs.count() > 0) { - job = TDEIO::chmod( dirs, orDirPermissions, ~andDirPermissions, - owner, group, recursive ); - if ( ACLChange && d->fileSystemSupportsACLs ) - job->addMetaData( "ACL_STRING", d->extendedACL.isValid()?d->extendedACL.asString():"ACL_DELETE" ); - if ( defaultACLChange && d->fileSystemSupportsACLs ) - job->addMetaData( "DEFAULT_ACL_STRING", d->defaultACL.isValid()?d->defaultACL.asString():"ACL_DELETE" ); - - connect( job, TQT_SIGNAL( result( TDEIO::Job * ) ), - TQT_SLOT( slotChmodResult( TDEIO::Job * ) ) ); - // Wait for job - TQWidget dummy(0,0,(WFlags)(WType_Dialog|WShowModal)); - tqt_enter_modal(&dummy); - tqApp->enter_loop(); - tqt_leave_modal(&dummy); - } -} - -void KFilePermissionsPropsPlugin::slotChmodResult( TDEIO::Job * job ) -{ - kdDebug(250) << "KFilePermissionsPropsPlugin::slotChmodResult" << endl; - if (job->error()) - job->showErrorDialog( d->m_frame ); - // allow apply() to return - tqApp->exit_loop(); -} - - - - -class KURLPropsPlugin::KURLPropsPluginPrivate -{ -public: - KURLPropsPluginPrivate() - { - } - ~KURLPropsPluginPrivate() - { - } - - TQFrame *m_frame; -}; - -KURLPropsPlugin::KURLPropsPlugin( KPropertiesDialog *_props ) - : KPropsDlgPlugin( _props ) -{ - d = new KURLPropsPluginPrivate; - d->m_frame = properties->addPage(i18n("U&RL")); - TQVBoxLayout *layout = new TQVBoxLayout(d->m_frame, 0, KDialog::spacingHint()); - - TQLabel *l; - l = new TQLabel( d->m_frame, "Label_1" ); - l->setText( i18n("URL:") ); - layout->addWidget(l); - - URLEdit = new KURLRequester( d->m_frame, "URL Requester" ); - layout->addWidget(URLEdit); - - TQString path = properties->kurl().path(); - - TQFile f( path ); - if ( !f.open( IO_ReadOnly ) ) - return; - f.close(); - - KSimpleConfig config( path ); - config.setDesktopGroup(); - URLStr = config.readPathEntry( "URL" ); - - if ( !URLStr.isNull() ) - URLEdit->setURL( URLStr ); - - connect( URLEdit, TQT_SIGNAL( textChanged( const TQString & ) ), - this, TQT_SIGNAL( changed() ) ); - - layout->addStretch (1); -} - -KURLPropsPlugin::~KURLPropsPlugin() -{ - delete d; -} - -// TQString KURLPropsPlugin::tabName () const -// { -// return i18n ("U&RL"); -// } - -bool KURLPropsPlugin::supports( KFileItemList _items ) -{ - if ( _items.count() != 1 ) - return false; - KFileItem * item = _items.first(); - // check if desktop file - if ( !KPropsDlgPlugin::isDesktopFile( item ) ) - return false; - - // open file and check type - KDesktopFile config( item->url().path(), true /* readonly */ ); - return config.hasLinkType(); -} - -void KURLPropsPlugin::applyChanges() -{ - TQString path = properties->kurl().path(); - - TQFile f( path ); - if ( !f.open( IO_ReadWrite ) ) { - KMessageBox::sorry( 0, i18n("Could not save properties. You do not have " - "sufficient access to write to %1.").arg(path)); - return; - } - f.close(); - - KSimpleConfig config( path ); - config.setDesktopGroup(); - config.writeEntry( "Type", TQString::fromLatin1("Link")); - config.writePathEntry( "URL", URLEdit->url() ); - // Users can't create a Link .desktop file with a Name field, - // but distributions can. Update the Name field in that case. - if ( config.hasKey("Name") ) - { - TQString nameStr = nameFromFileName(properties->kurl().fileName()); - config.writeEntry( "Name", nameStr ); - config.writeEntry( "Name", nameStr, true, false, true ); - - } -} - - -/* ---------------------------------------------------- - * - * KBindingPropsPlugin - * - * -------------------------------------------------- */ - -class KBindingPropsPlugin::KBindingPropsPluginPrivate -{ -public: - KBindingPropsPluginPrivate() - { - } - ~KBindingPropsPluginPrivate() - { - } - - TQFrame *m_frame; -}; - -KBindingPropsPlugin::KBindingPropsPlugin( KPropertiesDialog *_props ) : KPropsDlgPlugin( _props ) -{ - d = new KBindingPropsPluginPrivate; - d->m_frame = properties->addPage(i18n("A&ssociation")); - patternEdit = new KLineEdit( d->m_frame, "LineEdit_1" ); - commentEdit = new KLineEdit( d->m_frame, "LineEdit_2" ); - mimeEdit = new KLineEdit( d->m_frame, "LineEdit_3" ); - - TQBoxLayout *mainlayout = new TQVBoxLayout(d->m_frame, 0, KDialog::spacingHint()); - TQLabel* tmpQLabel; - - tmpQLabel = new TQLabel( d->m_frame, "Label_1" ); - tmpQLabel->setText( i18n("Pattern ( example: *.html;*.htm )") ); - tmpQLabel->setMinimumSize(tmpQLabel->sizeHint()); - mainlayout->addWidget(tmpQLabel, 1); - - //patternEdit->setGeometry( 10, 40, 210, 30 ); - //patternEdit->setText( "" ); - patternEdit->setMaxLength( 512 ); - patternEdit->setMinimumSize( patternEdit->sizeHint() ); - patternEdit->setFixedHeight( fontHeight ); - mainlayout->addWidget(patternEdit, 1); - - tmpQLabel = new TQLabel( d->m_frame, "Label_2" ); - tmpQLabel->setText( i18n("Mime Type") ); - tmpQLabel->setMinimumSize(tmpQLabel->sizeHint()); - mainlayout->addWidget(tmpQLabel, 1); - - //mimeEdit->setGeometry( 10, 160, 210, 30 ); - mimeEdit->setMaxLength( 256 ); - mimeEdit->setMinimumSize( mimeEdit->sizeHint() ); - mimeEdit->setFixedHeight( fontHeight ); - mainlayout->addWidget(mimeEdit, 1); - - tmpQLabel = new TQLabel( d->m_frame, "Label_3" ); - tmpQLabel->setText( i18n("Comment") ); - tmpQLabel->setMinimumSize(tmpQLabel->sizeHint()); - mainlayout->addWidget(tmpQLabel, 1); - - //commentEdit->setGeometry( 10, 100, 210, 30 ); - commentEdit->setMaxLength( 256 ); - commentEdit->setMinimumSize( commentEdit->sizeHint() ); - commentEdit->setFixedHeight( fontHeight ); - mainlayout->addWidget(commentEdit, 1); - - cbAutoEmbed = new TQCheckBox( i18n("Left click previews"), d->m_frame, "cbAutoEmbed" ); - mainlayout->addWidget(cbAutoEmbed, 1); - - mainlayout->addStretch (10); - mainlayout->activate(); - - TQFile f( _props->kurl().path() ); - if ( !f.open( IO_ReadOnly ) ) - return; - f.close(); - - KSimpleConfig config( _props->kurl().path() ); - config.setDesktopGroup(); - TQString patternStr = config.readEntry( "Patterns" ); - TQString iconStr = config.readEntry( "Icon" ); - TQString commentStr = config.readEntry( "Comment" ); - m_sMimeStr = config.readEntry( "MimeType" ); - - if ( !patternStr.isEmpty() ) - patternEdit->setText( patternStr ); - if ( !commentStr.isEmpty() ) - commentEdit->setText( commentStr ); - if ( !m_sMimeStr.isEmpty() ) - mimeEdit->setText( m_sMimeStr ); - cbAutoEmbed->setTristate(); - if ( config.hasKey( "X-TDE-AutoEmbed" ) ) - cbAutoEmbed->setChecked( config.readBoolEntry( "X-TDE-AutoEmbed" ) ); - else - cbAutoEmbed->setNoChange(); - - connect( patternEdit, TQT_SIGNAL( textChanged( const TQString & ) ), - this, TQT_SIGNAL( changed() ) ); - connect( commentEdit, TQT_SIGNAL( textChanged( const TQString & ) ), - this, TQT_SIGNAL( changed() ) ); - connect( mimeEdit, TQT_SIGNAL( textChanged( const TQString & ) ), - this, TQT_SIGNAL( changed() ) ); - connect( cbAutoEmbed, TQT_SIGNAL( toggled( bool ) ), - this, TQT_SIGNAL( changed() ) ); -} - -KBindingPropsPlugin::~KBindingPropsPlugin() -{ - delete d; -} - -// TQString KBindingPropsPlugin::tabName () const -// { -// return i18n ("A&ssociation"); -// } - -bool KBindingPropsPlugin::supports( KFileItemList _items ) -{ - if ( _items.count() != 1 ) - return false; - KFileItem * item = _items.first(); - // check if desktop file - if ( !KPropsDlgPlugin::isDesktopFile( item ) ) - return false; - - // open file and check type - KDesktopFile config( item->url().path(), true /* readonly */ ); - return config.hasMimeTypeType(); -} - -void KBindingPropsPlugin::applyChanges() -{ - TQString path = properties->kurl().path(); - TQFile f( path ); - - if ( !f.open( IO_ReadWrite ) ) - { - KMessageBox::sorry( 0, i18n("Could not save properties. You do not have " - "sufficient access to write to %1.").arg(path)); - return; - } - f.close(); - - KSimpleConfig config( path ); - config.setDesktopGroup(); - config.writeEntry( "Type", TQString::fromLatin1("MimeType") ); - - config.writeEntry( "Patterns", patternEdit->text() ); - config.writeEntry( "Comment", commentEdit->text() ); - config.writeEntry( "Comment", - commentEdit->text(), true, false, true ); // for compat - config.writeEntry( "MimeType", mimeEdit->text() ); - if ( cbAutoEmbed->state() == TQButton::NoChange ) - config.deleteEntry( "X-TDE-AutoEmbed", false ); - else - config.writeEntry( "X-TDE-AutoEmbed", cbAutoEmbed->isChecked() ); - config.sync(); -} - -/* ---------------------------------------------------- - * - * KDevicePropsPlugin - * - * -------------------------------------------------- */ - -class KDevicePropsPlugin::KDevicePropsPluginPrivate -{ -public: - KDevicePropsPluginPrivate() - { - } - ~KDevicePropsPluginPrivate() - { - } - - TQFrame *m_frame; - TQStringList mountpointlist; - TQLabel *m_freeSpaceText; - TQLabel *m_freeSpaceLabel; - TQProgressBar *m_freeSpaceBar; -}; - -KDevicePropsPlugin::KDevicePropsPlugin( KPropertiesDialog *_props ) : KPropsDlgPlugin( _props ) -{ - d = new KDevicePropsPluginPrivate; - d->m_frame = properties->addPage(i18n("De&vice")); - - TQStringList devices; - KMountPoint::List mountPoints = KMountPoint::possibleMountPoints(); - - for(KMountPoint::List::ConstIterator it = mountPoints.begin(); - it != mountPoints.end(); ++it) - { - KMountPoint *mp = *it; - TQString mountPoint = mp->mountPoint(); - TQString device = mp->mountedFrom(); - kdDebug()<<"mountPoint :"<mountType() :"<mountType()<mountpointlist.append(mountPoint); - } - } - - TQGridLayout *layout = new TQGridLayout( d->m_frame, 0, 2, 0, - KDialog::spacingHint()); - layout->setColStretch(1, 1); - - TQLabel* label; - label = new TQLabel( d->m_frame ); - label->setText( devices.count() == 0 ? - i18n("Device (/dev/fd0):") : // old style - i18n("Device:") ); // new style (combobox) - layout->addWidget(label, 0, 0); - - device = new TQComboBox( true, d->m_frame, "ComboBox_device" ); - device->insertStringList( devices ); - layout->addWidget(device, 0, 1); - connect( device, TQT_SIGNAL( activated( int ) ), - this, TQT_SLOT( slotActivated( int ) ) ); - - readonly = new TQCheckBox( d->m_frame, "CheckBox_readonly" ); - readonly->setText( i18n("Read only") ); - layout->addWidget(readonly, 1, 1); - - label = new TQLabel( d->m_frame ); - label->setText( i18n("File system:") ); - layout->addWidget(label, 2, 0); - - TQLabel *fileSystem = new TQLabel( d->m_frame ); - layout->addWidget(fileSystem, 2, 1); - - label = new TQLabel( d->m_frame ); - label->setText( devices.count()==0 ? - i18n("Mount point (/mnt/floppy):") : // old style - i18n("Mount point:")); // new style (combobox) - layout->addWidget(label, 3, 0); - - mountpoint = new TQLabel( d->m_frame, "LineEdit_mountpoint" ); - - layout->addWidget(mountpoint, 3, 1); - - // show disk free - d->m_freeSpaceText = new TQLabel(i18n("Free disk space:"), d->m_frame ); - layout->addWidget(d->m_freeSpaceText, 4, 0); - - d->m_freeSpaceLabel = new TQLabel( d->m_frame ); - layout->addWidget( d->m_freeSpaceLabel, 4, 1 ); - - d->m_freeSpaceBar = new TQProgressBar( d->m_frame, "freeSpaceBar" ); - layout->addMultiCellWidget(d->m_freeSpaceBar, 5, 5, 0, 1); - - // we show it in the slot when we know the values - d->m_freeSpaceText->hide(); - d->m_freeSpaceLabel->hide(); - d->m_freeSpaceBar->hide(); - - KSeparator* sep = new KSeparator( KSeparator::HLine, d->m_frame); - layout->addMultiCellWidget(sep, 6, 6, 0, 1); - - unmounted = new KIconButton( d->m_frame ); - int bsize = 66 + 2 * unmounted->style().pixelMetric(TQStyle::PM_ButtonMargin); - unmounted->setFixedSize(bsize, bsize); - unmounted->setIconType(KIcon::Desktop, KIcon::Device); - layout->addWidget(unmounted, 7, 0); - - label = new TQLabel( i18n("Unmounted Icon"), d->m_frame ); - layout->addWidget(label, 7, 1); - - layout->setRowStretch(8, 1); - - TQString path( _props->kurl().path() ); - - TQFile f( path ); - if ( !f.open( IO_ReadOnly ) ) - return; - f.close(); - - KSimpleConfig config( path ); - config.setDesktopGroup(); - TQString deviceStr = config.readEntry( "Dev" ); - TQString mountPointStr = config.readEntry( "MountPoint" ); - bool ro = config.readBoolEntry( "ReadOnly", false ); - TQString unmountedStr = config.readEntry( "UnmountIcon" ); - - fileSystem->setText( i18n(config.readEntry("FSType").local8Bit()) ); - - device->setEditText( deviceStr ); - if ( !deviceStr.isEmpty() ) { - // Set default options for this device (first matching entry) - int index = m_devicelist.findIndex(deviceStr); - if (index != -1) - { - //kdDebug(250) << "found it " << index << endl; - slotActivated( index ); - } - } - - if ( !mountPointStr.isEmpty() ) - { - mountpoint->setText( mountPointStr ); - updateInfo(); - } - - readonly->setChecked( ro ); - - if ( unmountedStr.isEmpty() ) - unmountedStr = KMimeType::defaultMimeTypePtr()->KServiceType::icon(); // default icon - - unmounted->setIcon( unmountedStr ); - - connect( device, TQT_SIGNAL( activated( int ) ), - this, TQT_SIGNAL( changed() ) ); - connect( device, TQT_SIGNAL( textChanged( const TQString & ) ), - this, TQT_SIGNAL( changed() ) ); - connect( readonly, TQT_SIGNAL( toggled( bool ) ), - this, TQT_SIGNAL( changed() ) ); - connect( unmounted, TQT_SIGNAL( iconChanged( TQString ) ), - this, TQT_SIGNAL( changed() ) ); - - connect( device, TQT_SIGNAL( textChanged( const TQString & ) ), - this, TQT_SLOT( slotDeviceChanged() ) ); -} - -KDevicePropsPlugin::~KDevicePropsPlugin() -{ - delete d; -} - -// TQString KDevicePropsPlugin::tabName () const -// { -// return i18n ("De&vice"); -// } - -void KDevicePropsPlugin::updateInfo() -{ - // we show it in the slot when we know the values - d->m_freeSpaceText->hide(); - d->m_freeSpaceLabel->hide(); - d->m_freeSpaceBar->hide(); - - if ( !mountpoint->text().isEmpty() ) - { - KDiskFreeSp * job = new KDiskFreeSp; - connect( job, TQT_SIGNAL( foundMountPoint( const unsigned long&, const unsigned long&, - const unsigned long&, const TQString& ) ), - this, TQT_SLOT( slotFoundMountPoint( const unsigned long&, const unsigned long&, - const unsigned long&, const TQString& ) ) ); - - job->readDF( mountpoint->text() ); - } -} - -void KDevicePropsPlugin::slotActivated( int index ) -{ - // Update mountpoint so that it matches the device that was selected in the combo - device->setEditText( m_devicelist[index] ); - mountpoint->setText( d->mountpointlist[index] ); - - updateInfo(); -} - -void KDevicePropsPlugin::slotDeviceChanged() -{ - // Update mountpoint so that it matches the typed device - int index = m_devicelist.findIndex( device->currentText() ); - if ( index != -1 ) - mountpoint->setText( d->mountpointlist[index] ); - else - mountpoint->setText( TQString::null ); - - updateInfo(); -} - -void KDevicePropsPlugin::slotFoundMountPoint( const unsigned long& kBSize, - const unsigned long& /*kBUsed*/, - const unsigned long& kBAvail, - const TQString& ) -{ - d->m_freeSpaceText->show(); - d->m_freeSpaceLabel->show(); - - int percUsed = 100 - (int)(100.0 * kBAvail / kBSize); - - d->m_freeSpaceLabel->setText( - // xgettext:no-c-format -- Don't warn about translating the %1 out of %2 part. - i18n("Available space out of total partition size (percent used)", "%1 out of %2 (%3% used)") - .arg(TDEIO::convertSizeFromKB(kBAvail)) - .arg(TDEIO::convertSizeFromKB(kBSize)) - .arg( 100 - (int)(100.0 * kBAvail / kBSize) )); - - d->m_freeSpaceBar->setProgress(percUsed, 100); - d->m_freeSpaceBar->show(); -} - -bool KDevicePropsPlugin::supports( KFileItemList _items ) -{ - if ( _items.count() != 1 ) - return false; - KFileItem * item = _items.first(); - // check if desktop file - if ( !KPropsDlgPlugin::isDesktopFile( item ) ) - return false; - // open file and check type - KDesktopFile config( item->url().path(), true /* readonly */ ); - return config.hasDeviceType(); -} - -void KDevicePropsPlugin::applyChanges() -{ - TQString path = properties->kurl().path(); - TQFile f( path ); - if ( !f.open( IO_ReadWrite ) ) - { - KMessageBox::sorry( 0, i18n("Could not save properties. You do not have sufficient " - "access to write to %1.").arg(path)); - return; - } - f.close(); - - KSimpleConfig config( path ); - config.setDesktopGroup(); - config.writeEntry( "Type", TQString::fromLatin1("FSDevice") ); - - config.writeEntry( "Dev", device->currentText() ); - config.writeEntry( "MountPoint", mountpoint->text() ); - - config.writeEntry( "UnmountIcon", unmounted->icon() ); - kdDebug(250) << "unmounted->icon() = " << unmounted->icon() << endl; - - config.writeEntry( "ReadOnly", readonly->isChecked() ); - - config.sync(); -} - - -/* ---------------------------------------------------- - * - * KDesktopPropsPlugin - * - * -------------------------------------------------- */ - - -KDesktopPropsPlugin::KDesktopPropsPlugin( KPropertiesDialog *_props ) - : KPropsDlgPlugin( _props ) -{ - TQFrame *frame = properties->addPage(i18n("&Application")); - TQVBoxLayout *mainlayout = new TQVBoxLayout( frame, 0, KDialog::spacingHint() ); - - w = new KPropertiesDesktopBase(frame); - mainlayout->addWidget(w); - - bool bKDesktopMode = (TQCString(tqApp->name()) == "kdesktop"); // nasty heh? - - if (bKDesktopMode) - { - // Hide Name entry - w->nameEdit->hide(); - w->nameLabel->hide(); - } - - w->pathEdit->setMode(KFile::Directory | KFile::LocalOnly); - w->pathEdit->lineEdit()->setAcceptDrops(false); - - connect( w->nameEdit, TQT_SIGNAL( textChanged( const TQString & ) ), this, TQT_SIGNAL( changed() ) ); - connect( w->genNameEdit, TQT_SIGNAL( textChanged( const TQString & ) ), this, TQT_SIGNAL( changed() ) ); - connect( w->commentEdit, TQT_SIGNAL( textChanged( const TQString & ) ), this, TQT_SIGNAL( changed() ) ); - connect( w->commandEdit, TQT_SIGNAL( textChanged( const TQString & ) ), this, TQT_SIGNAL( changed() ) ); - connect( w->pathEdit, TQT_SIGNAL( textChanged( const TQString & ) ), this, TQT_SIGNAL( changed() ) ); - - connect( w->browseButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotBrowseExec() ) ); - connect( w->addFiletypeButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotAddFiletype() ) ); - connect( w->delFiletypeButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotDelFiletype() ) ); - connect( w->advancedButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotAdvanced() ) ); - - // now populate the page - TQString path = _props->kurl().path(); - TQFile f( path ); - if ( !f.open( IO_ReadOnly ) ) - return; - f.close(); - - KDesktopFile config( path ); - TQString nameStr = config.readName(); - TQString genNameStr = config.readGenericName(); - TQString commentStr = config.readComment(); - TQString commandStr = config.readPathEntry( "Exec" ); - if (commandStr.left(12) == "ksystraycmd ") - { - commandStr.remove(0, 12); - m_systrayBool = true; - } - else - m_systrayBool = false; - - m_origCommandStr = commandStr; - TQString pathStr = config.readPathEntry( "Path" ); - m_terminalBool = config.readBoolEntry( "Terminal" ); - m_terminalOptionStr = config.readEntry( "TerminalOptions" ); - m_suidBool = config.readBoolEntry( "X-TDE-SubstituteUID" ); - m_suidUserStr = config.readEntry( "X-TDE-Username" ); - if( config.hasKey( "StartupNotify" )) - m_startupBool = config.readBoolEntry( "StartupNotify", true ); - else - m_startupBool = config.readBoolEntry( "X-TDE-StartupNotify", true ); - m_dcopServiceType = config.readEntry("X-DCOP-ServiceType").lower(); - - TQStringList mimeTypes = config.readListEntry( "MimeType", ';' ); - - if ( nameStr.isEmpty() || bKDesktopMode ) { - // We'll use the file name if no name is specified - // because we _need_ a Name for a valid file. - // But let's do it in apply, not here, so that we pick up the right name. - setDirty(); - } - if ( !bKDesktopMode ) - w->nameEdit->setText(nameStr); - - w->genNameEdit->setText( genNameStr ); - w->commentEdit->setText( commentStr ); - w->commandEdit->setText( commandStr ); - w->pathEdit->lineEdit()->setText( pathStr ); - w->filetypeList->setAllColumnsShowFocus(true); - - KMimeType::Ptr defaultMimetype = KMimeType::defaultMimeTypePtr(); - for(TQStringList::ConstIterator it = mimeTypes.begin(); - it != mimeTypes.end(); ) - { - KMimeType::Ptr p = KMimeType::mimeType(*it); - ++it; - TQString preference; - if (it != mimeTypes.end()) - { - bool numeric; - (*it).toInt(&numeric); - if (numeric) - { - preference = *it; - ++it; - } - } - if (p && (p != defaultMimetype)) - { - new TQListViewItem(w->filetypeList, p->name(), p->comment(), preference); - } - } - -} - -KDesktopPropsPlugin::~KDesktopPropsPlugin() -{ -} - -void KDesktopPropsPlugin::slotSelectMimetype() -{ - TQListView *w = (TQListView*)sender(); - TQListViewItem *item = w->firstChild(); - while(item) - { - if (item->isSelected()) - w->setSelected(item, false); - item = item->nextSibling(); - } -} - -void KDesktopPropsPlugin::slotAddFiletype() -{ - KDialogBase dlg(w, "KPropertiesMimetypes", true, - i18n("Add File Type for %1").arg(properties->kurl().fileName()), - KDialogBase::Ok|KDialogBase::Cancel, KDialogBase::Ok); - - KGuiItem okItem(i18n("&Add"), TQString::null /* no icon */, - i18n("Add the selected file types to\nthe list of supported file types."), - i18n("Add the selected file types to\nthe list of supported file types.")); - dlg.setButtonOK(okItem); - - KPropertiesMimetypeBase *mw = new KPropertiesMimetypeBase(&dlg); - - dlg.setMainWidget(mw); - - { - mw->listView->setRootIsDecorated(true); - mw->listView->setSelectionMode(TQListView::Extended); - mw->listView->setAllColumnsShowFocus(true); - mw->listView->setFullWidth(true); - mw->listView->setMinimumSize(500,400); - - connect(mw->listView, TQT_SIGNAL(selectionChanged()), - this, TQT_SLOT(slotSelectMimetype())); - connect(mw->listView, TQT_SIGNAL(doubleClicked( TQListViewItem *, const TQPoint &, int )), - &dlg, TQT_SLOT( slotOk())); - - TQMap majorMap; - TQListViewItem *majorGroup; - KMimeType::List mimetypes = KMimeType::allMimeTypes(); - TQValueListIterator it(mimetypes.begin()); - for (; it != mimetypes.end(); ++it) { - TQString mimetype = (*it)->name(); - if (mimetype == KMimeType::defaultMimeType()) - continue; - int index = mimetype.find("/"); - TQString maj = mimetype.left(index); - TQString min = mimetype.mid(index+1); - - TQMapIterator mit = majorMap.find( maj ); - if ( mit == majorMap.end() ) { - majorGroup = new TQListViewItem( mw->listView, maj ); - majorGroup->setExpandable(true); - mw->listView->setOpen(majorGroup, true); - majorMap.insert( maj, majorGroup ); - } - else - { - majorGroup = mit.data(); - } - - TQListViewItem *item = new TQListViewItem(majorGroup, min, (*it)->comment()); - item->setPixmap(0, (*it)->pixmap(KIcon::Small, IconSize(KIcon::Small))); - } - TQMapIterator mit = majorMap.find( "all" ); - if ( mit != majorMap.end()) - { - mw->listView->setCurrentItem(mit.data()); - mw->listView->ensureItemVisible(mit.data()); - } - } - - if (dlg.exec() == KDialogBase::Accepted) - { - KMimeType::Ptr defaultMimetype = KMimeType::defaultMimeTypePtr(); - TQListViewItem *majorItem = mw->listView->firstChild(); - while(majorItem) - { - TQString major = majorItem->text(0); - - TQListViewItem *minorItem = majorItem->firstChild(); - while(minorItem) - { - if (minorItem->isSelected()) - { - TQString mimetype = major + "/" + minorItem->text(0); - KMimeType::Ptr p = KMimeType::mimeType(mimetype); - if (p && (p != defaultMimetype)) - { - mimetype = p->name(); - bool found = false; - TQListViewItem *item = w->filetypeList->firstChild(); - while (item) - { - if (mimetype == item->text(0)) - { - found = true; - break; - } - item = item->nextSibling(); - } - if (!found) { - new TQListViewItem(w->filetypeList, p->name(), p->comment()); - emit changed(); - } - } - } - minorItem = minorItem->nextSibling(); - } - - majorItem = majorItem->nextSibling(); - } - - } -} - -void KDesktopPropsPlugin::slotDelFiletype() -{ - delete w->filetypeList->currentItem(); - emit changed(); -} - -void KDesktopPropsPlugin::checkCommandChanged() -{ - if (KRun::binaryName(w->commandEdit->text(), true) != - KRun::binaryName(m_origCommandStr, true)) - { - TQString m_origCommandStr = w->commandEdit->text(); - m_dcopServiceType= TQString::null; // Reset - } -} - -void KDesktopPropsPlugin::applyChanges() -{ - kdDebug(250) << "KDesktopPropsPlugin::applyChanges" << endl; - TQString path = properties->kurl().path(); - - TQFile f( path ); - - if ( !f.open( IO_ReadWrite ) ) { - KMessageBox::sorry( 0, i18n("Could not save properties. You do not have " - "sufficient access to write to %1.").arg(path)); - return; - } - f.close(); - - // If the command is changed we reset certain settings that are strongly - // coupled to the command. - checkCommandChanged(); - - KSimpleConfig config( path ); - config.setDesktopGroup(); - config.writeEntry( "Type", TQString::fromLatin1("Application")); - config.writeEntry( "Comment", w->commentEdit->text() ); - config.writeEntry( "Comment", w->commentEdit->text(), true, false, true ); // for compat - config.writeEntry( "GenericName", w->genNameEdit->text() ); - config.writeEntry( "GenericName", w->genNameEdit->text(), true, false, true ); // for compat - - if (m_systrayBool) - config.writePathEntry( "Exec", w->commandEdit->text().prepend("ksystraycmd ") ); - else - config.writePathEntry( "Exec", w->commandEdit->text() ); - config.writePathEntry( "Path", w->pathEdit->lineEdit()->text() ); - - // Write mimeTypes - TQStringList mimeTypes; - for( TQListViewItem *item = w->filetypeList->firstChild(); - item; item = item->nextSibling() ) - { - TQString preference = item->text(2); - mimeTypes.append(item->text(0)); - if (!preference.isEmpty()) - mimeTypes.append(preference); - } - - config.writeEntry( "MimeType", mimeTypes, ';' ); - - if ( !w->nameEdit->isHidden() ) { - TQString nameStr = w->nameEdit->text(); - config.writeEntry( "Name", nameStr ); - config.writeEntry( "Name", nameStr, true, false, true ); - } - - config.writeEntry("Terminal", m_terminalBool); - config.writeEntry("TerminalOptions", m_terminalOptionStr); - config.writeEntry("X-TDE-SubstituteUID", m_suidBool); - config.writeEntry("X-TDE-Username", m_suidUserStr); - config.writeEntry("StartupNotify", m_startupBool); - config.writeEntry("X-DCOP-ServiceType", m_dcopServiceType); - config.sync(); - - // KSycoca update needed? - TQString sycocaPath = TDEGlobal::dirs()->relativeLocation("apps", path); - bool updateNeeded = !sycocaPath.startsWith("/"); - if (!updateNeeded) - { - sycocaPath = TDEGlobal::dirs()->relativeLocation("xdgdata-apps", path); - updateNeeded = !sycocaPath.startsWith("/"); - } - if (updateNeeded) - KService::rebuildKSycoca(w); -} - - -void KDesktopPropsPlugin::slotBrowseExec() -{ - KURL f = KFileDialog::getOpenURL( TQString::null, - TQString::null, w ); - if ( f.isEmpty() ) - return; - - if ( !f.isLocalFile()) { - KMessageBox::sorry(w, i18n("Only executables on local file systems are supported.")); - return; - } - - TQString path = f.path(); - KRun::shellQuote( path ); - w->commandEdit->setText( path ); -} - -void KDesktopPropsPlugin::slotAdvanced() -{ - KDialogBase dlg(w, "KPropertiesDesktopAdv", true, - i18n("Advanced Options for %1").arg(properties->kurl().fileName()), - KDialogBase::Ok|KDialogBase::Cancel, KDialogBase::Ok); - KPropertiesDesktopAdvBase *w = new KPropertiesDesktopAdvBase(&dlg); - - dlg.setMainWidget(w); - - // If the command is changed we reset certain settings that are strongly - // coupled to the command. - checkCommandChanged(); - - // check to see if we use konsole if not do not add the nocloseonexit - // because we don't know how to do this on other terminal applications - TDEConfigGroup confGroup( TDEGlobal::config(), TQString::fromLatin1("General") ); - TQString preferredTerminal = confGroup.readPathEntry("TerminalApplication", - TQString::fromLatin1("konsole")); - - bool terminalCloseBool = false; - - if (preferredTerminal == "konsole") - { - terminalCloseBool = (m_terminalOptionStr.contains( "--noclose" ) > 0); - w->terminalCloseCheck->setChecked(terminalCloseBool); - m_terminalOptionStr.replace( "--noclose", ""); - } - else - { - w->terminalCloseCheck->hide(); - } - - w->terminalCheck->setChecked(m_terminalBool); - w->terminalEdit->setText(m_terminalOptionStr); - w->terminalCloseCheck->setEnabled(m_terminalBool); - w->terminalEdit->setEnabled(m_terminalBool); - w->terminalEditLabel->setEnabled(m_terminalBool); - - w->suidCheck->setChecked(m_suidBool); - w->suidEdit->setText(m_suidUserStr); - w->suidEdit->setEnabled(m_suidBool); - w->suidEditLabel->setEnabled(m_suidBool); - - w->startupInfoCheck->setChecked(m_startupBool); - w->systrayCheck->setChecked(m_systrayBool); - - if (m_dcopServiceType == "unique") - w->dcopCombo->setCurrentItem(2); - else if (m_dcopServiceType == "multi") - w->dcopCombo->setCurrentItem(1); - else if (m_dcopServiceType == "wait") - w->dcopCombo->setCurrentItem(3); - else - w->dcopCombo->setCurrentItem(0); - - // Provide username completion up to 1000 users. - KCompletion *kcom = new KCompletion; - kcom->setOrder(KCompletion::Sorted); - struct passwd *pw; - int i, maxEntries = 1000; - setpwent(); - for (i=0; ((pw = getpwent()) != 0L) && (i < maxEntries); i++) - kcom->addItem(TQString::fromLatin1(pw->pw_name)); - endpwent(); - if (i < maxEntries) - { - w->suidEdit->setCompletionObject(kcom, true); - w->suidEdit->setAutoDeleteCompletionObject( true ); - w->suidEdit->setCompletionMode(TDEGlobalSettings::CompletionAuto); - } - else - { - delete kcom; - } - - connect( w->terminalEdit, TQT_SIGNAL( textChanged( const TQString & ) ), - this, TQT_SIGNAL( changed() ) ); - connect( w->terminalCloseCheck, TQT_SIGNAL( toggled( bool ) ), - this, TQT_SIGNAL( changed() ) ); - connect( w->terminalCheck, TQT_SIGNAL( toggled( bool ) ), - this, TQT_SIGNAL( changed() ) ); - connect( w->suidCheck, TQT_SIGNAL( toggled( bool ) ), - this, TQT_SIGNAL( changed() ) ); - connect( w->suidEdit, TQT_SIGNAL( textChanged( const TQString & ) ), - this, TQT_SIGNAL( changed() ) ); - connect( w->startupInfoCheck, TQT_SIGNAL( toggled( bool ) ), - this, TQT_SIGNAL( changed() ) ); - connect( w->systrayCheck, TQT_SIGNAL( toggled( bool ) ), - this, TQT_SIGNAL( changed() ) ); - connect( w->dcopCombo, TQT_SIGNAL( highlighted( int ) ), - this, TQT_SIGNAL( changed() ) ); - - if ( dlg.exec() == TQDialog::Accepted ) - { - m_terminalOptionStr = w->terminalEdit->text().stripWhiteSpace(); - m_terminalBool = w->terminalCheck->isChecked(); - m_suidBool = w->suidCheck->isChecked(); - m_suidUserStr = w->suidEdit->text().stripWhiteSpace(); - m_startupBool = w->startupInfoCheck->isChecked(); - m_systrayBool = w->systrayCheck->isChecked(); - - if (w->terminalCloseCheck->isChecked()) - { - m_terminalOptionStr.append(" --noclose"); - } - - switch(w->dcopCombo->currentItem()) - { - case 1: m_dcopServiceType = "multi"; break; - case 2: m_dcopServiceType = "unique"; break; - case 3: m_dcopServiceType = "wait"; break; - default: m_dcopServiceType = "none"; break; - } - } -} - -bool KDesktopPropsPlugin::supports( KFileItemList _items ) -{ - if ( _items.count() != 1 ) - return false; - KFileItem * item = _items.first(); - // check if desktop file - if ( !KPropsDlgPlugin::isDesktopFile( item ) ) - return false; - // open file and check type - KDesktopFile config( item->url().path(), true /* readonly */ ); - return config.hasApplicationType() && kapp->authorize("run_desktop_files") && kapp->authorize("shell_access"); -} - -void KPropertiesDialog::virtual_hook( int id, void* data ) -{ KDialogBase::virtual_hook( id, data ); } - -void KPropsDlgPlugin::virtual_hook( int, void* ) -{ /*BASE::virtual_hook( id, data );*/ } - - - - - -/** - * The following code is obsolete and only kept for binary compatibility - * To be removed in KDE 4 - */ - -class KExecPropsPlugin::KExecPropsPluginPrivate -{ -public: - KExecPropsPluginPrivate() - { - } - ~KExecPropsPluginPrivate() - { - } - - TQFrame *m_frame; - TQCheckBox *nocloseonexitCheck; -}; - -KExecPropsPlugin::KExecPropsPlugin( KPropertiesDialog *_props ) - : KPropsDlgPlugin( _props ) -{ - d = new KExecPropsPluginPrivate; - d->m_frame = properties->addPage(i18n("E&xecute")); - TQVBoxLayout * mainlayout = new TQVBoxLayout( d->m_frame, 0, - KDialog::spacingHint()); - - // Now the widgets in the top layout - - TQLabel* l; - l = new TQLabel( i18n( "Comman&d:" ), d->m_frame ); - mainlayout->addWidget(l); - - TQHBoxLayout * hlayout; - hlayout = new TQHBoxLayout(KDialog::spacingHint()); - mainlayout->addLayout(hlayout); - - execEdit = new KLineEdit( d->m_frame ); - TQWhatsThis::add(execEdit,i18n( - "Following the command, you can have several place holders which will be replaced " - "with the actual values when the actual program is run:\n" - "%f - a single file name\n" - "%F - a list of files; use for applications that can open several local files at once\n" - "%u - a single URL\n" - "%U - a list of URLs\n" - "%d - the folder of the file to open\n" - "%D - a list of folders\n" - "%i - the icon\n" - "%m - the mini-icon\n" - "%c - the caption")); - hlayout->addWidget(execEdit, 1); - - l->setBuddy( execEdit ); - - execBrowse = new TQPushButton( d->m_frame ); - execBrowse->setText( i18n("&Browse...") ); - hlayout->addWidget(execBrowse); - - // The groupbox about swallowing - TQGroupBox* tmpQGroupBox; - tmpQGroupBox = new TQGroupBox( i18n("Panel Embedding"), d->m_frame ); - tmpQGroupBox->setColumnLayout( 0, Qt::Horizontal ); - - mainlayout->addWidget(tmpQGroupBox); - - TQGridLayout *grid = new TQGridLayout(tmpQGroupBox->layout(), 2, 2); - grid->setSpacing( KDialog::spacingHint() ); - grid->setColStretch(1, 1); - - l = new TQLabel( i18n( "&Execute on click:" ), tmpQGroupBox ); - grid->addWidget(l, 0, 0); - - swallowExecEdit = new KLineEdit( tmpQGroupBox ); - grid->addWidget(swallowExecEdit, 0, 1); - - l->setBuddy( swallowExecEdit ); - - l = new TQLabel( i18n( "&Window title:" ), tmpQGroupBox ); - grid->addWidget(l, 1, 0); - - swallowTitleEdit = new KLineEdit( tmpQGroupBox ); - grid->addWidget(swallowTitleEdit, 1, 1); - - l->setBuddy( swallowTitleEdit ); - - // The groupbox about run in terminal - - tmpQGroupBox = new TQGroupBox( d->m_frame ); - tmpQGroupBox->setColumnLayout( 0, Qt::Horizontal ); - - mainlayout->addWidget(tmpQGroupBox); - - grid = new TQGridLayout(tmpQGroupBox->layout(), 3, 2); - grid->setSpacing( KDialog::spacingHint() ); - grid->setColStretch(1, 1); - - terminalCheck = new TQCheckBox( tmpQGroupBox ); - terminalCheck->setText( i18n("&Run in terminal") ); - grid->addMultiCellWidget(terminalCheck, 0, 0, 0, 1); - - // check to see if we use konsole if not do not add the nocloseonexit - // because we don't know how to do this on other terminal applications - TDEConfigGroup confGroup( TDEGlobal::config(), TQString::fromLatin1("General") ); - TQString preferredTerminal = confGroup.readPathEntry("TerminalApplication", - TQString::fromLatin1("konsole")); - - int posOptions = 1; - d->nocloseonexitCheck = 0L; - if (preferredTerminal == "konsole") - { - posOptions = 2; - d->nocloseonexitCheck = new TQCheckBox( tmpQGroupBox ); - d->nocloseonexitCheck->setText( i18n("Do not &close when command exits") ); - grid->addMultiCellWidget(d->nocloseonexitCheck, 1, 1, 0, 1); - } - - terminalLabel = new TQLabel( i18n( "&Terminal options:" ), tmpQGroupBox ); - grid->addWidget(terminalLabel, posOptions, 0); - - terminalEdit = new KLineEdit( tmpQGroupBox ); - grid->addWidget(terminalEdit, posOptions, 1); - - terminalLabel->setBuddy( terminalEdit ); - - // The groupbox about run with substituted uid. - - tmpQGroupBox = new TQGroupBox( d->m_frame ); - tmpQGroupBox->setColumnLayout( 0, Qt::Horizontal ); - - mainlayout->addWidget(tmpQGroupBox); - - grid = new TQGridLayout(tmpQGroupBox->layout(), 2, 2); - grid->setSpacing(KDialog::spacingHint()); - grid->setColStretch(1, 1); - - suidCheck = new TQCheckBox(tmpQGroupBox); - suidCheck->setText(i18n("Ru&n as a different user")); - grid->addMultiCellWidget(suidCheck, 0, 0, 0, 1); - - suidLabel = new TQLabel(i18n( "&Username:" ), tmpQGroupBox); - grid->addWidget(suidLabel, 1, 0); - - suidEdit = new KLineEdit(tmpQGroupBox); - grid->addWidget(suidEdit, 1, 1); - - suidLabel->setBuddy( suidEdit ); - - mainlayout->addStretch(1); - - // now populate the page - TQString path = _props->kurl().path(); - TQFile f( path ); - if ( !f.open( IO_ReadOnly ) ) - return; - f.close(); - - KSimpleConfig config( path ); - config.setDollarExpansion( false ); - config.setDesktopGroup(); - execStr = config.readPathEntry( "Exec" ); - swallowExecStr = config.readPathEntry( "SwallowExec" ); - swallowTitleStr = config.readEntry( "SwallowTitle" ); - termBool = config.readBoolEntry( "Terminal" ); - termOptionsStr = config.readEntry( "TerminalOptions" ); - suidBool = config.readBoolEntry( "X-TDE-SubstituteUID" ); - suidUserStr = config.readEntry( "X-TDE-Username" ); - - if ( !swallowExecStr.isNull() ) - swallowExecEdit->setText( swallowExecStr ); - if ( !swallowTitleStr.isNull() ) - swallowTitleEdit->setText( swallowTitleStr ); - - if ( !execStr.isNull() ) - execEdit->setText( execStr ); - - if ( d->nocloseonexitCheck ) - { - d->nocloseonexitCheck->setChecked( (termOptionsStr.contains( "--noclose" ) > 0) ); - termOptionsStr.replace( "--noclose", ""); - } - if ( !termOptionsStr.isNull() ) - terminalEdit->setText( termOptionsStr ); - - terminalCheck->setChecked( termBool ); - enableCheckedEdit(); - - suidCheck->setChecked( suidBool ); - suidEdit->setText( suidUserStr ); - enableSuidEdit(); - - // Provide username completion up to 1000 users. - KCompletion *kcom = new KCompletion; - kcom->setOrder(KCompletion::Sorted); - struct passwd *pw; - int i, maxEntries = 1000; - setpwent(); - for (i=0; ((pw = getpwent()) != 0L) && (i < maxEntries); i++) - kcom->addItem(TQString::fromLatin1(pw->pw_name)); - endpwent(); - if (i < maxEntries) - { - suidEdit->setCompletionObject(kcom, true); - suidEdit->setAutoDeleteCompletionObject( true ); - suidEdit->setCompletionMode(TDEGlobalSettings::CompletionAuto); - } - else - { - delete kcom; - } - - connect( swallowExecEdit, TQT_SIGNAL( textChanged( const TQString & ) ), - this, TQT_SIGNAL( changed() ) ); - connect( swallowTitleEdit, TQT_SIGNAL( textChanged( const TQString & ) ), - this, TQT_SIGNAL( changed() ) ); - connect( execEdit, TQT_SIGNAL( textChanged( const TQString & ) ), - this, TQT_SIGNAL( changed() ) ); - connect( terminalEdit, TQT_SIGNAL( textChanged( const TQString & ) ), - this, TQT_SIGNAL( changed() ) ); - if (d->nocloseonexitCheck) - connect( d->nocloseonexitCheck, TQT_SIGNAL( toggled( bool ) ), - this, TQT_SIGNAL( changed() ) ); - connect( terminalCheck, TQT_SIGNAL( toggled( bool ) ), - this, TQT_SIGNAL( changed() ) ); - connect( suidCheck, TQT_SIGNAL( toggled( bool ) ), - this, TQT_SIGNAL( changed() ) ); - connect( suidEdit, TQT_SIGNAL( textChanged( const TQString & ) ), - this, TQT_SIGNAL( changed() ) ); - - connect( execBrowse, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotBrowseExec() ) ); - connect( terminalCheck, TQT_SIGNAL( clicked() ), this, TQT_SLOT( enableCheckedEdit() ) ); - connect( suidCheck, TQT_SIGNAL( clicked() ), this, TQT_SLOT( enableSuidEdit() ) ); - -} - -KExecPropsPlugin::~KExecPropsPlugin() -{ - delete d; -} - -void KExecPropsPlugin::enableCheckedEdit() -{ - bool checked = terminalCheck->isChecked(); - terminalLabel->setEnabled( checked ); - if (d->nocloseonexitCheck) - d->nocloseonexitCheck->setEnabled( checked ); - terminalEdit->setEnabled( checked ); -} - -void KExecPropsPlugin::enableSuidEdit() -{ - bool checked = suidCheck->isChecked(); - suidLabel->setEnabled( checked ); - suidEdit->setEnabled( checked ); -} - -bool KExecPropsPlugin::supports( KFileItemList _items ) -{ - if ( _items.count() != 1 ) - return false; - KFileItem * item = _items.first(); - // check if desktop file - if ( !KPropsDlgPlugin::isDesktopFile( item ) ) - return false; - // open file and check type - KDesktopFile config( item->url().path(), true /* readonly */ ); - return config.hasApplicationType() && kapp->authorize("run_desktop_files") && kapp->authorize("shell_access"); -} - -void KExecPropsPlugin::applyChanges() -{ - kdDebug(250) << "KExecPropsPlugin::applyChanges" << endl; - TQString path = properties->kurl().path(); - - TQFile f( path ); - - if ( !f.open( IO_ReadWrite ) ) { - KMessageBox::sorry( 0, i18n("Could not save properties. You do not have " - "sufficient access to write to %1.").arg(path)); - return; - } - f.close(); - - KSimpleConfig config( path ); - config.setDesktopGroup(); - config.writeEntry( "Type", TQString::fromLatin1("Application")); - config.writePathEntry( "Exec", execEdit->text() ); - config.writePathEntry( "SwallowExec", swallowExecEdit->text() ); - config.writeEntry( "SwallowTitle", swallowTitleEdit->text() ); - config.writeEntry( "Terminal", terminalCheck->isChecked() ); - TQString temp = terminalEdit->text(); - if (d->nocloseonexitCheck ) - if ( d->nocloseonexitCheck->isChecked() ) - temp += TQString::fromLatin1("--noclose "); - temp = temp.stripWhiteSpace(); - config.writeEntry( "TerminalOptions", temp ); - config.writeEntry( "X-TDE-SubstituteUID", suidCheck->isChecked() ); - config.writeEntry( "X-TDE-Username", suidEdit->text() ); -} - - -void KExecPropsPlugin::slotBrowseExec() -{ - KURL f = KFileDialog::getOpenURL( TQString::null, - TQString::null, d->m_frame ); - if ( f.isEmpty() ) - return; - - if ( !f.isLocalFile()) { - KMessageBox::sorry(d->m_frame, i18n("Only executables on local file systems are supported.")); - return; - } - - TQString path = f.path(); - KRun::shellQuote( path ); - execEdit->setText( path ); -} - -class TDEApplicationPropsPlugin::TDEApplicationPropsPluginPrivate -{ -public: - TDEApplicationPropsPluginPrivate() - { - m_kdesktopMode = TQCString(tqApp->name()) == "kdesktop"; // nasty heh? - } - ~TDEApplicationPropsPluginPrivate() - { - } - - TQFrame *m_frame; - bool m_kdesktopMode; -}; - -TDEApplicationPropsPlugin::TDEApplicationPropsPlugin( KPropertiesDialog *_props ) - : KPropsDlgPlugin( _props ) -{ - d = new TDEApplicationPropsPluginPrivate; - d->m_frame = properties->addPage(i18n("&Application")); - TQVBoxLayout *toplayout = new TQVBoxLayout( d->m_frame, 0, KDialog::spacingHint()); - - TQIconSet iconSet; - TQPixmap pixMap; - - addExtensionButton = new TQPushButton( TQString::null, d->m_frame ); - iconSet = SmallIconSet( "back" ); - addExtensionButton->setIconSet( iconSet ); - pixMap = iconSet.pixmap( TQIconSet::Small, TQIconSet::Normal ); - addExtensionButton->setFixedSize( pixMap.width()+8, pixMap.height()+8 ); - connect( addExtensionButton, TQT_SIGNAL( clicked() ), - TQT_SLOT( slotAddExtension() ) ); - - delExtensionButton = new TQPushButton( TQString::null, d->m_frame ); - iconSet = SmallIconSet( "forward" ); - delExtensionButton->setIconSet( iconSet ); - delExtensionButton->setFixedSize( pixMap.width()+8, pixMap.height()+8 ); - connect( delExtensionButton, TQT_SIGNAL( clicked() ), - TQT_SLOT( slotDelExtension() ) ); - - TQLabel *l; - - TQGridLayout *grid = new TQGridLayout(2, 2); - grid->setColStretch(1, 1); - toplayout->addLayout(TQT_TQLAYOUT(grid)); - - if ( d->m_kdesktopMode ) - { - // in kdesktop the name field comes from the first tab - nameEdit = 0L; - } - else - { - l = new TQLabel(i18n("Name:"), d->m_frame, "Label_4" ); - grid->addWidget(l, 0, 0); - - nameEdit = new KLineEdit( d->m_frame, "LineEdit_3" ); - grid->addWidget(nameEdit, 0, 1); - } - - l = new TQLabel(i18n("Description:"), d->m_frame, "Label_5" ); - grid->addWidget(l, 1, 0); - - genNameEdit = new KLineEdit( d->m_frame, "LineEdit_4" ); - grid->addWidget(genNameEdit, 1, 1); - - l = new TQLabel(i18n("Comment:"), d->m_frame, "Label_3" ); - grid->addWidget(l, 2, 0); - - commentEdit = new KLineEdit( d->m_frame, "LineEdit_2" ); - grid->addWidget(commentEdit, 2, 1); - - l = new TQLabel(i18n("File types:"), d->m_frame); - toplayout->addWidget(l, 0, AlignLeft); - - grid = new TQGridLayout(4, 3); - grid->setColStretch(0, 1); - grid->setColStretch(2, 1); - grid->setRowStretch( 0, 1 ); - grid->setRowStretch( 3, 1 ); - toplayout->addLayout(TQT_TQLAYOUT(grid), 2); - - extensionsList = new TQListBox( d->m_frame ); - extensionsList->setSelectionMode( TQListBox::Extended ); - grid->addMultiCellWidget(extensionsList, 0, 3, 0, 0); - - grid->addWidget(addExtensionButton, 1, 1); - grid->addWidget(delExtensionButton, 2, 1); - - availableExtensionsList = new TQListBox( d->m_frame ); - availableExtensionsList->setSelectionMode( TQListBox::Extended ); - grid->addMultiCellWidget(availableExtensionsList, 0, 3, 2, 2); - - TQString path = properties->kurl().path() ; - TQFile f( path ); - if ( !f.open( IO_ReadOnly ) ) - return; - f.close(); - - KDesktopFile config( path ); - TQString commentStr = config.readComment(); - TQString genNameStr = config.readGenericName(); - - TQStringList selectedTypes = config.readListEntry( "ServiceTypes" ); - // For compatibility with KDE 1.x - selectedTypes += config.readListEntry( "MimeType", ';' ); - - TQString nameStr = config.readName(); - if ( nameStr.isEmpty() || d->m_kdesktopMode ) { - // We'll use the file name if no name is specified - // because we _need_ a Name for a valid file. - // But let's do it in apply, not here, so that we pick up the right name. - setDirty(); - } - - commentEdit->setText( commentStr ); - genNameEdit->setText( genNameStr ); - if ( nameEdit ) - nameEdit->setText( nameStr ); - - selectedTypes.sort(); - TQStringList::Iterator sit = selectedTypes.begin(); - for( ; sit != selectedTypes.end(); ++sit ) { - if ( !((*sit).isEmpty()) ) - extensionsList->insertItem( *sit ); - } - - KMimeType::List mimeTypes = KMimeType::allMimeTypes(); - TQValueListIterator it2 = mimeTypes.begin(); - for ( ; it2 != mimeTypes.end(); ++it2 ) - addMimeType ( (*it2)->name() ); - - updateButton(); - - connect( extensionsList, TQT_SIGNAL( highlighted( int ) ), - this, TQT_SLOT( updateButton() ) ); - connect( availableExtensionsList, TQT_SIGNAL( highlighted( int ) ), - this, TQT_SLOT( updateButton() ) ); - - connect( addExtensionButton, TQT_SIGNAL( clicked() ), - this, TQT_SIGNAL( changed() ) ); - connect( delExtensionButton, TQT_SIGNAL( clicked() ), - this, TQT_SIGNAL( changed() ) ); - if ( nameEdit ) - connect( nameEdit, TQT_SIGNAL( textChanged( const TQString & ) ), - this, TQT_SIGNAL( changed() ) ); - connect( commentEdit, TQT_SIGNAL( textChanged( const TQString & ) ), - this, TQT_SIGNAL( changed() ) ); - connect( genNameEdit, TQT_SIGNAL( textChanged( const TQString & ) ), - this, TQT_SIGNAL( changed() ) ); - connect( availableExtensionsList, TQT_SIGNAL( selected( int ) ), - this, TQT_SIGNAL( changed() ) ); - connect( extensionsList, TQT_SIGNAL( selected( int ) ), - this, TQT_SIGNAL( changed() ) ); -} - -TDEApplicationPropsPlugin::~TDEApplicationPropsPlugin() -{ - delete d; -} - -// TQString TDEApplicationPropsPlugin::tabName () const -// { -// return i18n ("&Application"); -// } - -void TDEApplicationPropsPlugin::updateButton() -{ - addExtensionButton->setEnabled(availableExtensionsList->currentItem()>-1); - delExtensionButton->setEnabled(extensionsList->currentItem()>-1); -} - -void TDEApplicationPropsPlugin::addMimeType( const TQString & name ) -{ - // Add a mimetype to the list of available mime types if not in the extensionsList - - bool insert = true; - - for ( uint i = 0; i < extensionsList->count(); i++ ) - if ( extensionsList->text( i ) == name ) - insert = false; - - if ( insert ) - { - availableExtensionsList->insertItem( name ); - availableExtensionsList->sort(); - } -} - -bool TDEApplicationPropsPlugin::supports( KFileItemList _items ) -{ - // same constraints as KExecPropsPlugin : desktop file with Type = Application - return KExecPropsPlugin::supports( _items ); -} - -void TDEApplicationPropsPlugin::applyChanges() -{ - TQString path = properties->kurl().path(); - - TQFile f( path ); - - if ( !f.open( IO_ReadWrite ) ) { - KMessageBox::sorry( 0, i18n("Could not save properties. You do not " - "have sufficient access to write to %1.").arg(path)); - return; - } - f.close(); - - KSimpleConfig config( path ); - config.setDesktopGroup(); - config.writeEntry( "Type", TQString::fromLatin1("Application")); - config.writeEntry( "Comment", commentEdit->text() ); - config.writeEntry( "Comment", commentEdit->text(), true, false, true ); // for compat - config.writeEntry( "GenericName", genNameEdit->text() ); - config.writeEntry( "GenericName", genNameEdit->text(), true, false, true ); // for compat - - TQStringList selectedTypes; - for ( uint i = 0; i < extensionsList->count(); i++ ) - selectedTypes.append( extensionsList->text( i ) ); - - config.writeEntry( "MimeType", selectedTypes, ';' ); - config.writeEntry( "ServiceTypes", "" ); - // hmm, actually it should probably be the contrary (but see also typeslistitem.cpp) - - TQString nameStr = nameEdit ? nameEdit->text() : TQString::null; - if ( nameStr.isEmpty() ) // nothing entered, or widget not existing at all (kdesktop mode) - nameStr = nameFromFileName(properties->kurl().fileName()); - - config.writeEntry( "Name", nameStr ); - config.writeEntry( "Name", nameStr, true, false, true ); - - config.sync(); -} - -void TDEApplicationPropsPlugin::slotAddExtension() -{ - TQListBoxItem *item = availableExtensionsList->firstItem(); - TQListBoxItem *nextItem; - - while ( item ) - { - nextItem = item->next(); - - if ( item->isSelected() ) - { - extensionsList->insertItem( item->text() ); - availableExtensionsList->removeItem( availableExtensionsList->index( item ) ); - } - - item = nextItem; - } - - extensionsList->sort(); - updateButton(); -} - -void TDEApplicationPropsPlugin::slotDelExtension() -{ - TQListBoxItem *item = extensionsList->firstItem(); - TQListBoxItem *nextItem; - - while ( item ) - { - nextItem = item->next(); - - if ( item->isSelected() ) - { - availableExtensionsList->insertItem( item->text() ); - extensionsList->removeItem( extensionsList->index( item ) ); - } - - item = nextItem; - } - - availableExtensionsList->sort(); - updateButton(); -} - - - -#include "kpropertiesdialog.moc" diff --git a/kio/kfile/kpropertiesdialog.h b/kio/kfile/kpropertiesdialog.h deleted file mode 100644 index 3f6d48c6a..000000000 --- a/kio/kfile/kpropertiesdialog.h +++ /dev/null @@ -1,918 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 1998, 1999 Torben Weis - Copyright (c) 1999, 2000 Preston Brown - Copyright (c) 2000 Simon Hausmann - Copyright (c) 2000 David Faure - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -/* - * This file holds the definitions for all classes used to - * display a properties dialog. - */ - -#ifndef __propsdlg_h -#define __propsdlg_h - -#include -#include - -#include -#include -#include -#include - -class TQLineEdit; -class TQCheckBox; -class TQPushButton; -class KLineEdit; -class KURLRequester; -class TQButton; -class KIconButton; -class KPropsDlgPlugin; -class TQComboBox; - -#define KPropsPage KPropsDlgPlugin - -namespace TDEIO { class Job; } - -/** - * The main properties dialog class. - * A Properties Dialog is a dialog which displays various information - * about a particular file or URL, or several files or URLs. - * This main class holds various related classes, which are instantiated in - * the form of tab entries in the tabbed dialog that this class provides. - * The various tabs themselves will let the user view, and sometimes change, - * information about the file or URL. - * - * \image html kpropertiesdialog.png "Typical KProperties Dialog" - * - * This class must be created with (void)new KPropertiesDialog(...) - * It will take care of deleting itself. - * - * If you are looking for more flexibility, see KFileMetaInfo and - * KFileMetaInfoWidget. - */ -class TDEIO_EXPORT KPropertiesDialog : public KDialogBase -{ - Q_OBJECT - -public: - - /** - * Determine whether there are any property pages available for the - * given file items. - * @param _items the list of items to check. - * @return true if there are any property pages, otherwise false. - */ - static bool canDisplay( KFileItemList _items ); - - /** - * Brings up a Properties dialog, as shown above. - * This is the normal constructor for - * file-manager type applications, where you have a KFileItem instance - * to work with. Normally you will use this - * method rather than the one below. - * - * @param item file item whose properties should be displayed. - * @param parent is the parent of the dialog widget. - * @param name is the internal name. - * @param modal tells the dialog whether it should be modal. - * @param autoShow tells the dialog whether it should show itself automatically. - */ - KPropertiesDialog( KFileItem * item, - TQWidget* parent = 0L, const char* name = 0L, - bool modal = false, bool autoShow = true); - - /** - * \overload - * - * You use this constructor for cases where you have a number of items, - * rather than a single item. Be careful which methods you use - * when passing a list of files or URLs, since some of them will only - * work on the first item in a list. - * - * @param _items list of file items whose properties should be displayed. - * @param parent is the parent of the dialog widget. - * @param name is the internal name. - * @param modal tells the dialog whether it should be modal. - * @param autoShow tells the dialog whether it should show itself automatically. - */ - KPropertiesDialog( KFileItemList _items, - TQWidget *parent = 0L, const char* name = 0L, - bool modal = false, bool autoShow = true); - -#ifndef KDE_NO_COMPAT - /** - * @deprecated You should use the following constructor instead of this one. - * The only change that is required is to delete the _mode argument. - * - * @param _url the URL whose properties should be displayed - * @param _mode unused. - * @param parent is the parent of the dialog widget. - * @param name is the internal name. - * @param modal tells the dialog whether it should be modal. - * @param autoShow tells the dialog whether it should show itself automatically. */ - KPropertiesDialog( const KURL& _url, mode_t _mode, - TQWidget* parent = 0L, const char* name = 0L, - bool modal = false, bool autoShow = true) KDE_DEPRECATED; -#endif - - /** - * Brings up a Properties dialog. Convenience constructor for - * non-file-manager applications, where you have a KURL rather than a - * KFileItem or KFileItemList. - * - * @param _url the URL whose properties should be displayed - * @param parent is the parent of the dialog widget. - * @param name is the internal name. - * @param modal tells the dialog whether it should be modal. - * IMPORTANT: This constructor, together with modal=true, leads to a grave - * display bug (due to TDEIO::stat() being run before the dialog has all the - * necessary information). Do not use this combination for now. - * For local files with a known mimetype, simply create a KFileItem and pass - * it to the other constructor. - * - * @param autoShow tells the dialog whethr it should show itself automatically. - */ - KPropertiesDialog( const KURL& _url, - TQWidget* parent = 0L, const char* name = 0L, - bool modal = false, bool autoShow = true); - - /** - * Creates a properties dialog for a new .desktop file (whose name - * is not known yet), based on a template. Special constructor for - * "File / New" in file-manager type applications. - * - * @param _tempUrl template used for reading only - * @param _currentDir directory where the file will be written to - * @param _defaultName something to put in the name field, - * like mimetype.desktop - * @param parent is the parent of the dialog widget. - * @param name is the internal name. - * @param modal tells the dialog whether it should be modal. - * @param autoShow tells the dialog whethr it should show itself automatically. - */ - KPropertiesDialog( const KURL& _tempUrl, const KURL& _currentDir, - const TQString& _defaultName, - TQWidget* parent = 0L, const char* name = 0L, - bool modal = false, bool autoShow = true); - - /** - * Creates an empty properties dialog (for applications that want use - * a standard dialog, but for things not doable via the plugin-mechanism). - * - * @param title is the string display as the "filename" in the caption of the dialog. - * @param parent is the parent of the dialog widget. - * @param name is the internal name. - * @param modal tells the dialog whether it should be modal. - */ - KPropertiesDialog (const TQString& title, - TQWidget* parent = 0L, const char* name = 0L, bool modal = false); - - /** - * Cleans up the properties dialog and frees any associated resources, - * including the dialog itself. Note that when a properties dialog is - * closed it cleans up and deletes itself. - */ - virtual ~KPropertiesDialog(); - - /** - * Immediately displays a Properties dialog using constructor with - * the same parameters. - * On MS Windows, if @p item points to a local file, native (non modal) property - * dialog is displayed (@p parent and @p modal are ignored in this case). - * - * @return true on succesfull dialog displaying (can be false on win32). - * @since 3.4 - */ - static bool showDialog(KFileItem* item, TQWidget* parent = 0, - const char* name = 0, bool modal = false); - - /** - * Immediately displays a Properties dialog using constructor with - * the same parameters. - * On MS Windows, if @p _url points to a local file, native (non modal) property - * dialog is displayed (@p parent and @p modal are ignored in this case). - * - * @return true on succesfull dialog displaying (can be false on win32). - * @since 3.4 - */ - static bool showDialog(const KURL& _url, TQWidget* parent = 0, - const char* name = 0, bool modal = false); - - /** - * Immediately displays a Properties dialog using constructor with - * the same parameters. - * On MS Windows, if @p _items has one element and this element points - * to a local file, native (non modal) property dialog is displayed - * (@p parent and @p modal are ignored in this case). - * - * @return true on succesfull dialog displaying (can be false on win32). - * @since 3.4 - */ - static bool showDialog(const KFileItemList& _items, TQWidget* parent = 0, - const char* name = 0, bool modal = false); - - /** - * Adds a "3rd party" properties plugin to the dialog. Useful - * for extending the properties mechanism. - * - * To create a new plugin type, inherit from the base class KPropsDlgPlugin - * and implement all the methods. If you define a service .desktop file - * for your plugin, you do not need to call insertPlugin(). - * - * @param plugin is a pointer to the KPropsDlgPlugin. The Properties - * dialog will do destruction for you. The KPropsDlgPlugin \b must - * have been created with the KPropertiesDialog as its parent. - * @see KPropsDlgPlugin - */ - void insertPlugin (KPropsDlgPlugin *plugin); - - /** - * The URL of the file that has its properties being displayed. - * This is only valid if the KPropertiesDialog was created/shown - * for one file or URL. - * - * @return a parsed URL. - */ - const KURL& kurl() const { return m_singleUrl; } - - /** - * @return the file item for which the dialog is shown - * - * Warning: this method returns the first item of the list. - * This means that you should use this only if you are sure the dialog is used - * for a single item. Otherwise, you probably want items() instead. - */ - KFileItem *item() { return m_items.first(); } - - /** - * @return the items for which the dialog is shown - */ - KFileItemList items() const { return m_items; } - - /** - * @return a pointer to the dialog - * @deprecated KPropertiesDialog directly inherits from KDialogBase, so use \a this instead - */ - KDE_DEPRECATED KDialogBase* dialog() { return this; } - /** - * @return a pointer to the dialog - * @deprecated KPropertiesDialog directly inherits from KDialogBase, so use \a this instead - */ - KDE_DEPRECATED const KDialogBase* dialog() const { return this; } - - /** - * If the dialog is being built from a template, this method - * returns the current directory. If no template, it returns TQString::null. - * See the template form of the constructor. - * - * @return the current directory or TQString::null - */ - const KURL& currentDir() const { return m_currentDir; } - - /** - * If the dialog is being built from a template, this method - * returns the default name. If no template, it returns TQString::null. - * See the template form of the constructor. - * @return the default name or TQString::null - */ - const TQString& defaultName() const { return m_defaultName; } - - /** - * Updates the item URL (either called by rename or because - * a global apps/mimelnk desktop file is being saved) - * Can only be called if the dialog applies to a single file or URL. - * @param _newUrl the new URL - */ - void updateUrl( const KURL& _newUrl ); - - /** - * Renames the item to the specified name. This can only be called if - * the dialog applies to a single file or URL. - * @param _name new filename, encoded. - * \see FilePropsDlgPlugin::applyChanges - */ - void rename( const TQString& _name ); - - /** - * To abort applying changes. - */ - void abortApplying(); - - /** - * Shows the page that was previously set by - * setFileSharingPage(), or does nothing if no page - * was set yet. - * \see setFileSharingPage - * @since 3.1 - */ - void showFileSharingPage(); - - /** - * Sets the file sharing page. - * This page is shown when calling showFileSharingPage(). - * - * @param page the page to set - * \see showFileSharingPage - * @since 3.3 - */ - void setFileSharingPage(TQWidget* page); - - /** - * Call this to make the filename lineedit readonly, to prevent the user - * from renaming the file. - * \param ro true if the lineedit should be read only - * @since 3.2 - */ - void setFileNameReadOnly( bool ro ); - -public slots: - /** - * Called when the user presses 'Ok'. - */ - virtual void slotOk(); // Deletes the PropertiesDialog instance - /** - * Called when the user presses 'Cancel'. - */ - virtual void slotCancel(); // Deletes the PropertiesDialog instance - -signals: - /** - * This signal is emitted when the Properties Dialog is closed (for - * example, with OK or Cancel buttons) - */ - void propertiesClosed(); - - /** - * This signal is emitted when the properties changes are applied (for - * example, with the OK button) - */ - void applied(); - - /** - * This signal is emitted when the properties changes are aborted (for - * example, with the Cancel button) - */ - - void canceled(); - /** - * Emitted before changes to @p oldUrl are saved as @p newUrl. - * The receiver may change @p newUrl to point to an alternative - * save location. - */ - void saveAs(const KURL &oldUrl, KURL &newUrl); - -private: - - /** - * Common initialization for all constructors - */ - void init (bool modal = false, bool autoShow = true); - - /** - * Inserts all pages in the dialog. - */ - void insertPages(); - - /** - * The URL of the props dialog (when shown for only one file) - */ - KURL m_singleUrl; - - /** - * List of items this props dialog is shown for - */ - KFileItemList m_items; - - /** - * For templates - */ - TQString m_defaultName; - KURL m_currentDir; - - /** - * List of all plugins inserted ( first one first ) - */ - TQPtrList m_pageList; - -private slots: - void slotStatResult( TDEIO::Job * ); // No longer used -protected: - virtual void virtual_hook( int id, void* data ); -private: - class KPropertiesDialogPrivate; - KPropertiesDialogPrivate *d; -}; - -/** - * A Plugin in the Properties dialog - * This is an abstract class. You must inherit from this class - * to build a new kind of tabbed page for the KPropertiesDialog. - * A plugin in itself is just a library containing code, not a dialog's page. - * It's up to the plugin to insert pages into the parent dialog. - * - * To make a plugin available, define a service that implements the KPropsDlg/Plugin - * servicetype, as well as the mimetypes for which the plugin should be created. - * For instance, ServiceTypes=KPropsDlg/Plugin,text/html,application/x-mymimetype. - * - * You can also include X-TDE-Protocol=file if you want that plugin - * to be loaded only for local files, for instance. - */ -class TDEIO_EXPORT KPropsDlgPlugin : public TQObject -{ - Q_OBJECT -public: - /** - * Constructor - * To insert tabs into the properties dialog, use the add methods provided by - * KDialogBase (the properties dialog is a KDialogBase). - */ - KPropsDlgPlugin( KPropertiesDialog *_props ); - virtual ~KPropsDlgPlugin(); - - /** - * Applies all changes to the file. - * This function is called when the user presses 'Ok'. The last plugin inserted - * is called first. - */ - virtual void applyChanges(); - - /** - * Convenience method for most ::supports methods - * @return true if the file is a local, regular, readable, desktop file - */ - static bool isDesktopFile( KFileItem * _item ); - - void setDirty( bool b ); - bool isDirty() const; - -public slots: - void setDirty(); // same as setDirty( true ) - -signals: - /** - * Emit this signal when the user changed anything in the plugin's tabs. - * The hosting PropertiesDialog will call applyChanges only if the - * PropsPlugin has emitted this signal before. - */ - void changed(); - -protected: - /** - * Pointer to the dialog - */ - KPropertiesDialog *properties; - - int fontHeight; -protected: - virtual void virtual_hook( int id, void* data ); -private: - class KPropsDlgPluginPrivate; - KPropsDlgPluginPrivate *d; -}; - -/** - * 'General' plugin - * This plugin displays the name of the file, its size and access times. - * @internal - */ -class TDEIO_EXPORT KFilePropsPlugin : public KPropsDlgPlugin -{ - Q_OBJECT -public: - /** - * Constructor - */ - KFilePropsPlugin( KPropertiesDialog *_props ); - virtual ~KFilePropsPlugin(); - - /** - * Applies all changes made. This plugin must be always the first - * plugin in the dialog, since this function may rename the file which - * may confuse other applyChanges functions. - */ - virtual void applyChanges(); - - /** - * Tests whether the files specified by _items need a 'General' plugin. - */ - static bool supports( KFileItemList _items ); - - /** - * Called after all plugins applied their changes - */ - void postApplyChanges(); - - void setFileNameReadOnly( bool ro ); - -protected slots: - void slotEditFileType(); - void slotCopyFinished( TDEIO::Job * ); - void slotFileRenamed( TDEIO::Job *, const KURL &, const KURL & ); - void slotDirSizeUpdate(); - void slotDirSizeFinished( TDEIO::Job * ); - void slotFoundMountPoint( const TQString& mp, unsigned long kBSize, - unsigned long kBUsed, unsigned long kBAvail ); - void slotSizeStop(); - void slotSizeDetermine(); - -private slots: - // workaround for compiler bug - void slotFoundMountPoint( const unsigned long& kBSize, const unsigned long& - kBUsed, const unsigned long& kBAvail, const TQString& mp ); - void nameFileChanged(const TQString &text ); - void slotIconChanged(); - -private: - void determineRelativePath( const TQString & path ); - void applyIconChanges(); - - TQWidget *iconArea; - TQWidget *nameArea; - - TQLabel *m_sizeLabel; - TQPushButton *m_sizeDetermineButton; - TQPushButton *m_sizeStopButton; - - TQString m_sRelativePath; - bool m_bFromTemplate; - - /** - * The initial filename - */ - TQString oldName; - - class KFilePropsPluginPrivate; - KFilePropsPluginPrivate *d; -}; - -/** - * 'Permissions' plugin - * In this plugin you can modify permissions and change - * the owner of a file. - * @internal - */ -class TDEIO_EXPORT KFilePermissionsPropsPlugin : public KPropsDlgPlugin -{ - Q_OBJECT -public: - enum PermissionsMode { - PermissionsOnlyFiles = 0, - PermissionsOnlyDirs = 1, - PermissionsOnlyLinks = 2, - PermissionsMixed = 3 - }; - - enum PermissionsTarget { - PermissionsOwner = 0, - PermissionsGroup = 1, - PermissionsOthers = 2 - }; - - /** - * Constructor - */ - KFilePermissionsPropsPlugin( KPropertiesDialog *_props ); - virtual ~KFilePermissionsPropsPlugin(); - - virtual void applyChanges(); - - /** - * Tests whether the file specified by _items needs a 'Permissions' plugin. - */ - static bool supports( KFileItemList _items ); - -private slots: - - void slotChmodResult( TDEIO::Job * ); - void slotShowAdvancedPermissions(); - -private: - void setComboContent(TQComboBox *combo, PermissionsTarget target, - mode_t permissions, mode_t partial); - bool isIrregular(mode_t permissions, bool isDir, bool isLink); - void enableAccessControls(bool enable); - void updateAccessControls(); - void getPermissionMasks(mode_t &andFilePermissions, - mode_t &andDirPermissions, - mode_t &orFilePermissions, - mode_t &orDirPermissions); - - static const mode_t permissionsMasks[3]; - static const mode_t standardPermissions[4]; - static const char *permissionsTexts[4][4]; - - // unused, for binary compatibility! - TQCheckBox *permBox[3][4]; - - TQComboBox *grpCombo; - - KLineEdit *usrEdit, *grpEdit; - - /** - * Old permissions - */ - mode_t permissions; - /** - * Old group - */ - TQString strGroup; - /** - * Old owner - */ - TQString strOwner; - - // unused, for compatibility - static mode_t fperm[3][4]; - - class KFilePermissionsPropsPluginPrivate; - KFilePermissionsPropsPluginPrivate *d; -}; - - -/** - * Used to edit the files containing - * [Desktop Entry] - * URL=.... - * - * Such files are used to represent a program in kicker and konqueror. - * @internal - */ -class TDEIO_EXPORT KURLPropsPlugin : public KPropsDlgPlugin -{ - Q_OBJECT -public: - /** - * Constructor - */ - KURLPropsPlugin( KPropertiesDialog *_props ); - virtual ~KURLPropsPlugin(); - - virtual void applyChanges(); - - static bool supports( KFileItemList _items ); - -private: - KURLRequester *URLEdit; - KIconButton *iconBox; - - TQString URLStr; - TQString iconStr; - - TQPixmap pixmap; - TQString pixmapFile; -private: - class KURLPropsPluginPrivate; - KURLPropsPluginPrivate *d; -}; - - -/** - * Used to edit the files containing - * [Desktop Entry] - * Type=MimeType - * @internal - */ -class TDEIO_EXPORT KBindingPropsPlugin : public KPropsDlgPlugin -{ - Q_OBJECT -public: - /** - * Constructor - */ - KBindingPropsPlugin( KPropertiesDialog *_props ); - virtual ~KBindingPropsPlugin(); - - virtual void applyChanges(); - static bool supports( KFileItemList _items ); - -private: - - TQLineEdit *commentEdit; - TQLineEdit *patternEdit; - TQLineEdit *mimeEdit; - TQString m_sMimeStr; - - TQCheckBox * cbAutoEmbed; - - class KBindingPropsPluginPrivate; - KBindingPropsPluginPrivate *d; -}; - -/** - * Properties plugin for device .desktop files - * @internal - */ -class TDEIO_EXPORT KDevicePropsPlugin : public KPropsDlgPlugin -{ - Q_OBJECT -public: - KDevicePropsPlugin( KPropertiesDialog *_props ); - virtual ~KDevicePropsPlugin(); - - virtual void applyChanges(); - - static bool supports( KFileItemList _items ); - -private slots: - void slotActivated( int ); - void slotDeviceChanged(); - void slotFoundMountPoint( const unsigned long& kBSize, - const unsigned long& /*kBUsed*/, - const unsigned long& kBAvail, - const TQString& ); - -private: - void updateInfo(); - -private: - TQComboBox* device; - TQLabel* mountpoint; - TQCheckBox* readonly; - void* unused; - //KIconButton* mounted; - KIconButton* unmounted; - - TQStringList m_devicelist; - int indexDevice; - int indexMountPoint; - int indexFSType; - - TQPixmap pixmap; - TQString pixmapFile; - - class KDevicePropsPluginPrivate; - KDevicePropsPluginPrivate *d; -}; - -class KPropertiesDesktopBase; - -/** - * Used to edit the files containing - * [Desktop Entry] - * Type=Application - * - * Such files are used to represent a program in kicker and konqueror. - * @internal - */ -class TDEIO_EXPORT KDesktopPropsPlugin : public KPropsDlgPlugin -{ - Q_OBJECT -public: - /** - * Constructor - */ - KDesktopPropsPlugin( KPropertiesDialog *_props ); - virtual ~KDesktopPropsPlugin(); - - virtual void applyChanges(); - - static bool supports( KFileItemList _items ); - -public slots: - void slotAddFiletype(); - void slotDelFiletype(); - void slotBrowseExec(); - void slotAdvanced(); - void slotSelectMimetype(); - -private: - void checkCommandChanged(); - -private: - KPropertiesDesktopBase* w; - - TQString m_origCommandStr; - TQString m_terminalOptionStr; - TQString m_suidUserStr; - TQString m_dcopServiceType; - bool m_terminalBool; - bool m_terminalCloseBool; - bool m_suidBool; - bool m_startupBool; - bool m_systrayBool; - - class KDesktopPropsPluginPrivate; - KDesktopPropsPluginPrivate *d; -}; - -/** - * Used to edit the files containing - * [Desktop Entry] - * Type=Application - * - * Such files are used to represent a program in kicker and konqueror. - * @internal - * @deprecated replaced with KDesktopPropsPlugin - */ - /// Remove in KDE4 -class TDEIO_EXPORT_DEPRECATED KExecPropsPlugin : public KPropsDlgPlugin -{ - Q_OBJECT -public: - /** - * Constructor - */ - KExecPropsPlugin( KPropertiesDialog *_props ); - virtual ~KExecPropsPlugin(); - - virtual void applyChanges(); - - static bool supports( KFileItemList _items ); - -public slots: - void slotBrowseExec(); - -private slots: - void enableCheckedEdit(); - void enableSuidEdit(); - -private: - - TQLabel *terminalLabel; - TQLabel *suidLabel; - KLineEdit *execEdit; - TQCheckBox *terminalCheck; - TQCheckBox *suidCheck; - KLineEdit *terminalEdit; - KLineEdit *suidEdit; - KLineEdit *swallowExecEdit; - KLineEdit *swallowTitleEdit; - TQButton *execBrowse; - - TQString execStr; - TQString swallowExecStr; - TQString swallowTitleStr; - TQString termOptionsStr; - bool termBool; - bool suidBool; - TQString suidUserStr; - - class KExecPropsPluginPrivate; - KExecPropsPluginPrivate *d; -}; - -/** - * Used to edit the files containing - * [Desktop Entry] - * Type=Application - * - * Such files are used to represent a program in kicker and konqueror. - * @internal - * @deprecated replaced with KDesktopPropsPlugin - */ - /// Remove in KDE4 -class TDEIO_EXPORT_DEPRECATED TDEApplicationPropsPlugin : public KPropsDlgPlugin -{ - Q_OBJECT -public: - /** - * Constructor - */ - TDEApplicationPropsPlugin( KPropertiesDialog *_props ); - virtual ~TDEApplicationPropsPlugin(); - - virtual void applyChanges(); - - static bool supports( KFileItemList _items ); - -public slots: - void slotDelExtension(); - void slotAddExtension(); - -private slots: - void updateButton(); - -private: - void addMimeType( const TQString & name ); - - TQLineEdit *commentEdit; - TQLineEdit *genNameEdit; - TQLineEdit *nameEdit; - TQListBox *extensionsList; - TQListBox *availableExtensionsList; - TQPushButton *addExtensionButton; - TQPushButton *delExtensionButton; - - class TDEApplicationPropsPluginPrivate; - TDEApplicationPropsPluginPrivate *d; -}; - -#endif - diff --git a/kio/kfile/kpropertiesmimetypebase.ui b/kio/kfile/kpropertiesmimetypebase.ui deleted file mode 100644 index df7c796da..000000000 --- a/kio/kfile/kpropertiesmimetypebase.ui +++ /dev/null @@ -1,70 +0,0 @@ - -KPropertiesMimetypeBase - - - widget2 - - - - 0 - 0 - 265 - 213 - - - - - unnamed - - - 0 - - - - textLabel1 - - - Select one or more file types to add: - - - listView - - - - - - Mimetype - - - true - - - true - - - - - Description - - - true - - - true - - - - listView - - - <qt><p>Select one or more types of file that your application can handle here. This list is organized by <u>mimetypes</u>.</p> -<p>MIME, Multipurpose Internet (e)Mail Extension, is a standard protocol for identifying the type of data based on filename extensions and correspondent <u>mimetypes</u>. Example: the "bmp" part that comes after the dot in flower.bmp indicates that it is a specific kind of image, <u>image/x-bmp</u>. To know which application should open each type of file, the system should be informed about the abilities of each application to handle these extensions and mimetypes.</p> - - - - - - klistview.h - - - diff --git a/kio/kfile/kpropsdlg.h b/kio/kfile/kpropsdlg.h deleted file mode 100644 index 502a346e9..000000000 --- a/kio/kfile/kpropsdlg.h +++ /dev/null @@ -1,4 +0,0 @@ -// This is now called kpropertiesdialog.h -#ifndef KDE_NO_COMPAT -#include -#endif diff --git a/kio/kfile/kpropsdlgplugin.desktop b/kio/kfile/kpropsdlgplugin.desktop deleted file mode 100644 index f74e3895e..000000000 --- a/kio/kfile/kpropsdlgplugin.desktop +++ /dev/null @@ -1,87 +0,0 @@ -[Desktop Entry] -Type=ServiceType -X-TDE-ServiceType=KPropsDlg/Plugin -Comment=Plugin for the Properties Dialog -Comment[af]=Inprop module vir die Eienskappe Dialoog -Comment[ar]=ملحق لمربع حوار خصائص -Comment[az]=Seçənəklər Rabitə Qutusu Üçün Əlavə -Comment[bg]=Приставка за диалога "Информация" -Comment[bn]=বৈশিষ্ট্যাবলী ডায়ালগ-এর জন্য প্লাগ-ইন -Comment[br]=Adveziant evit kendiviz ar perzhioù -Comment[bs]=Dodatak za Properties dijalog -Comment[ca]=Connector per al diàleg de les propietats -Comment[cs]=Modul pro dialog vlastností -Comment[csb]=Plugins dialogòwégò òkna Swòjiznë -Comment[cy]=Ategyn am yr Ymgom Priodweddau -Comment[da]=Plugin til egenskabsdialog -Comment[de]=Erweiterung für den Eigenschaften-Dialog -Comment[el]=Πρόσθετο για το Διάλογο ιδιοτήτων -Comment[en_GB]=Plugin for the Properties Dialogue -Comment[eo]=Internaĵo por la Eco-dialogo -Comment[es]=Plugin para el diálogo de propiedades -Comment[et]=Omaduste dialoogi plugin -Comment[eu]=Propietateen elkarrizketa-koadroaren plugin-a -Comment[fa]=وصله برای محاورۀ ویژگیها -Comment[fi]=Lisäosa asetusikkunalle -Comment[fr]=Module externe pour la boîte de dialogue des propriétés -Comment[fy]=Plugin foar de 'Eigenskippen'-dialooch -Comment[gl]=Plugin para o Diálogo de Propriedades -Comment[he]=תוסף לדו־שיח המאפיינים -Comment[hi]=विशेषता संवाद के लिए प्लगइन -Comment[hr]=Dodatak dijaloga 'Svojstva' -Comment[hu]=Beépülő modul a tulajdonságok párbeszédablakhoz -Comment[id]=Plugin untuk Dialog Properties -Comment[is]=Íforrit fyrir stillingarforritið -Comment[it]=Plugin per la finestra delle proprietà -Comment[ja]=設定ダイアログプラグイン -Comment[ka]=პარამეტრების გამართვის დიალოგის მოდული -Comment[kk]=Қасиеттер диалогтың модулі -Comment[km]=កម្មវិធី​ជំនួយ​ខាង​ក្នុង​សម្រាប់​ប្រអប់ លក្ខណៈ​សម្បត្តិ -Comment[ko]=대화창 특성을 위한 플러그인 -Comment[lb]=Plugin fir den Eegeschaften-Dialog -Comment[lt]=Priedas savybių dialogui -Comment[lv]=Īpašību Dialoga Iespraudnis -Comment[mk]=Приклучок за дијалогот за својства -Comment[mn]=Шинж чанарууд диалогийн Plugin -Comment[ms]=Plugmasuk untuk Dialog Ciri-ciri -Comment[mt]=Plugin għad-djalogu tal-propjetajiet -Comment[nb]=Programtillegg for dialogvinduet for egenskaper -Comment[nds]=Plugin för den Egenschappen-Dialoog -Comment[ne]=विशेषता संवादका लागि प्लगइन -Comment[nl]=Plugin voor de 'Eigenschappen'-dialoog -Comment[nn]=Tillegg til eigenskapar-dialogen -Comment[nso]=Tsenyo ya Poledisano ya Dithoto -Comment[oc]=Branquament pel dialeg de propietats -Comment[pa]=ਵਿਸ਼ੇਸਤਾ ਵਾਰਤਾਲਾਪ ਲਈ ਪਲੱਗਿੰਨ -Comment[pl]=Wtyczka do okna dialogowego Właściwości -Comment[pt]='Plugin' para o diálogo de propriedades -Comment[pt_BR]=Plug-in para a janela de Propriedades -Comment[ro]=Modul pentru dialogul de proprietăţi -Comment[ru]=Модуль для диалога настроек -Comment[rw]=Icomeka ry'Ikiganiro cy'Ibiranga -Comment[se]=Lassemoduvla iešvuođahtaláseža várás -Comment[sk]=modul pre ialóg ílastnosti -Comment[sl]=Vstavek za pogovorno okno z lastnostmi -Comment[sq]=Shtojcë për Dialogun e Rekuizitave -Comment[sr]=Прикључак за дијалог са својствима -Comment[sr@Latn]=Priključak za dijalog sa svojstvima -Comment[sv]=Insticksprogram för egenskapsdialogen -Comment[ta]=பண்புகள் உரையாடலுக்கான சொருகுப்பொருள் -Comment[te]=లక్షణాల సంభాషణ కొరకు ప్లగిన్ -Comment[tg]=Штепсели барои Хусусиятҳои Тирезаи Диалогӣ Андохтан -Comment[th]=ปลั๊กอินสำหรับกล่องคุณสมบัติ -Comment[tr]=Özellikler İletişim Kutusu İçin Eklenti -Comment[tt]=Caylaw Dialogı öçen Östämä -Comment[uk]=Втулок для діалогу властивостей -Comment[uz]=Xossalar dialogi uchun plagin -Comment[uz@cyrillic]=Хоссалар диалоги учун плагин -Comment[ven]=U pulaga ha zwishumiswa zwa nyambedzano -Comment[vi]=Bộ cầm phít cho hộp thoại đặc tả. -Comment[xh]=Iplagi yangaphakathi Yezinto zobumnini Zencoko yababini -Comment[zh_CN]=属性对话的插件 -Comment[zh_HK]=屬性對話盒的外掛程式 -Comment[zh_TW]=屬性對話盒的外掛程式 -Comment[zu]=I-plugin Yengxoxo Yezinkomba zobunini - -[PropertyDef::X-TDE-Protocol] -Type=TQString diff --git a/kio/kfile/krecentdirs.cpp b/kio/kfile/krecentdirs.cpp deleted file mode 100644 index 6f4a01f3b..000000000 --- a/kio/kfile/krecentdirs.cpp +++ /dev/null @@ -1,99 +0,0 @@ -/* -*- c++ -*- - * Copyright (C)2000 Waldo Bastian - * - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - */ -#include -#include -#include -#include - -#define MAX_DIR_HISTORY 3 - -static void recentdirs_done(TDEConfig *config) -{ - if (config == TDEGlobal::config()) - { - config->sync(); - } - else - { - delete config; - } -} - -static TDEConfig *recentdirs_readList(TQString &key, TQStringList &result, bool readOnly) -{ - TDEConfig *config; - if ((key.length() < 2) || (key[0] != ':')) - key = ":default"; - if (key[1] == ':') - { - key = key.mid(2); - config = new KSimpleConfig(TQString::fromLatin1("krecentdirsrc"), readOnly); - } - else - { - key = key.mid(1); - config = TDEGlobal::config(); - config->setGroup(TQString::fromLatin1("Recent Dirs")); - } - - result=config->readPathListEntry(key); - if (result.isEmpty()) - { - result.append(TDEGlobalSettings::documentPath()); - } - return config; -} - -TQStringList KRecentDirs::list(const TQString &fileClass) -{ - TQString key = fileClass; - TQStringList result; - recentdirs_done(recentdirs_readList(key, result, true)); - return result; -} - -TQString KRecentDirs::dir(const TQString &fileClass) -{ - TQStringList result = list(fileClass); - return result[0]; -} - -void KRecentDirs::add(const TQString &fileClass, const TQString &directory) -{ - TQString key = fileClass; - TQStringList result; - TDEConfig *config = recentdirs_readList(key, result, false); - // make sure the dir is first in history - result.remove(directory); - result.prepend(directory); - while(result.count() > MAX_DIR_HISTORY) - result.remove(result.fromLast()); - config->writePathEntry(key, result); - recentdirs_done(config); -} - diff --git a/kio/kfile/krecentdirs.h b/kio/kfile/krecentdirs.h deleted file mode 100644 index 774655e51..000000000 --- a/kio/kfile/krecentdirs.h +++ /dev/null @@ -1,70 +0,0 @@ -/* -*- c++ -*- - * Copyright (C)2000 Waldo Bastian - * - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - */ -#ifndef __KRECENTDIRS_H -#define __KRECENTDIRS_H - -#include - -#include - -/** - * The goal of this class is to make sure that, when the user needs to - * specify a file via the file selection dialog, this dialog will start - * in the directory most likely to contain the desired files. - * - * This works as follows: Each time the file selection dialog is - * shown, the programmer can specify a "file-class". The file-dialog will - * then start with the directory associated with this file-class. When - * the dialog closes, the directory currently shown in the file-dialog - * will be associated with the file-class. - * - * A file-class can either start with ':' or with '::'. If it starts with - * a single ':' the file-class is specific to the current application. - * If the file-class starts with '::' it is global to all applications. - */ -class TDEIO_EXPORT KRecentDirs -{ -public: - /** - * Returns a list of directories associated with this file-class. - * The most recently used directory is at the front of the list. - */ - static TQStringList list(const TQString &fileClass); - - /** - * Returns the most recently used directory accociated with this file-class. - */ - static TQString dir(const TQString &fileClass); - - /** - * Associates @p directory with @p fileClass - */ - static void add(const TQString &fileClass, const TQString &directory); -}; - -#endif diff --git a/kio/kfile/krecentdocument.cpp b/kio/kfile/krecentdocument.cpp deleted file mode 100644 index 1ec4a98c8..000000000 --- a/kio/kfile/krecentdocument.cpp +++ /dev/null @@ -1,177 +0,0 @@ -/* -*- c++ -*- - * Copyright (C)2000 Daniel M. Duley - * - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - */ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include - -TQString KRecentDocument::recentDocumentDirectory() -{ - // need to change this path, not sure where - return locateLocal("data", TQString::fromLatin1("RecentDocuments/")); -} - -TQStringList KRecentDocument::recentDocuments() -{ - TQDir d(recentDocumentDirectory(), "*.desktop", TQDir::Time, - TQDir::Files | TQDir::Readable | TQDir::Hidden); - - if (!d.exists()) - d.mkdir(recentDocumentDirectory()); - - TQStringList list = d.entryList(); - TQStringList fullList; - - for (TQStringList::ConstIterator it = list.begin(); it != list.end(); ++it) { - TQString pathDesktop = d.absFilePath( *it ); - KDesktopFile tmpDesktopFile( pathDesktop, false); - KURL urlDesktopFile(tmpDesktopFile.readURL()); - if( urlDesktopFile.isLocalFile() && !TQFile(urlDesktopFile.path()).exists()) - d.remove(pathDesktop); - else - fullList.append( pathDesktop ); - } - - return fullList; -} - -void KRecentDocument::add(const KURL& url) -{ - KRecentDocument::add(url, tqApp->argv()[0]); // ### argv[0] might not match the service filename! -} - -void KRecentDocument::add(const KURL& url, const TQString& desktopEntryName) -{ - if ( url.isLocalFile() && !TDEGlobal::dirs()->relativeLocation("tmp", url.path()).startsWith("/")) - return; - - TQString openStr = url.url(); - openStr.replace( TQRegExp("\\$"), "$$" ); // Desktop files with type "Link" are $-variable expanded - - kdDebug(250) << "KRecentDocument::add for " << openStr << endl; - TDEConfig *config = TDEGlobal::config(); - TQString oldGrp = config->group(); - config->setGroup(TQString::fromLatin1("RecentDocuments")); - bool useRecent = config->readBoolEntry(TQString::fromLatin1("UseRecent"), true); - int maxEntries = config->readNumEntry(TQString::fromLatin1("MaxEntries"), 10); - - config->setGroup(oldGrp); - if(!useRecent) - return; - - TQString path = recentDocumentDirectory(); - - TQString dStr = path + url.fileName(); - - TQString ddesktop = dStr + TQString::fromLatin1(".desktop"); - - int i=1; - // check for duplicates - while(TQFile::exists(ddesktop)){ - // see if it points to the same file and application - KSimpleConfig tmp(ddesktop); - tmp.setDesktopGroup(); - if(tmp.readEntry(TQString::fromLatin1("X-TDE-LastOpenedWith")) - == desktopEntryName) - { - utime(TQFile::encodeName(ddesktop), NULL); - return; - } - // if not append a (num) to it - ++i; - if ( i > maxEntries ) - break; - ddesktop = dStr + TQString::fromLatin1("[%1].desktop").arg(i); - } - - TQDir dir(path); - // check for max entries, delete oldest files if exceeded - TQStringList list = dir.entryList(TQDir::Files | TQDir::Hidden, TQDir::Time | TQDir::Reversed); - i = list.count(); - if(i > maxEntries-1){ - TQStringList::Iterator it; - it = list.begin(); - while(i > maxEntries-1){ - TQFile::remove(dir.absPath() + TQString::fromLatin1("/") + (*it)); - --i, ++it; - } - } - - // create the applnk - KSimpleConfig conf(ddesktop); - conf.setDesktopGroup(); - conf.writeEntry( TQString::fromLatin1("Type"), TQString::fromLatin1("Link") ); - conf.writePathEntry( TQString::fromLatin1("URL"), openStr ); - // If you change the line below, change the test in the above loop - conf.writeEntry( TQString::fromLatin1("X-TDE-LastOpenedWith"), desktopEntryName ); - TQString name = url.fileName(); - if (name.isEmpty()) - name = openStr; - conf.writeEntry( TQString::fromLatin1("Name"), name ); - conf.writeEntry( TQString::fromLatin1("Icon"), KMimeType::iconForURL( url ) ); -} - -void KRecentDocument::add(const TQString &openStr, bool isUrl) -{ - if( isUrl ) { - add( KURL( openStr ) ); - } else { - KURL url; - url.setPath( openStr ); - add( url ); - } -} - -void KRecentDocument::clear() -{ - TQStringList list = recentDocuments(); - TQDir dir; - for(TQStringList::Iterator it = list.begin(); it != list.end() ; ++it) - dir.remove(*it); -} - -int KRecentDocument::maximumItems() -{ - TDEConfig *config = TDEGlobal::config(); - TDEConfigGroupSaver sa(config, TQString::fromLatin1("RecentDocuments")); - return config->readNumEntry(TQString::fromLatin1("MaxEntries"), 10); -} - - diff --git a/kio/kfile/krecentdocument.h b/kio/kfile/krecentdocument.h deleted file mode 100644 index 968559968..000000000 --- a/kio/kfile/krecentdocument.h +++ /dev/null @@ -1,105 +0,0 @@ -/* -*- c++ -*- - * Copyright (C)2000 Daniel M. Duley - * - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - */ -#ifndef __KRECENTDOCUMENT_H -#define __KRECENTDOCUMENT_H - -#include -#include - -/** - * Manage the "Recent Document Menu" entries displayed by - * applications such as Kicker and Konqueror. - * - * These entries are automatically generated .desktop files pointing - * to the current application and document. You should call the - * static add() method whenever the user opens or saves a new - * document if you want it to show up in the menu. - * - * You don't have to worry about this if you are using any - * KFileDialog derived class to open and save documents, as it - * already calls this class. User defined limits on the maximum - * number of documents to save, etc... are all automatically handled. - * - * @author Daniel M. Duley - */ -class TDEIO_EXPORT KRecentDocument -{ -public: - - /** - * - * Return a list of absolute paths to recent document .desktop files, - * sorted by date. - * - */ - static TQStringList recentDocuments(); - - /** - * Add a new item to the Recent Document menu. - * - * @param url The url to add. - */ - static void add(const KURL& url); - - /** - * Add a new item to the Recent Document menu, specifying the application to open it with. - * The above add() method uses argv[0] for the app name, which isn't always flexible enough. - * This method is used when an application launches another one to open a document. - * - * @param url The url to add. - * @param desktopEntryName The desktopEntryName of the service to use for opening this document. - */ - static void add(const KURL& url, const TQString& desktopEntryName); - - /** - * - * Add a new item to the Recent Document menu. Calls add( url ). - * - * @param documentStr The full path to the document or URL to add. - * @param isURL Set to @p true if @p documentStr is an URL and not a local file path. - */ - static void add(const TQString &documentStr, bool isURL = false); - - /** - * Clear the recent document menu of all entries. - */ - static void clear(); - - /** - * Returns the maximum amount of recent document entries allowed. - */ - static int maximumItems(); - - /** - * Returns the path to the directory where recent document .desktop files - * are stored. - */ - static TQString recentDocumentDirectory(); -}; - -#endif diff --git a/kio/kfile/kurlbar.cpp b/kio/kfile/kurlbar.cpp deleted file mode 100644 index 95f30ee24..000000000 --- a/kio/kfile/kurlbar.cpp +++ /dev/null @@ -1,1049 +0,0 @@ -/* This file is part of the KDE libraries - Copyright (C) 2001,2002,2003 Carsten Pfeiffer - - library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation, version 2. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "kurlbar.h" - -/** - * Handles tooltips in the KURLBar - * @internal - */ -class KURLBarToolTip : public TQToolTip -{ -public: - KURLBarToolTip( TQListBox *view ) : TQToolTip( view ), m_view( view ) {} - -protected: - virtual void maybeTip( const TQPoint& point ) { - TQListBoxItem *item = m_view->itemAt( point ); - if ( item ) { - TQString text = static_cast( item )->toolTip(); - if ( !text.isEmpty() ) - tip( m_view->itemRect( item ), text ); - } - } - -private: - TQListBox *m_view; -}; - - -/////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////// - -class KURLBarItem::KURLBarItemPrivate -{ -public: - KURLBarItemPrivate() - { - isPersistent = true; - } - - bool isPersistent; -}; - -KURLBarItem::KURLBarItem( KURLBar *parent, - const KURL& url, bool persistent, const TQString& description, - const TQString& icon, KIcon::Group group ) - : TQListBoxPixmap( KIconLoader::unknown() /*, parent->listBox()*/ ), - m_url( url ), - m_pixmap( 0L ), - m_parent( parent ), - m_appLocal( true ) -{ - init( icon, group, description, persistent ); -} - -KURLBarItem::KURLBarItem( KURLBar *parent, - const KURL& url, const TQString& description, - const TQString& icon, KIcon::Group group ) - : TQListBoxPixmap( KIconLoader::unknown() /*, parent->listBox()*/ ), - m_url( url ), - m_pixmap( 0L ), - m_parent( parent ), - m_appLocal( true ) -{ - init( icon, group, description, true /*persistent*/ ); -} - -void KURLBarItem::init( const TQString& icon, KIcon::Group group, - const TQString& description, bool persistent ) -{ - d = new KURLBarItemPrivate; - d->isPersistent = persistent; - - setCustomHighlighting( true ); - setIcon( icon, group ); - setDescription( description ); -} - -KURLBarItem::~KURLBarItem() -{ - delete d; -} - -void KURLBarItem::setURL( const KURL& url ) -{ - m_url = url; - if ( m_description.isEmpty() ) - setText( url.fileName() ); -} - -void KURLBarItem::setIcon( const TQString& icon, KIcon::Group group ) -{ - m_icon = icon; - m_group = group; - - if ( icon.isEmpty() ) - m_pixmap = KMimeType::pixmapForURL( m_url, 0, group, iconSize() ); - else - m_pixmap = TDEGlobal::iconLoader()->loadIcon( icon, group, iconSize(), - KIcon::DefaultState ); -} - -void KURLBarItem::setDescription( const TQString& desc ) -{ - m_description = desc; - setText( desc.isEmpty() ? m_url.fileName() : desc ); -} - -void KURLBarItem::setApplicationLocal( bool local ) -{ - if ( !local && !isPersistent() ) - { - kdWarning() << "KURLBar: dynamic (non-persistent) items can not be global." << endl; - return; - } - - m_appLocal = local; -} - -void KURLBarItem::setToolTip( const TQString& tip ) -{ - m_toolTip = tip; -} - -TQString KURLBarItem::toolTip() const -{ - return m_toolTip.isEmpty() ? m_url.prettyURL() : m_toolTip; -} - -int KURLBarItem::iconSize() const -{ - return m_parent->iconSize(); -} - -void KURLBarItem::paint( TQPainter *p ) -{ - TQListBox *box = listBox(); - int w = width( box ); - static const int margin = KDialog::spacingHint(); - - // draw sunken selection - if ( isCurrent() || isSelected() ) { - int h = height( box ); - - TQBrush brush = box->colorGroup().brush( TQColorGroup::Highlight ); - p->fillRect( 0, 0, w, h, brush ); - TQPen pen = p->pen(); - TQPen oldPen = pen; - pen.setColor( box->colorGroup().mid() ); - p->setPen( pen ); - - p->drawPoint( 0, 0 ); - p->drawPoint( 0, h - 1 ); - p->drawPoint( w - 1, 0 ); - p->drawPoint( w - 1, h - 1 ); - - p->setPen( oldPen ); - } - - if ( m_parent->iconSize() < KIcon::SizeMedium ) { - // small icon -> draw icon next to text - - // ### mostly cut & paste of TQListBoxPixmap::paint() until Qt 3.1 - // (where it will properly use pixmap() instead of the internal pixmap) - const TQPixmap *pm = pixmap(); - int yPos = QMAX( 0, (height(box) - pm->height())/2 ); - - p->drawPixmap( margin, yPos, *pm ); - if ( !text().isEmpty() ) { - TQFontMetrics fm = p->fontMetrics(); - if ( pm->height() < fm.height() ) - yPos = fm.ascent() + fm.leading()/2; - else - yPos = pm->height()/2 - fm.height()/2 + fm.ascent(); - - yPos += margin; - int stringWidth = box->width() - pm->width() - 2 - (margin * 2); - TQString visibleText = KStringHandler::rPixelSqueeze( text(), fm, stringWidth ); - int xPos = pm->width() + margin + 2; - - if ( isCurrent() || isSelected() ) { - p->setPen( box->colorGroup().highlight().dark(115) ); - p->drawText( xPos + ( TQApplication::reverseLayout() ? -1 : 1), - yPos + 1, visibleText ); - p->setPen( box->colorGroup().highlightedText() ); - } - - p->drawText( xPos, yPos, visibleText ); - } - // end cut & paste (modulo pixmap centering) - } - - else { - // big icons -> draw text below icon - int y = margin; - const TQPixmap *pm = pixmap(); - - if ( !pm->isNull() ) { - int x = (w - pm->width()) / 2; - x = QMAX( x, margin ); - p->drawPixmap( x, y, *pm ); - } - - if ( !text().isEmpty() ) { - TQFontMetrics fm = p->fontMetrics(); - y += pm->height() + fm.height() - fm.descent(); - - int stringWidth = box->width() - (margin * 2); - TQString visibleText = KStringHandler::rPixelSqueeze( text(), fm, stringWidth ); - int x = (w - fm.width( visibleText )) / 2; - x = QMAX( x, margin ); - - if ( isCurrent() || isSelected() ) { - p->setPen( box->colorGroup().highlight().dark(115) ); - p->drawText( x + ( TQApplication::reverseLayout() ? -1 : 1), - y + 1, visibleText ); - p->setPen( box->colorGroup().highlightedText() ); - } - - p->drawText( x, y, visibleText ); - } - } -} - -TQSize KURLBarItem::sizeHint() const -{ - int wmin = 0; - int hmin = 0; - const KURLBarListBox *lb =static_cast(listBox()); - - if ( m_parent->iconSize() < KIcon::SizeMedium ) { - wmin = TQListBoxPixmap::width( lb ) + KDialog::spacingHint() * 2; - hmin = TQListBoxPixmap::height( lb ) + KDialog::spacingHint() * 2; - } - else { - wmin = QMAX(lb->fontMetrics().width(text()), pixmap()->width()) + KDialog::spacingHint() * 2; - hmin = lb->fontMetrics().lineSpacing() + pixmap()->height() + KDialog::spacingHint() * 2; - } - - if ( lb->isVertical() ) - wmin = QMIN( wmin, lb->viewport()->sizeHint().width() ); - else - hmin = QMIN( hmin, lb->viewport()->sizeHint().height() ); - - return TQSize( wmin, hmin ); -} - -int KURLBarItem::width( const TQListBox *lb ) const -{ - if ( static_cast( lb )->isVertical() ) - return QMAX( sizeHint().width(), lb->viewport()->width() ); - else - return sizeHint().width(); -} - -int KURLBarItem::height( const TQListBox *lb ) const -{ - if ( static_cast( lb )->isVertical() ) - return sizeHint().height(); - else - return QMAX( sizeHint().height(), lb->viewport()->height() ); -} - -bool KURLBarItem::isPersistent() const -{ - return d->isPersistent; -} - -/////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////// - -class KURLBar::KURLBarPrivate -{ -public: - KURLBarPrivate() - { - currentURL.setPath( TQDir::homeDirPath() ); - defaultIconSize = 0; - } - - int defaultIconSize; - KURL currentURL; -}; - - -KURLBar::KURLBar( bool useGlobalItems, TQWidget *parent, const char *name, WFlags f ) - : TQFrame( parent, name, f ), - m_activeItem( 0L ), - m_useGlobal( useGlobalItems ), - m_isModified( false ), - m_isImmutable( false ), - m_listBox( 0L ), - m_iconSize( KIcon::SizeMedium ) -{ - d = new KURLBarPrivate(); - - setListBox( 0L ); - setSizePolicy( TQSizePolicy( isVertical() ? - TQSizePolicy::Maximum : - TQSizePolicy::Preferred, - isVertical() ? - TQSizePolicy::Preferred : - TQSizePolicy::Maximum )); - TQWhatsThis::add(this, i18n("The Quick Access panel provides easy access to commonly used file locations.

" - "Clicking on one of the shortcut entries will take you to that location.

" - "By right clicking on an entry you can add, edit and remove shortcuts.")); -} - -KURLBar::~KURLBar() -{ - delete d; -} - -KURLBarItem * KURLBar::insertItem(const KURL& url, const TQString& description, - bool applicationLocal, - const TQString& icon, KIcon::Group group ) -{ - KURLBarItem *item = new KURLBarItem(this, url, description, icon, group); - item->setApplicationLocal( applicationLocal ); - m_listBox->insertItem( item ); - return item; -} - -KURLBarItem * KURLBar::insertDynamicItem(const KURL& url, const TQString& description, - const TQString& icon, KIcon::Group group ) -{ - KURLBarItem *item = new KURLBarItem(this, url, false, description, icon, group); - m_listBox->insertItem( item ); - return item; -} - -void KURLBar::setOrientation( Qt::Orientation orient ) -{ - m_listBox->setOrientation( orient ); - setSizePolicy( TQSizePolicy( isVertical() ? - TQSizePolicy::Maximum : - TQSizePolicy::Preferred, - isVertical() ? - TQSizePolicy::Preferred : - TQSizePolicy::Maximum )); -} - -Qt::Orientation KURLBar::orientation() const -{ - return m_listBox->orientation(); -} - -void KURLBar::setListBox( KURLBarListBox *view ) -{ - delete m_listBox; - - if ( !view ) { - m_listBox = new KURLBarListBox( this, "urlbar listbox" ); - setOrientation( Qt::Vertical ); - } - else { - m_listBox = view; - if ( m_listBox->parentWidget() != this ) - m_listBox->reparent( this, TQPoint(0,0) ); - m_listBox->resize( width(), height() ); - } - - m_listBox->setSelectionMode( KListBox::Single ); - paletteChange( palette() ); - m_listBox->setFocusPolicy( TQ_TabFocus ); - - connect( m_listBox, TQT_SIGNAL( mouseButtonClicked( int, TQListBoxItem *, const TQPoint & ) ), - TQT_SLOT( slotSelected( int, TQListBoxItem * ))); - connect( m_listBox, TQT_SIGNAL( dropped( TQDropEvent * )), - this, TQT_SLOT( slotDropped( TQDropEvent * ))); - connect( m_listBox, TQT_SIGNAL( contextMenuRequested( TQListBoxItem *, - const TQPoint& )), - TQT_SLOT( slotContextMenuRequested( TQListBoxItem *, const TQPoint& ))); - connect( m_listBox, TQT_SIGNAL( returnPressed( TQListBoxItem * ) ), - TQT_SLOT( slotSelected( TQListBoxItem * ) )); -} - -void KURLBar::setIconSize( int size ) -{ - if ( size == m_iconSize ) - return; - - m_iconSize = size; - - // reload the icons with the new size - KURLBarItem *item = static_cast( m_listBox->firstItem() ); - while ( item ) { - item->setIcon( item->icon(), item->iconGroup() ); - item = static_cast( item->next() ); - } - - resize( sizeHint() ); - updateGeometry(); -} - -void KURLBar::clear() -{ - m_listBox->clear(); -} - -void KURLBar::resizeEvent( TQResizeEvent *e ) -{ - TQFrame::resizeEvent( e ); - m_listBox->resize( width(), height() ); -} - -void KURLBar::paletteChange( const TQPalette & ) -{ - TQPalette pal = palette(); - TQColor gray = pal.color( TQPalette::Normal, TQColorGroup::Background ); - TQColor selectedTextColor = pal.color( TQPalette::Normal, TQColorGroup::BrightText ); - TQColor foreground = pal.color( TQPalette::Normal, TQColorGroup::Foreground ); - pal.setColor( TQPalette::Normal, TQColorGroup::Base, gray ); - pal.setColor( TQPalette::Normal, TQColorGroup::HighlightedText, selectedTextColor ); - pal.setColor( TQPalette::Normal, TQColorGroup::Text, foreground ); - pal.setColor( TQPalette::Inactive, TQColorGroup::Base, gray ); - pal.setColor( TQPalette::Inactive, TQColorGroup::HighlightedText, selectedTextColor ); - pal.setColor( TQPalette::Inactive, TQColorGroup::Text, foreground ); - - setPalette( pal ); -} - -TQSize KURLBar::sizeHint() const -{ - return m_listBox->sizeHint(); - -#if 0 - // this code causes vertical and or horizontal scrollbars appearing - // depending on the text, font, moonphase and earth rotation. Just using - // m_listBox->sizeHint() fixes this (although the widget can then be - // resized to a smaller size so that scrollbars appear). - int w = 0; - int h = 0; - KURLBarItem *item; - bool vertical = isVertical(); - - for ( item = static_cast( m_listBox->firstItem() ); - item; - item = static_cast( item->next() ) ) { - - TQSize sh = item->sizeHint(); - - if ( vertical ) { - w = QMAX( w, sh.width() ); - h += sh.height(); - } - else { - w += sh.width(); - h = QMAX( h, sh.height() ); - } - } - -// if ( vertical && m_listBox->verticalScrollBar()->isVisible() ) -// w += m_listBox->verticalScrollBar()->width(); -// else if ( !vertical && m_listBox->horizontalScrollBar()->isVisible() ) -// h += m_listBox->horizontalScrollBar()->height(); - - if ( w == 0 && h == 0 ) - return TQSize( 100, 200 ); - else - return TQSize( 6 + w, h ); -#endif -} - -TQSize KURLBar::minimumSizeHint() const -{ - TQSize s = sizeHint(); // ### - int w = s.width() + m_listBox->verticalScrollBar()->width(); - int h = s.height() + m_listBox->horizontalScrollBar()->height(); - return TQSize( w, h ); -} - -void KURLBar::slotSelected( int button, TQListBoxItem *item ) -{ - if ( button != Qt::LeftButton ) - return; - - slotSelected( item ); -} - -void KURLBar::slotSelected( TQListBoxItem *item ) -{ - if ( item && item != m_activeItem ) - m_activeItem = static_cast( item ); - - if ( m_activeItem ) { - m_listBox->setCurrentItem( m_activeItem ); - emit activated( m_activeItem->url() ); - } -} - -void KURLBar::setCurrentItem( const KURL& url ) -{ - d->currentURL = url; - - TQString u = url.url(-1); - - if ( m_activeItem && m_activeItem->url().url(-1) == u ) - return; - - bool hasURL = false; - TQListBoxItem *item = m_listBox->firstItem(); - while ( item ) { - if ( static_cast( item )->url().url(-1) == u ) { - m_activeItem = static_cast( item ); - m_listBox->setCurrentItem( item ); - m_listBox->setSelected( item, true ); - hasURL = true; - break; - } - item = item->next(); - } - - if ( !hasURL ) { - m_activeItem = 0L; - m_listBox->clearSelection(); - } -} - -KURLBarItem * KURLBar::currentItem() const -{ - TQListBoxItem *item = m_listBox->item( m_listBox->currentItem() ); - if ( item ) - return static_cast( item ); - return 0L; -} - -KURL KURLBar::currentURL() const -{ - KURLBarItem *item = currentItem(); - return item ? item->url() : KURL(); -} - -void KURLBar::readConfig( TDEConfig *appConfig, const TQString& itemGroup ) -{ - m_isImmutable = appConfig->groupIsImmutable( itemGroup ); - TDEConfigGroupSaver cs( appConfig, itemGroup ); - d->defaultIconSize = m_iconSize; - m_iconSize = appConfig->readNumEntry( "Speedbar IconSize", m_iconSize ); - - if ( m_useGlobal ) { // read global items - TDEConfig *globalConfig = TDEGlobal::config(); - TDEConfigGroupSaver cs( globalConfig, (TQString)(itemGroup +" (Global)")); - int num = globalConfig->readNumEntry( "Number of Entries" ); - for ( int i = 0; i < num; i++ ) { - readItem( i, globalConfig, false ); - } - } - - // read application local items - int num = appConfig->readNumEntry( "Number of Entries" ); - for ( int i = 0; i < num; i++ ) { - readItem( i, appConfig, true ); - } -} - -void KURLBar::readItem( int i, TDEConfig *config, bool applicationLocal ) -{ - TQString number = TQString::number( i ); - KURL url = KURL::fromPathOrURL( config->readPathEntry( TQString("URL_") + number )); - if ( !url.isValid() || !KProtocolInfo::isKnownProtocol( url )) - return; // nothing we could do. - - TQString description = config->readEntry( TQString("Description_") + number ); - - if (description.isEmpty() && url.protocol()=="beagle") { - TDEIO::UDSEntry uds; - const KURL kurl("beagle:?beagled-status"); - if (!TDEIO::NetAccess::stat(kurl, uds)) - return; - - description = i18n("Desktop Search"); - } - - insertItem( url, - description, - applicationLocal, - config->readEntry( TQString("Icon_") + number ), - static_cast( - config->readNumEntry( TQString("IconGroup_") + number )) ); -} - -void KURLBar::writeConfig( TDEConfig *config, const TQString& itemGroup ) -{ - TDEConfigGroupSaver cs1( config, itemGroup ); - if(!config->hasDefault("Speedbar IconSize") && m_iconSize == d->defaultIconSize ) - config->revertToDefault("Speedbar IconSize"); - else - config->writeEntry( "Speedbar IconSize", m_iconSize ); - - if ( !m_isModified ) - return; - - int i = 0; - int numLocal = 0; - KURLBarItem *item = static_cast( m_listBox->firstItem() ); - - while ( item ) - { - if ( item->isPersistent() ) // we only save persistent items - { - if ( item->applicationLocal() ) - { - writeItem( item, numLocal, config, false ); - numLocal++; - } - - i++; - } - item = static_cast( item->next() ); - } - config->writeEntry("Number of Entries", numLocal); - - - // write the global entries to kdeglobals, if any - bool haveGlobalEntries = (i > numLocal); - if ( m_useGlobal && haveGlobalEntries ) { - config->setGroup( itemGroup + " (Global)" ); - - int numGlobals = 0; - item = static_cast( m_listBox->firstItem() ); - - while ( item ) - { - if ( item->isPersistent() ) // we only save persistent items - { - if ( !item->applicationLocal() ) - { - writeItem( item, numGlobals, config, true ); - numGlobals++; - } - } - - item = static_cast( item->next() ); - } - config->writeEntry("Number of Entries", numGlobals, true, true); - } - - m_isModified = false; -} - -void KURLBar::writeItem( KURLBarItem *item, int i, TDEConfig *config, - bool global ) -{ - if ( !item->isPersistent() ) - return; - - TQString Description = "Description_"; - TQString URL = "URL_"; - TQString Icon = "Icon_"; - TQString IconGroup = "IconGroup_"; - - TQString number = TQString::number( i ); - config->writePathEntry( URL + number, item->url().prettyURL(), true, global ); - - config->writeEntry( Description + number, item->description(),true,global); - config->writeEntry( Icon + number, item->icon(), true, global ); - config->writeEntry( IconGroup + number, item->iconGroup(), true, global ); -} - - -void KURLBar::slotDropped( TQDropEvent *e ) -{ - KURL::List urls; - if ( KURLDrag::decode( e, urls ) ) { - KURL url; - TQString description; - TQString icon; - bool appLocal = false; - - KURL::List::Iterator it = urls.begin(); - for ( ; it != urls.end(); ++it ) { - (void) insertItem( *it, description, appLocal, icon ); - m_isModified = true; - updateGeometry(); - } - } -} - -void KURLBar::slotContextMenuRequested( TQListBoxItem *_item, const TQPoint& pos ) -{ - if (m_isImmutable) - return; - - KURLBarItem *item = dynamic_cast( _item ); - - static const int IconSize = 10; - static const int AddItem = 20; - static const int EditItem = 30; - static const int RemoveItem = 40; - - KURL lastURL = m_activeItem ? m_activeItem->url() : KURL(); - - bool smallIcons = m_iconSize < KIcon::SizeMedium; - TQPopupMenu *popup = new TQPopupMenu(); - popup->insertItem( smallIcons ? - i18n("&Large Icons") : i18n("&Small Icons"), - IconSize ); - popup->insertSeparator(); - - if (item != 0L && item->isPersistent()) - { - popup->insertItem(SmallIconSet("edit"), i18n("&Edit Entry..."), EditItem); - popup->insertSeparator(); - } - - popup->insertItem(SmallIconSet("filenew"), i18n("&Add Entry..."), AddItem); - - if (item != 0L && item->isPersistent()) - { - popup->insertItem( SmallIconSet("editdelete"), i18n("&Remove Entry"), - RemoveItem ); - } - - int result = popup->exec( pos ); - switch ( result ) { - case IconSize: - setIconSize( smallIcons ? KIcon::SizeMedium : KIcon::SizeSmallMedium ); - m_listBox->triggerUpdate( true ); - break; - case AddItem: - addNewItem(); - break; - case EditItem: - editItem( static_cast( item ) ); - break; - case RemoveItem: - delete item; - m_isModified = true; - break; - default: // abort - break; - } - - // reset current item - m_activeItem = 0L; - setCurrentItem( lastURL ); -} - -bool KURLBar::addNewItem() -{ - KURLBarItem *item = new KURLBarItem( this, d->currentURL, - i18n("Enter a description") ); - if ( editItem( item ) ) { - m_listBox->insertItem( item ); - return true; - } - - delete item; - return false; -} - -bool KURLBar::editItem( KURLBarItem *item ) -{ - if ( !item || !item->isPersistent() ) // should never happen tho - return false; - - KURL url = item->url(); - TQString description = item->description(); - TQString icon = item->icon(); - bool appLocal = item->applicationLocal(); - - if ( KURLBarItemDialog::getInformation( m_useGlobal, - url, description, - icon, appLocal, - m_iconSize, this )) - { - item->setURL( url ); - item->setDescription( description ); - item->setIcon( icon ); - item->setApplicationLocal( appLocal ); - m_listBox->triggerUpdate( true ); - m_isModified = true; - updateGeometry(); - return true; - } - - return false; -} - -/////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////// - - -KURLBarListBox::KURLBarListBox( TQWidget *parent, const char *name ) - : KListBox( parent, name ) -{ - m_toolTip = new KURLBarToolTip( this ); - setAcceptDrops( true ); - viewport()->setAcceptDrops( true ); -} - -KURLBarListBox::~KURLBarListBox() -{ - delete m_toolTip; -} - -void KURLBarListBox::paintEvent( TQPaintEvent* ) -{ - TQPainter p(this); - p.setPen( colorGroup().mid() ); - p.drawRect( 0, 0, width(), height() ); -} - -TQDragObject * KURLBarListBox::dragObject() -{ - KURL::List urls; - KURLBarItem *item = static_cast( firstItem() ); - - while ( item ) { - if ( item->isSelected() ) - urls.append( item->url() ); - item = static_cast( item->next() ); - } - - if ( !urls.isEmpty() ) // ### use custom drag-object with description etc.? - return new KURLDrag( urls, this, "urlbar drag" ); - - return 0L; -} - -void KURLBarListBox::contentsDragEnterEvent( TQDragEnterEvent *e ) -{ - e->accept( KURLDrag::canDecode( e )); -} - -void KURLBarListBox::contentsDropEvent( TQDropEvent *e ) -{ - emit dropped( e ); -} - -void KURLBarListBox::contextMenuEvent( TQContextMenuEvent *e ) -{ - if (e) - { - emit contextMenuRequested( itemAt( e->globalPos() ), e->globalPos() ); - e->consume(); // Consume the event to avoid multiple contextMenuEvent calls... - } -} - -void KURLBarListBox::setOrientation( Qt::Orientation orient ) -{ - if ( orient == Qt::Vertical ) { - setColumnMode( 1 ); - setRowMode( Variable ); - } - else { - setRowMode( 1 ); - setColumnMode( Variable ); - } - - m_orientation = orient; -} - -/////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////// - - -bool KURLBarItemDialog::getInformation( bool allowGlobal, KURL& url, - TQString& description, TQString& icon, - bool& appLocal, int iconSize, - TQWidget *parent ) -{ - KURLBarItemDialog *dialog = new KURLBarItemDialog( allowGlobal, url, - description, icon, - appLocal, - iconSize, parent ); - if ( dialog->exec() == TQDialog::Accepted ) { - // set the return parameters - url = dialog->url(); - description = dialog->description(); - icon = dialog->icon(); - appLocal = dialog->applicationLocal(); - - delete dialog; - return true; - } - - delete dialog; - return false; -} - -KURLBarItemDialog::KURLBarItemDialog( bool allowGlobal, const KURL& url, - const TQString& description, - TQString icon, bool appLocal, - int iconSize, - TQWidget *parent, const char *name ) - : KDialogBase( parent, name, true, - i18n("Edit Quick Access Entry"), Ok | Cancel, Ok, true ) -{ - TQVBox *box = new TQVBox( this ); - TQString text = i18n("Please provide a description, URL and icon for this Quick Access entry.
"); - TQLabel *label = new TQLabel( text, box ); - box->setSpacing( spacingHint() ); - - TQGrid *grid = new TQGrid( 2, box ); - grid->setSpacing( spacingHint() ); - - TQString whatsThisText = i18n("This is the text that will appear in the Quick Access panel.

" - "The description should consist of one or two words " - "that will help you remember what this entry refers to."); - label = new TQLabel( i18n("&Description:"), grid ); - m_edit = new KLineEdit( grid, "description edit" ); - m_edit->setText( description.isEmpty() ? url.fileName() : description ); - label->setBuddy( m_edit ); - TQWhatsThis::add( label, whatsThisText ); - TQWhatsThis::add( m_edit, whatsThisText ); - - whatsThisText = i18n("This is the location associated with the entry. Any valid URL may be used. For example:

" - "%1
http://www.kde.org
ftp://ftp.kde.org/pub/kde/stable

" - "By clicking on the button next to the text edit box you can browse to an " - "appropriate URL.").arg(TQDir::homeDirPath()); - label = new TQLabel( i18n("&URL:"), grid ); - m_urlEdit = new KURLRequester( url.prettyURL(), grid ); - m_urlEdit->setMode( KFile::Directory ); - label->setBuddy( m_urlEdit ); - TQWhatsThis::add( label, whatsThisText ); - TQWhatsThis::add( m_urlEdit, whatsThisText ); - - whatsThisText = i18n("This is the icon that will appear in the Quick Access panel.

" - "Click on the button to select a different icon."); - label = new TQLabel( i18n("Choose an &icon:"), grid ); - m_iconButton = new KIconButton( grid, "icon button" ); - m_iconButton->setIconSize( iconSize ); - if ( icon.isEmpty() ) - icon = KMimeType::iconForURL( url ); - m_iconButton->setIcon( icon ); - label->setBuddy( m_iconButton ); - TQWhatsThis::add( label, whatsThisText ); - TQWhatsThis::add( m_iconButton, whatsThisText ); - - if ( allowGlobal ) { - TQString appName; - if ( TDEGlobal::instance()->aboutData() ) - appName = TDEGlobal::instance()->aboutData()->programName(); - if ( appName.isEmpty() ) - appName = TQString::fromLatin1( TDEGlobal::instance()->instanceName() ); - m_appLocal = new TQCheckBox( i18n("&Only show when using this application (%1)").arg( appName ), box ); - m_appLocal->setChecked( appLocal ); - TQWhatsThis::add( m_appLocal, - i18n("Select this setting if you want this " - "entry to show only when using the current application (%1).

" - "If this setting is not selected, the entry will be available in all " - "applications.") - .arg(appName)); - } - else - m_appLocal = 0L; - connect(m_urlEdit->lineEdit(),TQT_SIGNAL(textChanged ( const TQString & )),this,TQT_SLOT(urlChanged(const TQString & ))); - m_edit->setFocus(); - setMainWidget( box ); -} - -KURLBarItemDialog::~KURLBarItemDialog() -{ -} - -void KURLBarItemDialog::urlChanged(const TQString & text ) -{ - enableButtonOK( !text.isEmpty() ); -} - -KURL KURLBarItemDialog::url() const -{ - TQString text = m_urlEdit->url(); - KURL u; - if ( text.at(0) == '/' ) - u.setPath( text ); - else - u = text; - - return u; -} - -TQString KURLBarItemDialog::description() const -{ - return m_edit->text(); -} - -TQString KURLBarItemDialog::icon() const -{ - return m_iconButton->icon(); -} - -bool KURLBarItemDialog::applicationLocal() const -{ - if ( !m_appLocal ) - return true; - - return m_appLocal->isChecked(); -} - -void KURLBarItem::virtual_hook( int, void* ) -{ /*BASE::virtual_hook( id, data );*/ } - -void KURLBar::virtual_hook( int, void* ) -{ /*BASE::virtual_hook( id, data );*/ } - -void KURLBarListBox::virtual_hook( int id, void* data ) -{ KListBox::virtual_hook( id, data ); } - - -#include "kurlbar.moc" diff --git a/kio/kfile/kurlbar.h b/kio/kfile/kurlbar.h deleted file mode 100644 index 32c05ec58..000000000 --- a/kio/kfile/kurlbar.h +++ /dev/null @@ -1,660 +0,0 @@ -/* This file is part of the KDE libraries - Copyright (C) 2001,2002,2003 Carsten Pfeiffer - - library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation, version 2. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef KURLBAR_H -#define KURLBAR_H - -#include -#include -#include - -#include -#include -#include -#include - -class TDEConfig; -class KURLBar; - -/** - * An item to be used in KURLBar / KURLBarListBox. All the properties - * (url, icon, description, tooltip) can be changed dynamically. - * - * @author Carsten Pfeiffer - * @see KURLBar - * @see KURLBarListBox - */ -class TDEIO_EXPORT KURLBarItem : public TQListBoxPixmap -{ -public: - /** - * Creates a KURLBarItem to be used in the @p parent KURLBar. You need - * to insert the item into the listbox manually, if you don't use - * KURLBar::insertItem(). - * - * If description is empty, it will try to use the filename/directory - * of @p url, which will be shown as text of the item. - * @p url will be used as tooltip, unless you set a different tip with - * setToolTip(). - * @p persistent specifies whether this item is a persistent item or a - * dynamic item, that is not saved with KURLBar::writeConfig(). - * @since 3.2 - */ - KURLBarItem( KURLBar *parent, const KURL& url, bool persistent, - const TQString& description = TQString::null, - const TQString& icon = TQString::null, - KIcon::Group group = KIcon::Panel ); - - /** - * Creates a persistent KURLBarItem to be used in the @p parent KURLBar. You need - * to insert the item into the listbox manually, if you don't use - * KURLBar::insertItem(). - * - * If description is empty, it will try to use the filename/directory - * of @p url, which will be shown as text of the item. - * @p url will be used as tooltip, unless you set a different tip with - * setToolTip(). - * @p persistent specifies whether this item is a persistent item or a - * dynamic item, that is not saved with KURLBar::writeConfig(). - */ - KURLBarItem( KURLBar *parent, const KURL& url, - const TQString& description = TQString::null, - const TQString& icon = TQString::null, - KIcon::Group group = KIcon::Panel ); - - /** - * Destroys the item - */ - ~KURLBarItem(); - - /** - * Sets @p url for this item. Also updates the visible text to the - * filename/directory of the url, if no description is set. - * @see url - */ - void setURL( const KURL& url ); - /** - * @p sets the icon for this item. See KIconLoader for a description - * of the icon groups. - * @see icon - */ - void setIcon( const TQString& icon, KIcon::Group group = KIcon::Panel ); - /** - * Sets the description of this item that will be shown as item-text. - * @see description - */ - void setDescription( const TQString& desc ); - /** - * Sets a tooltip to be used for this item. - * @see toolTip - */ - void setToolTip( const TQString& tip ); - - /** - * returns the preferred size of this item - * @since 3.1 - */ - TQSize sizeHint() const; - - /** - * returns the width of this item. - */ - virtual int width( const TQListBox * ) const; - /** - * returns the height of this item. - */ - virtual int height( const TQListBox * ) const; - - /** - * returns the url of this item. - * @see setURL - */ - const KURL& url() const { return m_url; } - /** - * returns the description of this item. - * @see setDescription - */ - const TQString& description() const { return m_description; } - /** - * returns the icon of this item. - * @see setIcon - */ - const TQString& icon() const { return m_icon; } - /** - * returns the tooltip of this item. - * @see setToolTip - */ - TQString toolTip() const; - /** - * returns the icon-group of this item (determines icon-effects). - * @see setIcon - */ - KIcon::Group iconGroup() const { return m_group; } - /** - * returns the pixmap of this item. - */ - virtual const TQPixmap * pixmap() const { return &m_pixmap; } - - /** - * Makes this item a local or global one. This has only an effect - * on persistent items of course. - * @see isPersistent - * @see applicationLocal - */ - void setApplicationLocal( bool local ); - - /** - * returns whether this is a global item or a local one. KURLBar - * can differentiate between global and local items (only for the current - * application) for easy extensiblity. - * @see setApplicationLocal - */ - bool applicationLocal() const { return m_appLocal; } - - /** - * returns whether this item is persistent (via KURLBar::writeConfig() - * and KURLBar::readConfig()) or not. - * @since 3.2 - */ - bool isPersistent() const; - -protected: - virtual void paint( TQPainter *p ); - -private: - int iconSize() const; - void init( const TQString& icon, KIcon::Group group, - const TQString& description, bool persistent ); - - KURL m_url; - TQString m_description; - TQString m_icon; - TQString m_toolTip; - TQPixmap m_pixmap; - KIcon::Group m_group; - KURLBar *m_parent; - bool m_appLocal :1; - -protected: - virtual void virtual_hook( int id, void* data ); -private: - class KURLBarItemPrivate; - KURLBarItemPrivate *d; -}; - - -/////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////// - - -class KURLBarListBox; - -/** - * KURLBar is a widget that displays icons together with a description. They - * can be arranged either horizontally or vertically. Clicking on an item - * will cause the activated() signal to be emitted. The user can edit - * existing items by choosing "Edit entry" in the contextmenu. He can also - * remove or add new entries (via drag&drop or the context menu). - * - * KURLBar offers the methods readConfig() and writeConfig() to - * read and write the configuration of all the entries. It can differentiate - * between global and local entries -- global entries will be saved in the - * global configuration (kdeglobals), while local entries will be saved in - * your application's TDEConfig object. - * - * Due to the configurability, you usually only insert some default entries - * once and then solely use the read and writeConfig methods to preserve the - * user's configuration. - * - * The widget has a "current" item, that is visualized to differentiate it - * from others. - * - * @author Carsten Pfeiffer - * @short A URL-bar widget, as used in the KFileDialog - */ -class TDEIO_EXPORT KURLBar : public TQFrame -{ - Q_OBJECT - -public: - /** - * Constructs a KURLBar. Set @p useGlobalItems to true if you want to - * allow global/local item separation. - */ - KURLBar( bool useGlobalItems, - TQWidget *parent = 0, const char *name = 0, WFlags f = 0 ); - /** - * Destroys the KURLBar. - */ - ~KURLBar(); - - /** - * Inserts a new item into the KURLBar and returns the created - * KURLBarItem. - * - * @p url the url of the item - * @p description the description of the item (shown in the view) - * @p applicationLocal whether this should be a global or a local item - * @p icon an icon -- if empty, the default icon for the url will be used - * @p group the icon-group for using icon-effects - */ - virtual KURLBarItem * insertItem( const KURL& url, - const TQString& description, - bool applicationLocal = true, - const TQString& icon = TQString::null, - KIcon::Group group = KIcon::Panel ); - /** - * Inserts a new dynamic item into the KURLBar and returns the created - * KURLBarItem. - * - * @p url the url of the item - * @p description the description of the item (shown in the view) - * @p icon an icon -- if empty, the default icon for the url will be used - * @p group the icon-group for using icon-effects - * @since 3.2 - */ - virtual KURLBarItem * insertDynamicItem( const KURL& url, - const TQString& description, - const TQString& icon = TQString::null, - KIcon::Group group = KIcon::Panel ); - /** - * The items can be arranged either vertically in one column or - * horizontally in one row. - * @see orientation - */ - virtual void setOrientation( Qt::Orientation orient ); - /** - * @returns the current orientation mode. - * @see setOrientation - */ - Orientation orientation() const; - - /** - * Allows to set a custom KURLBarListBox. - * Note: The previous listbox will be deleted. Items of the previous - * listbox will not be moved to the new box. - * @see listBox - */ - virtual void setListBox( KURLBarListBox * ); - /** - * @returns the KURLBarListBox that is used. - * @see setListBox - */ - KURLBarListBox *listBox() const { return m_listBox; } - - /** - * Sets the default iconsize to be used for items inserted with - * insertItem. By default KIcon::SizeMedium. - * @see iconsize - */ - virtual void setIconSize( int size ); - /** - * @returns the default iconsize used for items inserted with - * insertItem. By default KIcon::SizeMedium - * @see setIconSize - */ - int iconSize() const { return m_iconSize; } - - /** - * Clears the view, removes all items. - */ - virtual void clear(); - - /** - * @returns a proper sizehint, depending on the orientation and the number - * of items available. - */ - virtual TQSize sizeHint() const; - - /** - * @returns a proper minimum size (reimplemented) - */ - virtual TQSize minimumSizeHint() const; - - /** - * Call this method to read a saved configuration from @p config, - * inside the group @p itemGroup. All items in there will be restored. - * The reading of every item is delegated to the readItem() method. - */ - virtual void readConfig( TDEConfig *config, const TQString& itemGroup ); - /** - * Call this method to save the current configuration into @p config, - * inside the group @p iconGroup. The writeItem() method is used - * to save each item. - */ - virtual void writeConfig( TDEConfig *config, const TQString& itemGroup ); - - /** - * Called from readConfig() to read the i'th from @p config. - * After reading a KURLBarItem is created and initialized with the read - * values (as well as the given @p applicationLocal). - */ - virtual void readItem( int i, TDEConfig *config, bool applicationLocal ); - /** - * Called from writeConfig() to save the KURLBarItem @p item as the - * i'th entry in the config-object. - * @p global tell whether it should be saved in the global configuration - * or not (using TDEConfig::writeEntry( key, value, true, global ) ). - */ - virtual void writeItem( KURLBarItem *item, int i, TDEConfig *, bool global ); - - /** - * @returns the current KURLBarItem, or 0L if none. - * @see setCurrentItem - * @see currentURL - */ - KURLBarItem * currentItem() const; - /** - * @returns the url of the current item or an invalid url, if there is - * no current item. - * @see currentItem - * @see setCurrentItem - */ - KURL currentURL() const; - - /** - * @returns true when the urlbar was modified by the user (e.g. by - * editing/adding/removing one or more entries). Will be reset to false - * after calling writeConfig(). - */ - bool isModified() const { return m_isModified; } - - /** - * @returns true when the urlbar may not be modified by the user - */ - bool isImmutable() const { return m_isImmutable; } - - /** - * @returns true if the bar is in vertical mode. - */ - bool isVertical() const { return orientation() == Qt::Vertical; } - -public slots: - /** - * Makes the item with the url @p url the current item. Does nothing - * if no item with that url is available. - * @see currentItem - * @see currentURL - */ - virtual void setCurrentItem( const KURL& url ); - -signals: - /** - * This signal is emitted when the user activated an item, e.g., by - * clicking on it. - */ - void activated( const KURL& url ); - -protected: - /** - * Pops up a KURLBarItemDialog to let the user add a new item. - * Uses editItem() to do the job. - * @returns false if the user aborted the dialog and no item is added. - */ - virtual bool addNewItem(); - /** - * Pops up a KURLBarItemDialog to let the user edit the properties - * of @p item. Invoked e.g. by addNewItem(), when the user drops - * a url onto the bar or from the contextmenu. - * @returns false if the user aborted the dialog and @p item is not - * changed. - */ - virtual bool editItem( KURLBarItem *item ); - - virtual void resizeEvent( TQResizeEvent * ); - - virtual void paletteChange( const TQPalette & ); - - /** - * The currently active item. - */ - KURLBarItem * m_activeItem; - /** - * Whether we support global entries or just local ones. - */ - bool m_useGlobal :1; - - /** - * Whether the urlbar was modified by the user (e.g. by - * editing/adding/removing an item). - */ - bool m_isModified :1; - - /** - * Whether the urlbar may be modified by the user. - * If immutable is true, the urlbar can not be modified. - */ - bool m_isImmutable :1; - -protected slots: - /** - * Reimplemented to show a contextmenu, allowing the user to add, edit - * or remove items, or change the iconsize. - */ - virtual void slotContextMenuRequested( TQListBoxItem *, const TQPoint& pos ); - /** - * Called when an item has been selected. Emits the activated() - * signal. - */ - virtual void slotSelected( TQListBoxItem * ); - - /** - * Called when a url was dropped onto the bar to show a - * KURLBarItemDialog. - */ - virtual void slotDropped( TQDropEvent * ); - -private slots: - void slotSelected( int button, TQListBoxItem * ); - -private: - KURLBarListBox *m_listBox; - int m_iconSize; - - -protected: - virtual void virtual_hook( int id, void* data ); -private: - class KURLBarPrivate; - KURLBarPrivate *d; -}; - - -/////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////// - - -class TQDragObject; -class KURLBarToolTip; - -/** - * This is the listbox used in KURLBar. It is a subclass of KListBox to support - * drag & drop and to set up the row / column mode. - * - * The widget has just one row or one column, depending on orientation(). - * - * @author Carsten Pfeiffer - */ -class TDEIO_EXPORT KURLBarListBox : public KListBox -{ - Q_OBJECT - -public: - /** - * Constructs a KURLBarListBox. - */ - KURLBarListBox( TQWidget *parent = 0, const char *name = 0 ); - /** - * Destroys the box. - */ - ~KURLBarListBox(); - - /** - * Sets the orientation of the widget. Horizontal means, all items are - * arranged in one row. Vertical means, all items are arranged in one - * column. - * @see orientation - */ - virtual void setOrientation( Qt::Orientation orient ); - /** - * @returns the current orientation. - * @see setOrientation - */ - Qt::Orientation orientation() const { return m_orientation; } - - bool isVertical() const { return m_orientation == Qt::Vertical; } - -signals: - /** - * Emitted when a drop-event happened. - */ - void dropped( TQDropEvent *e ); - -protected: - /** - * @returns a suitable TQDragObject when an item is dragged. - */ - virtual TQDragObject * dragObject(); - - virtual void contentsDragEnterEvent( TQDragEnterEvent * ); - virtual void contentsDropEvent( TQDropEvent * ); - virtual void contextMenuEvent( TQContextMenuEvent * ); - virtual void paintEvent( TQPaintEvent* ); - -private: - Qt::Orientation m_orientation; - KURLBarToolTip *m_toolTip; - -protected: - virtual void virtual_hook( int id, void* data ); -private: - class KURLBarListBoxPrivate; - KURLBarListBoxPrivate *d; -}; - - -/////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////// - - -class TQCheckBox; -class KIconButton; -class KLineEdit; -class KURLRequester; - -/** - * A dialog that allows editing entries of a KURLBar ( KURLBarItem). - * The dialog offers to configure a given url, description and icon. - * See the class-method getInformation() for easy usage. - * - * @author Carsten Pfeiffer - */ -class TDEIO_EXPORT KURLBarItemDialog : public KDialogBase -{ - Q_OBJECT - -public: - /** - * A convenience method to show the dialog and retrieve all the - * properties via the given parameters. The parameters are used to - * initialize the dialog and then return the user-configured values. - * - * See the KURLBarItem constructor for the parameter description. - */ - static bool getInformation( bool allowGlobal, KURL& url, - TQString& description, TQString& icon, - bool& appLocal, int iconSize, - TQWidget *parent = 0 ); - - /** - * Constructs a KURLBarItemDialog. - * - * @p allowGlobal if you set this to true, the dialog will have a checkbox - * for the user to decide if he wants the entry to be - * available globally or just for the current application. - * @p url the url of the item - * @p description a short, translated description of the item - * @p icon an icon for the item - * @p appLocal tells whether the item should be local for this application - * or be available globally - * @p iconSize determines the size of the icon that is shown/selectable - * @p parent the parent-widget for the dialog - * - * If you leave the icon empty, the default icon for the given url will be - * used (KMimeType::pixmapForURL()). - */ - KURLBarItemDialog( bool allowGlobal, const KURL& url, - const TQString& description, TQString icon, - bool appLocal = true, - int iconSize = KIcon::SizeMedium, - TQWidget *parent = 0, const char *name = 0 ); - /** - * Destroys the dialog. - */ - ~KURLBarItemDialog(); - - /** - * @returns the configured url - */ - KURL url() const; - - /** - * @returns the configured description - */ - TQString description() const; - - /** - * @returns the configured icon - */ - TQString icon() const; - - /** - * @returns whether the item should be local to the application or global. - * If allowGlobal was set to false in the constructor, this will always - * return true. - */ - bool applicationLocal() const; - -protected: - /** - * The KURLRequester used for editing the url - */ - KURLRequester * m_urlEdit; - /** - * The KLineEdit used for editing the description - */ - KLineEdit * m_edit; - /** - * The KIconButton to configure the icon - */ - KIconButton * m_iconButton; - /** - * The TQCheckBox to modify the local/global setting - */ - TQCheckBox * m_appLocal; - -public slots: - void urlChanged(const TQString & ); - -private: - class KURLBarItemDialogPrivate; - KURLBarItemDialogPrivate *d; -}; - - -#endif // KURLBAR_H diff --git a/kio/kfile/kurlcombobox.cpp b/kio/kfile/kurlcombobox.cpp deleted file mode 100644 index e01be4548..000000000 --- a/kio/kfile/kurlcombobox.cpp +++ /dev/null @@ -1,363 +0,0 @@ -/* This file is part of the KDE libraries - Copyright (C) 2000,2001 Carsten Pfeiffer - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License version 2, as published by the Free Software Foundation. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include -#include - -#include -#include -#include -#include -#include - -#include - -class KURLComboBox::KURLComboBoxPrivate -{ -public: - KURLComboBoxPrivate() { - dirpix = SmallIcon(TQString::fromLatin1("folder")); - } - - TQPixmap dirpix; -}; - - -KURLComboBox::KURLComboBox( Mode mode, TQWidget *parent, const char *name ) - : KComboBox( parent, name ) -{ - init( mode ); -} - - -KURLComboBox::KURLComboBox( Mode mode, bool rw, TQWidget *parent, - const char *name ) - : KComboBox( rw, parent, name ) -{ - init( mode ); -} - - -KURLComboBox::~KURLComboBox() -{ - delete d; -} - - -void KURLComboBox::init( Mode mode ) -{ - d = new KURLComboBoxPrivate(); - - myMode = mode; - urlAdded = false; - myMaximum = 10; // default - itemList.setAutoDelete( true ); - defaultList.setAutoDelete( true ); - setInsertionPolicy( NoInsertion ); - setTrapReturnKey( true ); - setSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Fixed )); - - opendirPix = SmallIcon(TQString::fromLatin1("folder_open")); - - connect( this, TQT_SIGNAL( activated( int )), TQT_SLOT( slotActivated( int ))); -} - - -TQStringList KURLComboBox::urls() const -{ - kdDebug(250) << "::urls()" << endl; - //static const TQString &fileProt = TDEGlobal::staticQString("file:"); - TQStringList list; - TQString url; - for ( int i = defaultList.count(); i < count(); i++ ) { - url = text( i ); - if ( !url.isEmpty() ) { - //if ( url.at(0) == '/' ) - // list.append( url.prepend( fileProt ) ); - //else - list.append( url ); - } - } - - return list; -} - - -void KURLComboBox::addDefaultURL( const KURL& url, const TQString& text ) -{ - addDefaultURL( url, getPixmap( url ), text ); -} - - -void KURLComboBox::addDefaultURL( const KURL& url, const TQPixmap& pix, - const TQString& text ) -{ - KURLComboItem *item = new KURLComboItem; - item->url = url; - item->pixmap = pix; - if ( text.isEmpty() ) - if ( url.isLocalFile() ) - item->text = url.path( myMode ); - else - item->text = url.prettyURL( myMode ); - else - item->text = text; - - defaultList.append( item ); -} - - -void KURLComboBox::setDefaults() -{ - clear(); - itemMapper.clear(); - - KURLComboItem *item; - for ( unsigned int id = 0; id < defaultList.count(); id++ ) { - item = defaultList.at( id ); - insertURLItem( item ); - } -} - -void KURLComboBox::setURLs( TQStringList urls ) -{ - setURLs( urls, RemoveBottom ); -} - -void KURLComboBox::setURLs( TQStringList urls, OverLoadResolving remove ) -{ - setDefaults(); - itemList.clear(); - - if ( urls.isEmpty() ) - return; - - TQStringList::Iterator it = urls.begin(); - - // kill duplicates - TQString text; - while ( it != urls.end() ) { - while ( urls.contains( *it ) > 1 ) { - it = urls.remove( it ); - continue; - } - ++it; - } - - // limit to myMaximum items - /* Note: overload is an (old) C++ keyword, some compilers (KCC) choke - on that, so call it Overload (capital 'O'). (matz) */ - int Overload = urls.count() - myMaximum + defaultList.count(); - while ( Overload > 0 ) { - urls.remove((remove == RemoveBottom) ? urls.fromLast() : urls.begin()); - Overload--; - } - - it = urls.begin(); - - KURLComboItem *item = 0L; - KURL u; - - while ( it != urls.end() ) { - if ( (*it).isEmpty() ) { - ++it; - continue; - } - u = KURL::fromPathOrURL( *it ); - - // Don't restore if file doesn't exist anymore - if (u.isLocalFile() && !TQFile::exists(u.path())) { - ++it; - continue; - } - - item = new KURLComboItem; - item->url = u; - item->pixmap = getPixmap( u ); - - if ( u.isLocalFile() ) - item->text = u.path( myMode ); // don't show file:/ - else - item->text = *it; - - insertURLItem( item ); - itemList.append( item ); - ++it; - } -} - - -void KURLComboBox::setURL( const KURL& url ) -{ - if ( url.isEmpty() ) - return; - - blockSignals( true ); - - // check for duplicates - TQMap::ConstIterator mit = itemMapper.begin(); - TQString urlToInsert = url.url(-1); - while ( mit != itemMapper.end() ) { - if ( urlToInsert == mit.data()->url.url(-1) ) { - setCurrentItem( mit.key() ); - - if ( myMode == Directories ) - updateItem( mit.data(), mit.key(), opendirPix ); - - blockSignals( false ); - return; - } - ++mit; - } - - // not in the combo yet -> create a new item and insert it - - // first remove the old item - if ( urlAdded ) { - itemList.removeLast(); - urlAdded = false; - } - - setDefaults(); - - TQPtrListIterator it( itemList ); - for( ; it.current(); ++it ) - insertURLItem( it.current() ); - - KURLComboItem *item = new KURLComboItem; - item->url = url; - item->pixmap = getPixmap( url ); - if ( url.isLocalFile() ) - item->text = url.path( myMode ); - else - item->text = url.prettyURL( myMode ); - kdDebug(250) << "setURL: text=" << item->text << endl; - - int id = count(); - TQString text = /*isEditable() ? item->url.prettyURL( myMode ) : */ item->text; - - if ( myMode == Directories ) - KComboBox::insertItem( opendirPix, text, id ); - else - KComboBox::insertItem( item->pixmap, text, id ); - itemMapper.insert( id, item ); - itemList.append( item ); - - setCurrentItem( id ); - urlAdded = true; - blockSignals( false ); -} - - -void KURLComboBox::slotActivated( int index ) -{ - const KURLComboItem *item = itemMapper[ index ]; - - if ( item ) { - setURL( item->url ); - emit urlActivated( item->url ); - } -} - - -void KURLComboBox::insertURLItem( const KURLComboItem *item ) -{ -// kdDebug(250) << "insertURLItem " << item->text << endl; - int id = count(); - KComboBox::insertItem( item->pixmap, item->text, id ); - itemMapper.insert( id, item ); -} - - -void KURLComboBox::setMaxItems( int max ) -{ - myMaximum = max; - - if ( count() > myMaximum ) { - int oldCurrent = currentItem(); - - setDefaults(); - - TQPtrListIterator it( itemList ); - int Overload = itemList.count() - myMaximum + defaultList.count(); - for ( int i = 0; i <= Overload; i++ ) - ++it; - - for( ; it.current(); ++it ) - insertURLItem( it.current() ); - - if ( count() > 0 ) { // restore the previous currentItem - if ( oldCurrent >= count() ) - oldCurrent = count() -1; - setCurrentItem( oldCurrent ); - } - } -} - - -void KURLComboBox::removeURL( const KURL& url, bool checkDefaultURLs ) -{ - TQMap::ConstIterator mit = itemMapper.begin(); - while ( mit != itemMapper.end() ) { - if ( url.url(-1) == mit.data()->url.url(-1) ) { - if ( !itemList.remove( mit.data() ) && checkDefaultURLs ) - defaultList.remove( mit.data() ); - } - ++mit; - } - - blockSignals( true ); - setDefaults(); - TQPtrListIterator it( itemList ); - while ( it.current() ) { - insertURLItem( *it ); - ++it; - } - blockSignals( false ); -} - - -TQPixmap KURLComboBox::getPixmap( const KURL& url ) const -{ - if ( myMode == Directories ) - return d->dirpix; - else - return KMimeType::pixmapForURL( url, 0, KIcon::Small ); -} - - -// updates "item" with pixmap "pixmap" and sets the URL instead of text -// works around a Qt bug. -void KURLComboBox::updateItem( const KURLComboItem *item, - int index, const TQPixmap& pixmap ) -{ - // TQComboBox::changeItem() doesn't honor the pixmap when - // using an editable combobox, so we just remove and insert - if ( editable() ) { - removeItem( index ); - insertItem( pixmap, - item->url.isLocalFile() ? item->url.path( myMode ) : - item->url.prettyURL( myMode ), - index ); - } - else - changeItem( pixmap, item->text, index ); -} - - -#include "kurlcombobox.moc" diff --git a/kio/kfile/kurlcombobox.h b/kio/kfile/kurlcombobox.h deleted file mode 100644 index a1fd9182d..000000000 --- a/kio/kfile/kurlcombobox.h +++ /dev/null @@ -1,229 +0,0 @@ -/* This file is part of the KDE libraries - Copyright (C) 2000 Carsten Pfeiffer - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License version 2, as published by the Free Software Foundation. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef KURLCOMBOBOX_H -#define KURLCOMBOBOX_H - -#include -#include -#include -#include -#include - -#include -#include - -/** - * This combobox shows a number of recent URLs/directories, as well as some - * default directories. - * It will manage the default dirs root-directory, home-directory and - * Desktop-directory, as well as a number of URLs set via setURLs() - * and one additional entry to be set via setURL(). - * - * @short A combo box showing a number of recent URLs/directories - * @author Carsten Pfeiffer - */ -class TDEIO_EXPORT KURLComboBox : public KComboBox -{ - Q_OBJECT - TQ_PROPERTY(TQStringList urls READ urls WRITE setURLs DESIGNABLE true) - TQ_PROPERTY(int maxItems READ maxItems WRITE setMaxItems DESIGNABLE true) - -public: - /** - * This enum describes which kind of items is shown in the combo box. - */ - enum Mode { Files = -1, Directories = 1, Both = 0 }; - /** - * This Enumeration is used in setURL() to determine which items - * will be removed when the given list is larger than maxItems(). - * - * @li RemoveTop means that items will be removed from top - * @li RemoveBottom means, that items will be removed from the bottom - */ - enum OverLoadResolving { RemoveTop, RemoveBottom }; - - /** - * Constructs a KURLComboBox. - * @param mode is either Files, Directories or Both and controls the - * following behavior: - * @li Files all inserted URLs will be treated as files, therefore the - * url shown in the combo will never show a trailing / - * the icon will be the one associated with the file's mimetype. - * @li Directories all inserted URLs will be treated as directories, will - * have a trailing slash in the combobox. The current - * directory will show the "open folder" icon, other - * directories the "folder" icon. - * @li Both Don't mess with anything, just show the url as given. - * @param parent The parent object of this widget. - * @param name The name of this widget. - */ - KURLComboBox( Mode mode, TQWidget *parent=0, const char *name=0 ); - KURLComboBox( Mode mode, bool rw, TQWidget *parent=0, const char *name=0 ); - /** - * Destructs the combo box. - */ - ~KURLComboBox(); - - /** - * Sets the current url. This combo handles exactly one url additionally - * to the default items and those set via setURLs(). So you can call - * setURL() as often as you want, it will always replace the previous one - * set via setURL(). - * If @p url is already in the combo, the last item will stay there - * and the existing item becomes the current item. - * The current item will always have the open-directory-pixmap as icon. - * - * Note that you won't receive any signals, e.g. textChanged(), - * returnPressed() or activated() upon calling this method. - */ - void setURL( const KURL& url ); - - /** - * Inserts @p urls into the combobox below the "default urls" (see - * addDefaultURL). - * - * If the list of urls contains more items than maxItems, the first items - * will be stripped. - */ - void setURLs( TQStringList urls ); - - /** - * Inserts @p urls into the combobox below the "default urls" (see - * addDefaultURL). - * - * If the list of urls contains more items than maxItems, the @p remove - * parameter determines whether the first or last items will be stripped. - */ - void setURLs( TQStringList urls, OverLoadResolving remove ); - - /** - * @returns a list of all urls currently handled. The list contains at most - * maxItems() items. - * Use this to save the list of urls in a config-file and reinsert them - * via setURLs() next time. - * Note that all default urls set via addDefaultURL() are not - * returned, they will automatically be set via setURLs() or setURL(). - * You will always get fully qualified urls, i.e. with protocol like - * file:/ - */ - TQStringList urls() const; - - /** - * Sets how many items should be handled and displayed by the combobox. - * @see maxItems - */ - void setMaxItems( int ); - - /** - * @returns the maximum of items the combobox handles. - * @see setMaxItems - */ - int maxItems() const { return myMaximum; } - - /** - * Adds a url that will always be shown in the combobox, it can't be - * "rotated away". Default urls won't be returned in urls() and don't - * have to be set via setURLs(). - * If you want to specify a special pixmap, use the overloaded method with - * the pixmap parameter. - * Default URLs will be inserted into the combobox by setDefaults() - */ - void addDefaultURL( const KURL& url, const TQString& text = TQString::null ); - - /** - * Adds a url that will always be shown in the combobox, it can't be - * "rotated away". Default urls won't be returned in urls() and don't - * have to be set via setURLs(). - * If you don't need to specify a pixmap, use the overloaded method without - * the pixmap parameter. - * Default URLs will be inserted into the combobox by setDefaults() - */ - void addDefaultURL( const KURL& url, const TQPixmap& pix, - const TQString& text = TQString::null ); - - /** - * Clears all items and inserts the default urls into the combo. Will be - * called implicitly upon the first call to setURLs() or setURL() - * @see addDefaultURL - */ - void setDefaults(); - - /** - * Removes any occurrence of @p url. If @p checkDefaultURLs is false - * default-urls won't be removed. - */ - void removeURL( const KURL& url, bool checkDefaultURLs = true ); - -signals: - /** - * Emitted when an item was clicked at. - * @param url is the url of the now current item. If it is a local url, - * it won't have a protocol (file:/), otherwise it will. - */ - void urlActivated( const KURL& url ); - - -protected slots: - void slotActivated( int ); - - -protected: - struct _KURLComboItem { - TQString text; - KURL url; - TQPixmap pixmap; - }; - typedef _KURLComboItem KURLComboItem; - TQPtrList itemList; - TQPtrList defaultList; - TQMap itemMapper; - - void init( Mode mode ); - void insertURLItem( const KURLComboItem * ); - - /** - * Uses KMimeType::pixmapForURL() to return a proper pixmap for @p url. - * In directory mode, a folder icon is always returned. - */ - TQPixmap getPixmap( const KURL& url ) const; - - /** - * Updates @p item with @p pixmap and sets the url instead of the text - * of the KURLComboItem. - * Also works around a Qt bug. - */ - void updateItem( const KURLComboItem *item, int index, const TQPixmap& pix); - - TQPixmap opendirPix; - int firstItemIndex; - - -private: - bool urlAdded; - int myMaximum; - Mode myMode; // can be used as parameter to KUR::path( int ) or url( int ) - // to specify if we want a trailing slash or not - -private: - class KURLComboBoxPrivate; - KURLComboBoxPrivate *d; -}; - - -#endif // KURLCOMBOBOX_H diff --git a/kio/kfile/kurlrequester.cpp b/kio/kfile/kurlrequester.cpp deleted file mode 100644 index 99e6e96f0..000000000 --- a/kio/kfile/kurlrequester.cpp +++ /dev/null @@ -1,430 +0,0 @@ -/* This file is part of the KDE libraries - Copyright (C) 1999,2000,2001 Carsten Pfeiffer - - library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License version 2, as published by the Free Software Foundation. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - - -#include -#include - -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "kurlrequester.h" - - -class KURLDragPushButton : public KPushButton -{ -public: - KURLDragPushButton( TQWidget *parent, const char *name=0 ) - : KPushButton( parent, name ) { - setDragEnabled( true ); - } - ~KURLDragPushButton() {} - - void setURL( const KURL& url ) { - m_urls.clear(); - m_urls.append( url ); - } - - /* not needed so far - void setURLs( const KURL::List& urls ) { - m_urls = urls; - } - const KURL::List& urls() const { return m_urls; } - */ - -protected: - virtual TQDragObject *dragObject() { - if ( m_urls.isEmpty() ) - return 0L; - - TQDragObject *drag = new KURLDrag( m_urls, this, "url drag" ); - return drag; - } - -private: - KURL::List m_urls; - -}; - - -/* -************************************************************************* -*/ - -class KURLRequester::KURLRequesterPrivate -{ -public: - KURLRequesterPrivate() { - edit = 0L; - combo = 0L; - fileDialogMode = KFile::File | KFile::ExistingOnly | KFile::LocalOnly; - } - - void setText( const TQString& text ) { - if ( combo ) - { - if (combo->editable()) - { - combo->setEditText( text ); - } - else - { - combo->insertItem( text ); - combo->setCurrentItem( combo->count()-1 ); - } - } - else - { - edit->setText( text ); - } - } - - void connectSignals( TQObject *receiver ) { - TQObject *sender; - if ( combo ) - sender = TQT_TQOBJECT(combo); - else - sender = TQT_TQOBJECT(edit); - - connect( sender, TQT_SIGNAL( textChanged( const TQString& )), - receiver, TQT_SIGNAL( textChanged( const TQString& ))); - connect( sender, TQT_SIGNAL( returnPressed() ), - receiver, TQT_SIGNAL( returnPressed() )); - connect( sender, TQT_SIGNAL( returnPressed( const TQString& ) ), - receiver, TQT_SIGNAL( returnPressed( const TQString& ) )); - } - - void setCompletionObject( KCompletion *comp ) { - if ( combo ) - combo->setCompletionObject( comp ); - else - edit->setCompletionObject( comp ); - } - - /** - * replaces ~user or $FOO, if necessary - */ - TQString url() { - TQString txt = combo ? combo->currentText() : edit->text(); - KURLCompletion *comp; - if ( combo ) - comp = dynamic_cast(combo->completionObject()); - else - comp = dynamic_cast(edit->completionObject()); - - if ( comp ) - return comp->replacedPath( txt ); - else - return txt; - } - - KLineEdit *edit; - KComboBox *combo; - int fileDialogMode; - TQString fileDialogFilter; -}; - - - -KURLRequester::KURLRequester( TQWidget *editWidget, TQWidget *parent, - const char *name ) - : TQHBox( parent, name ) -{ - d = new KURLRequesterPrivate; - - // must have this as parent - editWidget->reparent( this, 0, TQPoint(0,0) ); - d->edit = dynamic_cast( editWidget ); - d->combo = dynamic_cast( editWidget ); - - init(); -} - - -KURLRequester::KURLRequester( TQWidget *parent, const char *name ) - : TQHBox( parent, name ) -{ - d = new KURLRequesterPrivate; - init(); -} - - -KURLRequester::KURLRequester( const TQString& url, TQWidget *parent, - const char *name ) - : TQHBox( parent, name ) -{ - d = new KURLRequesterPrivate; - init(); - setKURL( KURL::fromPathOrURL( url ) ); -} - - -KURLRequester::~KURLRequester() -{ - delete myCompletion; - delete myFileDialog; - delete d; -} - - -void KURLRequester::init() -{ - myFileDialog = 0L; - myShowLocalProt = false; - - if ( !d->combo && !d->edit ) - d->edit = new KLineEdit( this, "line edit" ); - - myButton = new KURLDragPushButton( this, "kfile button"); - TQIconSet iconSet = SmallIconSet(TQString::fromLatin1("fileopen")); - TQPixmap pixMap = iconSet.pixmap( TQIconSet::Small, TQIconSet::Normal ); - myButton->setIconSet( iconSet ); - myButton->setFixedSize( pixMap.width()+8, pixMap.height()+8 ); - TQToolTip::add(myButton, i18n("Open file dialog")); - - connect( myButton, TQT_SIGNAL( pressed() ), TQT_SLOT( slotUpdateURL() )); - - setSpacing( KDialog::spacingHint() ); - - TQWidget *widget = d->combo ? (TQWidget*) d->combo : (TQWidget*) d->edit; - widget->installEventFilter( this ); - setFocusProxy( widget ); - - d->connectSignals( TQT_TQOBJECT(this) ); - connect( myButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotOpenDialog() )); - - myCompletion = new KURLCompletion(); - d->setCompletionObject( myCompletion ); - - KAccel *accel = new KAccel( this ); - accel->insert( KStdAccel::Open, TQT_TQOBJECT(this), TQT_SLOT( slotOpenDialog() )); - accel->readSettings(); -} - - -void KURLRequester::setURL( const TQString& url ) -{ - if ( myShowLocalProt ) - { - d->setText( url ); - } - else - { - // ### This code is broken (e.g. for paths with '#') - if ( url.startsWith("file://") ) - d->setText( url.mid( 7 ) ); - else if ( url.startsWith("file:") ) - d->setText( url.mid( 5 ) ); - else - d->setText( url ); - } -} - -void KURLRequester::setKURL( const KURL& url ) -{ - if ( myShowLocalProt ) - d->setText( url.url() ); - else - d->setText( url.pathOrURL() ); -} - -void KURLRequester::setCaption( const TQString& caption ) -{ - TQWidget::setCaption( caption ); - if (myFileDialog) - myFileDialog->setCaption( caption ); -} - -TQString KURLRequester::url() const -{ - return d->url(); -} - -void KURLRequester::slotOpenDialog() -{ - KURL newurl; - if ( (d->fileDialogMode & KFile::Directory) && !(d->fileDialogMode & KFile::File) || - /* catch possible fileDialog()->setMode( KFile::Directory ) changes */ - (myFileDialog && ( (myFileDialog->mode() & KFile::Directory) && - (myFileDialog->mode() & (KFile::File | KFile::Files)) == 0 ) ) ) - { - newurl = KDirSelectDialog::selectDirectory(url(), d->fileDialogMode & KFile::LocalOnly); - if ( !newurl.isValid() ) - { - return; - } - } - else - { - emit openFileDialog( this ); - - KFileDialog *dlg = fileDialog(); - if ( !d->url().isEmpty() ) { - KURL u( url() ); - // If we won't be able to list it (e.g. http), then don't try :) - if ( KProtocolInfo::supportsListing( u ) ) - dlg->setSelection( u.url() ); - } - - if ( dlg->exec() != TQDialog::Accepted ) - { - return; - } - - newurl = dlg->selectedURL(); - } - - setKURL( newurl ); - emit urlSelected( d->url() ); -} - -void KURLRequester::setMode(uint mode) -{ - Q_ASSERT( (mode & KFile::Files) == 0 ); - d->fileDialogMode = mode; - if ( (mode & KFile::Directory) && !(mode & KFile::File) ) - myCompletion->setMode( KURLCompletion::DirCompletion ); - - if (myFileDialog) - myFileDialog->setMode( d->fileDialogMode ); -} - -unsigned int KURLRequester::mode() const -{ - return d->fileDialogMode; -} - -void KURLRequester::setFilter(const TQString &filter) -{ - d->fileDialogFilter = filter; - if (myFileDialog) - myFileDialog->setFilter( d->fileDialogFilter ); -} - -TQString KURLRequester::filter( ) const -{ - return d->fileDialogFilter; -} - - -KFileDialog * KURLRequester::fileDialog() const -{ - if ( !myFileDialog ) { - TQWidget *p = parentWidget(); - myFileDialog = new KFileDialog( TQString::null, d->fileDialogFilter, p, - "file dialog", true ); - - myFileDialog->setMode( d->fileDialogMode ); - myFileDialog->setCaption( caption() ); - } - - return myFileDialog; -} - - -void KURLRequester::setShowLocalProtocol( bool b ) -{ - if ( myShowLocalProt == b ) - return; - - myShowLocalProt = b; - setKURL( url() ); -} - -void KURLRequester::clear() -{ - d->setText( TQString::null ); -} - -KLineEdit * KURLRequester::lineEdit() const -{ - return d->edit; -} - -KComboBox * KURLRequester::comboBox() const -{ - return d->combo; -} - -void KURLRequester::slotUpdateURL() -{ - // bin compat, myButton is declared as QPushButton - KURL u; - u = KURL( KURL( TQDir::currentDirPath() + '/' ), url() ); - (static_cast( myButton ))->setURL( u ); -} - -bool KURLRequester::eventFilter( TQObject *obj, TQEvent *ev ) -{ - if ( ( TQT_BASE_OBJECT(d->edit) == TQT_BASE_OBJECT(obj) ) || ( TQT_BASE_OBJECT(d->combo) == TQT_BASE_OBJECT(obj) ) ) - { - if (( ev->type() == TQEvent::FocusIn ) || ( ev->type() == TQEvent::FocusOut )) - // Forward focusin/focusout events to the urlrequester; needed by file form element in tdehtml - TQApplication::sendEvent( this, ev ); - } - return TQWidget::eventFilter( obj, ev ); -} - -KPushButton * KURLRequester::button() const -{ - return myButton; -} - -KEditListBox::CustomEditor KURLRequester::customEditor() -{ - setSizePolicy(TQSizePolicy( TQSizePolicy::Preferred, - TQSizePolicy::Fixed)); - - KLineEdit *edit = d->edit; - if ( !edit && d->combo ) - edit = dynamic_cast( d->combo->lineEdit() ); - -#ifndef NDEBUG - if ( !edit ) - kdWarning() << "KURLRequester's lineedit is not a KLineEdit!??\n"; -#endif - - KEditListBox::CustomEditor editor( this, edit ); - return editor; -} - -void KURLRequester::virtual_hook( int, void* ) -{ /*BASE::virtual_hook( id, data );*/ } - -KURLComboRequester::KURLComboRequester( TQWidget *parent, - const char *name ) - : KURLRequester( new KComboBox(false), parent, name) -{ -} - -#include "kurlrequester.moc" diff --git a/kio/kfile/kurlrequester.h b/kio/kfile/kurlrequester.h deleted file mode 100644 index aa2f6894b..000000000 --- a/kio/kfile/kurlrequester.h +++ /dev/null @@ -1,301 +0,0 @@ -/* This file is part of the KDE libraries - Copyright (C) 1999,2000,2001 Carsten Pfeiffer - - library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License version 2, as published by the Free Software Foundation. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - - -#ifndef KURLREQUESTER_H -#define KURLREQUESTER_H - -#include - -#include -#include -#include -#include - -class KComboBox; -class KFileDialog; -class KLineEdit; -class KURLCompletion; -class KURLDragPushButton; - -class TQString; -class TQTimer; - -/** - * This class is a widget showing a lineedit and a button, which invokes a - * filedialog. File name completion is available in the lineedit. - * - * The defaults for the filedialog are to ask for one existing local file, i.e. - * KFileDialog::setMode( KFile::File | KFile::ExistingOnly | KFile::LocalOnly ) - * The default filter is "*", i.e. show all files, and the start directory is - * the current working directory, or the last directory where a file has been - * selected. - * - * You can change this behavior by using setMode() or setFilter(). - * - * \image html kurlrequester.png "KDE URL Requester" - * - * @short A widget to request a filename/url from the user - * @author Carsten Pfeiffer - */ -class TDEIO_EXPORT KURLRequester : public TQHBox -{ - Q_OBJECT - TQ_PROPERTY( TQString url READ url WRITE setURL ) - TQ_PROPERTY( bool showLocalProtocol READ showLocalProtocol WRITE setShowLocalProtocol ) - TQ_PROPERTY( TQString filter READ filter WRITE setFilter ) - TQ_PROPERTY( uint mode READ mode WRITE setMode ) - -public: - /** - * Constructs a KURLRequester widget. - */ - KURLRequester( TQWidget *parent=0, const char *name=0 ); - - /** - * Constructs a KURLRequester widget with the initial URL @p url. - * // TODO KDE4: Use KURL instead - */ - KURLRequester( const TQString& url, TQWidget *parent=0, const char *name=0 ); - - /** - * Special constructor, which creates a KURLRequester widget with a custom - * edit-widget. The edit-widget can be either a KComboBox or a KLineEdit - * (or inherited thereof). Note: for geometry management reasons, the - * edit-widget is reparented to have the KURLRequester as parent. - */ - KURLRequester( TQWidget *editWidget, TQWidget *parent, const char *name=0 ); - /** - * Destructs the KURLRequester. - */ - ~KURLRequester(); - - /** - * @returns the current url in the lineedit. May be malformed, if the user - * entered something weird. ~user or environment variables are substituted - * for local files. - * // TODO KDE4: Use KURL so that the result is properly defined - */ - TQString url() const; - - /** - * Enables/disables showing file:/ in the lineedit, when a local file has - * been selected in the filedialog or was set via setURL(). - * Default is false, not showing file:/ - * @see showLocalProtocol - */ - void setShowLocalProtocol( bool b ); - - /** - * Sets the mode of the file dialog. - * Note: you can only select one file with the filedialog, - * so KFile::Files doesn't make much sense. - * @see KFileDialog::setMode() - */ - void setMode( uint m ); - - /** - * Returns the current mode - * @see KFileDialog::mode() - * @since 3.3 - */ - uint mode() const; - - - /** - * Sets the filter for the file dialog. - * @see KFileDialog::setFilter() - */ - void setFilter( const TQString& filter ); - - /** - * Returns the current filter for the file dialog. - * @see KFileDialog::filter() - * @since 3.3 - */ - TQString filter() const; - - /** - * @returns whether local files will be prefixed with file:/ in the - * lineedit - * @see setShowLocalProtocol - */ - bool showLocalProtocol() const { return myShowLocalProt; } - // ## KDE4: there's no reason to keep this, it should always be false - - /** - * @returns a pointer to the filedialog - * You can use this to customize the dialog, e.g. to specify a filter. - * Never returns 0L. - * - * Remove in KDE4? KURLRequester should use KDirSelectDialog for - * (mode & KFile::Directory) && !(mode & KFile::File) - */ - virtual KFileDialog * fileDialog() const; - - /** - * @returns a pointer to the lineedit, either the default one, or the - * special one, if you used the special constructor. - * - * It is provided so that you can e.g. set an own completion object - * (e.g. KShellCompletion) into it. - */ - KLineEdit * lineEdit() const; - - /** - * @returns a pointer to the combobox, in case you have set one using the - * special constructor. Returns 0L otherwise. - */ - KComboBox * comboBox() const; - - /** - * @returns a pointer to the pushbutton. It is provided so that you can - * specify an own pixmap or a text, if you really need to. - */ - KPushButton * button() const; - - /** - * @returns the KURLCompletion object used in the lineedit/combobox. - */ - KURLCompletion *completionObject() const { return myCompletion; } - - /** - * @returns an object, suitable for use with KEditListBox. It allows you - * to put this KURLRequester into a KEditListBox. - * Basically, do it like this: - * \code - * KURLRequester *req = new KURLRequester( someWidget ); - * [...] - * KEditListBox *editListBox = new KEditListBox( i18n("Some Title"), req->customEditor(), someWidget ); - * \endcode - * @since 3.1 - */ - KEditListBox::CustomEditor customEditor(); - -public slots: - /** - * Sets the url in the lineedit to @p url. Depending on the state of - * showLocalProtocol(), file:/ on local files will be shown or not. - * @since 3.1 - * // TODO KDE4: Use KURL instead - */ - void setURL( const TQString& url ); - - /** - * Sets the url in the lineedit to @p url. - * @since 3.4 - * // TODO KDE4: rename to setURL - */ - void setKURL( const KURL& url ); - - /** - * Sets the caption of the file dialog. - * @since 3.1 - */ - virtual void setCaption( const TQString& caption ); - - /** - * Clears the lineedit/combobox. - */ - void clear(); - -signals: - // forwards from LineEdit - /** - * Emitted when the text in the lineedit changes. - * The parameter contains the contents of the lineedit. - * @since 3.1 - */ - void textChanged( const TQString& ); - - /** - * Emitted when return or enter was pressed in the lineedit. - */ - void returnPressed(); - - /** - * Emitted when return or enter was pressed in the lineedit. - * The parameter contains the contents of the lineedit. - */ - void returnPressed( const TQString& ); - - /** - * Emitted before the filedialog is going to open. Connect - * to this signal to "configure" the filedialog, e.g. set the - * filefilter, the mode, a preview-widget, etc. It's usually - * not necessary to set a URL for the filedialog, as it will - * get set properly from the editfield contents. - * - * If you use multiple KURLRequesters, you can connect all of them - * to the same slot and use the given KURLRequester pointer to know - * which one is going to open. - */ - void openFileDialog( KURLRequester * ); - - /** - * Emitted when the user changed the URL via the file dialog. - * The parameter contains the contents of the lineedit. - * // TODO KDE4: Use KURL instead - */ - void urlSelected( const TQString& ); - -protected: - void init(); - - KURLCompletion * myCompletion; - - -private: - KURLDragPushButton * myButton; - bool myShowLocalProt; - mutable KFileDialog * myFileDialog; - - -protected slots: - /** - * Called when the button is pressed to open the filedialog. - * Also called when KStdAccel::Open (default is Ctrl-O) is pressed. - */ - void slotOpenDialog(); - -private slots: - void slotUpdateURL(); - -protected: - virtual void virtual_hook( int id, void* data ); - bool eventFilter( TQObject *obj, TQEvent *ev ); -private: - class KURLRequesterPrivate; - KURLRequesterPrivate *d; -}; - -/** - * URL requester with a combo box, for use in Designer - */ -class TDEIO_EXPORT KURLComboRequester : public KURLRequester -{ - Q_OBJECT -public: - /** - * Constructs a KURLRequester widget with a combobox. - */ - KURLComboRequester( TQWidget *parent=0, const char *name=0 ); -}; - - -#endif // KURLREQUESTER_H diff --git a/kio/kfile/kurlrequesterdlg.cpp b/kio/kfile/kurlrequesterdlg.cpp deleted file mode 100644 index 19409afdc..000000000 --- a/kio/kfile/kurlrequesterdlg.cpp +++ /dev/null @@ -1,135 +0,0 @@ -/* This file is part of the KDE libraries - Copyright (C) 2000 Wilco Greven - - library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - - -#include -#include - -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "kurlrequesterdlg.h" - - -KURLRequesterDlg::KURLRequesterDlg( const TQString& urlName, TQWidget *parent, - const char *name, bool modal ) - : KDialogBase( Plain, TQString::null, Ok|Cancel|User1, Ok, parent, name, - modal, true, KStdGuiItem::clear() ) -{ - initDialog(i18n( "Location:" ), urlName); -} - -KURLRequesterDlg::KURLRequesterDlg( const TQString& urlName, const TQString& _text, TQWidget *parent, const char *name, bool modal ) - : KDialogBase( Plain, TQString::null, Ok|Cancel|User1, Ok, parent, name, - modal, true, KStdGuiItem::clear() ) -{ - initDialog(_text, urlName); -} - -KURLRequesterDlg::~KURLRequesterDlg() -{ -} - -void KURLRequesterDlg::initDialog(const TQString &text,const TQString &urlName) -{ - TQVBoxLayout * topLayout = new TQVBoxLayout( plainPage(), 0, - spacingHint() ); - - TQLabel * label = new TQLabel( text , plainPage() ); - topLayout->addWidget( label ); - - urlRequester_ = new KURLRequester( urlName, plainPage(), "urlRequester" ); - urlRequester_->setMinimumWidth( urlRequester_->sizeHint().width() * 3 ); - topLayout->addWidget( urlRequester_ ); - urlRequester_->setFocus(); - connect( urlRequester_->lineEdit(), TQT_SIGNAL(textChanged(const TQString&)), - TQT_SLOT(slotTextChanged(const TQString&)) ); - bool state = !urlName.isEmpty(); - enableButtonOK( state ); - enableButton( KDialogBase::User1, state ); - /* - KFile::Mode mode = static_cast( KFile::File | - KFile::ExistingOnly ); - urlRequester_->setMode( mode ); - */ - connect( this, TQT_SIGNAL( user1Clicked() ), TQT_SLOT( slotClear() ) ); -} - -void KURLRequesterDlg::slotTextChanged(const TQString & text) -{ - bool state = !text.stripWhiteSpace().isEmpty(); - enableButtonOK( state ); - enableButton( KDialogBase::User1, state ); -} - -void KURLRequesterDlg::slotClear() -{ - urlRequester_->clear(); -} - -KURL KURLRequesterDlg::selectedURL() const -{ - if ( result() == TQDialog::Accepted ) - return KURL::fromPathOrURL( urlRequester_->url() ); - else - return KURL(); -} - - -KURL KURLRequesterDlg::getURL(const TQString& dir, TQWidget *parent, - const TQString& caption) -{ - KURLRequesterDlg dlg(dir, parent, "filedialog", true); - - dlg.setCaption(caption.isNull() ? i18n("Open") : caption); - - dlg.exec(); - - const KURL& url = dlg.selectedURL(); - if (url.isValid()) - KRecentDocument::add(url); - - return url; -} - -KFileDialog * KURLRequesterDlg::fileDialog() -{ - return urlRequester_->fileDialog(); -} - -KURLRequester * KURLRequesterDlg::urlRequester() -{ - return urlRequester_; -} - -#include "kurlrequesterdlg.moc" - -// vim:ts=4:sw=4:tw=78 diff --git a/kio/kfile/kurlrequesterdlg.h b/kio/kfile/kurlrequesterdlg.h deleted file mode 100644 index 07b70d745..000000000 --- a/kio/kfile/kurlrequesterdlg.h +++ /dev/null @@ -1,114 +0,0 @@ -/* This file is part of the KDE libraries - Copyright (C) 2000 Wilco Greven - - library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - - -#ifndef KURLREQUESTERDIALOG_H -#define KURLREQUESTERDIALOG_H - -#include -#include - -class KURLCompletion; -class KURLRequester; -class KFileDialog; -/** - * Dialog in which a user can enter a filename or url. It is a dialog - * encapsulating KURLRequester. The API is derived from - * KFileDialog. - * - * @short Simple dialog to enter a filename/url. - * @author Wilco Greven - */ -class TDEIO_EXPORT KURLRequesterDlg : public KDialogBase -{ - Q_OBJECT - -public: - /** - * Constructs a KURLRequesterDlg. - * - * @param url The url of the directory to start in. Use TQString::null - * to start in the current working directory, or the last - * directory where a file has been selected. - * @param parent The parent object of this widget. - * @param name The name of this widget. - * @param modal Specifies whether the dialog should be opened as modal - * or not. - */ - KURLRequesterDlg( const TQString& url, TQWidget *parent, - const char *name, bool modal = true ); - - /** - * Constructs a KURLRequesterDlg. - * - * @param url The url of the directory to start in. Use TQString::null - * to start in the current working directory, or the last - * directory where a file has been selected. - * @param text Text of the label - * @param parent The parent object of this widget. - * @param name The name of this widget. - * @param modal Specifies whether the dialog should be opened as modal - * or not. - */ - KURLRequesterDlg( const TQString& url, const TQString& text, - TQWidget *parent, const char *name, bool modal=true ); - /** - * Destructs the dialog. - */ - ~KURLRequesterDlg(); - - /** - * Returns the fully qualified filename. - */ - KURL selectedURL() const; - - /** - * Creates a modal dialog, executes it and returns the selected URL. - * - * @param url This specifies the initial path of the input line. - * @param parent The widget the dialog will be centered on initially. - * @param caption The caption to use for the dialog. - */ - static KURL getURL(const TQString& url = TQString::null, - TQWidget *parent= 0, const TQString& caption = TQString::null); - - /** - * Returns a pointer to the file dialog used by the KURLRequester. - */ - KFileDialog * fileDialog(); - /** - * Returns a pointer to the KURLRequester. - */ - KURLRequester *urlRequester(); - -private slots: - void slotClear(); - void slotTextChanged(const TQString &); -private: - void initDialog(const TQString &text, const TQString &url); - KURLRequester *urlRequester_; - - class KURLRequesterDlgPrivate; - KURLRequesterDlgPrivate *d; - -}; - -#endif // KURLREQUESTERDIALOG_H - -// vim:ts=4:sw=4:tw=78 diff --git a/kio/kfile/tests/Makefile.am b/kio/kfile/tests/Makefile.am deleted file mode 100644 index 9689f7a27..000000000 --- a/kio/kfile/tests/Makefile.am +++ /dev/null @@ -1,41 +0,0 @@ -# This file is part of the KDE libraries -# Copyright (C) 1996-1997 Matthias Kalle Dalheimer (kalle@kde.org) -# (C) 1997-1998 Stephan Kulow (coolo@kde.org) - -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Library General Public -# License as published by the Free Software Foundation; either -# version 2 of the License, or (at your option) any later version. - -# This library 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 -# Library General Public License for more details. - -# You should have received a copy of the GNU Library General Public License -# along with this library; see the file COPYING.LIB. If not, write to -# the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -# Boston, MA 02110-1301, USA. - -INCLUDES = $(all_includes) - -AM_LDFLAGS = $(QT_LDFLAGS) $(X_LDFLAGS) $(KDE_RPATH) - -check_PROGRAMS = kfstest kurlrequestertest kfiletreeviewtest \ - kopenwithtest kdirselectdialogtest kicondialogtest \ - knotifytest kcustommenueditortest - -# noinst_HEADERS = - -METASOURCES = AUTO - -LDADD = $(LIB_KIO) -kcustommenueditortest_SOURCES = kcustommenueditortest.cpp -kurlrequestertest_SOURCES = kurlrequestertest.cpp -kfstest_SOURCES = kfstest.cpp kfdtest.cpp -kfiletreeviewtest_SOURCES = kfiletreeviewtest.cpp -kopenwithtest_SOURCES = kopenwithtest.cpp -kdirselectdialogtest_SOURCES = kdirselectdialogtest.cpp -kicondialogtest_SOURCES = kicondialogtest.cpp -knotifytest_SOURCES = knotifytest.cpp - diff --git a/kio/kfile/tests/kcustommenueditortest.cpp b/kio/kfile/tests/kcustommenueditortest.cpp deleted file mode 100644 index 1fc6da496..000000000 --- a/kio/kfile/tests/kcustommenueditortest.cpp +++ /dev/null @@ -1,19 +0,0 @@ -#include "kcustommenueditor.h" -#include -#include -#include - -int main(int argc, char** argv) -{ - KLocale::setMainCatalogue("tdelibs"); - TDEApplication app(argc, argv, "KCustomMenuEditorTest"); - KCustomMenuEditor editor(0); - TDEConfig *cfg = new TDEConfig("kdesktop_custom_menu2"); - editor.load(cfg); - if (editor.exec()) - { - editor.save(cfg); - cfg->sync(); - } -} - diff --git a/kio/kfile/tests/kdirselectdialogtest.cpp b/kio/kfile/tests/kdirselectdialogtest.cpp deleted file mode 100644 index 3d15c47d0..000000000 --- a/kio/kfile/tests/kdirselectdialogtest.cpp +++ /dev/null @@ -1,17 +0,0 @@ -#include -#include -#include -#include - -int main( int argc, char **argv ) -{ - TDEApplication app(argc, argv, "kdirselectdialogtest"); - - KURL u = KDirSelectDialog::selectDirectory( (argc >= 1) ? argv[1] : TQString::null ); - if ( u.isValid() ) - KMessageBox::information( 0L, - TQString::fromLatin1("You selected the url: %1") - .arg( u.prettyURL() ), "Selected URL" ); - - return 0; -} diff --git a/kio/kfile/tests/kfdtest.cpp b/kio/kfile/tests/kfdtest.cpp deleted file mode 100644 index 867b9b4a8..000000000 --- a/kio/kfile/tests/kfdtest.cpp +++ /dev/null @@ -1,34 +0,0 @@ -#include "kfdtest.h" - -#include -#include -#include -#include -#include - -KFDTest::KFDTest( const TQString& startDir, TQObject *parent, const char *name ) - : TQObject( parent, name ), - m_startDir( startDir ) -{ - TQTimer::singleShot( 1000, this, TQT_SLOT( doit() )); -} - -void KFDTest::doit() -{ - KFileDialog *dlg = new KFileDialog( m_startDir, TQString::null, 0L, - "file dialog", true ); - dlg->setMode( KFile::File); - dlg->setOperationMode( KFileDialog::Saving ); - TQStringList filter; - filter << "all/allfiles" << "text/plain"; - dlg->setMimeFilter( filter, "all/allfiles" ); - - if ( dlg->exec() == KDialog::Accepted ) - { - KMessageBox::information(0, TQString::fromLatin1("You selected the file: %1").arg( dlg->selectedURL().prettyURL() )); - } - -// tqApp->quit(); -} - -#include "kfdtest.moc" diff --git a/kio/kfile/tests/kfdtest.h b/kio/kfile/tests/kfdtest.h deleted file mode 100644 index 6c59550b8..000000000 --- a/kio/kfile/tests/kfdtest.h +++ /dev/null @@ -1,28 +0,0 @@ -/**************************************************************************** -** $Id$ -** -** Copyright (C) 2003 Carsten Pfeiffer -** -****************************************************************************/ - -#ifndef KFDTEST_H -#define KFDTEST_H - -#include - -class KFDTest : public TQObject -{ - Q_OBJECT - -public: - KFDTest( const TQString& startDir, TQObject *parent = 0, const char *name = 0); - -public slots: - void doit(); - -private: - TQString m_startDir; -}; - - -#endif // KFDTEST_H diff --git a/kio/kfile/tests/kfiletreeviewtest.cpp b/kio/kfile/tests/kfiletreeviewtest.cpp deleted file mode 100644 index cf28557f8..000000000 --- a/kio/kfile/tests/kfiletreeviewtest.cpp +++ /dev/null @@ -1,165 +0,0 @@ -/* This file is part of the KDE libraries - Copyright (C) 2001 Klaas Freitag - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include - -#include -#include -#include -#include -#include -#include -#include - -#include -#include "kfiletreeviewtest.h" - - -#include "kfiletreeviewtest.moc" - -testFrame::testFrame():KMainWindow(0,"Test FileTreeView"), - dirOnlyMode(false) - -{ - treeView = new KFileTreeView( this ); - treeView->setDragEnabled( true ); - treeView->setAcceptDrops( true ); - treeView->setDropVisualizer( true ); - - - /* Connect to see the status bar */ - KStatusBar* sta = statusBar(); - connect( treeView, TQT_SIGNAL( onItem( const TQString& )), - sta, TQT_SLOT( message( const TQString& ))); - - connect( treeView, TQT_SIGNAL( dropped( TQWidget*, TQDropEvent*, KURL::List& )), - this, TQT_SLOT( urlsDropped( TQWidget*, TQDropEvent*, KURL::List& ))); - - connect( treeView, TQT_SIGNAL( dropped( KURL::List&, KURL& )), this, - TQT_SLOT( copyURLs( KURL::List&, KURL& ))); - - treeView->addColumn( "File" ); - treeView->addColumn( "ChildCount" ); - setCentralWidget( treeView ); - resize( 600, 400 ); - - showPath( KURL::fromPathOrURL( TQDir::homeDirPath() )); -} - -void testFrame::showPath( const KURL &url ) -{ - TQString fname = "TestBranch"; // url.fileName (); - /* try a user icon */ - KIconLoader *loader = TDEGlobal::iconLoader(); - TQPixmap pix = loader->loadIcon( "contents2", KIcon::Small ); - TQPixmap pixOpen = loader->loadIcon( "contents", KIcon::Small ); - - KFileTreeBranch *nb = treeView->addBranch( url, fname, pix ); - - if( nb ) - { - if( dirOnlyMode ) treeView->setDirOnlyMode( nb, true ); - nb->setOpenPixmap( pixOpen ); - - connect( nb, TQT_SIGNAL(populateFinished(KFileTreeViewItem*)), - this, TQT_SLOT(slotPopulateFinished(KFileTreeViewItem*))); - connect( nb, TQT_SIGNAL( directoryChildCount( KFileTreeViewItem *, int )), - this, TQT_SLOT( slotSetChildCount( KFileTreeViewItem*, int ))); - // nb->setChildRecurse(false ); - - nb->setOpen(true); - } - - -} - -void testFrame::urlsDropped( TQWidget* , TQDropEvent* , KURL::List& list ) -{ - KURL::List::ConstIterator it = list.begin(); - for ( ; it != list.end(); ++it ) { - kdDebug() << "Url dropped: " << (*it).prettyURL() << endl; - } -} - -void testFrame::copyURLs( KURL::List& list, KURL& to ) -{ - KURL::List::ConstIterator it = list.begin(); - kdDebug() << "Copy to " << to.prettyURL() << endl; - for ( ; it != list.end(); ++it ) { - kdDebug() << "Url: " << (*it).prettyURL() << endl; - } - -} - - -void testFrame::slotPopulateFinished(KFileTreeViewItem *item ) -{ - if( item ) - { -#if 0 - int cc = item->childCount(); - - kdDebug() << "setting column 2 of treeview with count " << cc << endl; - - item->setText( 1, TQString::number( cc )); -#endif - } - else - { - kdDebug() << "slotPopFinished for uninitalised item" << endl; - } -} - -void testFrame::slotSetChildCount( KFileTreeViewItem *item, int c ) -{ - if( item ) - item->setText(1, TQString::number( c )); -} - -int main(int argc, char **argv) -{ - TDEApplication a(argc, argv, "kfiletreeviewtest"); - TQString name1; - TQStringList names; - - TQString argv1; - testFrame *tf; - - tf = new testFrame(); - a.setMainWidget( tf ); - - if (argc > 1) - { - for( int i = 1; i < argc; i++ ) - { - argv1 = TQString::fromLatin1(argv[i]); - kdDebug() << "Opening " << argv1 << endl; - if( argv1 == "-d" ) - tf->setDirOnly(); - else - { - KURL u( argv1 ); - tf->showPath( u ); - } - } - } - tf->show(); - int ret = a.exec(); - return( ret ); -} diff --git a/kio/kfile/tests/kfiletreeviewtest.h b/kio/kfile/tests/kfiletreeviewtest.h deleted file mode 100644 index 4ae791ce5..000000000 --- a/kio/kfile/tests/kfiletreeviewtest.h +++ /dev/null @@ -1,42 +0,0 @@ -/* This file is part of the KDE libraries - Copyright (C) 2001 Klaas Freitag - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef KFILETREEVIEWTEST -#define KFILETREEVIEWTEST - -class testFrame: public KMainWindow -{ - Q_OBJECT -public: - testFrame(); - void showPath( const KURL & ); - void setDirOnly( ) { dirOnlyMode = true; } -public slots: - void slotPopulateFinished(KFileTreeViewItem *); - void slotSetChildCount( KFileTreeViewItem *item, int c ); - - void urlsDropped( TQWidget*, TQDropEvent*, KURL::List& ); - void copyURLs( KURL::List& list, KURL& to ); -private: - KFileTreeView *treeView; - bool dirOnlyMode; -}; - - -#endif diff --git a/kio/kfile/tests/kfstest.cpp b/kio/kfile/tests/kfstest.cpp deleted file mode 100644 index b0ecabcc6..000000000 --- a/kio/kfile/tests/kfstest.cpp +++ /dev/null @@ -1,183 +0,0 @@ -/* This file is part of the KDE libraries - Copyright (C) 1997, 1998 Richard Moore - 1998 Stephan Kulow - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "kfdtest.h" - -int main(int argc, char **argv) -{ - TDEApplication a(argc, argv, "kfstest"); - TQString name1; - TQStringList names; - - TQString argv1; - TQString startDir; - if (argc > 1) - argv1 = TQString::fromLatin1(argv[1]); - if ( argc > 2 ) - startDir = TQString::fromLatin1( argv[2]); - - if (argv1 == TQString::fromLatin1("diroperator")) { - KDirOperator *op = new KDirOperator(startDir, 0, "operator"); - op->setViewConfig( TDEGlobal::config(), "TestGroup" ); - op->setView(KFile::Simple); - op->show(); - a.setMainWidget(op); - a.exec(); - } - - else if (argv1 == TQString::fromLatin1("justone")) { - TQString name = KFileDialog::getOpenFileName(startDir); - tqDebug("filename=%s",name.latin1()); - } - - else if (argv1 == TQString::fromLatin1("existingURL")) { - KURL url = KFileDialog::getExistingURL(); - tqDebug("URL=%s",url.url().latin1()); - name1 = url.url(); - } - - else if (argv1 == TQString::fromLatin1("preview")) { - KURL u = KFileDialog::getImageOpenURL(); - tqDebug("filename=%s", u.url().latin1()); - } - - else if (argv1 == TQString::fromLatin1("preselect")) { - names = KFileDialog::getOpenFileNames(TQString::fromLatin1("/etc/passwd")); - TQStringList::Iterator it = names.begin(); - while ( it != names.end() ) { - tqDebug("selected file: %s", (*it).latin1()); - ++it; - } - } - - else if (argv1 == TQString::fromLatin1("dirs")) - name1 = KFileDialog::getExistingDirectory(); - - else if (argv1 == TQString::fromLatin1("heap")) { - KFileDialog *dlg = new KFileDialog( startDir, TQString::null, 0L, - "file dialog", true ); - dlg->setMode( KFile::File); - dlg->setOperationMode( KFileDialog::Saving ); - TQStringList filter; - filter << "all/allfiles" << "text/plain"; - dlg->setMimeFilter( filter, "all/allfiles" ); - KURLBar *urlBar = dlg->speedBar(); - if ( urlBar ) - { - urlBar->insertDynamicItem( KURL("ftp://ftp.kde.org"), - TQString::fromLatin1("KDE FTP Server") ); - } - - if ( dlg->exec() == KDialog::Accepted ) - name1 = dlg->selectedURL().url(); - } - - else if ( argv1 == TQString::fromLatin1("eventloop") ) - { - KFDTest *test = new KFDTest( startDir ); - return a.exec(); - } - - else if (argv1 == TQString::fromLatin1("save")) { - KURL u = KFileDialog::getSaveURL(); -// TQString(TQDir::homeDirPath() + TQString::fromLatin1("/testfile")), -// TQString::null, 0L); - name1 = u.url(); - } - - else if (argv1 == TQString::fromLatin1("icon")) { - KIconDialog dlg; - TQString icon = dlg.selectIcon(); - kdDebug() << icon << endl; - } - -// else if ( argv1 == TQString::fromLatin1("dirselect") ) { -// KURL url; -// url.setPath( "/" ); -// KURL selected = KDirSelectDialog::selectDirectory( url ); -// name1 = selected.url(); -// tqDebug("*** selected: %s", selected.url().latin1()); -// } - - else { - KFileDialog dlg(startDir, - TQString::fromLatin1("*|All Files\n" - "*.lo *.o *.la|All libtool Files"), - 0, 0, true); -// dlg.setFilter( "*.tdevelop" ); - dlg.setMode( (KFile::Mode) (KFile::Files | - KFile::Directory | - KFile::ExistingOnly | - KFile::LocalOnly) ); -// TQStringList filter; -// filter << "text/plain" << "text/html" << "image/png"; -// dlg.setMimeFilter( filter ); -// KMimeType::List types; -// types.append( KMimeType::mimeType( "text/plain" ) ); -// types.append( KMimeType::mimeType( "text/html" ) ); -// dlg.setFilterMimeType( "Filetypes:", types, types.first() ); - if ( dlg.exec() == TQDialog::Accepted ) { - KURL::List list = dlg.selectedURLs(); - KURL::List::ConstIterator it = list.begin(); - tqDebug("*** selectedURLs(): "); - while ( it != list.end() ) { - name1 = (*it).url(); - tqDebug(" -> %s", name1.latin1()); - ++it; - } - tqDebug("*** selectedFile: %s", dlg.selectedFile().latin1()); - tqDebug("*** selectedURL: %s", dlg.selectedURL().url().latin1()); - tqDebug("*** selectedFiles: "); - TQStringList l = dlg.selectedFiles(); - TQStringList::Iterator it2 = l.begin(); - while ( it2 != l.end() ) { - tqDebug(" -> %s", (*it2).latin1()); - ++it2; - } - } - } - - if (!(name1.isNull())) - KMessageBox::information(0, TQString::fromLatin1("You selected the file " ) + name1, - TQString::fromLatin1("Your Choice")); - return 0; -} diff --git a/kio/kfile/tests/kicondialogtest.cpp b/kio/kfile/tests/kicondialogtest.cpp deleted file mode 100644 index b2c56e159..000000000 --- a/kio/kfile/tests/kicondialogtest.cpp +++ /dev/null @@ -1,19 +0,0 @@ -#include -#include - -int main( int argc, char **argv ) -{ - TDEApplication app( argc, argv, "kicondialogtest" ); - -// KIconDialog::getIcon(); - - KIconButton button; - app.setMainWidget( &button ); - button.show(); - - - return app.exec(); -} - -/* vim: et sw=4 - */ diff --git a/kio/kfile/tests/knotifytest.cpp b/kio/kfile/tests/knotifytest.cpp deleted file mode 100644 index 0493b59b4..000000000 --- a/kio/kfile/tests/knotifytest.cpp +++ /dev/null @@ -1,10 +0,0 @@ -#include -#include - -int main( int argc, char **argv ) -{ - TDEApplication app( argc, argv, "knotifytest" ); - KNotifyDialog *dlg = new KNotifyDialog(); - dlg->addApplicationEvents( "twin" ); - return dlg->exec(); -} diff --git a/kio/kfile/tests/kopenwithtest.cpp b/kio/kfile/tests/kopenwithtest.cpp deleted file mode 100644 index f78b1830b..000000000 --- a/kio/kfile/tests/kopenwithtest.cpp +++ /dev/null @@ -1,67 +0,0 @@ -/* This file is part of the KDE libraries - Copyright (C) 2002 Dirk Mueller - Copyright (C) 2003 David Faure - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include -#include -#include -#include -#include -#include -#include - -int main(int argc, char **argv) -{ - TDEApplication app(argc, argv, "kopenwithtest"); - KURL::List list; - - list += KURL("file:///tmp/testfile.txt"); - - // Test with one URL - KOpenWithDlg* dlg = new KOpenWithDlg(list, "OpenWith_Text", "OpenWith_Value", 0); - if(dlg->exec()) { - kdDebug() << "Dialog ended successfully\ntext: " << dlg->text() << endl; - } - else - kdDebug() << "Dialog was canceled." << endl; - delete dlg; - - // Test with two URLs - list += KURL("http://www.kde.org/index.html"); - dlg = new KOpenWithDlg(list, "OpenWith_Text", "OpenWith_Value", 0); - if(dlg->exec()) { - kdDebug() << "Dialog ended successfully\ntext: " << dlg->text() << endl; - } - else - kdDebug() << "Dialog was canceled." << endl; - delete dlg; - - // Test with a mimetype - TQString mimetype = "text/plain"; - dlg = new KOpenWithDlg( mimetype, "kedit", 0); - if(dlg->exec()) { - kdDebug() << "Dialog ended successfully\ntext: " << dlg->text() << endl; - } - else - kdDebug() << "Dialog was canceled." << endl; - delete dlg; - - return 0; -} - diff --git a/kio/kfile/tests/kurlrequestertest.cpp b/kio/kfile/tests/kurlrequestertest.cpp deleted file mode 100644 index 0e4851cfb..000000000 --- a/kio/kfile/tests/kurlrequestertest.cpp +++ /dev/null @@ -1,16 +0,0 @@ -#include -#include -#include -#include - -int main( int argc, char **argv ) -{ - TDEApplication app( argc, argv, "kurlrequestertest" ); - KURL url = KURLRequesterDlg::getURL( "ftp://ftp.kde.org" ); - tqDebug( "Selected url: %s", url.url().latin1()); - - KURLRequester *req = new KURLRequester(); - KEditListBox *el = new KEditListBox( TQString::fromLatin1("Test"), req->customEditor() ); - el->show(); - return app.exec(); -} diff --git a/kio/kfileplugin.desktop b/kio/kfileplugin.desktop deleted file mode 100644 index 6609551a6..000000000 --- a/kio/kfileplugin.desktop +++ /dev/null @@ -1,88 +0,0 @@ -[Desktop Entry] -Type=ServiceType -X-TDE-ServiceType=KFilePlugin -Name=KFile Meta Data Plugin -Name[af]=Klêer Meta Data Inprop module -Name[ar]=ملحق KFile Meta Data -Name[az]=KFile Meta Data Əlavəsi -Name[bg]=Приставка за мета данни -Name[bn]=কে-ফাইল মেটা-ডেটা প্লাগ-ইন -Name[bs]=KFile Meta Data dodatak -Name[ca]=Connector de meta dades KFile -Name[cs]=Modul KFile pro metadata -Name[csb]=Plugins do sprôwianiô pòdôwkama nieznónegò fòrmatu -Name[cy]=Ategyn Meta-ddata KFfeil -Name[da]=KFile Metadata-plugin -Name[de]=KFile: Metadaten-Modul -Name[el]=Πρόσθετο μετα-δεδομένων του KFile -Name[eo]=Dosierinterdatuma kromaĵo -Name[es]=Plugin de meta datos KFile -Name[et]=KFile'i metaandmete plugin -Name[eu]=KFile metadatuen plugin-a -Name[fa]=وصلۀ فرادادۀ KFile -Name[fi]=KFile-metatietolisäosa -Name[fr]=Module externe de métadonnées KFile -Name[ga]=Breiseán meiteashonraí do KFile -Name[gl]=Plugin para Meta Dados de KFile -Name[he]=תוסף מטא־נתונים עבור KFile -Name[hi]=KFile मेटा ङाटा प्लगइन -Name[hr]=KFile dodatak za meta-podatke -Name[hu]=KFile metaadat-modul -Name[id]=Plugin Meta Data KBerkas -Name[is]=KFile lýsiskráar-íforrit -Name[it]=Plugin informazioni aggiuntive per KFile -Name[ja]=KFile メタデータプラグイン -Name[ka]=KFile-ს მეტამონაცემთა მოდული -Name[kk]=KFile метадеректер модулі -Name[km]=កម្មវិធី​ជំនួយ​ខាង​ក្នុង​នៃ​ទិន្នន័យ​មេតា KFile -Name[ko]=K파일 메타 자료 플러그인 -Name[lb]=KFile-Metadonnéeë-Plugin -Name[lt]=KFile Meta duomenų priedas -Name[lv]=KFailu Meta Datu Iespraudnis -Name[mk]=KFile приклучок за мета податоци -Name[mn]=KFile: Мита өгөгдлийн -Plugin -Name[ms]=Plug masuk Data Meta KFile -Name[mt]=Plagin metadata ta' KFile -Name[nb]=KFile programtillegg for metadata -Name[nds]=KFile, Metadaten-Plugin -Name[ne]=K फाइल मेटाडेटा प्लगइन -Name[nn]=KFile-programtillegg for metadata -Name[nso]=Tsenyo ya Data ya Meta wa KFaele -Name[pa]=KFile ਮੈਟਾ ਡਾਟਾ ਪਲੱਗਿੰਨ -Name[pl]=Wtyczka do obsługi danych nieznanego formatu -Name[pt]='Plugin' de Meta-Dados do KFile -Name[pt_BR]=Plug-in KFile de Meta Dados -Name[ro]=Modul metadate KFile -Name[ru]=Модуль метаданных KFile -Name[rw]=Icyomeka ry'Ibyatanzwe Bidasanzwe bya KIdosiye -Name[se]=KFile lassemoduvla metadieđuid várás -Name[sk]=Modul KFile pre meta dáta -Name[sl]=Vstavek za meta podatke pri KFile -Name[sq]=Shtojca KFile Meta Data -Name[sr]=KFile прикључак за мета податке -Name[sr@Latn]=KFile priključak za meta podatke -Name[sv]=Kfil-metadatainsticksprogram -Name[ta]=கேகோப்பு மெட்டா தகவல் சொருகுப்பொருள் -Name[te]=కెదస్త్రం మెటా దత్తాంసం ప్లగిన్ -Name[tg]=KФайли Модули Meta Сана -Name[th]=ปลั๊กอินข้อมูลเมตาของ KFile -Name[tr]=KFile Meta Veri Eklentisi -Name[tt]=KFile Meta-Bireme öçen Östämä -Name[uk]=Втулок метаданих KFile -Name[uz]=KFile meta maʼlumot uchun plagin -Name[uz@cyrillic]=KFile мета маълумот учун плагин -Name[ven]=Meta data pulagini ya faela ya K -Name[vi]=Bộ cầm phít siêu dữ liệu KFile -Name[xh]=Iplagi yangaphakathi ye KFile Meta Data -Name[zh_CN]=KFile 元数据插件 -Name[zh_HK]=KFile 元資料外掛程式 -Name[zh_TW]=KFile 資料定義外掛程式 - -[PropertyDef::PreferredItems] -Type=TQStringList - -[PropertyDef::PreferredGroups] -Type=TQStringList - -[PropertyDef::SupportsThumbnail] -Type=bool diff --git a/kio/kio/CMakeLists.txt b/kio/kio/CMakeLists.txt deleted file mode 100644 index 1a2c3a263..000000000 --- a/kio/kio/CMakeLists.txt +++ /dev/null @@ -1,138 +0,0 @@ -################################################# -# -# (C) 2010 Serghei Amelian -# serghei (DOT) amelian (AT) gmail.com -# -# Improvements and feedback are welcome -# -# This file is released under GPL >= 2 -# -################################################# - -include_directories( - ${TQT_INCLUDE_DIRS} - ${CMAKE_CURRENT_BINARY_DIR} - ${CMAKE_BINARY_DIR}/kio/kssl - ${CMAKE_BINARY_DIR} - ${CMAKE_CURRENT_SOURCE_DIR} - ${CMAKE_BINARY_DIR}/tdecore - ${CMAKE_SOURCE_DIR} - ${CMAKE_SOURCE_DIR}/dcop - ${CMAKE_SOURCE_DIR}/tdecore - ${CMAKE_SOURCE_DIR}/tdecore/network - ${CMAKE_SOURCE_DIR}/tdeui - ${CMAKE_SOURCE_DIR}/kio - ${CMAKE_SOURCE_DIR}/kio/kssl - ${CMAKE_SOURCE_DIR}/interfaces - ${LIBR_INCLUDEDIR} - ${GAMIN_INCLUDEDIR} -) - -link_directories( - ${GAMIN_LIBDIR} -) - -##### headers ################################### - -install( FILES - kservicetype.h kmimetype.h kmimemagic.h kservice.h - krun.h kdirwatch.h kautomount.h kuserprofile.h - kshred.h kar.h ktar.h kzip.h ktrader.h kurifilter.h - kurlcompletion.h kshellcompletion.h kfileitem.h - kfileshare.h ksambashare.h knfsshare.h kdirlister.h - kservicegroup.h kimageio.h kdirnotify.h kdirnotify_stub.h - kurlpixmapprovider.h kprotocolinfo.h kprotocolmanager.h - kfilterbase.h kfilterdev.h kemailsettings.h kscan.h - kdatatool.h karchive.h kfilefilter.h kfilemetainfo.h - renamedlgplugin.h kmimetyperesolver.h kdcopservicestarter.h - kremoteencoding.h kmimetypechooser.h - DESTINATION ${INCLUDE_INSTALL_DIR} ) - -# FIXME seems that ACL is no longer optional -#if( USE_POSIX_ACL ) - install( FILES kacl.h DESTINATION ${INCLUDE_INSTALL_DIR} ) -#endif( USE_POSIX_ACL ) - -install( FILES - connection.h slaveinterface.h slave.h slaveconfig.h - sessiondata.h global.h passdlg.h netaccess.h job.h - scheduler.h jobclasses.h paste.h slavebase.h - progressbase.h defaultprogress.h statusbarprogress.h - tcpslavebase.h forwardingslavebase.h observer.h - chmodjob.h kmdbase.h authinfo.h ioslave_defaults.h - http_slave_defaults.h previewjob.h thumbcreator.h - metainfojob.h davjob.h renamedlg.h skipdlg.h - ${CMAKE_CURRENT_BINARY_DIR}/uiserver_stub.h - DESTINATION ${INCLUDE_INSTALL_DIR}/kio ) - - -##### kiocore ################################### - -set( target kiocore ) - -set( ${target}_SRCS - authinfo.cpp kshred.cpp kprotocolmanager.cpp slave.cpp - slaveinterface.cpp observer.stub sessiondata.cpp - scheduler.cpp connection.cpp job.cpp global.cpp - slaveconfig.cpp kurlpixmapprovider.cpp netaccess.cpp - paste.cpp pastedialog.cpp kmimemagic.cpp tcpslavebase.cpp - slavebase.cpp passdlg.cpp forwardingslavebase.cpp - progressbase.cpp defaultprogress.cpp statusbarprogress.cpp - kdirnotify.cpp kdirnotify.skel kdirnotify_stub.cpp - observer.cpp ../misc/uiserver.stub observer.skel kemailsettings.cpp - kprotocolinfo.cpp renamedlg.cpp skipdlg.cpp kremoteencoding.cpp - kmimetypechooser.cpp -) - -tde_add_library( ${target} STATIC_PIC AUTOMOC - SOURCES ${${target}_SRCS} - DEPENDENCIES dcopidl -) - - -##### tdesycoca ################################### - -set( target tdesycoca ) - -set( ${target}_SRCS - kdirwatch.cpp kfileshare.cpp ksambashare.cpp - knfsshare.cpp ktrader.cpp ktraderparse.cpp - ktraderparsetree.cpp kservicetypefactory.cpp - kservicetype.cpp kmimetype.cpp kservicegroup.cpp - kservice.cpp kservicefactory.cpp kuserprofile.cpp - kservicegroupfactory.cpp kurifilter.cpp kfilterbase.cpp - kfilterdev.cpp kshellcompletion.cpp kurlcompletion.cpp - kautomount.cpp krun.cpp kfileitem.cpp kdirlister.cpp - kimageio.cpp yacc.c lex.c chmodjob.cpp kscan.cpp - kar.cpp ktar.cpp kzip.cpp previewjob.cpp metainfojob.cpp - davjob.cpp kdatatool.cpp karchive.cpp kfilefilter.cpp - kfilemetainfo.cpp kdcopservicestarter.cpp dataslave.cpp - dataprotocol.cpp -) - -# FIXME seems that ACL is no longer optional -#if( USE_POSIX_ACL ) - set( ${target}_SRCS ${${target}_SRCS} kacl.cpp posixacladdons.cpp ) -#endif( USE_POSIX_ACL ) - -tde_add_library( ${target} STATIC_PIC AUTOMOC - SOURCES ${${target}_SRCS} - LINK ${GAMIN_LIBRARIES} -) - - -##### tdelficon ################################### - -if( HAVE_ELFICON ) - - set( target tdelficon ) - - set( ${target}_SRCS - tdelficon.cpp - ) - - tde_add_library( ${target} STATIC_PIC AUTOMOC - SOURCES ${${target}_SRCS} - ) - -endif( HAVE_ELFICON ) diff --git a/kio/kio/KFILEMETAINFO_ISSUES b/kio/kio/KFILEMETAINFO_ISSUES deleted file mode 100644 index a4486f85f..000000000 --- a/kio/kio/KFILEMETAINFO_ISSUES +++ /dev/null @@ -1,4 +0,0 @@ -Bugs: -===== - -currently none known diff --git a/kio/kio/Makefile.am b/kio/kio/Makefile.am deleted file mode 100644 index 63d5fc5d8..000000000 --- a/kio/kio/Makefile.am +++ /dev/null @@ -1,129 +0,0 @@ -# This file is part of the KDE libraries -# Copyright (C) 1997 Torben Weis (weis@kde.org) - -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Library General Public -# License as published by the Free Software Foundation; either -# version 2 of the License, or (at your option) any later version. - -# This library 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 -# Library General Public License for more details. - -# You should have received a copy of the GNU Library General Public License -# along with this library; see the file COPYING.LIB. If not, write to -# the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -# Boston, MA 02110-1301, USA. - -AM_CPPFLAGS = -D_LARGEFILE64_SOURCE - -INCLUDES= -I$(top_srcdir) -I$(srcdir)/.. -I$(top_srcdir)/tdecore/network -I$(srcdir)/../kssl -I../kssl -I$(srcdir)/../../interfaces $(all_includes) $(SSL_INCLUDES) - -noinst_LTLIBRARIES = libkiocore.la libtdesycoca.la - -# convenience lib - no LDFLAGS or LIBADD ! - -libtdesycoca_la_SOURCES = \ - kdirwatch.cpp \ - kfileshare.cpp ksambashare.cpp knfsshare.cpp \ - ktrader.cpp ktraderparse.cpp ktraderparsetree.cpp \ - kservicetypefactory.cpp kservicetype.cpp \ - kmimetype.cpp kservicegroup.cpp \ - kservice.cpp kservicefactory.cpp \ - kuserprofile.cpp kservicegroupfactory.cpp \ - kurifilter.cpp \ - kfilterbase.cpp kfilterdev.cpp \ - kshellcompletion.cpp kurlcompletion.cpp \ - kautomount.cpp krun.cpp \ - kfileitem.cpp kdirlister.cpp kimageio.cpp \ - yacc.c lex.c \ - chmodjob.cpp kscan.cpp kar.cpp ktar.cpp kzip.cpp previewjob.cpp metainfojob.cpp davjob.cpp \ - kdatatool.cpp karchive.cpp kfilefilter.cpp \ - kfilemetainfo.cpp kdcopservicestarter.cpp \ - dataslave.cpp dataprotocol.cpp -#if USE_POSIX_ACL - libtdesycoca_la_SOURCES += kacl.cpp posixacladdons.cpp -#endif - -include_HEADERS = \ - kservicetype.h kmimetype.h kmimemagic.h kservice.h \ - krun.h kdirwatch.h kautomount.h kuserprofile.h \ - kshred.h kar.h ktar.h kzip.h ktrader.h kurifilter.h kurlcompletion.h \ - kshellcompletion.h kfileitem.h kfileshare.h ksambashare.h knfsshare.h \ - kdirlister.h kservicegroup.h \ - kimageio.h kdirnotify.h kdirnotify_stub.h \ - kurlpixmapprovider.h kprotocolinfo.h kprotocolmanager.h \ - kfilterbase.h kfilterdev.h kemailsettings.h kscan.h kdatatool.h \ - karchive.h kfilefilter.h kfilemetainfo.h renamedlgplugin.h \ - kmimetyperesolver.h kdcopservicestarter.h kremoteencoding.h \ - kmimetypechooser.h -#if USE_POSIX_ACL -include_HEADERS += kacl.h -#endif - -#libkiocore_la_LDFLAGS = $(all_libraries) -#libkiocore_la_LIBADD = ../../tdeui/libtdeui.la ../../tdesu/libtdesu.la $(LIBZ) $(LIBFAM) $(LIBVOLMGT) - -libkiocore_la_SOURCES = authinfo.cpp \ - kshred.cpp \ - kprotocolmanager.cpp \ - slave.cpp slaveinterface.cpp observer.stub \ - sessiondata.cpp scheduler.cpp \ - connection.cpp \ - job.cpp global.cpp \ - slaveconfig.cpp kurlpixmapprovider.cpp \ - netaccess.cpp paste.cpp pastedialog.cpp \ - kmimemagic.cpp \ - tcpslavebase.cpp slavebase.cpp passdlg.cpp \ - forwardingslavebase.cpp \ - progressbase.cpp defaultprogress.cpp \ - statusbarprogress.cpp \ - kdirnotify.cpp kdirnotify.skel kdirnotify_stub.cpp \ - observer.cpp uiserver.stub observer.skel \ - kemailsettings.cpp \ - kprotocolinfo.cpp \ - renamedlg.cpp skipdlg.cpp kremoteencoding.cpp \ - kmimetypechooser.cpp - -uiserver_DIR = $(top_srcdir)/kio/misc - -METASOURCES = AUTO - -kioincludedir = $(includedir)/kio -kioinclude_HEADERS = connection.h \ - slaveinterface.h slave.h slaveconfig.h \ - sessiondata.h global.h passdlg.h \ - netaccess.h job.h scheduler.h \ - jobclasses.h paste.h slavebase.h \ - progressbase.h defaultprogress.h \ - statusbarprogress.h tcpslavebase.h \ - forwardingslavebase.h \ - observer.h chmodjob.h uiserver_stub.h \ - kmdbase.h authinfo.h \ - ioslave_defaults.h http_slave_defaults.h previewjob.h thumbcreator.h \ - metainfojob.h davjob.h renamedlg.h skipdlg.h - -# Internal -noinst_HEADERS = kservicetypefactory.h kservicefactory.h \ - kmessageboxwrapper.h \ - ktraderparse.h ktraderparsetree.h yacc.h \ - kimageiofactory.h kdirwatch_p.h kdirlister_p.h \ - renamedlg.h skipdlg.h dataslave.h dataprotocol.h \ - kservice_p.h -#if USE_POSIX_ACL -noinst_HEADERS += posixacladdons.h -#endif - -parserfiles = yacc.y lex.l - -EXTRA_DIST = $(parserfiles) - -parser: $(parserfiles) - cd $(srcdir) ;\ - flex -olex.c -Pkiotrader lex.l ;\ - bison -d -p kiotrader yacc.y && mv yacc.tab.c yacc.c; mv yacc.tab.h yacc.h - -.PHONY: parser - -include ../../admin/Doxyfile.am diff --git a/kio/kio/authinfo.cpp b/kio/kio/authinfo.cpp deleted file mode 100644 index 483bc682f..000000000 --- a/kio/kio/authinfo.cpp +++ /dev/null @@ -1,332 +0,0 @@ -/* - * This file is part of the KDE libraries - * Copyright (C) 2000-2001 Dawit Alemayehu - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library 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 - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public License - * along with this library; see the file COPYING.LIB. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - */ - -#include - -#include -#include -#include -#include -#include - -#include -#include - -#include -#include -#include -#include -#include - -#include "kio/authinfo.h" - -#define NETRC_READ_BUF_SIZE 4096 - -using namespace TDEIO; - -AuthInfo::AuthInfo() -{ - modified = false; - readOnly = false; - verifyPath = false; - keepPassword = false; -} - -AuthInfo::AuthInfo( const AuthInfo& info ) -{ - (*this) = info; -} - -AuthInfo& AuthInfo::operator= ( const AuthInfo& info ) -{ - url = info.url; - username = info.username; - password = info.password; - prompt = info.prompt; - caption = info.caption; - comment = info.comment; - commentLabel = info.commentLabel; - realmValue = info.realmValue; - digestInfo = info.digestInfo; - verifyPath = info.verifyPath; - readOnly = info.readOnly; - keepPassword = info.keepPassword; - modified = info.modified; - return *this; -} - -TQDataStream& TDEIO::operator<< (TQDataStream& s, const AuthInfo& a) -{ - s << a.url << a.username << a.password << a.prompt << a.caption - << a.comment << a.commentLabel << a.realmValue << a.digestInfo - << TQ_UINT8(a.verifyPath ? 1:0) << TQ_UINT8(a.readOnly ? 1:0) - << TQ_UINT8(a.keepPassword ? 1:0) << TQ_UINT8(a.modified ? 1:0); - return s; -} - -TQDataStream& TDEIO::operator>> (TQDataStream& s, AuthInfo& a) -{ - TQ_UINT8 verify = 0; - TQ_UINT8 ro = 0; - TQ_UINT8 keep = 0; - TQ_UINT8 mod = 0; - - s >> a.url >> a.username >> a.password >> a.prompt >> a.caption - >> a.comment >> a.commentLabel >> a.realmValue >> a.digestInfo - >> verify >> ro >> keep >> mod; - a.verifyPath = (verify != 0); - a.readOnly = (ro != 0); - a.keepPassword = (keep != 0); - a.modified = (mod != 0); - return s; -} - - -NetRC* NetRC::instance = 0L; - -NetRC::NetRC() -{ - isDirty = false; -} - -NetRC::~NetRC() -{ - delete instance; - instance = 0L; -} - -NetRC* NetRC::self() -{ - if ( !instance ) - instance = new NetRC(); - return instance; -} - -bool NetRC::lookup( const KURL& url, AutoLogin& login, bool userealnetrc, - TQString type, int mode ) -{ - // kdDebug() << "AutoLogin lookup for: " << url.host() << endl; - if ( !url.isValid() ) - return false; - - if ( type.isEmpty() ) - type = url.protocol(); - - if ( loginMap.isEmpty() || isDirty ) - { - loginMap.clear(); - - TQString filename = locateLocal("config", "kionetrc"); - bool status = parse (openf (filename)); - - if ( userealnetrc ) - { - filename = TQDir::homeDirPath()+ TQDir::separator() + ".netrc"; - status |= parse (openf(filename)); - } - - if ( !status ) - return false; - } - - if ( !loginMap.contains( type ) ) - return false; - - LoginList l = loginMap[type]; - if ( l.isEmpty() ) - return false; - - for (LoginList::Iterator it = l.begin(); it != l.end(); ++it) - { - AutoLogin &log = *it; - - if ( (mode & defaultOnly) == defaultOnly && - log.machine == TQString::fromLatin1("default") && - (login.login.isEmpty() || login.login == log.login) ) - { - login.type = log.type; - login.machine = log.machine; - login.login = log.login; - login.password = log.password; - login.macdef = log.macdef; - } - - if ( (mode & presetOnly) == presetOnly && - log.machine == TQString::fromLatin1("preset") && - (login.login.isEmpty() || login.login == log.login) ) - { - login.type = log.type; - login.machine = log.machine; - login.login = log.login; - login.password = log.password; - login.macdef = log.macdef; - } - - if ( (mode & exactOnly) == exactOnly && - log.machine == url.host() && - (login.login.isEmpty() || login.login == log.login) ) - { - login.type = log.type; - login.machine = log.machine; - login.login = log.login; - login.password = log.password; - login.macdef = log.macdef; - break; - } - } - - return true; -} - -int NetRC::openf( const TQString& f ) -{ - KDE_struct_stat sbuff; - TQCString ef = TQFile::encodeName(f); - if ( KDE_stat(ef, &sbuff) != 0 ) - return -1; - - // Security check!! - if ( sbuff.st_mode != (S_IFREG|S_IRUSR|S_IWUSR) || - sbuff.st_uid != geteuid() ) - return -1; - - return KDE_open( ef, O_RDONLY ); -} - -TQString NetRC::extract( const char* buf, const char* key, int& pos ) -{ - int idx = pos; - int m_len = strlen(key); - int b_len = strlen(buf); - - while( idx < b_len ) - { - while( buf[idx] == ' ' || buf[idx] == '\t' ) - idx++; - - if ( strncasecmp( buf+idx, key, m_len ) != 0 ) - idx++; - else - { - idx += m_len; - while( buf[idx] == ' ' || buf[idx] == '\t' ) - idx++; - - int start = idx; - while( buf[idx] != ' ' && buf[idx] != '\t' && - buf[idx] != '\n' && buf[idx] != '\r' ) - idx++; - - if ( idx > start ) - { - pos = idx; - return TQString::fromLatin1( buf+start, idx-start); - } - } - } - - return TQString::null; -} - -bool NetRC::parse( int fd ) -{ - if (fd == -1) - return false; - - TQString type; - TQString macro; - - uint index = 0; - bool isMacro = false; - char* buf = new char[NETRC_READ_BUF_SIZE]; - FILE* fstream = KDE_fdopen( fd,"rb" ); - - while ( fgets (buf, NETRC_READ_BUF_SIZE, fstream) != 0L ) - { - int pos = 0; - - while ( buf[pos] == ' ' || buf[pos] == '\t' ) - pos++; - - if ( buf[pos] == '#' || buf[pos] == '\n' || - buf[pos] == '\r' || buf[pos] == '\0' ) - { - if ( buf[pos] != '#' && isMacro ) - isMacro = false; - - continue; - } - - if ( isMacro ) - { - int tail = strlen(buf); - while( buf[tail-1] == '\n' || buf[tail-1] =='\r' ) - tail--; - - TQString mac = TQString::fromLatin1(buf, tail).stripWhiteSpace(); - if ( !mac.isEmpty() ) - loginMap[type][index].macdef[macro].append( mac ); - - continue; - } - - AutoLogin l; - l.machine = extract( buf, "machine", pos ); - if ( l.machine.isEmpty() ) - { - if (strncasecmp(buf+pos, "default", 7) == 0 ) - { - pos += 7; - l.machine = TQString::fromLatin1("default"); - } - else if (strncasecmp(buf+pos, "preset", 6) == 0 ) - { - pos += 6; - l.machine = TQString::fromLatin1("preset"); - } - } - // kdDebug() << "Machine: " << l.machine << endl; - - l.login = extract( buf, "login", pos ); - // kdDebug() << "Login: " << l.login << endl; - - l.password = extract( buf, "password", pos ); - if ( l.password.isEmpty() ) - l.password = extract( buf, "account", pos ); - // kdDebug() << "Password: " << l.password << endl; - - type = l.type = extract( buf, "type", pos ); - if ( l.type.isEmpty() && !l.machine.isEmpty() ) - type = l.type = TQString::fromLatin1("ftp"); - // kdDebug() << "Type: " << l.type << endl; - - macro = extract( buf, "macdef", pos ); - isMacro = !macro.isEmpty(); - // kdDebug() << "Macro: " << macro << endl; - - loginMap[l.type].append(l); - index = loginMap[l.type].count()-1; - } - - delete [] buf; - fclose (fstream); - close (fd); - return true; -} diff --git a/kio/kio/authinfo.h b/kio/kio/authinfo.h deleted file mode 100644 index 019311ef8..000000000 --- a/kio/kio/authinfo.h +++ /dev/null @@ -1,320 +0,0 @@ -/* - * This file is part of the KDE libraries - * Copyright (C) 2000-2001 Dawit Alemayehu - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library 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 - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public License - * along with this library; see the file COPYING.LIB. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - */ - -#ifndef __KIO_AUTHINFO_H -#define __KIO_AUTHINFO_H - -#include -#include -#include - - -namespace TDEIO { - -/** - * This class is intended to make it easier to prompt for, cache - * and retrieve authorization information. - * - * When using this class to cache, retrieve or prompt authentication - * information, you only need to set the necessary attributes. For - * example, to check whether a password is already cached, the only - * required information is the URL of the resource and optionally - * whether or not a path match should be performed. Similarly, to - * prompt for password you only need to optionally set the prompt, - * username (if already supplied), comment and commentLabel fields. - * - * SPECIAL NOTE: If you extend this class to add additional - * parameters do not forget to overload the stream insertion and - * extraction operators ("<<" and ">>") so that the added data can - * be correctly serialzed. - * - * @short A two way messaging class for passing authentication information. - * @author Dawit Alemayehu - */ -class TDEIO_EXPORT AuthInfo -{ - TDEIO_EXPORT friend TQDataStream& operator<< (TQDataStream& s, const AuthInfo& a); - TDEIO_EXPORT friend TQDataStream& operator>> (TQDataStream& s, AuthInfo& a); - -public: - /** - * Default constructor. - */ - AuthInfo(); - - /** - * Copy constructor. - */ - AuthInfo( const AuthInfo& info ); - - /** - * Overloaded equal to operator. - */ - AuthInfo& operator=( const AuthInfo& info ); - - /** - * Use this method to check if the object was modified. - * @return true if the object has been modified - */ - bool isModified() const { return modified; } - - /** - * Use this method to indicate that this object has been modified. - * @param flag true to mark the object as modified, false to clear - */ - void setModified( bool flag ) { modified = flag; } - - /** - * The URL for which authentication is to be stored. - * - * This field is required when attempting to cache authorization - * and retrieve it. However, it is not needed when prompting - * the user for authorization info. - * - * This setting is @em required except when prompting the - * user for password. - */ - KURL url; - - /** - * This is @em required for caching. - */ - TQString username; - - /** - * This is @em required for caching. - */ - TQString password; - - /** - * Information to be displayed when prompting - * the user for authentication information. - * - * @note If this field is not set, the authentication - * dialog simply displays the preset default prompt. - * - * This setting is @em optional and empty by default. - */ - TQString prompt; - - /** - * The text to displayed in the title bar of - * the password prompting dialog. - * - * @note If this field is not set, the authentication - * dialog simply displays the preset default caption. - * - * This setting is @em optional and empty by default. - */ - TQString caption; - - /** - * Additional comment to be displayed when prompting - * the user for authentication information. - * - * This field allows you to display a short (no more than - * 80 characters) extra description in the password prompt - * dialog. For example, this field along with the - * commentLabel can be used to describe the server that - * requested the authentication: - * - * \code - * Server: Squid Proxy @ foo.com - * \endcode - * - * where "Server:" is the commentLabel and the rest is the - * actual comment. Note that it is always better to use - * the @p commentLabel field as it will be placed properly - * in the dialog rather than to include it within the actual - * comment. - * - * This setting is @em optional and empty by default. - */ - TQString comment; - - /** - * Descriptive label to be displayed in front of the - * comment when prompting the user for password. - * - * This setting is @em optional and only applicable when - * the comment field is also set. - */ - TQString commentLabel; - - /** - * A unique identifier that allows caching of multiple - * passwords for different resources in the same server. - * - * Mostly this setting is applicable to the HTTP protocol - * whose authentication scheme explicitly defines the use - * of such a unique key. However, any protocol that can - * generate or supply a unique id can effectively use it - * to distinguish passwords. - * - * (If you are instead interested in caching the authentication - * info for multiple users to the same server, refer to - * multipleUserCaching below) - * - * This setting is @em optional and not set by default. - */ - TQString realmValue; - - /** - * Field to store any extra authentication information for - * protocols that need it (ex: http). - * - * This setting is @em optional and mostly applicable for HTTP - * protocol. However, any protocol can make use of it to - * store extra info. - */ - TQString digestInfo; - - /** - * Flag that, if set, indicates whether a path match should be - * performed when requesting for cached authorization. - * - * A path is deemed to be a match if it is equal to or is a subset - * of the cached path. For example, if stored path is "/foo/bar" - * and the request's path set to "/foo/bar/acme", then it is a match - * whereas it would not if the request's path was set to "/foo". - * - * This setting is @em optional and false by default. - */ - bool verifyPath; - - /** - * Flag which if set forces the username field to be read-only. - * - * This setting is @em optional and false by default. - */ - bool readOnly; - - /** - * Flag to indicate the persistence of the given password. - * - * This is a two-way flag, when set before calling openPassDlg - * it makes the "keep Password" check box visible to the user. - * In return the flag will indicate the state of the check box. - * By default if the flag is checked the password will be cached - * for the entire life of the current KDE session otherwise the - * cached password is deleted right after the application using - * it has been closed. - */ - bool keepPassword; - -protected: - bool modified; -private: - class AuthInfoPrivate* d; -}; - -TDEIO_EXPORT TQDataStream& operator<< (TQDataStream& s, const AuthInfo& a); -TDEIO_EXPORT TQDataStream& operator>> (TQDataStream& s, AuthInfo& a); - -/** - * A Singleton class that provides access to passwords - * stored in .netrc files for automatic login purposes. - * This is only meant to address backward compatability - * with old automated ftp client style logins... - * - * @short An interface to the ftp .netrc files - * @author Dawit Alemayehu - */ -class TDEIO_EXPORT NetRC -{ -public: - - /** - * Specifies the mode to be used when searching for a - * matching automatic login info for a given site : - * - * @li exactOnly search entries with exact host name matches. - * @li defaultOnly search entries that are specified as "default". - * @li presetOnly search entries that are specified as "preset". - * - * @see lookup - */ - enum LookUpMode - { - exactOnly = 0x0002, - defaultOnly = 0x0004, - presetOnly = 0x0008 - }; - - /** - * Contains auto login information. - * @see lookup() - */ - struct AutoLogin - { - TQString type; - TQString machine; - TQString login; - TQString password; - TQMap macdef; - }; - - /** - * A reference to the instance of the class. - * @return the class - */ - static NetRC* self(); - - /** - * Looks up the @p login information for the given @p url. - * - * @param url the url whose login information will be checked - * @param login the login information will be writte here - * @param userealnetrc if true, use $HOME/.netrc fle - * @param type the type of the login. If null, the @p url's protocol - * will be taken - * @param mode the LookUpMode flags (ORed) for the query - */ - bool lookup( const KURL& url, AutoLogin& login, - bool userealnetrc = false, - TQString type = TQString::null, - int mode = (exactOnly|defaultOnly) ); - /** - * Reloads the auto login information. - */ - void reload() { isDirty = true; } - -protected: - TQString extract( const char*, const char*, int& ); - int openf( const TQString& ); - bool parse( int ); - -private: - NetRC(); - ~NetRC(); - -private: - bool isDirty; - - typedef TQValueList LoginList; - typedef TQMap LoginMap; - LoginMap loginMap; - - static NetRC* instance; - class NetRCPrivate; - NetRCPrivate* d; -}; -} -#endif diff --git a/kio/kio/chmodjob.cpp b/kio/kio/chmodjob.cpp deleted file mode 100644 index f589da957..000000000 --- a/kio/kio/chmodjob.cpp +++ /dev/null @@ -1,258 +0,0 @@ -/* This file is part of the KDE libraries - Copyright (C) 2000 Stephan Kulow - David Faure - Waldo Bastian - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include - -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -#include "kio/job.h" -#include "kio/chmodjob.h" - -#include - -using namespace TDEIO; - -ChmodJob::ChmodJob( const KFileItemList& lstItems, int permissions, int mask, - int newOwner, int newGroup, - bool recursive, bool showProgressInfo ) - : TDEIO::Job( showProgressInfo ), state( STATE_LISTING ), - m_permissions( permissions ), m_mask( mask ), - m_newOwner( newOwner ), m_newGroup( newGroup ), - m_recursive( recursive ), m_lstItems( lstItems ) -{ - TQTimer::singleShot( 0, this, TQT_SLOT(processList()) ); -} - -void ChmodJob::processList() -{ - while ( !m_lstItems.isEmpty() ) - { - KFileItem * item = m_lstItems.first(); - if ( !item->isLink() ) // don't do anything with symlinks - { - // File or directory -> remember to chmod - ChmodInfo info; - info.url = item->url(); - // This is a toplevel file, we apply changes directly (no +X emulation here) - info.permissions = ( m_permissions & m_mask ) | ( item->permissions() & ~m_mask ); - /*kdDebug(7007) << "\n current permissions=" << TQString::number(item->permissions(),8) - << "\n wanted permission=" << TQString::number(m_permissions,8) - << "\n with mask=" << TQString::number(m_mask,8) - << "\n with ~mask (mask bits we keep) =" << TQString::number((uint)~m_mask,8) - << "\n bits we keep =" << TQString::number(item->permissions() & ~m_mask,8) - << "\n new permissions = " << TQString::number(info.permissions,8) - << endl;*/ - m_infos.prepend( info ); - //kdDebug(7007) << "processList : Adding info for " << info.url.prettyURL() << endl; - // Directory and recursive -> list - if ( item->isDir() && m_recursive ) - { - //kdDebug(7007) << "ChmodJob::processList dir -> listing" << endl; - TDEIO::ListJob * listJob = TDEIO::listRecursive( item->url(), false /* no GUI */ ); - connect( listJob, TQT_SIGNAL(entries( TDEIO::Job *, - const TDEIO::UDSEntryList& )), - TQT_SLOT( slotEntries( TDEIO::Job*, - const TDEIO::UDSEntryList& ))); - addSubjob( listJob ); - return; // we'll come back later, when this one's finished - } - } - m_lstItems.removeFirst(); - } - kdDebug(7007) << "ChmodJob::processList -> going to STATE_CHMODING" << endl; - // We have finished, move on - state = STATE_CHMODING; - chmodNextFile(); -} - -void ChmodJob::slotEntries( TDEIO::Job*, const TDEIO::UDSEntryList & list ) -{ - TDEIO::UDSEntryListConstIterator it = list.begin(); - TDEIO::UDSEntryListConstIterator end = list.end(); - for (; it != end; ++it) { - TDEIO::UDSEntry::ConstIterator it2 = (*it).begin(); - mode_t permissions = 0; - bool isDir = false; - bool isLink = false; - TQString relativePath; - for( ; it2 != (*it).end(); it2++ ) { - switch( (*it2).m_uds ) { - case TDEIO::UDS_NAME: - relativePath = (*it2).m_str; - break; - case TDEIO::UDS_FILE_TYPE: - isDir = S_ISDIR((*it2).m_long); - break; - case TDEIO::UDS_LINK_DEST: - isLink = !(*it2).m_str.isEmpty(); - break; - case TDEIO::UDS_ACCESS: - permissions = (mode_t)((*it2).m_long); - break; - default: - break; - } - } - if ( !isLink && relativePath != TQString::fromLatin1("..") ) - { - ChmodInfo info; - info.url = m_lstItems.first()->url(); // base directory - info.url.addPath( relativePath ); - int mask = m_mask; - // Emulate -X: only give +x to files that had a +x bit already - // So the check is the opposite : if the file had no x bit, don't touch x bits - // For dirs this doesn't apply - if ( !isDir ) - { - int newPerms = m_permissions & mask; - if ( (newPerms & 0111) && !(permissions & 0111) ) - { - // don't interfere with mandatory file locking - if ( newPerms & 02000 ) - mask = mask & ~0101; - else - mask = mask & ~0111; - } - } - info.permissions = ( m_permissions & mask ) | ( permissions & ~mask ); - /*kdDebug(7007) << "\n current permissions=" << TQString::number(permissions,8) - << "\n wanted permission=" << TQString::number(m_permissions,8) - << "\n with mask=" << TQString::number(mask,8) - << "\n with ~mask (mask bits we keep) =" << TQString::number((uint)~mask,8) - << "\n bits we keep =" << TQString::number(permissions & ~mask,8) - << "\n new permissions = " << TQString::number(info.permissions,8) - << endl;*/ - // Prepend this info in our todo list. - // This way, the toplevel dirs are done last. - m_infos.prepend( info ); - } - } -} - -void ChmodJob::chmodNextFile() -{ - if ( !m_infos.isEmpty() ) - { - ChmodInfo info = m_infos.first(); - m_infos.remove( m_infos.begin() ); - // First update group / owner (if local file) - // (permissions have to set after, in case of suid and sgid) - if ( info.url.isLocalFile() && ( m_newOwner != -1 || m_newGroup != -1 ) ) - { - TQString path = info.url.path(); - if ( chown( TQFile::encodeName(path), m_newOwner, m_newGroup ) != 0 ) - { - int answer = KMessageBox::warningContinueCancel( 0, i18n( "Could not modify the ownership of file %1. You have insufficient access to the file to perform the change." ).arg(path), TQString::null, i18n("&Skip File") ); - if (answer == KMessageBox::Cancel) - { - m_error = ERR_USER_CANCELED; - emitResult(); - return; - } - } - } - - kdDebug(7007) << "ChmodJob::chmodNextFile chmod'ing " << info.url.prettyURL() - << " to " << TQString::number(info.permissions,8) << endl; - TDEIO::SimpleJob * job = TDEIO::chmod( info.url, info.permissions ); - // copy the metadata for acl and default acl - const TQString aclString = queryMetaData( "ACL_STRING" ); - const TQString defaultAclString = queryMetaData( "DEFAULT_ACL_STRING" ); - if ( !aclString.isEmpty() ) - job->addMetaData( "ACL_STRING", aclString ); - if ( !defaultAclString.isEmpty() ) - job->addMetaData( "DEFAULT_ACL_STRING", defaultAclString ); - addSubjob(job); - } - else - // We have finished - emitResult(); -} - -void ChmodJob::slotResult( TDEIO::Job * job ) -{ - if ( job->error() ) - { - m_error = job->error(); - m_errorText = job->errorText(); - emitResult(); - return; - } - //kdDebug(7007) << " ChmodJob::slotResult( TDEIO::Job * job ) m_lstItems:" << m_lstItems.count() << endl; - switch ( state ) - { - case STATE_LISTING: - subjobs.remove(job); - m_lstItems.removeFirst(); - kdDebug(7007) << "ChmodJob::slotResult -> processList" << endl; - processList(); - return; - case STATE_CHMODING: - subjobs.remove(job); - kdDebug(7007) << "ChmodJob::slotResult -> chmodNextFile" << endl; - chmodNextFile(); - return; - default: - assert(0); - return; - } -} - -// antlarr: KDE 4: Make owner and group be const TQString & -TDEIO_EXPORT ChmodJob *TDEIO::chmod( const KFileItemList& lstItems, int permissions, int mask, - TQString owner, TQString group, - bool recursive, bool showProgressInfo ) -{ - uid_t newOwnerID = (uid_t)-1; // chown(2) : -1 means no change - if ( !owner.isEmpty() ) - { - struct passwd* pw = getpwnam(TQFile::encodeName(owner)); - if ( pw == 0L ) - kdError(250) << " ERROR: No user " << owner << endl; - else - newOwnerID = pw->pw_uid; - } - gid_t newGroupID = (gid_t)-1; // chown(2) : -1 means no change - if ( !group.isEmpty() ) - { - struct group* g = getgrnam(TQFile::encodeName(group)); - if ( g == 0L ) - kdError(250) << " ERROR: No group " << group << endl; - else - newGroupID = g->gr_gid; - } - return new ChmodJob( lstItems, permissions, mask, newOwnerID, newGroupID, recursive, showProgressInfo ); -} - -void ChmodJob::virtual_hook( int id, void* data ) -{ TDEIO::Job::virtual_hook( id, data ); } - -#include "chmodjob.moc" diff --git a/kio/kio/chmodjob.h b/kio/kio/chmodjob.h deleted file mode 100644 index 81b614562..000000000 --- a/kio/kio/chmodjob.h +++ /dev/null @@ -1,109 +0,0 @@ -// -*- c++ -*- -/* This file is part of the KDE libraries - Copyright (C) 2000 David Faure - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef __kio_chmodjob_h__ -#define __kio_chmodjob_h__ - -#include -#include - -#include -#include -#include - -namespace TDEIO { - - /** - * This job changes permissions on a list of files or directories, - * optionally in a recursive manner. - * @see TDEIO::chmod() - */ - class TDEIO_EXPORT ChmodJob : public TDEIO::Job - { - Q_OBJECT - public: - /** - * Create new ChmodJobs using the TDEIO::chmod() function. - */ - ChmodJob( const KFileItemList & lstItems, int permissions, int mask, - int newOwner, int newGroup, - bool recursive, bool showProgressInfo ); - - protected: - void chmodNextFile(); - - protected slots: - - virtual void slotResult( TDEIO::Job *job ); - void slotEntries( TDEIO::Job * , const TDEIO::UDSEntryList & ); - void processList(); - - private: - struct ChmodInfo - { - KURL url; - int permissions; - }; - enum { STATE_LISTING, STATE_CHMODING } state; - int m_permissions; - int m_mask; - int m_newOwner; - int m_newGroup; - bool m_recursive; - KFileItemList m_lstItems; - TQValueList m_infos; - protected: - virtual void virtual_hook( int id, void* data ); - private: - class ChmodJobPrivate* d; - }; - - - /** - * Creates a job that changes permissions/ownership on several files or directories, - * optionally recursively. - * This version of chmod uses a KFileItemList so that it directly knows - * what to do with the items. TODO: a version that takes a KURL::List, - * and a general job that stats each url and returns a KFileItemList. - * - * Note that change of ownership is only supported for local files. - * - * Inside directories, the "x" bits will only be changed for files that had - * at least one "x" bit before, and for directories. - * This emulates the behavior of chmod +X. - * - * @param lstItems The file items representing several files or directories. - * @param permissions the permissions we want to set - * @param mask the bits we are allowed to change. - * For instance, if mask is 0077, we don't change - * the "user" bits, only "group" and "others". - * @param newOwner If non-empty, the new owner for the files - * @param newGroup If non-empty, the new group for the files - * @param recursive whether to open directories recursively - * @param showProgressInfo true to show progess information - * @return The job handling the operation. - */ - TDEIO_EXPORT ChmodJob * chmod( const KFileItemList& lstItems, int permissions, int mask, - TQString newOwner, TQString newGroup, - bool recursive, bool showProgressInfo = true ); - -} - -#endif diff --git a/kio/kio/configure.in.in b/kio/kio/configure.in.in deleted file mode 100644 index 8683dfec1..000000000 --- a/kio/kio/configure.in.in +++ /dev/null @@ -1,167 +0,0 @@ -dnl ------------------------------------------------------------------------ -dnl Try to find if FAM is installed -dnl ------------------------------------------------------------------------ -dnl -kde_have_fam=yes -AC_ARG_ENABLE(libfam, - AC_HELP_STRING([--disable-libfam],[don't search for libfam and do not use it]), -[ kde_have_fam=$enableval ], [])dnl - -dnl Bloody libfam is C++ and certainly compiled by GNU C++. This means, -dnl we can't use it, when compiling with another C++ compiler, as the -dnl runtime systems would conflict (e.g. in KAI C++) (matz) -test "$GXX" = yes || kde_have_fam=no - -if test "$kde_have_fam" = "yes" ; then - AC_LANG_SAVE - AC_LANG_CPLUSPLUS - KDE_CHECK_LIB(fam, FAMOpen, [LIBFAM="-lfam"; kde_have_fam=yes],kde_have_fam=no) - if test $kde_have_fam = yes; then - AC_DEFINE_UNQUOTED(HAVE_FAM, 1, [Define if your system has libfam]) - fi - AC_LANG_RESTORE -fi -AC_SUBST(LIBFAM) -dnl ------------------------------------------------------------------------ -dnl Try to find if LIBZ is installed -dnl ------------------------------------------------------------------------ -dnl - -AC_FIND_ZLIB - -AC_CHECK_HEADERS(sys/mnttab.h sys/mntent.h mntent.h fstab.h sys/ucred.h sys/mount.h) -AC_CHECK_FUNCS(setmntent getmntinfo) - -AH_VERBATIM(_GETMNTINFO, [ -#ifdef __osf__ -#ifdef __cplusplus -extern "C" { -#endif -#include -int getmntinfo(struct statfs **mntbufp, int flags); -#include /* for mnt_names[] */ -#ifdef __cplusplus -} -#endif -#endif -]) - -dnl ------------------------------------------------------------------------ -dnl Try to find if libvolmgt is installed (Solaris) -dnl ------------------------------------------------------------------------ -kde_have_volmgt=yes -AC_CHECK_LIB(volmgt, volmgt_running, [LIBVOLMGT=-lvolmgt], kde_have_volmgt=no) -AC_SUBST(LIBVOLMGT) -if test "$kde_have_volmgt" = "yes"; then - AC_DEFINE_UNQUOTED(HAVE_VOLMGT, 1, [Define, to enable volume management (Solaris 2.x), if you have -lvolmgt]) -fi - -dnl ------------------------------------------------------------------------ -dnl Try to find if we have Linux Dir Notification -dnl ------------------------------------------------------------------------ - -AC_ARG_ENABLE(dnotify, -AC_HELP_STRING([--enable-dnotify],[enable use of Linux directory notifications]), -[ kde_enable_dnotify=$enableval ], [])dnl - -AC_CHECK_GNU_EXTENSIONS - -if test "x$kde_enable_dnotify" = "xyes"; then - AC_MSG_CHECKING([for Linux Directory Notification]) - AC_CACHE_VAL(kde_cv_have_dnotify, - [ - kde_cv_have_dnotify=no - AC_LANG_SAVE - AC_LANG_C - - AC_TRY_COMPILE( - [ -#include -#include - ], - [ -#ifndef F_NOTIFY -#error no dir notification -#endif - int fd; - siginfo_t *t = 0; - - fcntl(fd, F_SETSIG, SIGRTMIN); - fcntl(fd, F_NOTIFY, DN_DELETE|DN_CREATE|DN_MULTISHOT); - - ],kde_cv_have_dnotify=yes) - - AC_LANG_RESTORE - ]) - - if test "$kde_cv_have_dnotify" = "yes" ; then - AC_DEFINE_UNQUOTED(HAVE_DNOTIFY, 1, [Define if your system has Linux Directory Notification]) - AC_MSG_RESULT(yes) - else - AC_MSG_RESULT(no) - fi -fi - -dnl ------------------------------------------------------------------------ -dnl Try to find if we have Linux Inode based Dir Notification -dnl ------------------------------------------------------------------------ - -AC_ARG_ENABLE(inotify, -AC_HELP_STRING([--disable-inotify],[enable use of Linux inode notifications]), -[ kde_enable_inotify=$enableval ], [kde_enable_inotify=yes])dnl - -AC_CHECK_GNU_EXTENSIONS - -if test "x$kde_enable_inotify" = "xyes"; then - AC_MSG_CHECKING([for Linux Inotify Notification]) - AC_CACHE_VAL(kde_cv_have_inotify, - [ - kde_cv_have_inotify=no - AC_LANG_SAVE - AC_LANG_C - - AC_TRY_COMPILE( - [ -#include -#define _S390_BITOPS_H -#include - ], - [ -#ifndef IN_ALL_EVENTS -#error no inotify notification -#endif - - ],kde_cv_have_inotify=yes,kde_cv_have_inotify=no) - - AC_LANG_RESTORE - ]) - - AC_CACHE_VAL(kde_cv_have_sys_inotify, - [ - kde_cv_have_sys_inotify=no - AC_LANG_SAVE - AC_LANG_C - - AC_TRY_COMPILE( - [ -#include - ], - [ -#ifndef IN_ALL_EVENTS -#error no inotify notification -#endif - ],kde_cv_have_sys_inotify=yes,kde_cv_have_sys_inotify=no) - - AC_LANG_RESTORE - ]) - - if test "$kde_cv_have_inotify" = "yes" -o "$kde_cv_have_sys_inotify" = "yes"; then - AC_DEFINE_UNQUOTED(HAVE_INOTIFY, 1, [Define if your system has Linux Inode Notification]) - if test "$kde_cv_have_sys_inotify" = "yes"; then - AC_DEFINE_UNQUOTED(HAVE_SYS_INOTIFY, 1, [Define if your system has glibc support for inotify]) - fi - AC_MSG_RESULT(yes) - else - AC_MSG_RESULT(no) - fi -fi diff --git a/kio/kio/connection.cpp b/kio/kio/connection.cpp deleted file mode 100644 index d85f4921c..000000000 --- a/kio/kio/connection.cpp +++ /dev/null @@ -1,273 +0,0 @@ -/* This file is part of the KDE libraries - Copyright (C) 2000 Stephan Kulow - David Faure - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -// $Id$ - -#include - -#include -#include -#include - -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -#include "kio/connection.h" - -#include -#include - -using namespace TDEIO; - -Connection::Connection() -{ - f_out = 0; - fd_in = -1; - socket = 0; - notifier = 0; - receiver = 0; - member = 0; - m_suspended = false; - tasks.setAutoDelete(true); -} - -Connection::~Connection() -{ - close(); -} - -void Connection::suspend() -{ - m_suspended = true; - if (notifier) - notifier->setEnabled(false); -} - -void Connection::resume() -{ - m_suspended = false; - if (notifier) - notifier->setEnabled(true); -} - -void Connection::close() -{ - delete notifier; - notifier = 0; - delete socket; - socket = 0; - - // TDESocket has already closed the file descriptor, but we need to - // close the file-stream as well otherwise we leak memory. - // As a result we close the file descriptor twice, but that should - // be harmless - // KDE4: fix this - if (f_out) - fclose(f_out); - f_out = 0; - fd_in = -1; - tasks.clear(); -} - -void Connection::send(int cmd, const TQByteArray& data) -{ - if (!inited() || tasks.count() > 0) { - Task *task = new Task(); - task->cmd = cmd; - task->data = data; - tasks.append(task); - } else { - sendnow( cmd, data ); - } -} - -void Connection::dequeue() -{ - if (!inited()) - return; - - while (tasks.count()) - { - tasks.first(); - Task *task = tasks.take(); - sendnow( task->cmd, task->data ); - delete task; - } -} - -void Connection::init(TDESocket *sock) -{ - delete notifier; - notifier = 0; -#ifdef Q_OS_UNIX //TODO: not yet available on WIN32 - delete socket; - socket = sock; - fd_in = socket->socket(); - f_out = KDE_fdopen( socket->socket(), "wb" ); -#endif - if (receiver && ( fd_in != -1 )) { - notifier = new TQSocketNotifier(fd_in, TQSocketNotifier::Read); - if ( m_suspended ) { - suspend(); - } - TQObject::connect(notifier, TQT_SIGNAL(activated(int)), receiver, member); - } - dequeue(); -} - -void Connection::init(int _fd_in, int fd_out) -{ - delete notifier; - notifier = 0; - fd_in = _fd_in; - f_out = KDE_fdopen( fd_out, "wb" ); - if (receiver && ( fd_in != -1 )) { - notifier = new TQSocketNotifier(fd_in, TQSocketNotifier::Read); - if ( m_suspended ) { - suspend(); - } - TQObject::connect(notifier, TQT_SIGNAL(activated(int)), receiver, member); - } - dequeue(); -} - - -void Connection::connect(TQObject *_receiver, const char *_member) -{ - receiver = _receiver; - member = _member; - delete notifier; - notifier = 0; - if (receiver && (fd_in != -1 )) { - notifier = new TQSocketNotifier(fd_in, TQSocketNotifier::Read); - if ( m_suspended ) - suspend(); - TQObject::connect(notifier, TQT_SIGNAL(activated(int)), receiver, member); - } -} - -bool Connection::sendnow( int _cmd, const TQByteArray &data ) -{ - if (f_out == 0) { - return false; - } - - if (data.size() > 0xffffff) - return false; - - static char buffer[ 64 ]; - sprintf( buffer, "%6x_%2x_", data.size(), _cmd ); - - size_t n = fwrite( buffer, 1, 10, f_out ); - - if ( n != 10 ) { - kdError(7017) << "Could not send header" << endl; - return false; - } - - n = fwrite( data.data(), 1, data.size(), f_out ); - - if ( n != data.size() ) { - kdError(7017) << "Could not write data" << endl; - return false; - } - - if (fflush( f_out )) { - kdError(7017) << "Could not write data" << endl; - return false; - } - - return true; -} - -int Connection::read( int* _cmd, TQByteArray &data ) -{ - if (fd_in == -1 ) { - kdError(7017) << "read: not yet inited" << endl; - return -1; - } - - static char buffer[ 10 ]; - - again1: - ssize_t n = ::read( fd_in, buffer, 10); - if ( n == -1 && errno == EINTR ) - goto again1; - - if ( n == -1) { - kdError(7017) << "Header read failed, errno=" << errno << endl; - } - - if ( n != 10 ) { - if ( n ) // 0 indicates end of file - kdError(7017) << "Header has invalid size (" << n << ")" << endl; - return -1; - } - - buffer[ 6 ] = 0; - buffer[ 9 ] = 0; - - char *p = buffer; - while( *p == ' ' ) p++; - long int len = strtol( p, 0L, 16 ); - - p = buffer + 7; - while( *p == ' ' ) p++; - long int cmd = strtol( p, 0L, 16 ); - - data.resize( len ); - - if ( len > 0L ) { - size_t bytesToGo = len; - size_t bytesRead = 0; - do { - n = ::read(fd_in, data.data()+bytesRead, bytesToGo); - if (n == -1) { - if (errno == EINTR) - continue; - - kdError(7017) << "Data read failed, errno=" << errno << endl; - return -1; - } - if ( !n ) { // 0 indicates end of file - kdError(7017) << "Connection ended unexpectedly (" << n << "/" << bytesToGo << ")" << endl; - return -1; - } - - bytesRead += n; - bytesToGo -= n; - } - while(bytesToGo); - } - - *_cmd = cmd; - return len; -} - -#include "connection.moc" diff --git a/kio/kio/connection.h b/kio/kio/connection.h deleted file mode 100644 index fb0b50e15..000000000 --- a/kio/kio/connection.h +++ /dev/null @@ -1,158 +0,0 @@ -// -*- c++ -*- -/* This file is part of the KDE libraries - Copyright (C) 2000 Stephan Kulow - David Faure - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef __connection_h__ -#define __connection_h__ - -#include - -#include - -#include -#include -#include - -class TDESocket; -class TQSocketNotifier; - -namespace TDEIO { - - struct TDEIO_EXPORT Task { - int cmd; - TQByteArray data; - }; - - /** - * This class provides a simple means for IPC between two applications - * via a pipe. - * It handles a queue of commands to be sent which makes it possible to - * queue data before an actual connection has been established. - */ - class TDEIO_EXPORT Connection : public TQObject - { - Q_OBJECT - public: - /** - * Creates a new connection. - * @see init() - */ - Connection(); - virtual ~Connection(); - - /** - * Initialize this connection to use the given socket. - * @param sock the socket to use - * @see inited() - */ - void init(TDESocket *sock); - /** - * Initialize the connection to use the given file - * descriptors. - * @param fd_in the input file descriptor to use - * @param fd_out the output file descriptor to use - * @see inited() - */ - void init(int fd_in, int fd_out); // Used by KDENOX - void connect(TQObject *receiver = 0, const char *member = 0); - /// Closes the connection. - void close(); - - /** - * Returns the input file descriptor. - * @return the input file descriptor - */ - int fd_from() const { return fd_in; } - /** - * Returns the output file descriptor. - * @return the output file descriptor - */ - int fd_to() const { return fileno( f_out ); } - - /** - * Checks whether the connection has been initialized. - * @return true if the initialized - * @see init() - */ - bool inited() const { return (fd_in != -1) && (f_out != 0); } - - /** - * Sends/queues the given command to be sent. - * @param cmd the command to set - * @param arr the bytes to send - */ - void send(int cmd, const TQByteArray &arr = TQByteArray()); - - /** - * Sends the given command immediately. - * @param _cmd the command to set - * @param data the bytes to send - * @return true if successful, false otherwise - */ - bool sendnow( int _cmd, const TQByteArray &data ); - - /** - * Receive data. - * - * @param _cmd the received command will be written here - * @param data the received data will be written here - * @return >=0 indicates the received data size upon success - * -1 indicates error - */ - int read( int* _cmd, TQByteArray &data ); - - /** - * Don't handle incoming data until resumed. - */ - void suspend(); - - /** - * Resume handling of incoming data. - */ - void resume(); - - /** - * Returns status of connection. - * @return true if suspended, false otherwise - */ - bool suspended() const { return m_suspended; } - - protected slots: - void dequeue(); - - protected: - - - private: - int fd_in; - FILE *f_out; - TDESocket *socket; - TQSocketNotifier *notifier; - TQObject *receiver; - const char *member; - TQPtrList tasks; - bool m_suspended; - private: - class ConnectionPrivate* d; - }; - -} - -#endif diff --git a/kio/kio/dataprotocol.cpp b/kio/kio/dataprotocol.cpp deleted file mode 100644 index 1e3db04d7..000000000 --- a/kio/kio/dataprotocol.cpp +++ /dev/null @@ -1,339 +0,0 @@ -// dataprotocol.cpp -// ================== -// -// Implementation of the data protocol (rfc 2397) -// -// Author: Leo Savernik -// Email: l.savernik@aon.at -// (C) 2002, 2003 by Leo Savernik -// Created: Sam Dez 28 14:11:18 CET 2002 - -/*************************************************************************** - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU Lesser General Public License as * - * published by the Free Software Foundation; version 2. * - * * - ***************************************************************************/ - -#include "dataprotocol.h" - -#include -#include -#include -#include - -#include -#include -#include -#include - -#ifdef DATAKIOSLAVE -# include -# include -#endif -#ifdef TESTKIO -# include -#endif - -#if !defined(DATAKIOSLAVE) && !defined(TESTKIO) -# define DISPATCH(f) dispatch_##f -#else -# define DISPATCH(f) f -#endif - -using namespace TDEIO; -#ifdef DATAKIOSLAVE -extern "C" { - - int kdemain( int argc, char **argv ) { - TDEInstance instance( "kio_data" ); - - kdDebug(7101) << "*** Starting kio_data " << endl; - - if (argc != 4) { - kdDebug(7101) << "Usage: kio_data protocol domain-socket1 domain-socket2" << endl; - exit(-1); - } - - DataProtocol slave(argv[2], argv[3]); - slave.dispatchLoop(); - - kdDebug(7101) << "*** kio_data Done" << endl; - return 0; - } -} -#endif - -/** structure containing header information */ -struct DataHeader { - TQString mime_type; // mime type of content (lowercase) - MetaData attributes; // attribute/value pairs (attribute lowercase, - // value unchanged) - bool is_base64; // true if data is base64 encoded - TQString url; // reference to decoded url - int data_offset; // zero-indexed position within url - // where the real data begins. May point beyond - // the end to indicate that there is no data - TQString *charset; // shortcut to charset (it always exists) -}; - -// constant string data -const TQChar text_plain_str[] = { 't','e','x','t','/','p','l','a','i','n' }; -const TQChar charset_str[] = { 'c','h','a','r','s','e','t' }; -const TQChar us_ascii_str[] = { 'u','s','-','a','s','c','i','i' }; -const TQChar base64_str[] = { 'b','a','s','e','6','4' }; - -/** returns the position of the first occurrence of any of the given characters - * @p c1 to @p c3 or buf.length() if none is contained. - * @param buf buffer where to look for c - * @param begin zero-indexed starting position - * @param c1 character to find - * @param c2 alternative character to find or '\0' to ignore - * @param c3 alternative character to find or '\0' to ignore - */ -static int find(const TQString &buf, int begin, TQChar c1, TQChar c2 = '\0', - TQChar c3 = '\0') { - int pos = begin; - int size = (int)buf.length(); - while (pos < size) { - TQChar ch = buf[pos]; - if (ch == c1 - || (c2 != '\0' && ch == c2) - || (c3 != '\0' && ch == c3)) - break; - pos++; - }/*wend*/ - return pos; -} - -/** extracts the string between the current position @p pos and the first - * occurrence of either @p c1 to @p c3 exclusively and updates @p pos - * to point at the found delimiter or at the end of the buffer if - * neither character occurred. - * @param buf buffer where to look for - * @param pos zero-indexed position within buffer - * @param c1 character to find - * @param c2 alternative character to find or 0 to ignore - * @param c3 alternative character to find or 0 to ignore - */ -inline TQString extract(const TQString &buf, int &pos, TQChar c1, - TQChar c2 = '\0', TQChar c3 = '\0') { - int oldpos = pos; - pos = find(buf,oldpos,c1,c2,c3); - return TQString(buf.unicode() + oldpos, pos - oldpos); -} - -/** ignores all whitespaces - * @param buf buffer to operate on - * @param pos position to shift to first non-whitespace character - * Upon return @p pos will either point to the first non-whitespace - * character or to the end of the buffer. - */ -inline void ignoreWS(const TQString &buf, int &pos) { - int size = (int)buf.length(); - TQChar ch = buf[pos]; - while (pos < size && (ch == ' ' || ch == '\t' || ch == '\n' - || ch == '\r')) - ch = buf[++pos]; -} - -/** parses a quoted string as per rfc 822. - * - * If trailing quote is missing, the whole rest of the buffer is returned. - * @param buf buffer to operate on - * @param pos position pointing to the leading quote - * @return the extracted string. @p pos will be updated to point to the - * character following the trailing quote. - */ -static TQString parseQuotedString(const TQString &buf, int &pos) { - int size = (int)buf.length(); - TQString res; - pos++; // jump over leading quote - bool escaped = false; // if true means next character is literal - bool parsing = true; // true as long as end quote not found - while (parsing && pos < size) { - TQChar ch = buf[pos++]; - if (escaped) { - res += ch; - escaped = false; - } else { - switch (ch) { - case '"': parsing = false; break; - case '\\': escaped = true; break; - default: res += ch; break; - }/*end switch*/ - }/*end if*/ - }/*wend*/ - return res; -} - -/** parses the header of a data url - * @param url the data url - * @param header_info fills the given DataHeader structure with the header - * information - */ -static void parseDataHeader(const KURL &url, DataHeader &header_info) { - TQConstString text_plain(text_plain_str,sizeof text_plain_str/sizeof text_plain_str[0]); - TQConstString charset(charset_str,sizeof charset_str/sizeof charset_str[0]); - TQConstString us_ascii(us_ascii_str,sizeof us_ascii_str/sizeof us_ascii_str[0]); - TQConstString base64(base64_str,sizeof base64_str/sizeof base64_str[0]); - // initialize header info members - header_info.mime_type = text_plain.string(); - header_info.charset = &header_info.attributes.insert( - charset.string(),us_ascii.string()) - .data(); - header_info.is_base64 = false; - - // decode url and save it - TQString &raw_url = header_info.url = TQString::fromLatin1("data:") + url.path(); - int raw_url_len = (int)raw_url.length(); - - // jump over scheme part (must be "data:", we don't even check that) - header_info.data_offset = raw_url.find(':'); - header_info.data_offset++; // jump over colon or to begin if scheme was missing - - // read mime type - if (header_info.data_offset >= raw_url_len) return; - TQString mime_type = extract(raw_url,header_info.data_offset,';',',') - .stripWhiteSpace(); - if (!mime_type.isEmpty()) header_info.mime_type = mime_type; - - if (header_info.data_offset >= raw_url_len) return; - // jump over delimiter token and return if data reached - if (raw_url[header_info.data_offset++] == ',') return; - - // read all attributes and store them - bool data_begin_reached = false; - while (!data_begin_reached && header_info.data_offset < raw_url_len) { - // read attribute - TQString attribute = extract(raw_url,header_info.data_offset,'=',';',',') - .stripWhiteSpace(); - if (header_info.data_offset >= raw_url_len - || raw_url[header_info.data_offset] != '=') { - // no assigment, must be base64 option - if (attribute == base64.string()) - header_info.is_base64 = true; - } else { - header_info.data_offset++; // jump over '=' token - - // read value - ignoreWS(raw_url,header_info.data_offset); - if (header_info.data_offset >= raw_url_len) return; - - TQString value; - if (raw_url[header_info.data_offset] == '"') { - value = parseQuotedString(raw_url,header_info.data_offset); - ignoreWS(raw_url,header_info.data_offset); - } else - value = extract(raw_url,header_info.data_offset,';',',') - .stripWhiteSpace(); - - // add attribute to map - header_info.attributes[attribute.lower()] = value; - - }/*end if*/ - if (header_info.data_offset < raw_url_len - && raw_url[header_info.data_offset] == ',') - data_begin_reached = true; - header_info.data_offset++; // jump over separator token - }/*wend*/ -} - -#ifdef DATAKIOSLAVE -DataProtocol::DataProtocol(const TQCString &pool_socket, const TQCString &app_socket) - : SlaveBase("kio_data", pool_socket, app_socket) { -#else -DataProtocol::DataProtocol() { -#endif - kdDebug() << "DataProtocol::DataProtocol()" << endl; -} - -/* --------------------------------------------------------------------- */ - -DataProtocol::~DataProtocol() { - kdDebug() << "DataProtocol::~DataProtocol()" << endl; -} - -/* --------------------------------------------------------------------- */ - -void DataProtocol::get(const KURL& url) { - ref(); - //kdDebug() << "===============================================================================================================================================================================" << endl; - kdDebug() << "kio_data@"<latin1()); - if (codec != 0) { - outData = codec->fromUnicode(url_data); - } else { - // if there is no approprate codec, just use local encoding. This - // should work for >90% of all cases. - outData = url_data.local8Bit(); - }/*end if*/ - }/*end if*/ - - //kdDebug() << "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" << endl; - //kdDebug() << "emit mimeType@"< -#elif !defined(TESTKIO) -# include "kio/dataslave.h" -#endif - -namespace TDEIO { - -/** This kioslave provides support of data urls as specified by rfc 2397 - * @see http://www.ietf.org/rfc/rfc2397.txt - * @author Leo Savernik - */ -#if defined(DATAKIOSLAVE) -class DataProtocol : public TDEIO::SlaveBase { -#elif defined(TESTKIO) -class DataProtocol : public TestSlave { -#else -class DataProtocol : public DataSlave { -#endif - -public: -#if defined(DATAKIOSLAVE) - DataProtocol(const TQCString &pool_socket, const TQCString &app_socket); -#else - DataProtocol(); -#endif - virtual ~DataProtocol(); - virtual void mimetype(const KURL &url); - virtual void get(const KURL &url); -#if defined(TESTKIO) - void ref() {} - void deref() {} -#endif -}; - -}/*end namespace*/ - -#endif diff --git a/kio/kio/dataslave.cpp b/kio/kio/dataslave.cpp deleted file mode 100644 index 528368ba5..000000000 --- a/kio/kio/dataslave.cpp +++ /dev/null @@ -1,213 +0,0 @@ -/* - * This file is part of the KDE libraries - * Copyright (c) 2003 Leo Savernik - * Derived from slave.cpp - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License version 2 as published by the Free Software Foundation. - * - * This library 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 - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public License - * along with this library; see the file COPYING.LIB. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - **/ - -#include - -#include "dataslave.h" -#include "dataprotocol.h" - -#include -#include - -#include - -using namespace TDEIO; - -#define KIO_DATA_POLL_INTERVAL 0 - -// don't forget to sync DISPATCH_DECL in dataslave.h -#define DISPATCH_IMPL(type) \ - void DataSlave::dispatch_##type() { \ - if (_suspended) { \ - QueueStruct q(Queue_##type); \ - dispatchQueue.push_back(q); \ - if (!timer->isActive()) timer->start(KIO_DATA_POLL_INTERVAL); \ - } else \ - type(); \ - } - -// don't forget to sync DISPATCH_DECL1 in dataslave.h -#define DISPATCH_IMPL1(type, paramtype, paramname) \ - void DataSlave::dispatch_##type(paramtype paramname) { \ - if (_suspended) { \ - QueueStruct q(Queue_##type); \ - q.paramname = paramname; \ - dispatchQueue.push_back(q); \ - if (!timer->isActive()) timer->start(KIO_DATA_POLL_INTERVAL); \ - } else \ - type(paramname); \ - } - - -DataSlave::DataSlave() : - Slave(true, 0, "data", TQString::null) -{ - //kdDebug() << this << k_funcinfo << endl; - _suspended = false; - timer = new TQTimer(this); - connect(timer, TQT_SIGNAL(timeout()), TQT_SLOT(dispatchNext())); -} - -DataSlave::~DataSlave() { - //kdDebug() << this << k_funcinfo << endl; -} - -void DataSlave::hold(const KURL &/*url*/) { - // ignored -} - -void DataSlave::suspend() { - _suspended = true; - //kdDebug() << this << k_funcinfo << endl; - timer->stop(); -} - -void DataSlave::resume() { - _suspended = false; - //kdDebug() << this << k_funcinfo << endl; - // aarrrgh! This makes the once hyper fast and efficient data protocol - // implementation slow as molasses. But it wouldn't work otherwise, - // and I don't want to start messing around with threads - timer->start(KIO_DATA_POLL_INTERVAL); -} - -// finished is a special case. If we emit it right away, then -// TransferJob::start can delete the job even before the end of the method -void DataSlave::dispatch_finished() { - QueueStruct q(Queue_finished); - dispatchQueue.push_back(q); - if (!timer->isActive()) timer->start(KIO_DATA_POLL_INTERVAL); -} - -void DataSlave::dispatchNext() { - if (dispatchQueue.empty()) { - timer->stop(); - return; - } - - const QueueStruct &q = dispatchQueue.front(); - //kdDebug() << this << k_funcinfo << "dispatching " << q.type << " " << dispatchQueue.size() << " left" << endl; - switch (q.type) { - case Queue_mimeType: mimeType(q.s); break; - case Queue_totalSize: totalSize(q.size); break; - case Queue_sendMetaData: sendMetaData(); break; - case Queue_data: data(q.ba); break; - case Queue_finished: finished(); break; - }/*end switch*/ - - dispatchQueue.pop_front(); -} - -void DataSlave::send(int cmd, const TQByteArray &arr) { - TQDataStream stream(arr, IO_ReadOnly); - - KURL url; - - switch (cmd) { - case CMD_GET: { - stream >> url; - get(url); - break; - } - case CMD_MIMETYPE: { - stream >> url; - mimetype(url); - break; - } - // ignore these (must not emit error, otherwise SIGSEGV occurs) - case CMD_META_DATA: - case CMD_SUBURL: - break; - default: - error(ERR_UNSUPPORTED_ACTION, - unsupportedActionErrorString(TQString::fromLatin1("data"),cmd)); - }/*end switch*/ -} - -bool DataSlave::suspended() { - return _suspended; -} - -void DataSlave::setHost(const TQString &/*host*/, int /*port*/, - const TQString &/*user*/, const TQString &/*passwd*/) { - // irrelevant -> will be ignored -} - -void DataSlave::setConfig(const MetaData &/*config*/) { - // FIXME: decide to handle this directly or not at all -#if 0 - TQByteArray data; - TQDataStream stream( data, IO_WriteOnly ); - stream << config; - slaveconn.send( CMD_CONFIG, data ); -#endif -} - -void DataSlave::setAllMetaData(const MetaData &md) { - meta_data = md; -} - -void DataSlave::sendMetaData() { - emit metaData(meta_data); -} - -void DataSlave::virtual_hook( int id, void* data ) { - switch (id) { - case VIRTUAL_SUSPEND: suspend(); return; - case VIRTUAL_RESUME: resume(); return; - case VIRTUAL_SEND: { - SendParams *params = reinterpret_cast(data); - send(params->cmd, *params->arr); - return; - } - case VIRTUAL_HOLD: { - HoldParams *params = reinterpret_cast(data); - hold(*params->url); - return; - } - case VIRTUAL_SUSPENDED: { - SuspendedParams *params = reinterpret_cast(data); - params->retval = suspended(); - return; - } - case VIRTUAL_SET_HOST: { - SetHostParams *params = reinterpret_cast(data); - setHost(*params->host,params->port,*params->user,*params->passwd); - return; - } - case VIRTUAL_SET_CONFIG: { - SetConfigParams *params = reinterpret_cast(data); - setConfig(*params->config); - return; - } - default: - TDEIO::Slave::virtual_hook( id, data ); - } -} - -DISPATCH_IMPL1(mimeType, const TQString &, s) -DISPATCH_IMPL1(totalSize, TDEIO::filesize_t, size) -DISPATCH_IMPL(sendMetaData) -DISPATCH_IMPL1(data, const TQByteArray &, ba) - -#undef DISPATCH_IMPL -#undef DISPATCH_IMPL1 - -#include "dataslave.moc" diff --git a/kio/kio/dataslave.h b/kio/kio/dataslave.h deleted file mode 100644 index 3567f3faf..000000000 --- a/kio/kio/dataslave.h +++ /dev/null @@ -1,126 +0,0 @@ -// -*- c++ -*- -/* - * This file is part of the KDE libraries - * Copyright (c) 2003 Leo Savernik - * Derived from slave.h - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License version 2 as published by the Free Software Foundation. - * - * This library 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 - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public License - * along with this library; see the file COPYING.LIB. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - **/ - -#ifndef __KIO_DATASLAVE_H__ -#define __KIO_DATASLAVE_H__ - -#include -#include - -class TQTimer; - -// don't forget to sync DISPATCH_IMPL in dataslave.h -#define DISPATCH_DECL(type) \ - void dispatch_##type(); - -// don't forget to sync DISPATCH_IMPL1 in dataslave.h -#define DISPATCH_DECL1(type, paramtype, param) \ - void dispatch_##type(paramtype param); - -namespace TDEIO { - - /** - * This class provides a high performance implementation for the data - * url scheme (rfc2397). - * - * @internal - * Do not use this class in external applications. It is an implementation - * detail of KIO and subject to change without notice. - * @author Leo Savernik - */ - class DataSlave : public TDEIO::Slave { - Q_OBJECT - public: - DataSlave(); - - virtual ~DataSlave(); - - virtual void setHost(const TQString &host, int port, - const TQString &user, const TQString &passwd); - virtual void setConfig(const MetaData &config); - - virtual void suspend(); - virtual void resume(); - virtual bool suspended(); - virtual void send(int cmd, const TQByteArray &data = TQByteArray()); - - virtual void hold(const KURL &url); - - // pure virtual methods that are defined by the actual protocol - virtual void get(const KURL &url) = 0; - virtual void mimetype(const KURL &url) = 0; - - protected: - /** - * Sets metadata - * @internal - */ - void setAllMetaData(const MetaData &); - /** - * Sends metadata set with setAllMetaData - * @internal - */ - void sendMetaData(); - - // queueing methods - /** identifiers of functions to be queued */ - enum QueueType { Queue_mimeType = 1, Queue_totalSize, - Queue_sendMetaData, Queue_data, Queue_finished }; - /** structure for queueing. It is very primitive, it doesn't - * even try to conserve memory. - */ - struct QueueStruct { - QueueType type; - TQString s; - TDEIO::filesize_t size; - TQByteArray ba; - - QueueStruct() {} - QueueStruct(QueueType type) : type(type) {} - }; - typedef TQValueList DispatchQueue; - DispatchQueue dispatchQueue; - - DISPATCH_DECL1(mimeType, const TQString &, s) - DISPATCH_DECL1(totalSize, TDEIO::filesize_t, size) - DISPATCH_DECL(sendMetaData) - DISPATCH_DECL1(data, const TQByteArray &, ba) - DISPATCH_DECL(finished) - - protected slots: - /** dispatches next queued method. Does nothing if there are no - * queued methods. - */ - void dispatchNext(); - protected: - virtual void virtual_hook( int id, void* data ); - private: - MetaData meta_data; - bool _suspended; - TQTimer *timer; - }; - -} - -#undef DISPATCH_DECL -#undef DISPATCH_DECL1 - -#endif /*__KIO_DATASLAVE_H__*/ diff --git a/kio/kio/davjob.cpp b/kio/kio/davjob.cpp deleted file mode 100644 index f1ba2d2d4..000000000 --- a/kio/kio/davjob.cpp +++ /dev/null @@ -1,142 +0,0 @@ -// -*- c++ -*- -/* This file is part of the KDE libraries - Copyright (C) 2002 Jan-Pascal van Best - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include - -#include -#include -#include -#include -#include -#include - -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -#define KIO_ARGS TQByteArray packedArgs; TQDataStream stream( packedArgs, IO_WriteOnly ); stream - -using namespace TDEIO; - -class DavJob::DavJobPrivate -{ -public: - TQByteArray savedStaticData; - TQByteArray str_response; // replaces the TQString previously used in DavJob itself -}; - -DavJob::DavJob( const KURL& url, int method, const TQString& request, bool showProgressInfo ) - : TransferJob( url, TDEIO::CMD_SPECIAL, TQByteArray(), TQByteArray(), showProgressInfo ) -{ - d = new DavJobPrivate; - // We couldn't set the args when calling the parent constructor, - // so do it now. - TQDataStream stream( m_packedArgs, IO_WriteOnly ); - stream << (int) 7 << url << method; - // Same for static data - if ( ! request.isEmpty() && ! request.isNull() ) { - staticData = "\r\n" + request.utf8(); - staticData.truncate( staticData.size() - 1 ); - d->savedStaticData = staticData.copy(); - } -} - -void DavJob::slotData( const TQByteArray& data ) -{ - if(m_redirectionURL.isEmpty() || !m_redirectionURL.isValid() || m_error) { - unsigned int oldSize = d->str_response.size(); - d->str_response.resize( oldSize + data.size() ); - memcpy( d->str_response.data() + oldSize, data.data(), data.size() ); - } -} - -void DavJob::slotFinished() -{ - // kdDebug(7113) << "DavJob::slotFinished()" << endl; - // kdDebug(7113) << d->str_response << endl; - if (!m_redirectionURL.isEmpty() && m_redirectionURL.isValid() && (m_command == CMD_SPECIAL)) { - TQDataStream istream( m_packedArgs, IO_ReadOnly ); - int s_cmd, s_method; - KURL s_url; - istream >> s_cmd; - istream >> s_url; - istream >> s_method; - // PROPFIND - if ( (s_cmd == 7) && (s_method == (int)TDEIO::DAV_PROPFIND) ) { - m_packedArgs.truncate(0); - TQDataStream stream( m_packedArgs, IO_WriteOnly ); - stream << (int)7 << m_redirectionURL << (int)TDEIO::DAV_PROPFIND; - } - } else if ( ! m_response.setContent( d->str_response, true ) ) { - // An error occurred parsing the XML response - TQDomElement root = m_response.createElementNS( "DAV:", "error-report" ); - m_response.appendChild( root ); - - TQDomElement el = m_response.createElementNS( "DAV:", "offending-response" ); - TQDomText textnode = m_response.createTextNode( d->str_response ); - el.appendChild( textnode ); - root.appendChild( el ); - delete d; // Should be in virtual destructor - d = 0; - } else { - delete d; // Should be in virtual destructor - d = 0; - } - // kdDebug(7113) << m_response.toString() << endl; - TransferJob::slotFinished(); - if( d ) staticData = d->savedStaticData.copy(); // Need to send DAV request to this host too -} - -/* Convenience methods */ - -// KDE 4: Make it const TQString & -DavJob* TDEIO::davPropFind( const KURL& url, const TQDomDocument& properties, TQString depth, bool showProgressInfo ) -{ - DavJob *job = new DavJob( url, (int) TDEIO::DAV_PROPFIND, properties.toString(), showProgressInfo ); - job->addMetaData( "davDepth", depth ); - return job; -} - - -DavJob* TDEIO::davPropPatch( const KURL& url, const TQDomDocument& properties, bool showProgressInfo ) -{ - return new DavJob( url, (int) TDEIO::DAV_PROPPATCH, properties.toString(), showProgressInfo ); -} - -DavJob* TDEIO::davSearch( const KURL& url, const TQString& nsURI, const TQString& qName, const TQString& query, bool showProgressInfo ) -{ - TQDomDocument doc; - TQDomElement searchrequest = doc.createElementNS( "DAV:", "searchrequest" ); - TQDomElement searchelement = doc.createElementNS( nsURI, qName ); - TQDomText text = doc.createTextNode( query ); - searchelement.appendChild( text ); - searchrequest.appendChild( searchelement ); - doc.appendChild( searchrequest ); - return new DavJob( url, TDEIO::DAV_SEARCH, doc.toString(), showProgressInfo ); -} - -#include "davjob.moc" diff --git a/kio/kio/davjob.h b/kio/kio/davjob.h deleted file mode 100644 index 02eaa6a78..000000000 --- a/kio/kio/davjob.h +++ /dev/null @@ -1,127 +0,0 @@ -// -*- c++ -*- -/* This file is part of the KDE libraries - Copyright (C) 2002 Jan-Pascal van Best - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef __kio_davjob_h__ -#define __kio_davjob_h__ - -#include - -#include -#include -#include -#include -#include -#include - -#include -#include - -#include -#include - -class Observer; -class TQTimer; - -namespace TDEIO { - - class Slave; - class SlaveInterface; - - /** - * The transfer job pumps data into and/or out of a Slave. - * Data is sent to the slave on request of the slave ( dataReq). - * If data coming from the slave can not be handled, the - * reading of data from the slave should be suspended. - * @see TDEIO::davPropFind() - * @see TDEIO::davPropPatch() - * @see TDEIO::davSearch() - * @since 3.1 - */ - class TDEIO_EXPORT DavJob : public TransferJob { - Q_OBJECT - - public: - /** - * Use TDEIO::davPropFind(), TDEIO::davPropPatch() and - * TDEIO::davSearch() to create a new DavJob. - */ - DavJob(const KURL& url, int method, - const TQString& request, bool showProgressInfo); - /** - * Returns the response as a TQDomDocument. - * @return the response document - */ - TQDomDocument& response() { return m_response; } - - protected slots: - virtual void slotFinished(); - virtual void slotData( const TQByteArray &data); - - protected: - bool m_suspended; - TransferJob *m_subJob; - private: - class DavJobPrivate; - DavJobPrivate *d; - TQString dummy; // kept around for BC reasons - TQDomDocument m_response; - }; - - /** - * Creates a new DavJob that issues a PROPFIND command. PROPFIND retrieves - * the properties of the resource identified by the given @p url. - * - * @param url the URL of the resource - * @param properties a propfind document that describes the properties that - * should be retrieved - * @param depth the depth of the request. Can be "0", "1" or "infinity" - * @param showProgressInfo true to show progress information - * @return the new DavJob - */ - TDEIO_EXPORT DavJob* davPropFind( const KURL& url, const TQDomDocument& properties, TQString depth, bool showProgressInfo=true ); - - /** - * Creates a new DavJob that issues a PROPPATCH command. PROPPATCH sets - * the properties of the resource identified by the given @p url. - * - * @param url the URL of the resource - * @param properties a PROPPACTCH document that describes the properties that - * should be modified and its new values - * @param showProgressInfo true to show progress information - * @return the new DavJob - */ - TDEIO_EXPORT DavJob* davPropPatch( const KURL& url, const TQDomDocument& properties, bool showProgressInfo=true ); - - /** - * Creates a new DavJob that issues a SEARCH command. - * - * @param url the URL of the resource - * @param nsURI the URI of the search method's qualified name - * @param qName the local part of the search method's qualified name - * @param query the search string - * @param showProgressInfo true to show progress information - * @return the new DavJob - */ - TDEIO_EXPORT DavJob* davSearch( const KURL &url, const TQString& nsURI, const TQString& qName, const TQString& query, bool showProgressInfo=true ); - -} - -#endif - diff --git a/kio/kio/defaultprogress.cpp b/kio/kio/defaultprogress.cpp deleted file mode 100644 index 72bec0cfc..000000000 --- a/kio/kio/defaultprogress.cpp +++ /dev/null @@ -1,507 +0,0 @@ -/* This file is part of the KDE libraries - Copyright (C) 2000 Matej Koss - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License version 2 as published by the Free Software Foundation. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#ifdef Q_WS_X11 -#include -#endif - -#include "jobclasses.h" -#include "defaultprogress.h" - -namespace TDEIO { - -class DefaultProgress::DefaultProgressPrivate -{ -public: - bool keepOpenChecked; - bool noCaptionYet; - KPushButton *cancelClose; - KPushButton *openFile; - KPushButton *openLocation; - TQCheckBox *keepOpen; - KURL location; - TQTime startTime; -}; - -DefaultProgress::DefaultProgress( bool showNow ) - : ProgressBase( 0 ), - m_iTotalSize(0), m_iTotalFiles(0), m_iTotalDirs(0), - m_iProcessedSize(0), m_iProcessedDirs(0), m_iProcessedFiles(0) -{ - init(); - - if ( showNow ) { - show(); - } -} - -DefaultProgress::DefaultProgress( TQWidget* parent, const char* /*name*/ ) - : ProgressBase( parent ), - m_iTotalSize(0), m_iTotalFiles(0), m_iTotalDirs(0), - m_iProcessedSize(0), m_iProcessedDirs(0), m_iProcessedFiles(0) -{ - init(); -} - -bool DefaultProgress::keepOpen() const -{ - return d->keepOpenChecked; -} - -void DefaultProgress::init() -{ - d = new DefaultProgressPrivate; - -#ifdef Q_WS_X11 //FIXME(E): Remove once all the KWin::foo calls have been ported to QWS - // Set a useful icon for this window! - KWin::setIcons( winId(), - TDEGlobal::iconLoader()->loadIcon( "filesave", KIcon::NoGroup, 32 ), - TDEGlobal::iconLoader()->loadIcon( "filesave", KIcon::NoGroup, 16 ) ); -#endif - - TQVBoxLayout *topLayout = new TQVBoxLayout( this, KDialog::marginHint(), - KDialog::spacingHint() ); - topLayout->addStrut( 360 ); // makes dlg at least that wide - - TQGridLayout *grid = new TQGridLayout( 2, 3 ); - topLayout->addLayout(TQT_TQLAYOUT(grid)); - grid->addColSpacing(1, KDialog::spacingHint()); - // filenames or action name - grid->addWidget(new TQLabel(i18n("Source:"), this), 0, 0); - - sourceEdit = new KLineEdit(this); - sourceEdit->setReadOnly(true); - sourceEdit->setEnableSqueezedText(true); - grid->addWidget(sourceEdit, 0, 2); - - destInvite = new TQLabel(i18n("Destination:"), this); - grid->addWidget(destInvite, 1, 0); - - destEdit = new KLineEdit(this); - destEdit->setReadOnly (true); - destEdit->setEnableSqueezedText(true); - grid->addWidget(destEdit, 1, 2); - - m_pProgressBar = new KProgress(this); - topLayout->addWidget( m_pProgressBar ); - - // processed info - TQHBoxLayout *hBox = new TQHBoxLayout(); - topLayout->addLayout(hBox); - - sizeLabel = new TQLabel(this); - hBox->addWidget(sizeLabel); - - resumeLabel = new TQLabel(this); - hBox->addWidget(resumeLabel); - - progressLabel = new TQLabel( this ); -/* progressLabel->setSizePolicy( TQSizePolicy( TQSizePolicy::MinimumExpanding, - TQSizePolicy::Preferred ) );*/ - progressLabel->setAlignment( TQLabel::AlignRight ); - hBox->addWidget( progressLabel ); - - hBox = new TQHBoxLayout(); - topLayout->addLayout(hBox); - - speedLabel = new TQLabel(this); - hBox->addWidget(speedLabel, 1); - - TQFrame *line = new TQFrame( this ); - line->setFrameShape( TQFrame::HLine ); - line->setFrameShadow( TQFrame::Sunken ); - topLayout->addWidget( line ); - - d->keepOpen = new TQCheckBox( i18n("&Keep this window open after transfer is complete"), this); - connect( d->keepOpen, TQT_SIGNAL( toggled(bool) ), TQT_SLOT( slotKeepOpenToggled(bool) ) ); - topLayout->addWidget(d->keepOpen); - d->keepOpen->hide(); - - hBox = new TQHBoxLayout(); - topLayout->addLayout(hBox); - - d->openFile = new KPushButton( i18n("Open &File"), this ); - connect( d->openFile, TQT_SIGNAL( clicked() ), TQT_SLOT( slotOpenFile() ) ); - hBox->addWidget( d->openFile ); - d->openFile->setEnabled(false); - d->openFile->hide(); - - d->openLocation = new KPushButton( i18n("Open &Destination"), this ); - connect( d->openLocation, TQT_SIGNAL( clicked() ), TQT_SLOT( slotOpenLocation() ) ); - hBox->addWidget( d->openLocation ); - d->openLocation->hide(); - - hBox->addStretch(1); - - d->cancelClose = new KPushButton( KStdGuiItem::cancel(), this ); - connect( d->cancelClose, TQT_SIGNAL( clicked() ), TQT_SLOT( slotStop() ) ); - hBox->addWidget( d->cancelClose ); - - resize( sizeHint() ); - setMaximumHeight(sizeHint().height()); - - d->keepOpenChecked = false; - d->noCaptionYet = true; - setCaption(i18n("Progress Dialog")); // show something better than kio_uiserver -} - -DefaultProgress::~DefaultProgress() -{ - delete d; -} - -void DefaultProgress::slotTotalSize( TDEIO::Job*, TDEIO::filesize_t size ) -{ - // size is measured in bytes - if ( m_iTotalSize == size ) - return; - m_iTotalSize = size; - if (d->startTime.isNull()) - d->startTime.start(); -} - - -void DefaultProgress::slotTotalFiles( TDEIO::Job*, unsigned long files ) -{ - if ( m_iTotalFiles == files ) - return; - m_iTotalFiles = files; - showTotals(); -} - - -void DefaultProgress::slotTotalDirs( TDEIO::Job*, unsigned long dirs ) -{ - if ( m_iTotalDirs == dirs ) - return; - m_iTotalDirs = dirs; - showTotals(); -} - -void DefaultProgress::showTotals() -{ - // Show the totals in the progress label, if we still haven't - // processed anything. This is useful when the stat'ing phase - // of CopyJob takes a long time (e.g. over networks). - if ( m_iProcessedFiles == 0 && m_iProcessedDirs == 0 ) - { - TQString tmps; - if ( m_iTotalDirs > 1 ) - // that we have a singular to translate looks weired but is only logical - // xgettext: no-c-format - tmps = i18n("%n folder", "%n folders", m_iTotalDirs) + " "; - // xgettext: no-c-format - tmps += i18n("%n file", "%n files", m_iTotalFiles); - progressLabel->setText( tmps ); - } -} - -//static -TQString DefaultProgress::makePercentString( unsigned long percent, - TDEIO::filesize_t totalSize, - unsigned long totalFiles ) -{ - if ( totalSize ) - return i18n( "%1 % of %2 " ).arg( TQString::number(percent) , TDEIO::convertSize( totalSize ) ); - else if ( totalFiles ) - return i18n( "%1 % of 1 file", "%1 % of %n files", totalFiles ).arg( percent ); - else - return i18n( "%1 %" ).arg( percent ); -} - -void DefaultProgress::slotPercent( TDEIO::Job*, unsigned long percent ) -{ - TQString caption = makePercentString( percent, m_iTotalSize, m_iTotalFiles ); - m_pProgressBar->setValue( percent ); - switch(mode) { - case Copy: - caption.append(i18n(" (Copying)")); - break; - case Move: - caption.append(i18n(" (Moving)")); - break; - case Delete: - caption.append(i18n(" (Deleting)")); - break; - case Create: - caption.append(i18n(" (Creating)")); - break; - case Done: - caption.append(i18n(" (Done)")); - break; - } - - setCaption( caption ); - d->noCaptionYet = false; -} - - -void DefaultProgress::slotInfoMessage( TDEIO::Job*, const TQString & msg ) -{ - speedLabel->setText( msg ); - speedLabel->setAlignment( speedLabel->alignment() & ~TQt::WordBreak ); -} - - -void DefaultProgress::slotProcessedSize( TDEIO::Job*, TDEIO::filesize_t bytes ) { - if ( m_iProcessedSize == bytes ) - return; - m_iProcessedSize = bytes; - - TQString tmp = i18n( "%1 of %2 complete") - .arg( TDEIO::convertSize(bytes) ) - .arg( TDEIO::convertSize(m_iTotalSize)); - sizeLabel->setText( tmp ); -} - - -void DefaultProgress::slotProcessedDirs( TDEIO::Job*, unsigned long dirs ) -{ - if ( m_iProcessedDirs == dirs ) - return; - m_iProcessedDirs = dirs; - - TQString tmps; - tmps = i18n("%1 / %n folder", "%1 / %n folders", m_iTotalDirs).arg( m_iProcessedDirs ); - tmps += " "; - tmps += i18n("%1 / %n file", "%1 / %n files", m_iTotalFiles).arg( m_iProcessedFiles ); - progressLabel->setText( tmps ); -} - - -void DefaultProgress::slotProcessedFiles( TDEIO::Job*, unsigned long files ) -{ - if ( m_iProcessedFiles == files ) - return; - m_iProcessedFiles = files; - - TQString tmps; - if ( m_iTotalDirs > 1 ) { - tmps = i18n("%1 / %n folder", "%1 / %n folders", m_iTotalDirs).arg( m_iProcessedDirs ); - tmps += " "; - } - tmps += i18n("%1 / %n file", "%1 / %n files", m_iTotalFiles).arg( m_iProcessedFiles ); - progressLabel->setText( tmps ); -} - - -void DefaultProgress::slotSpeed( TDEIO::Job*, unsigned long speed ) -{ - if ( speed == 0 ) { - speedLabel->setText( i18n( "Stalled") ); - } else { - speedLabel->setText( i18n( "%1/s ( %2 remaining )").arg( TDEIO::convertSize( speed )) - .arg( TDEIO::convertSeconds( TDEIO::calculateRemainingSeconds( m_iTotalSize, m_iProcessedSize, speed ))) ); - } -} - - -void DefaultProgress::slotCopying( TDEIO::Job*, const KURL& from, const KURL& to ) -{ - if ( d->noCaptionYet ) { - setCaption(i18n("Copy File(s) Progress")); - d->noCaptionYet = false; - } - mode = Copy; - sourceEdit->setText(from.prettyURL()); - setDestVisible( true ); - checkDestination( to ); - destEdit->setText(to.prettyURL()); -} - - -void DefaultProgress::slotMoving( TDEIO::Job*, const KURL& from, const KURL& to ) -{ - if ( d->noCaptionYet ) { - setCaption(i18n("Move File(s) Progress")); - d->noCaptionYet = false; - } - mode = Move; - sourceEdit->setText(from.prettyURL()); - setDestVisible( true ); - checkDestination( to ); - destEdit->setText(to.prettyURL()); -} - - -void DefaultProgress::slotCreatingDir( TDEIO::Job*, const KURL& dir ) -{ - if ( d->noCaptionYet ) { - setCaption(i18n("Creating Folder")); - d->noCaptionYet = false; - } - mode = Create; - sourceEdit->setText(dir.prettyURL()); - setDestVisible( false ); -} - - -void DefaultProgress::slotDeleting( TDEIO::Job*, const KURL& url ) -{ - if ( d->noCaptionYet ) { - setCaption(i18n("Delete File(s) Progress")); - d->noCaptionYet = false; - } - mode = Delete; - sourceEdit->setText(url.prettyURL()); - setDestVisible( false ); -} - -void DefaultProgress::slotTransferring( TDEIO::Job*, const KURL& url ) -{ - if ( d->noCaptionYet ) { - setCaption(i18n("Loading Progress")); - d->noCaptionYet = false; - } - sourceEdit->setText(url.prettyURL()); - setDestVisible( false ); -} - -void DefaultProgress::slotStating( TDEIO::Job*, const KURL& url ) -{ - setCaption(i18n("Examining File Progress")); - sourceEdit->setText(url.prettyURL()); - setDestVisible( false ); -} - -void DefaultProgress::slotMounting( TDEIO::Job*, const TQString & dev, const TQString & point ) -{ - setCaption(i18n("Mounting %1").arg(dev)); - sourceEdit->setText(point); - setDestVisible( false ); -} - -void DefaultProgress::slotUnmounting( TDEIO::Job*, const TQString & point ) -{ - setCaption(i18n("Unmounting")); - sourceEdit->setText(point); - setDestVisible( false ); -} - -void DefaultProgress::slotCanResume( TDEIO::Job*, TDEIO::filesize_t resume ) -{ - if ( resume ) { - resumeLabel->setText( i18n("Resuming from %1").arg(TDEIO::number(resume)) ); - } else { - resumeLabel->setText( i18n("Not resumable") ); - } -} - -void DefaultProgress::setDestVisible( bool visible ) -{ - // We can't hide the destInvite/destEdit labels, - // because it screws up the TQGridLayout. - if (visible) - { - destInvite->show(); - destEdit->show(); - - destInvite->setText( i18n("Destination:") ); - } - else - { - destInvite->hide(); - destEdit->hide(); - destInvite->setText( TQString::null ); - destEdit->setText( TQString::null ); - } -} - -void DefaultProgress::slotClean() { - if (d->keepOpenChecked) { - mode = Done; - slotPercent(0, 100); - d->cancelClose->setGuiItem( KStdGuiItem::close() ); - d->openFile->setEnabled(true); - slotProcessedSize(0, m_iTotalSize); - d->keepOpen->setEnabled(false); - if (!d->startTime.isNull()) { - int s = d->startTime.elapsed(); - if (!s) - s = 1; - speedLabel->setText(i18n("%1/s (done)").arg(TDEIO::convertSize(1000 * m_iTotalSize / s))); - } - setOnlyClean(false); - } - else - hide(); -} - -void DefaultProgress::slotKeepOpenToggled(bool keepopen) -{ - d->keepOpenChecked=keepopen; -} - -void DefaultProgress::checkDestination(const KURL& dest) { - bool ok = true; - if ( dest.isLocalFile() ) { - TQString path = dest.path( -1 ); - TQStringList tmpDirs = TDEGlobal::dirs()->resourceDirs( "tmp" ); - for ( TQStringList::Iterator it = tmpDirs.begin() ; ok && it != tmpDirs.end() ; ++it ) - if ( path.contains( *it ) ) - ok = false; // it's in the tmp resource - } - - if ( ok ) { - d->openFile->show(); - d->openLocation->show(); - d->keepOpen->show(); - d->location=dest; - } -} - -void DefaultProgress::slotOpenFile() -{ - TDEProcess proc; - proc << "konqueror" << d->location.prettyURL(); - proc.start(TDEProcess::DontCare); -} - -void DefaultProgress::slotOpenLocation() -{ - TDEProcess proc; - d->location.setFileName(""); - proc << "konqueror" << d->location.prettyURL(); - proc.start(TDEProcess::DontCare); -} - -void DefaultProgress::virtual_hook( int id, void* data ) -{ ProgressBase::virtual_hook( id, data ); } - -} /* namespace */ - -#include "defaultprogress.moc" diff --git a/kio/kio/defaultprogress.h b/kio/kio/defaultprogress.h deleted file mode 100644 index 44ffff6c4..000000000 --- a/kio/kio/defaultprogress.h +++ /dev/null @@ -1,164 +0,0 @@ -/* This file is part of the KDE libraries - Copyright (C) 2000 Matej Koss - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License version 2 as published by the Free Software Foundation. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ -#ifndef __defaultprogress_h__ -#define __defaultprogress_h__ - -#include - -#include - -#include - -#include "progressbase.h" - -class KLineEdit; - -namespace TDEIO { - -/* - * A default implementation of the progress dialog ProgressBase. - * ProgressBase - */ -class TDEIO_EXPORT DefaultProgress : public ProgressBase { - - Q_OBJECT - -public: - /** - * Creates a new default progress dialog. - * @param showNow true to show immediately, false to show when - * needed - */ - DefaultProgress( bool showNow = true ); - /** - * Creates a new default progress dialog. - * @param parent the parent of the dialog (or 0 for top-level) - * @param name the name of the dialog, can be 0 - * @since 3.1 - */ - DefaultProgress( TQWidget* parent, const char* name = 0 ); - ~DefaultProgress(); - - bool keepOpen() const; - - /// Shared with uiserver.cpp - static TQString makePercentString( unsigned long percent, - TDEIO::filesize_t totalSize, - unsigned long totalFiles ); - -public slots: - virtual void slotTotalSize( TDEIO::Job *job, TDEIO::filesize_t size ); - virtual void slotTotalFiles( TDEIO::Job *job, unsigned long files ); - virtual void slotTotalDirs( TDEIO::Job *job, unsigned long dirs ); - - virtual void slotProcessedSize( TDEIO::Job *job, TDEIO::filesize_t bytes ); - virtual void slotProcessedFiles( TDEIO::Job *job, unsigned long files ); - virtual void slotProcessedDirs( TDEIO::Job *job, unsigned long dirs ); - - virtual void slotSpeed( TDEIO::Job *job, unsigned long speed ); - virtual void slotPercent( TDEIO::Job *job, unsigned long percent ); - /** - * Called to set an information message. - * @param job the TDEIO::Job - * @param msg the message to set - */ - virtual void slotInfoMessage( TDEIO::Job *job, const TQString & msg ); - - virtual void slotCopying( TDEIO::Job* job, const KURL& src, const KURL& dest ); - virtual void slotMoving( TDEIO::Job* job, const KURL& src, const KURL& dest ); - virtual void slotDeleting( TDEIO::Job* job, const KURL& url ); - /** - * Called when the job is transferring. - * @param job the TDEIO::Job - * @param url the url to transfer - * @since 3.1 - */ - void slotTransferring( TDEIO::Job* job, const KURL& url ); - virtual void slotCreatingDir( TDEIO::Job* job, const KURL& dir ); - /** - * Called when the job is requesting a stat. - * @param job the TDEIO::Job - * @param dir the dir to stat - * @since 3.1 - */ - virtual void slotStating( TDEIO::Job* job, const KURL& dir ); - /** - * Called when the job is mounting. - * @param job the TDEIO::Job - * @param dev the device to mount - * @param point the mount point - */ - virtual void slotMounting( TDEIO::Job* job, const TQString & dev, const TQString & point ); - /** - * Called when the job is unmounting. - * @param job the TDEIO::Job - * @param point the mount point - */ - virtual void slotUnmounting( TDEIO::Job* job, const TQString & point ); - virtual void slotCanResume( TDEIO::Job* job, TDEIO::filesize_t from); - - /** - * Called when the job is cleaned. - * @since 3.1 - */ - void slotClean(); - -protected: - /// @since 3.1 - void init(); - void showTotals(); - void setDestVisible( bool visible ); - /// @since 3.1 - void checkDestination( const KURL& dest); - - KLineEdit* sourceEdit; - KLineEdit* destEdit; - TQLabel* progressLabel; - TQLabel* destInvite; - TQLabel* speedLabel; - TQLabel* sizeLabel; - TQLabel* resumeLabel; - - KProgress* m_pProgressBar; - - TDEIO::filesize_t m_iTotalSize; - unsigned long m_iTotalFiles; - unsigned long m_iTotalDirs; - - TDEIO::filesize_t m_iProcessedSize; - unsigned long m_iProcessedDirs; - unsigned long m_iProcessedFiles; - - enum ModeType { Copy, Move, Delete, Create, Done }; - ModeType mode; - -protected: - virtual void virtual_hook( int id, void* data ); -private: - class DefaultProgressPrivate; - DefaultProgressPrivate* d; -private slots: - void slotKeepOpenToggled(bool); - void slotOpenFile(); - void slotOpenLocation(); -}; - -} /* namespace */ - -#endif // __defaultprogress_h__ - diff --git a/kio/kio/forwardingslavebase.cpp b/kio/kio/forwardingslavebase.cpp deleted file mode 100644 index 53121986d..000000000 --- a/kio/kio/forwardingslavebase.cpp +++ /dev/null @@ -1,475 +0,0 @@ -/* This file is part of the KDE project - Copyright (c) 2004 Kevin Ottens - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include -#include -#include -#include - -#include -#include - -#include "forwardingslavebase.h" - -namespace TDEIO -{ - -class ForwardingSlaveBasePrivate -{ -}; - -ForwardingSlaveBase::ForwardingSlaveBase(const TQCString &protocol, - const TQCString &poolSocket, - const TQCString &appSocket) - : TQObject(), SlaveBase(protocol, poolSocket, appSocket) -{ -} - -ForwardingSlaveBase::~ForwardingSlaveBase() -{ -} - -bool ForwardingSlaveBase::internalRewriteURL(const KURL &url, KURL &newURL) -{ - bool result = true; - - if ( url.protocol().ascii()==mProtocol ) - { - result = rewriteURL(url, newURL); - } - else - { - newURL = url; - } - - m_processedURL = newURL; - m_requestedURL = url; - return result; -} - -void ForwardingSlaveBase::prepareUDSEntry(TDEIO::UDSEntry &entry, - bool listing) const -{ - kdDebug() << "ForwardingSlaveBase::prepareUDSEntry: listing==" - << listing << endl; - - bool url_found = false; - TQString name; - KURL url; - - TDEIO::UDSEntry::iterator it = entry.begin(); - TDEIO::UDSEntry::iterator end = entry.end(); - - for(; it!=end; ++it) - { - KURL new_url = m_requestedURL; - - switch( (*it).m_uds ) - { - case TDEIO::UDS_NAME: - name = (*it).m_str; - kdDebug() << "Name = " << name << endl; - break; - case TDEIO::UDS_URL: - url_found = true; - url = (*it).m_str; - if (listing) - { - new_url.addPath(url.fileName()); - } - (*it).m_str = new_url.url(); - kdDebug() << "URL = " << url << endl; - kdDebug() << "New URL = " << (*it).m_str << endl; - break; - } - } - - if ( m_processedURL.isLocalFile() ) - { - KURL new_url = m_processedURL; - if (listing) - { - new_url.addPath( name ); - } - - TDEIO::UDSAtom atom; - atom.m_uds = TDEIO::UDS_LOCAL_PATH; - atom.m_long = 0; - atom.m_str = new_url.path(); - entry.append(atom); - } -} - -void ForwardingSlaveBase::get(const KURL &url) -{ - kdDebug() << "ForwardingSlaveBase::get: " << url << endl; - - KURL new_url; - if ( internalRewriteURL(url, new_url) ) - { - TDEIO::TransferJob *job = TDEIO::get(new_url, false, false); - connectTransferJob(job); - - tqApp->eventLoop()->enterLoop(); - } -} - -void ForwardingSlaveBase::put(const KURL &url, int permissions, - bool overwrite, bool resume ) -{ - kdDebug() << "ForwardingSlaveBase::put: " << url << endl; - - KURL new_url; - if ( internalRewriteURL(url, new_url) ) - { - TDEIO::TransferJob *job = TDEIO::put(new_url, permissions, overwrite, - resume, false); - connectTransferJob(job); - - tqApp->eventLoop()->enterLoop(); - } -} - -void ForwardingSlaveBase::stat(const KURL &url) -{ - kdDebug() << "ForwardingSlaveBase::stat: " << url << endl; - - KURL new_url; - if ( internalRewriteURL(url, new_url) ) - { - TDEIO::SimpleJob *job = TDEIO::stat(new_url, false); - connectSimpleJob(job); - - tqApp->eventLoop()->enterLoop(); - } -} - -void ForwardingSlaveBase::mimetype(const KURL &url) -{ - kdDebug() << "ForwardingSlaveBase::mimetype: " << url << endl; - - KURL new_url; - if ( internalRewriteURL(url, new_url) ) - { - TDEIO::TransferJob *job = TDEIO::mimetype(new_url, false); - connectTransferJob(job); - - tqApp->eventLoop()->enterLoop(); - } -} - -void ForwardingSlaveBase::listDir(const KURL &url) -{ - kdDebug() << "ForwardingSlaveBase::listDir: " << url << endl; - - KURL new_url; - if ( internalRewriteURL(url, new_url) ) - { - TDEIO::ListJob *job = TDEIO::listDir(new_url, false); - connectListJob(job); - - tqApp->eventLoop()->enterLoop(); - } -} - -void ForwardingSlaveBase::mkdir(const KURL &url, int permissions) -{ - kdDebug() << "ForwardingSlaveBase::mkdir: " << url << endl; - - KURL new_url; - if ( internalRewriteURL(url, new_url) ) - { - TDEIO::SimpleJob *job = TDEIO::mkdir(new_url, permissions); - connectSimpleJob(job); - - tqApp->eventLoop()->enterLoop(); - } -} - -void ForwardingSlaveBase::rename(const KURL &src, const KURL &dest, - bool overwrite) -{ - kdDebug() << "ForwardingSlaveBase::rename: " << src << ", " << dest << endl; - - KURL new_src, new_dest; - if ( internalRewriteURL(src, new_src) && internalRewriteURL(dest, new_dest) ) - { - TDEIO::Job *job = TDEIO::rename(new_src, new_dest, overwrite); - connectJob(job); - - tqApp->eventLoop()->enterLoop(); - } -} - -void ForwardingSlaveBase::symlink(const TQString &target, const KURL &dest, - bool overwrite) -{ - kdDebug() << "ForwardingSlaveBase::symlink: " << target << ", " << dest << endl; - - KURL new_dest; - if ( internalRewriteURL(dest, new_dest) ) - { - TDEIO::SimpleJob *job = TDEIO::symlink(target, new_dest, overwrite, false); - connectSimpleJob(job); - - tqApp->eventLoop()->enterLoop(); - } -} - -void ForwardingSlaveBase::chmod(const KURL &url, int permissions) -{ - kdDebug() << "ForwardingSlaveBase::chmod: " << url << endl; - - KURL new_url; - if ( internalRewriteURL(url, new_url) ) - { - TDEIO::SimpleJob *job = TDEIO::chmod(new_url, permissions); - connectSimpleJob(job); - - tqApp->eventLoop()->enterLoop(); - } -} - -void ForwardingSlaveBase::copy(const KURL &src, const KURL &dest, - int permissions, bool overwrite) -{ - kdDebug() << "ForwardingSlaveBase::copy: " << src << ", " << dest << endl; - - KURL new_src, new_dest; - if ( internalRewriteURL(src, new_src) && internalRewriteURL(dest, new_dest) ) - { - TDEIO::Job *job = TDEIO::file_copy(new_src, new_dest, permissions, - overwrite, false); - connectJob(job); - - tqApp->eventLoop()->enterLoop(); - } -} - -void ForwardingSlaveBase::del(const KURL &url, bool isfile) -{ - kdDebug() << "ForwardingSlaveBase::del: " << url << endl; - - KURL new_url; - if ( internalRewriteURL(url, new_url) ) - { - if (isfile) - { - TDEIO::DeleteJob *job = TDEIO::del(new_url, false, false); - connectJob(job); - } - else - { - TDEIO::SimpleJob *job = TDEIO::rmdir(new_url); - connectSimpleJob(job); - } - - tqApp->eventLoop()->enterLoop(); - } -} - -void ForwardingSlaveBase::localURL(const KURL& remoteURL) -{ - kdDebug() << "ForwardingSlaveBase::localURL: " << remoteURL << endl; - - KURL new_url; - if ( internalRewriteURL(remoteURL, new_url) ) - { - TDEIO::LocalURLJob *job = TDEIO::localURL(new_url); - connectLocalURLJob(job); - - tqApp->eventLoop()->enterLoop(); - } - else - { - // Let the slave base emit the required signals - SlaveBase::localURL(remoteURL); - } -} - -////////////////////////////////////////////////////////////////////////////// - -void ForwardingSlaveBase::connectJob(TDEIO::Job *job) -{ - // We will forward the warning message, no need to let the job - // display it itself - job->setInteractive(false); - - // Forward metadata (e.g. modification time for put()) - job->setMetaData( allMetaData() ); -#if 0 // debug code - kdDebug() << k_funcinfo << "transferring metadata:" << endl; - const MetaData md = allMetaData(); - for ( MetaData::const_iterator it = md.begin(); it != md.end(); ++it ) - kdDebug() << it.key() << " = " << it.data() << endl; -#endif - - connect( job, TQT_SIGNAL( result(TDEIO::Job *) ), - this, TQT_SLOT( slotResult(TDEIO::Job *) ) ); - connect( job, TQT_SIGNAL( warning(TDEIO::Job *, const TQString &) ), - this, TQT_SLOT( slotWarning(TDEIO::Job *, const TQString &) ) ); - connect( job, TQT_SIGNAL( infoMessage(TDEIO::Job *, const TQString &) ), - this, TQT_SLOT( slotInfoMessage(TDEIO::Job *, const TQString &) ) ); - connect( job, TQT_SIGNAL( totalSize(TDEIO::Job *, TDEIO::filesize_t) ), - this, TQT_SLOT( slotTotalSize(TDEIO::Job *, TDEIO::filesize_t) ) ); - connect( job, TQT_SIGNAL( processedSize(TDEIO::Job *, TDEIO::filesize_t) ), - this, TQT_SLOT( slotProcessedSize(TDEIO::Job *, TDEIO::filesize_t) ) ); - connect( job, TQT_SIGNAL( speed(TDEIO::Job *, unsigned long) ), - this, TQT_SLOT( slotSpeed(TDEIO::Job *, unsigned long) ) ); -} - -void ForwardingSlaveBase::connectSimpleJob(TDEIO::SimpleJob *job) -{ - connectJob(job); - connect( job, TQT_SIGNAL( redirection(TDEIO::Job *, const KURL &) ), - this, TQT_SLOT( slotRedirection(TDEIO::Job *, const KURL &) ) ); -} - -void ForwardingSlaveBase::connectListJob(TDEIO::ListJob *job) -{ - connectSimpleJob(job); - connect( job, TQT_SIGNAL( entries(TDEIO::Job *, const TDEIO::UDSEntryList &) ), - this, TQT_SLOT( slotEntries(TDEIO::Job *, const TDEIO::UDSEntryList &) ) ); -} - -void ForwardingSlaveBase::connectTransferJob(TDEIO::TransferJob *job) -{ - connectSimpleJob(job); - connect( job, TQT_SIGNAL( data(TDEIO::Job *, const TQByteArray &) ), - this, TQT_SLOT( slotData(TDEIO::Job *, const TQByteArray &) ) ); - connect( job, TQT_SIGNAL( dataReq(TDEIO::Job *, TQByteArray &) ), - this, TQT_SLOT( slotDataReq(TDEIO::Job *, TQByteArray &) ) ); - connect( job, TQT_SIGNAL( mimetype(TDEIO::Job *, const TQString &) ), - this, TQT_SLOT( slotMimetype(TDEIO::Job *, const TQString &) ) ); - connect( job, TQT_SIGNAL( canResume(TDEIO::Job *, TDEIO::filesize_t) ), - this, TQT_SLOT( slotCanResume(TDEIO::Job *, TDEIO::filesize_t) ) ); -} - -void ForwardingSlaveBase::connectLocalURLJob(TDEIO::LocalURLJob *job) -{ - connectJob(job); - connect( job, TQT_SIGNAL( localURL(TDEIO::Job *, const KURL&, bool) ), - this, TQT_SLOT( slotLocalURL(TDEIO::Job *, const KURL&, bool) ) ); -} - -////////////////////////////////////////////////////////////////////////////// - -void ForwardingSlaveBase::slotResult(TDEIO::Job *job) -{ - if ( job->error() != 0) - { - error( job->error(), job->errorText() ); - } - else - { - TDEIO::StatJob *stat_job = dynamic_cast(job); - if ( stat_job!=0L ) - { - TDEIO::UDSEntry entry = stat_job->statResult(); - prepareUDSEntry(entry); - statEntry( entry ); - } - finished(); - } - - tqApp->eventLoop()->exitLoop(); -} - -void ForwardingSlaveBase::slotWarning(TDEIO::Job* /*job*/, const TQString &msg) -{ - warning(msg); -} - -void ForwardingSlaveBase::slotInfoMessage(TDEIO::Job* /*job*/, const TQString &msg) -{ - infoMessage(msg); -} - -void ForwardingSlaveBase::slotTotalSize(TDEIO::Job* /*job*/, TDEIO::filesize_t size) -{ - totalSize(size); -} - -void ForwardingSlaveBase::slotProcessedSize(TDEIO::Job* /*job*/, TDEIO::filesize_t size) -{ - processedSize(size); -} - -void ForwardingSlaveBase::slotSpeed(TDEIO::Job* /*job*/, unsigned long bytesPerSecond) -{ - speed(bytesPerSecond); -} - -void ForwardingSlaveBase::slotRedirection(TDEIO::Job *job, const KURL &url) -{ - redirection(url); - - // We've been redirected stop everything. - job->kill( true ); - finished(); - - tqApp->eventLoop()->exitLoop(); -} - -void ForwardingSlaveBase::slotEntries(TDEIO::Job* /*job*/, - const TDEIO::UDSEntryList &entries) -{ - TDEIO::UDSEntryList final_entries = entries; - - TDEIO::UDSEntryList::iterator it = final_entries.begin(); - TDEIO::UDSEntryList::iterator end = final_entries.end(); - - for(; it!=end; ++it) - { - prepareUDSEntry(*it, true); - } - - listEntries( final_entries ); -} - -void ForwardingSlaveBase::slotData(TDEIO::Job* /*job*/, const TQByteArray &d) -{ - data(d); -} - -void ForwardingSlaveBase::slotDataReq(TDEIO::Job* /*job*/, TQByteArray &data) -{ - dataReq(); - readData(data); -} - -void ForwardingSlaveBase::slotMimetype (TDEIO::Job* /*job*/, const TQString &type) -{ - mimeType(type); -} - -void ForwardingSlaveBase::slotCanResume (TDEIO::Job* /*job*/, TDEIO::filesize_t offset) -{ - canResume(offset); -} - -void ForwardingSlaveBase::slotLocalURL(TDEIO::Job *, const KURL& url, bool) -{ - SlaveBase::localURL(url); -} - -} - -#include "forwardingslavebase.moc" - diff --git a/kio/kio/forwardingslavebase.h b/kio/kio/forwardingslavebase.h deleted file mode 100644 index f765e38a6..000000000 --- a/kio/kio/forwardingslavebase.h +++ /dev/null @@ -1,204 +0,0 @@ -/* This file is part of the KDE project - Copyright (c) 2004 Kevin Ottens - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef _FORWARDING_SLAVE_BASE_H_ -#define _FORWARDING_SLAVE_BASE_H_ - -#include -#include - -#include - -namespace TDEIO -{ - -class ForwardingSlaveBasePrivate; - -/** - * This class should be used as a base for ioslaves acting as a - * forwarder to other ioslaves. It has been designed to support only - * local filesystem like ioslaves. - * - * If the resulting ioslave should be a simple proxy, you only need - * to implement the ForwardingSlaveBase::rewriteURL() method. - * - * For more advanced behavior, the classic ioslave methods should - * be reimplemented, because their default behavior in this class - * is to forward using the ForwardingSlaveBase::rewriteURL() method. - * - * A possible code snippet for an advanced stat() behavior would look - * like this in the child class: - * - * \code - * void ChildProtocol::stat(const KURL &url) - * { - * bool is_special = false; - * - * // Process the URL to see if it should have - * // a special treatment - * - * if ( is_special ) - * { - * // Handle the URL ourselves - * TDEIO::UDSEntry entry; - * // Fill entry with UDSAtom instances - * statEntry(entry); - * finished(); - * } - * else - * { - * // Setup the ioslave internal state if - * // required by ChildProtocol::rewriteURL() - * ForwardingSlaveBase::stat(url); - * } - * } - * \endcode - * - * Of course in this case, you surely need to reimplement listDir() - * and get() accordingly. - * - * If you want view on directories to be correctly refreshed when - * something changes on a forwarded URL, you'll need a companion kded - * module to emit the KDirNotify Files*() DCOP signals. - * - * This class was initially used for media:/ ioslave. This ioslave code - * and the MediaDirNotify class of its companion kded module can be a - * good source of inspiration. - * - * @see ForwardingSlaveBase::rewriteURL() - * @since 3.4 - * @author Kevin Ottens - */ -class TDEIO_EXPORT ForwardingSlaveBase : public TQObject, public SlaveBase -{ -Q_OBJECT -public: - ForwardingSlaveBase(const TQCString &protocol, - const TQCString &poolSocket, - const TQCString &appSocket); - virtual ~ForwardingSlaveBase(); - - virtual void get(const KURL &url); - - virtual void put(const KURL &url, int permissions, - bool overwrite, bool resume); - - virtual void stat(const KURL &url); - - virtual void mimetype(const KURL &url); - - virtual void listDir(const KURL &url); - - virtual void mkdir(const KURL &url, int permissions); - - virtual void rename(const KURL &src, const KURL &dest, bool overwrite); - - virtual void symlink(const TQString &target, const KURL &dest, - bool overwrite); - - virtual void chmod(const KURL &url, int permissions); - - virtual void copy(const KURL &src, const KURL &dest, - int permissions, bool overwrite); - - virtual void del(const KURL &url, bool isfile); - - virtual void localURL(const KURL& remoteURL); - -protected: - /** - * Rewrite an url to it's forwarded counterpart. It should return - * true if everything was ok, and false otherwise. - * - * If a problem is detected it's up to this method to trigger error() - * before returning. Returning false silently cancel the current - * slave operation. - * - * @param url The URL as given during the slave call - * @param newURL The new URL to forward the slave call to - * @return true if the given url could be correctly rewritten - */ - virtual bool rewriteURL(const KURL &url, KURL &newURL)=0; - - /** - * Allow to modify a UDSEntry before it's sent to the ioslave enpoint. - * This is the default implementation working in most case, but sometimes - * you could make use of more forwarding black magic (for example - * dynamically transform any desktop file into a fake directory...) - * - * @param entry the UDSEntry to post-process - * @param listing indicate if this entry it created during a listDir - * operation - */ - virtual void prepareUDSEntry(TDEIO::UDSEntry &entry, - bool listing=false) const; - - /** - * Return the URL being processed by the ioslave - * Only access it inside prepareUDSEntry() - */ - KURL processedURL() const { return m_processedURL; } - - /** - * Return the URL asked to the ioslave - * Only access it inside prepareUDSEntry() - */ - KURL requestedURL() const { return m_requestedURL; } - -private: - KURL m_processedURL; - KURL m_requestedURL; - ForwardingSlaveBasePrivate *d; - - bool internalRewriteURL(const KURL &url, KURL &newURL); - - void connectJob(Job *job); - void connectSimpleJob(SimpleJob *job); - void connectListJob(ListJob *job); - void connectTransferJob(TransferJob *job); - void connectLocalURLJob(LocalURLJob *job); - -private slots: - // TDEIO::Job - void slotResult(TDEIO::Job *job); - void slotWarning(TDEIO::Job *job, const TQString &msg); - void slotInfoMessage(TDEIO::Job *job, const TQString &msg); - void slotTotalSize(TDEIO::Job *job, TDEIO::filesize_t size); - void slotProcessedSize(TDEIO::Job *job, TDEIO::filesize_t size); - void slotSpeed(TDEIO::Job *job, unsigned long bytesPerSecond); - - // TDEIO::SimpleJob subclasses - void slotRedirection(TDEIO::Job *job, const KURL &url); - - // TDEIO::ListJob - void slotEntries(TDEIO::Job *job, const TDEIO::UDSEntryList &entries); - - // TDEIO::TransferJob - void slotData(TDEIO::Job *job, const TQByteArray &data); - void slotDataReq(TDEIO::Job *job, TQByteArray &data); - void slotMimetype (TDEIO::Job *job, const TQString &type); - void slotCanResume (TDEIO::Job *job, TDEIO::filesize_t offset); - - // TDEIO::LocalURLJob - void slotLocalURL(TDEIO::Job *, const KURL&, bool); -}; - -} - -#endif diff --git a/kio/kio/global.cpp b/kio/kio/global.cpp deleted file mode 100644 index 3a7cadb8f..000000000 --- a/kio/kio/global.cpp +++ /dev/null @@ -1,2009 +0,0 @@ -/* This file is part of the KDE libraries - Copyright (C) 2000 David Faure - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License version 2 as published by the Free Software Foundation. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include - -#include -#include -#include - -#include -#include -#include -#include -#include -#include - -#include "kio/global.h" -#include "kio/job.h" - -#include -#include -#include -#include -#include - -#ifdef HAVE_VOLMGT -#include -#endif - -TDEIO_EXPORT TQString TDEIO::convertSizeWithBytes( TDEIO::filesize_t size ) -{ - if ( size >= 1024 ) - return convertSize( size ) + " (" + i18n( "%1 B" ).arg( TDEGlobal::locale()->formatNumber(size, 0) ) + ")"; - else - return convertSize( size ); -} - -TDEIO_EXPORT TQString TDEIO::convertSize( TDEIO::filesize_t size ) -{ - double fsize = size; - TQString s; - // Giga-byte - if ( size >= 1073741824 ) - { - fsize /= 1073741824.0; - if ( fsize > 1024 ) // Tera-byte - s = i18n( "%1 TB" ).arg( TDEGlobal::locale()->formatNumber(fsize / 1024.0, 1)); - else - s = i18n( "%1 GB" ).arg( TDEGlobal::locale()->formatNumber(fsize, 1)); - } - // Mega-byte - else if ( size >= 1048576 ) - { - fsize /= 1048576.0; - s = i18n( "%1 MB" ).arg( TDEGlobal::locale()->formatNumber(fsize, 1)); - } - // Kilo-byte - else if ( size >= 1024 ) - { - fsize /= 1024.0; - s = i18n( "%1 KB" ).arg( TDEGlobal::locale()->formatNumber(fsize, 1)); - } - // Just byte - else if ( size > 0 ) - { - s = i18n( "%1 B" ).arg( TDEGlobal::locale()->formatNumber(fsize, 0)); - } - // Nothing - else - { - s = i18n( "0 B" ); - } - return s; -} - -TDEIO_EXPORT TQString TDEIO::convertSizeFromKB( TDEIO::filesize_t kbSize ) -{ - return convertSize(kbSize * 1024); -} - -TDEIO_EXPORT TQString TDEIO::number( TDEIO::filesize_t size ) -{ - char charbuf[256]; - sprintf(charbuf, "%lld", size); - return TQString::fromLatin1(charbuf); -} - -TDEIO_EXPORT unsigned int TDEIO::calculateRemainingSeconds( TDEIO::filesize_t totalSize, - TDEIO::filesize_t processedSize, TDEIO::filesize_t speed ) -{ - if ( (speed != 0) && (totalSize != 0) ) - return ( totalSize - processedSize ) / speed; - else - return 0; -} - -TDEIO_EXPORT TQString TDEIO::convertSeconds( unsigned int seconds ) -{ - unsigned int days = seconds / 86400; - unsigned int hours = (seconds - (days * 86400)) / 3600; - unsigned int mins = (seconds - (days * 86400) - (hours * 3600)) / 60; - seconds = (seconds - (days * 86400) - (hours * 3600) - (mins * 60)); - - const TQTime time(hours, mins, seconds); - const TQString timeStr( TDEGlobal::locale()->formatTime(time, true /*with seconds*/, true /*duration*/) ); - if ( days > 0 ) - return i18n("1 day %1", "%n days %1", days).arg(timeStr); - else - return timeStr; -} - -TDEIO_EXPORT TQTime TDEIO::calculateRemaining( TDEIO::filesize_t totalSize, TDEIO::filesize_t processedSize, TDEIO::filesize_t speed ) -{ - TQTime remainingTime; - - if ( speed != 0 ) { - TDEIO::filesize_t secs; - if ( totalSize == 0 ) { - secs = 0; - } else { - secs = ( totalSize - processedSize ) / speed; - } - if (secs >= (24*60*60)) // Limit to 23:59:59 - secs = (24*60*60)-1; - int hr = secs / ( 60 * 60 ); - int mn = ( secs - hr * 60 * 60 ) / 60; - int sc = ( secs - hr * 60 * 60 - mn * 60 ); - - remainingTime.setHMS( hr, mn, sc ); - } - - return remainingTime; -} - -TDEIO_EXPORT TQString TDEIO::itemsSummaryString(uint items, uint files, uint dirs, TDEIO::filesize_t size, bool showSize) -{ - TQString text = items == 0 ? i18n( "No Items" ) : i18n( "One Item", "%n Items", items ); - text += " - "; - text += files == 0 ? i18n( "No Files" ) : i18n( "One File", "%n Files", files ); - if ( showSize && files > 0 ) - { - text += " "; - text += i18n("(%1 Total)").arg(TDEIO::convertSize( size ) ); - } - text += " - "; - text += dirs == 0 ? i18n( "No Folders" ) : i18n("One Folder", "%n Folders", dirs); - return text; -} - -TDEIO_EXPORT TQString TDEIO::encodeFileName( const TQString & _str ) -{ - TQString str( _str ); - - int i = 0; - while ( ( i = str.find( "%", i ) ) != -1 ) - { - str.replace( i, 1, "%%"); - i += 2; - } - while ( ( i = str.find( "/" ) ) != -1 ) - str.replace( i, 1, "%2f"); - return str; -} - -TDEIO_EXPORT TQString TDEIO::decodeFileName( const TQString & _str ) -{ - TQString str; - - unsigned int i = 0; - for ( ; i < _str.length() ; ++i ) - { - if ( _str[i]=='%' ) - { - if ( _str[i+1]=='%' ) // %% -> % - { - str.append('%'); - ++i; - } - else if ( _str[i+1]=='2' && (i+2<_str.length()) && _str[i+2].lower()=='f' ) // %2f -> / - { - str.append('/'); - i += 2; - } - else - str.append('%'); - } else - str.append(_str[i]); - } - - return str; -} - -TDEIO_EXPORT TQString TDEIO::Job::errorString() const -{ - return TDEIO::buildErrorString(m_error, m_errorText); -} - -TDEIO_EXPORT TQString TDEIO::buildErrorString(int errorCode, const TQString &errorText) -{ - TQString result; - - switch( errorCode ) - { - case TDEIO::ERR_CANNOT_OPEN_FOR_READING: - result = i18n( "Could not read %1." ).arg( errorText ); - break; - case TDEIO::ERR_CANNOT_OPEN_FOR_WRITING: - result = i18n( "Could not write to %1." ).arg( errorText ); - break; - case TDEIO::ERR_CANNOT_LAUNCH_PROCESS: - result = i18n( "Could not start process %1." ).arg( errorText ); - break; - case TDEIO::ERR_INTERNAL: - result = i18n( "Internal Error\nPlease send a full bug report at http://bugs.kde.org\n%1" ).arg( errorText ); - break; - case TDEIO::ERR_MALFORMED_URL: - result = i18n( "Malformed URL %1." ).arg( errorText ); - break; - case TDEIO::ERR_UNSUPPORTED_PROTOCOL: - result = i18n( "The protocol %1 is not supported." ).arg( errorText ); - break; - case TDEIO::ERR_NO_SOURCE_PROTOCOL: - result = i18n( "The protocol %1 is only a filter protocol.").arg( errorText ); - break; - case TDEIO::ERR_UNSUPPORTED_ACTION: - result = errorText; -// result = i18n( "Unsupported action %1" ).arg( errorText ); - break; - case TDEIO::ERR_IS_DIRECTORY: - result = i18n( "%1 is a folder, but a file was expected." ).arg( errorText ); - break; - case TDEIO::ERR_IS_FILE: - result = i18n( "%1 is a file, but a folder was expected." ).arg( errorText ); - break; - case TDEIO::ERR_DOES_NOT_EXIST: - result = i18n( "The file or folder %1 does not exist." ).arg( errorText ); - break; - case TDEIO::ERR_FILE_ALREADY_EXIST: - result = i18n( "A file named %1 already exists." ).arg( errorText ); - break; - case TDEIO::ERR_DIR_ALREADY_EXIST: - result = i18n( "A folder named %1 already exists." ).arg( errorText ); - break; - case TDEIO::ERR_UNKNOWN_HOST: - result = errorText.isEmpty() ? i18n( "No hostname specified." ) : i18n( "Unknown host %1" ).arg( errorText ); - break; - case TDEIO::ERR_ACCESS_DENIED: - result = i18n( "Access denied to %1." ).arg( errorText ); - break; - case TDEIO::ERR_WRITE_ACCESS_DENIED: - result = i18n( "Access denied.\nCould not write to %1." ).arg( errorText ); - break; - case TDEIO::ERR_CANNOT_ENTER_DIRECTORY: - result = i18n( "Could not enter folder %1." ).arg( errorText ); - break; - case TDEIO::ERR_PROTOCOL_IS_NOT_A_FILESYSTEM: - result = i18n( "The protocol %1 does not implement a folder service." ).arg( errorText ); - break; - case TDEIO::ERR_CYCLIC_LINK: - result = i18n( "Found a cyclic link in %1." ).arg( errorText ); - break; - case TDEIO::ERR_USER_CANCELED: - // Do nothing in this case. The user doesn't need to be told what he just did. - break; - case TDEIO::ERR_CYCLIC_COPY: - result = i18n( "Found a cyclic link while copying %1." ).arg( errorText ); - break; - case TDEIO::ERR_COULD_NOT_CREATE_SOCKET: - result = i18n( "Could not create socket for accessing %1." ).arg( errorText ); - break; - case TDEIO::ERR_COULD_NOT_CONNECT: - result = i18n( "Could not connect to host %1." ).arg( errorText.isEmpty() ? TQString::fromLatin1("localhost") : errorText ); - break; - case TDEIO::ERR_CONNECTION_BROKEN: - result = i18n( "Connection to host %1 is broken." ).arg( errorText ); - break; - case TDEIO::ERR_NOT_FILTER_PROTOCOL: - result = i18n( "The protocol %1 is not a filter protocol." ).arg( errorText ); - break; - case TDEIO::ERR_COULD_NOT_MOUNT: - result = i18n( "Could not mount device.\nThe reported error was:\n%1" ).arg( errorText ); - break; - case TDEIO::ERR_COULD_NOT_UNMOUNT: - result = i18n( "Could not unmount device.\nThe reported error was:\n%1" ).arg( errorText ); - break; - case TDEIO::ERR_COULD_NOT_READ: - result = i18n( "Could not read file %1." ).arg( errorText ); - break; - case TDEIO::ERR_COULD_NOT_WRITE: - result = i18n( "Could not write to file %1." ).arg( errorText ); - break; - case TDEIO::ERR_COULD_NOT_BIND: - result = i18n( "Could not bind %1." ).arg( errorText ); - break; - case TDEIO::ERR_COULD_NOT_LISTEN: - result = i18n( "Could not listen %1." ).arg( errorText ); - break; - case TDEIO::ERR_COULD_NOT_ACCEPT: - result = i18n( "Could not accept %1." ).arg( errorText ); - break; - case TDEIO::ERR_COULD_NOT_LOGIN: - result = errorText; - break; - case TDEIO::ERR_COULD_NOT_STAT: - result = i18n( "Could not access %1." ).arg( errorText ); - break; - case TDEIO::ERR_COULD_NOT_CLOSEDIR: - result = i18n( "Could not terminate listing %1." ).arg( errorText ); - break; - case TDEIO::ERR_COULD_NOT_MKDIR: - result = i18n( "Could not make folder %1." ).arg( errorText ); - break; - case TDEIO::ERR_COULD_NOT_RMDIR: - result = i18n( "Could not remove folder %1." ).arg( errorText ); - break; - case TDEIO::ERR_CANNOT_RESUME: - result = i18n( "Could not resume file %1." ).arg( errorText ); - break; - case TDEIO::ERR_CANNOT_RENAME: - result = i18n( "Could not rename file %1." ).arg( errorText ); - break; - case TDEIO::ERR_CANNOT_CHMOD: - result = i18n( "Could not change permissions for %1." ).arg( errorText ); - break; - case TDEIO::ERR_CANNOT_DELETE: - result = i18n( "Could not delete file %1." ).arg( errorText ); - break; - case TDEIO::ERR_SLAVE_DIED: - result = i18n( "The process for the %1 protocol died unexpectedly." ).arg( errorText ); - break; - case TDEIO::ERR_OUT_OF_MEMORY: - result = i18n( "Error. Out of memory.\n%1" ).arg( errorText ); - break; - case TDEIO::ERR_UNKNOWN_PROXY_HOST: - result = i18n( "Unknown proxy host\n%1" ).arg( errorText ); - break; - case TDEIO::ERR_COULD_NOT_AUTHENTICATE: - result = i18n( "Authorization failed, %1 authentication not supported" ).arg( errorText ); - break; - case TDEIO::ERR_ABORTED: - result = i18n( "User canceled action\n%1" ).arg( errorText ); - break; - case TDEIO::ERR_INTERNAL_SERVER: - result = i18n( "Internal error in server\n%1" ).arg( errorText ); - break; - case TDEIO::ERR_SERVER_TIMEOUT: - result = i18n( "Timeout on server\n%1" ).arg( errorText ); - break; - case TDEIO::ERR_UNKNOWN: - result = i18n( "Unknown error\n%1" ).arg( errorText ); - break; - case TDEIO::ERR_UNKNOWN_INTERRUPT: - result = i18n( "Unknown interrupt\n%1" ).arg( errorText ); - break; -/* - case TDEIO::ERR_CHECKSUM_MISMATCH: - if (errorText) - result = i18n( "Warning: MD5 Checksum for %1 does not match checksum returned from server" ).arg(errorText); - else - result = i18n( "Warning: MD5 Checksum for %1 does not match checksum returned from server" ).arg("document"); - break; -*/ - case TDEIO::ERR_CANNOT_DELETE_ORIGINAL: - result = i18n( "Could not delete original file %1.\nPlease check permissions." ).arg( errorText ); - break; - case TDEIO::ERR_CANNOT_DELETE_PARTIAL: - result = i18n( "Could not delete partial file %1.\nPlease check permissions." ).arg( errorText ); - break; - case TDEIO::ERR_CANNOT_RENAME_ORIGINAL: - result = i18n( "Could not rename original file %1.\nPlease check permissions." ).arg( errorText ); - break; - case TDEIO::ERR_CANNOT_RENAME_PARTIAL: - result = i18n( "Could not rename partial file %1.\nPlease check permissions." ).arg( errorText ); - break; - case TDEIO::ERR_CANNOT_SYMLINK: - result = i18n( "Could not create symlink %1.\nPlease check permissions." ).arg( errorText ); - break; - case TDEIO::ERR_NO_CONTENT: - result = errorText; - break; - case TDEIO::ERR_DISK_FULL: - result = i18n( "Could not write file %1.\nDisk full." ).arg( errorText ); - break; - case TDEIO::ERR_IDENTICAL_FILES: - result = i18n( "The source and destination are the same file.\n%1" ).arg( errorText ); - break; - case TDEIO::ERR_SLAVE_DEFINED: - result = errorText; - break; - case TDEIO::ERR_UPGRADE_REQUIRED: - result = i18n( "%1 is required by the server, but is not available." ).arg(errorText); - break; - case TDEIO::ERR_POST_DENIED: - result = i18n( "Access to restricted port in POST denied."); - break; - case TDEIO::ERR_OFFLINE_MODE: - result = i18n( "Could not access %1.\nOffline mode active.").arg( errorText ); - break; - default: - result = i18n( "Unknown error code %1\n%2\nPlease send a full bug report at http://bugs.kde.org." ).arg( errorCode ).arg( errorText ); - break; - } - - return result; -} - -TDEIO_EXPORT TQString TDEIO::unsupportedActionErrorString(const TQString &protocol, int cmd) { - switch (cmd) { - case CMD_CONNECT: - return i18n("Opening connections is not supported with the protocol %1." ).arg(protocol); - case CMD_DISCONNECT: - return i18n("Closing connections is not supported with the protocol %1." ).arg(protocol); - case CMD_STAT: - return i18n("Accessing files is not supported with the protocol %1.").arg(protocol); - case CMD_PUT: - return i18n("Writing to %1 is not supported.").arg(protocol); - case CMD_SPECIAL: - return i18n("There are no special actions available for protocol %1.").arg(protocol); - case CMD_LISTDIR: - return i18n("Listing folders is not supported for protocol %1.").arg(protocol); - case CMD_GET: - return i18n("Retrieving data from %1 is not supported.").arg(protocol); - case CMD_MIMETYPE: - return i18n("Retrieving mime type information from %1 is not supported.").arg(protocol); - case CMD_RENAME: - return i18n("Renaming or moving files within %1 is not supported.").arg(protocol); - case CMD_SYMLINK: - return i18n("Creating symlinks is not supported with protocol %1.").arg(protocol); - case CMD_COPY: - return i18n("Copying files within %1 is not supported.").arg(protocol); - case CMD_DEL: - return i18n("Deleting files from %1 is not supported.").arg(protocol); - case CMD_MKDIR: - return i18n("Creating folders is not supported with protocol %1.").arg(protocol); - case CMD_CHMOD: - return i18n("Changing the attributes of files is not supported with protocol %1.").arg(protocol); - case CMD_SUBURL: - return i18n("Using sub-URLs with %1 is not supported.").arg(protocol); - case CMD_MULTI_GET: - return i18n("Multiple get is not supported with protocol %1.").arg(protocol); - default: - return i18n("Protocol %1 does not support action %2.").arg(protocol).arg(cmd); - }/*end switch*/ -} - -TDEIO_EXPORT TQStringList TDEIO::Job::detailedErrorStrings( const KURL *reqUrl /*= 0L*/, - int method /*= -1*/ ) const -{ - TQString errorName, techName, description, ret2; - TQStringList causes, solutions, ret; - - TQByteArray raw = rawErrorDetail( m_error, m_errorText, reqUrl, method ); - TQDataStream stream(raw, IO_ReadOnly); - - stream >> errorName >> techName >> description >> causes >> solutions; - - TQString url, protocol, datetime; - if ( reqUrl ) { - url = reqUrl->htmlURL(); - protocol = reqUrl->protocol(); - } else { - url = i18n( "(unknown)" ); - } - - datetime = TDEGlobal::locale()->formatDateTime( TQDateTime::currentDateTime(), - false ); - - ret << errorName; - ret << TQString::fromLatin1( "

" ) + errorName + - TQString::fromLatin1( "

" ) + description + - TQString::fromLatin1( "

" ); - ret2 = TQString::fromLatin1( "

" ); - if ( !techName.isEmpty() ) - ret2 += i18n( "Technical reason: " ) + techName + TQString::fromLatin1( "

" ); - ret2 += i18n( "

Details of the request:" ); - ret2 += i18n( "

  • URL: %1
  • " ).arg( url ); - if ( !protocol.isEmpty() ) { - ret2 += i18n( "
  • Protocol: %1
  • " ).arg( protocol ); - } - ret2 += i18n( "
  • Date and time: %1
  • " ).arg( datetime ); - ret2 += i18n( "
  • Additional information: %1
" ).arg( m_errorText ); - if ( !causes.isEmpty() ) { - ret2 += i18n( "

Possible causes:

  • " ); - ret2 += causes.join( "
  • " ); - ret2 += TQString::fromLatin1( "
" ); - } - if ( !solutions.isEmpty() ) { - ret2 += i18n( "

Possible solutions:

  • " ); - ret2 += solutions.join( "
  • " ); - ret2 += TQString::fromLatin1( "
" ); - } - ret << ret2; - return ret; -} - -TDEIO_EXPORT TQByteArray TDEIO::rawErrorDetail(int errorCode, const TQString &errorText, - const KURL *reqUrl /*= 0L*/, int /*method = -1*/ ) -{ - TQString url, host, protocol, datetime, domain, path, dir, filename; - bool isSlaveNetwork = false; - if ( reqUrl ) { - url = reqUrl->prettyURL(); - host = reqUrl->host(); - protocol = reqUrl->protocol(); - - if ( host.left(4) == "www." ) - domain = host.mid(4); - else - domain = host; - - path = reqUrl->path(1); - filename = reqUrl->fileName(); - dir = path + filename; - - // detect if protocol is a network protocol... - // add your hacks here... - if ( protocol == "http" || - protocol == "https" || - protocol == "ftp" || - protocol == "sftp" || - protocol == "webdav" || - protocol == "webdavs" || - protocol == "finger" || - protocol == "fish" || - protocol == "gopher" || - protocol == "imap" || - protocol == "imaps" || - protocol == "lan" || - protocol == "ldap" || - protocol == "mailto" || - protocol == "news" || - protocol == "nntp" || - protocol == "pop3" || - protocol == "pop3s" || - protocol == "smtp" || - protocol == "smtps" || - protocol == "telnet" - ) { - isSlaveNetwork = false; - } - } else { - // assume that the errorText has the location we are interested in - url = host = domain = path = filename = dir = errorText; - protocol = i18n( "(unknown)" ); - } - - datetime = TDEGlobal::locale()->formatDateTime( TQDateTime::currentDateTime(), - false ); - - TQString errorName, techName, description; - TQStringList causes, solutions; - - // c == cause, s == solution - TQString sSysadmin = i18n( "Contact your appropriate computer support system, " - "whether the system administrator, or technical support group for further " - "assistance." ); - TQString sServeradmin = i18n( "Contact the administrator of the server " - "for further assistance." ); - // FIXME active link to permissions dialog - TQString sAccess = i18n( "Check your access permissions on this resource." ); - TQString cAccess = i18n( "Your access permissions may be inadequate to " - "perform the requested operation on this resource." ); - TQString cLocked = i18n( "The file may be in use (and thus locked) by " - "another user or application." ); - TQString sQuerylock = i18n( "Check to make sure that no other " - "application or user is using the file or has locked the file." ); - TQString cHardware = i18n( "Although unlikely, a hardware error may have " - "occurred." ); - TQString cBug = i18n( "You may have encountered a bug in the program." ); - TQString cBuglikely = i18n( "This is most likely to be caused by a bug in the " - "program. Please consider submitting a full bug report as detailed below." ); - TQString sUpdate = i18n( "Update your software to the latest version. " - "Your distribution should provide tools to update your software." ); - TQString sBugreport = i18n( "When all else fails, please consider helping the " - "TDE team or the third party maintainer of this software by submitting a " - "high quality bug report. If the software is provided by a third party, " - "please contact them directly. Otherwise, first look to see if " - "the same bug has been submitted by someone else by searching at the " - "TDE bug reporting website. If not, take " - "note of the details given above, and include them in your bug report, along " - "with as many other details as you think might help." ); - TQString cNetwork = i18n( "There may have been a problem with your network " - "connection." ); - // FIXME netconf kcontrol link - TQString cNetconf = i18n( "There may have been a problem with your network " - "configuration. If you have been accessing the Internet with no problems " - "recently, this is unlikely." ); - TQString cNetpath = i18n( "There may have been a problem at some point along " - "the network path between the server and this computer." ); - TQString sTryagain = i18n( "Try again, either now or at a later time." ); - TQString cProtocol = i18n( "A protocol error or incompatibility may have occurred." ); - TQString sExists = i18n( "Ensure that the resource exists, and try again." ); - TQString cExists = i18n( "The specified resource may not exist." ); - TQString cTypo = i18n( "You may have incorrectly typed the location." ); - TQString sTypo = i18n( "Double-check that you have entered the correct location " - "and try again." ); - TQString sNetwork = i18n( "Check your network connection status." ); - - switch( errorCode ) { - case TDEIO::ERR_CANNOT_OPEN_FOR_READING: - errorName = i18n( "Cannot Open Resource For Reading" ); - description = i18n( "This means that the contents of the requested file " - "or folder %1 could not be retrieved, as read " - "access could not be obtained." ).arg( dir ); - causes << i18n( "You may not have permissions to read the file or open " - "the folder.") << cLocked << cHardware; - solutions << sAccess << sQuerylock << sSysadmin; - break; - - case TDEIO::ERR_CANNOT_OPEN_FOR_WRITING: - errorName = i18n( "Cannot Open Resource For Writing" ); - description = i18n( "This means that the file, %1, could " - "not be written to as requested, because access with permission to " - "write could not be obtained." ).arg( filename ); - causes << cAccess << cLocked << cHardware; - solutions << sAccess << sQuerylock << sSysadmin; - break; - - case TDEIO::ERR_CANNOT_LAUNCH_PROCESS: - errorName = i18n( "Cannot Initiate the %1 Protocol" ).arg( protocol ); - techName = i18n( "Unable to Launch Process" ); - description = i18n( "The program on your computer which provides access " - "to the %1 protocol could not be started. This is " - "usually due to technical reasons." ).arg( protocol ); - causes << i18n( "The program which provides compatibility with this " - "protocol may not have been updated with your last update of TDE. " - "This can cause the program to be incompatible with the current version " - "and thus not start." ) << cBug; - solutions << sUpdate << sSysadmin; - break; - - case TDEIO::ERR_INTERNAL: - errorName = i18n( "Internal Error" ); - description = i18n( "The program on your computer which provides access " - "to the %1 protocol has reported an internal error." ) - .arg( protocol ); - causes << cBuglikely; - solutions << sUpdate << sBugreport; - break; - - case TDEIO::ERR_MALFORMED_URL: - errorName = i18n( "Improperly Formatted URL" ); - description = i18n( "The Uniform Resource " - "Locator (URL) that you entered was not properly " - "formatted. The format of a URL is generally as follows:" - "
protocol://user:password@www.example.org:port/folder/" - "filename.extension?query=value
" ); - solutions << sTypo; - break; - - case TDEIO::ERR_UNSUPPORTED_PROTOCOL: - errorName = i18n( "Unsupported Protocol %1" ).arg( protocol ); - description = i18n( "The protocol %1 is not supported " - "by the TDE programs currently installed on this computer." ) - .arg( protocol ); - causes << i18n( "The requested protocol may not be supported." ) - << i18n( "The versions of the %1 protocol supported by this computer and " - "the server may be incompatible." ).arg( protocol ); - solutions << i18n( "You may perform a search on the Internet for a TDE " - "program (called a kioslave or ioslave) which supports this protocol. " - "Places to search include " - "http://kde-apps.org/ and " - "http://freshmeat.net/." ) - << sUpdate << sSysadmin; - break; - - case TDEIO::ERR_NO_SOURCE_PROTOCOL: - errorName = i18n( "URL Does Not Refer to a Resource." ); - techName = i18n( "Protocol is a Filter Protocol" ); - description = i18n( "The Uniform Resource " - "Locator (URL) that you entered did not refer to a " - "specific resource." ); - causes << i18n( "TDE is able to communicate through a protocol within a " - "protocol; the protocol specified is only for use in such situations, " - "however this is not one of these situations. This is a rare event, and " - "is likely to indicate a programming error." ); - solutions << sTypo; - break; - - case TDEIO::ERR_UNSUPPORTED_ACTION: - errorName = i18n( "Unsupported Action: %1" ).arg( errorText ); - description = i18n( "The requested action is not supported by the TDE " - "program which is implementing the %1 protocol." ) - .arg( protocol ); - causes << i18n( "This error is very much dependent on the TDE program. The " - "additional information should give you more information than is available " - "to the TDE input/output architecture." ); - solutions << i18n( "Attempt to find another way to accomplish the same " - "outcome." ); - break; - - case TDEIO::ERR_IS_DIRECTORY: - errorName = i18n( "File Expected" ); - description = i18n( "The request expected a file, however the " - "folder %1 was found instead." ).arg( dir ); - causes << i18n( "This may be an error on the server side." ) << cBug; - solutions << sUpdate << sSysadmin; - break; - - case TDEIO::ERR_IS_FILE: - errorName = i18n( "Folder Expected" ); - description = i18n( "The request expected a folder, however " - "the file %1 was found instead." ).arg( filename ); - causes << cBug; - solutions << sUpdate << sSysadmin; - break; - - case TDEIO::ERR_DOES_NOT_EXIST: - errorName = i18n( "File or Folder Does Not Exist" ); - description = i18n( "The specified file or folder %1 " - "does not exist." ).arg( dir ); - causes << cBug; - solutions << sUpdate << sSysadmin; - break; - - case TDEIO::ERR_FILE_ALREADY_EXIST: - errorName = i18n( "File Already Exists" ); - description = i18n( "The requested file could not be created because a " - "file with the same name already exists." ); - solutions << i18n ( "Try moving the current file out of the way first, " - "and then try again." ) - << i18n ( "Delete the current file and try again." ) - << i18n( "Choose an alternate filename for the new file." ); - break; - - case TDEIO::ERR_DIR_ALREADY_EXIST: - errorName = i18n( "Folder Already Exists" ); - description = i18n( "The requested folder could not be created because " - "a folder with the same name already exists." ); - solutions << i18n( "Try moving the current folder out of the way first, " - "and then try again." ) - << i18n( "Delete the current folder and try again." ) - << i18n( "Choose an alternate name for the new folder." ); - break; - - case TDEIO::ERR_UNKNOWN_HOST: - errorName = i18n( "Unknown Host" ); - description = i18n( "An unknown host error indicates that the server with " - "the requested name, %1, could not be " - "located on the Internet." ).arg( host ); - causes << i18n( "The name that you typed, %1, may not exist: it may be " - "incorrectly typed." ).arg( host ) - << cNetwork << cNetconf; - solutions << sNetwork << sSysadmin; - break; - - case TDEIO::ERR_ACCESS_DENIED: - errorName = i18n( "Access Denied" ); - description = i18n( "Access was denied to the specified resource, " - "%1." ).arg( url ); - causes << i18n( "You may have supplied incorrect authentication details or " - "none at all." ) - << i18n( "Your account may not have permission to access the " - "specified resource." ); - solutions << i18n( "Retry the request and ensure your authentication details " - "are entered correctly." ) << sSysadmin; - if ( !isSlaveNetwork ) solutions << sServeradmin; - break; - - case TDEIO::ERR_WRITE_ACCESS_DENIED: - errorName = i18n( "Write Access Denied" ); - description = i18n( "This means that an attempt to write to the file " - "%1 was rejected." ).arg( filename ); - causes << cAccess << cLocked << cHardware; - solutions << sAccess << sQuerylock << sSysadmin; - break; - - case TDEIO::ERR_CANNOT_ENTER_DIRECTORY: - errorName = i18n( "Unable to Enter Folder" ); - description = i18n( "This means that an attempt to enter (in other words, " - "to open) the requested folder %1 was rejected." ) - .arg( dir ); - causes << cAccess << cLocked; - solutions << sAccess << sQuerylock << sSysadmin; - break; - - case TDEIO::ERR_PROTOCOL_IS_NOT_A_FILESYSTEM: - errorName = i18n( "Folder Listing Unavailable" ); - techName = i18n( "Protocol %1 is not a Filesystem" ).arg( protocol ); - description = i18n( "This means that a request was made which requires " - "determining the contents of the folder, and the TDE program supporting " - "this protocol is unable to do so." ); - causes << cBug; - solutions << sUpdate << sBugreport; - break; - - case TDEIO::ERR_CYCLIC_LINK: - errorName = i18n( "Cyclic Link Detected" ); - description = i18n( "UNIX environments are commonly able to link a file or " - "folder to a separate name and/or location. TDE detected a link or " - "series of links that results in an infinite loop - i.e. the file was " - "(perhaps in a roundabout way) linked to itself." ); - solutions << i18n( "Delete one part of the loop in order that it does not " - "cause an infinite loop, and try again." ) << sSysadmin; - break; - - case TDEIO::ERR_USER_CANCELED: - // Do nothing in this case. The user doesn't need to be told what he just did. - // rodda: However, if we have been called, an application is about to display - // this information anyway. If we don't return sensible information, the - // user sees a blank dialog (I have seen this myself) - errorName = i18n( "Request Aborted By User" ); - description = i18n( "The request was not completed because it was " - "aborted." ); - solutions << i18n( "Retry the request." ); - break; - - case TDEIO::ERR_CYCLIC_COPY: - errorName = i18n( "Cyclic Link Detected During Copy" ); - description = i18n( "UNIX environments are commonly able to link a file or " - "folder to a separate name and/or location. During the requested copy " - "operation, TDE detected a link or series of links that results in an " - "infinite loop - i.e. the file was (perhaps in a roundabout way) linked " - "to itself." ); - solutions << i18n( "Delete one part of the loop in order that it does not " - "cause an infinite loop, and try again." ) << sSysadmin; - break; - - case TDEIO::ERR_COULD_NOT_CREATE_SOCKET: - errorName = i18n( "Could Not Create Network Connection" ); - techName = i18n( "Could Not Create Socket" ); - description = i18n( "This is a fairly technical error in which a required " - "device for network communications (a socket) could not be created." ); - causes << i18n( "The network connection may be incorrectly configured, or " - "the network interface may not be enabled." ); - solutions << sNetwork << sSysadmin; - break; - - case TDEIO::ERR_COULD_NOT_CONNECT: - errorName = i18n( "Connection to Server Refused" ); - description = i18n( "The server %1 refused to allow this " - "computer to make a connection." ).arg( host ); - causes << i18n( "The server, while currently connected to the Internet, " - "may not be configured to allow requests." ) - << i18n( "The server, while currently connected to the Internet, " - "may not be running the requested service (%1)." ).arg( protocol ) - << i18n( "A network firewall (a device which restricts Internet " - "requests), either protecting your network or the network of the server, " - "may have intervened, preventing this request." ); - solutions << sTryagain << sServeradmin << sSysadmin; - break; - - case TDEIO::ERR_CONNECTION_BROKEN: - errorName = i18n( "Connection to Server Closed Unexpectedly" ); - description = i18n( "Although a connection was established to " - "%1, the connection was closed at an unexpected point " - "in the communication." ).arg( host ); - causes << cNetwork << cNetpath << i18n( "A protocol error may have occurred, " - "causing the server to close the connection as a response to the error." ); - solutions << sTryagain << sServeradmin << sSysadmin; - break; - - case TDEIO::ERR_NOT_FILTER_PROTOCOL: - errorName = i18n( "URL Resource Invalid" ); - techName = i18n( "Protocol %1 is not a Filter Protocol" ).arg( protocol ); - description = i18n( "The Uniform Resource " - "Locator (URL) that you entered did not refer to " - "a valid mechanism of accessing the specific resource, " - "%1%2." ) - .arg( !host.isNull() ? host + '/' : TQString::null ).arg( dir ); - causes << i18n( "TDE is able to communicate through a protocol within a " - "protocol. This request specified a protocol be used as such, however " - "this protocol is not capable of such an action. This is a rare event, " - "and is likely to indicate a programming error." ); - solutions << sTypo << sSysadmin; - break; - - case TDEIO::ERR_COULD_NOT_MOUNT: - errorName = i18n( "Unable to Initialize Input/Output Device" ); - techName = i18n( "Could Not Mount Device" ); - description = i18n( "The requested device could not be initialized " - "(\"mounted\"). The reported error was: %1" ) - .arg( errorText ); - causes << i18n( "The device may not be ready, for example there may be " - "no media in a removable media device (i.e. no CD-ROM in a CD drive), " - "or in the case of a peripheral/portable device, the device may not " - "be correctly connected." ) - << i18n( "You may not have permissions to initialize (\"mount\") the " - "device. On UNIX systems, often system administrator privileges are " - "required to initialize a device." ) - << cHardware; - solutions << i18n( "Check that the device is ready; removable drives " - "must contain media, and portable devices must be connected and powered " - "on.; and try again." ) << sAccess << sSysadmin; - break; - - case TDEIO::ERR_COULD_NOT_UNMOUNT: - errorName = i18n( "Unable to Uninitialize Input/Output Device" ); - techName = i18n( "Could Not Unmount Device" ); - description = i18n( "The requested device could not be uninitialized " - "(\"unmounted\"). The reported error was: %1" ) - .arg( errorText ); - causes << i18n( "The device may be busy, that is, still in use by " - "another application or user. Even such things as having an open " - "browser window on a location on this device may cause the device to " - "remain in use." ) - << i18n( "You may not have permissions to uninitialize (\"unmount\") " - "the device. On UNIX systems, system administrator privileges are " - "often required to uninitialize a device." ) - << cHardware; - solutions << i18n( "Check that no applications are accessing the device, " - "and try again." ) << sAccess << sSysadmin; - break; - - case TDEIO::ERR_COULD_NOT_READ: - errorName = i18n( "Cannot Read From Resource" ); - description = i18n( "This means that although the resource, " - "%1, was able to be opened, an error occurred while " - "reading the contents of the resource." ).arg( url ); - causes << i18n( "You may not have permissions to read from the resource." ); - if ( !isSlaveNetwork ) causes << cNetwork; - causes << cHardware; - solutions << sAccess; - if ( !isSlaveNetwork ) solutions << sNetwork; - solutions << sSysadmin; - break; - - case TDEIO::ERR_COULD_NOT_WRITE: - errorName = i18n( "Cannot Write to Resource" ); - description = i18n( "This means that although the resource, %1" - ", was able to be opened, an error occurred while writing to the resource." ) - .arg( url ); - causes << i18n( "You may not have permissions to write to the resource." ); - if ( !isSlaveNetwork ) causes << cNetwork; - causes << cHardware; - solutions << sAccess; - if ( !isSlaveNetwork ) solutions << sNetwork; - solutions << sSysadmin; - break; - - case TDEIO::ERR_COULD_NOT_BIND: - errorName = i18n( "Could Not Listen for Network Connections" ); - techName = i18n( "Could Not Bind" ); - description = i18n( "This is a fairly technical error in which a required " - "device for network communications (a socket) could not be established " - "to listen for incoming network connections." ); - causes << i18n( "The network connection may be incorrectly configured, or " - "the network interface may not be enabled." ); - solutions << sNetwork << sSysadmin; - break; - - case TDEIO::ERR_COULD_NOT_LISTEN: - errorName = i18n( "Could Not Listen for Network Connections" ); - techName = i18n( "Could Not Listen" ); - description = i18n( "This is a fairly technical error in which a required " - "device for network communications (a socket) could not be established " - "to listen for incoming network connections." ); - causes << i18n( "The network connection may be incorrectly configured, or " - "the network interface may not be enabled." ); - solutions << sNetwork << sSysadmin; - break; - - case TDEIO::ERR_COULD_NOT_ACCEPT: - errorName = i18n( "Could Not Accept Network Connection" ); - description = i18n( "This is a fairly technical error in which an error " - "occurred while attempting to accept an incoming network connection." ); - causes << i18n( "The network connection may be incorrectly configured, or " - "the network interface may not be enabled." ) - << i18n( "You may not have permissions to accept the connection." ); - solutions << sNetwork << sSysadmin; - break; - - case TDEIO::ERR_COULD_NOT_LOGIN: - errorName = i18n( "Could Not Login: %1" ).arg( errorText ); - description = i18n( "An attempt to login to perform the requested " - "operation was unsuccessful." ); - causes << i18n( "You may have supplied incorrect authentication details or " - "none at all." ) - << i18n( "Your account may not have permission to access the " - "specified resource." ) << cProtocol; - solutions << i18n( "Retry the request and ensure your authentication details " - "are entered correctly." ) << sServeradmin << sSysadmin; - break; - - case TDEIO::ERR_COULD_NOT_STAT: - errorName = i18n( "Could Not Determine Resource Status" ); - techName = i18n( "Could Not Stat Resource" ); - description = i18n( "An attempt to determine information about the status " - "of the resource %1, such as the resource name, type, " - "size, etc., was unsuccessful." ).arg( url ); - causes << i18n( "The specified resource may not have existed or may " - "not be accessible." ) << cProtocol << cHardware; - solutions << i18n( "Retry the request and ensure your authentication details " - "are entered correctly." ) << sSysadmin; - break; - - case TDEIO::ERR_COULD_NOT_CLOSEDIR: - //result = i18n( "Could not terminate listing %1" ).arg( errorText ); - errorName = i18n( "Could Not Cancel Listing" ); - techName = i18n( "FIXME: Document this" ); - break; - - case TDEIO::ERR_COULD_NOT_MKDIR: - errorName = i18n( "Could Not Create Folder" ); - description = i18n( "An attempt to create the requested folder failed." ); - causes << cAccess << i18n( "The location where the folder was to be created " - "may not exist." ); - if ( !isSlaveNetwork ) causes << cProtocol; - solutions << i18n( "Retry the request." ) << sAccess; - break; - - case TDEIO::ERR_COULD_NOT_RMDIR: - errorName = i18n( "Could Not Remove Folder" ); - description = i18n( "An attempt to remove the specified folder, " - "%1, failed." ).arg( dir ); - causes << i18n( "The specified folder may not exist." ) - << i18n( "The specified folder may not be empty." ) - << cAccess; - if ( !isSlaveNetwork ) causes << cProtocol; - solutions << i18n( "Ensure that the folder exists and is empty, and try " - "again." ) << sAccess; - break; - - case TDEIO::ERR_CANNOT_RESUME: - errorName = i18n( "Could Not Resume File Transfer" ); - description = i18n( "The specified request asked that the transfer of " - "file %1 be resumed at a certain point of the " - "transfer. This was not possible." ).arg( filename ); - causes << i18n( "The protocol, or the server, may not support file " - "resuming." ); - solutions << i18n( "Retry the request without attempting to resume " - "transfer." ); - break; - - case TDEIO::ERR_CANNOT_RENAME: - errorName = i18n( "Could Not Rename Resource" ); - description = i18n( "An attempt to rename the specified resource " - "%1 failed." ).arg( url ); - causes << cAccess << cExists; - if ( !isSlaveNetwork ) causes << cProtocol; - solutions << sAccess << sExists; - break; - - case TDEIO::ERR_CANNOT_CHMOD: - errorName = i18n( "Could Not Alter Permissions of Resource" ); - description = i18n( "An attempt to alter the permissions on the specified " - "resource %1 failed." ).arg( url ); - causes << cAccess << cExists; - solutions << sAccess << sExists; - break; - - case TDEIO::ERR_CANNOT_DELETE: - errorName = i18n( "Could Not Delete Resource" ); - description = i18n( "An attempt to delete the specified resource " - "%1 failed." ).arg( url ); - causes << cAccess << cExists; - solutions << sAccess << sExists; - break; - - case TDEIO::ERR_SLAVE_DIED: - errorName = i18n( "Unexpected Program Termination" ); - description = i18n( "The program on your computer which provides access " - "to the %1 protocol has unexpectedly terminated." ) - .arg( url ); - causes << cBuglikely; - solutions << sUpdate << sBugreport; - break; - - case TDEIO::ERR_OUT_OF_MEMORY: - errorName = i18n( "Out of Memory" ); - description = i18n( "The program on your computer which provides access " - "to the %1 protocol could not obtain the memory " - "required to continue." ).arg( protocol ); - causes << cBuglikely; - solutions << sUpdate << sBugreport; - break; - - case TDEIO::ERR_UNKNOWN_PROXY_HOST: - errorName = i18n( "Unknown Proxy Host" ); - description = i18n( "While retrieving information about the specified " - "proxy host, %1, an Unknown Host error was encountered. " - "An unknown host error indicates that the requested name could not be " - "located on the Internet." ).arg( errorText ); - causes << i18n( "There may have been a problem with your network " - "configuration, specifically your proxy's hostname. If you have been " - "accessing the Internet with no problems recently, this is unlikely." ) - << cNetwork; - solutions << i18n( "Double-check your proxy settings and try again." ) - << sSysadmin; - break; - - case TDEIO::ERR_COULD_NOT_AUTHENTICATE: - errorName = i18n( "Authentication Failed: Method %1 Not Supported" ) - .arg( errorText ); - description = i18n( "Although you may have supplied the correct " - "authentication details, the authentication failed because the " - "method that the server is using is not supported by the TDE " - "program implementing the protocol %1." ).arg( protocol ); - solutions << i18n( "Please file a bug at " - "http://bugs.pearsoncomputing.net/ to inform the TDE team of the unsupported " - "authentication method." ) << sSysadmin; - break; - - case TDEIO::ERR_ABORTED: - errorName = i18n( "Request Aborted" ); - description = i18n( "The request was not completed because it was " - "aborted." ); - solutions << i18n( "Retry the request." ); - break; - - case TDEIO::ERR_INTERNAL_SERVER: - errorName = i18n( "Internal Error in Server" ); - description = i18n( "The program on the server which provides access " - "to the %1 protocol has reported an internal error: " - "%0." ).arg( protocol ); - causes << i18n( "This is most likely to be caused by a bug in the " - "server program. Please consider submitting a full bug report as " - "detailed below." ); - solutions << i18n( "Contact the administrator of the server " - "to advise them of the problem." ) - << i18n( "If you know who the authors of the server software are, " - "submit the bug report directly to them." ); - break; - - case TDEIO::ERR_SERVER_TIMEOUT: - errorName = i18n( "Timeout Error" ); - description = i18n( "Although contact was made with the server, a " - "response was not received within the amount of time allocated for " - "the request as follows:
    " - "
  • Timeout for establishing a connection: %1 seconds
  • " - "
  • Timeout for receiving a response: %2 seconds
  • " - "
  • Timeout for accessing proxy servers: %3 seconds
" - "Please note that you can alter these timeout settings in the TDE " - "Control Center, by selecting Network -> Preferences." ) - .arg( KProtocolManager::connectTimeout() ) - .arg( KProtocolManager::responseTimeout() ) - .arg( KProtocolManager::proxyConnectTimeout() ); - causes << cNetpath << i18n( "The server was too busy responding to other " - "requests to respond." ); - solutions << sTryagain << sServeradmin; - break; - - case TDEIO::ERR_UNKNOWN: - errorName = i18n( "Unknown Error" ); - description = i18n( "The program on your computer which provides access " - "to the %1 protocol has reported an unknown error: " - "%2." ).arg( protocol ).arg( errorText ); - causes << cBug; - solutions << sUpdate << sBugreport; - break; - - case TDEIO::ERR_UNKNOWN_INTERRUPT: - errorName = i18n( "Unknown Interruption" ); - description = i18n( "The program on your computer which provides access " - "to the %1 protocol has reported an interruption of " - "an unknown type: %2." ).arg( protocol ).arg( errorText ); - causes << cBug; - solutions << sUpdate << sBugreport; - break; - - case TDEIO::ERR_CANNOT_DELETE_ORIGINAL: - errorName = i18n( "Could Not Delete Original File" ); - description = i18n( "The requested operation required the deleting of " - "the original file, most likely at the end of a file move operation. " - "The original file %1 could not be deleted." ) - .arg( errorText ); - causes << cAccess; - solutions << sAccess; - break; - - case TDEIO::ERR_CANNOT_DELETE_PARTIAL: - errorName = i18n( "Could Not Delete Temporary File" ); - description = i18n( "The requested operation required the creation of " - "a temporary file in which to save the new file while being " - "downloaded. This temporary file %1 could not be " - "deleted." ).arg( errorText ); - causes << cAccess; - solutions << sAccess; - break; - - case TDEIO::ERR_CANNOT_RENAME_ORIGINAL: - errorName = i18n( "Could Not Rename Original File" ); - description = i18n( "The requested operation required the renaming of " - "the original file %1, however it could not be " - "renamed." ).arg( errorText ); - causes << cAccess; - solutions << sAccess; - break; - - case TDEIO::ERR_CANNOT_RENAME_PARTIAL: - errorName = i18n( "Could Not Rename Temporary File" ); - description = i18n( "The requested operation required the creation of " - "a temporary file %1, however it could not be " - "created." ).arg( errorText ); - causes << cAccess; - solutions << sAccess; - break; - - case TDEIO::ERR_CANNOT_SYMLINK: - errorName = i18n( "Could Not Create Link" ); - techName = i18n( "Could Not Create Symbolic Link" ); - description = i18n( "The requested symbolic link %1 could not be created." ) - .arg( errorText ); - causes << cAccess; - solutions << sAccess; - break; - - case TDEIO::ERR_NO_CONTENT: - errorName = i18n( "No Content" ); - description = errorText; - break; - - case TDEIO::ERR_DISK_FULL: - errorName = i18n( "Disk Full" ); - description = i18n( "The requested file %1 could not be " - "written to as there is inadequate disk space." ).arg( errorText ); - solutions << i18n( "Free up enough disk space by 1) deleting unwanted and " - "temporary files; 2) archiving files to removable media storage such as " - "CD-Recordable discs; or 3) obtain more storage capacity." ) - << sSysadmin; - break; - - case TDEIO::ERR_IDENTICAL_FILES: - errorName = i18n( "Source and Destination Files Identical" ); - description = i18n( "The operation could not be completed because the " - "source and destination files are the same file." ); - solutions << i18n( "Choose a different filename for the destination file." ); - break; - - // We assume that the slave has all the details - case TDEIO::ERR_SLAVE_DEFINED: - errorName = TQString::null; - description = errorText; - break; - - default: - // fall back to the plain error... - errorName = i18n( "Undocumented Error" ); - description = buildErrorString( errorCode, errorText ); - } - - TQByteArray ret; - TQDataStream stream(ret, IO_WriteOnly); - stream << errorName << techName << description << causes << solutions; - return ret; -} - -#ifdef Q_OS_UNIX - -#include -#include -#include -#include - -#include - -#ifdef HAVE_PATHS_H -#include -#endif -#ifdef HAVE_SYS_STAT_H -#include -#endif -#include -#ifdef HAVE_LIMITS_H -#include -#endif -#ifdef HAVE_SYS_MNTTAB_H -#include -#endif -#ifdef HAVE_MNTENT_H -#include -#elif defined(HAVE_SYS_MNTENT_H) -#include -#endif -#ifdef HAVE_SYS_UCRED_H -#include -#endif -#ifdef HAVE_SYS_MOUNT_H -#include -#endif -#ifdef HAVE_FSTAB_H -#include -#endif -#if defined(_AIX) -#include -#include -#include - -/* AIX does not prototype mntctl anywhere that I can find */ -#ifndef mntctl -extern "C" { -int mntctl(int command, int size, void* buffer); -} -#endif -extern "C" struct vfs_ent *getvfsbytype(int vfsType); -extern "C" void endvfsent( ); -#endif - -/*************************************************************** - * - * Utility functions - * - ***************************************************************/ - -#ifndef HAVE_GETMNTINFO - -#ifdef _PATH_MOUNTED -// On some Linux, MNTTAB points to /etc/fstab ! -# undef MNTTAB -# define MNTTAB _PATH_MOUNTED -#else -# ifndef MNTTAB -# ifdef MTAB_FILE -# define MNTTAB MTAB_FILE -# else -# define MNTTAB "/etc/mnttab" -# endif -# endif -#endif - -#ifndef FSTAB -# ifdef _PATH_FSTAB -# define FSTAB _PATH_FSTAB -# else -# define FSTAB "/etc/fstab" -# endif -#endif - -#ifdef __CYGWIN__ -#define hasmntopt(var,opt) (0) -#endif - -// There are (at least) four kind of APIs: -// setmntent + getmntent + struct mntent (linux...) -// getmntent + struct mnttab -// mntctl + struct vmount (AIX) -// getmntinfo + struct statfs&flags (BSD 4.4 and friends) -// getfsent + char* (BSD 4.3 and friends) - -#ifdef HAVE_SETMNTENT -#define SETMNTENT setmntent -#define ENDMNTENT endmntent -#define STRUCT_MNTENT struct mntent * -#define STRUCT_SETMNTENT FILE * -#define GETMNTENT(file, var) ((var = getmntent(file)) != 0) -#define MOUNTPOINT(var) var->mnt_dir -#define MOUNTTYPE(var) var->mnt_type -#define HASMNTOPT(var, opt) hasmntopt(var, opt) -#define FSNAME(var) var->mnt_fsname -#elif defined(_AIX) -/* we don't need this stuff */ -#else -#define SETMNTENT fopen -#define ENDMNTENT fclose -#define STRUCT_MNTENT struct mnttab -#define STRUCT_SETMNTENT FILE * -#define GETMNTENT(file, var) (getmntent(file, &var) == 0) -#define MOUNTPOINT(var) var.mnt_mountp -#define MOUNTTYPE(var) var.mnt_fstype -#define HASMNTOPT(var, opt) hasmntopt(&var, opt) -#define FSNAME(var) var.mnt_special -#endif - -#endif /* HAVE_GETMNTINFO */ - -TQString TDEIO::findDeviceMountPoint( const TQString& filename ) -{ - TQString result; - -#ifdef HAVE_VOLMGT - /* - * support for Solaris volume management - */ - const char *volpath; - FILE *mnttab; - struct mnttab mnt; - int len; - TQCString devname; - - if( (volpath = volmgt_root()) == NULL ) { - kdDebug( 7007 ) << "findDeviceMountPoint: " - << "VOLMGT: can't find volmgt root dir" << endl; - return TQString::null; - } - - if( (mnttab = fopen( MNTTAB, "r" )) == NULL ) { - kdDebug( 7007 ) << "findDeviceMountPoint: " - << "VOLMGT: can't open mnttab" << endl; - return TQString::null; - } - - devname = volpath; - devname += TQFile::encodeName( filename ); - devname += '/'; - len = devname.length(); -// kdDebug( 7007 ) << "findDeviceMountPoint: " -// << "VOLMGT: searching mountpoint for \"" << devname << "\"" -// << endl; - - /* - * find the mountpoint - * floppies: - * /dev/disketteN => /dev/disketteN - * CDROM, ZIP, and other media: - * /dev/dsk/cXtYdZs2 => /dev/dsk/cXtYdZ (without slice#) - */ - rewind( mnttab ); - result = TQString::null; - while( getmntent( mnttab, &mnt ) == 0 ) { - /* - * either match the exact device name (floppies), - * or the device name without the slice# - */ - if( strncmp( devname.data(), mnt.mnt_special, len ) == 0 - || (strncmp( devname.data(), mnt.mnt_special, len - 3 ) == 0 - && mnt.mnt_special[len - 3] == '/' ) - || (strcmp(TQFile::encodeName(filename).data() - , mnt.mnt_special)==0)) { - result = mnt.mnt_mountp; - break; - } - } - fclose( mnttab ); -#else - - char realpath_buffer[MAXPATHLEN]; - TQCString realname; - - realname = TQFile::encodeName(filename); - /* If the path contains symlinks, get the real name */ - if (realpath(realname, realpath_buffer) != 0) - // succes, use result from realpath - realname = realpath_buffer; - - //kdDebug(7007) << "findDeviceMountPoint realname=" << realname << endl; - -#ifdef HAVE_GETMNTINFO - -#ifdef GETMNTINFO_USES_STATVFS - struct statvfs *mounted; -#else - struct statfs *mounted; -#endif - - int num_fs = getmntinfo(&mounted, MNT_NOWAIT); - - for (int i=0;i0 number of vmount structures - */ - mntctl_buffer = (struct vmount*)malloc(buf_sz); - num = mntctl(MCTL_QUERY, buf_sz, mntctl_buffer); - if (num == 0) - { - buf_sz = *(int*)mntctl_buffer; - free(mntctl_buffer); - mntctl_buffer = (struct vmount*)malloc(buf_sz); - num = mntctl(MCTL_QUERY, buf_sz, mntctl_buffer); - } - - if (num > 0) - { - /* iterate through items in the vmount structure: */ - vm = mntctl_buffer; - for ( ; num > 0; num-- ) - { - /* get the name of the mounted file systems: */ - fsname_len = vmt2datasize(vm, VMT_STUB); - mountedto = (char*)malloc(fsname_len + 1); - mountedto[fsname_len] = '\0'; - strncpy(mountedto, (char *)vmt2dataptr(vm, VMT_STUB), fsname_len); - - /* get the mount-from information: */ - fsname_len = vmt2datasize(vm, VMT_OBJECT); - mountedfrom = (char*)malloc(fsname_len + 1); - mountedfrom[fsname_len] = '\0'; - strncpy(mountedfrom, (char *)vmt2dataptr(vm, VMT_OBJECT), fsname_len); - - TQCString device_name = mountedfrom; - - if (realpath(device_name, realpath_buffer) != 0) - // success, use result from realpath - device_name = realpath_buffer; - - free(mountedfrom); - - if (realname == device_name) { - result = mountedto; - free(mountedto); - break; - } - - free(mountedto); - - /* goto the next vmount structure: */ - vm = (struct vmount *)((char *)vm + vm->vmt_length); - } - } - - free( mntctl_buffer ); - -#else - - STRUCT_SETMNTENT mtab; - - /* Get the list of mounted file systems */ - - if ((mtab = SETMNTENT(MNTTAB, "r")) == 0) { - perror("setmntent"); - return TQString::null; - } - - /* Loop over all file systems and see if we can find our - * mount point. - * Note that this is the mount point with the longest match. - * XXX: Fails if me->mnt_dir is not a realpath but goes - * through a symlink, e.g. /foo/bar where /foo is a symlink - * pointing to /local/foo. - * - * How kinky can you get with a filesystem? - */ - - STRUCT_MNTENT me; - - while (GETMNTENT(mtab, me)) - { - // There may be symbolic links into the /etc/mnttab - // So we have to find the real device name here as well! - TQCString device_name = FSNAME(me); - if (device_name.isEmpty() || (device_name == "none")) - continue; - - //kdDebug( 7007 ) << "device_name=" << device_name << endl; - - // If the path contains symlinks, get - // the real name - if (realpath(device_name, realpath_buffer) != 0) - // succes, use result from realpath - device_name = realpath_buffer; - - //kdDebug( 7007 ) << "device_name after realpath =" << device_name << endl; - - if (realname == device_name) - { - result = MOUNTPOINT(me); - break; - } - } - - ENDMNTENT(mtab); - -#endif /* GET_MNTINFO */ -#endif /* HAVE_VOLMGT */ - - //kdDebug( 7007 ) << "Returning result " << result << endl; - return result; -} - -// Don't just trust the return value, keep iterating to check for a better match (bigger max) -static bool is_my_mountpoint( const char *mountpoint, const char *realname, int &max ) -{ - int length = strlen(mountpoint); - - if (!strncmp(mountpoint, realname, length) - && length > max) { - max = length; - if (length == 1 || realname[length] == '/' || realname[length] == '\0') - return true; - } - return false; -} - -typedef enum { Unseen, Right, Wrong } MountState; - -/** - * Idea and code base by Olaf Kirch - **/ -static void check_mount_point(const char *mounttype, - const char *fsname, - MountState &isslow, MountState &isautofs) -{ - bool nfs = !strcmp(mounttype, "nfs"); - bool autofs = !strcmp(mounttype, "autofs") || !strcmp(mounttype,"subfs"); - bool pid = (strstr(fsname, ":(pid") != 0); - - if (nfs && !pid) - isslow = Right; - else if (isslow == Right) - isslow = Wrong; - - /* Does this look like automounted? */ - if (autofs || (nfs && pid)) { - isautofs = Right; - isslow = Right; - } -} - -// returns the mount point, checks the mount state. -// if ismanual == Wrong this function does not check the manual mount state -static TQString get_mount_info(const TQString& filename, - MountState& isautofs, MountState& isslow, MountState& ismanual, - TQString& fstype) -{ - static bool gotRoot = false; - static dev_t rootDevice; - - struct cachedDevice_t - { - dev_t device; - TQString mountPoint; - MountState isautofs; - MountState isslow; - MountState ismanual; - TQString fstype; - }; - static struct cachedDevice_t *cachedDevice = 0; - - if (!gotRoot) - { - KDE_struct_stat stat_buf; - KDE_stat("/", &stat_buf); - gotRoot = true; - rootDevice = stat_buf.st_dev; - } - - bool gotDevice = false; - KDE_struct_stat stat_buf; - if (KDE_stat(TQFile::encodeName(filename), &stat_buf) == 0) - { - gotDevice = true; - if (stat_buf.st_dev == rootDevice) - { - static const TQString &root = TDEGlobal::staticQString("/"); - isautofs = Wrong; - isslow = Wrong; - ismanual = Wrong; - fstype = TQString::null; // ### do we need it? - return root; - } - if (cachedDevice && (stat_buf.st_dev == cachedDevice->device)) - { - bool interestedInIsManual = ismanual != Wrong; - isautofs = cachedDevice->isautofs; - isslow = cachedDevice->isslow; - ismanual = cachedDevice->ismanual; - fstype = cachedDevice->fstype; - // Don't use the cache if it doesn't have the information we're looking for - if ( !interestedInIsManual || ismanual != Unseen ) - return cachedDevice->mountPoint; - } - } - - char realname[MAXPATHLEN]; - - memset(realname, 0, MAXPATHLEN); - - /* If the path contains symlinks, get the real name */ - if (realpath(TQFile::encodeName(filename), realname) == 0) { - if( strlcpy(realname, TQFile::encodeName(filename), MAXPATHLEN)>=MAXPATHLEN) - return TQString::null; - } - - int max = 0; - TQString mountPoint; - - /* Loop over all file systems and see if we can find our - * mount point. - * Note that this is the mount point with the longest match. - * XXX: Fails if me->mnt_dir is not a realpath but goes - * through a symlink, e.g. /foo/bar where /foo is a symlink - * pointing to /local/foo. - * - * How kinky can you get with a filesystem? - */ - -#ifdef HAVE_GETMNTINFO - -#ifdef GETMNTINFO_USES_STATVFS - struct statvfs *mounted; -#else - struct statfs *mounted; -#endif - - char realpath_buffer[MAXPATHLEN]; - - int num_fs = getmntinfo(&mounted, MNT_NOWAIT); - - for (int i=0;ifs_mntops, "noauto")) - ismanual = Right; - } - } - } - -#elif defined(_AIX) - - struct vmount *mntctl_buffer; - struct vmount *vm; - char *mountedfrom; - char *mountedto; - int fsname_len, num; - char realpath_buffer[MAXPATHLEN]; - int buf_sz = 4096; - - mntctl_buffer = (struct vmount*)malloc(buf_sz); - num = mntctl(MCTL_QUERY, buf_sz, mntctl_buffer); - if (num == 0) - { - buf_sz = *(int*)mntctl_buffer; - free(mntctl_buffer); - mntctl_buffer = (struct vmount*)malloc(buf_sz); - num = mntctl(MCTL_QUERY, buf_sz, mntctl_buffer); - } - - if (num > 0) - { - /* iterate through items in the vmount structure: */ - vm = (struct vmount *)mntctl_buffer; - for ( ; num > 0; num-- ) - { - /* get the name of the mounted file systems: */ - fsname_len = vmt2datasize(vm, VMT_STUB); - mountedto = (char*)malloc(fsname_len + 1); - mountedto[fsname_len] = '\0'; - strncpy(mountedto, (char *)vmt2dataptr(vm, VMT_STUB), fsname_len); - - fsname_len = vmt2datasize(vm, VMT_OBJECT); - mountedfrom = (char*)malloc(fsname_len + 1); - mountedfrom[fsname_len] = '\0'; - strncpy(mountedfrom, (char *)vmt2dataptr(vm, VMT_OBJECT), fsname_len); - - /* get the mount-from information: */ - TQCString device_name = mountedfrom; - - if (realpath(device_name, realpath_buffer) != 0) - // success, use result from realpath - device_name = realpath_buffer; - - /* Look up the string for the file system type, - * as listed in /etc/vfs. - * ex.: nfs,jfs,afs,cdrfs,sfs,cachefs,nfs3,autofs - */ - struct vfs_ent* ent = getvfsbytype(vm->vmt_gfstype); - - if ( is_my_mountpoint( mountedto, realname, max ) ) - { - mountPoint = TQFile::decodeName(mountedto); - fstype = TQString::fromLatin1(ent->vfsent_name); - check_mount_point(ent->vfsent_name, device_name, isautofs, isslow); - - if (ismanual == Unseen) - { - // TODO: add check for ismanual, I couldn't find any way - // how to get the mount attribute from /etc/filesystems - ismanual == Wrong; - } - } - - free(mountedfrom); - free(mountedto); - - /* goto the next vmount structure: */ - vm = (struct vmount *)((char *)vm + vm->vmt_length); - } - - endvfsent( ); - } - - free( mntctl_buffer ); - -#else - - STRUCT_SETMNTENT mtab; - /* Get the list of mounted file systems */ - - if ((mtab = SETMNTENT(MNTTAB, "r")) == 0) { - perror("setmntent"); - return TQString::null; - } - - STRUCT_MNTENT me; - - while (true) { - if (!GETMNTENT(mtab, me)) - break; - - if ( is_my_mountpoint( MOUNTPOINT(me), realname, max ) ) - { - mountPoint = TQFile::decodeName( MOUNTPOINT(me) ); - fstype = MOUNTTYPE(me); - check_mount_point(MOUNTTYPE(me), FSNAME(me), isautofs, isslow); - // we don't check if ismanual is Right, if /a/b is manually - // mounted /a/b/c can't be automounted. At least IMO. - if (ismanual == Unseen) - { - // The next GETMNTENT call may destroy 'me' - // Copy out the info that we need - TQCString fsname_me = FSNAME(me); - TQCString mounttype_me = MOUNTTYPE(me); - - STRUCT_SETMNTENT fstab; - if ((fstab = SETMNTENT(FSTAB, "r")) == 0) { - continue; - } - - bool found = false; - STRUCT_MNTENT fe; - while (GETMNTENT(fstab, fe)) - { - if (fsname_me == FSNAME(fe)) - { - found = true; - if (HASMNTOPT(fe, "noauto") || - !strcmp(MOUNTTYPE(fe), "supermount")) - ismanual = Right; - break; - } - } - if (!found || (mounttype_me == "supermount")) - ismanual = Right; - - ENDMNTENT(fstab); - } - } - } - - ENDMNTENT(mtab); - -#endif - - if (isautofs == Right && isslow == Unseen) - isslow = Right; - - if (gotDevice) - { - if (!cachedDevice) - cachedDevice = new cachedDevice_t; - - cachedDevice->device = stat_buf.st_dev; - cachedDevice->mountPoint = mountPoint; - cachedDevice->isautofs = isautofs; - cachedDevice->isslow = isslow; - cachedDevice->ismanual = ismanual; - cachedDevice->fstype = fstype; - } - - return mountPoint; -} - -#else //!Q_OS_UNIX -//dummy -TQString TDEIO::findDeviceMountPoint( const TQString& filename ) -{ - return TQString::null; -} -#endif - -TQString TDEIO::findPathMountPoint(const TQString& filename) -{ -#ifdef Q_OS_UNIX - MountState isautofs = Unseen, isslow = Unseen, ismanual = Wrong; - TQString fstype; - return get_mount_info(filename, isautofs, isslow, ismanual, fstype); -#else //!Q_OS_UNIX - return TQString::null; -#endif -} - -bool TDEIO::manually_mounted(const TQString& filename) -{ -#ifdef Q_OS_UNIX - MountState isautofs = Unseen, isslow = Unseen, ismanual = Unseen; - TQString fstype; - TQString mountPoint = get_mount_info(filename, isautofs, isslow, ismanual, fstype); - return !mountPoint.isNull() && (ismanual == Right); -#else //!Q_OS_UNIX - return false; -#endif -} - -bool TDEIO::probably_slow_mounted(const TQString& filename) -{ -#ifdef Q_OS_UNIX - MountState isautofs = Unseen, isslow = Unseen, ismanual = Wrong; - TQString fstype; - TQString mountPoint = get_mount_info(filename, isautofs, isslow, ismanual, fstype); - return !mountPoint.isNull() && (isslow == Right); -#else //!Q_OS_UNIX - return false; -#endif -} - -bool TDEIO::testFileSystemFlag(const TQString& filename, FileSystemFlag flag) -{ -#ifdef Q_OS_UNIX - MountState isautofs = Unseen, isslow = Unseen, ismanual = Wrong; - TQString fstype; - TQString mountPoint = get_mount_info(filename, isautofs, isslow, ismanual, fstype); - kdDebug() << "testFileSystemFlag: fstype=" << fstype << endl; - if (mountPoint.isNull()) - return false; - bool isMsDos = ( fstype == "msdos" || fstype == "fat" || fstype == "vfat" ); - switch (flag) { - case SupportsChmod: - case SupportsChown: - case SupportsUTime: - case SupportsSymlinks: - return !isMsDos; // it's amazing the number of things FAT doesn't support :) - case CaseInsensitive: - return isMsDos; - } -#endif - return false; -} - -TDEIO::CacheControl TDEIO::parseCacheControl(const TQString &cacheControl) -{ - TQString tmp = cacheControl.lower(); - - if (tmp == "cacheonly") - return TDEIO::CC_CacheOnly; - if (tmp == "cache") - return TDEIO::CC_Cache; - if (tmp == "verify") - return TDEIO::CC_Verify; - if (tmp == "refresh") - return TDEIO::CC_Refresh; - if (tmp == "reload") - return TDEIO::CC_Reload; - - kdDebug() << "unrecognized Cache control option:"< - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License version 2 as published by the Free Software Foundation. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ -#ifndef __kio_global_h__ -#define __kio_global_h__ - -#include -#include -#include -#include -#include -#include - -#include - -/** - * @short A namespace for KIO globals - * - */ -namespace TDEIO -{ - /// 64-bit file offset - typedef TQ_LLONG fileoffset_t; - /// 64-bit file size - typedef TQ_ULLONG filesize_t; - - /** - * Converts @p size from bytes to the string representation. - * - * @param size size in bytes - * @return converted size as a string - e.g. 123.4 kB , 12.0 MB - */ - TDEIO_EXPORT TQString convertSize( TDEIO::filesize_t size ); - - /** - * Converts @p size from bytes to a string representation with includes - * the size in bytes. - * e.g. 90 B, 240 B, 1.4 KB (1495 B), 2.6MB (2,734,344 B), 0 B - * @param size size in bytes - * @return converted size as a string - e.g. 1.4 KB (1495 B), 45 B - */ - TDEIO_EXPORT TQString convertSizeWithBytes( TDEIO::filesize_t size ); - /** - * Converts a size to a string representation - * Not unlike TQString::number(...) - * - * @param size size in bytes - * @return converted size as a string - e.g. 123456789 - */ - TDEIO_EXPORT TQString number( TDEIO::filesize_t size ); - - /** - * Converts size from kilo-bytes to the string representation. - * - * @param kbSize size in kilo-bytes - * @return converted size as a string - e.g. 123.4 kB , 12.0 MB - */ - TDEIO_EXPORT TQString convertSizeFromKB( TDEIO::filesize_t kbSize ); - - /** - * Calculates remaining time in seconds from total size, processed size and speed. - * - * @param totalSize total size in bytes - * @param processedSize processed size in bytes - * @param speed speed in bytes per second - * @return calculated remaining time in seconds - * - * @since 3.4 - */ - TDEIO_EXPORT unsigned int calculateRemainingSeconds( TDEIO::filesize_t totalSize, - TDEIO::filesize_t processedSize, TDEIO::filesize_t speed ); - - /** - * Convert @p seconds to a string representing number of days, hours, minutes and seconds - * - * @param seconds number of seconds to convert - * @return string representation in a locale depending format - * - * @since 3.4 - */ - TDEIO_EXPORT TQString convertSeconds( unsigned int seconds ); - - /** - * Calculates remaining time from total size, processed size and speed. - * Warning: As TQTime is limited to 23:59:59, use calculateRemainingSeconds() instead - * - * @param totalSize total size in bytes - * @param processedSize processed size in bytes - * @param speed speed in bytes per second - * @return calculated remaining time - */ - TDEIO_EXPORT TQTime calculateRemaining( TDEIO::filesize_t totalSize, TDEIO::filesize_t processedSize, TDEIO::filesize_t speed ) KDE_DEPRECATED; - - /** - * Helper for showing information about a set of files and directories - * @param items the number of items (= @p files + @p dirs + number of symlinks :) - * @param files the number of files - * @param dirs the number of dirs - * @param size the sum of the size of the @p files - * @param showSize whether to show the size in the result - * @return the summary string - */ - TDEIO_EXPORT TQString itemsSummaryString(uint items, uint files, uint dirs, TDEIO::filesize_t size, bool showSize); - - /** - * Encodes (from the text displayed to the real filename) - * This translates % into %% and / into %2f - * Used by TDEIO::link, for instance. - * @param str the file name to encode - * @return the encoded file name - */ - TDEIO_EXPORT TQString encodeFileName( const TQString & str ); - /** - * Decodes (from the filename to the text displayed) - * This translates %2[fF] into / and %% into % - * @param str the file name to decode - * @return the decoded file name - */ - TDEIO_EXPORT TQString decodeFileName( const TQString & str ); - - /** - * Commands that can be invoked by a job. - */ - enum Command { - CMD_HOST = '0', // 48 - CMD_CONNECT = '1', // 49 - CMD_DISCONNECT = '2', // 50 - CMD_SLAVE_STATUS = '3', // 51 - CMD_SLAVE_CONNECT = '4', // 52 - CMD_SLAVE_HOLD = '5', // 53 - CMD_NONE = 'A', // 65 - CMD_TESTDIR = 'B', // 66 - CMD_GET = 'C', // 67 - CMD_PUT = 'D', // 68 - CMD_STAT = 'E', // 69 - CMD_MIMETYPE = 'F', // 70 - CMD_LISTDIR = 'G', // 71 - CMD_MKDIR = 'H', // 72 - CMD_RENAME = 'I', // 73 - CMD_COPY = 'J', // 74 - CMD_DEL = 'K', // 75 - CMD_CHMOD = 'L', // 76 - CMD_SPECIAL = 'M', // 77 - CMD_USERPASS = 'N', // 78 - CMD_REPARSECONFIGURATION = 'O', // 79 - CMD_META_DATA = 'P', // 80 - CMD_SYMLINK = 'Q', // 81 - CMD_SUBURL = 'R', // 82 Inform the slave about the url it is streaming on. - CMD_MESSAGEBOXANSWER = 'S', // 83 - CMD_RESUMEANSWER = 'T', // 84 - CMD_CONFIG = 'U', // 85 - CMD_MULTI_GET = 'V', // 86 - CMD_LOCALURL = 'W' // 87 - // Add new ones here once a release is done, to avoid breaking binary compatibility. - // Note that protocol-specific commands shouldn't be added here, but should use special. - }; - - /** - * Error codes that can be emitted by KIO. - */ - enum Error { - ERR_CANNOT_OPEN_FOR_READING = 1, - ERR_CANNOT_OPEN_FOR_WRITING = 2, - ERR_CANNOT_LAUNCH_PROCESS = 3, - ERR_INTERNAL = 4, - ERR_MALFORMED_URL = 5, - ERR_UNSUPPORTED_PROTOCOL = 6, - ERR_NO_SOURCE_PROTOCOL = 7, - ERR_UNSUPPORTED_ACTION = 8, - ERR_IS_DIRECTORY = 9, // ... where a file was expected - ERR_IS_FILE = 10, // ... where a directory was expected (e.g. listing) - ERR_DOES_NOT_EXIST = 11, - ERR_FILE_ALREADY_EXIST = 12, - ERR_DIR_ALREADY_EXIST = 13, - ERR_UNKNOWN_HOST = 14, - ERR_ACCESS_DENIED = 15, - ERR_WRITE_ACCESS_DENIED = 16, - ERR_CANNOT_ENTER_DIRECTORY = 17, - ERR_PROTOCOL_IS_NOT_A_FILESYSTEM = 18, - ERR_CYCLIC_LINK = 19, - ERR_USER_CANCELED = 20, - ERR_CYCLIC_COPY = 21, - ERR_COULD_NOT_CREATE_SOCKET = 22, // KDE4: s/COULD_NOT/CANNOT/ or the other way round - ERR_COULD_NOT_CONNECT = 23, - ERR_CONNECTION_BROKEN = 24, - ERR_NOT_FILTER_PROTOCOL = 25, - ERR_COULD_NOT_MOUNT = 26, - ERR_COULD_NOT_UNMOUNT = 27, - ERR_COULD_NOT_READ = 28, - ERR_COULD_NOT_WRITE = 29, - ERR_COULD_NOT_BIND = 30, - ERR_COULD_NOT_LISTEN = 31, - ERR_COULD_NOT_ACCEPT = 32, - ERR_COULD_NOT_LOGIN = 33, - ERR_COULD_NOT_STAT = 34, - ERR_COULD_NOT_CLOSEDIR = 35, - ERR_COULD_NOT_MKDIR = 37, - ERR_COULD_NOT_RMDIR = 38, - ERR_CANNOT_RESUME = 39, - ERR_CANNOT_RENAME = 40, - ERR_CANNOT_CHMOD = 41, - ERR_CANNOT_DELETE = 42, - // The text argument is the protocol that the dead slave supported. - // This means for example: file, ftp, http, ... - ERR_SLAVE_DIED = 43, - ERR_OUT_OF_MEMORY = 44, - ERR_UNKNOWN_PROXY_HOST = 45, - ERR_COULD_NOT_AUTHENTICATE = 46, - ERR_ABORTED = 47, // Action got aborted from application side - ERR_INTERNAL_SERVER = 48, - ERR_SERVER_TIMEOUT = 49, - ERR_SERVICE_NOT_AVAILABLE = 50, - ERR_UNKNOWN = 51, - // (was a warning) ERR_CHECKSUM_MISMATCH = 52, - ERR_UNKNOWN_INTERRUPT = 53, - ERR_CANNOT_DELETE_ORIGINAL = 54, - ERR_CANNOT_DELETE_PARTIAL = 55, - ERR_CANNOT_RENAME_ORIGINAL = 56, - ERR_CANNOT_RENAME_PARTIAL = 57, - ERR_NEED_PASSWD = 58, - ERR_CANNOT_SYMLINK = 59, - ERR_NO_CONTENT = 60, // Action succeeded but no content will follow. - ERR_DISK_FULL = 61, - ERR_IDENTICAL_FILES = 62, // src==dest when moving/copying - ERR_SLAVE_DEFINED = 63, // for slave specified errors that can be - // rich text. Email links will be handled - // by the standard email app and all hrefs - // will be handled by the standard browser. - // bernd@tdevelop.org -*/ - - -#endif diff --git a/kio/kio/ktraderparse.cpp b/kio/kio/ktraderparse.cpp deleted file mode 100644 index 627791c00..000000000 --- a/kio/kio/ktraderparse.cpp +++ /dev/null @@ -1,159 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 1998, 1999 Torben Weis - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include -#include - -// TODO: Torben: On error free memory! - -extern "C" -{ -#include "ktraderparse.h" -} - -#include "ktraderparsetree.h" -#include - -using namespace TDEIO; - -static ParseTreeBase::Ptr *pTree = 0; -static const char* sCode = 0; - -ParseTreeBase::Ptr TDEIO::parseConstraints( const TQString& _constr ) -{ - TQCString str = _constr.utf8(); - sCode = str.data(); - KTraderParse_mainParse( sCode ); - sCode = 0; - assert( pTree ); - return *pTree; -} - -ParseTreeBase::Ptr TDEIO::parsePreferences( const TQString& _prefs ) -{ - TQCString str = _prefs.utf8(); - sCode = str.data(); - KTraderParse_mainParse( sCode ); - sCode = 0; - assert( pTree ); - return *pTree; -} - -void KTraderParse_setParseTree( void *_ptr1 ) -{ - if ( !pTree ) - pTree = new ParseTreeBase::Ptr; // ### leak; should use KStaticDeleter - *pTree = static_cast( _ptr1 ); -} - - -void KTraderParse_error( const char* err ) -{ - kdWarning(7014) << "Parsing '" << sCode << "' gave " << err << endl; -} - -void* KTraderParse_newOR( void *_ptr1, void *_ptr2 ) -{ - return new ParseTreeOR( (ParseTreeBase*)_ptr1, (ParseTreeBase*)_ptr2 ); -} - -void* KTraderParse_newAND( void *_ptr1, void *_ptr2 ) -{ - return new ParseTreeAND( (ParseTreeBase*)_ptr1, (ParseTreeBase*)_ptr2 ); -} - -void* KTraderParse_newCMP( void *_ptr1, void *_ptr2, int _i ) -{ - return new ParseTreeCMP( (ParseTreeBase*)_ptr1, (ParseTreeBase*)_ptr2, _i ); -} - -void* KTraderParse_newIN( void *_ptr1, void *_ptr2 ) -{ - return new ParseTreeIN( (ParseTreeBase*)_ptr1, (ParseTreeBase*)_ptr2 ); -} - -void* KTraderParse_newMATCH( void *_ptr1, void *_ptr2 ) -{ - return new ParseTreeMATCH( (ParseTreeBase*)_ptr1, (ParseTreeBase*)_ptr2 ); -} - -void* KTraderParse_newCALC( void *_ptr1, void *_ptr2, int _i ) -{ - return new ParseTreeCALC( (ParseTreeBase*)_ptr1, (ParseTreeBase*)_ptr2, _i ); -} - -void* KTraderParse_newBRACKETS( void *_ptr1 ) -{ - return new ParseTreeBRACKETS( (ParseTreeBase*)_ptr1 ); -} - -void* KTraderParse_newNOT( void *_ptr1 ) -{ - return new ParseTreeNOT( (ParseTreeBase*)_ptr1 ); -} - -void* KTraderParse_newEXIST( char *_ptr1 ) -{ - ParseTreeEXIST *t = new ParseTreeEXIST( _ptr1 ); - free(_ptr1); - return t; -} - -void* KTraderParse_newID( char *_ptr1 ) -{ - ParseTreeID *t = new ParseTreeID( _ptr1 ); - free(_ptr1); - return t; -} - -void* KTraderParse_newSTRING( char *_ptr1 ) -{ - ParseTreeSTRING *t = new ParseTreeSTRING( _ptr1 ); - free(_ptr1); - return t; -} - -void* KTraderParse_newNUM( int _i ) -{ - return new ParseTreeNUM( _i ); -} - -void* KTraderParse_newFLOAT( float _f ) -{ - return new ParseTreeDOUBLE( _f ); -} - -void* KTraderParse_newBOOL( char _b ) -{ - return new ParseTreeBOOL( (bool)_b ); -} - -void* KTraderParse_newMAX2( char *_id ) -{ - ParseTreeMAX2 *t = new ParseTreeMAX2( _id ); - free(_id); - return t; -} - -void* KTraderParse_newMIN2( char *_id ) -{ - ParseTreeMIN2 *t = new ParseTreeMIN2( _id ); - free(_id); - return t; -} diff --git a/kio/kio/ktraderparse.h b/kio/kio/ktraderparse.h deleted file mode 100644 index bfeb15fe0..000000000 --- a/kio/kio/ktraderparse.h +++ /dev/null @@ -1,52 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 1998, 1999 Torben Weis - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef __parse_h__ -#define __parse_h__ - -/* - * Functions definition for yacc - */ -void KTraderParse_mainParse( const char *_code ); -void KTraderParse_setParseTree( void *_ptr1 ); -void KTraderParse_error( const char* err ); -void* KTraderParse_newOR( void *_ptr1, void *_ptr2 ); -void* KTraderParse_newAND( void *_ptr1, void *_ptr2 ); -void* KTraderParse_newCMP( void *_ptr1, void *_ptr2, int _i ); -void* KTraderParse_newIN( void *_ptr1, void *_ptr2 ); -void* KTraderParse_newMATCH( void *_ptr1, void *_ptr2 ); -void* KTraderParse_newCALC( void *_ptr1, void *_ptr2, int _i ); -void* KTraderParse_newBRACKETS( void *_ptr1 ); -void* KTraderParse_newNOT( void *_ptr1 ); -void* KTraderParse_newEXIST( char *_ptr1 ); -void* KTraderParse_newID( char *_ptr1 ); -void* KTraderParse_newSTRING( char *_ptr1 ); -void* KTraderParse_newNUM( int _i ); -void* KTraderParse_newFLOAT( float _f ); -void* KTraderParse_newBOOL( char _b ); - -void* KTraderParse_newWITH( void *_ptr1 ); -void* KTraderParse_newMAX( void *_ptr1 ); -void* KTraderParse_newMIN( void *_ptr1 ); -void* KTraderParse_newMAX2( char *_id ); -void* KTraderParse_newMIN2( char *_id ); -void* KTraderParse_newFIRST(); -void* KTraderParse_newRANDOM(); - -#endif diff --git a/kio/kio/ktraderparsetree.cpp b/kio/kio/ktraderparsetree.cpp deleted file mode 100644 index 0a04b7918..000000000 --- a/kio/kio/ktraderparsetree.cpp +++ /dev/null @@ -1,714 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 1998, 1999 Torben Weis - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include "ktraderparsetree.h" - -namespace TDEIO { - -bool ParseTreeOR::eval( ParseContext *_context ) const -{ - ParseContext c1( _context ); - ParseContext c2( _context ); - -// don't evaluate both expressions but return immediately -// if the first one of them succeeds. Otherwise queries like -// ((not exist Blah) or (Blah == 'Foo')) do not work, because -// the evaluation of the second term ends up in a fatal error -// (Simon) - - if ( !m_pLeft->eval( &c1 ) ) - return false; - - if ( c1.type != ParseContext::T_BOOL ) - return false; - - _context->b = c1.b; - _context->type = ParseContext::T_BOOL; - if ( c1.b ) - return true; - - if ( !m_pRight->eval( &c2 ) ) - return false; - - if ( c2.type != ParseContext::T_BOOL ) - return false; - - _context->b = ( c1.b || c2.b ); - _context->type = ParseContext::T_BOOL; - - return true; -} - -bool ParseTreeAND::eval( ParseContext *_context ) const -{ - _context->type = ParseContext::T_BOOL; - - ParseContext c1( _context ); - ParseContext c2( _context ); - if ( !m_pLeft->eval( &c1 ) ) - return false; - if ( c1.type != ParseContext::T_BOOL ) - return false; - if ( !c1.b ) - { - _context->b = false; - return true; - } - - if ( !m_pRight->eval( &c2 ) ) - return false; - if ( c2.type != ParseContext::T_BOOL ) - return false; - - _context->b = ( c1.b && c2.b ); - - return true; -} - -bool ParseTreeCALC::eval( ParseContext *_context ) const -{ - ParseContext c1( _context ); - ParseContext c2( _context ); - if ( !m_pLeft->eval( &c1 ) ) - return false; - if ( !m_pRight->eval( &c2 ) ) - return false; - - // Bool extension - if ( c1.type != ParseContext::T_NUM && c1.type != ParseContext::T_DOUBLE && c1.type != ParseContext::T_BOOL ) - return false; - // Bool extension - if ( c2.type != ParseContext::T_NUM && c2.type != ParseContext::T_DOUBLE && c2.type != ParseContext::T_BOOL ) - return false; - // Bool extension - if ( c1.type == ParseContext::T_BOOL && c2.type == ParseContext::T_BOOL ) - return false; - - /** - * Make types compatible - */ - if ( c1.type == ParseContext::T_NUM && c2.type == ParseContext::T_DOUBLE ) - { - c1.type = ParseContext::T_DOUBLE; - c1.f = (double)c1.i; - } - else if ( c1.type == ParseContext::T_DOUBLE && c2.type == ParseContext::T_NUM ) - { - c2.type = ParseContext::T_DOUBLE; - c2.f = (double)c2.i; - } - // Bool extension - else if ( c1.type == ParseContext::T_BOOL && c2.type == ParseContext::T_NUM ) - { - c1.type = ParseContext::T_NUM; - if ( c1.b ) - c1.i = 1; - else - c1.i = -1; - } - // Bool extension - else if ( c1.type == ParseContext::T_BOOL && c2.type == ParseContext::T_DOUBLE ) - { - c1.type = ParseContext::T_DOUBLE; - if ( c1.b ) - c1.f = 1.0; - else - c1.f = -1.0; - } - // Bool extension - else if ( c1.type == ParseContext::T_NUM && c2.type == ParseContext::T_BOOL ) - { - c2.type = ParseContext::T_NUM; - if ( c2.b ) - c2.i = 1; - else - c2.i = -1; - } - // Bool extension - else if ( c1.type == ParseContext::T_DOUBLE && c2.type == ParseContext::T_BOOL ) - { - c2.type = ParseContext::T_DOUBLE; - if ( c2.b ) - c2.f = 1.0; - else - c2.f = -1.0; - } - - _context->type = c1.type; - - /** - * Calculate - */ - switch( m_cmd ) - { - case 1: /* Add */ - if ( c1.type == ParseContext::T_DOUBLE ) - { - _context->f = ( c1.f + c2.f ); - return true; - } - if ( c1.type == ParseContext::T_NUM ) - { - _context->i = ( c1.i + c2.i ); - return true; - } - break; - case 2: /* Sub */ - if ( c1.type == ParseContext::T_DOUBLE ) - { - _context->f = ( c1.f - c2.f ); - return true; - } - if ( c1.type == ParseContext::T_NUM ) - { - _context->i = ( c1.i - c2.i ); - return true; - } - break; - case 3: /* Mul */ - if ( c1.type == ParseContext::T_DOUBLE ) - { - //cout << "Double Mult" << endl; - _context->f = ( c1.f * c2.f ); - return true; - } - if ( c1.type == ParseContext::T_NUM ) - { - _context->i = ( c1.i * c2.i ); - return true; - } - break; - case 4: /* Div */ - if ( c1.type == ParseContext::T_DOUBLE ) - { - _context->f = ( c1.f / c2.f ); - return true; - } - if ( c1.type == ParseContext::T_NUM ) - { - _context->i = ( c1.i / c2.i ); - return true; - } - break; - } - - return false; -} - -bool ParseTreeCMP::eval( ParseContext *_context ) const -{ - //cout << "CMP 1 cmd=" << m_cmd << endl; - ParseContext c1( _context ); - ParseContext c2( _context ); - if ( !m_pLeft->eval( &c1 ) ) - return false; - - if ( !m_pRight->eval( &c2 ) ) - return false; - - /** - * Make types compatible - */ - if ( c1.type == ParseContext::T_NUM && c2.type == ParseContext::T_DOUBLE ) - { - c1.type = ParseContext::T_DOUBLE; - c1.f = (double)c1.i; - } - else if ( c1.type == ParseContext::T_DOUBLE && c2.type == ParseContext::T_NUM ) - { - c2.type = ParseContext::T_DOUBLE; - c2.f = (double)c2.i; - } - - /** - * Compare - */ - _context->type = ParseContext::T_BOOL; - - switch( m_cmd ) - { - case 1: /* EQ */ - if ( c1.type != c2.type ) - { - _context->b = false; - return true; - } - if ( c1.type == ParseContext::T_STRING ) - { - _context->b = ( c1.str == c2.str ); - return true; - } - if ( c1.type == ParseContext::T_BOOL ) - { - _context->b = ( c1.b == c2.b ); - return true; - } - if ( c1.type == ParseContext::T_DOUBLE ) - { - _context->b = ( c1.f == c2.f ); - return true; - } - if ( c1.type == ParseContext::T_NUM ) - { - _context->b = ( c1.i == c2.i ); - return true; - } - break; - case 2: /* NEQ */ - if ( c1.type != c2.type ) - { - _context->b = true; - return true; - } - if ( c1.type == ParseContext::T_STRING ) - { - _context->b = ( c1.str != c2.str ); - return true; - } - if ( c1.type == ParseContext::T_BOOL ) - { - _context->b = ( c1.b != c2.b ); - return true; - } - if ( c1.type == ParseContext::T_DOUBLE ) - { - _context->b = ( c1.f != c2.f ); - return true; - } - if ( c1.type == ParseContext::T_NUM ) - { - _context->b = ( c1.i != c2.i ); - return true; - } - break; - case 3: /* GEQ */ - if ( c1.type != c2.type ) - { - _context->b = false; - return true; - } - if ( c1.type == ParseContext::T_DOUBLE ) - { - _context->b = ( c1.f >= c2.f ); - return true; - } - if ( c1.type == ParseContext::T_NUM ) - { - _context->b = ( c1.i >= c2.i ); - return true; - } - _context->b = false; - return true; - - case 4: /* LEQ */ - if ( c1.type != c2.type ) - { - _context->b = false; - return true; - } - if ( c1.type == ParseContext::T_DOUBLE ) - { - _context->b = ( c1.f <= c2.f ); - return true; - } - if ( c1.type == ParseContext::T_NUM ) - { - _context->b = ( c1.i <= c2.i ); - return true; - } - _context->b = false; - return true; - - case 5: /* < */ - if ( c1.type != c2.type ) - { - _context->b = false; - return true; - } - if ( c1.type == ParseContext::T_DOUBLE ) - { - _context->b = ( c1.f < c2.f ); - return true; - } - if ( c1.type == ParseContext::T_NUM ) - { - _context->b = ( c1.i < c2.i ); - return true; - } - _context->b = false; - return true; - - case 6: /* > */ - if ( c1.type != c2.type ) - { - _context->b = false; - return true; - } - if ( c1.type == ParseContext::T_DOUBLE ) - { - _context->b = ( c1.f > c2.f ); - return true; - } - if ( c1.type == ParseContext::T_NUM ) - { - _context->b = ( c1.i > c2.i ); - return true; - } - _context->b = false; - return true; - - } - - return false; -} - -bool ParseTreeNOT::eval( ParseContext *_context ) const -{ - ParseContext c1( _context ); - if ( !m_pLeft->eval( &c1 ) ) - return false; - if ( c1.type != ParseContext::T_BOOL ) - return false; - - _context->b = !c1.b; - _context->type = ParseContext::T_BOOL; - - return true; -} - -bool ParseTreeEXIST::eval( ParseContext *_context ) const -{ - _context->type = ParseContext::T_BOOL; - - TQVariant prop = _context->service->property( m_id ); - _context->b = prop.isValid(); - - return true; -} - -bool ParseTreeMATCH::eval( ParseContext *_context ) const -{ - _context->type = ParseContext::T_BOOL; - - ParseContext c1( _context ); - ParseContext c2( _context ); - if ( !m_pLeft->eval( &c1 ) ) - return false; - if ( !m_pRight->eval( &c2 ) ) - return false; - if ( c1.type != ParseContext::T_STRING || c2.type != ParseContext::T_STRING ) - return false; - - _context->b = ( c2.str.find( c1.str ) != -1 ); - - return true; -} - -bool ParseTreeIN::eval( ParseContext *_context ) const -{ - _context->type = ParseContext::T_BOOL; - - ParseContext c1( _context ); - ParseContext c2( _context ); - if ( !m_pLeft->eval( &c1 ) ) - return false; - if ( !m_pRight->eval( &c2 ) ) - return false; - - if ( (c1.type == ParseContext::T_NUM) && - (c2.type == ParseContext::T_SEQ) && - ((*(c2.seq.begin())).type() == TQVariant::Int)) { - - TQValueList::ConstIterator it = c2.seq.begin(); - TQValueList::ConstIterator end = c2.seq.end(); - _context->b = false; - for (; it != end; it++) - if ((*it).type() == TQVariant::Int && - (*it).toInt() == c1.i) { - _context->b = true; - break; - } - return true; - } - - if ( c1.type == ParseContext::T_DOUBLE && - c2.type == ParseContext::T_SEQ && - (*(c2.seq.begin())).type() == TQVariant::Double) { - - TQValueList::ConstIterator it = c2.seq.begin(); - TQValueList::ConstIterator end = c2.seq.end(); - _context->b = false; - for (; it != end; it++) - if ((*it).type() == TQVariant::Double && - (*it).toDouble() == c1.i) { - _context->b = true; - break; - } - return true; - } - - if ( c1.type == ParseContext::T_STRING && c2.type == ParseContext::T_STR_SEQ ) - { - _context->b = ( c2.strSeq.find( c1.str ) != c2.strSeq.end() ); - return true; - } - - return false; -} - -bool ParseTreeID::eval( ParseContext *_context ) const -{ - TQVariant prop = _context->service->property( m_str ); - if ( !prop.isValid() ) - return false; - - if ( prop.type() == TQVariant::String ) - { - _context->str = prop.toString(); - _context->type = ParseContext::T_STRING; - return true; - } - - if ( prop.type() == TQVariant::Int ) - { - _context->i = prop.toInt(); - _context->type = ParseContext::T_NUM; - return true; - } - - if ( prop.type() == TQVariant::Bool ) - { - _context->b = prop.toBool(); - _context->type = ParseContext::T_BOOL; - return true; - } - - if ( prop.type() == TQVariant::Double ) - { - _context->f = prop.toDouble(); - _context->type = ParseContext::T_DOUBLE; - return true; - } - - if ( prop.type() == TQVariant::List ) - { - _context->seq = prop.toList(); - _context->type = ParseContext::T_SEQ; - return true; - } - - if ( prop.type() == TQVariant::StringList ) - { - _context->strSeq = prop.toStringList(); - _context->type = ParseContext::T_STR_SEQ; - return true; - } - - // Value has unknown type - return false; -} - -bool ParseTreeMIN2::eval( ParseContext *_context ) const -{ - _context->type = ParseContext::T_DOUBLE; - - TQVariant prop = _context->service->property( m_strId ); - if ( !prop.isValid() ) - return false; - - if ( !_context->initMaxima( m_strId ) ) - return false; - - TQMap::Iterator it = _context->maxima.find( m_strId ); - if ( it == _context->maxima.end() ) - return false; - - if ( prop.type() == TQVariant::Int && it.data().type == PreferencesMaxima::PM_INT ) - { - _context->f = (double)( prop.toInt() - it.data().iMin ) / - (double)(it.data().iMax - it.data().iMin ) * (-2.0) + 1.0; - return true; - } - else if ( prop.type() == TQVariant::Double && it.data().type == PreferencesMaxima::PM_DOUBLE ) - { - _context->f = ( prop.toDouble() - it.data().fMin ) / (it.data().fMax - it.data().fMin ) - * (-2.0) + 1.0; - return true; - } - - return false; -} - -bool ParseTreeMAX2::eval( ParseContext *_context ) const -{ - _context->type = ParseContext::T_DOUBLE; - - TQVariant prop = _context->service->property( m_strId ); - if ( !prop.isValid() ) - return false; - - // Create extrema - if ( !_context->initMaxima( m_strId ) ) - return false; - - // Find extrema - TQMap::Iterator it = _context->maxima.find( m_strId ); - if ( it == _context->maxima.end() ) - return false; - - if ( prop.type() == TQVariant::Int && it.data().type == PreferencesMaxima::PM_INT ) - { - _context->f = (double)( prop.toInt() - it.data().iMin ) / - (double)(it.data().iMax - it.data().iMin ) * 2.0 - 1.0; - return true; - } - else if ( prop.type() == TQVariant::Double && it.data().type == PreferencesMaxima::PM_DOUBLE ) - { - _context->f = ( prop.toDouble() - it.data().fMin ) / - (it.data().fMax - it.data().fMin ) * 2.0 - 1.0; - return true; - } - - return false; -} - -int matchConstraint( const ParseTreeBase *_tree, const KService::Ptr &_service, - const KServiceTypeProfile::OfferList& _list ) -{ - // Empty tree matches always - if ( !_tree ) - return 1; - - TQMap maxima; - ParseContext c( _service, _list, maxima ); - - // Error during evaluation ? - if ( !_tree->eval( &c ) ) - return -1; - - // Did we get a bool ? - if ( c.type != ParseContext::T_BOOL ) - return -1; - - return ( c.b ? 1 : 0 ); -} - -PreferencesReturn matchPreferences( const ParseTreeBase *_tree, const KService::Ptr &_service, - const KServiceTypeProfile::OfferList& _list ) -{ - // By default: error - PreferencesReturn ret; - - if ( !_tree ) - return ret; - - TQMap maxima; - ParseContext c( _service, _list, maxima ); - - if ( !_tree->eval( &c ) ) - return ret; - - // Did we get a numeric return value ? - if ( c.type == ParseContext::T_NUM ) - { - ret.type = PreferencesReturn::PRT_DOUBLE; - ret.f = (double)c.i; - } - else if ( c.type == ParseContext::T_DOUBLE ) - { - ret.type = PreferencesReturn::PRT_DOUBLE; - ret.f = c.f; - } - - return ret; -} - -bool ParseContext::initMaxima( const TQString& _prop ) -{ - // Is the property known ? - TQVariant prop = service->property( _prop ); - if ( !prop.isValid() ) - return false; - - // Numeric ? - if ( prop.type() != TQVariant::Int && prop.type() != TQVariant::Double ) - return false; - - // Did we cache the result ? - TQMap::Iterator it = maxima.find( _prop ); - if ( it != maxima.end() ) - return ( it.data().type == PreferencesMaxima::PM_DOUBLE || - it.data().type == PreferencesMaxima::PM_INT ); - - // Double or Int ? - PreferencesMaxima extrema; - if ( prop.type() == TQVariant::Int ) - extrema.type = PreferencesMaxima::PM_INVALID_INT; - else - extrema.type = PreferencesMaxima::PM_INVALID_DOUBLE; - - // Iterate over all offers - KServiceTypeProfile::OfferList::ConstIterator oit = offers.begin(); - for( ; oit != offers.end(); ++oit ) - { - TQVariant p = (*oit).service()->property( _prop ); - if ( p.isValid() ) - { - // Determine new maximum/minimum - if ( extrema.type == PreferencesMaxima::PM_INVALID_INT ) - { - extrema.type = PreferencesMaxima::PM_INT; - extrema.iMin = p.toInt(); - extrema.iMax = p.toInt(); - } - // Correct existing extrema - else if ( extrema.type == PreferencesMaxima::PM_INT ) - { - if ( p.toInt() < extrema.iMin ) - extrema.iMin = p.toInt(); - if ( p.toInt() > extrema.iMax ) - extrema.iMax = p.toInt(); - } - // Determine new maximum/minimum - else if ( extrema.type == PreferencesMaxima::PM_INVALID_DOUBLE ) - { - extrema.type = PreferencesMaxima::PM_DOUBLE; - extrema.fMin = p.toDouble(); - extrema.fMax = p.toDouble(); - } - // Correct existing extrema - else if ( extrema.type == PreferencesMaxima::PM_DOUBLE ) - { - if ( p.toDouble() < it.data().fMin ) - extrema.fMin = p.toDouble(); - if ( p.toDouble() > it.data().fMax ) - extrema.fMax = p.toDouble(); - } - } - } - - // Cache the result - maxima.insert( _prop, extrema ); - - // Did we succeed ? - return ( extrema.type == PreferencesMaxima::PM_DOUBLE || - extrema.type == PreferencesMaxima::PM_INT ); -} - -} diff --git a/kio/kio/ktraderparsetree.h b/kio/kio/ktraderparsetree.h deleted file mode 100644 index a08b61a5a..000000000 --- a/kio/kio/ktraderparsetree.h +++ /dev/null @@ -1,371 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 1998, 1999 Torben Weis - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef __parse_tree_h__ -#define __parse_tree_h__ - -#include -#include -#include -#include -#include - -#include -#include - -#include "ktrader.h" - -namespace TDEIO { - -class ParseTreeBase; - -/** \internal */ -struct TDEIO_EXPORT PreferencesReturn -{ - enum Type { PRT_DOUBLE, PRT_ERROR }; - - PreferencesReturn() { type = PRT_ERROR; } - - PreferencesReturn( const PreferencesReturn& _r ) - { - type = _r.type; - f = _r.f; - } - - Type type; - double f; -}; - - -/** - * @internal - * @return 0 => Does not match - * 1 => Does match - * <0 => Error - */ -TDEIO_EXPORT int matchConstraint( const ParseTreeBase *_tree, const KService::Ptr &, - const KServiceTypeProfile::OfferList& ); - -/** - * @internal - * @return 1 on success or <0 on Error - */ -TDEIO_EXPORT PreferencesReturn matchPreferences( const ParseTreeBase *_tree, const KService::Ptr &, - const KServiceTypeProfile::OfferList& ); - -/** - * @internal - */ -struct TDEIO_EXPORT PreferencesMaxima -{ - enum Type { PM_ERROR, PM_INVALID_INT, PM_INVALID_DOUBLE, PM_DOUBLE, PM_INT }; - - Type type; - int iMax; - int iMin; - double fMax; - double fMin; -}; - -/** - * @internal - */ -class TDEIO_EXPORT ParseContext -{ -public: - /** - * This is NOT a copy constructor. - */ - ParseContext( const ParseContext* _ctx ) : service( _ctx->service ), maxima( _ctx->maxima ), - offers( _ctx->offers ) {} - ParseContext( const KService::Ptr & _service, const KServiceTypeProfile::OfferList& _offers, - TQMap& _m ) - : service( _service ), maxima( _m ), offers( _offers ) {} - - bool initMaxima( const TQString& _prop); - - enum Type { T_STRING = 1, T_DOUBLE = 2, T_NUM = 3, T_BOOL = 4, - T_STR_SEQ = 5, T_SEQ = 6 }; - - TQString str; - int i; - double f; - bool b; - TQValueList seq; - TQStringList strSeq; - Type type; - - KService::Ptr service; - - TQMap& maxima; - const KServiceTypeProfile::OfferList& offers; -}; - -/** - * @internal - */ -class TDEIO_EXPORT ParseTreeBase : public KShared -{ -public: - typedef KSharedPtr Ptr; - ParseTreeBase() { } - - virtual bool eval( ParseContext *_context ) const = 0; -protected: - virtual ~ParseTreeBase() { }; -}; - -TDEIO_EXPORT ParseTreeBase::Ptr parseConstraints( const TQString& _constr ); -TDEIO_EXPORT ParseTreeBase::Ptr parsePreferences( const TQString& _prefs ); - -/** - * @internal - */ -class TDEIO_EXPORT ParseTreeOR : public ParseTreeBase -{ -public: - ParseTreeOR( ParseTreeBase *_ptr1, ParseTreeBase *_ptr2 ) { m_pLeft = _ptr1; m_pRight = _ptr2; } - - bool eval( ParseContext *_context ) const; - -protected: - ParseTreeBase::Ptr m_pLeft; - ParseTreeBase::Ptr m_pRight; -}; - -/** - * @internal - */ -class TDEIO_EXPORT ParseTreeAND : public ParseTreeBase -{ -public: - ParseTreeAND( ParseTreeBase *_ptr1, ParseTreeBase *_ptr2 ) { m_pLeft = _ptr1; m_pRight = _ptr2; } - - bool eval( ParseContext *_context ) const; - -protected: - ParseTreeBase::Ptr m_pLeft; - ParseTreeBase::Ptr m_pRight; -}; - -/** - * @internal - */ -class TDEIO_EXPORT ParseTreeCMP : public ParseTreeBase -{ -public: - ParseTreeCMP( ParseTreeBase *_ptr1, ParseTreeBase *_ptr2, int _i ) { m_pLeft = _ptr1; m_pRight = _ptr2; m_cmd = _i; } - - bool eval( ParseContext *_context ) const; - -protected: - ParseTreeBase::Ptr m_pLeft; - ParseTreeBase::Ptr m_pRight; - int m_cmd; -}; - -/** - * @internal - */ -class TDEIO_EXPORT ParseTreeIN : public ParseTreeBase -{ -public: - ParseTreeIN( ParseTreeBase *_ptr1, ParseTreeBase *_ptr2 ) { m_pLeft = _ptr1; m_pRight = _ptr2; } - - bool eval( ParseContext *_context ) const; - -protected: - ParseTreeBase::Ptr m_pLeft; - ParseTreeBase::Ptr m_pRight; -}; - -/** - * @internal - */ -class TDEIO_EXPORT ParseTreeMATCH : public ParseTreeBase -{ -public: - ParseTreeMATCH( ParseTreeBase *_ptr1, ParseTreeBase *_ptr2 ) { m_pLeft = _ptr1; m_pRight = _ptr2; } - - bool eval( ParseContext *_context ) const; - -protected: - ParseTreeBase::Ptr m_pLeft; - ParseTreeBase::Ptr m_pRight; -}; - -/** - * @internal - */ -class TDEIO_EXPORT ParseTreeCALC : public ParseTreeBase -{ -public: - ParseTreeCALC( ParseTreeBase *_ptr1, ParseTreeBase *_ptr2, int _i ) { m_pLeft = _ptr1; m_pRight = _ptr2; m_cmd = _i; } - - bool eval( ParseContext *_context ) const; - -protected: - ParseTreeBase::Ptr m_pLeft; - ParseTreeBase::Ptr m_pRight; - int m_cmd; -}; - -/** - * @internal - */ -class TDEIO_EXPORT ParseTreeBRACKETS : public ParseTreeBase -{ -public: - ParseTreeBRACKETS( ParseTreeBase *_ptr ) { m_pLeft = _ptr; } - - bool eval( ParseContext *_context ) const { return m_pLeft->eval( _context ); } - -protected: - ParseTreeBase::Ptr m_pLeft; -}; - -/** - * @internal - */ -class TDEIO_EXPORT ParseTreeNOT : public ParseTreeBase -{ -public: - ParseTreeNOT( ParseTreeBase *_ptr ) { m_pLeft = _ptr; } - - bool eval( ParseContext *_context ) const; - -protected: - ParseTreeBase::Ptr m_pLeft; -}; - -/** - * @internal - */ -class TDEIO_EXPORT ParseTreeEXIST : public ParseTreeBase -{ -public: - ParseTreeEXIST( const char *_id ) { m_id = _id; } - - bool eval( ParseContext *_context ) const; - -protected: - TQString m_id; -}; - -/** - * @internal - */ -class TDEIO_EXPORT ParseTreeID : public ParseTreeBase -{ -public: - ParseTreeID( const char *arg ) { m_str = arg; } - - bool eval( ParseContext *_context ) const; - -protected: - TQString m_str; -}; - -/** - * @internal - */ -class TDEIO_EXPORT ParseTreeSTRING : public ParseTreeBase -{ -public: - ParseTreeSTRING( const char *arg ) { m_str = arg; } - - bool eval( ParseContext *_context ) const { _context->type = ParseContext::T_STRING; _context->str = m_str; return true; } - -protected: - TQString m_str; -}; - -/** - * @internal - */ -class TDEIO_EXPORT ParseTreeNUM : public ParseTreeBase -{ -public: - ParseTreeNUM( int arg ) { m_int = arg; } - - bool eval( ParseContext *_context ) const { _context->type = ParseContext::T_NUM; _context->i = m_int; return true; } - -protected: - int m_int; -}; - -/** - * @internal - */ -class TDEIO_EXPORT ParseTreeDOUBLE : public ParseTreeBase -{ -public: - ParseTreeDOUBLE( double arg ) { m_double = arg; } - - bool eval( ParseContext *_context ) const { _context->type = ParseContext::T_DOUBLE; _context->f = m_double; return true; } - -protected: - double m_double; -}; - -/** - * @internal - */ -class TDEIO_EXPORT ParseTreeBOOL : public ParseTreeBase -{ -public: - ParseTreeBOOL( bool arg ) { m_bool = arg; } - - bool eval( ParseContext *_context ) const { _context->type = ParseContext::T_BOOL; _context->b = m_bool; return true; } - -protected: - bool m_bool; -}; - -/** - * @internal - */ -class TDEIO_EXPORT ParseTreeMAX2 : public ParseTreeBase -{ -public: - ParseTreeMAX2( const char *_id ) { m_strId = _id; } - - bool eval( ParseContext *_context ) const; - -protected: - TQString m_strId; -}; - -/** - * @internal - */ -class TDEIO_EXPORT ParseTreeMIN2 : public ParseTreeBase -{ -public: - ParseTreeMIN2( const char *_id ) { m_strId = _id; } - - bool eval( ParseContext *_context ) const; - -protected: - TQString m_strId; -}; - -} - -#endif diff --git a/kio/kio/kurifilter.cpp b/kio/kio/kurifilter.cpp deleted file mode 100644 index 5c50f4fa9..000000000 --- a/kio/kio/kurifilter.cpp +++ /dev/null @@ -1,451 +0,0 @@ -/* This file is part of the KDE libraries - * Copyright (C) 2000 Yves Arrouye - * Copyright (C) 2000 Dawit Alemayehu - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library 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 - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public License - * along with this library; see the file COPYING.LIB. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - **/ - -#include - -#include -#include -#include -#include -#include -#include -#include - -#ifdef HAVE_ELFICON -#include -#include "tdelficon.h" -#endif // HAVE_ELFICON - -#include "kurifilter.h" - -template class TQPtrList; - -KURIFilterPlugin::KURIFilterPlugin( TQObject *parent, const char *name, double pri ) - :TQObject( parent, name ) -{ - m_strName = TQString::fromLatin1( name ); - m_dblPriority = pri; -} - -void KURIFilterPlugin::setFilteredURI( KURIFilterData& data, const KURL& uri ) const -{ - if ( data.uri() != uri ) - { - data.m_pURI = uri; - data.m_bChanged = true; - } -} - -class KURIFilterDataPrivate -{ -public: - KURIFilterDataPrivate() {}; - TQString abs_path; - TQString args; - TQString typedString; -}; - -KURIFilterData::KURIFilterData( const KURIFilterData& data ) -{ - m_iType = data.m_iType; - m_pURI = data.m_pURI; - m_strErrMsg = data.m_strErrMsg; - m_strIconName = data.m_strIconName; - m_bChanged = data.m_bChanged; - m_bCheckForExecutables = data.m_bCheckForExecutables; - d = new KURIFilterDataPrivate; - d->abs_path = data.absolutePath(); - d->typedString = data.typedString(); - d->args = data.argsAndOptions(); -} - -KURIFilterData::~KURIFilterData() -{ - delete d; - d = 0; -} - -void KURIFilterData::init( const KURL& url ) -{ - m_iType = KURIFilterData::UNKNOWN; - m_pURI = url; - m_strErrMsg = TQString::null; - m_strIconName = TQString::null; - m_bCheckForExecutables = true; - m_bChanged = true; - d = new KURIFilterDataPrivate; - d->typedString = url.url(); -} - -void KURIFilterData::init( const TQString& url ) -{ - m_iType = KURIFilterData::UNKNOWN; - m_pURI = url; - m_strErrMsg = TQString::null; - m_strIconName = TQString::null; - m_bCheckForExecutables = true; - m_bChanged = true; - d = new KURIFilterDataPrivate; - d->typedString = url; -} - -void KURIFilterData::reinit(const KURL &url) -{ - delete d; - init(url); -} - -void KURIFilterData::reinit(const TQString &url) -{ - delete d; - init(url); -} - -TQString KURIFilterData::typedString() const -{ - return d->typedString; -} - -void KURIFilterData::setCheckForExecutables( bool check ) -{ - m_bCheckForExecutables = check; -} - -bool KURIFilterData::hasArgsAndOptions() const -{ - return !d->args.isEmpty(); -} - -bool KURIFilterData::hasAbsolutePath() const -{ - return !d->abs_path.isEmpty(); -} - -bool KURIFilterData::setAbsolutePath( const TQString& absPath ) -{ - // Since a malformed URL could possibly be a relative - // URL we tag it as a possible local resource... - if( (!m_pURI.isValid() || m_pURI.isLocalFile()) ) - { - d->abs_path = absPath; - return true; - } - return false; -} - -TQString KURIFilterData::absolutePath() const -{ - return d->abs_path; -} - -TQString KURIFilterData::argsAndOptions() const -{ - return d->args; -} - -TQString KURIFilterData::iconName() -{ - if( m_bChanged ) - { - m_customIconPixmap = TQPixmap(); - switch ( m_iType ) - { - case KURIFilterData::LOCAL_FILE: - case KURIFilterData::LOCAL_DIR: - case KURIFilterData::NET_PROTOCOL: - { - m_strIconName = KMimeType::iconForURL( m_pURI ); - break; - } - case KURIFilterData::EXECUTABLE: - { - TQString exeName = m_pURI.url(); - exeName = exeName.mid( exeName.findRev( '/' ) + 1 ); // strip path if given - KService::Ptr service = KService::serviceByDesktopName( exeName ); -#ifndef HAVE_ELFICON - // Try to find an icon with the same name as the binary (useful for non-tde apps) - // FIXME: We should only do this if the binary is in the system path somewhere, - // otherwise TDE could end up showing system icons for user binaries - if (service && service->icon() != TQString::fromLatin1( "unknown" )) { - m_strIconName = service->icon(); - } - else if ( !TDEGlobal::iconLoader()->loadIcon( exeName, KIcon::NoGroup, 16, KIcon::DefaultState, 0, true ).isNull() ) { - m_strIconName = exeName; - } - else { - // use default - m_strIconName = TQString::fromLatin1("exec"); - } -#else // HAVE_ELFICON - // Try to find an icon with the same name as the binary (useful for non-tde apps) - // FIXME: We should only do this if the binary is in the system path somewhere, - // otherwise TDE could end up showing system icons for user binaries - if (service && service->icon() != TQString::fromLatin1( "unknown" )) { - m_strIconName = service->icon(); - } - else if ( !TDEGlobal::iconLoader()->loadIcon( exeName, KIcon::NoGroup, 16, KIcon::DefaultState, 0, true ).isNull() ) { - m_strIconName = exeName; - } - else { - // use default - m_strIconName = TQString::fromLatin1("exec"); - } - // Try to load from elf file (if supported) - // Check for an embedded icon - unsigned int icon_size; - libr_icon *icon = NULL; - libr_file *handle = NULL; - libr_access_t access = LIBR_READ; - char libr_can_continue = 1; - - if((handle = libr_open(const_cast(m_pURI.path().ascii()), access)) == NULL) - { - kdWarning() << "failed to open file" << m_pURI.path() << endl; - libr_can_continue = 0; - } - - if (libr_can_continue == 1) { - icon_size = 32; // FIXME: Is this a reasonable size request for all possible usages of kurifilter? - icon = libr_icon_geticon_bysize(handle, icon_size); - - if (libr_can_continue == 1) { - // See if the embedded icon name matches any icon file names already on the system - // If it does, use the system icon instead of the embedded one - int iconresnamefound = 0; - iconentry *entry = NULL; - iconlist icons; - if(!get_iconlist(handle, &icons)) - { - // Failed to obtain a list of ELF icons - kdWarning() << "failed to obtain ELF icon: " << libr_errmsg() << endl; - - // See if there is a system icon we can use - TQString sysIconName = elf_get_resource(handle, ".metadata_sysicon"); - if (!sysIconName.isEmpty()) { - if (TDEGlobal::iconLoader()->iconPath(sysIconName.ascii(), 0, true) != "") { - m_strIconName = sysIconName; - } - } - - libr_close(handle); - libr_can_continue = 0; - } - else { - while((entry = get_nexticon(&icons, entry)) != NULL) - { - if(icon == NULL) - { - // Try loading this icon as fallback - icon = libr_icon_geticon_byname(handle, entry->name); - } - if (TDEGlobal::iconLoader()->iconPath(entry->name, 0, true) != "") { - iconresnamefound = 1; - m_strIconName = entry->name; - break; - } - } - } - - if (libr_can_continue == 1) { - if ((iconresnamefound == 0) && (icon)) { - // Extract the embedded icon - size_t icon_data_length; - char* icondata = libr_icon_malloc(icon, &icon_data_length); - m_customIconPixmap.loadFromData(static_cast(static_cast(icondata)), icon_data_length); // EVIL CAST - if (icon_size != 0) { - TQImage ip = m_customIconPixmap.convertToImage(); - ip = ip.smoothScale(icon_size, icon_size); - m_customIconPixmap.convertFromImage(ip); - } - free(icondata); - libr_icon_close(icon); - } - - libr_close(handle); - } - } - } -#endif // HAVE_ELFICON - break; - } - case KURIFilterData::HELP: - { - m_strIconName = TQString::fromLatin1("khelpcenter"); - break; - } - case KURIFilterData::SHELL: - { - m_strIconName = TQString::fromLatin1("konsole"); - break; - } - case KURIFilterData::ERROR: - case KURIFilterData::BLOCKED: - { - m_strIconName = TQString::fromLatin1("error"); - break; - } - default: - m_strIconName = TQString::null; - break; - } - m_bChanged = false; - } - return m_strIconName; -} - -TQPixmap KURIFilterData::customIconPixmap() -{ - return m_customIconPixmap; -} - -//******************************************** KURIFilterPlugin ********************************************** -void KURIFilterPlugin::setArguments( KURIFilterData& data, const TQString& args ) const -{ - data.d->args = args; -} - -//******************************************** KURIFilter ********************************************** -KURIFilter *KURIFilter::s_self; -static KStaticDeleter kurifiltersd; - -KURIFilter *KURIFilter::self() -{ - if (!s_self) - s_self = kurifiltersd.setObject(s_self, new KURIFilter); - return s_self; -} - -KURIFilter::KURIFilter() -{ - m_lstPlugins.setAutoDelete(true); - loadPlugins(); -} - -KURIFilter::~KURIFilter() -{ -} - -bool KURIFilter::filterURI( KURIFilterData& data, const TQStringList& filters ) -{ - bool filtered = false; - KURIFilterPluginList use_plugins; - - // If we have a filter list, only include the once - // explicitly specified by it. Otherwise, use all available filters... - if( filters.isEmpty() ) - use_plugins = m_lstPlugins; // Use everything that is loaded... - else - { - //kdDebug() << "Named plugins requested..." << endl; - for( TQStringList::ConstIterator lst = filters.begin(); lst != filters.end(); ++lst ) - { - TQPtrListIterator it( m_lstPlugins ); - for( ; it.current() ; ++it ) - { - if( (*lst) == it.current()->name() ) - { - //kdDebug() << "Will use filter plugin named: " << it.current()->name() << endl; - use_plugins.append( it.current() ); - break; // We already found it ; so lets test the next named filter... - } - } - } - } - - TQPtrListIterator it( use_plugins ); - //kdDebug() << "Using " << use_plugins.count() << " out of the " - // << m_lstPlugins.count() << " available plugins" << endl; - for (; it.current() && !filtered; ++it) - { - //kdDebug() << "Using a filter plugin named: " << it.current()->name() << endl; - filtered |= it.current()->filterURI( data ); - } - return filtered; -} - -bool KURIFilter::filterURI( KURL& uri, const TQStringList& filters ) -{ - KURIFilterData data = uri; - bool filtered = filterURI( data, filters ); - if( filtered ) uri = data.uri(); - return filtered; -} - -bool KURIFilter::filterURI( TQString& uri, const TQStringList& filters ) -{ - KURIFilterData data = uri; - bool filtered = filterURI( data, filters ); - if( filtered ) uri = data.uri().url(); - return filtered; - -} - -KURL KURIFilter::filteredURI( const KURL &uri, const TQStringList& filters ) -{ - KURIFilterData data = uri; - filterURI( data, filters ); - return data.uri(); -} - -TQString KURIFilter::filteredURI( const TQString &uri, const TQStringList& filters ) -{ - KURIFilterData data = uri; - filterURI( data, filters ); - return data.uri().url(); -} - -TQPtrListIterator KURIFilter::pluginsIterator() const -{ - return TQPtrListIterator(m_lstPlugins); -} - -TQStringList KURIFilter::pluginNames() const -{ - TQStringList list; - for(TQPtrListIterator i = pluginsIterator(); *i; ++i) - list.append((*i)->name()); - return list; -} - -void KURIFilter::loadPlugins() -{ - KTrader::OfferList offers = KTrader::self()->query( "KURIFilter/Plugin" ); - - KTrader::OfferList::ConstIterator it = offers.begin(); - KTrader::OfferList::ConstIterator end = offers.end(); - - for (; it != end; ++it ) - { - KURIFilterPlugin *plugin = KParts::ComponentFactory::createInstanceFromService( *it, 0, (*it)->desktopEntryName().latin1() ); - if ( plugin ) - m_lstPlugins.append( plugin ); - } - - // NOTE: Plugin priority is now determined by - // the entry in the .desktop files... - // TODO: Config dialog to differentiate "system" - // plugins from "user-defined" ones... - // m_lstPlugins.sort(); -} - -void KURIFilterPlugin::virtual_hook( int, void* ) -{ /*BASE::virtual_hook( id, data );*/ } - -#include "kurifilter.moc" diff --git a/kio/kio/kurifilter.h b/kio/kio/kurifilter.h deleted file mode 100644 index fd7cb9b3c..000000000 --- a/kio/kio/kurifilter.h +++ /dev/null @@ -1,667 +0,0 @@ -/* - * This file is part of the KDE libraries - * Copyright (C) 2000-2001,2003 Dawit Alemayehu - * - * Original author - * Copyright (C) 2000 Yves Arrouye - * - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library 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 - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public License - * along with this library; see the file COPYING.LIB. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - **/ - -#ifndef __kurifilter_h__ -#define __kurifilter_h__ - -#include -#include -#include -#include - -#include - -#ifdef Q_OS_WIN -#undef ERROR -#endif - -class KURIFilterPrivate; -class KURIFilterDataPrivate; - -class TDECModule; - -/** -* A basic message object used for exchanging filtering -* information between the filter plugins and the application -* requesting the filtering service. -* -* Use this object if you require a more detailed information -* about the URI you want to filter. Any application can create -* an instance of this class and send it to KURIFilter to -* have the plugins fill out all possible information about the -* URI. -* -* \b Example -* -* \code -* TQString text = "kde.org"; -* KURIFilterData d = text; -* bool filtered = KURIFilter::self()->filter( d ); -* cout << "URL: " << text.latin1() << endl -* << "Filtered URL: " << d.uri().url().latin1() << endl -* << "URI Type: " << d.uriType() << endl -* << "Was Filtered: " << filtered << endl; -* \endcode -* -* The above code should yield the following output: -* \code -* URI: kde.org -* Filtered URI: http://kde.org -* URI Type: 0 <== means NET_PROTOCOL -* Was Filtered: 1 <== means the URL was successfully filtered -* \endcode -* -* @short A message object for exchanging filtering URI info. -* @author Dawit Alemayehu -*/ - -class TDEIO_EXPORT KURIFilterData -{ -friend class KURIFilterPlugin; - -public: - /** - * Describes the type of the URI that was filtered. - * Here is a brief description of the types: - * - * @li NET_PROTOCOL - Any network protocol: http, ftp, nttp, pop3, etc... - * @li LOCAL_FILE - A local file whose executable flag is not set - * @li LOCAL_DIR - A local directory - * @li EXECUTABLE - A local file whose executable flag is set - * @li HELP - A man or info page - * @li SHELL - A shell executable (ex: echo "Test..." >> ~/testfile) - * @li BLOCKED - A URI that should be blocked/filtered (ex: ad filtering) - * @li ERROR - An incorrect URI (ex: "~johndoe" when user johndoe - * does not exist in that system ) - * @li UNKNOWN - A URI that is not identified. Default value when - * a KURIFilterData is first created. - */ - enum URITypes { NET_PROTOCOL=0, LOCAL_FILE, LOCAL_DIR, EXECUTABLE, HELP, SHELL, BLOCKED, ERROR, UNKNOWN }; - - /** - * Default constructor. - * - * Creates a URIFilterData object. - */ - KURIFilterData() { init(); } - - /** - * Creates a URIFilterData object from the given URL. - * - * @param url is the URL to be filtered. - */ - KURIFilterData( const KURL& url ) { init( url); } - - /** - * Creates a URIFilterData object from the given string. - * - * @param url is the string to be filtered. - */ - KURIFilterData( const TQString& url ) { init( url ); } - - /** - * Copy constructor. - * - * Creates a URIFilterData object from another - * URI filter data object. - * - * @param data the uri filter data to be copied. - */ - KURIFilterData( const KURIFilterData& data); - - /** - * Destructor. - */ - ~KURIFilterData(); - - /** - * This method has been deprecated and will always return - * true. You should instead use the result from the - * KURIFilter::filterURI() calls. - * - * @deprecated - */ - KDE_DEPRECATED bool hasBeenFiltered() const { return true; } - - /** - * Returns the filtered or the original URL. - * - * This function returns the filtered url if one - * of the plugins successfully filtered the original - * URL. Otherwise, it returns the original URL. - * See hasBeenFiltered() and - * - * @return the filtered or original url. - */ - KURL uri() const { return m_pURI; } - - /** - * Returns an error message. - * - * This functions returns the error message set - * by the plugin whenever the uri type is set to - * KURIFilterData::ERROR. Otherwise, it returns - * a TQString::null. - * - * @return the error message or a NULL when there is none. - */ - TQString errorMsg() const { return m_strErrMsg; } - - /** - * Returns the URI type. - * - * This method always returns KURIFilterData::UNKNOWN - * if the given URL was not filtered. - * @return the type of the URI - */ - URITypes uriType() const { return m_iType; } - - /** - * Sets the URL to be filtered. - * - * Use this function to set the string to be - * filtered when you construct an empty filter - * object. - * - * @param url the string to be filtered. - */ - void setData( const TQString& url ) { reinit( url ); } - - /** - * Same as above except the argument is a URL. - * - * Use this function to set the string to be - * filtered when you construct an empty filter - * object. - * - * @param url the URL to be filtered. - */ - void setData( const KURL& url ) { reinit( url ); } - - /** - * Sets the absolute path to be used whenever the supplied - * data is a relative local URL. - * - * NOTE: This function should only be used for local resources, - * i.e. the "file:/" protocol. It is useful for specifying the - * absolute path in cases where the actual URL might be relative. - * meta object. If deriving the path from a KURL, make sure you - * set the argument for this function to the result of calling - * path () instead of url (). - * - * @param abs_path the abolute path to the local resource. - * @return true if absolute path is successfully set. Otherwise, false. - */ - bool setAbsolutePath( const TQString& abs_path ); - - /** - * Returns the absolute path if one has already been set. - * @return the absolute path, or TQString::null - * @see hasAbsolutePath() - */ - TQString absolutePath() const; - - /** - * Checks whether the supplied data had an absolute path. - * @return true if the supplied data has an absolute path - * @see absolutePath() - */ - bool hasAbsolutePath() const; - - /** - * Returns the command line options and arguments for a - * local resource when present. - * - * @return options and arguments when present, otherwise TQString::null - */ - TQString argsAndOptions() const; - - /** - * Checks whether the current data is a local resource with - * command line options and arguments. - * @return true if the current data has command line options and arguments - */ - bool hasArgsAndOptions() const; - - /** - * Returns the name of the icon that matches - * the current filtered URL. - * - * NOTE that this function will return a NULL - * string by default and when no associated icon - * is found. - * - * @return the name of the icon associated with the resource, - * or TQString::null if not found - */ - TQString iconName(); - - /** - * Returns the current custom icon - * The results are valid iff iconName() has - * returned TQString::null - * - * @return a pixmap with the current custom icon, - * or a null pixmap if no icon is available - */ - TQPixmap customIconPixmap(); - - /** - * Check whether the provided uri is executable or not. - * - * Setting this to false ensures that typing the name of - * an executable does not start that application. This is - * useful in the location bar of a browser. The default - * value is true. - * - * @since 3.2 - */ - void setCheckForExecutables (bool check); - - /** - * @return true if the filters should attempt to check whether the - * supplied uri is an executable. False otherwise. - * - * @since 3.2 - */ - bool checkForExecutables() const { return m_bCheckForExecutables; } - - /** - * @return the string as typed by the user, before any URL processing is done - * @since 3.2 - */ - TQString typedString() const; - - /** - * Overloaded assigenment operator. - * - * This function allows you to easily assign a KURL - * to a KURIFilterData object. - * - * @return an instance of a KURIFilterData object. - */ - KURIFilterData& operator=( const KURL& url ) { reinit( url ); return *this; } - - /** - * Overloaded assigenment operator. - * - * This function allows you to easily assign a QString - * to a KURIFilterData object. - * - * @return an instance of a KURIFilterData object. - */ - KURIFilterData& operator=( const TQString& url ) { reinit( url ); return *this; } - -protected: - - /** - * Initializes the KURIFilterData on construction. - * @param url the URL to initialize the object with - */ - void init( const KURL& url); - - /** - * Initializes the KURIFilterData on construction. - * @param url the URL to initialize the object with - */ - void init( const TQString& url = TQString::null ); - -private: - - // BC hack to avoid leaking KURIFilterDataPrivate objects. - // setData() and operator= used to call init() without deleting `d' - void reinit(const KURL& url); - void reinit(const TQString& url = TQString::null); - - bool m_bCheckForExecutables; - bool m_bChanged; - - TQString m_strErrMsg; - TQString m_strIconName; - - KURL m_pURI; - URITypes m_iType; - KURIFilterDataPrivate *d; - - TQPixmap m_customIconPixmap; -}; - - -/** - * Base class for URI filter plugins. - * - * This class applies a single filter to a URI. All plugins designed - * to provide URI filtering service should inherit from this abstract - * class and provide a concrete implementation. - * - * All inheriting classes need to implement the pure virtual function - * filterURI. - * - * @short Abstract class for URI filter plugins. - */ -class TDEIO_EXPORT KURIFilterPlugin : public TQObject -{ - Q_OBJECT - - -public: - - /** - * Constructs a filter plugin with a given name and - * priority. - * - * @param parent the parent object, or 0 for no parent - * @param name the name of the plugin, or 0 for no name - * @param pri the priority of the plugin. - */ - KURIFilterPlugin( TQObject *parent = 0, const char *name = 0, double pri = 1.0 ); - - /** - * Returns the filter's name. - * - * @return A string naming the filter. - */ - virtual TQString name() const { return m_strName; } - - /** - * Returns the filter's priority. - * - * Each filter has an assigned priority, a float from 0 to 1. Filters - * with the lowest priority are first given a chance to filter a URI. - * - * @return The priority of the filter. - */ - virtual double priority() const { return m_dblPriority; } - - /** - * Filters a URI. - * - * @param data the URI data to be filtered. - * @return A boolean indicating whether the URI has been changed. - */ - virtual bool filterURI( KURIFilterData& data ) const = 0; - - /** - * Creates a configuration module for the filter. - * - * It is the responsibility of the caller to delete the module - * once it is not needed anymore. - * - * @return A configuration module, 0 if the filter isn't configurable. - */ - virtual TDECModule *configModule( TQWidget*, const char* ) const { return 0; } - - /** - * Returns the name of the configuration module for the filter. - * - * @return the name of a configuration module or TQString::null if none. - */ - virtual TQString configName() const { return name(); } - -protected: - - /** - * Sets the the URL in @p data to @p uri. - */ - void setFilteredURI ( KURIFilterData& data, const KURL& uri ) const; - - /** - * Sets the error message in @p data to @p errormsg. - */ - void setErrorMsg ( KURIFilterData& data, const TQString& errmsg ) const { - data.m_strErrMsg = errmsg; - } - - /** - * Sets the URI type in @p data to @p type. - */ - void setURIType ( KURIFilterData& data, KURIFilterData::URITypes type) const { - data.m_iType = type; - data.m_bChanged = true; - } - - /** - * Sets the arguments and options string in @p data - * to @p args if any were found during filterting. - */ - void setArguments( KURIFilterData& data, const TQString& args ) const; - - TQString m_strName; - double m_dblPriority; - -protected: - virtual void virtual_hook( int id, void* data ); -private: - class KURIFilterPluginPrivate *d; -}; - - -/** - * A list of filter plugins. - */ -class TDEIO_EXPORT KURIFilterPluginList : public TQPtrList -{ -public: - virtual int compareItems(Item a, Item b) - { - double diff = ((KURIFilterPlugin *) a)->priority() - ((KURIFilterPlugin *) b)->priority(); - return diff < 0 ? -1 : (diff > 0 ? 1 : 0); - } - -private: - KURIFilterPrivate *d; - -}; - -/** - * Manages the filtering of URIs. - * - * The intention of this plugin class is to allow people to extend the - * functionality of KURL without modifying it directly. This way KURL will - * remain a generic parser capable of parsing any generic URL that adheres - * to specifications. - * - * The KURIFilter class applies a number of filters to a URI and returns the - * filtered version whenever possible. The filters are implemented using - * plugins to provide easy extensibility of the filtering mechanism. New - * filters can be added in the future by simply inheriting from - * KURIFilterPlugin and implementing the KURIFilterPlugin::filterURI - * method. - * - * Use of this plugin-manager class is straight forward. Since it is a - * singleton object, all you have to do is obtain an instance by doing - * @p KURIFilter::self() and use any of the public member functions to - * preform the filtering. - * - * \b Example - * - * To simply filter a given string: - * - * \code - * bool filtered = KURIFilter::self()->filterURI( "kde.org" ); - * \endcode - * - * You can alternatively use a KURL: - * - * \code - * KURL url = "kde.org"; - * bool filtered = KURIFilter::self()->filterURI( url ); - * \endcode - * - * If you have a constant string or a constant URL, simply invoke the - * corresponding function to obtain the filtered string or URL instead - * of a boolean flag: - * - * \code - * TQString u = KURIFilter::self()->filteredURI( "kde.org" ); - * \endcode - * - * You can also restrict the filter(s) to be used by supplying - * the name of the filter(s) to use. By defualt all available - * filters will be used. To use specific filters, add the names - * of the filters you want to use to a TQStringList and invoke - * the appropriate filtering function. The examples below show - * the use of specific filters. The first one uses a single - * filter called kshorturifilter while the second example uses - * multiple filters: - * - * \code - * TQString text = "kde.org"; - * bool filtered = KURIFilter::self()->filterURI( text, "kshorturifilter" ); - * \endcode - * - * \code - * TQStringList list; - * list << "kshorturifilter" << "localdomainfilter"; - * bool filtered = KURIFilter::self()->filterURI( text, list ); - * \endcode - * - * KURIFilter also allows richer data exchange through a simple - * meta-object called @p KURIFilterData. Using this meta-object - * you can find out more information about the URL you want to - * filter. See KURIFilterData for examples and details. - * - * @short Filters a given URL into its proper format whenever possible. - */ - -class TDEIO_EXPORT KURIFilter -{ -public: - /** - * Destructor - */ - ~KURIFilter (); - - /** - * Returns an instance of KURIFilter. - */ - static KURIFilter* self(); - - /** - * Filters the URI given by the object URIFilterData. - * - * The given URL is filtered based on the specified list of filters. - * If the list is empty all available filters would be used. - * - * @param data object that contains the URI to be filtered. - * @param filters specify the list of filters to be used. - * - * @return a boolean indicating whether the URI has been changed - */ - bool filterURI( KURIFilterData& data, const TQStringList& filters = TQStringList() ); - - /** - * Filters the URI given by the URL. - * - * The given URL is filtered based on the specified list of filters. - * If the list is empty all available filters would be used. - * - * @param uri the URI to filter. - * @param filters specify the list of filters to be used. - * - * @return a boolean indicating whether the URI has been changed - */ - bool filterURI( KURL &uri, const TQStringList& filters = TQStringList() ); - - /** - * Filters a string representing a URI. - * - * The given URL is filtered based on the specified list of filters. - * If the list is empty all available filters would be used. - * - * @param uri The URI to filter. - * @param filters specify the list of filters to be used. - * - * @return a boolean indicating whether the URI has been changed - */ - bool filterURI( TQString &uri, const TQStringList& filters = TQStringList() ); - - /** - * Returns the filtered URI. - * - * The given URL is filtered based on the specified list of filters. - * If the list is empty all available filters would be used. - * - * @param uri The URI to filter. - * @param filters specify the list of filters to be used. - * - * @return the filtered URI or null if it cannot be filtered - */ - KURL filteredURI( const KURL &uri, const TQStringList& filters = TQStringList() ); - - /** - * Return a filtered string representation of a URI. - * - * The given URL is filtered based on the specified list of filters. - * If the list is empty all available filters would be used. - * - * @param uri the URI to filter. - * @param filters specify the list of filters to be used. - * - * @return the filtered URI or null if it cannot be filtered - */ - TQString filteredURI( const TQString &uri, const TQStringList& filters = TQStringList() ); - - /** - * Return an iterator to iterate over all loaded - * plugins. - * - * @return a plugin iterator. - */ - TQPtrListIterator pluginsIterator() const; - - /** - * Return a list of the names of all loaded plugins. - * - * @return a TQStringList of plugin names - * @since 3.1 - */ - TQStringList pluginNames() const; - -protected: - - /** - * A protected constructor. - * - * This constructor creates a KURIFilter and - * initializes all plugins it can find by invoking - * loadPlugins. - */ - KURIFilter(); - - /** - * Loads all allowed plugins. - * - * This function loads all filters that have not - * been disbled. - */ - void loadPlugins(); - -private: - static KURIFilter *s_self; - KURIFilterPluginList m_lstPlugins; - KURIFilterPrivate *d; -}; - -#endif diff --git a/kio/kio/kurlcompletion.cpp b/kio/kio/kurlcompletion.cpp deleted file mode 100644 index 2dc4185cc..000000000 --- a/kio/kio/kurlcompletion.cpp +++ /dev/null @@ -1,1604 +0,0 @@ -/* -*- indent-tabs-mode: t; tab-width: 4; c-basic-offset:4 -*- - - This file is part of the KDE libraries - Copyright (C) 2000 David Smith - Copyright (C) 2004 Scott Wheeler - - This class was inspired by a previous KURLCompletion by - Henner Zeller - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -#include "kurlcompletion.h" - -static bool expandTilde(TQString &); -static bool expandEnv(TQString &); - -static TQString unescape(const TQString &text); - -// Permission mask for files that are executable by -// user, group or other -#define MODE_EXE (S_IXUSR | S_IXGRP | S_IXOTH) - -// Constants for types of completion -enum ComplType {CTNone=0, CTEnv, CTUser, CTMan, CTExe, CTFile, CTUrl, CTInfo}; - -class CompletionThread; - -/** - * A custom event type that is used to return a list of completion - * matches from an asyncrynous lookup. - */ - -class CompletionMatchEvent : public TQCustomEvent -{ -public: - CompletionMatchEvent( CompletionThread *thread ) : - TQCustomEvent( uniqueType() ), - m_completionThread( thread ) - {} - - CompletionThread *completionThread() const { return m_completionThread; } - static int uniqueType() { return User + 61080; } - -private: - CompletionThread *m_completionThread; -}; - -class CompletionThread : public TQThread -{ -protected: - CompletionThread( KURLCompletion *receiver ) : - TQThread(), - m_receiver( receiver ), - m_terminationRequested( false ) - {} - -public: - void requestTermination() { m_terminationRequested = true; } - TQDeepCopy matches() const { return m_matches; } - -protected: - void addMatch( const TQString &match ) { m_matches.append( match ); } - bool terminationRequested() const { return m_terminationRequested; } - void done() - { - if ( !m_terminationRequested ) - kapp->postEvent( m_receiver, new CompletionMatchEvent( this ) ); - else - delete this; - } - -private: - KURLCompletion *m_receiver; - TQStringList m_matches; - bool m_terminationRequested; -}; - -/** - * A simple thread that fetches a list of tilde-completions and returns this - * to the caller via a CompletionMatchEvent. - */ - -class UserListThread : public CompletionThread -{ -public: - UserListThread( KURLCompletion *receiver ) : - CompletionThread( receiver ) - {} - -protected: - virtual void run() - { - static const TQChar tilde = '~'; - - struct passwd *pw; - while ( ( pw = ::getpwent() ) && !terminationRequested() ) - addMatch( tilde + TQString::fromLocal8Bit( pw->pw_name ) ); - - ::endpwent(); - - addMatch( tilde ); - - done(); - } -}; - -class DirectoryListThread : public CompletionThread -{ -public: - DirectoryListThread( KURLCompletion *receiver, - const TQStringList &dirList, - const TQString &filter, - bool onlyExe, - bool onlyDir, - bool noHidden, - bool appendSlashToDir ) : - CompletionThread( receiver ), - m_dirList( TQDeepCopy( dirList ) ), - m_filter( TQDeepCopy( filter ) ), - m_onlyExe( onlyExe ), - m_onlyDir( onlyDir ), - m_noHidden( noHidden ), - m_appendSlashToDir( appendSlashToDir ) - {} - - virtual void run(); - -private: - TQStringList m_dirList; - TQString m_filter; - bool m_onlyExe; - bool m_onlyDir; - bool m_noHidden; - bool m_appendSlashToDir; -}; - -void DirectoryListThread::run() -{ - // Thread safety notes: - // - // There very possibly may be thread safety issues here, but I've done a check - // of all of the things that would seem to be problematic. Here are a few - // things that I have checked to be safe here (some used indirectly): - // - // TQDir::currentDirPath(), TQDir::setCurrent(), TQFile::decodeName(), TQFile::encodeName() - // TQString::fromLocal8Bit(), TQString::local8Bit(), TQTextCodec::codecForLocale() - // - // Also see (for POSIX functions): - // http://www.opengroup.org/onlinepubs/009695399/functions/xsh_chap02_09.html - - DIR *dir = 0; - - for ( TQStringList::ConstIterator it = m_dirList.begin(); - it != m_dirList.end() && !terminationRequested(); - ++it ) - { - // Open the next directory - - if ( !dir ) { - dir = ::opendir( TQFile::encodeName( *it ) ); - if ( ! dir ) { - kdDebug() << "Failed to open dir: " << *it << endl; - done(); - return; - } - } - - // A trick from KIO that helps performance by a little bit: - // chdir to the directroy so we won't have to deal with full paths - // with stat() - - TQString path = TQDir::currentDirPath(); - TQDir::setCurrent( *it ); - - // Loop through all directory entries - // Solaris and IRIX dirent structures do not allocate space for d_name. On - // systems that do (HP-UX, Linux, Tru64 UNIX), we overallocate space but - // that's ok. -#ifndef HAVE_READDIR_R - struct dirent *dirEntry = 0; - while ( !terminationRequested() && - (dirEntry = ::readdir( dir))) -#else -#if !defined(MAXPATHLEN) && defined(__GNU__) -#define MAXPATHLEN UCHAR_MAX -#endif - struct dirent *dirPosition = (struct dirent *) malloc( sizeof( struct dirent ) + MAXPATHLEN + 1 ); - struct dirent *dirEntry = 0; - while ( !terminationRequested() && - ::readdir_r( dir, dirPosition, &dirEntry ) == 0 && dirEntry ) -#endif - - { - // Skip hidden files if m_noHidden is true - - if ( dirEntry->d_name[0] == '.' && m_noHidden ) - continue; - - // Skip "." - - if ( dirEntry->d_name[0] == '.' && dirEntry->d_name[1] == '\0' ) - continue; - - // Skip ".." - - if ( dirEntry->d_name[0] == '.' && dirEntry->d_name[1] == '.' && dirEntry->d_name[2] == '\0' ) - continue; - - TQString file = TQFile::decodeName( dirEntry->d_name ); - - if ( m_filter.isEmpty() || file.startsWith( m_filter ) ) { - - if ( m_onlyExe || m_onlyDir || m_appendSlashToDir ) { - KDE_struct_stat sbuff; - - if ( KDE_stat( dirEntry->d_name, &sbuff ) == 0 ) { - - // Verify executable - - if ( m_onlyExe && ( sbuff.st_mode & MODE_EXE ) == 0 ) - continue; - - // Verify directory - - if ( m_onlyDir && !S_ISDIR( sbuff.st_mode ) ) - continue; - - // Add '/' to directories - - if ( m_appendSlashToDir && S_ISDIR( sbuff.st_mode ) ) - file.append( '/' ); - - } - else { - kdDebug() << "Could not stat file " << file << endl; - continue; - } - } - - addMatch( file ); - } - } - - // chdir to the original directory - - TQDir::setCurrent( path ); - - ::closedir( dir ); - dir = 0; -#ifdef HAVE_READDIR_R - free( dirPosition ); -#endif - } - - done(); -} - -/////////////////////////////////////////////////////// -/////////////////////////////////////////////////////// -// MyURL - wrapper for KURL with some different functionality -// - -class KURLCompletion::MyURL -{ -public: - MyURL(const TQString &url, const TQString &cwd); - MyURL(const MyURL &url); - ~MyURL(); - - KURL *kurl() const { return m_kurl; } - - TQString protocol() const { return m_kurl->protocol(); } - // The directory with a trailing '/' - TQString dir() const { return m_kurl->directory(false, false); } - TQString file() const { return m_kurl->fileName(false); } - - // The initial, unparsed, url, as a string. - TQString url() const { return m_url; } - - // Is the initial string a URL, or just a path (whether absolute or relative) - bool isURL() const { return m_isURL; } - - void filter( bool replace_user_dir, bool replace_env ); - -private: - void init(const TQString &url, const TQString &cwd); - - KURL *m_kurl; - TQString m_url; - bool m_isURL; -}; - -KURLCompletion::MyURL::MyURL(const TQString &url, const TQString &cwd) -{ - init(url, cwd); -} - -KURLCompletion::MyURL::MyURL(const MyURL &url) -{ - m_kurl = new KURL( *(url.m_kurl) ); - m_url = url.m_url; - m_isURL = url.m_isURL; -} - -void KURLCompletion::MyURL::init(const TQString &url, const TQString &cwd) -{ - // Save the original text - m_url = url; - - // Non-const copy - TQString url_copy = url; - - // Special shortcuts for "man:" and "info:" - if ( url_copy[0] == '#' ) { - if ( url_copy[1] == '#' ) - url_copy.replace( 0, 2, TQString("info:") ); - else - url_copy.replace( 0, 1, TQString("man:") ); - } - - // Look for a protocol in 'url' - TQRegExp protocol_regex = TQRegExp( "^[^/\\s\\\\]*:" ); - - // Assume "file:" or whatever is given by 'cwd' if there is - // no protocol. (KURL does this only for absoute paths) - if ( protocol_regex.search( url_copy ) == 0 ) - { - m_kurl = new KURL( url_copy ); - m_isURL = true; - } - else // relative path or ~ or $something - { - m_isURL = false; - if ( cwd.isEmpty() ) - { - m_kurl = new KURL(); - if ( !TQDir::isRelativePath(url_copy) || url_copy[0] == '$' || url_copy[0] == '~' ) - m_kurl->setPath( url_copy ); - else - *m_kurl = url_copy; - } - else - { - KURL base = KURL::fromPathOrURL( cwd ); - base.adjustPath(+1); - - if ( !TQDir::isRelativePath(url_copy) || url_copy[0] == '~' || url_copy[0] == '$' ) - { - m_kurl = new KURL(); - m_kurl->setPath( url_copy ); - } - else // relative path - { - //m_kurl = new KURL( base, url_copy ); - m_kurl = new KURL( base ); - m_kurl->addPath( url_copy ); - } - } - } -} - -KURLCompletion::MyURL::~MyURL() -{ - delete m_kurl; -} - -void KURLCompletion::MyURL::filter( bool replace_user_dir, bool replace_env ) -{ - TQString d = dir() + file(); - if ( replace_user_dir ) expandTilde( d ); - if ( replace_env ) expandEnv( d ); - m_kurl->setPath( d ); -} - -/////////////////////////////////////////////////////// -/////////////////////////////////////////////////////// -// KURLCompletionPrivate -// -class KURLCompletionPrivate -{ -public: - KURLCompletionPrivate() : url_auto_completion(true), - userListThread(0), - dirListThread(0) {} - ~KURLCompletionPrivate(); - - TQValueList list_urls; - - bool onlyLocalProto; - - // urlCompletion() in Auto/Popup mode? - bool url_auto_completion; - - // Append '/' to directories in Popup mode? - // Doing that stat's all files and is slower - bool popup_append_slash; - - // Keep track of currently listed files to avoid reading them again - TQString last_path_listed; - TQString last_file_listed; - TQString last_prepend; - int last_compl_type; - int last_no_hidden; - - TQString cwd; // "current directory" = base dir for completion - - KURLCompletion::Mode mode; // ExeCompletion, FileCompletion, DirCompletion - bool replace_env; - bool replace_home; - bool complete_url; // if true completing a URL (i.e. 'prepend' is a URL), otherwise a path - - TDEIO::ListJob *list_job; // kio job to list directories - - TQString prepend; // text to prepend to listed items - TQString compl_text; // text to pass on to KCompletion - - // Filters for files read with kio - bool list_urls_only_exe; // true = only list executables - bool list_urls_no_hidden; - TQString list_urls_filter; // filter for listed files - - CompletionThread *userListThread; - CompletionThread *dirListThread; -}; - -KURLCompletionPrivate::~KURLCompletionPrivate() -{ - if ( userListThread ) - userListThread->requestTermination(); - if ( dirListThread ) - dirListThread->requestTermination(); -} - -/////////////////////////////////////////////////////// -/////////////////////////////////////////////////////// -// KURLCompletion -// - -KURLCompletion::KURLCompletion() : KCompletion() -{ - init(); -} - - -KURLCompletion::KURLCompletion( Mode mode ) : KCompletion() -{ - init(); - setMode ( mode ); -} - -KURLCompletion::~KURLCompletion() -{ - stop(); - delete d; -} - - -void KURLCompletion::init() -{ - d = new KURLCompletionPrivate; - - d->cwd = TQDir::homeDirPath(); - - d->replace_home = true; - d->replace_env = true; - d->last_no_hidden = false; - d->last_compl_type = 0; - d->list_job = 0L; - d->mode = KURLCompletion::FileCompletion; - - // Read settings - TDEConfig *c = TDEGlobal::config(); - TDEConfigGroupSaver cgs( c, "URLCompletion" ); - - d->url_auto_completion = c->readBoolEntry("alwaysAutoComplete", true); - d->popup_append_slash = c->readBoolEntry("popupAppendSlash", true); - d->onlyLocalProto = c->readBoolEntry("LocalProtocolsOnly", false); -} - -void KURLCompletion::setDir(const TQString &dir) -{ - d->cwd = dir; -} - -TQString KURLCompletion::dir() const -{ - return d->cwd; -} - -KURLCompletion::Mode KURLCompletion::mode() const -{ - return d->mode; -} - -void KURLCompletion::setMode( Mode mode ) -{ - d->mode = mode; -} - -bool KURLCompletion::replaceEnv() const -{ - return d->replace_env; -} - -void KURLCompletion::setReplaceEnv( bool replace ) -{ - d->replace_env = replace; -} - -bool KURLCompletion::replaceHome() const -{ - return d->replace_home; -} - -void KURLCompletion::setReplaceHome( bool replace ) -{ - d->replace_home = replace; -} - -/* - * makeCompletion() - * - * Entry point for file name completion - */ -TQString KURLCompletion::makeCompletion(const TQString &text) -{ - //kdDebug() << "KURLCompletion::makeCompletion: " << text << " d->cwd=" << d->cwd << endl; - - MyURL url(text, d->cwd); - - d->compl_text = text; - - // Set d->prepend to the original URL, with the filename [and ref/query] stripped. - // This is what gets prepended to the directory-listing matches. - int toRemove = url.file().length() - url.kurl()->query().length(); - if ( url.kurl()->hasRef() ) - toRemove += url.kurl()->ref().length() + 1; - d->prepend = text.left( text.length() - toRemove ); - d->complete_url = url.isURL(); - - TQString match; - - // Environment variables - // - if ( d->replace_env && envCompletion( url, &match ) ) - return match; - - // User directories - // - if ( d->replace_home && userCompletion( url, &match ) ) - return match; - - // Replace user directories and variables - url.filter( d->replace_home, d->replace_env ); - - //kdDebug() << "Filtered: proto=" << url.protocol() - // << ", dir=" << url.dir() - // << ", file=" << url.file() - // << ", kurl url=" << *url.kurl() << endl; - - if ( d->mode == ExeCompletion ) { - // Executables - // - if ( exeCompletion( url, &match ) ) - return match; - - // KRun can run "man:" and "info:" etc. so why not treat them - // as executables... - - if ( urlCompletion( url, &match ) ) - return match; - } - else if ( d->mode == SystemExeCompletion ) { - // Executables - // - if ( systemexeCompletion( url, &match ) ) - return match; - - // KRun can run "man:" and "info:" etc. so why not treat them - // as executables... - - if ( urlCompletion( url, &match ) ) - return match; - } - else { - // Local files, directories - // - if ( fileCompletion( url, &match ) ) - return match; - - // All other... - // - if ( urlCompletion( url, &match ) ) - return match; - } - - setListedURL( CTNone ); - stop(); - - return TQString::null; -} - -/* - * finished - * - * Go on and call KCompletion. - * Called when all matches have been added - */ -TQString KURLCompletion::finished() -{ - if ( d->last_compl_type == CTInfo ) - return KCompletion::makeCompletion( d->compl_text.lower() ); - else - return KCompletion::makeCompletion( d->compl_text ); -} - -/* - * isRunning - * - * Return true if either a KIO job or the DirLister - * is running - */ -bool KURLCompletion::isRunning() const -{ - return d->list_job || (d->dirListThread && !d->dirListThread->finished()); -} - -/* - * stop - * - * Stop and delete a running KIO job or the DirLister - */ -void KURLCompletion::stop() -{ - if ( d->list_job ) { - d->list_job->kill(); - d->list_job = 0L; - } - - if ( !d->list_urls.isEmpty() ) { - TQValueList::Iterator it = d->list_urls.begin(); - for ( ; it != d->list_urls.end(); it++ ) - delete (*it); - d->list_urls.clear(); - } - - if ( d->dirListThread ) { - d->dirListThread->requestTermination(); - d->dirListThread = 0; - } -} - -/* - * Keep track of the last listed directory - */ -void KURLCompletion::setListedURL( int complType, - const TQString& dir, - const TQString& filter, - bool no_hidden ) -{ - d->last_compl_type = complType; - d->last_path_listed = dir; - d->last_file_listed = filter; - d->last_no_hidden = (int)no_hidden; - d->last_prepend = d->prepend; -} - -bool KURLCompletion::isListedURL( int complType, - const TQString& dir, - const TQString& filter, - bool no_hidden ) -{ - return d->last_compl_type == complType - && ( d->last_path_listed == dir - || (dir.isEmpty() && d->last_path_listed.isEmpty()) ) - && ( filter.startsWith(d->last_file_listed) - || (filter.isEmpty() && d->last_file_listed.isEmpty()) ) - && d->last_no_hidden == (int)no_hidden - && d->last_prepend == d->prepend; // e.g. relative path vs absolute -} - -/* - * isAutoCompletion - * - * Returns true if completion mode is Auto or Popup - */ -bool KURLCompletion::isAutoCompletion() -{ - return completionMode() == TDEGlobalSettings::CompletionAuto - || completionMode() == TDEGlobalSettings::CompletionPopup - || completionMode() == TDEGlobalSettings::CompletionMan - || completionMode() == TDEGlobalSettings::CompletionPopupAuto; -} -////////////////////////////////////////////////// -////////////////////////////////////////////////// -// User directories -// - -bool KURLCompletion::userCompletion(const MyURL &url, TQString *match) -{ - if ( url.protocol() != "file" - || !url.dir().isEmpty() - || url.file().at(0) != '~' ) - return false; - - if ( !isListedURL( CTUser ) ) { - stop(); - clear(); - - if ( !d->userListThread ) { - d->userListThread = new UserListThread( this ); - d->userListThread->start(); - - // If the thread finishes quickly make sure that the results - // are added to the first matching case. - - d->userListThread->wait( 200 ); - TQStringList l = d->userListThread->matches(); - addMatches( l ); - } - } - *match = finished(); - return true; -} - -///////////////////////////////////////////////////// -///////////////////////////////////////////////////// -// Environment variables -// - -extern char **environ; // Array of environment variables - -bool KURLCompletion::envCompletion(const MyURL &url, TQString *match) -{ - if ( url.file().at(0) != '$' ) - return false; - - if ( !isListedURL( CTEnv ) ) { - stop(); - clear(); - - char **env = environ; - - TQString dollar = TQString("$"); - - TQStringList l; - - while ( *env ) { - TQString s = TQString::fromLocal8Bit( *env ); - - int pos = s.find('='); - - if ( pos == -1 ) - pos = s.length(); - - if ( pos > 0 ) - l.append( dollar + s.left(pos) ); - - env++; - } - - addMatches( l ); - } - - setListedURL( CTEnv ); - - *match = finished(); - return true; -} - -////////////////////////////////////////////////// -////////////////////////////////////////////////// -// Executables -// - -bool KURLCompletion::exeCompletion(const MyURL &url, TQString *match) -{ - if ( url.protocol() != "file" ) - return false; - - TQString dir = url.dir(); - - dir = unescape( dir ); // remove escapes - - // Find directories to search for completions, either - // - // 1. complete path given in url - // 2. current directory (d->cwd) - // 3. $PATH - // 4. no directory at all - - TQStringList dirList; - - if ( !TQDir::isRelativePath(dir) ) { - // complete path in url - dirList.append( dir ); - } - else if ( !dir.isEmpty() && !d->cwd.isEmpty() ) { - // current directory - dirList.append( d->cwd + '/' + dir ); - } - else if ( !url.file().isEmpty() ) { - // $PATH - dirList = TQStringList::split(KPATH_SEPARATOR, - TQString::fromLocal8Bit(::getenv("PATH"))); - - TQStringList::Iterator it = dirList.begin(); - - for ( ; it != dirList.end(); it++ ) - (*it).append('/'); - } - - // No hidden files unless the user types "." - bool no_hidden_files = url.file().at(0) != '.'; - - // List files if needed - // - if ( !isListedURL( CTExe, dir, url.file(), no_hidden_files ) ) - { - stop(); - clear(); - - setListedURL( CTExe, dir, url.file(), no_hidden_files ); - - *match = listDirectories( dirList, url.file(), true, false, no_hidden_files ); - } - else if ( !isRunning() ) { - *match = finished(); - } - else { - if ( d->dirListThread ) - setListedURL( CTExe, dir, url.file(), no_hidden_files ); - *match = TQString::null; - } - - return true; -} - -////////////////////////////////////////////////// -////////////////////////////////////////////////// -// System Executables -// - -bool KURLCompletion::systemexeCompletion(const MyURL &url, TQString *match) -{ - if ( url.protocol() != "file" ) - return false; - - TQString dir = url.dir(); - - dir = unescape( dir ); // remove escapes - - // Find directories to search for completions, either - // - // 1. complete path given in url - // 2. current directory (d->cwd) - // 3. $PATH - // 4. no directory at all - - TQStringList dirList; - - if ( !url.file().isEmpty() ) { - // $PATH - dirList = TQStringList::split(KPATH_SEPARATOR, - TQString::fromLocal8Bit(::getenv("PATH"))); - - TQStringList::Iterator it = dirList.begin(); - - for ( ; it != dirList.end(); it++ ) - (*it).append('/'); - } - - // No hidden files unless the user types "." - bool no_hidden_files = url.file().at(0) != '.'; - - // List files if needed - // - if ( !isListedURL( CTExe, dir, url.file(), no_hidden_files ) ) - { - stop(); - clear(); - - setListedURL( CTExe, dir, url.file(), no_hidden_files ); - - *match = listDirectories( dirList, url.file(), true, false, no_hidden_files ); - } - else if ( !isRunning() ) { - *match = finished(); - } - else { - if ( d->dirListThread ) - setListedURL( CTExe, dir, url.file(), no_hidden_files ); - *match = TQString::null; - } - - return true; -} - -////////////////////////////////////////////////// -////////////////////////////////////////////////// -// Local files -// - -bool KURLCompletion::fileCompletion(const MyURL &url, TQString *match) -{ - if ( url.protocol() != "file" ) - return false; - - TQString dir = url.dir(); - - if (url.url()[0] == '.') - { - if (url.url().length() == 1) - { - *match = - ( completionMode() == TDEGlobalSettings::CompletionMan )? "." : ".."; - return true; - } - if (url.url().length() == 2 && url.url()[1]=='.') - { - *match=".."; - return true; - } - } - - //kdDebug() << "fileCompletion " << url.url() << " dir=" << dir << endl; - - dir = unescape( dir ); // remove escapes - - // Find directories to search for completions, either - // - // 1. complete path given in url - // 2. current directory (d->cwd) - // 3. no directory at all - - TQStringList dirList; - - if ( !TQDir::isRelativePath(dir) ) { - // complete path in url - dirList.append( dir ); - } - else if ( !d->cwd.isEmpty() ) { - // current directory - dirList.append( d->cwd + '/' + dir ); - } - - // No hidden files unless the user types "." - bool no_hidden_files = ( url.file().at(0) != '.' ); - - // List files if needed - // - if ( !isListedURL( CTFile, dir, "", no_hidden_files ) ) - { - stop(); - clear(); - - setListedURL( CTFile, dir, "", no_hidden_files ); - - // Append '/' to directories in Popup mode? - bool append_slash = ( d->popup_append_slash - && (completionMode() == TDEGlobalSettings::CompletionPopup || - completionMode() == TDEGlobalSettings::CompletionPopupAuto ) ); - - bool only_dir = ( d->mode == DirCompletion ); - - *match = listDirectories( dirList, "", false, only_dir, no_hidden_files, - append_slash ); - } - else if ( !isRunning() ) { - *match = finished(); - } - else { - *match = TQString::null; - } - - return true; -} - -////////////////////////////////////////////////// -////////////////////////////////////////////////// -// URLs not handled elsewhere... -// - -bool KURLCompletion::urlCompletion(const MyURL &url, TQString *match) -{ - //kdDebug() << "urlCompletion: url = " << *url.kurl() << endl; - if (d->onlyLocalProto && KProtocolInfo::protocolClass(url.protocol()) != ":local") - return false; - - // Use d->cwd as base url in case url is not absolute - KURL url_cwd = KURL::fromPathOrURL( d->cwd ); - - // Create an URL with the directory to be listed - KURL url_dir( url_cwd, url.kurl()->url() ); - - // Don't try url completion if - // 1. malformed url - // 2. protocol that doesn't have listDir() - // 3. there is no directory (e.g. "ftp://ftp.kd" shouldn't do anything) - // 4. auto or popup completion mode depending on settings - - bool man_or_info = ( url_dir.protocol() == TQString("man") - || url_dir.protocol() == TQString("info") ); - - if ( !url_dir.isValid() - || !KProtocolInfo::supportsListing( url_dir ) - || ( !man_or_info - && ( url_dir.directory(false,false).isEmpty() - || ( isAutoCompletion() - && !d->url_auto_completion ) ) ) ) { - return false; - } - - url_dir.setFileName(""); // not really nesseccary, but clear the filename anyway... - - // Remove escapes - TQString dir = url_dir.directory( false, false ); - - dir = unescape( dir ); - - url_dir.setPath( dir ); - - // List files if needed - // - if ( !isListedURL( CTUrl, url_dir.prettyURL(), url.file() ) ) - { - stop(); - clear(); - - setListedURL( CTUrl, url_dir.prettyURL(), "" ); - - TQValueList url_list; - url_list.append( new KURL( url_dir ) ); - - listURLs( url_list, "", false ); - - *match = TQString::null; - } - else if ( !isRunning() ) { - *match = finished(); - } - else { - *match = TQString::null; - } - - return true; -} - -////////////////////////////////////////////////// -////////////////////////////////////////////////// -// Directory and URL listing -// - -/* - * addMatches - * - * Called to add matches to KCompletion - */ -void KURLCompletion::addMatches( const TQStringList &matches ) -{ - TQStringList::ConstIterator it = matches.begin(); - TQStringList::ConstIterator end = matches.end(); - - if ( d->complete_url ) - for ( ; it != end; it++ ) - addItem( d->prepend + KURL::encode_string(*it)); - else - for ( ; it != end; it++ ) - addItem( d->prepend + (*it)); -} - -/* - * listDirectories - * - * List files starting with 'filter' in the given directories, - * either using DirLister or listURLs() - * - * In either case, addMatches() is called with the listed - * files, and eventually finished() when the listing is done - * - * Returns the match if available, or TQString::null if - * DirLister timed out or using kio - */ -TQString KURLCompletion::listDirectories( - const TQStringList &dirList, - const TQString &filter, - bool only_exe, - bool only_dir, - bool no_hidden, - bool append_slash_to_dir) -{ - assert( !isRunning() ); - - if ( !::getenv("KURLCOMPLETION_LOCAL_KIO") ) { - - //kdDebug() << "Listing (listDirectories): " << dirList << " filter=" << filter << " without KIO" << endl; - - // Don't use KIO - - if ( d->dirListThread ) - d->dirListThread->requestTermination(); - - TQStringList dirs; - - for ( TQStringList::ConstIterator it = dirList.begin(); - it != dirList.end(); - ++it ) - { - KURL url; - url.setPath(*it); - if ( kapp->authorizeURLAction( "list", KURL(), url ) ) - dirs.append( *it ); - } - - d->dirListThread = new DirectoryListThread( this, dirs, filter, only_exe, only_dir, - no_hidden, append_slash_to_dir ); - d->dirListThread->start(); - d->dirListThread->wait( 200 ); - addMatches( d->dirListThread->matches() ); - - return finished(); - } - else { - - // Use KIO - //kdDebug() << "Listing (listDirectories): " << dirList << " with KIO" << endl; - - TQValueList url_list; - - TQStringList::ConstIterator it = dirList.begin(); - - for ( ; it != dirList.end(); it++ ) - url_list.append( new KURL(*it) ); - - listURLs( url_list, filter, only_exe, no_hidden ); - // Will call addMatches() and finished() - - return TQString::null; - } -} - -/* - * listURLs - * - * Use KIO to list the given urls - * - * addMatches() is called with the listed files - * finished() is called when the listing is done - */ -void KURLCompletion::listURLs( - const TQValueList &urls, - const TQString &filter, - bool only_exe, - bool no_hidden ) -{ - assert( d->list_urls.isEmpty() ); - assert( d->list_job == 0L ); - - d->list_urls = urls; - d->list_urls_filter = filter; - d->list_urls_only_exe = only_exe; - d->list_urls_no_hidden = no_hidden; - -// kdDebug() << "Listing URLs: " << urls[0]->prettyURL() << ",..." << endl; - - // Start it off by calling slotIOFinished - // - // This will start a new list job as long as there - // are urls in d->list_urls - // - slotIOFinished(0L); -} - -/* - * slotEntries - * - * Receive files listed by KIO and call addMatches() - */ -void KURLCompletion::slotEntries(TDEIO::Job*, const TDEIO::UDSEntryList& entries) -{ - TQStringList matches; - - TDEIO::UDSEntryListConstIterator it = entries.begin(); - TDEIO::UDSEntryListConstIterator end = entries.end(); - - TQString filter = d->list_urls_filter; - - int filter_len = filter.length(); - - // Iterate over all files - // - for (; it != end; ++it) { - TQString name; - TQString url; - bool is_exe = false; - bool is_dir = false; - - TDEIO::UDSEntry e = *it; - TDEIO::UDSEntry::ConstIterator it_2 = e.begin(); - - for( ; it_2 != e.end(); it_2++ ) { - switch ( (*it_2).m_uds ) { - case TDEIO::UDS_NAME: - name = (*it_2).m_str; - break; - case TDEIO::UDS_ACCESS: - is_exe = ((*it_2).m_long & MODE_EXE) != 0; - break; - case TDEIO::UDS_FILE_TYPE: - is_dir = ((*it_2).m_long & S_IFDIR) != 0; - break; - case TDEIO::UDS_URL: - url = (*it_2).m_str; - break; - } - } - - if (!url.isEmpty()) { - // kdDebug() << "KURLCompletion::slotEntries url: " << url << endl; - name = KURL(url).fileName(); - } - - // kdDebug() << "KURLCompletion::slotEntries name: " << name << endl; - - if ( name[0] == '.' && - ( d->list_urls_no_hidden || - name.length() == 1 || - ( name.length() == 2 && name[1] == '.' ) ) ) - continue; - - if ( d->mode == DirCompletion && !is_dir ) - continue; - - if ( filter_len == 0 || name.left(filter_len) == filter ) { - if ( is_dir ) - name.append( '/' ); - - if ( is_exe || !d->list_urls_only_exe ) - matches.append( name ); - } - } - - addMatches( matches ); -} - -/* - * slotIOFinished - * - * Called when a KIO job is finished. - * - * Start a new list job if there are still urls in - * d->list_urls, otherwise call finished() - */ -void KURLCompletion::slotIOFinished( TDEIO::Job * job ) -{ -// kdDebug() << "slotIOFinished() " << endl; - - assert( job == d->list_job ); - - if ( d->list_urls.isEmpty() ) { - - d->list_job = 0L; - - finished(); // will call KCompletion::makeCompletion() - - } - else { - - KURL *kurl = d->list_urls.first(); - - d->list_urls.remove( kurl ); - -// kdDebug() << "Start KIO: " << kurl->prettyURL() << endl; - - d->list_job = TDEIO::listDir( *kurl, false ); - d->list_job->addMetaData("no-auth-prompt", "true"); - - assert( d->list_job ); - - connect( d->list_job, - TQT_SIGNAL(result(TDEIO::Job*)), - TQT_SLOT(slotIOFinished(TDEIO::Job*)) ); - - connect( d->list_job, - TQT_SIGNAL( entries( TDEIO::Job*, const TDEIO::UDSEntryList&)), - TQT_SLOT( slotEntries( TDEIO::Job*, const TDEIO::UDSEntryList&)) ); - - delete kurl; - } -} - -/////////////////////////////////////////////////// -/////////////////////////////////////////////////// - -/* - * postProcessMatch, postProcessMatches - * - * Called by KCompletion before emitting match() and matches() - * - * Append '/' to directories for file completion. This is - * done here to avoid stat()'ing a lot of files - */ -void KURLCompletion::postProcessMatch( TQString *match ) const -{ -// kdDebug() << "KURLCompletion::postProcess: " << *match << endl; - - if ( !match->isEmpty() ) { - - // Add '/' to directories in file completion mode - // unless it has already been done - if ( d->last_compl_type == CTFile ) - adjustMatch( *match ); - } -} - -void KURLCompletion::adjustMatch( TQString& match ) const -{ - if ( match.at( match.length()-1 ) != '/' ) - { - TQString copy; - - if ( match.startsWith( TQString("file:") ) ) - copy = KURL(match).path(); - else - copy = match; - - expandTilde( copy ); - expandEnv( copy ); - if ( TQDir::isRelativePath(copy) ) - copy.prepend( d->cwd + '/' ); - -// kdDebug() << "postProcess: stating " << copy << endl; - - KDE_struct_stat sbuff; - - TQCString file = TQFile::encodeName( copy ); - - if ( KDE_stat( (const char*)file, &sbuff ) == 0 ) { - if ( S_ISDIR ( sbuff.st_mode ) ) - match.append( '/' ); - } - else { - kdDebug() << "Could not stat file " << copy << endl; - } - } -} - -void KURLCompletion::postProcessMatches( TQStringList * matches ) const -{ - if ( !matches->isEmpty() && d->last_compl_type == CTFile ) { - TQStringList::Iterator it = matches->begin(); - for (; it != matches->end(); ++it ) { - adjustMatch( (*it) ); - } - } -} - -void KURLCompletion::postProcessMatches( KCompletionMatches * matches ) const -{ - if ( !matches->isEmpty() && d->last_compl_type == CTFile ) { - KCompletionMatches::Iterator it = matches->begin(); - for (; it != matches->end(); ++it ) { - adjustMatch( (*it).value() ); - } - } -} - -void KURLCompletion::customEvent(TQCustomEvent *e) -{ - if ( e->type() == CompletionMatchEvent::uniqueType() ) { - - CompletionMatchEvent *event = static_cast( e ); - - event->completionThread()->wait(); - - if ( !isListedURL( CTUser ) ) { - stop(); - clear(); - addMatches( event->completionThread()->matches() ); - } - - setListedURL( CTUser ); - - if ( d->userListThread == event->completionThread() ) - d->userListThread = 0; - - if ( d->dirListThread == event->completionThread() ) - d->dirListThread = 0; - - delete event->completionThread(); - } -} - -// static -TQString KURLCompletion::replacedPath( const TQString& text, bool replaceHome, bool replaceEnv ) -{ - if ( text.isEmpty() ) - return text; - - MyURL url( text, TQString::null ); // no need to replace something of our current cwd - if ( !url.kurl()->isLocalFile() ) - return text; - - url.filter( replaceHome, replaceEnv ); - return url.dir() + url.file(); -} - - -TQString KURLCompletion::replacedPath( const TQString& text ) -{ - return replacedPath( text, d->replace_home, d->replace_env ); -} - -///////////////////////////////////////////////////////// -///////////////////////////////////////////////////////// -// Static functions - -/* - * expandEnv - * - * Expand environment variables in text. Escaped '$' are ignored. - * Return true if expansion was made. - */ -static bool expandEnv( TQString &text ) -{ - // Find all environment variables beginning with '$' - // - int pos = 0; - - bool expanded = false; - - while ( (pos = text.find('$', pos)) != -1 ) { - - // Skip escaped '$' - // - if ( text[pos-1] == '\\' ) { - pos++; - } - // Variable found => expand - // - else { - // Find the end of the variable = next '/' or ' ' - // - int pos2 = text.find( ' ', pos+1 ); - int pos_tmp = text.find( '/', pos+1 ); - - if ( pos2 == -1 || (pos_tmp != -1 && pos_tmp < pos2) ) - pos2 = pos_tmp; - - if ( pos2 == -1 ) - pos2 = text.length(); - - // Replace if the variable is terminated by '/' or ' ' - // and defined - // - if ( pos2 >= 0 ) { - int len = pos2 - pos; - TQString key = text.mid( pos+1, len-1); - TQString value = - TQString::fromLocal8Bit( ::getenv(key.local8Bit()) ); - - if ( !value.isEmpty() ) { - expanded = true; - text.replace( pos, len, value ); - pos = pos + value.length(); - } - else { - pos = pos2; - } - } - } - } - - return expanded; -} - -/* - * expandTilde - * - * Replace "~user" with the users home directory - * Return true if expansion was made. - */ -static bool expandTilde(TQString &text) -{ - if ( text[0] != '~' ) - return false; - - bool expanded = false; - - // Find the end of the user name = next '/' or ' ' - // - int pos2 = text.find( ' ', 1 ); - int pos_tmp = text.find( '/', 1 ); - - if ( pos2 == -1 || (pos_tmp != -1 && pos_tmp < pos2) ) - pos2 = pos_tmp; - - if ( pos2 == -1 ) - pos2 = text.length(); - - // Replace ~user if the user name is terminated by '/' or ' ' - // - if ( pos2 >= 0 ) { - - TQString user = text.mid( 1, pos2-1 ); - TQString dir; - - // A single ~ is replaced with $HOME - // - if ( user.isEmpty() ) { - dir = TQDir::homeDirPath(); - } - // ~user is replaced with the dir from passwd - // - else { - struct passwd *pw = ::getpwnam( user.local8Bit() ); - - if ( pw ) - dir = TQFile::decodeName( pw->pw_dir ); - - ::endpwent(); - } - - if ( !dir.isEmpty() ) { - expanded = true; - text.replace(0, pos2, dir); - } - } - - return expanded; -} - -/* - * unescape - * - * Remove escapes and return the result in a new string - * - */ -static TQString unescape(const TQString &text) -{ - TQString result; - - for (uint pos = 0; pos < text.length(); pos++) - if ( text[pos] != '\\' ) - result.insert( result.length(), text[pos] ); - - return result; -} - -void KURLCompletion::virtual_hook( int id, void* data ) -{ KCompletion::virtual_hook( id, data ); } - -#include "kurlcompletion.moc" - diff --git a/kio/kio/kurlcompletion.h b/kio/kio/kurlcompletion.h deleted file mode 100644 index f785696b4..000000000 --- a/kio/kio/kurlcompletion.h +++ /dev/null @@ -1,236 +0,0 @@ -/* This file is part of the KDE libraries - Copyright (C) 2000 David Smith - - This class was inspired by a previous KURLCompletion by - Henner Zeller - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef KURLCOMPLETION_H -#define KURLCOMPLETION_H - -#include -#include -#include -#include - -class KURL; -class KURLCompletionPrivate; - -/** - * This class does completion of URLs including user directories (~user) - * and environment variables. Remote URLs are passed to KIO. - * - * @short Completion of a single URL - * @author David Smith - */ -class TDEIO_EXPORT KURLCompletion : public KCompletion -{ - Q_OBJECT - -public: - /** - * Determines how completion is done. - * @li ExeCompletion - executables in $PATH or with full path. - * @li FileCompletion - all files with full path or in dir(), URLs - * are listed using KIO. - * @li DirCompletion - Same as FileCompletion but only returns directories. - */ - enum Mode { ExeCompletion=1, FileCompletion, DirCompletion, SystemExeCompletion }; - - /** - * Constructs a KURLCompletion object in FileCompletion mode. - */ - KURLCompletion(); - /** - * This overloaded constructor allows you to set the Mode to ExeCompletion - * or FileCompletion without using setMode. Default is FileCompletion. - */ - KURLCompletion(Mode); - /** - * Destructs the KURLCompletion object. - */ - virtual ~KURLCompletion(); - - /** - * Finds completions to the given text. - * - * Remote URLs are listed with KIO. For performance reasons, local files - * are listed with KIO only if KURLCOMPLETION_LOCAL_KIO is set. - * The completion is done asyncronously if KIO is used. - * - * Returns the first match for user, environment, and local dir completion - * and TQString::null for asynchronous completion (KIO or threaded). - * - * @param text the text to complete - * @return the first match, or TQString::null if not found - */ - virtual TQString makeCompletion(const TQString &text); // KDE4: remove return value, it's often null due to threading - - /** - * Sets the current directory (used as base for completion). - * Default = $HOME. - * @param dir the current directory, either as a path or URL - */ - virtual void setDir(const TQString &dir); - - /** - * Returns the current directory, as it was given in setDir - * @return the current directory (path or URL) - */ - virtual TQString dir() const; - - /** - * Check whether asynchronous completion is in progress. - * @return true if asynchronous completion is in progress - */ - virtual bool isRunning() const; - - /** - * Stops asynchronous completion. - */ - virtual void stop(); - - /** - * Returns the completion mode: exe or file completion (default FileCompletion). - * @return the completion mode - */ - virtual Mode mode() const; - - /** - * Changes the completion mode: exe or file completion - * @param mode the new completion mode - */ - virtual void setMode( Mode mode ); - - /** - * Checks whether environment variables are completed and - * whether they are replaced internally while finding completions. - * Default is enabled. - * @return true if environment vvariables will be replaced - */ - virtual bool replaceEnv() const; - - /** - * Enables/disables completion and replacement (internally) of - * environment variables in URLs. Default is enabled. - * @param replace true to replace environment variables - */ - virtual void setReplaceEnv( bool replace ); - - /** - * Returns whether ~username is completed and whether ~username - * is replaced internally with the user's home directory while - * finding completions. Default is enabled. - * @return true to replace tilde with the home directory - */ - virtual bool replaceHome() const; - - /** - * Enables/disables completion of ~username and replacement - * (internally) of ~username with the user's home directory. - * Default is enabled. - * @param replace true to replace tilde with the home directory - */ - virtual void setReplaceHome( bool replace ); - - /** - * Replaces username and/or environment variables, depending on the - * current settings and returns the filtered url. Only works with - * local files, i.e. returns back the original string for non-local - * urls. - * @param text the text to process - * @return the path or URL resulting from this operation. If you - * want to convert it to a KURL, use KURL::fromPathOrURL. - */ - TQString replacedPath( const TQString& text ); - - /** - * @internal I'll let ossi add a real one to KShell :) - * @since 3.2 - */ - static TQString replacedPath( const TQString& text, - bool replaceHome, bool replaceEnv = true ); - - class MyURL; -protected: - // Called by KCompletion, adds '/' to directories - void postProcessMatch( TQString *match ) const; - void postProcessMatches( TQStringList *matches ) const; - void postProcessMatches( KCompletionMatches* matches ) const; - - virtual void customEvent( TQCustomEvent *e ); - -protected slots: - void slotEntries( TDEIO::Job *, const TDEIO::UDSEntryList& ); - void slotIOFinished( TDEIO::Job * ); - -private: - - bool isAutoCompletion(); - - bool userCompletion(const MyURL &url, TQString *match); - bool envCompletion(const MyURL &url, TQString *match); - bool exeCompletion(const MyURL &url, TQString *match); - bool systemexeCompletion(const MyURL &url, TQString *match); - bool fileCompletion(const MyURL &url, TQString *match); - bool urlCompletion(const MyURL &url, TQString *match); - - // List a directory using readdir() - void listDir( const TQString& dir, - TQStringList *matches, - const TQString& filter, - bool only_exe, - bool no_hidden ); - - // List the next dir in m_dirs - TQString listDirectories(const TQStringList &, - const TQString &, - bool only_exe = false, - bool only_dir = false, - bool no_hidden = false, - bool stat_files = true); - - void listURLs( const TQValueList &urls, - const TQString &filter = TQString::null, - bool only_exe = false, - bool no_hidden = false ); - - void addMatches( const TQStringList & ); - TQString finished(); - - void init(); - - void setListedURL(int compl_type /* enum ComplType */, - const TQString& dir = TQString::null, - const TQString& filter = TQString::null, - bool no_hidden = false ); - - bool isListedURL( int compl_type /* enum ComplType */, - const TQString& dir = TQString::null, - const TQString& filter = TQString::null, - bool no_hidden = false ); - - void adjustMatch( TQString& match ) const; - -protected: - virtual void virtual_hook( int id, void* data ); -private: - KURLCompletionPrivate *d; -}; - -#endif // KURLCOMPLETION_H diff --git a/kio/kio/kurlpixmapprovider.cpp b/kio/kio/kurlpixmapprovider.cpp deleted file mode 100644 index caeedf066..000000000 --- a/kio/kio/kurlpixmapprovider.cpp +++ /dev/null @@ -1,33 +0,0 @@ -/* This file is part of the KDE libraries - - Copyright (c) 2000 Carsten Pfeiffer - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License (LGPL) as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include "kurlpixmapprovider.h" - -TQPixmap KURLPixmapProvider::pixmapFor( const TQString& url, int size ) { - KURL u; - if ( url.at(0) == '/' ) - u.setPath( url ); - else - u = url; - return KMimeType::pixmapForURL( u, 0, KIcon::Desktop, size ); - } - -void KURLPixmapProvider::virtual_hook( int id, void* data ) -{ KPixmapProvider::virtual_hook( id, data ); } diff --git a/kio/kio/kurlpixmapprovider.h b/kio/kio/kurlpixmapprovider.h deleted file mode 100644 index 82be4bd1b..000000000 --- a/kio/kio/kurlpixmapprovider.h +++ /dev/null @@ -1,59 +0,0 @@ -/* This file is part of the KDE libraries - - Copyright (c) 2000 Carsten Pfeiffer - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License (LGPL) as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef KURLPIXMAPPROVIDER_H -#define KURLPIXMAPPROVIDER_H - -#include -#include - -/** - * Implementation of KPixmapProvider. - * - * Uses KMimeType::pixmapForURL() to resolve icons. - * - * Instatiate this class and supply it to the desired class, e.g. - * \code - * KHistoryCombo *combo = new KHistoryCombo( this ); - * combo->setPixmapProvider( new KURLPixmapProvider ); - * [...] - * \endcode - * - * @short Resolves pixmaps for URLs - * @author Carsten Pfeiffer - */ -class TDEIO_EXPORT KURLPixmapProvider : public KPixmapProvider -{ -public: - /** - * Returns a pixmap for @p url with size @p size. - * Uses KMimeType::pixmapForURL(). - * @param url the URL to fetch a pixmap for - * @param size the size of the pixmap in pixels, or 0 for default. - * @return the resulting pixmap - * @see KIcon::StdSizes - */ - virtual TQPixmap pixmapFor( const TQString& url, int size = 0 ); -protected: - virtual void virtual_hook( int id, void* data ); -}; - - -#endif // KURLPIXMAPPROVIDER_H diff --git a/kio/kio/kuserprofile.cpp b/kio/kio/kuserprofile.cpp deleted file mode 100644 index b413b3cd5..000000000 --- a/kio/kio/kuserprofile.cpp +++ /dev/null @@ -1,355 +0,0 @@ -/* This file is part of the KDE libraries - * Copyright (C) 1999 Torben Weis - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License version 2 as published by the Free Software Foundation; - * - * This library 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 - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public License - * along with this library; see the file COPYING.LIB. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - **/ - -#include "kuserprofile.h" -#include "kservice.h" -#include "kservicetype.h" -#include "kservicetypefactory.h" - -#include -#include -#include -#include -#include - -#include - -template class TQPtrList; -typedef TQPtrList KServiceTypeProfileList; - -/********************************************* - * - * KServiceTypeProfile - * - *********************************************/ - -KServiceTypeProfileList* KServiceTypeProfile::s_lstProfiles = 0L; -static KStaticDeleter< KServiceTypeProfileList > profileDeleter; -bool KServiceTypeProfile::s_configurationMode = false; - -void KServiceTypeProfile::initStatic() -{ - if ( s_lstProfiles ) - return; - - // Make sure that a KServiceTypeFactory gets created. - (void) KServiceTypeFactory::self(); - - profileDeleter.setObject(s_lstProfiles, new KServiceTypeProfileList); - s_lstProfiles->setAutoDelete( true ); - - TDEConfig config( "profilerc", true, false); - - static const TQString & defaultGroup = TDEGlobal::staticQString(""); - - TQStringList tmpList = config.groupList(); - for (TQStringList::Iterator aIt = tmpList.begin(); - aIt != tmpList.end(); ++aIt) { - if ( *aIt == defaultGroup ) - continue; - - config.setGroup( *aIt ); - - TQString appId = config.readEntry( "Application" ); - - KService::Ptr pService = KService::serviceByStorageId(appId); - - if ( pService ) { - TQString application = pService->storageId(); - TQString type = config.readEntry( "ServiceType" ); - TQString type2 = config.readEntry( "GenericServiceType" ); - if (type2.isEmpty()) // compat code - type2 = (pService->type() == "Application") ? "Application" : "KParts/ReadOnlyPart"; - int pref = config.readNumEntry( "Preference" ); - - if ( !type.isEmpty() /* && pref >= 0*/ ) // Don't test for pref here. We want those in the list, to mark them as forbidden - { - KServiceTypeProfile* p = - KServiceTypeProfile::serviceTypeProfile( type, type2 ); - - if ( !p ) { - p = new KServiceTypeProfile( type, type2 ); - s_lstProfiles->append( p ); - } - - bool allow = config.readBoolEntry( "AllowAsDefault" ); - //kdDebug(7014) << "KServiceTypeProfile::initStatic adding service " << application << " to profile for " << type << "," << type2 << " with preference " << pref << endl; - p->addService( application, pref, allow ); - } - } - } -} - -//static -void KServiceTypeProfile::clear() -{ - // HACK tdesycoca may open the dummy db, in such case the first call to tdesycoca - // in initStatic() leads to closing the dummy db and clear() being called - // in the middle of it, making s_lstProfiles be NULL - if( s_lstProfiles == NULL || s_lstProfiles->count() == 0 ) - return; - profileDeleter.destructObject(); -} - -//static -KServiceTypeProfile::OfferList KServiceTypeProfile::offers( const TQString& _servicetype, const TQString& _genericServiceType ) -{ - OfferList offers; - TQStringList serviceList; - //kdDebug(7014) << "KServiceTypeProfile::offers( " << _servicetype << "," << _genericServiceType << " )" << endl; - - // Note that KServiceTypeProfile::offers() calls KServiceType::offers(), - // so we _do_ get the new services, that are available but not in the profile. - if ( _genericServiceType.isEmpty() ) - { - initStatic(); - // We want all profiles for servicetype, if we have profiles. - // ## Slow loop, if profilerc is big. We should use a map instead? - TQPtrListIterator it( *s_lstProfiles ); - for( ; it.current(); ++it ) - if ( it.current()->m_strServiceType == _servicetype ) - { - offers += it.current()->offers(); - } - //kdDebug(7014) << "Found profile: " << offers.count() << " offers" << endl; - } - else - { - KServiceTypeProfile* profile = serviceTypeProfile( _servicetype, _genericServiceType ); - if ( profile ) - { - //kdDebug(7014) << "Found profile: " << profile->offers().count() << " offers" << endl; - offers += profile->offers(); - } - else - { - // Try the other way round, order is not like size, it doesn't matter. - profile = serviceTypeProfile( _genericServiceType, _servicetype ); - if ( profile ) - { - //kdDebug(7014) << "Found profile after switching: " << profile->offers().count() << " offers" << endl; - offers += profile->offers(); - } - } - } - - // Collect services, to make the next loop faster - OfferList::Iterator itOffers = offers.begin(); - for( ; itOffers != offers.end(); ++itOffers ) - serviceList += (*itOffers).service()->desktopEntryPath(); // this should identify each service uniquely - //kdDebug(7014) << "serviceList: " << serviceList.join(",") << endl; - - // Now complete with any other offers that aren't in the profile - // This can be because the services have been installed after the profile was written, - // but it's also the case for any service that's neither App nor ReadOnlyPart, e.g. RenameDlg/Plugin - KService::List list = KServiceType::offers( _servicetype ); - //kdDebug(7014) << "Using KServiceType::offers, result: " << list.count() << " offers" << endl; - TQValueListIterator it = list.begin(); - for( ; it != list.end(); ++it ) - { - if (_genericServiceType.isEmpty() /*no constraint*/ || (*it)->hasServiceType( _genericServiceType )) - { - // Check that we don't already have it ;) - if ( serviceList.find( (*it)->desktopEntryPath() ) == serviceList.end() ) - { - bool allow = (*it)->allowAsDefault(); - KServiceOffer o( (*it), (*it)->initialPreferenceForMimeType(_servicetype), allow ); - offers.append( o ); - //kdDebug(7014) << "Appending offer " << (*it)->name() << " initial preference=" << (*it)->initialPreference() << " allow-as-default=" << allow << endl; - } - //else - // kdDebug(7014) << "Already having offer " << (*it)->name() << endl; - } - } - - qBubbleSort( offers ); - -#if 0 - // debug code, comment if you wish but don't remove. - kdDebug(7014) << "Sorted list:" << endl; - OfferList::Iterator itOff = offers.begin(); - for( ; itOff != offers.end(); ++itOff ) - kdDebug(7014) << (*itOff).service()->name() << " allow-as-default=" << (*itOff).allowAsDefault() << endl; -#endif - - //kdDebug(7014) << "Returning " << offers.count() << " offers" << endl; - return offers; -} - -KServiceTypeProfile::KServiceTypeProfile( const TQString& _servicetype, const TQString& _genericServiceType ) -{ - initStatic(); - - m_strServiceType = _servicetype; - m_strGenericServiceType = _genericServiceType; -} - -KServiceTypeProfile::~KServiceTypeProfile() -{ -} - -void KServiceTypeProfile::addService( const TQString& _service, - int _preference, bool _allow_as_default ) -{ - m_mapServices[ _service ].m_iPreference = _preference; - m_mapServices[ _service ].m_bAllowAsDefault = _allow_as_default; -} - -int KServiceTypeProfile::preference( const TQString& _service ) const -{ - KService::Ptr service = KService::serviceByName( _service ); - if (!service) - return 0; - TQMap::ConstIterator it = m_mapServices.find( service->storageId() ); - if ( it == m_mapServices.end() ) - return 0; - - return it.data().m_iPreference; -} - -bool KServiceTypeProfile::allowAsDefault( const TQString& _service ) const -{ - KService::Ptr service = KService::serviceByName( _service ); - if (!service) - return false; - - // Does the service itself not allow that ? - if ( !service->allowAsDefault() ) - return false; - - // Look what the user says ... - TQMap::ConstIterator it = m_mapServices.find( service->storageId() ); - if ( it == m_mapServices.end() ) - return 0; - - return it.data().m_bAllowAsDefault; -} - -KServiceTypeProfile* KServiceTypeProfile::serviceTypeProfile( const TQString& _servicetype, const TQString& _genericServiceType ) -{ - initStatic(); - static const TQString& app_str = TDEGlobal::staticQString("Application"); - - const TQString &_genservicetype = ((!_genericServiceType.isEmpty()) ? _genericServiceType : app_str); - - TQPtrListIterator it( *s_lstProfiles ); - for( ; it.current(); ++it ) - if (( it.current()->m_strServiceType == _servicetype ) && - ( it.current()->m_strGenericServiceType == _genservicetype)) - return it.current(); - - return 0; -} - - -KServiceTypeProfile::OfferList KServiceTypeProfile::offers() const -{ - OfferList offers; - - kdDebug(7014) << "KServiceTypeProfile::offers serviceType=" << m_strServiceType << " genericServiceType=" << m_strGenericServiceType << endl; - KService::List list = KServiceType::offers( m_strServiceType ); - TQValueListIterator it = list.begin(); - for( ; it != list.end(); ++it ) - { - //kdDebug(7014) << "KServiceTypeProfile::offers considering " << (*it)->name() << endl; - if ( m_strGenericServiceType.isEmpty() || (*it)->hasServiceType( m_strGenericServiceType ) ) - { - // Now look into the profile, to find this service's preference. - TQMap::ConstIterator it2 = m_mapServices.find( (*it)->storageId() ); - - if( it2 != m_mapServices.end() ) - { - //kdDebug(7014) << "found in mapServices pref=" << it2.data().m_iPreference << endl; - if ( it2.data().m_iPreference > 0 ) { - bool allow = (*it)->allowAsDefault(); - if ( allow ) - allow = it2.data().m_bAllowAsDefault; - KServiceOffer o( (*it), it2.data().m_iPreference, allow ); - offers.append( o ); - } - } - else - { - //kdDebug(7014) << "not found in mapServices. Appending." << endl; - // We use 0 as the preference to ensure new apps don't take over existing apps (which default to 1) - KServiceOffer o( (*it), 0, (*it)->allowAsDefault() ); - offers.append( o ); - } - }/* else - kdDebug(7014) << "Doesn't have " << m_strGenericServiceType << endl;*/ - } - - qBubbleSort( offers ); - - //kdDebug(7014) << "KServiceTypeProfile::offers returning " << offers.count() << " offers" << endl; - return offers; -} - -KService::Ptr KServiceTypeProfile::preferredService( const TQString & _serviceType, const TQString & _genericServiceType ) -{ - OfferList lst = offers( _serviceType, _genericServiceType ); - - OfferList::Iterator itOff = lst.begin(); - // Look for the first one that is allowed as default. - // Since the allowed-as-default are first anyway, we only have - // to look at the first one to know. - if( itOff != lst.end() && (*itOff).allowAsDefault() ) - return (*itOff).service(); - - //kdDebug(7014) << "No offers, or none allowed as default" << endl; - return 0L; -} - -/********************************************* - * - * KServiceOffer - * - *********************************************/ - -KServiceOffer::KServiceOffer() -{ - m_iPreference = -1; -} - -KServiceOffer::KServiceOffer( const KServiceOffer& _o ) -{ - m_pService = _o.m_pService; - m_iPreference = _o.m_iPreference; - m_bAllowAsDefault = _o.m_bAllowAsDefault; -} - -KServiceOffer::KServiceOffer( KService::Ptr _service, int _pref, bool _default ) -{ - m_pService = _service; - m_iPreference = _pref; - m_bAllowAsDefault = _default; -} - - -bool KServiceOffer::operator< ( const KServiceOffer& _o ) const -{ - // Put offers allowed as default FIRST. - if ( _o.m_bAllowAsDefault && !m_bAllowAsDefault ) - return false; // _o is default and not 'this'. - if ( !_o.m_bAllowAsDefault && m_bAllowAsDefault ) - return true; // 'this' is default but not _o. - // Both offers are allowed or not allowed as default - // -> use preferences to sort them - // The bigger the better, but we want the better FIRST - return _o.m_iPreference < m_iPreference; -} diff --git a/kio/kio/kuserprofile.h b/kio/kio/kuserprofile.h deleted file mode 100644 index 45b58fe6a..000000000 --- a/kio/kio/kuserprofile.h +++ /dev/null @@ -1,282 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 1998, 1999 Torben Weis - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef __kuserprofile_h__ -#define __kuserprofile_h__ - -#include -#include -#include -#include - -#include - -/** - * This class holds the user-specific preferences of a service - * (whether it can be a default offer or not, how big is the preference - * for this offer, ...). Basically it is a reference to a - * KService, a number that represents the user's preference (bigger - * is better) and a flag whether the KService can be used as default. - * - * @see KService - * @short Holds the user's preference of a service. - */ -class TDEIO_EXPORT KServiceOffer -{ -public: - /** - * Create an invalid service offer. - */ - KServiceOffer(); - - /** - * Copy constructor. - * Shallow copy (the KService will not be copied). - */ - KServiceOffer( const KServiceOffer& ); - - /** - * Creates a new KServiceOffer. - * @param _service a pointer to the KService - * @param _pref the user's preference value, must be positive, - * bigger is better - * @param _default true if the service should be used as - * default - */ - KServiceOffer( KService::Ptr _service, - int _pref, bool _default ); - - /** - * A service is bigger that the other when it can be default - * (and the other is not) and its preference value it higher. - */ - bool operator< ( const KServiceOffer& ) const; - /** - * Is it allowed to use this service for default actions - * (e.g. Left Click in a file manager, or KRun in general). - * @return true if the service is a allowed as default - */ - bool allowAsDefault() const { return m_bAllowAsDefault; } - /** - * The bigger this number is, the better is this service. - * @return the preference number (negative numbers will be - * returned by invalid service offers) - */ - int preference() const { return m_iPreference; } - /** - * The service which this offer is about. - * @return the service this offer is about, can be 0 - * in valid offers or when not set - */ - KService::Ptr service() const { return m_pService; } - /** - * Check whether the entry is valid. A service is valid if - * its preference value is positive. - * @return true if the service offer is valid - */ - bool isValid() const { return m_iPreference >= 0; } - -private: - int m_iPreference; - bool m_bAllowAsDefault; - KService::Ptr m_pService; -private: - class KServiceOfferPrivate; -}; - -/** - * KServiceTypeProfile represents the user's preferences for services - * of a service type. - * It consists of a list of services (service offers) for the service type - * that is sorted by the user's preference. - * KTrader uses KServiceTypeProfile to sort its results, so usually - * you can just use KTrader to find the user's preferred service. - * - * @see KService - * @see KServiceType - * @see KServiceOffer - * @see KTrader - * @short Represents the user's preferences for services of a service type - */ -class TDEIO_EXPORT KServiceTypeProfile -{ -public: - typedef TQValueList OfferList; - - ~KServiceTypeProfile(); - - /** - * @deprecated Remove in KDE 4, unused. - * Returns the users preference of the given service. - * @param _service the name of the service to check - * @return the user's preference number of the given - * @p _service, or 0 the service is unknown. - */ - int preference( const TQString& _service ) const; - - /** - * @deprecated Remove in KDE 4, unused. - * Checks whether the given @p _service can be used as default. - * @param _service the name of the service to check - * @return true if allowed as default - */ - bool allowAsDefault( const TQString& _service ) const; - - /** - * Returns the list of all service offers for the service types - * that are represented by this profile. - * @return the list of KServiceOffer instances - */ - OfferList offers() const; - - /** - * Returns the preferred service for @p _serviceType and @p _genericServiceType - * ("Application", type of component, or null). - * - * @param serviceType the service type (e.g. a MIME type) - * @param genericServiceType the generic service type (e.g. "Application" or - * "KParts/ReadOnlyPart") - * @return the preferred service, or 0 if no service is available - */ - static KService::Ptr preferredService( const TQString & serviceType, const TQString & genericServiceType ); - - /** - * Returns the profile for the requested service type. - * @param servicetype the service type (e.g. a MIME type) - * @param genericServiceType the generic service type (e.g. "Application" - * or "KParts/ReadOnlyPart"). Can be TQString::null, - * then the "Application" generic type will be used - * @return the KServiceTypeProfile with the given arguments, or 0 if not found - */ - static KServiceTypeProfile* serviceTypeProfile( const TQString& servicetype, const TQString & genericServiceType = TQString::null ); - - /** - * Returns the offers associated with a given servicetype, sorted by preference. - * This is what KTrader uses to get the list of offers, before applying the - * constraints and preferences. - * - * If @p genericServiceType is specified, a list is returned with - * the offers associated with the combination of the two service types. - * This is almost like an "foo in ServiceTypes" constraint in the KTrader, - * but the difference is that to order the offers, we will look at entries - * specifically for those two service types. Typically, this is used for - * getting the list of embeddable components that can handle a given mimetype. - * In that case, @p servicetype is the mimetype and @p genericServiceType is "KParts/ReadOnlyPart". - * - * @param servicetype the service type (e.g. a MIME type) - * @param genericServiceType the generic service type (e.g. "Application" - * or "KParts/ReadOnlyPart"). Can be TQString::null, - * then all generic types will be included - * @return the list of offers witht he given parameters - */ - static OfferList offers( const TQString& servicetype, const TQString& genericServiceType = TQString::null ); - - /** - * Returns a list of all KServiceTypeProfiles. - * @return a list of all KServiceTypeProfiles - */ - static const TQPtrList& serviceTypeProfiles() { return *s_lstProfiles; } - - /** - * Clear all cached information - */ - static void clear(); - - /** - * This method activates a special mode of KServiceTypeProfile, in which all/all - * and all/allfiles are excluded from the results of the queries. - * It is meant for the configuration module _only_. - * @internal - */ - static void setConfigurationMode() { s_configurationMode = true; } - - /** - * This method deactivates the special mode above of KServiceTypeProfile - * It is meant for the configuration module _only_. - * @internal - * @since 3.5.7 - */ - static void unsetConfigurationMode() { s_configurationMode = false; } - - /** - * @internal - */ - static bool configurationMode() { return s_configurationMode; } - -protected: - /** - * Constructor is called when the user profile is read for the - * first time. - * @param serviceType the service type (e.g. a MIME type) - * @param genericServiceType the generic service type (e.g. "Application" - * or "KParts/ReadOnlyPart"). Can be TQString::null, - * then the "Application" generic type will be used - */ - KServiceTypeProfile( const TQString& serviceType, - const TQString& genericServiceType = TQString::null ); - - /** - * Add a service to this profile. - * @param _service the name of the service - * @param _preference the user's preference value, must be positive, - * bigger is better - * @param _allow_as_default true if the service should be used as - * default - */ - void addService( const TQString& _service, int _preference = 1, bool _allow_as_default = true ); - -private: - /** - * Represents the users assessment of a special service - */ - struct Service - { - /** - * The bigger this number is, the better is this service. - */ - int m_iPreference; - /** - * Is it allowed to use this service for default actions. - */ - bool m_bAllowAsDefault; - }; - - /** - * Map of all services for which we have assessments. - */ - TQMap m_mapServices; - - /** - * ServiceType of this profile. - */ - TQString m_strServiceType; - - /** - * Secondary ServiceType of this profile. - */ - TQString m_strGenericServiceType; - - static void initStatic(); - static TQPtrList* s_lstProfiles; - static bool s_configurationMode; -private: - class KServiceTypeProfilePrivate* d; -}; - -#endif diff --git a/kio/kio/kzip.cpp b/kio/kio/kzip.cpp deleted file mode 100644 index 6241cc1ca..000000000 --- a/kio/kio/kzip.cpp +++ /dev/null @@ -1,1460 +0,0 @@ -/* This file is part of the KDE libraries - Copyright (C) 2000 David Faure - Copyright (C) 2002 Holger Schroeder - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License version 2 as published by the Free Software Foundation. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -/* - This class implements a kioslave to access ZIP files from KDE. - you can use it in IO_ReadOnly or in IO_WriteOnly mode, and it - behaves just as expected (i hope ;-) ). - It can also be used in IO_ReadWrite mode, in this case one can - append files to an existing zip archive. when you append new files, which - are not yet in the zip, it works as expected, they are appended at the end. - when you append a file, which is already in the file, the reference to the - old file is dropped and the new one is added to the zip. but the - old data from the file itself is not deleted, it is still in the - zipfile. so when you want to have a small and garbagefree zipfile, - just read the contents of the appended zipfile and write it to a new one - in IO_WriteOnly mode. especially take care of this, when you don't want - to leak information of how intermediate versions of files in the zip - were looking. - For more information on the zip fileformat go to - http://www.pkware.com/support/appnote.html . - -*/ - -#include "kzip.h" -#include "kfilterdev.h" -#include "klimitediodevice.h" -#include -#include -#include - -#include -#include -#include -#include -#include - -#include -#include -#include - -const int max_path_len = 4095; // maximum number of character a path may contain - -static void transformToMsDos(const TQDateTime& dt, char* buffer) -{ - if ( dt.isValid() ) - { - const TQ_UINT16 time = - ( dt.time().hour() << 11 ) // 5 bit hour - | ( dt.time().minute() << 5 ) // 6 bit minute - | ( dt.time().second() >> 1 ); // 5 bit double seconds - - buffer[0] = char(time); - buffer[1] = char(time >> 8); - - const TQ_UINT16 date = - ( ( dt.date().year() - 1980 ) << 9 ) // 7 bit year 1980-based - | ( dt.date().month() << 5 ) // 4 bit month - | ( dt.date().day() ); // 5 bit day - - buffer[2] = char(date); - buffer[3] = char(date >> 8); - } - else // !dt.isValid(), assume 1980-01-01 midnight - { - buffer[0] = 0; - buffer[1] = 0; - buffer[2] = 33; - buffer[3] = 0; - } -} - -static time_t transformFromMsDos(const char* buffer) -{ - TQ_UINT16 time = (uchar)buffer[0] | ( (uchar)buffer[1] << 8 ); - int h = time >> 11; - int m = ( time & 0x7ff ) >> 5; - int s = ( time & 0x1f ) * 2 ; - TQTime qt(h, m, s); - - TQ_UINT16 date = (uchar)buffer[2] | ( (uchar)buffer[3] << 8 ); - int y = ( date >> 9 ) + 1980; - int o = ( date & 0x1ff ) >> 5; - int d = ( date & 0x1f ); - TQDate qd(y, o, d); - - TQDateTime dt( qd, qt ); - return dt.toTime_t(); -} - -// == parsing routines for zip headers - -/** all relevant information about parsing file information */ -struct ParseFileInfo { - // file related info -// TQCString name; // filename - mode_t perm; // permissions of this file - time_t atime; // last access time (UNIX format) - time_t mtime; // modification time (UNIX format) - time_t ctime; // creation time (UNIX format) - int uid; // user id (-1 if not specified) - int gid; // group id (-1 if not specified) - TQCString guessed_symlink; // guessed symlink target - int extralen; // length of extra field - - // parsing related info - bool exttimestamp_seen; // true if extended timestamp extra field - // has been parsed - bool newinfounix_seen; // true if Info-ZIP Unix New extra field has - // been parsed - - ParseFileInfo() : perm(0100644), uid(-1), gid(-1), extralen(0), - exttimestamp_seen(false), newinfounix_seen(false) { - ctime = mtime = atime = time(0); - } -}; - -/** updates the parse information with the given extended timestamp extra field. - * @param buffer start content of buffer known to contain an extended - * timestamp extra field (without magic & size) - * @param size size of field content (must not count magic and size entries) - * @param islocal true if this is a local field, false if central - * @param pfi ParseFileInfo object to be updated - * @return true if processing was successful - */ -static bool parseExtTimestamp(const char *buffer, int size, bool islocal, - ParseFileInfo &pfi) { - if (size < 1) { - kdDebug(7040) << "premature end of extended timestamp (#1)" << endl; - return false; - }/*end if*/ - int flags = *buffer; // read flags - buffer += 1; - size -= 1; - - if (flags & 1) { // contains modification time - if (size < 4) { - kdDebug(7040) << "premature end of extended timestamp (#2)" << endl; - return false; - }/*end if*/ - pfi.mtime = time_t((uchar)buffer[0] | (uchar)buffer[1] << 8 - | (uchar)buffer[2] << 16 | (uchar)buffer[3] << 24); - buffer += 4; - size -= 4; - }/*end if*/ - // central extended field cannot contain more than the modification time - // even if other flags are set - if (!islocal) { - pfi.exttimestamp_seen = true; - return true; - }/*end if*/ - - if (flags & 2) { // contains last access time - if (size < 4) { - kdDebug(7040) << "premature end of extended timestamp (#3)" << endl; - return true; - }/*end if*/ - pfi.atime = time_t((uchar)buffer[0] | (uchar)buffer[1] << 8 - | (uchar)buffer[2] << 16 | (uchar)buffer[3] << 24); - buffer += 4; - size -= 4; - }/*end if*/ - - if (flags & 4) { // contains creation time - if (size < 4) { - kdDebug(7040) << "premature end of extended timestamp (#4)" << endl; - return true; - }/*end if*/ - pfi.ctime = time_t((uchar)buffer[0] | (uchar)buffer[1] << 8 - | (uchar)buffer[2] << 16 | (uchar)buffer[3] << 24); - buffer += 4; - }/*end if*/ - - pfi.exttimestamp_seen = true; - return true; -} - -/** updates the parse information with the given Info-ZIP Unix old extra field. - * @param buffer start of content of buffer known to contain an Info-ZIP - * Unix old extra field (without magic & size) - * @param size size of field content (must not count magic and size entries) - * @param islocal true if this is a local field, false if central - * @param pfi ParseFileInfo object to be updated - * @return true if processing was successful - */ -static bool parseInfoZipUnixOld(const char *buffer, int size, bool islocal, - ParseFileInfo &pfi) { - // spec mandates to omit this field if one of the newer fields are available - if (pfi.exttimestamp_seen || pfi.newinfounix_seen) return true; - - if (size < 8) { - kdDebug(7040) << "premature end of Info-ZIP unix extra field old" << endl; - return false; - }/*end if*/ - - pfi.atime = time_t((uchar)buffer[0] | (uchar)buffer[1] << 8 - | (uchar)buffer[2] << 16 | (uchar)buffer[3] << 24); - buffer += 4; - pfi.mtime = time_t((uchar)buffer[0] | (uchar)buffer[1] << 8 - | (uchar)buffer[2] << 16 | (uchar)buffer[3] << 24); - buffer += 4; - if (islocal && size >= 12) { - pfi.uid = (uchar)buffer[0] | (uchar)buffer[1] << 8; - buffer += 2; - pfi.gid = (uchar)buffer[0] | (uchar)buffer[1] << 8; - buffer += 2; - }/*end if*/ - return true; -} - -#if 0 // not needed yet -/** updates the parse information with the given Info-ZIP Unix new extra field. - * @param buffer start of content of buffer known to contain an Info-ZIP - * Unix new extra field (without magic & size) - * @param size size of field content (must not count magic and size entries) - * @param islocal true if this is a local field, false if central - * @param pfi ParseFileInfo object to be updated - * @return true if processing was successful - */ -static bool parseInfoZipUnixNew(const char *buffer, int size, bool islocal, - ParseFileInfo &pfi) { - if (!islocal) { // contains nothing in central field - pfi.newinfounix = true; - return true; - }/*end if*/ - - if (size < 4) { - kdDebug(7040) << "premature end of Info-ZIP unix extra field new" << endl; - return false; - }/*end if*/ - - pfi.uid = (uchar)buffer[0] | (uchar)buffer[1] << 8; - buffer += 2; - pfi.gid = (uchar)buffer[0] | (uchar)buffer[1] << 8; - buffer += 2; - - pfi.newinfounix = true; - return true; -} -#endif - -/** - * parses the extra field - * @param buffer start of buffer where the extra field is to be found - * @param size size of the extra field - * @param islocal true if this is part of a local header, false if of central - * @param pfi ParseFileInfo object which to write the results into - * @return true if parsing was successful - */ -static bool parseExtraField(const char *buffer, int size, bool islocal, - ParseFileInfo &pfi) { - // extra field in central directory doesn't contain useful data, so we - // don't bother parsing it - if (!islocal) return true; - - while (size >= 4) { // as long as a potential extra field can be read - int magic = (uchar)buffer[0] | (uchar)buffer[1] << 8; - buffer += 2; - int fieldsize = (uchar)buffer[0] | (uchar)buffer[1] << 8; - buffer += 2; - size -= 4; - - if (fieldsize > size) { - //kdDebug(7040) << "fieldsize: " << fieldsize << " size: " << size << endl; - kdDebug(7040) << "premature end of extra fields reached" << endl; - break; - }/*end if*/ - - switch (magic) { - case 0x5455: // extended timestamp - if (!parseExtTimestamp(buffer, fieldsize, islocal, pfi)) return false; - break; - case 0x5855: // old Info-ZIP unix extra field - if (!parseInfoZipUnixOld(buffer, fieldsize, islocal, pfi)) return false; - break; -#if 0 // not needed yet - case 0x7855: // new Info-ZIP unix extra field - if (!parseInfoZipUnixNew(buffer, fieldsize, islocal, pfi)) return false; - break; -#endif - default: - /* ignore everything else */; - }/*end switch*/ - - buffer += fieldsize; - size -= fieldsize; - }/*wend*/ - return true; -} - -//////////////////////////////////////////////////////////////////////// -/////////////////////////// KZip /////////////////////////////////////// -//////////////////////////////////////////////////////////////////////// - -class KZip::KZipPrivate -{ -public: - KZipPrivate() - : m_crc( 0 ), - m_currentFile( 0L ), - m_currentDev( 0L ), - m_compression( 8 ), - m_extraField( KZip::NoExtraField ), - m_offset( 0L ), - m_saveFile( 0 ) {} - - unsigned long m_crc; // checksum - KZipFileEntry* m_currentFile; // file currently being written - TQIODevice* m_currentDev; // filterdev used to write to the above file - TQPtrList m_fileList; // flat list of all files, for the index (saves a recursive method ;) - int m_compression; - KZip::ExtraField m_extraField; - unsigned int m_offset; // holds the offset of the place in the zip, - // where new data can be appended. after openarchive it points to 0, when in - // writeonly mode, or it points to the beginning of the central directory. - // each call to writefile updates this value. - KSaveFile* m_saveFile; -}; - -KZip::KZip( const TQString& filename ) - : KArchive( 0L ) -{ - //kdDebug(7040) << "KZip(filename) reached." << endl; - Q_ASSERT( !filename.isEmpty() ); - m_filename = filename; - d = new KZipPrivate; - // unusual: this ctor leaves the device set to 0. - // This is for the use of KSaveFile, see openArchive. - // KDE4: move KSaveFile support to base class, KArchive. -} - -KZip::KZip( TQIODevice * dev ) - : KArchive( dev ) -{ - //kdDebug(7040) << "KZip::KZip( TQIODevice * dev) reached." << endl; - d = new KZipPrivate; -} - -KZip::~KZip() -{ - // mjarrett: Closes to prevent ~KArchive from aborting w/o device - //kdDebug(7040) << "~KZip reached." << endl; - if( isOpened() ) - close(); - if ( !m_filename.isEmpty() ) { // we created the device ourselves - if ( d->m_saveFile ) // writing mode - delete d->m_saveFile; - else // reading mode - delete device(); // (the TQFile) - } - delete d; -} - -bool KZip::openArchive( int mode ) -{ - //kdDebug(7040) << "openarchive reached." << endl; - d->m_fileList.clear(); - - switch ( mode ) { - case IO_WriteOnly: - // The use of KSaveFile can't be done in the ctor (no mode known yet) - // Ideally we would reimplement open() and do it there (BIC) - if ( !m_filename.isEmpty() ) { - kdDebug(7040) << "Writing to a file using KSaveFile" << endl; - d->m_saveFile = new KSaveFile( m_filename ); - if ( d->m_saveFile->status() != 0 ) { - kdWarning(7040) << "KSaveFile creation for " << m_filename << " failed, " << strerror( d->m_saveFile->status() ) << endl; - delete d->m_saveFile; - d->m_saveFile = 0; - return false; - } - Q_ASSERT( d->m_saveFile->file() ); - setDevice( TQT_TQIODEVICE(d->m_saveFile->file()) ); - } - return true; - case IO_ReadOnly: - case IO_ReadWrite: - { - // ReadWrite mode still uses TQFile for now; we'd need to copy to the tempfile, in fact. - if ( !m_filename.isEmpty() ) { - setDevice( TQT_TQIODEVICE(new TQFile( m_filename )) ); - if ( !device()->open( mode ) ) - return false; - } - break; // continued below - } - default: - kdWarning(7040) << "Unsupported mode " << mode << endl; - return false; - } - - char buffer[47]; - - // Check that it's a valid ZIP file - // the above code opened the underlying device already. - TQIODevice* dev = device(); - - if (!dev) { - return false; - } - - uint offset = 0; // holds offset, where we read - int n; - - // contains information gathered from the local file headers - TQAsciiDict pfi_map(1009, true /*case sensitive */, true /*copy keys*/); - pfi_map.setAutoDelete(true); - - // We set a bool for knowing if we are allowed to skip the start of the file - bool startOfFile = true; - - for (;;) // repeat until 'end of entries' signature is reached - { -kdDebug(7040) << "loop starts" << endl; -kdDebug(7040) << "dev->at() now : " << dev->at() << endl; - n = dev->readBlock( buffer, 4 ); - - if (n < 4) - { - kdWarning(7040) << "Invalid ZIP file. Unexpected end of file. (#1)" << endl; - - return false; - } - - if ( !memcmp( buffer, "PK\5\6", 4 ) ) // 'end of entries' - { - kdDebug(7040) << "PK56 found end of archive" << endl; - startOfFile = false; - break; - } - - if ( !memcmp( buffer, "PK\3\4", 4 ) ) // local file header - { - kdDebug(7040) << "PK34 found local file header" << endl; - startOfFile = false; - // can this fail ??? - dev->at( dev->at() + 2 ); // skip 'version needed to extract' - - // read static header stuff - n = dev->readBlock( buffer, 24 ); - if (n < 24) { - kdWarning(7040) << "Invalid ZIP file. Unexpected end of file. (#4)" << endl; - return false; - } - - int gpf = (uchar)buffer[0]; // "general purpose flag" not "general protection fault" ;-) - int compression_mode = (uchar)buffer[2] | (uchar)buffer[3] << 8; - time_t mtime = transformFromMsDos( buffer+4 ); - - TQ_LONG compr_size = (uchar)buffer[12] | (uchar)buffer[13] << 8 - | (uchar)buffer[14] << 16 | (uchar)buffer[15] << 24; - TQ_LONG uncomp_size = (uchar)buffer[16] | (uchar)buffer[17] << 8 - | (uchar)buffer[18] << 16 | (uchar)buffer[19] << 24; - int namelen = (uchar)buffer[20] | (uchar)buffer[21] << 8; - int extralen = (uchar)buffer[22] | (uchar)buffer[23] << 8; - - kdDebug(7040) << "general purpose bit flag: " << gpf << endl; - kdDebug(7040) << "compressed size: " << compr_size << endl; - kdDebug(7040) << "uncompressed size: " << uncomp_size << endl; - kdDebug(7040) << "namelen: " << namelen << endl; - kdDebug(7040) << "extralen: " << extralen << endl; - kdDebug(7040) << "archive size: " << dev->size() << endl; - - // read filename - TQCString filename(namelen + 1); - n = dev->readBlock(filename.data(), namelen); - if ( n < namelen ) { - kdWarning(7040) << "Invalid ZIP file. Name not completely read (#2)" << endl; - return false; - } - - ParseFileInfo *pfi = new ParseFileInfo(); - pfi->mtime = mtime; - pfi_map.insert(filename.data(), pfi); - - // read and parse the beginning of the extra field, - // skip rest of extra field in case it is too long - unsigned int extraFieldEnd = dev->at() + extralen; - pfi->extralen = extralen; - int handledextralen = QMIN(extralen, (int)sizeof buffer); - - kdDebug(7040) << "handledextralen: " << handledextralen << endl; - - n = dev->readBlock(buffer, handledextralen); - // no error msg necessary as we deliberately truncate the extra field - if (!parseExtraField(buffer, handledextralen, true, *pfi)) - { - kdWarning(7040) << "Invalid ZIP File. Broken ExtraField." << endl; - return false; - } - - // jump to end of extra field - dev->at( extraFieldEnd ); - - // we have to take care of the 'general purpose bit flag'. - // if bit 3 is set, the header doesn't contain the length of - // the file and we look for the signature 'PK\7\8'. - if ( gpf & 8 ) - { - // here we have to read through the compressed data to find - // the next PKxx - kdDebug(7040) << "trying to seek for next PK78" << endl; - bool foundSignature = false; - - while (!foundSignature) - { - n = dev->readBlock( buffer, 1 ); - if (n < 1) - { - kdWarning(7040) << "Invalid ZIP file. Unexpected end of file. (#2)" << endl; - return false; - } - - if ( buffer[0] != 'P' ) - continue; - - n = dev->readBlock( buffer, 3 ); - if (n < 3) - { - kdWarning(7040) << "Invalid ZIP file. Unexpected end of file. (#3)" << endl; - return false; - } - - // we have to detect three magic tokens here: - // PK34 for the next local header in case there is no data descriptor - // PK12 for the central header in case there is no data descriptor - // PK78 for the data descriptor in case it is following the compressed data - - if ( buffer[0] == 'K' && buffer[1] == 7 && buffer[2] == 8 ) - { - foundSignature = true; - dev->at( dev->at() + 12 ); // skip the 'data_descriptor' - } - else if ( ( buffer[0] == 'K' && buffer[1] == 1 && buffer[2] == 2 ) - || ( buffer[0] == 'K' && buffer[1] == 3 && buffer[2] == 4 ) ) - { - foundSignature = true; - dev->at( dev->at() - 4 ); // go back 4 bytes, so that the magic bytes can be found... - } - else if ( buffer[0] == 'P' || buffer[1] == 'P' || buffer[2] == 'P' ) - { - // We have another P character so we must go back a little to check if it is a magic - dev->at( dev->at() - 3 ); - } - - } - } - else - { - // here we skip the compressed data and jump to the next header - kdDebug(7040) << "general purpose bit flag indicates, that local file header contains valid size" << endl; - // check if this could be a symbolic link - if (compression_mode == NoCompression - && uncomp_size <= max_path_len - && uncomp_size > 0) { - // read content and store it - pfi->guessed_symlink.resize(uncomp_size + 1); - kdDebug(7040) << "guessed symlink size: " << uncomp_size << endl; - n = dev->readBlock(pfi->guessed_symlink.data(), uncomp_size); - if (n < uncomp_size) { - kdWarning(7040) << "Invalid ZIP file. Unexpected end of file. (#5)" << endl; - return false; - } - } else { - - if ( compr_size > (TQ_LONG)dev->size() ) - { - // here we cannot trust the compressed size, so scan through the compressed - // data to find the next header - bool foundSignature = false; - - while (!foundSignature) - { - n = dev->readBlock( buffer, 1 ); - if (n < 1) - { - kdWarning(7040) << "Invalid ZIP file. Unexpected end of file. (#2)" << endl; - return false; - } - - if ( buffer[0] != 'P' ) - continue; - - n = dev->readBlock( buffer, 3 ); - if (n < 3) - { - kdWarning(7040) << "Invalid ZIP file. Unexpected end of file. (#3)" << endl; - return false; - } - - // we have to detect three magic tokens here: - // PK34 for the next local header in case there is no data descriptor - // PK12 for the central header in case there is no data descriptor - // PK78 for the data descriptor in case it is following the compressed data - - if ( buffer[0] == 'K' && buffer[1] == 7 && buffer[2] == 8 ) - { - foundSignature = true; - dev->at( dev->at() + 12 ); // skip the 'data_descriptor' - } - - if ( ( buffer[0] == 'K' && buffer[1] == 1 && buffer[2] == 2 ) - || ( buffer[0] == 'K' && buffer[1] == 3 && buffer[2] == 4 ) ) - { - foundSignature = true; - dev->at( dev->at() - 4 ); - // go back 4 bytes, so that the magic bytes can be found - // in the next cycle... - } - } - } - else - { -// kdDebug(7040) << "before interesting dev->at(): " << dev->at() << endl; - bool success; - success = dev->at( dev->at() + compr_size ); // can this fail ??? -/* kdDebug(7040) << "after interesting dev->at(): " << dev->at() << endl; - if ( success ) - kdDebug(7040) << "dev->at was successful... " << endl; - else - kdDebug(7040) << "dev->at failed... " << endl;*/ - } - - } - -// not needed any more -/* // here we calculate the length of the file in the zip - // with headers and jump to the next header. - uint skip = compr_size + namelen + extralen; - offset += 30 + skip;*/ - } - } - else if ( !memcmp( buffer, "PK\1\2", 4 ) ) // central block - { - kdDebug(7040) << "PK12 found central block" << endl; - startOfFile = false; - - // so we reached the central header at the end of the zip file - // here we get all interesting data out of the central header - // of a file - offset = dev->at() - 4; - - //set offset for appending new files - if ( d->m_offset == 0L ) d->m_offset = offset; - - n = dev->readBlock( buffer + 4, 42 ); - if (n < 42) { - kdWarning(7040) << "Invalid ZIP file, central entry too short" << endl; // not long enough for valid entry - return false; - } - - //int gpf = (uchar)buffer[9] << 8 | (uchar)buffer[10]; - //kdDebug() << "general purpose flag=" << gpf << endl; - // length of the filename (well, pathname indeed) - int namelen = (uchar)buffer[29] << 8 | (uchar)buffer[28]; - TQCString bufferName( namelen + 1 ); - n = dev->readBlock( bufferName.data(), namelen ); - if ( n < namelen ) - kdWarning(7040) << "Invalid ZIP file. Name not completely read" << endl; - - ParseFileInfo *pfi = pfi_map[bufferName]; - if (!pfi) { // can that happen? - pfi_map.insert(bufferName.data(), pfi = new ParseFileInfo()); - } - TQString name( TQFile::decodeName(bufferName) ); - - //kdDebug(7040) << "name: " << name << endl; - // only in central header ! see below. - // length of extra attributes - int extralen = (uchar)buffer[31] << 8 | (uchar)buffer[30]; - // length of comment for this file - int commlen = (uchar)buffer[33] << 8 | (uchar)buffer[32]; - // compression method of this file - int cmethod = (uchar)buffer[11] << 8 | (uchar)buffer[10]; - - //kdDebug(7040) << "cmethod: " << cmethod << endl; - //kdDebug(7040) << "extralen: " << extralen << endl; - - // uncompressed file size - uint ucsize = (uchar)buffer[27] << 24 | (uchar)buffer[26] << 16 | - (uchar)buffer[25] << 8 | (uchar)buffer[24]; - // compressed file size - uint csize = (uchar)buffer[23] << 24 | (uchar)buffer[22] << 16 | - (uchar)buffer[21] << 8 | (uchar)buffer[20]; - - // offset of local header - uint localheaderoffset = (uchar)buffer[45] << 24 | (uchar)buffer[44] << 16 | - (uchar)buffer[43] << 8 | (uchar)buffer[42]; - - // some clever people use different extra field lengths - // in the central header and in the local header... funny. - // so we need to get the localextralen to calculate the offset - // from localheaderstart to dataoffset - int localextralen = pfi->extralen; // FIXME: this will not work if - // no local header exists - - //kdDebug(7040) << "localextralen: " << localextralen << endl; - - // offset, where the real data for uncompression starts - uint dataoffset = localheaderoffset + 30 + localextralen + namelen; //comment only in central header - - //kdDebug(7040) << "esize: " << esize << endl; - //kdDebug(7040) << "eoffset: " << eoffset << endl; - //kdDebug(7040) << "csize: " << csize << endl; - - int os_madeby = (uchar)buffer[5]; - bool isdir = false; - int access = 0100644; - - if (os_madeby == 3) { // good ole unix - access = (uchar)buffer[40] | (uchar)buffer[41] << 8; - } - - TQString entryName; - - if ( name.endsWith( "/" ) ) // Entries with a trailing slash are directories - { - isdir = true; - name = name.left( name.length() - 1 ); - if (os_madeby != 3) access = S_IFDIR | 0755; - else Q_ASSERT(access & S_IFDIR); - } - - int pos = name.findRev( '/' ); - if ( pos == -1 ) - entryName = name; - else - entryName = name.mid( pos + 1 ); - Q_ASSERT( !entryName.isEmpty() ); - - KArchiveEntry* entry; - if ( isdir ) - { - TQString path = TQDir::cleanDirPath( name ); - KArchiveEntry* ent = rootDir()->entry( path ); - if ( ent && ent->isDirectory() ) - { - //kdDebug(7040) << "Directory already exists, NOT going to add it again" << endl; - entry = 0L; - } - else - { - entry = new KArchiveDirectory( this, entryName, access, (int)pfi->mtime, rootDir()->user(), rootDir()->group(), TQString::null ); - //kdDebug(7040) << "KArchiveDirectory created, entryName= " << entryName << ", name=" << name << endl; - } - } - else - { - TQString symlink; - if (S_ISLNK(access)) { - symlink = TQFile::decodeName(pfi->guessed_symlink); - } - entry = new KZipFileEntry( this, entryName, access, pfi->mtime, - rootDir()->user(), rootDir()->group(), - symlink, name, dataoffset, - ucsize, cmethod, csize ); - static_cast(entry)->setHeaderStart( localheaderoffset ); - //kdDebug(7040) << "KZipFileEntry created, entryName= " << entryName << ", name=" << name << endl; - d->m_fileList.append( static_cast( entry ) ); - } - - if ( entry ) - { - if ( pos == -1 ) - { - rootDir()->addEntry(entry); - } - else - { - // In some tar files we can find dir/./file => call cleanDirPath - TQString path = TQDir::cleanDirPath( name.left( pos ) ); - // Ensure container directory exists, create otherwise - KArchiveDirectory * tdir = findOrCreate( path ); - tdir->addEntry(entry); - } - } - - //calculate offset to next entry - offset += 46 + commlen + extralen + namelen; - bool b = dev->at(offset); - Q_ASSERT( b ); - if ( !b ) - return false; - } - else if ( startOfFile ) - { - // The file does not start with any ZIP header (e.g. self-extractable ZIP files) - // Therefore we need to find the first PK\003\004 (local header) - kdDebug(7040) << "Try to skip start of file" << endl; - startOfFile = false; - bool foundSignature = false; - - while (!foundSignature) - { - n = dev->readBlock( buffer, 1 ); - if (n < 1) - { - kdWarning(7040) << "Invalid ZIP file. Unexpected end of file. " << k_funcinfo << endl; - return false; - } - - if ( buffer[0] != 'P' ) - continue; - - n = dev->readBlock( buffer, 3 ); - if (n < 3) - { - kdWarning(7040) << "Invalid ZIP file. Unexpected end of file. " << k_funcinfo << endl; - return false; - } - - // We have to detect the magic token for a local header: PK\003\004 - /* - * Note: we do not need to check the other magics, if the ZIP file has no - * local header, then it has not any files! - */ - if ( buffer[0] == 'K' && buffer[1] == 3 && buffer[2] == 4 ) - { - foundSignature = true; - dev->at( dev->at() - 4 ); // go back 4 bytes, so that the magic bytes can be found... - } - else if ( buffer[0] == 'P' || buffer[1] == 'P' || buffer[2] == 'P' ) - { - // We have another P character so we must go back a little to check if it is a magic - dev->at( dev->at() - 3 ); - } - } - } - else - { - kdWarning(7040) << "Invalid ZIP file. Unrecognized header at offset " << offset << endl; - - return false; - } - } - //kdDebug(7040) << "*** done *** " << endl; - return true; -} - -bool KZip::closeArchive() -{ - if ( ! ( mode() & IO_WriteOnly ) ) - { - //kdDebug(7040) << "closearchive readonly reached." << endl; - return true; - } - - kdDebug() << k_funcinfo << "device=" << device() << endl; - //ReadWrite or WriteOnly - //write all central dir file entries - - if ( !device() ) // saving aborted - return false; - - // to be written at the end of the file... - char buffer[ 22 ]; // first used for 12, then for 22 at the end - uLong crc = crc32(0L, Z_NULL, 0); - - TQ_LONG centraldiroffset = device()->at(); - //kdDebug(7040) << "closearchive: centraldiroffset: " << centraldiroffset << endl; - TQ_LONG atbackup = centraldiroffset; - TQPtrListIterator it( d->m_fileList ); - - for ( ; it.current() ; ++it ) - { //set crc and compressed size in each local file header - if ( !device()->at( it.current()->headerStart() + 14 ) ) - return false; - //kdDebug(7040) << "closearchive setcrcandcsize: filename: " - // << it.current()->path() - // << " encoding: "<< it.current()->encoding() << endl; - - uLong mycrc = it.current()->crc32(); - buffer[0] = char(mycrc); // crc checksum, at headerStart+14 - buffer[1] = char(mycrc >> 8); - buffer[2] = char(mycrc >> 16); - buffer[3] = char(mycrc >> 24); - - int mysize1 = it.current()->compressedSize(); - buffer[4] = char(mysize1); // compressed file size, at headerStart+18 - buffer[5] = char(mysize1 >> 8); - buffer[6] = char(mysize1 >> 16); - buffer[7] = char(mysize1 >> 24); - - int myusize = it.current()->size(); - buffer[8] = char(myusize); // uncompressed file size, at headerStart+22 - buffer[9] = char(myusize >> 8); - buffer[10] = char(myusize >> 16); - buffer[11] = char(myusize >> 24); - - if ( device()->writeBlock( buffer, 12 ) != 12 ) - return false; - } - device()->at( atbackup ); - - for ( it.toFirst(); it.current() ; ++it ) - { - //kdDebug(7040) << "closearchive: filename: " << it.current()->path() - // << " encoding: "<< it.current()->encoding() << endl; - - TQCString path = TQFile::encodeName(it.current()->path()); - - const int extra_field_len = 9; - int bufferSize = extra_field_len + path.length() + 46; - char* buffer = new char[ bufferSize ]; - - memset(buffer, 0, 46); // zero is a nice default for most header fields - - const char head[] = - { - 'P', 'K', 1, 2, // central file header signature - 0x14, 3, // version made by (3 == UNIX) - 0x14, 0 // version needed to extract - }; - - // I do not know why memcpy is not working here - //memcpy(buffer, head, sizeof(head)); - tqmemmove(buffer, head, sizeof(head)); - - buffer[ 10 ] = char(it.current()->encoding()); // compression method - buffer[ 11 ] = char(it.current()->encoding() >> 8); - - transformToMsDos( it.current()->datetime(), &buffer[ 12 ] ); - - uLong mycrc = it.current()->crc32(); - buffer[ 16 ] = char(mycrc); // crc checksum - buffer[ 17 ] = char(mycrc >> 8); - buffer[ 18 ] = char(mycrc >> 16); - buffer[ 19 ] = char(mycrc >> 24); - - int mysize1 = it.current()->compressedSize(); - buffer[ 20 ] = char(mysize1); // compressed file size - buffer[ 21 ] = char(mysize1 >> 8); - buffer[ 22 ] = char(mysize1 >> 16); - buffer[ 23 ] = char(mysize1 >> 24); - - int mysize = it.current()->size(); - buffer[ 24 ] = char(mysize); // uncompressed file size - buffer[ 25 ] = char(mysize >> 8); - buffer[ 26 ] = char(mysize >> 16); - buffer[ 27 ] = char(mysize >> 24); - - buffer[ 28 ] = char(it.current()->path().length()); // filename length - buffer[ 29 ] = char(it.current()->path().length() >> 8); - - buffer[ 30 ] = char(extra_field_len); - buffer[ 31 ] = char(extra_field_len >> 8); - - buffer[ 40 ] = char(it.current()->permissions()); - buffer[ 41 ] = char(it.current()->permissions() >> 8); - - int myhst = it.current()->headerStart(); - buffer[ 42 ] = char(myhst); //relative offset of local header - buffer[ 43 ] = char(myhst >> 8); - buffer[ 44 ] = char(myhst >> 16); - buffer[ 45 ] = char(myhst >> 24); - - // file name - strncpy( buffer + 46, path, path.length() ); - //kdDebug(7040) << "closearchive length to write: " << bufferSize << endl; - - // extra field - char *extfield = buffer + 46 + path.length(); - extfield[0] = 'U'; - extfield[1] = 'T'; - extfield[2] = 5; - extfield[3] = 0; - extfield[4] = 1 | 2 | 4; // specify flags from local field - // (unless I misread the spec) - // provide only modification time - unsigned long time = (unsigned long)it.current()->date(); - extfield[5] = char(time); - extfield[6] = char(time >> 8); - extfield[7] = char(time >> 16); - extfield[8] = char(time >> 24); - - crc = crc32(crc, (Bytef *)buffer, bufferSize ); - bool ok = ( device()->writeBlock( buffer, bufferSize ) == bufferSize ); - delete[] buffer; - if ( !ok ) - return false; - } - TQ_LONG centraldirendoffset = device()->at(); - //kdDebug(7040) << "closearchive: centraldirendoffset: " << centraldirendoffset << endl; - //kdDebug(7040) << "closearchive: device()->at(): " << device()->at() << endl; - - //write end of central dir record. - buffer[ 0 ] = 'P'; //end of central dir signature - buffer[ 1 ] = 'K'; - buffer[ 2 ] = 5; - buffer[ 3 ] = 6; - - buffer[ 4 ] = 0; // number of this disk - buffer[ 5 ] = 0; - - buffer[ 6 ] = 0; // number of disk with start of central dir - buffer[ 7 ] = 0; - - int count = d->m_fileList.count(); - //kdDebug(7040) << "number of files (count): " << count << endl; - - - buffer[ 8 ] = char(count); // total number of entries in central dir of - buffer[ 9 ] = char(count >> 8); // this disk - - buffer[ 10 ] = buffer[ 8 ]; // total number of entries in the central dir - buffer[ 11 ] = buffer[ 9 ]; - - int cdsize = centraldirendoffset - centraldiroffset; - buffer[ 12 ] = char(cdsize); // size of the central dir - buffer[ 13 ] = char(cdsize >> 8); - buffer[ 14 ] = char(cdsize >> 16); - buffer[ 15 ] = char(cdsize >> 24); - - //kdDebug(7040) << "end : centraldiroffset: " << centraldiroffset << endl; - //kdDebug(7040) << "end : centraldirsize: " << cdsize << endl; - - buffer[ 16 ] = char(centraldiroffset); // central dir offset - buffer[ 17 ] = char(centraldiroffset >> 8); - buffer[ 18 ] = char(centraldiroffset >> 16); - buffer[ 19 ] = char(centraldiroffset >> 24); - - buffer[ 20 ] = 0; //zipfile comment length - buffer[ 21 ] = 0; - - if ( device()->writeBlock( buffer, 22 ) != 22 ) - return false; - - if ( d->m_saveFile ) { - d->m_saveFile->close(); - setDevice( 0 ); - delete d->m_saveFile; - d->m_saveFile = 0; - } - - //kdDebug(7040) << __FILE__" reached." << endl; - return true; -} - -// Doesn't need to be reimplemented anymore. Remove for KDE-4.0 -bool KZip::writeFile( const TQString& name, const TQString& user, const TQString& group, uint size, const char* data ) -{ - mode_t mode = 0100644; - time_t the_time = time(0); - return KArchive::writeFile( name, user, group, size, mode, the_time, - the_time, the_time, data ); -} - -// Doesn't need to be reimplemented anymore. Remove for KDE-4.0 -bool KZip::writeFile( const TQString& name, const TQString& user, - const TQString& group, uint size, mode_t perm, - time_t atime, time_t mtime, time_t ctime, - const char* data ) { - return KArchive::writeFile(name, user, group, size, perm, atime, mtime, - ctime, data); -} - -// Doesn't need to be reimplemented anymore. Remove for KDE-4.0 -bool KZip::prepareWriting( const TQString& name, const TQString& user, const TQString& group, uint size ) -{ - mode_t dflt_perm = 0100644; - time_t the_time = time(0); - return prepareWriting(name,user,group,size,dflt_perm, - the_time,the_time,the_time); -} - -// Doesn't need to be reimplemented anymore. Remove for KDE-4.0 -bool KZip::prepareWriting(const TQString& name, const TQString& user, - const TQString& group, uint size, mode_t perm, - time_t atime, time_t mtime, time_t ctime) { - return KArchive::prepareWriting(name,user,group,size,perm,atime,mtime,ctime); -} - -bool KZip::prepareWriting_impl(const TQString &name, const TQString &user, - const TQString &group, uint /*size*/, mode_t perm, - time_t atime, time_t mtime, time_t ctime) { - //kdDebug(7040) << "prepareWriting reached." << endl; - if ( !isOpened() ) - { - tqWarning( "KZip::writeFile: You must open the zip file before writing to it\n"); - return false; - } - - if ( ! ( mode() & IO_WriteOnly ) ) // accept WriteOnly and ReadWrite - { - tqWarning( "KZip::writeFile: You must open the zip file for writing\n"); - return false; - } - - if ( !device() ) { // aborted - //kdWarning(7040) << "prepareWriting_impl: no device" << endl; - return false; - } - - // set right offset in zip. - if ( !device()->at( d->m_offset ) ) { - kdWarning(7040) << "prepareWriting_impl: cannot seek in ZIP file. Disk full?" << endl; - abort(); - return false; - } - - // delete entries in the filelist with the same filename as the one we want - // to save, so that we don�t have duplicate file entries when viewing the zip - // with konqi... - // CAUTION: the old file itself is still in the zip and won't be removed !!! - TQPtrListIterator it( d->m_fileList ); - - //kdDebug(7040) << "filename to write: " << name <path() <path() ) - { - //kdDebug(7040) << "removing following entry: " << it.current()->path() <m_fileList.remove(); - } - - } - // Find or create parent dir - KArchiveDirectory* parentDir = rootDir(); - TQString fileName( name ); - int i = name.findRev( '/' ); - if ( i != -1 ) - { - TQString dir = name.left( i ); - fileName = name.mid( i + 1 ); - //kdDebug(7040) << "KZip::prepareWriting ensuring " << dir << " exists. fileName=" << fileName << endl; - parentDir = findOrCreate( dir ); - } - - // construct a KZipFileEntry and add it to list - KZipFileEntry * e = new KZipFileEntry( this, fileName, perm, mtime, user, group, TQString::null, - name, device()->at() + 30 + name.length(), // start - 0 /*size unknown yet*/, d->m_compression, 0 /*csize unknown yet*/ ); - e->setHeaderStart( device()->at() ); - //kdDebug(7040) << "wrote file start: " << e->position() << " name: " << name << endl; - parentDir->addEntry( e ); - - d->m_currentFile = e; - d->m_fileList.append( e ); - - int extra_field_len = 0; - if ( d->m_extraField == ModificationTime ) - extra_field_len = 17; // value also used in doneWriting() - - // write out zip header - TQCString encodedName = TQFile::encodeName(name); - int bufferSize = extra_field_len + encodedName.length() + 30; - //kdDebug(7040) << "KZip::prepareWriting bufferSize=" << bufferSize << endl; - char* buffer = new char[ bufferSize ]; - - buffer[ 0 ] = 'P'; //local file header signature - buffer[ 1 ] = 'K'; - buffer[ 2 ] = 3; - buffer[ 3 ] = 4; - - buffer[ 4 ] = 0x14; // version needed to extract - buffer[ 5 ] = 0; - - buffer[ 6 ] = 0; // general purpose bit flag - buffer[ 7 ] = 0; - - buffer[ 8 ] = char(e->encoding()); // compression method - buffer[ 9 ] = char(e->encoding() >> 8); - - transformToMsDos( e->datetime(), &buffer[ 10 ] ); - - buffer[ 14 ] = 'C'; //dummy crc - buffer[ 15 ] = 'R'; - buffer[ 16 ] = 'C'; - buffer[ 17 ] = 'q'; - - buffer[ 18 ] = 'C'; //compressed file size - buffer[ 19 ] = 'S'; - buffer[ 20 ] = 'I'; - buffer[ 21 ] = 'Z'; - - buffer[ 22 ] = 'U'; //uncompressed file size - buffer[ 23 ] = 'S'; - buffer[ 24 ] = 'I'; - buffer[ 25 ] = 'Z'; - - buffer[ 26 ] = (uchar)(encodedName.length()); //filename length - buffer[ 27 ] = (uchar)(encodedName.length() >> 8); - - buffer[ 28 ] = (uchar)(extra_field_len); // extra field length - buffer[ 29 ] = (uchar)(extra_field_len >> 8); - - // file name - strncpy( buffer + 30, encodedName, encodedName.length() ); - - // extra field - if ( d->m_extraField == ModificationTime ) - { - char *extfield = buffer + 30 + encodedName.length(); - // "Extended timestamp" header (0x5455) - extfield[0] = 'U'; - extfield[1] = 'T'; - extfield[2] = 13; // data size - extfield[3] = 0; - extfield[4] = 1 | 2 | 4; // contains mtime, atime, ctime - - extfield[5] = char(mtime); - extfield[6] = char(mtime >> 8); - extfield[7] = char(mtime >> 16); - extfield[8] = char(mtime >> 24); - - extfield[9] = char(atime); - extfield[10] = char(atime >> 8); - extfield[11] = char(atime >> 16); - extfield[12] = char(atime >> 24); - - extfield[13] = char(ctime); - extfield[14] = char(ctime >> 8); - extfield[15] = char(ctime >> 16); - extfield[16] = char(ctime >> 24); - } - - // Write header - bool b = (device()->writeBlock( buffer, bufferSize ) == bufferSize ); - d->m_crc = 0L; - delete[] buffer; - - Q_ASSERT( b ); - if (!b) { - abort(); - return false; - } - - // Prepare device for writing the data - // Either device() if no compression, or a KFilterDev to compress - if ( d->m_compression == 0 ) { - d->m_currentDev = device(); - return true; - } - - d->m_currentDev = KFilterDev::device( device(), "application/x-gzip", false ); - Q_ASSERT( d->m_currentDev ); - if ( !d->m_currentDev ) { - abort(); - return false; // ouch - } - static_cast(d->m_currentDev)->setSkipHeaders(); // Just zlib, not gzip - - b = d->m_currentDev->open( IO_WriteOnly ); - Q_ASSERT( b ); - return b; -} - -bool KZip::doneWriting( uint size ) -{ - if ( d->m_currentFile->encoding() == 8 ) { - // Finish - (void)d->m_currentDev->writeBlock( 0, 0 ); - delete d->m_currentDev; - } - // If 0, d->m_currentDev was device() - don't delete ;) - d->m_currentDev = 0L; - - Q_ASSERT( d->m_currentFile ); - //kdDebug(7040) << "donewriting reached." << endl; - //kdDebug(7040) << "filename: " << d->m_currentFile->path() << endl; - //kdDebug(7040) << "getpos (at): " << device()->at() << endl; - d->m_currentFile->setSize(size); - int extra_field_len = 0; - if ( d->m_extraField == ModificationTime ) - extra_field_len = 17; // value also used in doneWriting() - - int csize = device()->at() - - d->m_currentFile->headerStart() - 30 - - d->m_currentFile->path().length() - extra_field_len; - d->m_currentFile->setCompressedSize(csize); - //kdDebug(7040) << "usize: " << d->m_currentFile->size() << endl; - //kdDebug(7040) << "csize: " << d->m_currentFile->compressedSize() << endl; - //kdDebug(7040) << "headerstart: " << d->m_currentFile->headerStart() << endl; - - //kdDebug(7040) << "crc: " << d->m_crc << endl; - d->m_currentFile->setCRC32( d->m_crc ); - - d->m_currentFile = 0L; - - // update saved offset for appending new files - d->m_offset = device()->at(); - return true; -} - -bool KZip::writeSymLink(const TQString &name, const TQString &target, - const TQString &user, const TQString &group, - mode_t perm, time_t atime, time_t mtime, time_t ctime) { - return KArchive::writeSymLink(name,target,user,group,perm,atime,mtime,ctime); -} - -bool KZip::writeSymLink_impl(const TQString &name, const TQString &target, - const TQString &user, const TQString &group, - mode_t perm, time_t atime, time_t mtime, time_t ctime) { - - // reassure that symlink flag is set, otherwise strange things happen on - // extraction - perm |= S_IFLNK; - Compression c = compression(); - setCompression(NoCompression); // link targets are never compressed - - if (!prepareWriting(name, user, group, 0, perm, atime, mtime, ctime)) { - kdWarning() << "KZip::writeFile prepareWriting failed" << endl; - setCompression(c); - return false; - } - - TQCString symlink_target = TQFile::encodeName(target); - if (!writeData(symlink_target, symlink_target.length())) { - kdWarning() << "KZip::writeFile writeData failed" << endl; - setCompression(c); - return false; - } - - if (!doneWriting(symlink_target.length())) { - kdWarning() << "KZip::writeFile doneWriting failed" << endl; - setCompression(c); - return false; - } - - setCompression(c); - return true; -} - -void KZip::virtual_hook( int id, void* data ) -{ - switch (id) { - case VIRTUAL_WRITE_DATA: { - WriteDataParams* params = reinterpret_cast(data); - params->retval = writeData_impl( params->data, params->size ); - break; - } - case VIRTUAL_WRITE_SYMLINK: { - WriteSymlinkParams *params = reinterpret_cast(data); - params->retval = writeSymLink_impl(*params->name,*params->target, - *params->user,*params->group,params->perm, - params->atime,params->mtime,params->ctime); - break; - } - case VIRTUAL_PREPARE_WRITING: { - PrepareWritingParams *params = reinterpret_cast(data); - params->retval = prepareWriting_impl(*params->name,*params->user, - *params->group,params->size,params->perm, - params->atime,params->mtime,params->ctime); - break; - } - default: - KArchive::virtual_hook( id, data ); - }/*end switch*/ -} - -// made virtual using virtual_hook -bool KZip::writeData(const char * c, uint i) -{ - return KArchive::writeData( c, i ); -} - -bool KZip::writeData_impl(const char * c, uint i) -{ - Q_ASSERT( d->m_currentFile ); - Q_ASSERT( d->m_currentDev ); - if (!d->m_currentFile || !d->m_currentDev) { - abort(); - return false; - } - - // crc to be calculated over uncompressed stuff... - // and they didn't mention it in their docs... - d->m_crc = crc32(d->m_crc, (const Bytef *) c , i); - - TQ_LONG written = d->m_currentDev->writeBlock( c, i ); - //kdDebug(7040) << "KZip::writeData wrote " << i << " bytes." << endl; - bool ok = written == (TQ_LONG)i; - if ( !ok ) - abort(); - return ok; -} - -void KZip::setCompression( Compression c ) -{ - d->m_compression = ( c == NoCompression ) ? 0 : 8; -} - -KZip::Compression KZip::compression() const -{ - return ( d->m_compression == 8 ) ? DeflateCompression : NoCompression; -} - -void KZip::setExtraField( ExtraField ef ) -{ - d->m_extraField = ef; -} - -KZip::ExtraField KZip::extraField() const -{ - return d->m_extraField; -} - -void KZip::abort() -{ - if ( d->m_saveFile ) { - d->m_saveFile->abort(); - setDevice( 0 ); - } -} - - -/////////////// - -TQByteArray KZipFileEntry::data() const -{ - TQIODevice* dev = device(); - TQByteArray arr; - if ( dev ) { - arr = dev->readAll(); - delete dev; - } - return arr; -} - -TQIODevice* KZipFileEntry::device() const -{ - //kdDebug(7040) << "KZipFileEntry::device creating iodevice limited to pos=" << position() << ", csize=" << compressedSize() << endl; - // Limit the reading to the appropriate part of the underlying device (e.g. file) - KLimitedIODevice* limitedDev = new KLimitedIODevice( archive()->device(), position(), compressedSize() ); - if ( encoding() == 0 || compressedSize() == 0 ) // no compression (or even no data) - return limitedDev; - - if ( encoding() == 8 ) - { - // On top of that, create a device that uncompresses the zlib data - TQIODevice* filterDev = KFilterDev::device( limitedDev, "application/x-gzip" ); - if ( !filterDev ) - return 0L; // ouch - static_cast(filterDev)->setSkipHeaders(); // Just zlib, not gzip - bool b = filterDev->open( IO_ReadOnly ); - Q_ASSERT( b ); - return filterDev; - } - - kdError() << "This zip file contains files compressed with method " - << encoding() <<", this method is currently not supported by KZip," - <<" please use a command-line tool to handle this file." << endl; - return 0L; -} diff --git a/kio/kio/kzip.h b/kio/kio/kzip.h deleted file mode 100644 index 9e4d24eeb..000000000 --- a/kio/kio/kzip.h +++ /dev/null @@ -1,284 +0,0 @@ -/* This file is part of the KDE libraries - Copyright (C) 2002 Holger Schroeder - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License version 2 as published by the Free Software Foundation. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ -#ifndef __kzip_h -#define __kzip_h - -#include -#include - -#include -#include -#include -#include -#include -#include - -class KZipFileEntry; -/** - * This class implements a kioslave to access zip files from KDE. - * You can use it in IO_ReadOnly or in IO_WriteOnly mode, and it - * behaves just as expected. - * It can also be used in IO_ReadWrite mode, in this case one can - * append files to an existing zip archive. When you append new files, which - * are not yet in the zip, it works as expected, i.e. the files are appended at the end. - * When you append a file, which is already in the file, the reference to the - * old file is dropped and the new one is added to the zip - but the - * old data from the file itself is not deleted, it is still in the - * zipfile. so when you want to have a small and garbage-free zipfile, - * just read the contents of the appended zip file and write it to a new one - * in IO_WriteOnly mode. This is especially important when you don't want - * to leak information of how intermediate versions of files in the zip - * were looking. - * For more information on the zip fileformat go to - * http://www.pkware.com/products/enterprise/white_papers/appnote.html - * @short A class for reading/writing zip archives. - * @author Holger Schroeder - * @since 3.1 - */ -class TDEIO_EXPORT KZip : public KArchive -{ -public: - /** - * Creates an instance that operates on the given filename. - * using the compression filter associated to given mimetype. - * - * @param filename is a local path (e.g. "/home/holger/myfile.zip") - */ - KZip( const TQString& filename ); - - /** - * Creates an instance that operates on the given device. - * The device can be compressed (KFilterDev) or not (TQFile, etc.). - * @warning Do not assume that giving a TQFile here will decompress the file, - * in case it's compressed! - * @param dev the device to access - */ - KZip( TQIODevice * dev ); - - /** - * If the zip file is still opened, then it will be - * closed automatically by the destructor. - */ - virtual ~KZip(); - - /** - * The name of the zip file, as passed to the constructor. - * Null if you used the TQIODevice constructor. - * @return the zip's file name, or null if a TQIODevice is used - */ - TQString fileName() { return m_filename; } - - /** - * Describes the contents of the "extra field" for a given file in the Zip archive. - */ - enum ExtraField { NoExtraField = 0, ///< No extra field - ModificationTime = 1, ///< Modification time ("extended timestamp" header) - DefaultExtraField = 1 - }; - - /** - * Call this before writeFile or prepareWriting, to define what the next - * file to be written should have in its extra field. - * @param ef the type of "extra field" - * @see extraField() - */ - void setExtraField( ExtraField ef ); - - /** - * The current type of "extra field" that will be used for new files. - * @return the current type of "extra field" - * @see setExtraField() - */ - ExtraField extraField() const; - - /** - * Describes the compression type for a given file in the Zip archive. - */ - enum Compression { NoCompression = 0, ///< Uncompressed. - DeflateCompression = 1 ///< Deflate compression method. - }; - - - /** - * Call this before writeFile or prepareWriting, to define whether the next - * files to be written should be compressed or not. - * @param c the new compression mode - * @see compression() - */ - void setCompression( Compression c ); - - /** - * The current compression mode that will be used for new files. - * @return the current compression mode - * @see setCompression() - */ - Compression compression() const; - - /** - * If an archive is opened for writing then you can add a new file - * using this function. - * This method takes the whole data at once. - * @param name can include subdirs e.g. path/to/the/file - * @param user the user owning the file - * @param group the group owning the file - * @param size the size of the file - * @param data a pointer to the data - * @return true if successful, false otherwise - */ - virtual bool writeFile( const TQString& name, const TQString& user, const TQString& group, uint size, const char* data ); // BC: remove reimplementation for KDE-4.0 - - /** - * Alternative method for writing: call prepareWriting(), then feed the data - * in small chunks using writeData(), and call doneWriting() when done. - * @param name can include subdirs e.g. path/to/the/file - * @param user the user owning the file - * @param group the group owning the file - * @param size unused argument - * @return true if successful, false otherwise - */ - virtual bool prepareWriting( const TQString& name, const TQString& user, const TQString& group, uint size ); - - // TODO(BIC) make virtual. For now it must be implemented by virtual_hook. - bool writeSymLink(const TQString &name, const TQString &target, - const TQString &user, const TQString &group, - mode_t perm, time_t atime, time_t mtime, time_t ctime); - // TODO(BIC) make virtual. For now it must be implemented by virtual_hook. - bool prepareWriting( const TQString& name, const TQString& user, - const TQString& group, uint size, mode_t perm, - time_t atime, time_t mtime, time_t ctime ); - // TODO(BIC) make virtual. For now it must be implemented by virtual_hook. - bool writeFile( const TQString& name, const TQString& user, const TQString& group, - uint size, mode_t perm, time_t atime, time_t mtime, - time_t ctime, const char* data ); - /** - * Write data to a file that has been created using prepareWriting(). - * @param data a pointer to the data - * @param size the size of the chunk - * @return true if successful, false otherwise - */ - bool writeData( const char* data, uint size ); // TODO make virtual - - /** - * Write data to a file that has been created using prepareWriting(). - * @param size the size of the file - * @return true if successful, false otherwise - */ - virtual bool doneWriting( uint size ); - -protected: - /** - * Opens the archive for reading. - * Parses the directory listing of the archive - * and creates the KArchiveDirectory/KArchiveFile entries. - * @param mode the mode of the file - */ - virtual bool openArchive( int mode ); - /// Closes the archive - virtual bool closeArchive(); - - /** - * @internal Not needed for zip - */ - virtual bool writeDir( const TQString& name, const TQString& user, const TQString& group) { Q_UNUSED(name); Q_UNUSED(user); Q_UNUSED(group); return true; } - // TODO(BIC) uncomment and make virtual for KDE 4. -// bool writeDir( const TQString& name, const TQString& user, const TQString& group, -// mode_t perm, time_t atime, time_t mtime, time_t ctime ); - -protected: - virtual void virtual_hook( int id, void* data ); - /** @internal for virtual_hook */ - // from KArchive - bool writeData_impl( const char* data, uint size ); - bool prepareWriting_impl(const TQString& name, const TQString& user, - const TQString& group, uint size, mode_t perm, - time_t atime, time_t mtime, time_t ctime); - bool writeSymLink_impl(const TQString &name, const TQString &target, - const TQString &user, const TQString &group, - mode_t perm, time_t atime, time_t mtime, time_t ctime); -private: - void abort(); - -private: - TQString m_filename; - class KZipPrivate; - KZipPrivate * d; -}; - - -/** - * @internal - */ -class TDEIO_EXPORT KZipFileEntry : public KArchiveFile -{ -public: - /*KZipFileEntry() : st(-1) - {}*/ - KZipFileEntry( KZip* zip, const TQString& name, int access, int date, - const TQString& user, const TQString& group, const TQString& symlink, - const TQString& path, TQ_LONG start, TQ_LONG uncompressedSize, - int encoding, TQ_LONG compressedSize) : - KArchiveFile( zip, name, access, date, user, group, symlink, - start, uncompressedSize ), - m_crc(0), - m_compressedSize(compressedSize), - m_headerStart(0), - m_encoding(encoding), - m_path( path ) - {} - int encoding() const { return m_encoding; } - TQ_LONG compressedSize() const { return m_compressedSize; } - - /// Only used when writing - void setCompressedSize(TQ_LONG compressedSize) { m_compressedSize = compressedSize; } - - /// Header start: only used when writing - void setHeaderStart(TQ_LONG headerstart) { m_headerStart = headerstart; } - TQ_LONG headerStart() const {return m_headerStart; } - - /// CRC: only used when writing - unsigned long crc32() const { return m_crc; } - void setCRC32(unsigned long crc32) { m_crc=crc32; } - - /// Name with complete path - KArchiveFile::name() is the filename only (no path) - TQString path() const { return m_path; } - - /** - * @return the content of this file. - * Call data() with care (only once per file), this data isn't cached. - */ - virtual TQByteArray data() const; - - /** - * This method returns a TQIODevice to read the file contents. - * This is obviously for reading only. - * Note that the ownership of the device is being transferred to the caller, - * who will have to delete it. - * The returned device auto-opens (in readonly mode), no need to open it. - */ - TQIODevice* device() const; // WARNING, not virtual! - -private: - unsigned long m_crc; - TQ_LONG m_compressedSize; - TQ_LONG m_headerStart; - int m_encoding; - TQString m_path; - // KDE4: d pointer or at least some int for future extensions -}; - -#endif diff --git a/kio/kio/lex.c b/kio/kio/lex.c deleted file mode 100644 index 99848a2f3..000000000 --- a/kio/kio/lex.c +++ /dev/null @@ -1,1759 +0,0 @@ -#define yy_create_buffer kiotrader_create_buffer -#define yy_delete_buffer kiotrader_delete_buffer -#define yy_scan_buffer kiotrader_scan_buffer -#define yy_scan_string kiotrader_scan_string -#define yy_scan_bytes kiotrader_scan_bytes -#define yy_flex_debug kiotrader_flex_debug -#define yy_init_buffer kiotrader_init_buffer -#define yy_flush_buffer kiotrader_flush_buffer -#define yy_load_buffer_state kiotrader_load_buffer_state -#define yy_switch_to_buffer kiotrader_switch_to_buffer -#define yyin kiotraderin -#define yyleng kiotraderleng -#define yylex kiotraderlex -#define yyout kiotraderout -#define yyrestart kiotraderrestart -#define yytext kiotradertext -#define yywrap kiotraderwrap - -#line 20 "lex.c" -/* A lexical scanner generated by flex */ - -/* Scanner skeleton version: - * $Header$ - */ - -#define FLEX_SCANNER -#define YY_FLEX_MAJOR_VERSION 2 -#define YY_FLEX_MINOR_VERSION 5 - -#include -#include - - -/* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */ -#ifdef c_plusplus -#ifndef __cplusplus -#define __cplusplus -#endif -#endif - - -#ifdef __cplusplus - -#include - -/* Use prototypes in function declarations. */ -#define YY_USE_PROTOS - -/* The "const" storage-class-modifier is valid. */ -#define YY_USE_CONST - -#else /* ! __cplusplus */ - -#if __STDC__ - -#define YY_USE_PROTOS -#define YY_USE_CONST - -#endif /* __STDC__ */ -#endif /* ! __cplusplus */ - -#ifdef __TURBOC__ - #pragma warn -rch - #pragma warn -use -#include -#include -#define YY_USE_CONST -#define YY_USE_PROTOS -#endif - -#ifdef YY_USE_CONST -#define yyconst const -#else -#define yyconst -#endif - - -#ifdef YY_USE_PROTOS -#define YY_PROTO(proto) proto -#else -#define YY_PROTO(proto) () -#endif - -/* Returned upon end-of-file. */ -#define YY_NULL 0 - -/* Promotes a possibly negative, possibly signed char to an unsigned - * integer for use as an array index. If the signed char is negative, - * we want to instead treat it as an 8-bit unsigned char, hence the - * double cast. - */ -#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) - -/* Enter a start condition. This macro really ought to take a parameter, - * but we do it the disgusting crufty way forced on us by the ()-less - * definition of BEGIN. - */ -#define BEGIN yy_start = 1 + 2 * - -/* Translate the current start state into a value that can be later handed - * to BEGIN to return to the state. The YYSTATE alias is for lex - * compatibility. - */ -#define YY_START ((yy_start - 1) / 2) -#define YYSTATE YY_START - -/* Action number for EOF rule of a given start state. */ -#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) - -/* Special action meaning "start processing a new file". */ -#define YY_NEW_FILE yyrestart( yyin ) - -#define YY_END_OF_BUFFER_CHAR 0 - -/* Size of default input buffer. */ -#define YY_BUF_SIZE 16384 - -typedef struct yy_buffer_state *YY_BUFFER_STATE; - -extern int yyleng; -extern FILE *yyin, *yyout; - -#define EOB_ACT_CONTINUE_SCAN 0 -#define EOB_ACT_END_OF_FILE 1 -#define EOB_ACT_LAST_MATCH 2 - -/* The funky do-while in the following #define is used to turn the definition - * int a single C statement (which needs a semi-colon terminator). This - * avoids problems with code like: - * - * if ( condition_holds ) - * yyless( 5 ); - * else - * do_something_else(); - * - * Prior to using the do-while the compiler would get upset at the - * "else" because it interpreted the "if" statement as being all - * done when it reached the ';' after the yyless() call. - */ - -/* Return all but the first 'n' matched characters back to the input stream. */ - -#define yyless(n) \ - do \ - { \ - /* Undo effects of setting up yytext. */ \ - *yy_cp = yy_hold_char; \ - YY_RESTORE_YY_MORE_OFFSET \ - yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \ - YY_DO_BEFORE_ACTION; /* set up yytext again */ \ - } \ - while ( 0 ) - -#define unput(c) yyunput( c, yytext_ptr ) - -/* The following is because we cannot portably get our hands on size_t - * (without autoconf's help, which isn't available because we want - * flex-generated scanners to compile on their own). - */ -typedef unsigned int yy_size_t; - - -struct yy_buffer_state - { - FILE *yy_input_file; - - char *yy_ch_buf; /* input buffer */ - char *yy_buf_pos; /* current position in input buffer */ - - /* Size of input buffer in bytes, not including room for EOB - * characters. - */ - yy_size_t yy_buf_size; - - /* Number of characters read into yy_ch_buf, not including EOB - * characters. - */ - int yy_n_chars; - - /* Whether we "own" the buffer - i.e., we know we created it, - * and can realloc() it to grow it, and should free() it to - * delete it. - */ - int yy_is_our_buffer; - - /* Whether this is an "interactive" input source; if so, and - * if we're using stdio for input, then we want to use getc() - * instead of fread(), to make sure we stop fetching input after - * each newline. - */ - int yy_is_interactive; - - /* Whether we're considered to be at the beginning of a line. - * If so, '^' rules will be active on the next match, otherwise - * not. - */ - int yy_at_bol; - - /* Whether to try to fill the input buffer when we reach the - * end of it. - */ - int yy_fill_buffer; - - int yy_buffer_status; -#define YY_BUFFER_NEW 0 -#define YY_BUFFER_NORMAL 1 - /* When an EOF's been seen but there's still some text to process - * then we mark the buffer as YY_EOF_PENDING, to indicate that we - * shouldn't try reading from the input source any more. We might - * still have a bunch of tokens to match, though, because of - * possible backing-up. - * - * When we actually see the EOF, we change the status to "new" - * (via yyrestart()), so that the user can continue scanning by - * just pointing yyin at a new input file. - */ -#define YY_BUFFER_EOF_PENDING 2 - }; - -static YY_BUFFER_STATE yy_current_buffer = 0; - -/* We provide macros for accessing buffer states in case in the - * future we want to put the buffer states in a more general - * "scanner state". - */ -#define YY_CURRENT_BUFFER yy_current_buffer - - -/* yy_hold_char holds the character lost when yytext is formed. */ -static char yy_hold_char; - -static int yy_n_chars; /* number of characters read into yy_ch_buf */ - - -int yyleng; - -/* Points to current character in buffer. */ -static char *yy_c_buf_p = (char *) 0; -static int yy_init = 1; /* whether we need to initialize */ -static int yy_start = 0; /* start state number */ - -/* Flag which is used to allow yywrap()'s to do buffer switches - * instead of setting up a fresh yyin. A bit of a hack ... - */ -static int yy_did_buffer_switch_on_eof; - -void yyrestart YY_PROTO(( FILE *input_file )); - -void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer )); -void yy_load_buffer_state YY_PROTO(( void )); -YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size )); -void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b )); -void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file )); -void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b )); -#define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer ) - -YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size )); -YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str )); -YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len )); - -static void *yy_flex_alloc YY_PROTO(( yy_size_t )); -static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t )); -static void yy_flex_free YY_PROTO(( void * )); - -#define yy_new_buffer yy_create_buffer - -#define yy_set_interactive(is_interactive) \ - { \ - if ( ! yy_current_buffer ) \ - yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \ - yy_current_buffer->yy_is_interactive = is_interactive; \ - } - -#define yy_set_bol(at_bol) \ - { \ - if ( ! yy_current_buffer ) \ - yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \ - yy_current_buffer->yy_at_bol = at_bol; \ - } - -#define YY_AT_BOL() (yy_current_buffer->yy_at_bol) - -typedef unsigned char YY_CHAR; -FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0; -typedef int yy_state_type; -extern char *yytext; -#define yytext_ptr yytext - -static yy_state_type yy_get_previous_state YY_PROTO(( void )); -static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state )); -static int yy_get_next_buffer YY_PROTO(( void )); -static void yy_fatal_error YY_PROTO(( yyconst char msg[] )); - -/* Done after the current pattern has been matched and before the - * corresponding action - sets up yytext. - */ -#define YY_DO_BEFORE_ACTION \ - yytext_ptr = yy_bp; \ - yyleng = (int) (yy_cp - yy_bp); \ - yy_hold_char = *yy_cp; \ - *yy_cp = '\0'; \ - yy_c_buf_p = yy_cp; - -#define YY_NUM_RULES 25 -#define YY_END_OF_BUFFER 26 -static yyconst short int yy_accept[63] = - { 0, - 0, 0, 26, 24, 23, 23, 24, 24, 14, 14, - 24, 19, 3, 14, 4, 22, 22, 22, 24, 22, - 22, 22, 22, 22, 22, 23, 2, 0, 17, 18, - 20, 0, 19, 5, 1, 6, 22, 22, 22, 0, - 22, 22, 10, 22, 22, 22, 9, 22, 22, 0, - 21, 8, 22, 12, 13, 7, 22, 15, 22, 16, - 11, 0 - } ; - -static yyconst int yy_ec[256] = - { 0, - 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 2, 4, 1, 1, 1, 1, 1, 5, 6, - 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 1, 1, 15, - 16, 17, 1, 1, 18, 19, 19, 19, 20, 21, - 19, 19, 19, 19, 19, 22, 19, 19, 19, 19, - 19, 23, 24, 25, 26, 19, 19, 19, 19, 19, - 27, 1, 28, 1, 1, 1, 29, 19, 19, 30, - - 31, 19, 19, 19, 32, 19, 19, 19, 33, 34, - 35, 19, 19, 36, 37, 38, 19, 19, 19, 39, - 19, 19, 1, 1, 1, 40, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1 - } ; - -static yyconst int yy_meta[41] = - { 0, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 2, 1, 1, 3, 1, 1, 1, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 1, 2, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, 4, 1 - } ; - -static yyconst short int yy_base[67] = - { 0, - 0, 0, 95, 96, 39, 41, 78, 88, 96, 78, - 77, 33, 74, 73, 72, 0, 69, 63, 0, 51, - 45, 49, 17, 47, 45, 48, 96, 75, 96, 65, - 64, 63, 40, 96, 96, 96, 0, 54, 49, 46, - 43, 40, 0, 32, 36, 31, 0, 44, 47, 38, - 96, 0, 28, 0, 0, 0, 44, 0, 15, 0, - 0, 96, 54, 56, 44, 59 - } ; - -static yyconst short int yy_def[67] = - { 0, - 62, 1, 62, 62, 62, 62, 62, 63, 62, 62, - 62, 62, 62, 62, 62, 64, 64, 64, 65, 64, - 64, 64, 64, 64, 64, 62, 62, 63, 62, 62, - 62, 62, 62, 62, 62, 62, 64, 64, 64, 66, - 64, 64, 64, 64, 64, 64, 64, 64, 64, 66, - 62, 64, 64, 64, 64, 64, 64, 64, 64, 64, - 64, 0, 62, 62, 62, 62 - } ; - -static yyconst short int yy_nxt[137] = - { 0, - 4, 5, 6, 7, 8, 9, 9, 9, 9, 9, - 10, 11, 9, 12, 13, 14, 15, 16, 16, 16, - 17, 16, 16, 16, 18, 16, 19, 4, 20, 16, - 21, 22, 23, 24, 25, 16, 16, 16, 16, 9, - 26, 26, 26, 26, 32, 44, 33, 40, 45, 26, - 26, 32, 61, 33, 28, 28, 28, 28, 37, 37, - 50, 50, 50, 60, 59, 51, 58, 57, 56, 55, - 54, 53, 52, 51, 49, 48, 31, 31, 30, 29, - 47, 46, 43, 42, 41, 39, 38, 36, 35, 34, - 31, 30, 29, 27, 62, 3, 62, 62, 62, 62, - - 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62 - } ; - -static yyconst short int yy_chk[137] = - { 0, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 5, 5, 6, 6, 12, 23, 12, 65, 23, 26, - 26, 33, 59, 33, 63, 63, 63, 63, 64, 64, - 66, 66, 66, 57, 53, 50, 49, 48, 46, 45, - 44, 42, 41, 40, 39, 38, 32, 31, 30, 28, - 25, 24, 22, 21, 20, 18, 17, 15, 14, 13, - 11, 10, 8, 7, 3, 62, 62, 62, 62, 62, - - 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62 - } ; - -static yy_state_type yy_last_accepting_state; -static char *yy_last_accepting_cpos; - -/* The intent behind this definition is that it'll catch - * any uses of REJECT which flex missed. - */ -#define REJECT reject_used_but_not_detected -#define yymore() yymore_used_but_not_detected -#define YY_MORE_ADJ 0 -#define YY_RESTORE_YY_MORE_OFFSET -char *yytext; -#line 1 "lex.l" -#define INITIAL 0 -#line 2 "lex.l" -#define yylval kiotraderlval -#define yywrap kiotraderwrap - -#include "yacc.h" -#include -#include -#define YY_NO_UNPUT - -char* KTraderParse_putSymbol( char *_name ); -char *KTraderParse_putSymbolInBrackets( char *_name ); -char* KTraderParse_putString( char *_name ); -int yywrap(); -int kiotraderlex(void); -void KTraderParse_initFlex( const char *_code ); - -#line 447 "lex.c" - -/* Macros after this point can all be overridden by user definitions in - * section 1. - */ - -#ifndef YY_SKIP_YYWRAP -#ifdef __cplusplus -extern "C" int yywrap YY_PROTO(( void )); -#else -extern int yywrap YY_PROTO(( void )); -#endif -#endif - -#ifndef YY_NO_UNPUT -static void yyunput YY_PROTO(( int c, char *buf_ptr )); -#endif - -#ifndef yytext_ptr -static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int )); -#endif - -#ifdef YY_NEED_STRLEN -static int yy_flex_strlen YY_PROTO(( yyconst char * )); -#endif - -#ifndef YY_NO_INPUT -#ifdef __cplusplus -static int yyinput YY_PROTO(( void )); -#else -static int input YY_PROTO(( void )); -#endif -#endif - -#if YY_STACK_USED -static int yy_start_stack_ptr = 0; -static int yy_start_stack_depth = 0; -static int *yy_start_stack = 0; -#ifndef YY_NO_PUSH_STATE -static void yy_push_state YY_PROTO(( int new_state )); -#endif -#ifndef YY_NO_POP_STATE -static void yy_pop_state YY_PROTO(( void )); -#endif -#ifndef YY_NO_TOP_STATE -static int yy_top_state YY_PROTO(( void )); -#endif - -#else -#define YY_NO_PUSH_STATE 1 -#define YY_NO_POP_STATE 1 -#define YY_NO_TOP_STATE 1 -#endif - -#ifdef YY_MALLOC_DECL -YY_MALLOC_DECL -#else -#if __STDC__ -#ifndef __cplusplus -#include -#endif -#else -/* Just try to get by without declaring the routines. This will fail - * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int) - * or sizeof(void*) != sizeof(int). - */ -#endif -#endif - -/* Amount of stuff to slurp up with each read. */ -#ifndef YY_READ_BUF_SIZE -#define YY_READ_BUF_SIZE 8192 -#endif - -/* Copy whatever the last rule matched to the standard output. */ - -#ifndef ECHO -/* This used to be an fputs(), but since the string might contain NUL's, - * we now use fwrite(). - */ -#define ECHO (void) fwrite( yytext, yyleng, 1, yyout ) -#endif - -/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, - * is returned in "result". - */ -#ifndef YY_INPUT -#define YY_INPUT(buf,result,max_size) \ - if ( yy_current_buffer->yy_is_interactive ) \ - { \ - int c = '*', n; \ - for ( n = 0; n < max_size && \ - (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ - buf[n] = (char) c; \ - if ( c == '\n' ) \ - buf[n++] = (char) c; \ - if ( c == EOF && ferror( yyin ) ) \ - YY_FATAL_ERROR( "input in flex scanner failed" ); \ - result = n; \ - } \ - else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \ - && ferror( yyin ) ) \ - YY_FATAL_ERROR( "input in flex scanner failed" ); -#endif - -/* No semi-colon after return; correct usage is to write "yyterminate();" - - * we don't want an extra ';' after the "return" because that will cause - * some compilers to complain about unreachable statements. - */ -#ifndef yyterminate -#define yyterminate() return YY_NULL -#endif - -/* Number of entries by which start-condition stack grows. */ -#ifndef YY_START_STACK_INCR -#define YY_START_STACK_INCR 25 -#endif - -/* Report a fatal error. */ -#ifndef YY_FATAL_ERROR -#define YY_FATAL_ERROR(msg) yy_fatal_error( msg ) -#endif - -/* Default declaration of generated scanner - a define so the user can - * easily add parameters. - */ -#ifndef YY_DECL -#define YY_DECL int yylex YY_PROTO(( void )) -#endif - -/* Code executed at the beginning of each rule, after yytext and yyleng - * have been set up. - */ -#ifndef YY_USER_ACTION -#define YY_USER_ACTION -#endif - -/* Code executed at the end of each rule. */ -#ifndef YY_BREAK -#define YY_BREAK break; -#endif - -#define YY_RULE_SETUP \ - YY_USER_ACTION - -YY_DECL - { - register yy_state_type yy_current_state; - register char *yy_cp, *yy_bp; - register int yy_act; - -#line 21 "lex.l" - - -#line 601 "lex.c" - - if ( yy_init ) - { - yy_init = 0; - -#ifdef YY_USER_INIT - YY_USER_INIT; -#endif - - if ( ! yy_start ) - yy_start = 1; /* first start state */ - - if ( ! yyin ) - yyin = stdin; - - if ( ! yyout ) - yyout = stdout; - - if ( ! yy_current_buffer ) - yy_current_buffer = - yy_create_buffer( yyin, YY_BUF_SIZE ); - - yy_load_buffer_state(); - } - - while ( 1 ) /* loops until end-of-file is reached */ - { - yy_cp = yy_c_buf_p; - - /* Support of yytext. */ - *yy_cp = yy_hold_char; - - /* yy_bp points to the position in yy_ch_buf of the start of - * the current run. - */ - yy_bp = yy_cp; - - yy_current_state = yy_start; -yy_match: - do - { - register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; - if ( yy_accept[yy_current_state] ) - { - yy_last_accepting_state = yy_current_state; - yy_last_accepting_cpos = yy_cp; - } - while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) - { - yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 63 ) - yy_c = yy_meta[(unsigned int) yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; - ++yy_cp; - } - while ( yy_base[yy_current_state] != 96 ); - -yy_find_action: - yy_act = yy_accept[yy_current_state]; - if ( yy_act == 0 ) - { /* have to back up */ - yy_cp = yy_last_accepting_cpos; - yy_current_state = yy_last_accepting_state; - yy_act = yy_accept[yy_current_state]; - } - - YY_DO_BEFORE_ACTION; - - -do_action: /* This label is used only to access EOF actions. */ - - - switch ( yy_act ) - { /* beginning of action switch */ - case 0: /* must back up */ - /* undo the effects of YY_DO_BEFORE_ACTION */ - *yy_cp = yy_hold_char; - yy_cp = yy_last_accepting_cpos; - yy_current_state = yy_last_accepting_state; - goto yy_find_action; - -case 1: -YY_RULE_SETUP -#line 23 "lex.l" -{ return EQ; } - YY_BREAK -case 2: -YY_RULE_SETUP -#line 24 "lex.l" -{ return NEQ; } - YY_BREAK -case 3: -YY_RULE_SETUP -#line 25 "lex.l" -{ return LE; } - YY_BREAK -case 4: -YY_RULE_SETUP -#line 26 "lex.l" -{ return GR; } - YY_BREAK -case 5: -YY_RULE_SETUP -#line 27 "lex.l" -{ return LEQ; } - YY_BREAK -case 6: -YY_RULE_SETUP -#line 28 "lex.l" -{ return GEQ; } - YY_BREAK -case 7: -YY_RULE_SETUP -#line 29 "lex.l" -{ return NOT; } - YY_BREAK -case 8: -YY_RULE_SETUP -#line 30 "lex.l" -{ return AND; } - YY_BREAK -case 9: -YY_RULE_SETUP -#line 31 "lex.l" -{ return OR; } - YY_BREAK -case 10: -YY_RULE_SETUP -#line 32 "lex.l" -{ return TOKEN_IN; } - YY_BREAK -case 11: -YY_RULE_SETUP -#line 33 "lex.l" -{ return EXIST; } - YY_BREAK -case 12: -YY_RULE_SETUP -#line 34 "lex.l" -{ return MAX; } - YY_BREAK -case 13: -YY_RULE_SETUP -#line 35 "lex.l" -{ return MIN; } - YY_BREAK -case 14: -YY_RULE_SETUP -#line 37 "lex.l" -{ yylval.name = 0L; return (int)(*yytext); } - YY_BREAK -case 15: -YY_RULE_SETUP -#line 39 "lex.l" -{ yylval.valb = 1; return VAL_BOOL; } - YY_BREAK -case 16: -YY_RULE_SETUP -#line 40 "lex.l" -{ yylval.valb = 0; return VAL_BOOL; } - YY_BREAK -case 17: -YY_RULE_SETUP -#line 42 "lex.l" -{ yylval.name = KTraderParse_putString( yytext ); return VAL_STRING; } - YY_BREAK -case 18: -YY_RULE_SETUP -#line 44 "lex.l" -{ yylval.vali = atoi( yytext ); return VAL_NUM; } - YY_BREAK -case 19: -YY_RULE_SETUP -#line 45 "lex.l" -{ yylval.vali = atoi( yytext ); return VAL_NUM; } - YY_BREAK -case 20: -YY_RULE_SETUP -#line 47 "lex.l" -{ yylval.vald = atof( yytext ); return VAL_FLOAT; } - YY_BREAK -case 21: -YY_RULE_SETUP -#line 49 "lex.l" -{ yylval.name = KTraderParse_putSymbolInBrackets( yytext ); return VAL_ID; } - YY_BREAK -case 22: -YY_RULE_SETUP -#line 51 "lex.l" -{ yylval.name = KTraderParse_putSymbol( yytext ); return VAL_ID; } - YY_BREAK -case 23: -YY_RULE_SETUP -#line 53 "lex.l" -/* eat up whitespace */ - YY_BREAK -case 24: -YY_RULE_SETUP -#line 55 "lex.l" -{ printf( "Unrecognized character: %s\n", yytext ); } - YY_BREAK -case 25: -YY_RULE_SETUP -#line 57 "lex.l" -ECHO; - YY_BREAK -#line 809 "lex.c" -case YY_STATE_EOF(INITIAL): - yyterminate(); - - case YY_END_OF_BUFFER: - { - /* Amount of text matched not including the EOB char. */ - int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1; - - /* Undo the effects of YY_DO_BEFORE_ACTION. */ - *yy_cp = yy_hold_char; - YY_RESTORE_YY_MORE_OFFSET - - if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW ) - { - /* We're scanning a new file or input source. It's - * possible that this happened because the user - * just pointed yyin at a new source and called - * yylex(). If so, then we have to assure - * consistency between yy_current_buffer and our - * globals. Here is the right place to do so, because - * this is the first action (other than possibly a - * back-up) that will match for the new input source. - */ - yy_n_chars = yy_current_buffer->yy_n_chars; - yy_current_buffer->yy_input_file = yyin; - yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL; - } - - /* Note that here we test for yy_c_buf_p "<=" to the position - * of the first EOB in the buffer, since yy_c_buf_p will - * already have been incremented past the NUL character - * (since all states make transitions on EOB to the - * end-of-buffer state). Contrast this with the test - * in input(). - */ - if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] ) - { /* This was really a NUL. */ - yy_state_type yy_next_state; - - yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text; - - yy_current_state = yy_get_previous_state(); - - /* Okay, we're now positioned to make the NUL - * transition. We couldn't have - * yy_get_previous_state() go ahead and do it - * for us because it doesn't know how to deal - * with the possibility of jamming (and we don't - * want to build jamming into it because then it - * will run more slowly). - */ - - yy_next_state = yy_try_NUL_trans( yy_current_state ); - - yy_bp = yytext_ptr + YY_MORE_ADJ; - - if ( yy_next_state ) - { - /* Consume the NUL. */ - yy_cp = ++yy_c_buf_p; - yy_current_state = yy_next_state; - goto yy_match; - } - - else - { - yy_cp = yy_c_buf_p; - goto yy_find_action; - } - } - - else switch ( yy_get_next_buffer() ) - { - case EOB_ACT_END_OF_FILE: - { - yy_did_buffer_switch_on_eof = 0; - - if ( yywrap() ) - { - /* Note: because we've taken care in - * yy_get_next_buffer() to have set up - * yytext, we can now set up - * yy_c_buf_p so that if some total - * hoser (like flex itself) wants to - * call the scanner after we return the - * YY_NULL, it'll still work - another - * YY_NULL will get returned. - */ - yy_c_buf_p = yytext_ptr + YY_MORE_ADJ; - - yy_act = YY_STATE_EOF(YY_START); - goto do_action; - } - - else - { - if ( ! yy_did_buffer_switch_on_eof ) - YY_NEW_FILE; - } - break; - } - - case EOB_ACT_CONTINUE_SCAN: - yy_c_buf_p = - yytext_ptr + yy_amount_of_matched_text; - - yy_current_state = yy_get_previous_state(); - - yy_cp = yy_c_buf_p; - yy_bp = yytext_ptr + YY_MORE_ADJ; - goto yy_match; - - case EOB_ACT_LAST_MATCH: - yy_c_buf_p = - &yy_current_buffer->yy_ch_buf[yy_n_chars]; - - yy_current_state = yy_get_previous_state(); - - yy_cp = yy_c_buf_p; - yy_bp = yytext_ptr + YY_MORE_ADJ; - goto yy_find_action; - } - break; - } - - default: - YY_FATAL_ERROR( - "fatal flex scanner internal error--no action found" ); - } /* end of action switch */ - } /* end of scanning one token */ - } /* end of yylex */ - - -/* yy_get_next_buffer - try to read in a new buffer - * - * Returns a code representing an action: - * EOB_ACT_LAST_MATCH - - * EOB_ACT_CONTINUE_SCAN - continue scanning from current position - * EOB_ACT_END_OF_FILE - end of file - */ - -static int yy_get_next_buffer() - { - register char *dest = yy_current_buffer->yy_ch_buf; - register char *source = yytext_ptr; - register int number_to_move, i; - int ret_val; - - if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] ) - YY_FATAL_ERROR( - "fatal flex scanner internal error--end of buffer missed" ); - - if ( yy_current_buffer->yy_fill_buffer == 0 ) - { /* Don't try to fill the buffer, so this is an EOF. */ - if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 ) - { - /* We matched a single character, the EOB, so - * treat this as a final EOF. - */ - return EOB_ACT_END_OF_FILE; - } - - else - { - /* We matched some text prior to the EOB, first - * process it. - */ - return EOB_ACT_LAST_MATCH; - } - } - - /* Try to read more data. */ - - /* First move last chars to start of buffer. */ - number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1; - - for ( i = 0; i < number_to_move; ++i ) - *(dest++) = *(source++); - - if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING ) - /* don't do the read, it's not guaranteed to return an EOF, - * just force an EOF - */ - yy_current_buffer->yy_n_chars = yy_n_chars = 0; - - else - { - int num_to_read = - yy_current_buffer->yy_buf_size - number_to_move - 1; - - while ( num_to_read <= 0 ) - { /* Not enough room in the buffer - grow it. */ -#ifdef YY_USES_REJECT - YY_FATAL_ERROR( -"input buffer overflow, can't enlarge buffer because scanner uses REJECT" ); -#else - - /* just a shorter name for the current buffer */ - YY_BUFFER_STATE b = yy_current_buffer; - - int yy_c_buf_p_offset = - (int) (yy_c_buf_p - b->yy_ch_buf); - - if ( b->yy_is_our_buffer ) - { - int new_size = b->yy_buf_size * 2; - - if ( new_size <= 0 ) - b->yy_buf_size += b->yy_buf_size / 8; - else - b->yy_buf_size *= 2; - - b->yy_ch_buf = (char *) - /* Include room in for 2 EOB chars. */ - yy_flex_realloc( (void *) b->yy_ch_buf, - b->yy_buf_size + 2 ); - } - else - /* Can't grow it, we don't own it. */ - b->yy_ch_buf = 0; - - if ( ! b->yy_ch_buf ) - YY_FATAL_ERROR( - "fatal error - scanner input buffer overflow" ); - - yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset]; - - num_to_read = yy_current_buffer->yy_buf_size - - number_to_move - 1; -#endif - } - - if ( num_to_read > YY_READ_BUF_SIZE ) - num_to_read = YY_READ_BUF_SIZE; - - /* Read in more data. */ - YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]), - yy_n_chars, num_to_read ); - - yy_current_buffer->yy_n_chars = yy_n_chars; - } - - if ( yy_n_chars == 0 ) - { - if ( number_to_move == YY_MORE_ADJ ) - { - ret_val = EOB_ACT_END_OF_FILE; - yyrestart( yyin ); - } - - else - { - ret_val = EOB_ACT_LAST_MATCH; - yy_current_buffer->yy_buffer_status = - YY_BUFFER_EOF_PENDING; - } - } - - else - ret_val = EOB_ACT_CONTINUE_SCAN; - - yy_n_chars += number_to_move; - yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR; - yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; - - yytext_ptr = &yy_current_buffer->yy_ch_buf[0]; - - return ret_val; - } - - -/* yy_get_previous_state - get the state just before the EOB char was reached */ - -static yy_state_type yy_get_previous_state() - { - register yy_state_type yy_current_state; - register char *yy_cp; - - yy_current_state = yy_start; - - for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp ) - { - register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); - if ( yy_accept[yy_current_state] ) - { - yy_last_accepting_state = yy_current_state; - yy_last_accepting_cpos = yy_cp; - } - while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) - { - yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 63 ) - yy_c = yy_meta[(unsigned int) yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; - } - - return yy_current_state; - } - - -/* yy_try_NUL_trans - try to make a transition on the NUL character - * - * synopsis - * next_state = yy_try_NUL_trans( current_state ); - */ - -#ifdef YY_USE_PROTOS -static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state ) -#else -static yy_state_type yy_try_NUL_trans( yy_current_state ) -yy_state_type yy_current_state; -#endif - { - register int yy_is_jam; - register char *yy_cp = yy_c_buf_p; - - register YY_CHAR yy_c = 1; - if ( yy_accept[yy_current_state] ) - { - yy_last_accepting_state = yy_current_state; - yy_last_accepting_cpos = yy_cp; - } - while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) - { - yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 63 ) - yy_c = yy_meta[(unsigned int) yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; - yy_is_jam = (yy_current_state == 62); - - return yy_is_jam ? 0 : yy_current_state; - } - - -#ifndef YY_NO_UNPUT -#ifdef YY_USE_PROTOS -static void yyunput( int c, register char *yy_bp ) -#else -static void yyunput( c, yy_bp ) -int c; -register char *yy_bp; -#endif - { - register char *yy_cp = yy_c_buf_p; - - /* undo effects of setting up yytext */ - *yy_cp = yy_hold_char; - - if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 ) - { /* need to shift things up to make room */ - /* +2 for EOB chars. */ - register int number_to_move = yy_n_chars + 2; - register char *dest = &yy_current_buffer->yy_ch_buf[ - yy_current_buffer->yy_buf_size + 2]; - register char *source = - &yy_current_buffer->yy_ch_buf[number_to_move]; - - while ( source > yy_current_buffer->yy_ch_buf ) - *--dest = *--source; - - yy_cp += (int) (dest - source); - yy_bp += (int) (dest - source); - yy_current_buffer->yy_n_chars = - yy_n_chars = yy_current_buffer->yy_buf_size; - - if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 ) - YY_FATAL_ERROR( "flex scanner push-back overflow" ); - } - - *--yy_cp = (char) c; - - - yytext_ptr = yy_bp; - yy_hold_char = *yy_cp; - yy_c_buf_p = yy_cp; - } -#endif /* ifndef YY_NO_UNPUT */ - - -#ifdef __cplusplus -static int yyinput() -#else -static int input() -#endif - { - int c; - - *yy_c_buf_p = yy_hold_char; - - if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR ) - { - /* yy_c_buf_p now points to the character we want to return. - * If this occurs *before* the EOB characters, then it's a - * valid NUL; if not, then we've hit the end of the buffer. - */ - if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] ) - /* This was really a NUL. */ - *yy_c_buf_p = '\0'; - - else - { /* need more input */ - int offset = yy_c_buf_p - yytext_ptr; - ++yy_c_buf_p; - - switch ( yy_get_next_buffer() ) - { - case EOB_ACT_LAST_MATCH: - /* This happens because yy_g_n_b() - * sees that we've accumulated a - * token and flags that we need to - * try matching the token before - * proceeding. But for input(), - * there's no matching to consider. - * So convert the EOB_ACT_LAST_MATCH - * to EOB_ACT_END_OF_FILE. - */ - - /* Reset buffer status. */ - yyrestart( yyin ); - - /* fall through */ - - case EOB_ACT_END_OF_FILE: - { - if ( yywrap() ) - return EOF; - - if ( ! yy_did_buffer_switch_on_eof ) - YY_NEW_FILE; -#ifdef __cplusplus - return yyinput(); -#else - return input(); -#endif - } - - case EOB_ACT_CONTINUE_SCAN: - yy_c_buf_p = yytext_ptr + offset; - break; - } - } - } - - c = *(unsigned char *) yy_c_buf_p; /* cast for 8-bit char's */ - *yy_c_buf_p = '\0'; /* preserve yytext */ - yy_hold_char = *++yy_c_buf_p; - - - return c; - } - - -#ifdef YY_USE_PROTOS -void yyrestart( FILE *input_file ) -#else -void yyrestart( input_file ) -FILE *input_file; -#endif - { - if ( ! yy_current_buffer ) - yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); - - yy_init_buffer( yy_current_buffer, input_file ); - yy_load_buffer_state(); - } - - -#ifdef YY_USE_PROTOS -void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer ) -#else -void yy_switch_to_buffer( new_buffer ) -YY_BUFFER_STATE new_buffer; -#endif - { - if ( yy_current_buffer == new_buffer ) - return; - - if ( yy_current_buffer ) - { - /* Flush out information for old buffer. */ - *yy_c_buf_p = yy_hold_char; - yy_current_buffer->yy_buf_pos = yy_c_buf_p; - yy_current_buffer->yy_n_chars = yy_n_chars; - } - - yy_current_buffer = new_buffer; - yy_load_buffer_state(); - - /* We don't actually know whether we did this switch during - * EOF (yywrap()) processing, but the only time this flag - * is looked at is after yywrap() is called, so it's safe - * to go ahead and always set it. - */ - yy_did_buffer_switch_on_eof = 1; - } - - -#ifdef YY_USE_PROTOS -void yy_load_buffer_state( void ) -#else -void yy_load_buffer_state() -#endif - { - yy_n_chars = yy_current_buffer->yy_n_chars; - yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos; - yyin = yy_current_buffer->yy_input_file; - yy_hold_char = *yy_c_buf_p; - } - - -#ifdef YY_USE_PROTOS -YY_BUFFER_STATE yy_create_buffer( FILE *file, int size ) -#else -YY_BUFFER_STATE yy_create_buffer( file, size ) -FILE *file; -int size; -#endif - { - YY_BUFFER_STATE b; - - b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) ); - if ( ! b ) - YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); - - b->yy_buf_size = size; - - /* yy_ch_buf has to be 2 characters longer than the size given because - * we need to put in 2 end-of-buffer characters. - */ - b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 ); - if ( ! b->yy_ch_buf ) - YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); - - b->yy_is_our_buffer = 1; - - yy_init_buffer( b, file ); - - return b; - } - - -#ifdef YY_USE_PROTOS -void yy_delete_buffer( YY_BUFFER_STATE b ) -#else -void yy_delete_buffer( b ) -YY_BUFFER_STATE b; -#endif - { - if ( ! b ) - return; - - if ( b == yy_current_buffer ) - yy_current_buffer = (YY_BUFFER_STATE) 0; - - if ( b->yy_is_our_buffer ) - yy_flex_free( (void *) b->yy_ch_buf ); - - yy_flex_free( (void *) b ); - } - - - -#ifdef YY_USE_PROTOS -void yy_init_buffer( YY_BUFFER_STATE b, FILE *file ) -#else -void yy_init_buffer( b, file ) -YY_BUFFER_STATE b; -FILE *file; -#endif - - - { - yy_flush_buffer( b ); - - b->yy_input_file = file; - b->yy_fill_buffer = 1; - -#if YY_ALWAYS_INTERACTIVE - b->yy_is_interactive = 1; -#else -#if YY_NEVER_INTERACTIVE - b->yy_is_interactive = 0; -#else - b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; -#endif -#endif - } - - -#ifdef YY_USE_PROTOS -void yy_flush_buffer( YY_BUFFER_STATE b ) -#else -void yy_flush_buffer( b ) -YY_BUFFER_STATE b; -#endif - - { - if ( ! b ) - return; - - b->yy_n_chars = 0; - - /* We always need two end-of-buffer characters. The first causes - * a transition to the end-of-buffer state. The second causes - * a jam in that state. - */ - b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; - b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; - - b->yy_buf_pos = &b->yy_ch_buf[0]; - - b->yy_at_bol = 1; - b->yy_buffer_status = YY_BUFFER_NEW; - - if ( b == yy_current_buffer ) - yy_load_buffer_state(); - } - - -#ifndef YY_NO_SCAN_BUFFER -#ifdef YY_USE_PROTOS -YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size ) -#else -YY_BUFFER_STATE yy_scan_buffer( base, size ) -char *base; -yy_size_t size; -#endif - { - YY_BUFFER_STATE b; - - if ( size < 2 || - base[size-2] != YY_END_OF_BUFFER_CHAR || - base[size-1] != YY_END_OF_BUFFER_CHAR ) - /* They forgot to leave room for the EOB's. */ - return 0; - - b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) ); - if ( ! b ) - YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" ); - - b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ - b->yy_buf_pos = b->yy_ch_buf = base; - b->yy_is_our_buffer = 0; - b->yy_input_file = 0; - b->yy_n_chars = b->yy_buf_size; - b->yy_is_interactive = 0; - b->yy_at_bol = 1; - b->yy_fill_buffer = 0; - b->yy_buffer_status = YY_BUFFER_NEW; - - yy_switch_to_buffer( b ); - - return b; - } -#endif - - -#ifndef YY_NO_SCAN_STRING -#ifdef YY_USE_PROTOS -YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str ) -#else -YY_BUFFER_STATE yy_scan_string( yy_str ) -yyconst char *yy_str; -#endif - { - int len; - for ( len = 0; yy_str[len]; ++len ) - ; - - return yy_scan_bytes( yy_str, len ); - } -#endif - - -#ifndef YY_NO_SCAN_BYTES -#ifdef YY_USE_PROTOS -YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len ) -#else -YY_BUFFER_STATE yy_scan_bytes( bytes, len ) -yyconst char *bytes; -int len; -#endif - { - YY_BUFFER_STATE b; - char *buf; - yy_size_t n; - int i; - - /* Get memory for full buffer, including space for trailing EOB's. */ - n = len + 2; - buf = (char *) yy_flex_alloc( n ); - if ( ! buf ) - YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); - - for ( i = 0; i < len; ++i ) - buf[i] = bytes[i]; - - buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR; - - b = yy_scan_buffer( buf, n ); - if ( ! b ) - YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" ); - - /* It's okay to grow etc. this buffer, and we should throw it - * away when we're done. - */ - b->yy_is_our_buffer = 1; - - return b; - } -#endif - - -#ifndef YY_NO_PUSH_STATE -#ifdef YY_USE_PROTOS -static void yy_push_state( int new_state ) -#else -static void yy_push_state( new_state ) -int new_state; -#endif - { - if ( yy_start_stack_ptr >= yy_start_stack_depth ) - { - yy_size_t new_size; - - yy_start_stack_depth += YY_START_STACK_INCR; - new_size = yy_start_stack_depth * sizeof( int ); - - if ( ! yy_start_stack ) - yy_start_stack = (int *) yy_flex_alloc( new_size ); - - else - yy_start_stack = (int *) yy_flex_realloc( - (void *) yy_start_stack, new_size ); - - if ( ! yy_start_stack ) - YY_FATAL_ERROR( - "out of memory expanding start-condition stack" ); - } - - yy_start_stack[yy_start_stack_ptr++] = YY_START; - - BEGIN(new_state); - } -#endif - - -#ifndef YY_NO_POP_STATE -static void yy_pop_state() - { - if ( --yy_start_stack_ptr < 0 ) - YY_FATAL_ERROR( "start-condition stack underflow" ); - - BEGIN(yy_start_stack[yy_start_stack_ptr]); - } -#endif - - -#ifndef YY_NO_TOP_STATE -static int yy_top_state() - { - return yy_start_stack[yy_start_stack_ptr - 1]; - } -#endif - -#ifndef YY_EXIT_FAILURE -#define YY_EXIT_FAILURE 2 -#endif - -#ifdef YY_USE_PROTOS -static void yy_fatal_error( yyconst char msg[] ) -#else -static void yy_fatal_error( msg ) -char msg[]; -#endif - { - (void) fprintf( stderr, "[lex] %s\n", msg ); - exit( YY_EXIT_FAILURE ); - } - - - -/* Redefine yyless() so it works in section 3 code. */ - -#undef yyless -#define yyless(n) \ - do \ - { \ - /* Undo effects of setting up yytext. */ \ - yytext[yyleng] = yy_hold_char; \ - yy_c_buf_p = yytext + n; \ - yy_hold_char = *yy_c_buf_p; \ - *yy_c_buf_p = '\0'; \ - yyleng = n; \ - } \ - while ( 0 ) - - -/* Internal utility routines. */ - -#ifndef yytext_ptr -#ifdef YY_USE_PROTOS -static void yy_flex_strncpy( char *s1, yyconst char *s2, int n ) -#else -static void yy_flex_strncpy( s1, s2, n ) -char *s1; -yyconst char *s2; -int n; -#endif - { - register int i; - for ( i = 0; i < n; ++i ) - s1[i] = s2[i]; - } -#endif - -#ifdef YY_NEED_STRLEN -#ifdef YY_USE_PROTOS -static int yy_flex_strlen( yyconst char *s ) -#else -static int yy_flex_strlen( s ) -yyconst char *s; -#endif - { - register int n; - for ( n = 0; s[n]; ++n ) - ; - - return n; - } -#endif - - -#ifdef YY_USE_PROTOS -static void *yy_flex_alloc( yy_size_t size ) -#else -static void *yy_flex_alloc( size ) -yy_size_t size; -#endif - { - return (void *) malloc( size ); - } - -#ifdef YY_USE_PROTOS -static void *yy_flex_realloc( void *ptr, yy_size_t size ) -#else -static void *yy_flex_realloc( ptr, size ) -void *ptr; -yy_size_t size; -#endif - { - /* The cast to (char *) in the following accommodates both - * implementations that use char* generic pointers, and those - * that use void* generic pointers. It works with the latter - * because both ANSI C and C++ allow castless assignment from - * any pointer type to void*, and deal with argument conversions - * as though doing an assignment. - */ - return (void *) realloc( (char *) ptr, size ); - } - -#ifdef YY_USE_PROTOS -static void yy_flex_free( void *ptr ) -#else -static void yy_flex_free( ptr ) -void *ptr; -#endif - { - free( ptr ); - } - -#if YY_MAIN -int main() - { - yylex(); - return 0; - } -#endif -#line 57 "lex.l" - - -char* KTraderParse_putSymbolInBrackets( char *_name ) -{ - int l = strlen( _name )-1; - char *p = (char *)malloc( l ); - if (p != NULL) - { - strncpy( p, _name+1, l-1 ); - p[l-1] = 0; - } - - return p; -} - -char *KTraderParse_putSymbol( char *_name ) -{ - char *p = (char*)malloc( strlen( _name ) + 1 ); - if (p != NULL) - { - strcpy( p, _name ); - } - return p; -} - -char* KTraderParse_putString( char *_str ) -{ - int l = strlen( _str ); - char *p = (char*)malloc( l ); - char *s = _str + 1; - char *d = p; - - if (p == NULL) - return NULL; - - while ( s != _str + l - 1 ) - { - if ( *s != '\\' ) - *d++ = *s++; - else - { - s++; - if ( s != _str + l - 1 ) - { - if ( *s == '\\' ) - *d++ = '\\'; - else if ( *s == 'n' ) - *d++ = '\n'; - else if ( *s == 'r' ) - *d++ = '\r'; - else if ( *s == 't' ) - *d++ = '\t'; - s++; - } - } - } - *d = 0; - return p; -} - -void KTraderParse_initFlex( const char *_code ) -{ - yy_switch_to_buffer( yy_scan_string( _code ) ); -} - -int yywrap() -{ - yy_delete_buffer( YY_CURRENT_BUFFER ); - return 1; -} diff --git a/kio/kio/lex.l b/kio/kio/lex.l deleted file mode 100644 index 073a34965..000000000 --- a/kio/kio/lex.l +++ /dev/null @@ -1,126 +0,0 @@ -%{ -#define yylval kiotraderlval -#define yywrap kiotraderwrap - -#include "yacc.h" -#include -#include -#define YY_NO_UNPUT - -char* KTraderParse_putSymbol( char *_name ); -char *KTraderParse_putSymbolInBrackets( char *_name ); -char* KTraderParse_putString( char *_name ); -int yywrap(); -int kiotraderlex(void); -void KTraderParse_initFlex( const char *_code ); - -%} - -DIGIT [0-9] - -%% - -"==" { return EQ; } -"!=" { return NEQ; } -"<" { return LE; } -">" { return GR; } -"<=" { return LEQ; } -">=" { return GEQ; } -"not" { return NOT; } -"and" { return AND; } -"or" { return OR; } -"in" { return TOKEN_IN; } -"exist" { return EXIST; } -"max" { return MAX; } -"min" { return MIN; } - -"~"|"/"|"+"|"-"|"="|"*"|"("|")"|"," { yylval.name = 0L; return (int)(*yytext); } - -"TRUE" { yylval.valb = 1; return VAL_BOOL; } -"FALSE" { yylval.valb = 0; return VAL_BOOL; } - -"'"[^']*"'" { yylval.name = KTraderParse_putString( yytext ); return VAL_STRING; } - -"-"{DIGIT}+ { yylval.vali = atoi( yytext ); return VAL_NUM; } -{DIGIT}+ { yylval.vali = atoi( yytext ); return VAL_NUM; } - -{DIGIT}*"\."{DIGIT}+ { yylval.vald = atof( yytext ); return VAL_FLOAT; } - -\[[a-zA-Z][a-zA-Z0-9\-]*\] { yylval.name = KTraderParse_putSymbolInBrackets( yytext ); return VAL_ID; } - -[a-zA-Z][a-zA-Z0-9]* { yylval.name = KTraderParse_putSymbol( yytext ); return VAL_ID; } - -[ \t\n]+ /* eat up whitespace */ - -. { printf( "Unrecognized character: %s\n", yytext ); } - -%% - -char* KTraderParse_putSymbolInBrackets( char *_name ) -{ - int l = strlen( _name )-1; - char *p = (char *)malloc( l ); - if (p != NULL) - { - strncpy( p, _name+1, l-1 ); - p[l-1] = 0; - } - - return p; -} - -char *KTraderParse_putSymbol( char *_name ) -{ - char *p = (char*)malloc( strlen( _name ) + 1 ); - if (p != NULL) - { - strcpy( p, _name ); - } - return p; -} - -char* KTraderParse_putString( char *_str ) -{ - int l = strlen( _str ); - char *p = (char*)malloc( l ); - char *s = _str + 1; - char *d = p; - - if (p == NULL) - return NULL; - - while ( s != _str + l - 1 ) - { - if ( *s != '\\' ) - *d++ = *s++; - else - { - s++; - if ( s != _str + l - 1 ) - { - if ( *s == '\\' ) - *d++ = '\\'; - else if ( *s == 'n' ) - *d++ = '\n'; - else if ( *s == 'r' ) - *d++ = '\r'; - else if ( *s == 't' ) - *d++ = '\t'; - s++; - } - } - } - *d = 0; - return p; -} - -void KTraderParse_initFlex( const char *_code ) -{ - yy_switch_to_buffer( yy_scan_string( _code ) ); -} - -int yywrap() -{ - yy_delete_buffer( YY_CURRENT_BUFFER ); - return 1; -} diff --git a/kio/kio/metainfojob.cpp b/kio/kio/metainfojob.cpp deleted file mode 100644 index d28914f20..000000000 --- a/kio/kio/metainfojob.cpp +++ /dev/null @@ -1,184 +0,0 @@ -// -*- c++ -*- -// vim: ts=4 sw=4 et -/* This file is part of the KDE libraries - Copyright (C) 2002 Rolf Magnus - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation version 2.0. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. - - $Id$ -*/ - -#include // Do not remove, needed for correct bool serialization -#include -#include -#include -#include -#include - -#include - -#include "metainfojob.moc" - -using namespace TDEIO; - -struct TDEIO::MetaInfoJobPrivate -{ - KFileItemList items; // all the items we got - KFileItemListIterator* currentItem; // argh! No default constructor - bool deleteItems; // Delete the KFileItems when done? - bool succeeded; // if the current item is ok -}; - -MetaInfoJob::MetaInfoJob(const KFileItemList &items, bool deleteItems) - : TDEIO::Job(false /* no GUI */) -{ - d = new MetaInfoJobPrivate; - d->deleteItems = deleteItems; - d->succeeded = false; - d->items = items; - d->currentItem = new KFileItemListIterator(d->items); - - d->items.setAutoDelete(deleteItems); - - if (d->currentItem->isEmpty()) - { - kdDebug(7007) << "nothing to do for the MetaInfoJob\n"; - emitResult(); - return; - } - - kdDebug(7007) << "starting MetaInfoJob\n"; - - // Return to event loop first, determineNextFile() might delete this; - // (no idea what that means, it comes from previewjob) - TQTimer::singleShot(0, this, TQT_SLOT(start())); -} - -MetaInfoJob::~MetaInfoJob() -{ - delete d->currentItem; - delete d; -} - -void MetaInfoJob::start() -{ - getMetaInfo(); -} - -void MetaInfoJob::removeItem(const KFileItem* item) -{ - if (d->currentItem->current() == item) - { - subjobs.first()->kill(); - subjobs.removeFirst(); - determineNextFile(); - } - - d->items.remove(d->items.find(item)); -} - -void MetaInfoJob::determineNextFile() -{ - if (d->currentItem->atLast()) - { - kdDebug(7007) << "finished MetaInfoJob\n"; - emitResult(); - return; - } - - ++(*d->currentItem); - d->succeeded = false; - - // does the file item already have the needed info? Then shortcut - if (d->currentItem->current()->metaInfo(false).isValid()) - { -// kdDebug(7007) << "Is already valid *************************\n"; - emit gotMetaInfo(d->currentItem->current()); - determineNextFile(); - return; - } - - getMetaInfo(); -} - -void MetaInfoJob::slotResult( TDEIO::Job *job ) -{ - subjobs.remove(job); - Q_ASSERT(subjobs.isEmpty()); // We should have only one job at a time ... - - determineNextFile(); -} - -void MetaInfoJob::getMetaInfo() -{ - Q_ASSERT(!d->currentItem->isEmpty()); - - KURL URL; - URL.setProtocol("metainfo"); - URL.setPath(d->currentItem->current()->url().path()); - - TDEIO::TransferJob* job = TDEIO::get(URL, false, false); - addSubjob(job); - - connect(job, TQT_SIGNAL(data(TDEIO::Job *, const TQByteArray &)), - this, TQT_SLOT(slotMetaInfo(TDEIO::Job *, const TQByteArray &))); - - job->addMetaData("mimeType", d->currentItem->current()->mimetype()); -} - - -void MetaInfoJob::slotMetaInfo(TDEIO::Job*, const TQByteArray &data) -{ - KFileMetaInfo info; - TQDataStream s(data, IO_ReadOnly); - - s >> info; - - d->currentItem->current()->setMetaInfo(info); - emit gotMetaInfo(d->currentItem->current()); - d->succeeded = true; -} - -TQStringList MetaInfoJob::availablePlugins() -{ - TQStringList result; - KTrader::OfferList plugins = KTrader::self()->query("KFilePlugin"); - for (KTrader::OfferList::ConstIterator it = plugins.begin(); it != plugins.end(); ++it) - result.append((*it)->desktopEntryName()); - return result; -} - -TQStringList MetaInfoJob::supportedMimeTypes() -{ - TQStringList result; - KTrader::OfferList plugins = KTrader::self()->query("KFilePlugin"); - for (KTrader::OfferList::ConstIterator it = plugins.begin(); it != plugins.end(); ++it) - result += (*it)->property("MimeTypes").toStringList(); - return result; -} - -TDEIO_EXPORT MetaInfoJob *TDEIO::fileMetaInfo( const KFileItemList &items) -{ - return new MetaInfoJob(items, false); -} - -TDEIO_EXPORT MetaInfoJob *TDEIO::fileMetaInfo( const KURL::List &items) -{ - KFileItemList fileItems; - for (KURL::List::ConstIterator it = items.begin(); it != items.end(); ++it) - fileItems.append(new KFileItem(KFileItem::Unknown, KFileItem::Unknown, *it, true)); - return new MetaInfoJob(fileItems, true); -} - diff --git a/kio/kio/metainfojob.h b/kio/kio/metainfojob.h deleted file mode 100644 index e2152bded..000000000 --- a/kio/kio/metainfojob.h +++ /dev/null @@ -1,119 +0,0 @@ -// -*- c++ -*- -// vim: ts=4 sw=4 et -/* This file is part of the KDE libraries - Copyright (C) 2001 Rolf Magnus - parts of this taken from previewjob.h - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation version 2.0. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef __kio_metainfojob_h__ -#define __kio_metainfojob_h__ - -#include -#include - -namespace TDEIO { - /** - * MetaInfoJob is a KIO Job to retrieve meta information from files. - * - * @short KIO Job to retrieve meta information from files. - * @since 3.1 - */ - class TDEIO_EXPORT MetaInfoJob : public TDEIO::Job - { - Q_OBJECT - public: - /** - * Creates a new MetaInfoJob. - * @param items A list of KFileItems to get the metainfo for - * @param deleteItems If true, the finished KFileItems are deleted - */ - MetaInfoJob(const KFileItemList &items, bool deleteItems = false); - virtual ~MetaInfoJob(); - - /** - * Removes an item from metainfo extraction. - * - * @param item the item that should be removed from the queue - */ - void removeItem( const KFileItem *item ); - - /** - * Returns a list of all available metainfo plugins. The list - * contains the basenames of the plugins' .desktop files (no path, - * no .desktop). - * @return the list of available meta info plugins - */ - static TQStringList availablePlugins(); - - /** - * Returns a list of all supported MIME types. The list can - * contain entries like text/ * (without the space). - * @return the list of MIME types that are supported - */ - static TQStringList supportedMimeTypes(); - - signals: - /** - * Emitted when the meta info for @p item has been successfully - * retrieved. - * @param item the KFileItem describing the fetched item - */ - void gotMetaInfo( const KFileItem *item ); - /** - * Emitted when metainfo for @p item could not be extracted, - * either because a plugin for its MIME type does not - * exist, or because something went wrong. - * @param item the KFileItem of the file that failed - */ - void failed( const KFileItem *item ); - - protected: - void getMetaInfo(); - - protected slots: - virtual void slotResult( TDEIO::Job *job ); - - private slots: - void start(); - void slotMetaInfo(TDEIO::Job *, const TQByteArray &); - - private: - void determineNextFile(); -// void saveMetaInfo(const TQByteArray info); - - private: - struct MetaInfoJobPrivate *d; - }; - - /** - * Retrieves meta information for the given items. - * - * @param items files to get metainfo for - * @return the MetaInfoJob to retrieve the items - */ - TDEIO_EXPORT MetaInfoJob* fileMetaInfo(const KFileItemList& items); - - /** - * Retrieves meta information for the given items. - * - * @param items files to get metainfo for - * @return the MetaInfoJob to retrieve the items - */ - TDEIO_EXPORT MetaInfoJob* fileMetaInfo(const KURL::List& items); -} - -#endif diff --git a/kio/kio/netaccess.cpp b/kio/kio/netaccess.cpp deleted file mode 100644 index 11c20be49..000000000 --- a/kio/kio/netaccess.cpp +++ /dev/null @@ -1,536 +0,0 @@ -/* $Id$ - - This file is part of the KDE libraries - Copyright (C) 1997 Torben Weis (weis@kde.org) - Copyright (C) 1998 Matthias Ettrich (ettrich@kde.org) - Copyright (C) 1999 David Faure (faure@kde.org) - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include -#include -#include -#include - -#include - -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -#include "kio/netaccess.h" - -using namespace TDEIO; - -TQString * NetAccess::lastErrorMsg; -int NetAccess::lastErrorCode = 0; -TQStringList* NetAccess::tmpfiles; - -bool NetAccess::download(const KURL& u, TQString & target) -{ - return NetAccess::download (u, target, 0); -} - -bool NetAccess::download(const KURL& u, TQString & target, TQWidget* window) -{ - if (u.isLocalFile()) { - // file protocol. We do not need the network - target = u.path(); - bool accessible = checkAccess(target, R_OK); - if(!accessible) - { - if(!lastErrorMsg) - lastErrorMsg = new TQString; - *lastErrorMsg = i18n("File '%1' is not readable").arg(target); - lastErrorCode = ERR_COULD_NOT_READ; - } - return accessible; - } - - if (target.isEmpty()) - { - KTempFile tmpFile; - target = tmpFile.name(); - if (!tmpfiles) - tmpfiles = new TQStringList; - tmpfiles->append(target); - } - - NetAccess kioNet; - KURL dest; - dest.setPath( target ); - return kioNet.filecopyInternal( u, dest, -1, true /*overwrite*/, - false, window, false /*copy*/); -} - -bool NetAccess::upload(const TQString& src, const KURL& target) -{ - return NetAccess::upload(src, target, 0); -} - -bool NetAccess::upload(const TQString& src, const KURL& target, TQWidget* window) -{ - if (target.isEmpty()) - return false; - - // If target is local... well, just copy. This can be useful - // when the client code uses a temp file no matter what. - // Let's make sure it's not the exact same file though - if (target.isLocalFile() && target.path() == src) - return true; - - NetAccess kioNet; - KURL s; - s.setPath(src); - return kioNet.filecopyInternal( s, target, -1, true /*overwrite*/, - false, window, false /*copy*/ ); -} - -bool NetAccess::copy( const KURL & src, const KURL & target ) -{ - return NetAccess::file_copy( src, target, -1, false /*not overwrite*/, false, 0L ); -} - -bool NetAccess::copy( const KURL & src, const KURL & target, TQWidget* window ) -{ - return NetAccess::file_copy( src, target, -1, false /*not overwrite*/, false, window ); -} - -bool NetAccess::file_copy( const KURL& src, const KURL& target, int permissions, - bool overwrite, bool resume, TQWidget* window ) -{ - NetAccess kioNet; - return kioNet.filecopyInternal( src, target, permissions, overwrite, resume, - window, false /*copy*/ ); -} - - -bool NetAccess::file_move( const KURL& src, const KURL& target, int permissions, - bool overwrite, bool resume, TQWidget* window ) -{ - NetAccess kioNet; - return kioNet.filecopyInternal( src, target, permissions, overwrite, resume, - window, true /*move*/ ); -} - -bool NetAccess::dircopy( const KURL & src, const KURL & target ) -{ - return NetAccess::dircopy( src, target, 0 ); -} - -bool NetAccess::dircopy( const KURL & src, const KURL & target, TQWidget* window ) -{ - KURL::List srcList; - srcList.append( src ); - return NetAccess::dircopy( srcList, target, window ); -} - -bool NetAccess::dircopy( const KURL::List & srcList, const KURL & target, TQWidget* window ) -{ - NetAccess kioNet; - return kioNet.dircopyInternal( srcList, target, window, false /*copy*/ ); -} - -bool NetAccess::move( const KURL& src, const KURL& target, TQWidget* window ) -{ - KURL::List srcList; - srcList.append( src ); - return NetAccess::move( srcList, target, window ); -} - -bool NetAccess::move( const KURL::List& srcList, const KURL& target, TQWidget* window ) -{ - NetAccess kioNet; - return kioNet.dircopyInternal( srcList, target, window, true /*move*/ ); -} - -bool NetAccess::exists( const KURL & url ) -{ - return NetAccess::exists( url, false, 0 ); -} - -bool NetAccess::exists( const KURL & url, TQWidget* window ) -{ - return NetAccess::exists( url, false, window ); -} - -bool NetAccess::exists( const KURL & url, bool source ) -{ - return NetAccess::exists( url, source, 0 ); -} - -bool NetAccess::exists( const KURL & url, bool source, TQWidget* window ) -{ - if ( url.isLocalFile() ) - return TQFile::exists( url.path() ); - NetAccess kioNet; - return kioNet.statInternal( url, 0 /*no details*/, source, window ); -} - -bool NetAccess::stat( const KURL & url, TDEIO::UDSEntry & entry ) -{ - return NetAccess::stat( url, entry, 0 ); -} - -bool NetAccess::stat( const KURL & url, TDEIO::UDSEntry & entry, TQWidget* window ) -{ - NetAccess kioNet; - bool ret = kioNet.statInternal( url, 2 /*all details*/, true /*source*/, window ); - if (ret) - entry = kioNet.m_entry; - return ret; -} - -KURL NetAccess::mostLocalURL(const KURL & url, TQWidget* window) -{ - if ( url.isLocalFile() ) - { - return url; - } - - TDEIO::UDSEntry entry; - if (!stat(url, entry, window)) - { - return url; - } - - TQString path; - - // Extract the local path from the TDEIO::UDSEntry - TDEIO::UDSEntry::ConstIterator it = entry.begin(); - const TDEIO::UDSEntry::ConstIterator end = entry.end(); - for ( ; it != end; ++it ) - { - if ( (*it).m_uds == TDEIO::UDS_LOCAL_PATH ) - { - path = (*it).m_str; - break; - } - } - - if ( !path.isEmpty() ) - { - KURL new_url; - new_url.setPath(path); - return new_url; - } - - return url; -} - - -bool NetAccess::del( const KURL & url ) -{ - return NetAccess::del( url, 0 ); -} - -bool NetAccess::del( const KURL & url, TQWidget* window ) -{ - NetAccess kioNet; - return kioNet.delInternal( url, window ); -} - -bool NetAccess::mkdir( const KURL & url, int permissions ) -{ - return NetAccess::mkdir( url, 0, permissions ); -} - -bool NetAccess::mkdir( const KURL & url, TQWidget* window, int permissions ) -{ - NetAccess kioNet; - return kioNet.mkdirInternal( url, permissions, window ); -} - -TQString NetAccess::fish_execute( const KURL & url, const TQString command, TQWidget* window ) -{ - NetAccess kioNet; - return kioNet.fish_executeInternal( url, command, window ); -} - -bool NetAccess::synchronousRun( Job* job, TQWidget* window, TQByteArray* data, - KURL* finalURL, TQMap* metaData ) -{ - NetAccess kioNet; - return kioNet.synchronousRunInternal( job, window, data, finalURL, metaData ); -} - -TQString NetAccess::mimetype( const KURL& url ) -{ - NetAccess kioNet; - return kioNet.mimetypeInternal( url, 0 ); -} - -TQString NetAccess::mimetype( const KURL& url, TQWidget* window ) -{ - NetAccess kioNet; - return kioNet.mimetypeInternal( url, window ); -} - -void NetAccess::removeTempFile(const TQString& name) -{ - if (!tmpfiles) - return; - if (tmpfiles->contains(name)) - { - unlink(TQFile::encodeName(name)); - tmpfiles->remove(name); - } -} - -bool NetAccess::filecopyInternal(const KURL& src, const KURL& target, int permissions, - bool overwrite, bool resume, TQWidget* window, bool move) -{ - bJobOK = true; // success unless further error occurs - - TDEIO::Scheduler::checkSlaveOnHold(true); - TDEIO::Job * job = move - ? TDEIO::file_move( src, target, permissions, overwrite, resume ) - : TDEIO::file_copy( src, target, permissions, overwrite, resume ); - job->setWindow (window); - connect( job, TQT_SIGNAL( result (TDEIO::Job *) ), - this, TQT_SLOT( slotResult (TDEIO::Job *) ) ); - - enter_loop(); - return bJobOK; -} - -bool NetAccess::dircopyInternal(const KURL::List& src, const KURL& target, - TQWidget* window, bool move) -{ - bJobOK = true; // success unless further error occurs - - TDEIO::Job * job = move - ? TDEIO::move( src, target ) - : TDEIO::copy( src, target ); - job->setWindow (window); - connect( job, TQT_SIGNAL( result (TDEIO::Job *) ), - this, TQT_SLOT( slotResult (TDEIO::Job *) ) ); - - enter_loop(); - return bJobOK; -} - -bool NetAccess::statInternal( const KURL & url, int details, bool source, - TQWidget* window ) -{ - bJobOK = true; // success unless further error occurs - TDEIO::StatJob * job = TDEIO::stat( url, !url.isLocalFile() && !url.url().startsWith("beagle:?") ); - job->setWindow (window); - job->setDetails( details ); - job->setSide( source ); - connect( job, TQT_SIGNAL( result (TDEIO::Job *) ), - this, TQT_SLOT( slotResult (TDEIO::Job *) ) ); - enter_loop(); - return bJobOK; -} - -bool NetAccess::delInternal( const KURL & url, TQWidget* window ) -{ - bJobOK = true; // success unless further error occurs - TDEIO::Job * job = TDEIO::del( url ); - job->setWindow (window); - connect( job, TQT_SIGNAL( result (TDEIO::Job *) ), - this, TQT_SLOT( slotResult (TDEIO::Job *) ) ); - enter_loop(); - return bJobOK; -} - -bool NetAccess::mkdirInternal( const KURL & url, int permissions, - TQWidget* window ) -{ - bJobOK = true; // success unless further error occurs - TDEIO::Job * job = TDEIO::mkdir( url, permissions ); - job->setWindow (window); - connect( job, TQT_SIGNAL( result (TDEIO::Job *) ), - this, TQT_SLOT( slotResult (TDEIO::Job *) ) ); - enter_loop(); - return bJobOK; -} - -TQString NetAccess::mimetypeInternal( const KURL & url, TQWidget* window ) -{ - bJobOK = true; // success unless further error occurs - m_mimetype = TQString::fromLatin1("unknown"); - TDEIO::Job * job = TDEIO::mimetype( url ); - job->setWindow (window); - connect( job, TQT_SIGNAL( result (TDEIO::Job *) ), - this, TQT_SLOT( slotResult (TDEIO::Job *) ) ); - connect( job, TQT_SIGNAL( mimetype (TDEIO::Job *, const TQString &) ), - this, TQT_SLOT( slotMimetype (TDEIO::Job *, const TQString &) ) ); - enter_loop(); - return m_mimetype; -} - -void NetAccess::slotMimetype( TDEIO::Job *, const TQString & type ) -{ - m_mimetype = type; -} - -TQString NetAccess::fish_executeInternal(const KURL & url, const TQString command, TQWidget* window) -{ - TQString target, remoteTempFileName, resultData; - KURL tempPathUrl; - KTempFile tmpFile; - tmpFile.setAutoDelete( true ); - - if( url.protocol() == "fish" ) - { - // construct remote temp filename - tempPathUrl = url; - remoteTempFileName = tmpFile.name(); - // only need the filename KTempFile adds some KDE specific dirs - // that probably does not exist on the remote side - int pos = remoteTempFileName.findRev('/'); - remoteTempFileName = "/tmp/fishexec_" + remoteTempFileName.mid(pos + 1); - tempPathUrl.setPath( remoteTempFileName ); - bJobOK = true; // success unless further error occurs - TQByteArray packedArgs; - TQDataStream stream( packedArgs, IO_WriteOnly ); - - stream << int('X') << tempPathUrl << command; - - TDEIO::Job * job = TDEIO::special( tempPathUrl, packedArgs, true ); - job->setWindow( window ); - connect( job, TQT_SIGNAL( result (TDEIO::Job *) ), - this, TQT_SLOT( slotResult (TDEIO::Job *) ) ); - enter_loop(); - - // since the TDEIO::special does not provide feedback we need to download the result - if( NetAccess::download( tempPathUrl, target, window ) ) - { - TQFile resultFile( target ); - - if (resultFile.open( IO_ReadOnly )) - { - TQTextStream ts( &resultFile ); - ts.setEncoding( TQTextStream::Locale ); // Locale?? - resultData = ts.read(); - resultFile.close(); - NetAccess::del( tempPathUrl, window ); - } - } - } - else - { - resultData = i18n( "ERROR: Unknown protocol '%1'" ).arg( url.protocol() ); - } - return resultData; -} - -bool NetAccess::synchronousRunInternal( Job* job, TQWidget* window, TQByteArray* data, - KURL* finalURL, TQMap* metaData ) -{ - job->setWindow( window ); - - m_metaData = metaData; - if ( m_metaData ) { - for ( TQMap::iterator it = m_metaData->begin(); it != m_metaData->end(); ++it ) { - job->addMetaData( it.key(), it.data() ); - } - } - - if ( finalURL ) { - SimpleJob *sj = dynamic_cast( job ); - if ( sj ) { - m_url = sj->url(); - } - } - - connect( job, TQT_SIGNAL( result (TDEIO::Job *) ), - this, TQT_SLOT( slotResult (TDEIO::Job *) ) ); - - TQMetaObject *meta = job->metaObject(); - - static const char dataSignal[] = "data(TDEIO::Job*,const " TQBYTEARRAY_OBJECT_NAME_STRING "&)"; - if ( meta->findSignal( dataSignal ) != -1 ) { - connect( job, TQT_SIGNAL(data(TDEIO::Job*,const TQByteArray&)), - this, TQT_SLOT(slotData(TDEIO::Job*,const TQByteArray&)) ); - } - - static const char redirSignal[] = "redirection(TDEIO::Job*,const KURL&)"; - if ( meta->findSignal( redirSignal ) != -1 ) { - connect( job, TQT_SIGNAL(redirection(TDEIO::Job*,const KURL&)), - this, TQT_SLOT(slotRedirection(TDEIO::Job*, const KURL&)) ); - } - - enter_loop(); - - if ( finalURL ) - *finalURL = m_url; - if ( data ) - *data = m_data; - - return bJobOK; -} - -// If a troll sees this, he kills me -void tqt_enter_modal( TQWidget *widget ); -void tqt_leave_modal( TQWidget *widget ); - -void NetAccess::enter_loop() -{ - TQWidget dummy(0,0,(WFlags)(WType_Dialog | WShowModal)); - dummy.setFocusPolicy( TQ_NoFocus ); - tqt_enter_modal(&dummy); - tqApp->enter_loop(); - tqt_leave_modal(&dummy); -} - -void NetAccess::slotResult( TDEIO::Job * job ) -{ - lastErrorCode = job->error(); - bJobOK = !job->error(); - if ( !bJobOK ) - { - if ( !lastErrorMsg ) - lastErrorMsg = new TQString; - *lastErrorMsg = job->errorString(); - } - if ( job->isA("TDEIO::StatJob") ) - m_entry = static_cast(job)->statResult(); - - if ( m_metaData ) - *m_metaData = job->metaData(); - - tqApp->exit_loop(); -} - -void NetAccess::slotData( TDEIO::Job*, const TQByteArray& data ) -{ - if ( data.isEmpty() ) - return; - - unsigned offset = m_data.size(); - m_data.resize( offset + data.size() ); - std::memcpy( m_data.data() + offset, data.data(), data.size() ); -} - -void NetAccess::slotRedirection( TDEIO::Job*, const KURL& url ) -{ - m_url = url; -} - -#include "netaccess.moc" diff --git a/kio/kio/netaccess.h b/kio/kio/netaccess.h deleted file mode 100644 index 54dd02974..000000000 --- a/kio/kio/netaccess.h +++ /dev/null @@ -1,540 +0,0 @@ -/* - This file is part of the KDE libraries - Copyright (C) 1997 Torben Weis (weis@kde.org) - Copyright (C) 1998 Matthias Ettrich (ettrich@kde.org) - Copyright (C) 1999-2004 David Faure (faure@kde.org) - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef __kio_netaccess_h -#define __kio_netaccess_h - -#include -#include -#include - -class TQStringList; -class TQWidget; -class KURL; -template class TQMap; - -namespace TDEIO { - - class Job; - - /** - * Net Transparency. - * - * NetAccess allows you to do simple file operation (load, save, - * copy, delete...) without working with TDEIO::Job directly. - * Whereas a TDEIO::Job is asynchronous, meaning that the - * developer has to connect slots for it, TDEIO::NetAccess provides - * synchronous downloads and uploads, as well as temporary file - * creation and removal. The functions appear to be blocking, - * but the Qt event loop continues running while the operations - * are handled. This means that the GUI will not freeze. - * - * This class isn't meant to be used as a class but only as a simple - * namespace for static functions, though an instance of the class - * is built for internal purposes. - * - * Port to kio done by David Faure, faure@kde.org - * - * @short Provides an easy, synchronous interface to KIO file operations. - */ -class TDEIO_EXPORT NetAccess : public TQObject -{ - Q_OBJECT - -public: - /** - * Downloads a file from an arbitrary URL (@p src) to a - * temporary file on the local filesystem (@p target). - * - * If the argument - * for @p target is an empty string, download will generate a - * unique temporary filename in /tmp. Since @p target is a reference - * to TQString you can access this filename easily. Download will - * return true if the download was successful, otherwise false. - * - * Special case: - * If the URL is of kind file:, then no downloading is - * processed but the full filename is returned in @p target. - * That means you @em have to take care about the @p target argument. - * (This is very easy to do, please see the example below.) - * - * Download is synchronous. That means you can use it like - * this, (assuming @p u is a string which represents a URL and your - * application has a loadFile() function): - * - * \code - * TQString tmpFile; - * if( TDEIO::NetAccess::download( u, tmpFile, window ) ) - * { - * loadFile( tmpFile ); - * TDEIO::NetAccess::removeTempFile( tmpFile ); - * } else { - * KMessageBox::error(this, TDEIO::NetAccess::lastErrorString() ); - * } - * \endcode - * - * Of course, your user interface will still process exposure/repaint - * events during the download. - * - * If the download fails, lastError() and lastErrorString() will be set. - * - * @param src URL Reference to the file to download. - * @param target String containing the final local location of the - * file. If you insert an empty string, it will - * return a location in a temporary spot. Note: - * you are responsible for the removal of this file when - * you are finished reading it using removeTempFile. - * @param window main window associated with this job. This is used to - * automatically cache and discard authentication information - * as needed. If NULL, authentication information will be - * cached only for a short duration after which the user will - * again be prompted for passwords as needed. - * @return true if successful, false for failure. Use lastErrorString() to - * get the reason it failed. - * - * @see lastErrorString() - * @since 3.2 - */ - static bool download(const KURL& src, TQString & target, TQWidget* window); - - /** - * @deprecated. Use the function above instead. - */ - static bool download(const KURL& src, TQString & target) KDE_DEPRECATED; - - /** - * Removes the specified file if and only if it was created - * by TDEIO::NetAccess as a temporary file for a former download. - * - * Note: This means that if you created your temporary with KTempFile, - * use KTempFile::unlink() or KTempFile::setAutoDelete() to have - * it removed. - * - * @param name Path to temporary file to remove. May not be - * empty. - */ - static void removeTempFile(const TQString& name); - - /** - * Uploads file @p src to URL @p target. - * - * Both must be specified, unlike download. - * Note that this is assumed to be used for saving a file over - * the network, so overwriting is set to true. This is not the - * case with copy. - * - * @param src URL Referencing the file to upload. - * @param target URL containing the final location of the file. - * @param window main window associated with this job. This is used to - * automatically cache and discard authentication information - * as needed. If NULL, authentication information will be cached - * only for a short duration after which the user will again be - * prompted for passwords as needed. - * - * @return true if successful, false for failure - * @since 3.2 - */ - static bool upload(const TQString& src, const KURL& target, TQWidget* window); - - /** - * @deprecated. Use the function above instead. - */ - static bool upload(const TQString& src, const KURL& target) KDE_DEPRECATED; - - /** - * Alternative to upload for copying over the network. - * Overwrite is false, so this will fail if @p target exists. - * - * This one takes two URLs and is a direct equivalent - * of TDEIO::file_copy (not TDEIO::copy!). - * It will be renamed file_copy in KDE4, so better use file_copy. - * - * @param src URL Referencing the file to upload. - * @param target URL containing the final location of the file. - * @param window main window associated with this job. This is used to - * automatically cache and discard authentication information - * as needed. If NULL, authentication information will be cached - * only for a short duration after which the user will again be - * prompted for passwords as needed. - * - * @return true if successful, false for failure - */ - static bool copy( const KURL& src, const KURL& target, TQWidget* window ); - // KDE4: rename to file_copy - - /** - * @deprecated. Use the function above instead. - */ - static bool copy( const KURL& src, const KURL& target ) KDE_DEPRECATED; - // KDE4: merge with above - - /** - * Full-fledged equivalent of TDEIO::file_copy - */ - static bool file_copy( const KURL& src, const KURL& dest, int permissions=-1, - bool overwrite=false, bool resume=false, TQWidget* window = 0L ); - - /** - * Full-fledged equivalent of TDEIO::file_move. - * Moves or renames *one file*. - * @since 3.2 - */ - static bool file_move( const KURL& src, const KURL& target, int permissions=-1, - bool overwrite=false, bool resume=false, TQWidget* window = 0L ); - - - /** - * Alternative method for copying over the network. - * Overwrite is false, so this will fail if @p target exists. - * - * This one takes two URLs and is a direct equivalent - * of TDEIO::copy!. - * This means that it can copy files and directories alike - * (it should have been named copy()). - * - * @param src URL Referencing the file to upload. - * @param target URL containing the final location of the - * file. - * @param window main window associated with this job. This is used to - * automatically cache and discard authentication information - * as needed. If NULL, authentication information will be cached - * only for a short duration after which the user will again be - * prompted for passwords as needed. - * @return true if successful, false for failure - */ - static bool dircopy( const KURL& src, const KURL& target, TQWidget* window ); - - /** - * @deprecated. Use the function above instead. - */ - static bool dircopy( const KURL& src, const KURL& target ) KDE_DEPRECATED; // KDE4: merge - - /** - * Overloaded method, which takes a list of source URLs - */ - static bool dircopy( const KURL::List& src, const KURL& target, TQWidget* window = 0L ); - - /** - * Full-fledged equivalent of TDEIO::move. - * Moves or renames one file or directory. - * @since 3.2 - */ - static bool move( const KURL& src, const KURL& target, TQWidget* window = 0L ); - - /** - * Full-fledged equivalent of TDEIO::move. - * Moves or renames a list of files or directories. - * @since 3.2 - */ - static bool move( const KURL::List& src, const KURL& target, TQWidget* window = 0L ); - - /** - * Tests whether a URL exists. - * - * @param url the URL we are testing - * @param source if true, we want to read from that URL. - * If false, we want to write to it. - * IMPORTANT: see documentation for TDEIO::stat for more details about this. - * @param window main window associated with this job. This is used to - * automatically cache and discard authentication information - * as needed. If NULL, authentication information will be - * cached only for a short duration after which the user will - * again be prompted for passwords as needed. - * @return true if the URL exists and we can do the operation specified by - * @p source, false otherwise - * @since 3.2 - */ - static bool exists(const KURL& url, bool source, TQWidget* window); - - /** - * @deprecated. Use the function above instead. - * @since 3.2 - */ - static bool exists(const KURL& url, TQWidget* window) KDE_DEPRECATED; - - /** - * @deprecated. Use the function above instead. - */ - static bool exists(const KURL& url) KDE_DEPRECATED; - - /** - * @deprecated. Use the function above instead. - */ - static bool exists(const KURL& url, bool source) KDE_DEPRECATED; // KDE4: merge - - /** - * Tests whether a URL exists and return information on it. - * - * This is a convenience function for TDEIO::stat - * (it saves creating a slot and testing for the job result). - * - * @param url The URL we are testing. - * @param entry The result of the stat. Iterate over the list - * of atoms to get hold of name, type, size, etc., or use KFileItem. - * @param window main window associated with this job. This is used to - * automatically cache and discard authentication information - * as needed. If NULL, authentication information will be - * cached only for a short duration after which the user will - * again be prompted for passwords as needed. - * @return true if successful, false for failure - */ - static bool stat(const KURL& url, TDEIO::UDSEntry & entry, TQWidget* window); - - /** - * @deprecated. Use the function above instead. - */ - static bool stat(const KURL& url, TDEIO::UDSEntry & entry) KDE_DEPRECATED; - - /** - * Tries to map a local URL for the given URL. - * - * This is a convenience function for TDEIO::stat + parsing the - * resulting UDSEntry. - * - * @param url The URL we are testing. - * @param window main window associated with this job. This is used to - * automatically cache and discard authentication information - * as needed. If NULL, authentication information will be - * cached only for a short duration after which the user will - * again be prompted for passwords as needed. - * @return a local URL corresponding to the same ressource than the - * original URL, or the original URL if no local URL can be mapped - * @since 3.5 - */ - static KURL mostLocalURL(const KURL& url, TQWidget* window); - - /** - * Deletes a file or a directory in a synchronous way. - * - * This is a convenience function for TDEIO::del - * (it saves creating a slot and testing for the job result). - * - * @param url The file or directory to delete. - * @param window main window associated with this job. This is used to - * automatically cache and discard authentication information - * as needed. If NULL, authentication information will be - * cached only for a short duration after which the user will - * again be prompted for passwords as needed. - * @return true on success, false on failure. - */ - static bool del( const KURL & url, TQWidget* window ); - - /** - * @deprecated. Use the function above instead. Passing NULL as the - * additional argument will give the same behaviour, but - * you should try to identify a suitable parent widget - * if at all possible. - */ - static bool del( const KURL & url ) KDE_DEPRECATED; - - /** - * Creates a directory in a synchronous way. - * - * This is a convenience function for @p TDEIO::mkdir - * (it saves creating a slot and testing for the job result). - * - * @param url The directory to create. - * @param window main window associated with this job. This is used to - * automatically cache and discard authentication information - * as needed. If NULL, authentication information will be - * cached only for a short duration after which the user will - * again be prompted for passwords as needed. - * @param permissions directory permissions. - * @return true on success, false on failure. - */ - static bool mkdir( const KURL & url, TQWidget* window, int permissions = -1 ); - - /** - * @deprecated. Use the function above instead. Passing NULL as the - * additional argument will give the same behaviour, but - * you should try to identify a suitable parent widget - * if at all possible. - */ - static bool mkdir( const KURL & url, int permissions = -1 ) KDE_DEPRECATED; - - /** - * Executes a remote process via the fish ioslave in a synchronous way. - * - * @param url The remote machine where the command should be executed. - * e.g. fish://someuser\@somehost:sshport/ - * some special cases exist. - * fish://someuser\@localhost/ - * will use su instead of ssh to connect and execute the command. - * fish://someuser\@localhost:port/ - * will use ssh to connect and execute the command. - * @param command The command to be executed. - * @param window main window associated with this job. This is used to - * automatically cache and discard authentication information - * as needed. If NULL, authentication information will be - * cached only for a short duration after which the user will - * again be prompted for passwords as needed. - * @return The resulting output of the @p command that is executed. - */ - static TQString fish_execute( const KURL & url, const TQString command, TQWidget* window ); - - /** - * This function executes a job in a synchronous way. - * If a job fetches some data, pass a TQByteArray pointer as data parameter to this function - * and after the function returns it will contain all the data fetched by this job. - * - * - * TDEIO::Job *job = TDEIO::get( url, false, false ); - * TQMap metaData; - * metaData.insert( "PropagateHttpHeader", "true" ); - * if ( NetAccess::synchronousRun( job, 0, &data, &url, &metaData ) ) { - * TQString responseHeaders = metaData[ "HTTP-Headers" ]; - * kdDebug()<<"Response header = "<< responseHeaders << endl; - * } - * - * - * @param job job which the function will run. Note that after this function - * finishes running, job is deleted and you can't access it anymore! - * @param window main window associated with this job. This is used to - * automatically cache and discard authentication information - * as needed. If NULL, authentication information will be - * cached only for a short duration after which the user will - * again be prompted for passwords as needed. - * @param data if passed and relevant to this job then it will contain the data - * that was fetched by the job - * @param finalURL if passed will contain the final url of this job (it might differ - * from the one it was created with if there was a redirection) - * @param metaData you can pass a pointer to the map with meta data you wish to - * set on the job. After the job finishes this map will hold all the - * meta data from the job. - * - * @return true on success, false on failure. - * - * @since 3.4 - */ - static bool synchronousRun( Job* job, TQWidget* window, TQByteArray* data=0, - KURL* finalURL=0, TQMap* metaData=0 ); - - /** - * @internal - * This function is not implemented!? - * (only mimetypeInternal) - * - * Determines the mimetype of a given URL. - * - * This is a convenience function for TDEIO::mimetype. You - * should call this only when really necessary. - * KMimeType::findByURL can determine extension a lot faster, but - * less reliably for remote files. Only when findByURL() returns - * unknown (application/octet-stream) then this one should be - * used. - * - * @param url The URL whose mimetype we are interested in. - * @param window main window associated with this job. This is used to - * automatically cache and discard authentication information - * as needed. If NULL, authentication information will be - * cached only for a short duration after which the user will - * again be prompted for passwords as needed. - * @return The mimetype name. - */ - static TQString mimetype( const KURL & url, TQWidget* window ); - - /** - * @deprecated. Use the function above instead. Passing NULL as the - * additional argument will give the same behaviour, but - * you should try to identify a suitable parent widget - * if at all possible. - */ - static TQString mimetype( const KURL & url ) KDE_DEPRECATED; - - /** - * Returns the error string for the last job, in case it failed. - * Note that this is already translated. - * @return the last error string, or TQString::null - */ - static TQString lastErrorString() { return lastErrorMsg ? *lastErrorMsg : TQString::null; } - - /** - * Returns the error code for the last job, in case it failed. - * @return the last error code - * @since 3.3 - */ - static int lastError() { return lastErrorCode; } - -private: - /** - * Private constructor - */ - NetAccess() : m_metaData(0), d(0) {} - - /** - * Private destructor - */ - ~NetAccess() {} - - /** - * Internal methods - */ - bool filecopyInternal(const KURL& src, const KURL& target, int permissions, - bool overwrite, bool resume, TQWidget* window, bool move); - bool dircopyInternal(const KURL::List& src, const KURL& target, - TQWidget* window, bool move); - bool statInternal(const KURL & url, int details, bool source, TQWidget* window = 0); - - bool delInternal(const KURL & url, TQWidget* window = 0); - bool mkdirInternal(const KURL & url, int permissions, TQWidget* window = 0); - TQString fish_executeInternal(const KURL & url, const TQString command, TQWidget* window = 0); - bool synchronousRunInternal( Job* job, TQWidget* window, TQByteArray* data, - KURL* finalURL, TQMap* metaData ); - - TQString mimetypeInternal(const KURL & url, TQWidget* window = 0); - void enter_loop(); - - /** - * List of temporary files - */ - static TQStringList* tmpfiles; - - static TQString* lastErrorMsg; - static int lastErrorCode; - - friend class I_like_this_class; - -private slots: - void slotResult( TDEIO::Job * job ); - void slotMimetype( TDEIO::Job * job, const TQString & type ); - void slotData( TDEIO::Job*, const TQByteArray& ); - void slotRedirection( TDEIO::Job*, const KURL& ); - -private: - UDSEntry m_entry; - TQString m_mimetype; - TQByteArray m_data; - KURL m_url; - TQMap *m_metaData; - - /** - * Whether the download succeeded or not - */ - bool bJobOK; - -private: - class NetAccessPrivate* d; // not really needed, the ctor is private already. -}; - -} - -#endif diff --git a/kio/kio/observer.cpp b/kio/kio/observer.cpp deleted file mode 100644 index 347db9df9..000000000 --- a/kio/kio/observer.cpp +++ /dev/null @@ -1,417 +0,0 @@ -/* This file is part of the KDE libraries - Copyright (C) 2000 Matej Koss - David Faure - - $Id$ - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License version 2 as published by the Free Software Foundation. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include - -#include -#include -#include -#include - -#include "jobclasses.h" -#include "observer.h" - -#include "uiserver_stub.h" - -#include "passdlg.h" -#include "slavebase.h" -#include "observer_stub.h" -#include -#include -#include -#include -#include -#include - -using namespace TDEIO; - -template class TQIntDict; - -Observer * Observer::s_pObserver = 0L; - -const int KDEBUG_OBSERVER = 7007; // Should be 7028 - -Observer::Observer() : DCOPObject("TDEIO::Observer") -{ - // Register app as able to receive DCOP messages - if (kapp && !kapp->dcopClient()->isAttached()) - { - kapp->dcopClient()->attach(); - } - - if ( !kapp->dcopClient()->isApplicationRegistered( "kio_uiserver" ) ) - { - kdDebug(KDEBUG_OBSERVER) << "Starting kio_uiserver" << endl; - TQString error; - int ret = TDEApplication::startServiceByDesktopPath( "kio_uiserver.desktop", - TQStringList(), &error ); - if ( ret > 0 ) - { - kdError() << "Couldn't start kio_uiserver from kio_uiserver.desktop: " << error << endl; - } else - kdDebug(KDEBUG_OBSERVER) << "startServiceByDesktopPath returned " << ret << endl; - - } - if ( !kapp->dcopClient()->isApplicationRegistered( "kio_uiserver" ) ) - kdDebug(KDEBUG_OBSERVER) << "The application kio_uiserver is STILL NOT REGISTERED" << endl; - else - kdDebug(KDEBUG_OBSERVER) << "kio_uiserver registered" << endl; - - m_uiserver = new UIServer_stub( "kio_uiserver", "UIServer" ); -} - -int Observer::newJob( TDEIO::Job * job, bool showProgress ) -{ - // Tell the UI Server about this new job, and give it the application id - // at the same time - int progressId = m_uiserver->newJob( kapp->dcopClient()->appId(), showProgress ); - - // Keep the result in a dict - m_dctJobs.insert( progressId, job ); - - return progressId; -} - -void Observer::jobFinished( int progressId ) -{ - m_uiserver->jobFinished( progressId ); - m_dctJobs.remove( progressId ); -} - -void Observer::killJob( int progressId ) -{ - TDEIO::Job * job = m_dctJobs[ progressId ]; - if (!job) - { - kdWarning() << "Can't find job to kill ! There is no job with progressId=" << progressId << " in this process" << endl; - return; - } - job->kill( false /* not quietly */ ); -} - -MetaData Observer::metadata( int progressId ) -{ - TDEIO::Job * job = m_dctJobs[ progressId ]; - assert(job); - return job->metaData(); -} - -void Observer::slotTotalSize( TDEIO::Job* job, TDEIO::filesize_t size ) -{ - //kdDebug(KDEBUG_OBSERVER) << "** Observer::slotTotalSize " << job << " " << TDEIO::number(size) << endl; - m_uiserver->totalSize64( job->progressId(), size ); -} - -void Observer::slotTotalFiles( TDEIO::Job* job, unsigned long files ) -{ - //kdDebug(KDEBUG_OBSERVER) << "** Observer::slotTotalFiles " << job << " " << files << endl; - m_uiserver->totalFiles( job->progressId(), files ); -} - -void Observer::slotTotalDirs( TDEIO::Job* job, unsigned long dirs ) -{ - //kdDebug(KDEBUG_OBSERVER) << "** Observer::slotTotalDirs " << job << " " << dirs << endl; - m_uiserver->totalDirs( job->progressId(), dirs ); -} - -void Observer::slotProcessedSize( TDEIO::Job* job, TDEIO::filesize_t size ) -{ - //kdDebug(KDEBUG_OBSERVER) << "** Observer::slotProcessedSize " << job << " " << job->progressId() << " " << TDEIO::number(size) << endl; - m_uiserver->processedSize64( job->progressId(), size ); -} - -void Observer::slotProcessedFiles( TDEIO::Job* job, unsigned long files ) -{ - //kdDebug(KDEBUG_OBSERVER) << "** Observer::slotProcessedFiles " << job << " " << files << endl; - m_uiserver->processedFiles( job->progressId(), files ); -} - -void Observer::slotProcessedDirs( TDEIO::Job* job, unsigned long dirs ) -{ - //kdDebug(KDEBUG_OBSERVER) << "** Observer::slotProcessedDirs " << job << " " << dirs << endl; - m_uiserver->processedDirs( job->progressId(), dirs ); -} - -void Observer::slotSpeed( TDEIO::Job* job, unsigned long speed ) -{ - //kdDebug(KDEBUG_OBSERVER) << "** Observer::slotSpeed " << job << " " << speed << endl; - m_uiserver->speed( job->progressId(), speed ); -} - -void Observer::slotPercent( TDEIO::Job* job, unsigned long percent ) -{ - //kdDebug(KDEBUG_OBSERVER) << "** Observer::slotPercent " << job << " " << percent << endl; - m_uiserver->percent( job->progressId(), percent ); -} - -void Observer::slotInfoMessage( TDEIO::Job* job, const TQString & msg ) -{ - m_uiserver->infoMessage( job->progressId(), msg ); -} - -void Observer::slotCopying( TDEIO::Job* job, const KURL& from, const KURL& to ) -{ - //kdDebug(KDEBUG_OBSERVER) << "** Observer::slotCopying " << job << " " << from.url() << " " << to.url() << endl; - m_uiserver->copying( job->progressId(), from, to ); -} - -void Observer::slotMoving( TDEIO::Job* job, const KURL& from, const KURL& to ) -{ - //kdDebug(KDEBUG_OBSERVER) << "** Observer::slotMoving " << job << " " << from.url() << " " << to.url() << endl; - m_uiserver->moving( job->progressId(), from, to ); -} - -void Observer::slotDeleting( TDEIO::Job* job, const KURL& url ) -{ - //kdDebug(KDEBUG_OBSERVER) << "** Observer::slotDeleting " << job << " " << url.url() << endl; - m_uiserver->deleting( job->progressId(), url ); -} - -void Observer::slotTransferring( TDEIO::Job* job, const KURL& url ) -{ - //kdDebug(KDEBUG_OBSERVER) << "** Observer::slotTransferring " << job << " " << url.url() << endl; - m_uiserver->transferring( job->progressId(), url ); -} - -void Observer::slotCreatingDir( TDEIO::Job* job, const KURL& dir ) -{ - //kdDebug(KDEBUG_OBSERVER) << "** Observer::slotCreatingDir " << job << " " << dir.url() << endl; - m_uiserver->creatingDir( job->progressId(), dir ); -} - -void Observer::slotCanResume( TDEIO::Job* job, TDEIO::filesize_t offset ) -{ - //kdDebug(KDEBUG_OBSERVER) << "** Observer::slotCanResume " << job << " " << TDEIO::number(offset) << endl; - m_uiserver->canResume64( job->progressId(), offset ); -} - -void Observer::stating( TDEIO::Job* job, const KURL& url ) -{ - m_uiserver->stating( job->progressId(), url ); -} - -void Observer::mounting( TDEIO::Job* job, const TQString & dev, const TQString & point ) -{ - m_uiserver->mounting( job->progressId(), dev, point ); -} - -void Observer::unmounting( TDEIO::Job* job, const TQString & point ) -{ - m_uiserver->unmounting( job->progressId(), point ); -} - -bool Observer::openPassDlg( const TQString& prompt, TQString& user, - TQString& pass, bool readOnly ) -{ - AuthInfo info; - info.prompt = prompt; - info.username = user; - info.password = pass; - info.readOnly = readOnly; - bool result = openPassDlg ( info ); - if ( result ) - { - user = info.username; - pass = info.password; - } - return result; -} - -bool Observer::openPassDlg( TDEIO::AuthInfo& info ) -{ - kdDebug(KDEBUG_OBSERVER) << "Observer::openPassDlg: User= " << info.username - << ", Message= " << info.prompt << endl; - int result = TDEIO::PasswordDialog::getNameAndPassword( info.username, info.password, - &info.keepPassword, info.prompt, - info.readOnly, info.caption, - info.comment, info.commentLabel ); - if ( result == TQDialog::Accepted ) - { - info.setModified( true ); - return true; - } - return false; -} - -int Observer::messageBox( int progressId, int type, const TQString &text, - const TQString &caption, const TQString &buttonYes, - const TQString &buttonNo ) -{ - return messageBox( progressId, type, text, caption, buttonYes, buttonNo, TQString::null ); -} - -int Observer::messageBox( int progressId, int type, const TQString &text, - const TQString &caption, const TQString &buttonYes, - const TQString &buttonNo, const TQString &dontAskAgainName ) -{ - kdDebug() << "Observer::messageBox " << type << " " << text << " - " << caption << endl; - int result = -1; - TDEConfig *config = new TDEConfig("kioslaverc"); - KMessageBox::setDontShowAskAgainConfig(config); - - switch (type) { - case TDEIO::SlaveBase::QuestionYesNo: - result = KMessageBox::questionYesNo( 0L, // parent ? - text, caption, buttonYes, buttonNo, dontAskAgainName ); - break; - case TDEIO::SlaveBase::WarningYesNo: - result = KMessageBox::warningYesNo( 0L, // parent ? - text, caption, buttonYes, buttonNo, dontAskAgainName ); - break; - case TDEIO::SlaveBase::WarningContinueCancel: - result = KMessageBox::warningContinueCancel( 0L, // parent ? - text, caption, buttonYes, dontAskAgainName ); - break; - case TDEIO::SlaveBase::WarningYesNoCancel: - result = KMessageBox::warningYesNoCancel( 0L, // parent ? - text, caption, buttonYes, buttonNo, dontAskAgainName ); - break; - case TDEIO::SlaveBase::Information: - KMessageBox::information( 0L, // parent ? - text, caption, dontAskAgainName ); - result = 1; // whatever - break; - case TDEIO::SlaveBase::SSLMessageBox: - { - TQCString observerAppId = caption.utf8(); // hack, see slaveinterface.cpp - // Contact the object "TDEIO::Observer" in the application - // Yes, this could be the same application we are, but not necessarily. - Observer_stub observer( observerAppId, "TDEIO::Observer" ); - - TDEIO::MetaData meta = observer.metadata( progressId ); - KSSLInfoDlg *kid = new KSSLInfoDlg(meta["ssl_in_use"].upper()=="TRUE", 0L /*parent?*/, 0L, true); - KSSLCertificate *x = KSSLCertificate::fromString(meta["ssl_peer_certificate"].local8Bit()); - if (x) { - // Set the chain back onto the certificate - TQStringList cl = - TQStringList::split(TQString("\n"), meta["ssl_peer_chain"]); - TQPtrList ncl; - - ncl.setAutoDelete(true); - for (TQStringList::Iterator it = cl.begin(); it != cl.end(); ++it) { - KSSLCertificate *y = KSSLCertificate::fromString((*it).local8Bit()); - if (y) ncl.append(y); - } - - if (ncl.count() > 0) - x->chain().setChain(ncl); - - kid->setup( x, - meta["ssl_peer_ip"], - text, // the URL - meta["ssl_cipher"], - meta["ssl_cipher_desc"], - meta["ssl_cipher_version"], - meta["ssl_cipher_used_bits"].toInt(), - meta["ssl_cipher_bits"].toInt(), - KSSLCertificate::KSSLValidation(meta["ssl_cert_state"].toInt())); - kdDebug(7024) << "Showing SSL Info dialog" << endl; - kid->exec(); - delete x; - kdDebug(7024) << "SSL Info dialog closed" << endl; - } else { - KMessageBox::information( 0L, // parent ? - i18n("The peer SSL certificate appears to be corrupt."), i18n("SSL") ); - } - // This doesn't have to get deleted. It deletes on it's own. - result = 1; // whatever - break; - } - default: - kdWarning() << "Observer::messageBox: unknown type " << type << endl; - result = 0; - break; - } - KMessageBox::setDontShowAskAgainConfig(0); - delete config; - return result; -#if 0 - TQByteArray data, replyData; - TQCString replyType; - TQDataStream arg( data, IO_WriteOnly ); - arg << progressId; - arg << type; - arg << text; - arg << caption; - arg << buttonYes; - arg << buttonNo; - if ( kapp->dcopClient()->call( "kio_uiserver", "UIServer", "messageBox(int,int,TQString,TQString,TQString,TQString)", data, replyType, replyData, true ) - && replyType == "int" ) - { - int result; - TQDataStream _reply_stream( replyData, IO_ReadOnly ); - _reply_stream >> result; - kdDebug(KDEBUG_OBSERVER) << "Observer::messageBox got result " << result << endl; - return result; - } - kdDebug(KDEBUG_OBSERVER) << "Observer::messageBox call failed" << endl; - return 0; -#endif -} - -RenameDlg_Result Observer::open_RenameDlg( TDEIO::Job* job, - const TQString & caption, - const TQString& src, const TQString & dest, - RenameDlg_Mode mode, TQString& newDest, - TDEIO::filesize_t sizeSrc, - TDEIO::filesize_t sizeDest, - time_t ctimeSrc, - time_t ctimeDest, - time_t mtimeSrc, - time_t mtimeDest - ) -{ - kdDebug(KDEBUG_OBSERVER) << "Observer::open_RenameDlg job=" << job << endl; - if (job) - kdDebug(KDEBUG_OBSERVER) << " progressId=" << job->progressId() << endl; - // Hide existing dialog box if any - if (job && job->progressId()) - m_uiserver->setJobVisible( job->progressId(), false ); - // We now do it in process => KDE4: move this code out of Observer (back to job.cpp), so that - // opening the rename dialog doesn't start uiserver for nothing if progressId=0 (e.g. F2 in konq) - RenameDlg_Result res = TDEIO::open_RenameDlg( caption, src, dest, mode, - newDest, sizeSrc, sizeDest, - ctimeSrc, ctimeDest, mtimeSrc, - mtimeDest ); - if (job && job->progressId()) - m_uiserver->setJobVisible( job->progressId(), true ); - return res; -} - -SkipDlg_Result Observer::open_SkipDlg( TDEIO::Job* job, - bool _multi, - const TQString& _error_text ) -{ - kdDebug(KDEBUG_OBSERVER) << "Observer::open_SkipDlg job=" << job << " progressId=" << job->progressId() << endl; - // Hide existing dialog box if any - if (job && job->progressId()) - m_uiserver->setJobVisible( job->progressId(), false ); - // We now do it in process. So this method is a useless wrapper around TDEIO::open_RenameDlg. - SkipDlg_Result res = TDEIO::open_SkipDlg( _multi, _error_text ); - if (job && job->progressId()) - m_uiserver->setJobVisible( job->progressId(), true ); - return res; -} - -void Observer::virtual_hook( int id, void* data ) -{ DCOPObject::virtual_hook( id, data ); } - -#include "observer.moc" diff --git a/kio/kio/observer.h b/kio/kio/observer.h deleted file mode 100644 index 1869e5638..000000000 --- a/kio/kio/observer.h +++ /dev/null @@ -1,213 +0,0 @@ -/* This file is part of the KDE libraries - Copyright (C) 2000 Matej Koss - David Faure - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License version 2 as published by the Free Software Foundation. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ -#ifndef __kio_observer_h__ -#define __kio_observer_h__ - -#include -#include -#include - -#include -#include -#include "kio/job.h" -#include "kio/skipdlg.h" -#include "kio/renamedlg.h" - -class UIServer_stub; -class KURL; - -namespace TDEIO { - class Job; -} - -/** - * Observer for TDEIO::Job progress information. - * - * This class, of which there is always only one instance, - * "observes" what jobs do and forwards this information - * to the progress-info server. - * - * It is a DCOP object so that the UI server can call the - * kill method when the user presses Cancel. - * - * Usually jobs are automatically registered by the - * TDEIO::Scheduler, so you do not have to care about that. - * - * @short Observer for TDEIO::Job progress information - * @author David Faure - */ -class TDEIO_EXPORT Observer : public TQObject, public DCOPObject { - - K_DCOP - Q_OBJECT - -public: - - /** - * Returns the unique observer object. - * @return the observer object - */ - static Observer * self() { - if (!s_pObserver) s_pObserver = new Observer; - return s_pObserver; - } - - /** - * Called by the job constructor, to signal its presence to the - * UI Server. - * @param job the new job - * @param showProgress true to show progress, false otherwise - * @return the progress ID assigned by the UI Server to the Job. - */ - int newJob( TDEIO::Job * job, bool showProgress ); - - /** - * Called by the job destructor, to tell the UI Server that - * the job ended. - * @param progressId the progress ID of the job, as returned by newJob() - */ - void jobFinished( int progressId ); - - /** - * @deprecated use TDEIO::AutoInfo - */ - bool openPassDlg( const TQString& prompt, TQString& user, TQString& pass, - bool readOnly ); - - /** - * Opens a password dialog. - * @param info the authentication information - * @return true if successful ("ok" clicked), false otherwise - */ - bool openPassDlg( TDEIO::AuthInfo& info ); - - /** - * Popup a message box. See TDEIO::SlaveBase. - * This doesn't use DCOP anymore, it shows the dialog in the application's process. - * Otherwise, other apps would block when trying to communicate with UIServer. - * @param progressId the progress ID of the job, as returned by newJob() - * @param type the type of the message box - * @param text the text to show - * @param caption the window caption - * @param buttonYes the text of the "Yes" button - * @param buttonNo the text of the "No button - */ - static int messageBox( int progressId, int type, const TQString &text, const TQString &caption, - const TQString &buttonYes, const TQString &buttonNo ); - - /** - * Popup a message box. See TDEIO::SlaveBase. - * This doesn't use DCOP anymore, it shows the dialog in the application's process. - * Otherwise, other apps would block when trying to communicate with UIServer. - * @param progressId the progress ID of the job, as returned by newJob() - * @param type the type of the message box - * @param text the text to show - * @param caption the window caption - * @param buttonYes the text of the "Yes" button - * @param buttonNo the text of the "No button - * @param dontAskAgainName A checkbox is added with which further confirmation can be turned off. - * The string is used to lookup and store the setting in kioslaverc. - * @since 3.3 - */ - static int messageBox( int progressId, int type, const TQString &text, const TQString &caption, - const TQString &buttonYes, const TQString &buttonNo, const TQString &dontAskAgainName ); - - /** - * @internal - * See renamedlg.h - */ - TDEIO::RenameDlg_Result open_RenameDlg( TDEIO::Job * job, - const TQString & caption, - const TQString& src, const TQString & dest, - TDEIO::RenameDlg_Mode mode, - TQString& newDest, - TDEIO::filesize_t sizeSrc = (TDEIO::filesize_t) -1, - TDEIO::filesize_t sizeDest = (TDEIO::filesize_t) -1, - time_t ctimeSrc = (time_t) -1, - time_t ctimeDest = (time_t) -1, - time_t mtimeSrc = (time_t) -1, - time_t mtimeDest = (time_t) -1 - ); - - /** - * @internal - * See skipdlg.h - */ - TDEIO::SkipDlg_Result open_SkipDlg( TDEIO::Job * job, - bool multi, - const TQString & error_text ); - -k_dcop: - /** - * Called by the UI Server (using DCOP) if the user presses cancel. - * @param progressId the progress ID of the job, as returned by newJob() - */ - void killJob( int progressId ); - - /** - * Called by the UI Server (using DCOP) to get all the metadata of the job - * @param progressId the progress IDof the job, as returned by newJob() - */ - TDEIO::MetaData metadata( int progressId ); - -protected: - - static Observer * s_pObserver; - Observer(); - ~Observer() {} - - UIServer_stub * m_uiserver; - - TQIntDict< TDEIO::Job > m_dctJobs; - -public slots: - - void slotTotalSize( TDEIO::Job*, TDEIO::filesize_t size ); - void slotTotalFiles( TDEIO::Job*, unsigned long files ); - void slotTotalDirs( TDEIO::Job*, unsigned long dirs ); - - void slotProcessedSize( TDEIO::Job*, TDEIO::filesize_t size ); - void slotProcessedFiles( TDEIO::Job*, unsigned long files ); - void slotProcessedDirs( TDEIO::Job*, unsigned long dirs ); - - void slotSpeed( TDEIO::Job*, unsigned long speed ); - void slotPercent( TDEIO::Job*, unsigned long percent ); - void slotInfoMessage( TDEIO::Job*, const TQString & msg ); - - void slotCopying( TDEIO::Job*, const KURL& from, const KURL& to ); - void slotMoving( TDEIO::Job*, const KURL& from, const KURL& to ); - void slotDeleting( TDEIO::Job*, const KURL& url ); - /// @since 3.1 - void slotTransferring( TDEIO::Job*, const KURL& url ); - void slotCreatingDir( TDEIO::Job*, const KURL& dir ); - // currently unused - void slotCanResume( TDEIO::Job*, TDEIO::filesize_t offset ); - -public: - void stating( TDEIO::Job*, const KURL& url ); - void mounting( TDEIO::Job*, const TQString & dev, const TQString & point ); - void unmounting( TDEIO::Job*, const TQString & point ); -protected: - virtual void virtual_hook( int id, void* data ); -private: - class ObserverPrivate* d; -}; - -// -*- mode: c++; c-basic-offset: 2 -*- -#endif diff --git a/kio/kio/passdlg.cpp b/kio/kio/passdlg.cpp deleted file mode 100644 index 1b5679028..000000000 --- a/kio/kio/passdlg.cpp +++ /dev/null @@ -1,367 +0,0 @@ -/* This file is part of the KDE libraries - Copyright (C) 2000 David Faure - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License version 2 as published by the Free Software Foundation. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include "passdlg.h" - -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include - -using namespace TDEIO; - -struct PasswordDialog::PasswordDialogPrivate -{ - TQGridLayout *layout; - TQLineEdit* userEdit; - KLineEdit* passEdit; - TQLabel* userNameLabel; - TQLabel* prompt; - TQCheckBox* keepCheckBox; - TQMap knownLogins; - KComboBox* userEditCombo; - TQHBox* userNameHBox; - - bool keep; - short unsigned int nRow; -}; - -PasswordDialog::PasswordDialog( const TQString& prompt, const TQString& user, - bool enableKeep, bool modal, TQWidget* parent, - const char* name ) - :KDialogBase( parent, name, modal, i18n("Password"), Ok|Cancel, Ok, true) -{ - init ( prompt, user, enableKeep ); -} - -PasswordDialog::~PasswordDialog() -{ - delete d; -} - -void PasswordDialog::init( const TQString& prompt, const TQString& user, - bool enableKeep ) -{ - TQWidget *main = makeMainWidget(); - - d = new PasswordDialogPrivate; - d->keep = false; - d->nRow = 0; - d->keepCheckBox = 0; - - TDEConfig* cfg = TDEGlobal::config(); - TDEConfigGroupSaver saver( cfg, "Passwords" ); - - d->layout = new TQGridLayout( main, 9, 3, spacingHint(), marginHint()); - d->layout->addColSpacing(1, 5); - - // Row 0: pixmap prompt - TQLabel* lbl; - TQPixmap pix( TDEGlobal::iconLoader()->loadIcon( "password", KIcon::NoGroup, KIcon::SizeHuge, 0, 0, true)); - if ( !pix.isNull() ) - { - lbl = new TQLabel( main ); - lbl->setPixmap( pix ); - lbl->setAlignment( Qt::AlignLeft|Qt::AlignVCenter ); - lbl->setFixedSize( lbl->sizeHint() ); - d->layout->addWidget( lbl, 0, 0, Qt::AlignLeft ); - } - d->prompt = new TQLabel( main ); - d->prompt->setAlignment( Qt::AlignLeft|Qt::AlignVCenter|TQt::WordBreak ); - d->layout->addWidget( d->prompt, 0, 2, Qt::AlignLeft ); - if ( prompt.isEmpty() ) - setPrompt( i18n( "You need to supply a username and a password" ) ); - else - setPrompt( prompt ); - - // Row 1: Row Spacer - d->layout->addRowSpacing( 1, 7 ); - - // Row 2-3: Reserved for an additional comment - - // Row 4: Username field - d->userNameLabel = new TQLabel( i18n("&Username:"), main ); - d->userNameLabel->setAlignment( Qt::AlignVCenter | Qt::AlignLeft ); - d->userNameLabel->setFixedSize( d->userNameLabel->sizeHint() ); - d->userNameHBox = new TQHBox( main ); - - d->userEdit = new KLineEdit( d->userNameHBox ); - TQSize s = d->userEdit->sizeHint(); - d->userEdit->setFixedHeight( s.height() ); - d->userEdit->setMinimumWidth( s.width() ); - d->userNameLabel->setBuddy( d->userEdit ); - d->layout->addWidget( d->userNameLabel, 4, 0 ); - d->layout->addWidget( d->userNameHBox, 4, 2 ); - - // Row 5: Row spacer - d->layout->addRowSpacing( 5, 4 ); - - // Row 6: Password field - lbl = new TQLabel( i18n("&Password:"), main ); - lbl->setAlignment( Qt::AlignVCenter | Qt::AlignLeft ); - lbl->setFixedSize( lbl->sizeHint() ); - TQHBox* hbox = new TQHBox( main ); - d->passEdit = new KLineEdit( hbox ); - if ( cfg->readEntry("EchoMode", "OneStar") == "NoEcho" ) - d->passEdit->setEchoMode( TQLineEdit::NoEcho ); - else - d->passEdit->setEchoMode( TQLineEdit::Password ); - s = d->passEdit->sizeHint(); - d->passEdit->setFixedHeight( s.height() ); - d->passEdit->setMinimumWidth( s.width() ); - lbl->setBuddy( d->passEdit ); - d->layout->addWidget( lbl, 6, 0 ); - d->layout->addWidget( hbox, 6, 2 ); - - if ( enableKeep ) - { - // Row 7: Add spacer - d->layout->addRowSpacing( 7, 4 ); - // Row 8: Keep Password - hbox = new TQHBox( main ); - d->keepCheckBox = new TQCheckBox( i18n("&Keep password"), hbox ); - d->keepCheckBox->setFixedSize( d->keepCheckBox->sizeHint() ); - d->keep = cfg->readBoolEntry("Keep", false ); - d->keepCheckBox->setChecked( d->keep ); - connect(d->keepCheckBox, TQT_SIGNAL(toggled( bool )), TQT_SLOT(slotKeep( bool ))); - d->layout->addWidget( hbox, 8, 2 ); - } - - // Configure necessary key-bindings and connect necessar slots and signals - connect( d->userEdit, TQT_SIGNAL(returnPressed()), d->passEdit, TQT_SLOT(setFocus()) ); - connect( d->passEdit, TQT_SIGNAL(returnPressed()), TQT_SLOT(slotOk()) ); - - if ( !user.isEmpty() ) - { - d->userEdit->setText( user ); - d->passEdit->setFocus(); - } - else - d->userEdit->setFocus(); - - d->userEditCombo = 0; -// setFixedSize( sizeHint() ); -} - -TQString PasswordDialog::username() const -{ - return d->userEdit->text(); -} - -TQString PasswordDialog::password() const -{ - return d->passEdit->text(); -} - -void PasswordDialog::setKeepPassword( bool b ) -{ - if ( d->keepCheckBox ) - d->keepCheckBox->setChecked( b ); -} - -bool PasswordDialog::keepPassword() const -{ - return d->keep; -} - -static void calculateLabelSize(TQLabel *label) -{ - TQString qt_text = label->text(); - - int pref_width = 0; - int pref_height = 0; - // Calculate a proper size for the text. - { - TQSimpleRichText rt(qt_text, label->font()); - TQRect d = TDEGlobalSettings::desktopGeometry(label->topLevelWidget()); - - pref_width = d.width() / 4; - rt.setWidth(pref_width-10); - int used_width = rt.widthUsed(); - pref_height = rt.height(); - if (used_width <= pref_width) - { - while(true) - { - int new_width = (used_width * 9) / 10; - rt.setWidth(new_width-10); - int new_height = rt.height(); - if (new_height > pref_height) - break; - used_width = rt.widthUsed(); - if (used_width > new_width) - break; - } - pref_width = used_width; - } - else - { - if (used_width > (pref_width *2)) - pref_width = pref_width *2; - else - pref_width = used_width; - } - } - label->setFixedSize(TQSize(pref_width+10, pref_height)); -} - -void PasswordDialog::addCommentLine( const TQString& label, - const TQString comment ) -{ - if (d->nRow > 0) - return; - - TQWidget *main = mainWidget(); - - TQLabel* lbl = new TQLabel( label, main); - lbl->setAlignment( Qt::AlignVCenter|Qt::AlignRight ); - lbl->setFixedSize( lbl->sizeHint() ); - d->layout->addWidget( lbl, d->nRow+2, 0, Qt::AlignLeft ); - lbl = new TQLabel( comment, main); - lbl->setAlignment( Qt::AlignVCenter|Qt::AlignLeft|TQt::WordBreak ); - calculateLabelSize(lbl); - d->layout->addWidget( lbl, d->nRow+2, 2, Qt::AlignLeft ); - d->layout->addRowSpacing( 3, 10 ); // Add a spacer - d->nRow++; -} - -void PasswordDialog::slotKeep( bool keep ) -{ - d->keep = keep; -} - -static TQString qrichtextify( const TQString& text ) -{ - if ( text.isEmpty() || text[0] == '<' ) - return text; - - TQStringList lines = TQStringList::split('\n', text); - for(TQStringList::Iterator it = lines.begin(); it != lines.end(); ++it) - { - *it = TQStyleSheet::convertFromPlainText( *it, TQStyleSheetItem::WhiteSpaceNormal ); - } - - return lines.join(TQString::null); -} - -void PasswordDialog::setPrompt(const TQString& prompt) -{ - TQString text = qrichtextify(prompt); - d->prompt->setText(text); - calculateLabelSize(d->prompt); -} - -void PasswordDialog::setPassword(const TQString &p) -{ - d->passEdit->setText(p); -} - -void PasswordDialog::setUserReadOnly( bool readOnly ) -{ - d->userEdit->setReadOnly( readOnly ); - if ( readOnly && d->userEdit->hasFocus() ) - d->passEdit->setFocus(); -} - -void PasswordDialog::setKnownLogins( const TQMap& knownLogins ) -{ - const int nr = knownLogins.count(); - if ( nr == 0 ) - return; - if ( nr == 1 ) { - d->userEdit->setText( knownLogins.begin().key() ); - setPassword( knownLogins.begin().data() ); - return; - } - - Q_ASSERT( !d->userEdit->isReadOnly() ); - if ( !d->userEditCombo ) { - delete d->userEdit; - d->userEditCombo = new KComboBox( true, d->userNameHBox ); - d->userEdit = d->userEditCombo->lineEdit(); - TQSize s = d->userEditCombo->sizeHint(); - d->userEditCombo->setFixedHeight( s.height() ); - d->userEditCombo->setMinimumWidth( s.width() ); - d->userNameLabel->setBuddy( d->userEditCombo ); - d->layout->addWidget( d->userNameHBox, 4, 2 ); - } - - d->knownLogins = knownLogins; - d->userEditCombo->insertStringList( knownLogins.keys() ); - d->userEditCombo->setFocus(); - - connect( d->userEditCombo, TQT_SIGNAL( activated( const TQString& ) ), - this, TQT_SLOT( slotActivated( const TQString& ) ) ); -} - -void PasswordDialog::slotActivated( const TQString& userName ) -{ - TQMap::ConstIterator it = d->knownLogins.find( userName ); - if ( it != d->knownLogins.end() ) - setPassword( it.data() ); -} - - -int PasswordDialog::getNameAndPassword( TQString& user, TQString& pass, bool* keep, - const TQString& prompt, bool readOnly, - const TQString& caption, - const TQString& comment, - const TQString& label ) -{ - PasswordDialog* dlg; - if( keep ) - dlg = new PasswordDialog( prompt, user, (*keep) ); - else - dlg = new PasswordDialog( prompt, user ); - - if ( !caption.isEmpty() ) - dlg->setPlainCaption( caption ); - else - dlg->setPlainCaption( i18n("Authorization Dialog") ); - - if ( !comment.isEmpty() ) - dlg->addCommentLine( label, comment ); - - if ( readOnly ) - dlg->setUserReadOnly( readOnly ); - - int ret = dlg->exec(); - if ( ret == Accepted ) - { - user = dlg->username(); - pass = dlg->password(); - if ( keep ) { (*keep) = dlg->keepPassword(); } - } - delete dlg; - return ret; - } - -void PasswordDialog::virtual_hook( int id, void* data ) -{ KDialogBase::virtual_hook( id, data ); } - -#include "passdlg.moc" diff --git a/kio/kio/passdlg.h b/kio/kio/passdlg.h deleted file mode 100644 index 864023398..000000000 --- a/kio/kio/passdlg.h +++ /dev/null @@ -1,175 +0,0 @@ -/* This file is part of the KDE libraries - Copyright (C) 2000 David Faure - Copyright (C) 2000 Dawit Alemayehu - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License version 2 as published by the Free Software Foundation. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with this library; see the file COPYING.LIB. If - not, write to the Free Software Foundation, Inc., 51 Franklin Street, - Fifth Floor, Boston, MA 02110-1301, USA. -*/ - -#ifndef __kio_pass_dlg_h__ -#define __kio_pass_dlg_h__ - -#include - -class TQGridLayout; - -namespace TDEIO { - -/** - * A dialog for requesting a login and a password from the end user. - * - * KIO-Slave authors are encouraged to use SlaveBase::openPassDlg - * instead of directly instantiating this dialog. - * @short dialog for requesting login and password from the end user - */ -class TDEIO_EXPORT PasswordDialog : public KDialogBase -{ - Q_OBJECT - -public: - /** - * Create a password dialog. - * - * @param prompt instructional text to be shown. - * @param user username, if known initially. - * @param enableKeep if true, shows checkbox that makes password persistent until KDE is shutdown. - * @param modal if true, the dialog will be modal (default:true). - * @param parent the parent widget (default:NULL). - * @param name the dialog name (default:NULL). - */ - PasswordDialog( const TQString& prompt, const TQString& user, - bool enableKeep = false, bool modal=true, - TQWidget* parent=0, const char* name=0 ); - - /** - * Destructor - */ - ~PasswordDialog(); - - /** - * Sets the prompt to show to the user. - * @param prompt instructional text to be shown. - */ - void setPrompt( const TQString& prompt ); - - /** - * Adds a comment line to the dialog. - * - * This function allows you to add one additional comment - * line to this widget. Calling this function after a - * comment has already been added will not have any effect. - * - * @param label label for comment (ex:"Command:") - * @param comment the actual comment text. - */ - void addCommentLine( const TQString& label, const TQString comment ); - - /** - * Returns the password entered by the user. - * @return the password - */ - TQString password() const; - - /** - * Returns the username entered by the user. - * @return the user name - */ - TQString username() const; - - /** - * Determines whether supplied authorization should - * persist even after the application has been closed. - * @return true to keep the password - */ - bool keepPassword() const; - - /** - * Check or uncheck the "keep password" checkbox. - * This can be used to check it before showing the dialog, to tell - * the user that the password is stored already (e.g. in the wallet). - * enableKeep must have been set to true in the constructor. - */ - void setKeepPassword( bool b ); - - /** - * Sets the username field read-only and sets the - * focus to the password field. - * - * @param readOnly true to set the user field to read-only - */ - void setUserReadOnly( bool readOnly ); - - /** - * @deprecated. Use setUserReadOnly(bool). - */ - KDE_DEPRECATED void setEnableUserField( bool enable, bool=false ) { - setUserReadOnly( !enable ); - }; - - /** - * Presets the password. - * @param password the password to set - * @since 3.1 - */ - void setPassword( const TQString& password ); - - /** - * Presets a number of login+password pairs that the user can choose from. - * The passwords can be empty if you simply want to offer usernames to choose from. - * This is incompatible with setUserReadOnly(true). - * @param knownLogins map of known logins: the keys are usernames, the values are passwords. - * @since 3.4 - */ - void setKnownLogins( const TQMap& knownLogins ); - - /** - * A convienence static method for obtaining authorization - * information from the end user. - * - * - * @param user username - * @param pass password - * @param keep pointer to flag that indicates whether to keep password (can be null) - * @param prompt text to display to user. - * @param readOnly make the username field read-only. - * @param caption set the title bar to given text. - * @param comment extra comment to display to user. - * @param label optinal label for extra comment. - * - * @return Accepted/Rejected based on the user choice. - */ - static int getNameAndPassword( TQString& user, TQString& pass, bool* keep, - const TQString& prompt = TQString::null, - bool readOnly = false, - const TQString& caption = TQString::null, - const TQString& comment = TQString::null, - const TQString& label = TQString::null ); - -private slots: - void slotKeep( bool ); - void slotActivated( const TQString& userName ); - -private: - void init( const TQString&, const TQString&, bool ); - -protected: - virtual void virtual_hook( int id, void* data ); -private: - struct PasswordDialogPrivate; - PasswordDialogPrivate* d; -}; - -} - -#endif diff --git a/kio/kio/paste.cpp b/kio/kio/paste.cpp deleted file mode 100644 index 472f4e313..000000000 --- a/kio/kio/paste.cpp +++ /dev/null @@ -1,308 +0,0 @@ -/* This file is part of the KDE libraries - Copyright (C) 2000 David Faure - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License version 2 as published by the Free Software Foundation. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include "paste.h" -#include "pastedialog.h" - -#include "kio/job.h" -#include "kio/global.h" -#include "kio/netaccess.h" -#include "kio/observer.h" -#include "kio/renamedlg.h" -#include "kio/kprotocolmanager.h" - -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -static KURL getNewFileName( const KURL &u, const TQString& text ) -{ - bool ok; - TQString dialogText( text ); - if ( dialogText.isEmpty() ) - dialogText = i18n( "Filename for clipboard content:" ); - TQString file = KInputDialog::getText( TQString::null, dialogText, TQString::null, &ok ); - if ( !ok ) - return KURL(); - - KURL myurl(u); - myurl.addPath( file ); - - if (TDEIO::NetAccess::exists(myurl, false, 0)) - { - kdDebug(7007) << "Paste will overwrite file. Prompting..." << endl; - TDEIO::RenameDlg_Result res = TDEIO::R_OVERWRITE; - - TQString newPath; - // Ask confirmation about resuming previous transfer - res = Observer::self()->open_RenameDlg( - 0L, i18n("File Already Exists"), - u.pathOrURL(), - myurl.pathOrURL(), - (TDEIO::RenameDlg_Mode) (TDEIO::M_OVERWRITE | TDEIO::M_SINGLE), newPath); - - if ( res == TDEIO::R_RENAME ) - { - myurl = newPath; - } - else if ( res == TDEIO::R_CANCEL ) - { - return KURL(); - } - } - - return myurl; -} - -// The finaly step: write _data to tempfile and move it to neW_url -static TDEIO::CopyJob* pasteDataAsyncTo( const KURL& new_url, const TQByteArray& _data ) -{ - KTempFile tempFile; - tempFile.dataStream()->writeRawBytes( _data.data(), _data.size() ); - tempFile.close(); - - KURL orig_url; - orig_url.setPath(tempFile.name()); - - return TDEIO::move( orig_url, new_url ); -} - -#ifndef QT_NO_MIMECLIPBOARD -static TDEIO::CopyJob* chooseAndPaste( const KURL& u, TQMimeSource* data, - const TQValueVector& formats, - const TQString& text, - TQWidget* widget, - bool clipboard ) -{ - TQStringList formatLabels; - for ( uint i = 0; i < formats.size(); ++i ) { - const TQCString& fmt = formats[i]; - KMimeType::Ptr mime = KMimeType::mimeType( fmt ); - if ( mime != KMimeType::defaultMimeTypePtr() ) - formatLabels.append( i18n( "%1 (%2)" ).arg( mime->comment() ).arg( fmt.data() ) ); - else - formatLabels.append( fmt ); - } - - TQString dialogText( text ); - if ( dialogText.isEmpty() ) - dialogText = i18n( "Filename for clipboard content:" ); - TDEIO::PasteDialog dlg( TQString::null, dialogText, TQString::null, formatLabels, widget, clipboard ); - - if ( dlg.exec() != KDialogBase::Accepted ) - return 0; - - if ( clipboard && dlg.clipboardChanged() ) { - KMessageBox::sorry( widget, - i18n( "The clipboard has changed since you used 'paste': " - "the chosen data format is no longer applicable. " - "Please copy again what you wanted to paste." ) ); - return 0; - } - - const TQString result = dlg.lineEditText(); - const TQCString chosenFormat = formats[ dlg.comboItem() ]; - - kdDebug() << " result=" << result << " chosenFormat=" << chosenFormat << endl; - KURL new_url( u ); - new_url.addPath( result ); - // if "data" came from TQClipboard, then it was deleted already - by a nice 0-seconds timer - // In that case, get it again. Let's hope the user didn't copy something else meanwhile :/ - if ( clipboard ) { - data = TQApplication::clipboard()->data(); - } - const TQByteArray ba = data->encodedData( chosenFormat ); - return pasteDataAsyncTo( new_url, ba ); -} -#endif - -// KDE4: remove -TDEIO_EXPORT bool TDEIO::isClipboardEmpty() -{ -#ifndef QT_NO_MIMECLIPBOARD - TQMimeSource *data = TQApplication::clipboard()->data(); - if ( data->provides( "text/uri-list" ) && data->encodedData( "text/uri-list" ).size() > 0 ) - return false; -#else - // Happens with some versions of Qt Embedded... :/ - // Guess. - TQString data = TQApplication::clipboard()->text(); - if(data.contains("://")) - return false; -#endif - return true; -} - -#ifndef QT_NO_MIMECLIPBOARD -// The main method for dropping -TDEIO::CopyJob* TDEIO::pasteMimeSource( TQMimeSource* data, const KURL& dest_url, - const TQString& dialogText, TQWidget* widget, bool clipboard ) -{ - TQByteArray ba; - - // Now check for plain text - // We don't want to display a mimetype choice for a TQTextDrag, those mimetypes look ugly. - TQString text; - if ( TQTextDrag::canDecode( data ) && TQTextDrag::decode( data, text ) ) - { - TQTextStream txtStream( ba, IO_WriteOnly ); - txtStream << text; - } - else - { - TQValueVector formats; - const char* fmt; - for ( int i = 0; ( fmt = data->format( i ) ); ++i ) { - if ( qstrcmp( fmt, "application/x-qiconlist" ) == 0 ) // see QIconDrag - continue; - if ( qstrcmp( fmt, "application/x-kde-cutselection" ) == 0 ) // see KonqDrag - continue; - if ( strchr( fmt, '/' ) == 0 ) // e.g. TARGETS, MULTIPLE, TIMESTAMP - continue; - formats.append( fmt ); - } - - if ( formats.size() == 0 ) - return 0; - - if ( formats.size() > 1 ) { - return chooseAndPaste( dest_url, data, formats, dialogText, widget, clipboard ); - } - ba = data->encodedData( formats.first() ); - } - if ( ba.size() == 0 ) - { - KMessageBox::sorry(0, i18n("The clipboard is empty")); - return 0; - } - - return pasteDataAsync( dest_url, ba, dialogText ); -} -#endif - -// The main method for pasting -TDEIO_EXPORT TDEIO::Job *TDEIO::pasteClipboard( const KURL& dest_url, bool move ) -{ - if ( !dest_url.isValid() ) { - KMessageBox::error( 0L, i18n( "Malformed URL\n%1" ).arg( dest_url.url() ) ); - return 0; - } - -#ifndef QT_NO_MIMECLIPBOARD - TQMimeSource *data = TQApplication::clipboard()->data(); - - // First check for URLs. - KURL::List urls; - if ( KURLDrag::canDecode( data ) && KURLDrag::decode( data, urls ) ) { - if ( urls.count() == 0 ) { - KMessageBox::error( 0L, i18n("The clipboard is empty")); - return 0; - } - - TDEIO::Job *res = 0; - if ( move ) - res = TDEIO::move( urls, dest_url ); - else - res = TDEIO::copy( urls, dest_url ); - - // If moving, erase the clipboard contents, the original files don't exist anymore - if ( move ) - TQApplication::clipboard()->clear(); - return res; - } - return pasteMimeSource( data, dest_url, TQString::null, 0 /*TODO parent widget*/, true /*clipboard*/ ); -#else - TQByteArray ba; - TQTextStream txtStream( ba, IO_WriteOnly ); - TQStringList data = TQStringList::split("\n", TQApplication::clipboard()->text()); - KURL::List urls; - KURLDrag::decode(data, urls); - TQStringList::Iterator end(data.end()); - for(TQStringList::Iterator it=data.begin(); it!=end; ++it) - txtStream << *it; - if ( ba.size() == 0 ) - { - KMessageBox::sorry(0, i18n("The clipboard is empty")); - return 0; - } - return pasteDataAsync( dest_url, ba ); -#endif -} - - -TDEIO_EXPORT void TDEIO::pasteData( const KURL& u, const TQByteArray& _data ) -{ - KURL new_url = getNewFileName( u, TQString::null ); - // We could use TDEIO::put here, but that would require a class - // for the slotData call. With NetAccess, we can do a synchronous call. - - if (new_url.isEmpty()) - return; - - KTempFile tempFile; - tempFile.setAutoDelete( true ); - tempFile.dataStream()->writeRawBytes( _data.data(), _data.size() ); - tempFile.close(); - - (void) TDEIO::NetAccess::upload( tempFile.name(), new_url, 0 ); -} - -TDEIO_EXPORT TDEIO::CopyJob* TDEIO::pasteDataAsync( const KURL& u, const TQByteArray& _data ) -{ - return pasteDataAsync( u, _data, TQString::null ); -} - -TDEIO_EXPORT TDEIO::CopyJob* TDEIO::pasteDataAsync( const KURL& u, const TQByteArray& _data, const TQString& text ) -{ - KURL new_url = getNewFileName( u, text ); - - if (new_url.isEmpty()) - return 0; - - return pasteDataAsyncTo( new_url, _data ); -} - -TDEIO_EXPORT TQString TDEIO::pasteActionText() -{ - TQMimeSource *data = TQApplication::clipboard()->data(); - KURL::List urls; - if ( KURLDrag::canDecode( data ) && KURLDrag::decode( data, urls ) ) { - if ( urls.isEmpty() ) - return TQString::null; // nothing to paste - else if ( urls.first().isLocalFile() ) - return i18n( "&Paste File", "&Paste %n Files", urls.count() ); - else - return i18n( "&Paste URL", "&Paste %n URLs", urls.count() ); - } else if ( data->format(0) != 0 ) { - return i18n( "&Paste Clipboard Contents" ); - } else { - return TQString::null; - } -} - diff --git a/kio/kio/paste.h b/kio/kio/paste.h deleted file mode 100644 index 66579831a..000000000 --- a/kio/kio/paste.h +++ /dev/null @@ -1,125 +0,0 @@ -/* This file is part of the KDE libraries - Copyright (C) 2000-2005 David Faure - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License version 2 as published by the Free Software Foundation. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef __kio_paste_h__ -#define __kio_paste_h__ - -#include -#include -#include -class TQWidget; -class TQMimeSource; - -// KDE4 TODO pass a parent widget to all methods that will display a message box - -namespace TDEIO { - class Job; - class CopyJob; - - /** - * Pastes the content of the clipboard to the given destination URL. - * URLs are treated separately (performing a file copy) - * from other data (which is saved into a file after asking the user - * to choose a filename and the preferred data format) - * - * @param destURL the URL to receive the data - * @param move true to move the data, false to copy - * @return the job that handles the operation - * @see pasteData() - */ - TDEIO_EXPORT Job *pasteClipboard( const KURL& destURL, bool move = false ); - - /** - * Pastes the given @p data to the given destination URL. - * NOTE: This method is blocking (uses NetAccess for saving the data). - * Please consider using pasteDataAsync instead. - * - * @param destURL the URL of the directory where the data will be pasted. - * The filename to use in that directory is prompted by this method. - * @param data the data to copy - * @see pasteClipboard() - */ - TDEIO_EXPORT void pasteData( const KURL& destURL, const TQByteArray& data ); - - /** - * Pastes the given @p data to the given destination URL. - * Note that this method requires the caller to have chosen the QByteArray - * to paste before hand, unlike pasteClipboard and pasteMimeSource. - * - * @param destURL the URL of the directory where the data will be pasted. - * The filename to use in that directory is prompted by this method. - * @param data the data to copy - * @see pasteClipboard() - */ - TDEIO_EXPORT CopyJob *pasteDataAsync( const KURL& destURL, const TQByteArray& data ); - - /** - * Pastes the given @p data to the given destination URL. - * Note that this method requires the caller to have chosen the QByteArray - * to paste before hand, unlike pasteClipboard and pasteMimeSource. - * - * @param destURL the URL of the directory where the data will be pasted. - * The filename to use in that directory is prompted by this method. - * @param data the data to copy - * @param dialogText the text to show in the dialog - * @see pasteClipboard() - */ - TDEIO_EXPORT CopyJob *pasteDataAsync( const KURL& destURL, const TQByteArray& data, const TQString& dialogText ); // KDE4: merge with above - - - /** - * Save the given mimesource @p data to the given destination URL - * after offering the user to choose a data format. - * This is the method used when handling drops (of anything else than URLs) - * onto kdesktop and konqueror. - * - * @param data the TQMimeSource (e.g. a TQDropEvent) - * @param destURL the URL of the directory where the data will be pasted. - * The filename to use in that directory is prompted by this method. - * @param dialogText the text to show in the dialog - * @param widget parent widget to use for dialogs - * @param clipboard whether the TQMimeSource comes from TQClipboard. If you - * use pasteClipboard for that case, you never have to worry about this parameter. - * - * @see pasteClipboard() - * - * @since 3.5 - */ - TDEIO_EXPORT CopyJob* pasteMimeSource( TQMimeSource* data, const KURL& destURL, - const TQString& dialogText, TQWidget* widget, - bool clipboard = false ); - - /** - * Checks whether the clipboard contains any URLs. - * @return true if not - * Not used anymore, wrong method name, so it will disappear in KDE4. - */ - TDEIO_EXPORT_DEPRECATED bool isClipboardEmpty(); - - /** - * Returns the text to use for the Paste action, when the application supports - * pasting files, urls, and clipboard data, using pasteClipboard(). - * @return a string suitable for KAction::setText, or an empty string if pasting - * isn't possible right now. - * - * @since 3.5 - */ - TDEIO_EXPORT TQString pasteActionText(); -} - -#endif diff --git a/kio/kio/pastedialog.cpp b/kio/kio/pastedialog.cpp deleted file mode 100644 index 0252baff1..000000000 --- a/kio/kio/pastedialog.cpp +++ /dev/null @@ -1,84 +0,0 @@ -/* This file is part of the KDE libraries - Copyright (C) 2005 David Faure - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License version 2 as published by the Free Software Foundation. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include "pastedialog.h" - -#include -#include -#include - -#include -#include -#include -#include -#include - -TDEIO::PasteDialog::PasteDialog( const TQString &caption, const TQString &label, - const TQString &value, const TQStringList& items, - TQWidget *parent, - bool clipboard ) - : KDialogBase( parent, 0 /*name*/, true, caption, Ok|Cancel, Ok, true ) -{ - TQFrame *frame = makeMainWidget(); - TQVBoxLayout *layout = new TQVBoxLayout( frame, 0, spacingHint() ); - - m_label = new TQLabel( label, frame ); - layout->addWidget( m_label ); - - m_lineEdit = new KLineEdit( value, frame ); - layout->addWidget( m_lineEdit ); - - m_lineEdit->setFocus(); - m_label->setBuddy( m_lineEdit ); - - layout->addWidget( new TQLabel( i18n( "Data format:" ), frame ) ); - m_comboBox = new TQComboBox( frame ); - m_comboBox->insertStringList( items ); - layout->addWidget( m_comboBox ); - - layout->addStretch(); - - //connect( m_lineEdit, TQT_SIGNAL( textChanged( const TQString & ) ), - // TQT_SLOT( slotEditTextChanged( const TQString & ) ) ); - //connect( this, TQT_SIGNAL( user1Clicked() ), m_lineEdit, TQT_SLOT( clear() ) ); - - //slotEditTextChanged( value ); - setMinimumWidth( 350 ); - - m_clipboardChanged = false; - if ( clipboard ) - connect( TQApplication::clipboard(), TQT_SIGNAL( dataChanged() ), - this, TQT_SLOT( slotClipboardDataChanged() ) ); -} - -void TDEIO::PasteDialog::slotClipboardDataChanged() -{ - m_clipboardChanged = true; -} - -TQString TDEIO::PasteDialog::lineEditText() const -{ - return m_lineEdit->text(); -} - -int TDEIO::PasteDialog::comboItem() const -{ - return m_comboBox->currentItem(); -} - -#include "pastedialog.moc" diff --git a/kio/kio/pastedialog.h b/kio/kio/pastedialog.h deleted file mode 100644 index 2e7bdfda1..000000000 --- a/kio/kio/pastedialog.h +++ /dev/null @@ -1,64 +0,0 @@ -/* This file is part of the KDE libraries - Copyright (C) 2005 David Faure - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License version 2 as published by the Free Software Foundation. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef PASTEDIALOG_H -#define PASTEDIALOG_H - -#include - -class TQComboBox; -class KLineEdit; -class TQLabel; - -namespace TDEIO { - -/** - * @internal - * Internal class used by paste.h. DO NOT USE. - * @since 3.5 - */ -class PasteDialog : public KDialogBase -{ - Q_OBJECT -public: - PasteDialog( const TQString &caption, const TQString &label, - const TQString &value, const TQStringList& items, - TQWidget *parent, bool clipboard ); - - TQString lineEditText() const; - int comboItem() const; - bool clipboardChanged() const { return m_clipboardChanged; } - -private slots: - void slotClipboardDataChanged(); - -private: - TQLabel* m_label; - KLineEdit* m_lineEdit; - TQComboBox* m_comboBox; - bool m_clipboardChanged; - - class Private; - Private* d; -}; - -} // namespace - - -#endif /* PASTEDIALOG_H */ - diff --git a/kio/kio/posixacladdons.cpp b/kio/kio/posixacladdons.cpp deleted file mode 100644 index bae51592b..000000000 --- a/kio/kio/posixacladdons.cpp +++ /dev/null @@ -1,236 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2005 by Markus Brueffer * - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU Library 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 "posixacladdons.h" - -#if defined(USE_POSIX_ACL) && !defined(HAVE_NON_POSIX_ACL_EXTENSIONS) - -#include -#include - -#include - -class SortedEntryList : public TQPtrList -{ -protected: - int compareItems( TQPtrCollection::Item i1, - TQPtrCollection::Item i2 ) - { - acl_entry_t *e1 = static_cast( i1 ); - acl_entry_t *e2 = static_cast( i2 ); - - acl_tag_t tag1, tag2; - uid_t uid1 = 0, uid2 = 0; - - acl_get_tag_type( *e1, &tag1 ); - acl_get_tag_type( *e2, &tag2 ); - - if ( tag1 == ACL_USER || tag1 == ACL_GROUP ) - uid1 = *( (uid_t*) acl_get_qualifier( *e1 ) ); - - if ( tag2 == ACL_USER || tag2 == ACL_GROUP ) - uid2 = *( (uid_t*) acl_get_qualifier( *e2 ) ); - - if ( tag1 < tag2 ) - return -1; - else if ( tag1 > tag2 ) - return 1; - - if ( uid1 < uid2 ) - return -1; - else if ( uid1 > uid2 ) - return 1; - - return 0; - } -}; - -int acl_cmp(acl_t acl1, acl_t acl2) -{ - if ( !acl1 || !acl2 ) - return -1; - - SortedEntryList entries1, entries2; - entries1.setAutoDelete( true ); - entries2.setAutoDelete( true ); - - /* Add ACL entries to vectors */ - acl_entry_t *entry = new acl_entry_t; - int ret = acl_get_entry( acl1, ACL_FIRST_ENTRY, entry ); - while( ret == 1 ) { - entries1.append( entry ); - entry = new acl_entry_t; - ret = acl_get_entry( acl1, ACL_NEXT_ENTRY, entry ); - } - delete entry; - - entry = new acl_entry_t; - ret = acl_get_entry( acl2, ACL_FIRST_ENTRY, entry ); - while ( ret == 1 ) { - entries2.append( entry ); - entry = new acl_entry_t; - ret = acl_get_entry( acl2, ACL_NEXT_ENTRY, entry ); - } - delete entry; - - /* If the entry count differs, we are done */ - if ( entries1.count() != entries2.count() ) - return 1; - - /* Sort vectors */ - entries1.sort(); - entries2.sort(); - - /* Compare all entries */ - acl_permset_t permset1, permset2; - acl_tag_t tag1, tag2; - uid_t uid1, uid2; - acl_entry_t *e1, *e2; - - for ( e1 = entries1.first(), e2 = entries2.first(); e1; e1 = entries1.next(), e2 = entries2.next() ) { - /* Compare tag */ - if ( acl_get_tag_type( *e1, &tag1 ) != 0 ) return 1; - if ( acl_get_tag_type( *e2, &tag2 ) != 0 ) return 1; - if ( tag1 != tag2 ) return 1; - - /* Compare permissions */ - if ( acl_get_permset( *e1, &permset1 ) != 0 ) return 1; - if ( acl_get_permset( *e2, &permset2 ) != 0 ) return 1; - if ( *permset1 != *permset2) return 1; - - /* Compare uid */ - switch( tag1 ) { - case ACL_USER: - case ACL_GROUP: - uid1 = *( (uid_t*) acl_get_qualifier( *e1 ) ); - uid2 = *( (uid_t*) acl_get_qualifier( *e2 ) ); - if ( uid1 != uid2 ) return 1; - } - } - - return 0; -} - -acl_t acl_from_mode(mode_t mode) -{ - acl_t newACL = acl_init( 3 ); - acl_entry_t entry; - acl_permset_t permset; - int error = 0; - - /* Add owner entry */ - if ( ( error = acl_create_entry( &newACL, &entry ) ) == 0 ) { - /* Set owner permissions */ - acl_set_tag_type( entry, ACL_USER_OBJ ); - acl_get_permset( entry, &permset ); - acl_clear_perms( permset ); - if ( mode & S_IRUSR ) acl_add_perm( permset, ACL_READ ); - if ( mode & S_IWUSR ) acl_add_perm( permset, ACL_WRITE ); - if ( mode & S_IXUSR ) acl_add_perm( permset, ACL_EXECUTE ); - acl_set_permset( entry, permset ); - - /* Add group entry */ - if ( ( error = acl_create_entry( &newACL, &entry ) ) == 0 ) { - /* Set group permissions */ - acl_set_tag_type( entry, ACL_GROUP_OBJ ); - acl_get_permset( entry, &permset ); - acl_clear_perms( permset ); - if ( mode & S_IRGRP ) acl_add_perm( permset, ACL_READ ); - if ( mode & S_IWGRP ) acl_add_perm( permset, ACL_WRITE ); - if ( mode & S_IXGRP ) acl_add_perm( permset, ACL_EXECUTE ); - acl_set_permset( entry, permset ); - - /* Add other entry */ - if ( ( error = acl_create_entry( &newACL, &entry ) ) == 0) { - /* Set other permissions */ - acl_set_tag_type( entry, ACL_OTHER ); - acl_get_permset( entry, &permset ); - acl_clear_perms( permset ); - if ( mode & S_IROTH ) acl_add_perm( permset, ACL_READ ); - if ( mode & S_IWOTH ) acl_add_perm( permset, ACL_WRITE ); - if ( mode & S_IXOTH ) acl_add_perm( permset, ACL_EXECUTE ); - acl_set_permset( entry, permset ); - } - } - } - - if ( error ) { - acl_free ( &newACL ); - return NULL; - } - - return newACL; -} - -int acl_equiv_mode(acl_t acl, mode_t *mode_p) -{ - acl_entry_t entry; - acl_tag_t tag; - acl_permset_t permset; - mode_t mode = 0; - int notEquiv = 0; - - if ( !acl ) - return -1; - - int ret = acl_get_entry( acl, ACL_FIRST_ENTRY, &entry ); - while ( ret == 1 ) { - acl_get_tag_type( entry, &tag ); - acl_get_permset( entry, &permset ); - - switch( tag ) { - case ACL_USER_OBJ: - if ( acl_get_perm( permset, ACL_READ ) ) mode |= S_IRUSR; - if ( acl_get_perm( permset, ACL_WRITE ) ) mode |= S_IWUSR; - if ( acl_get_perm( permset, ACL_EXECUTE ) ) mode |= S_IXUSR; - break; - - case ACL_GROUP_OBJ: - if ( acl_get_perm( permset, ACL_READ ) ) mode |= S_IRGRP; - if ( acl_get_perm( permset, ACL_WRITE ) ) mode |= S_IWGRP; - if ( acl_get_perm( permset, ACL_EXECUTE ) ) mode |= S_IXGRP; - break; - - case ACL_OTHER: - if ( acl_get_perm( permset, ACL_READ ) ) mode |= S_IROTH; - if ( acl_get_perm( permset, ACL_WRITE ) ) mode |= S_IWOTH; - if ( acl_get_perm( permset, ACL_EXECUTE ) ) mode |= S_IXOTH; - break; - - case ACL_USER: - case ACL_GROUP: - case ACL_MASK: - notEquiv = 1; - break; - - default: - errno = EINVAL; - return -1; - } - - ret = acl_get_entry( acl, ACL_NEXT_ENTRY, &entry ); - } - - if (mode_p) - *mode_p = mode; - - return notEquiv; -} - -#endif // USE_POSIX_ACL diff --git a/kio/kio/posixacladdons.h b/kio/kio/posixacladdons.h deleted file mode 100644 index 45c4af245..000000000 --- a/kio/kio/posixacladdons.h +++ /dev/null @@ -1,47 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2005 by Markus Brueffer * - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU Library 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 __posixacladdons_h__ -#define __posixacladdons_h__ - -#ifdef HAVE_CONFIG_H -#include -#endif - -#include - -#if defined(USE_POSIX_ACL) && !defined(HAVE_NON_POSIX_ACL_EXTENSIIONS) - -#ifdef Q_OS_FREEBSD -#include -#endif - -#include - -#ifdef Q_OS_FREEBSD -#define acl_get_perm acl_get_perm_np -#endif - -int acl_cmp(acl_t acl1, acl_t acl2); -acl_t acl_from_mode(mode_t mode); -int acl_equiv_mode(acl_t acl, mode_t *mode_p); - -#endif // USE_POSIX_ACL - -#endif // __posixacladdons_h__ diff --git a/kio/kio/previewjob.cpp b/kio/kio/previewjob.cpp deleted file mode 100644 index de4800ab1..000000000 --- a/kio/kio/previewjob.cpp +++ /dev/null @@ -1,597 +0,0 @@ -// -*- c++ -*- -// vim: ts=4 sw=4 et -/* This file is part of the KDE libraries - Copyright (C) 2000 David Faure - 2000 Carsten Pfeiffer - 2001 Malte Starostik - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include "previewjob.h" - -#include -#ifdef __FreeBSD__ - #include -#endif -#include - -#ifdef Q_OS_UNIX -#include -#include -#endif - -#include -#include -#include -#include -#include - -#include // Do not remove, needed for correct bool serialization -#include -#include -#include -#include -#include -#include -#include - -#include - -#include "previewjob.moc" - -namespace TDEIO { struct PreviewItem; } -using namespace TDEIO; - -struct TDEIO::PreviewItem -{ - KFileItem *item; - KService::Ptr plugin; -}; - -struct TDEIO::PreviewJobPrivate -{ - enum { STATE_STATORIG, // if the thumbnail exists - STATE_GETORIG, // if we create it - STATE_CREATETHUMB // thumbnail:/ slave - } state; - KFileItemList initialItems; - const TQStringList *enabledPlugins; - // Our todo list :) - TQValueList items; - // The current item - PreviewItem currentItem; - // The modification time of that URL - time_t tOrig; - // Path to thumbnail cache for the current size - TQString thumbPath; - // Original URL of current item in TMS format - // (file:///path/to/file instead of file:/path/to/file) - TQString origName; - // Thumbnail file name for current item - TQString thumbName; - // Size of thumbnail - int width; - int height; - // Unscaled size of thumbnail (128 or 256 if cache is enabled) - int cacheWidth; - int cacheHeight; - // Whether the thumbnail should be scaled - bool bScale; - // Whether we should save the thumbnail - bool bSave; - // If the file to create a thumb for was a temp file, this is its name - TQString tempName; - // Over that, it's too much - unsigned long maximumSize; - // the size for the icon overlay - int iconSize; - // the transparency of the blended mimetype icon - int iconAlpha; - // Shared memory segment Id. The segment is allocated to a size - // of extent x extent x 4 (32 bit image) on first need. - int shmid; - // And the data area - uchar *shmaddr; - // Delete the KFileItems when done? - bool deleteItems; - bool succeeded; - // Root of thumbnail cache - TQString thumbRoot; - bool ignoreMaximumSize; - TQTimer startPreviewTimer; -}; - -PreviewJob::PreviewJob( const KFileItemList &items, int width, int height, - int iconSize, int iconAlpha, bool scale, bool save, - const TQStringList *enabledPlugins, bool deleteItems ) - : TDEIO::Job( false /* no GUI */ ) -{ - d = new PreviewJobPrivate; - d->tOrig = 0; - d->shmid = -1; - d->shmaddr = 0; - d->initialItems = items; - d->enabledPlugins = enabledPlugins; - d->width = width; - d->height = height ? height : width; - d->cacheWidth = d->width; - d->cacheHeight = d->height; - d->iconSize = iconSize; - d->iconAlpha = iconAlpha; - d->deleteItems = deleteItems; - d->bScale = scale; - d->bSave = save && scale; - d->succeeded = false; - d->currentItem.item = 0; - d->thumbRoot = TQDir::homeDirPath() + "/.thumbnails/"; - d->ignoreMaximumSize = false; - - // Return to event loop first, determineNextFile() might delete this; - connect(&d->startPreviewTimer, TQT_SIGNAL(timeout()), TQT_SLOT(startPreview()) ); - d->startPreviewTimer.start(0, true); -} - -PreviewJob::~PreviewJob() -{ -#ifdef Q_OS_UNIX - if (d->shmaddr) { - shmdt((char*)d->shmaddr); - shmctl(d->shmid, IPC_RMID, 0); - } -#endif - delete d; -} - -void PreviewJob::startPreview() -{ - // Load the list of plugins to determine which mimetypes are supported - KTrader::OfferList plugins = KTrader::self()->query("ThumbCreator"); - TQMap mimeMap; - - for (KTrader::OfferList::ConstIterator it = plugins.begin(); it != plugins.end(); ++it) - if (!d->enabledPlugins || d->enabledPlugins->contains((*it)->desktopEntryName())) - { - TQStringList mimeTypes = (*it)->property("MimeTypes").toStringList(); - for (TQStringList::ConstIterator mt = mimeTypes.begin(); mt != mimeTypes.end(); ++mt) - mimeMap.insert(*mt, *it); - } - - // Look for images and store the items in our todo list :) - bool bNeedCache = false; - for (KFileItemListIterator it(d->initialItems); it.current(); ++it ) - { - PreviewItem item; - item.item = it.current(); - TQMap::ConstIterator plugin = mimeMap.find(it.current()->mimetype()); - if (plugin == mimeMap.end() - && (it.current()->mimetype() != "application/x-desktop") - && (it.current()->mimetype() != "media/builtin-mydocuments") - && (it.current()->mimetype() != "media/builtin-mycomputer") - && (it.current()->mimetype() != "media/builtin-mynetworkplaces") - && (it.current()->mimetype() != "media/builtin-printers") - && (it.current()->mimetype() != "media/builtin-trash") - && (it.current()->mimetype() != "media/builtin-webbrowser")) - { - TQString mimeType = it.current()->mimetype(); - plugin = mimeMap.find(mimeType.replace(TQRegExp("/.*"), "/*")); - - if (plugin == mimeMap.end()) - { - // check mime type inheritance - KMimeType::Ptr mimeInfo = KMimeType::mimeType(it.current()->mimetype()); - TQString parentMimeType = mimeInfo->parentMimeType(); - while (!parentMimeType.isEmpty()) - { - plugin = mimeMap.find(parentMimeType); - if (plugin != mimeMap.end()) break; - - KMimeType::Ptr parentMimeInfo = KMimeType::mimeType(parentMimeType); - if (!parentMimeInfo) break; - - parentMimeType = parentMimeInfo->parentMimeType(); - } - } - - if (plugin == mimeMap.end()) - { - // check X-TDE-Text property - KMimeType::Ptr mimeInfo = KMimeType::mimeType(it.current()->mimetype()); - TQVariant textProperty = mimeInfo->property("X-TDE-text"); - if (textProperty.isValid() && textProperty.type() == TQVariant::Bool) - { - if (textProperty.toBool()) - { - plugin = mimeMap.find("text/plain"); - if (plugin == mimeMap.end()) - { - plugin = mimeMap.find( "text/*" ); - } - } - } - } - } - - if (plugin != mimeMap.end()) - { - item.plugin = *plugin; - d->items.append(item); - if (!bNeedCache && d->bSave && - (it.current()->url().protocol() != "file" || - !it.current()->url().directory( false ).startsWith(d->thumbRoot)) && - (*plugin)->property("CacheThumbnail").toBool()) - bNeedCache = true; - } - else - { - emitFailed(it.current()); - if (d->deleteItems) - delete it.current(); - } - } - - // Read configuration value for the maximum allowed size - TDEConfig * config = TDEGlobal::config(); - TDEConfigGroupSaver cgs( config, "PreviewSettings" ); - d->maximumSize = config->readNumEntry( "MaximumSize", 1024*1024 /* 1MB */ ); - - if (bNeedCache) - { - if (d->width <= 128 && d->height <= 128) d->cacheWidth = d->cacheHeight = 128; - else d->cacheWidth = d->cacheHeight = 256; - d->thumbPath = d->thumbRoot + (d->cacheWidth == 128 ? "normal/" : "large/"); - KStandardDirs::makeDir(d->thumbPath, 0700); - } - else - d->bSave = false; - determineNextFile(); -} - -void PreviewJob::removeItem( const KFileItem *item ) -{ - for (TQValueList::Iterator it = d->items.begin(); it != d->items.end(); ++it) - if ((*it).item == item) - { - d->items.remove(it); - break; - } - - if (d->currentItem.item == item) - { - subjobs.first()->kill(); - subjobs.removeFirst(); - determineNextFile(); - } -} - -void PreviewJob::setIgnoreMaximumSize(bool ignoreSize) -{ - d->ignoreMaximumSize = ignoreSize; -} - -void PreviewJob::determineNextFile() -{ - if (d->currentItem.item) - { - if (!d->succeeded) - emitFailed(); - if (d->deleteItems) { - delete d->currentItem.item; - d->currentItem.item = 0L; - } - } - // No more items ? - if ( d->items.isEmpty() ) - { - emitResult(); - return; - } - else - { - // First, stat the orig file - d->state = PreviewJobPrivate::STATE_STATORIG; - d->currentItem = d->items.first(); - d->succeeded = false; - d->items.remove(d->items.begin()); - TDEIO::Job *job = TDEIO::stat( d->currentItem.item->url(), false ); - job->addMetaData( "no-auth-prompt", "true" ); - addSubjob(job); - } -} - -void PreviewJob::slotResult( TDEIO::Job *job ) -{ - subjobs.remove( job ); - Q_ASSERT ( subjobs.isEmpty() ); // We should have only one job at a time ... - switch ( d->state ) - { - case PreviewJobPrivate::STATE_STATORIG: - { - if (job->error()) // that's no good news... - { - // Drop this one and move on to the next one - determineNextFile(); - return; - } - TDEIO::UDSEntry entry = ((TDEIO::StatJob*)job)->statResult(); - TDEIO::UDSEntry::ConstIterator it = entry.begin(); - d->tOrig = 0; - int found = 0; - for( ; it != entry.end() && found < 2; it++ ) - { - if ( (*it).m_uds == TDEIO::UDS_MODIFICATION_TIME ) - { - d->tOrig = (time_t)((*it).m_long); - found++; - } - else if ( (*it).m_uds == TDEIO::UDS_SIZE ) - { - if ( filesize_t((*it).m_long) > d->maximumSize && - !d->ignoreMaximumSize && - !d->currentItem.plugin->property("IgnoreMaximumSize").toBool() ) - { - determineNextFile(); - return; - } - found++; - } - } - - if ( !d->currentItem.plugin->property( "CacheThumbnail" ).toBool() ) - { - // This preview will not be cached, no need to look for a saved thumbnail - // Just create it, and be done - getOrCreateThumbnail(); - return; - } - - if ( statResultThumbnail() ) - return; - - getOrCreateThumbnail(); - return; - } - case PreviewJobPrivate::STATE_GETORIG: - { - if (job->error()) - { - determineNextFile(); - return; - } - - createThumbnail( static_cast(job)->destURL().path() ); - return; - } - case PreviewJobPrivate::STATE_CREATETHUMB: - { - if (!d->tempName.isEmpty()) - { - TQFile::remove(d->tempName); - d->tempName = TQString::null; - } - determineNextFile(); - return; - } - } -} - -bool PreviewJob::statResultThumbnail() -{ - if ( d->thumbPath.isEmpty() ) - return false; - - KURL url = d->currentItem.item->url(); - // Don't include the password if any - url.setPass(TQString::null); - // The TMS defines local files as file:///path/to/file instead of KDE's - // way (file:/path/to/file) -#ifdef KURL_TRIPLE_SLASH_FILE_PROT - d->origName = url.url(); -#else - if (url.protocol() == "file") d->origName = "file://" + url.path(); - else d->origName = url.url(); -#endif - - KMD5 md5( TQFile::encodeName( d->origName ).data() ); - d->thumbName = TQFile::encodeName( md5.hexDigest() ) + ".png"; - - TQImage thumb; - if ( !thumb.load( d->thumbPath + d->thumbName ) ) return false; - - if ( thumb.text( "Thumb::URI", 0 ) != d->origName || - thumb.text( "Thumb::MTime", 0 ).toInt() != d->tOrig ) return false; - - // Found it, use it - emitPreview( thumb ); - d->succeeded = true; - determineNextFile(); - return true; -} - - -void PreviewJob::getOrCreateThumbnail() -{ - // We still need to load the orig file ! (This is getting tedious) :) - const KFileItem* item = d->currentItem.item; - const TQString localPath = item->localPath(); - if ( !localPath.isEmpty() ) - createThumbnail( localPath ); - else - { - d->state = PreviewJobPrivate::STATE_GETORIG; - KTempFile localFile; - KURL localURL; - localURL.setPath( d->tempName = localFile.name() ); - const KURL currentURL = item->url(); - TDEIO::Job * job = TDEIO::file_copy( currentURL, localURL, -1, true, - false, false /* No GUI */ ); - job->addMetaData("thumbnail","1"); - addSubjob(job); - } -} - -// KDE 4: Make it const TQString & -void PreviewJob::createThumbnail( TQString pixPath ) -{ - d->state = PreviewJobPrivate::STATE_CREATETHUMB; - KURL thumbURL; - thumbURL.setProtocol("thumbnail"); - thumbURL.setPath(pixPath); - TDEIO::TransferJob *job = TDEIO::get(thumbURL, false, false); - addSubjob(job); - connect(job, TQT_SIGNAL(data(TDEIO::Job *, const TQByteArray &)), TQT_SLOT(slotThumbData(TDEIO::Job *, const TQByteArray &))); - bool save = d->bSave && d->currentItem.plugin->property("CacheThumbnail").toBool(); - job->addMetaData("mimeType", d->currentItem.item->mimetype()); - job->addMetaData("width", TQString().setNum(save ? d->cacheWidth : d->width)); - job->addMetaData("height", TQString().setNum(save ? d->cacheHeight : d->height)); - job->addMetaData("iconSize", TQString().setNum(save ? 64 : d->iconSize)); - job->addMetaData("iconAlpha", TQString().setNum(d->iconAlpha)); - job->addMetaData("plugin", d->currentItem.plugin->library()); -#ifdef Q_OS_UNIX - if (d->shmid == -1) - { - if (d->shmaddr) { - shmdt((char*)d->shmaddr); - shmctl(d->shmid, IPC_RMID, 0); - } - d->shmid = shmget(IPC_PRIVATE, d->cacheWidth * d->cacheHeight * 4, IPC_CREAT|0600); - if (d->shmid != -1) - { - d->shmaddr = (uchar *)(shmat(d->shmid, 0, SHM_RDONLY)); - if (d->shmaddr == (uchar *)-1) - { - shmctl(d->shmid, IPC_RMID, 0); - d->shmaddr = 0; - d->shmid = -1; - } - } - else - d->shmaddr = 0; - } - if (d->shmid != -1) - job->addMetaData("shmid", TQString().setNum(d->shmid)); -#endif -} - -void PreviewJob::slotThumbData(TDEIO::Job *, const TQByteArray &data) -{ - bool save = d->bSave && - d->currentItem.plugin->property("CacheThumbnail").toBool() && - (d->currentItem.item->url().protocol() != "file" || - !d->currentItem.item->url().directory( false ).startsWith(d->thumbRoot)); - TQImage thumb; -#ifdef Q_OS_UNIX - if (d->shmaddr) - { - TQDataStream str(data, IO_ReadOnly); - int width, height, depth; - bool alpha; - str >> width >> height >> depth >> alpha; - thumb = TQImage(d->shmaddr, width, height, depth, 0, 0, TQImage::IgnoreEndian); - thumb.setAlphaBuffer(alpha); - } - else -#endif - thumb.loadFromData(data); - - if (save) - { - thumb.setText("Thumb::URI", 0, d->origName); - thumb.setText("Thumb::MTime", 0, TQString::number(d->tOrig)); - thumb.setText("Thumb::Size", 0, number(d->currentItem.item->size())); - thumb.setText("Thumb::Mimetype", 0, d->currentItem.item->mimetype()); - thumb.setText("Software", 0, "KDE Thumbnail Generator"); - KTempFile temp(d->thumbPath + "kde-tmp-", ".png"); - if (temp.status() == 0) //Only try to write out the thumbnail if we - { //actually created the temp file. - thumb.save(temp.name(), "PNG"); - rename(TQFile::encodeName(temp.name()), TQFile::encodeName(d->thumbPath + d->thumbName)); - } - } - emitPreview( thumb ); - d->succeeded = true; -} - -void PreviewJob::emitPreview(const TQImage &thumb) -{ - TQPixmap pix; - if (thumb.width() > d->width || thumb.height() > d->height) - { - double imgRatio = (double)thumb.height() / (double)thumb.width(); - if (imgRatio > (double)d->height / (double)d->width) - pix.convertFromImage( - thumb.smoothScale((int)TQMAX((double)d->height / imgRatio, 1), d->height)); - else pix.convertFromImage( - thumb.smoothScale(d->width, (int)TQMAX((double)d->width * imgRatio, 1))); - } - else pix.convertFromImage(thumb); - emit gotPreview(d->currentItem.item, pix); -} - -void PreviewJob::emitFailed(const KFileItem *item) -{ - if (!item) - item = d->currentItem.item; - emit failed(item); -} - -TQStringList PreviewJob::availablePlugins() -{ - TQStringList result; - KTrader::OfferList plugins = KTrader::self()->query("ThumbCreator"); - for (KTrader::OfferList::ConstIterator it = plugins.begin(); it != plugins.end(); ++it) - if (!result.contains((*it)->desktopEntryName())) - result.append((*it)->desktopEntryName()); - return result; -} - -TQStringList PreviewJob::supportedMimeTypes() -{ - TQStringList result; - KTrader::OfferList plugins = KTrader::self()->query("ThumbCreator"); - for (KTrader::OfferList::ConstIterator it = plugins.begin(); it != plugins.end(); ++it) - result += (*it)->property("MimeTypes").toStringList(); - return result; -} - -void PreviewJob::kill( bool quietly ) -{ - d->startPreviewTimer.stop(); - Job::kill( quietly ); -} - -PreviewJob *TDEIO::filePreview( const KFileItemList &items, int width, int height, - int iconSize, int iconAlpha, bool scale, bool save, - const TQStringList *enabledPlugins ) -{ - return new PreviewJob(items, width, height, iconSize, iconAlpha, - scale, save, enabledPlugins); -} - -PreviewJob *TDEIO::filePreview( const KURL::List &items, int width, int height, - int iconSize, int iconAlpha, bool scale, bool save, - const TQStringList *enabledPlugins ) -{ - KFileItemList fileItems; - for (KURL::List::ConstIterator it = items.begin(); it != items.end(); ++it) - fileItems.append(new KFileItem(KFileItem::Unknown, KFileItem::Unknown, *it, true)); - return new PreviewJob(fileItems, width, height, iconSize, iconAlpha, - scale, save, enabledPlugins, true); -} - -void PreviewJob::virtual_hook( int id, void* data ) -{ TDEIO::Job::virtual_hook( id, data ); } - diff --git a/kio/kio/previewjob.h b/kio/kio/previewjob.h deleted file mode 100644 index fe8e16c0f..000000000 --- a/kio/kio/previewjob.h +++ /dev/null @@ -1,182 +0,0 @@ -// -*- c++ -*- -// vim: ts=4 sw=4 et -/* This file is part of the KDE libraries - Copyright (C) 2000 David Faure - 2000 Carsten Pfeiffer - 2001 Malte Starostik - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef __kio_previewjob_h__ -#define __kio_previewjob_h__ - -#include -#include - -class TQPixmap; - -namespace TDEIO { - /*! - * This class catches a preview (thumbnail) for files. - * @short KIO Job to get a thumbnail picture - */ - class TDEIO_EXPORT PreviewJob : public TDEIO::Job - { - Q_OBJECT - public: - /** - * Creates a new PreviewJob. - * @param items a list of files to create previews for - * @param width the desired width - * @param height the desired height, 0 to use the @p width - * @param iconSize the size of the mimetype icon to overlay over the - * preview or zero to not overlay an icon. This has no effect if the - * preview plugin that will be used doesn't use icon overlays. - * @param iconAlpha transparency to use for the icon overlay - * @param scale if the image is to be scaled to the requested size or - * returned in its original size - * @param save if the image should be cached for later use - * @param enabledPlugins if non-zero, this points to a list containing - * the names of the plugins that may be used. - * @param deleteItems true to delete the items when done - */ - PreviewJob( const KFileItemList &items, int width, int height, - int iconSize, int iconAlpha, bool scale, bool save, - const TQStringList *enabledPlugins, bool deleteItems = false ); - virtual ~PreviewJob(); - - /** - * Removes an item from preview processing. Use this if you passed - * an item to filePreview and want to delete it now. - * - * @param item the item that should be removed from the preview queue - */ - void removeItem( const KFileItem *item ); - - /** - * If @p ignoreSize is true, then the preview is always - * generated regardless of the settings - * - * @since KDE 3.4 - **/ - void setIgnoreMaximumSize(bool ignoreSize = true); - - /** - * Returns a list of all available preview plugins. The list - * contains the basenames of the plugins' .desktop files (no path, - * no .desktop). - * @return the list of plugins - */ - static TQStringList availablePlugins(); - - /** - * Returns a list of all supported MIME types. The list can - * contain entries like text/ * (without the space). - * @return the list of mime types - */ - static TQStringList supportedMimeTypes(); - - /** - * Reimplemented for internal reasons - */ - virtual void kill( bool quietly = true ); - - signals: - /** - * Emitted when a thumbnail picture for @p item has been successfully - * retrieved. - * @param item the file of the preview - * @param preview the preview image - */ - void gotPreview( const KFileItem *item, const TQPixmap &preview ); - /** - * Emitted when a thumbnail for @p item could not be created, - * either because a ThumbCreator for its MIME type does not - * exist, or because something went wrong. - * @param item the file that failed - */ - void failed( const KFileItem *item ); - - protected: - void getOrCreateThumbnail(); - bool statResultThumbnail(); - void createThumbnail( TQString ); - - protected slots: - virtual void slotResult( TDEIO::Job *job ); - - private slots: - void startPreview(); - void slotThumbData(TDEIO::Job *, const TQByteArray &); - - private: - void determineNextFile(); - void emitPreview(const TQImage &thumb); - void emitFailed(const KFileItem *item = 0); - - protected: - virtual void virtual_hook( int id, void* data ); - private: - struct PreviewJobPrivate *d; - }; - - /** - * Creates a PreviewJob to generate or retrieve a preview image - * for the given URL. - * - * @param items files to get previews for - * @param width the maximum width to use - * @param height the maximum height to use, if this is 0, the same - * value as width is used. - * @param iconSize the size of the mimetype icon to overlay over the - * preview or zero to not overlay an icon. This has no effect if the - * preview plugin that will be used doesn't use icon overlays. - * @param iconAlpha transparency to use for the icon overlay - * @param scale if the image is to be scaled to the requested size or - * returned in its original size - * @param save if the image should be cached for later use - * @param enabledPlugins if non-zero, this points to a list containing - * the names of the plugins that may be used. - * @return the new PreviewJob - * @see PreviewJob::availablePlugins() - */ - TDEIO_EXPORT PreviewJob *filePreview( const KFileItemList &items, int width, int height = 0, int iconSize = 0, int iconAlpha = 70, bool scale = true, bool save = true, const TQStringList *enabledPlugins = 0 ); - - /** - * Creates a PreviewJob to generate or retrieve a preview image - * for the given URL. - * - * @param items files to get previews for - * @param width the maximum width to use - * @param height the maximum height to use, if this is 0, the same - * value as width is used. - * @param iconSize the size of the mimetype icon to overlay over the - * preview or zero to not overlay an icon. This has no effect if the - * preview plugin that will be used doesn't use icon overlays. - * @param iconAlpha transparency to use for the icon overlay - * @param scale if the image is to be scaled to the requested size or - * returned in its original size - * @param save if the image should be cached for later use - * @param enabledPlugins if non-zero, this points to a list containing - * the names of the plugins that may be used. - * @return the new PreviewJob - * @see PreviewJob::availablePlugins() - */ - TDEIO_EXPORT PreviewJob *filePreview( const KURL::List &items, int width, int height = 0, int iconSize = 0, int iconAlpha = 70, bool scale = true, bool save = true, const TQStringList *enabledPlugins = 0 ); -} - -#endif diff --git a/kio/kio/progressbase.cpp b/kio/kio/progressbase.cpp deleted file mode 100644 index 146f4182e..000000000 --- a/kio/kio/progressbase.cpp +++ /dev/null @@ -1,180 +0,0 @@ -/* This file is part of the KDE libraries - Copyright (C) 2000 Matej Koss - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License version 2 as published by the Free Software Foundation. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include "jobclasses.h" -#include "progressbase.h" - -namespace TDEIO { - -ProgressBase::ProgressBase( TQWidget *parent ) - : TQWidget( parent ) -{ - m_pJob = 0; - - // delete dialog after the job is finished / canceled - m_bOnlyClean = false; - - // stop job on close - m_bStopOnClose = true; -} - - -void ProgressBase::setJob( TDEIO::Job *job ) -{ - // first connect all slots - connect( job, TQT_SIGNAL( percent( TDEIO::Job*, unsigned long ) ), - TQT_SLOT( slotPercent( TDEIO::Job*, unsigned long ) ) ); - - connect( job, TQT_SIGNAL( result( TDEIO::Job* ) ), - TQT_SLOT( slotFinished( TDEIO::Job* ) ) ); - - connect( job, TQT_SIGNAL( canceled( TDEIO::Job* ) ), - TQT_SLOT( slotFinished( TDEIO::Job* ) ) ); - - // then assign job - m_pJob = job; -} - - -void ProgressBase::setJob( TDEIO::CopyJob *job ) -{ - // first connect all slots - connect( job, TQT_SIGNAL( totalSize( TDEIO::Job*, TDEIO::filesize_t ) ), - TQT_SLOT( slotTotalSize( TDEIO::Job*, TDEIO::filesize_t ) ) ); - connect( job, TQT_SIGNAL( totalFiles( TDEIO::Job*, unsigned long ) ), - TQT_SLOT( slotTotalFiles( TDEIO::Job*, unsigned long ) ) ); - connect( job, TQT_SIGNAL( totalDirs( TDEIO::Job*, unsigned long ) ), - TQT_SLOT( slotTotalDirs( TDEIO::Job*, unsigned long ) ) ); - - connect( job, TQT_SIGNAL( processedSize( TDEIO::Job*, TDEIO::filesize_t ) ), - TQT_SLOT( slotProcessedSize( TDEIO::Job*, TDEIO::filesize_t ) ) ); - connect( job, TQT_SIGNAL( processedFiles( TDEIO::Job*, unsigned long ) ), - TQT_SLOT( slotProcessedFiles( TDEIO::Job*, unsigned long ) ) ); - connect( job, TQT_SIGNAL( processedDirs( TDEIO::Job*, unsigned long ) ), - TQT_SLOT( slotProcessedDirs( TDEIO::Job*, unsigned long ) ) ); - - connect( job, TQT_SIGNAL( speed( TDEIO::Job*, unsigned long ) ), - TQT_SLOT( slotSpeed( TDEIO::Job*, unsigned long ) ) ); - connect( job, TQT_SIGNAL( percent( TDEIO::Job*, unsigned long ) ), - TQT_SLOT( slotPercent( TDEIO::Job*, unsigned long ) ) ); - - connect( job, TQT_SIGNAL( copying( TDEIO::Job*, const KURL& , const KURL& ) ), - TQT_SLOT( slotCopying( TDEIO::Job*, const KURL&, const KURL& ) ) ); - connect( job, TQT_SIGNAL( moving( TDEIO::Job*, const KURL& , const KURL& ) ), - TQT_SLOT( slotMoving( TDEIO::Job*, const KURL&, const KURL& ) ) ); - connect( job, TQT_SIGNAL( creatingDir( TDEIO::Job*, const KURL& ) ), - TQT_SLOT( slotCreatingDir( TDEIO::Job*, const KURL& ) ) ); - - connect( job, TQT_SIGNAL( result( TDEIO::Job* ) ), - TQT_SLOT( slotFinished( TDEIO::Job* ) ) ); - - connect( job, TQT_SIGNAL( canceled( TDEIO::Job* ) ), - TQT_SLOT( slotFinished( TDEIO::Job* ) ) ); - - // then assign job - m_pJob = job; -} - - -void ProgressBase::setJob( TDEIO::DeleteJob *job ) -{ - // first connect all slots - connect( job, TQT_SIGNAL( totalSize( TDEIO::Job*, TDEIO::filesize_t ) ), - TQT_SLOT( slotTotalSize( TDEIO::Job*, TDEIO::filesize_t ) ) ); - connect( job, TQT_SIGNAL( totalFiles( TDEIO::Job*, unsigned long ) ), - TQT_SLOT( slotTotalFiles( TDEIO::Job*, unsigned long ) ) ); - connect( job, TQT_SIGNAL( totalDirs( TDEIO::Job*, unsigned long ) ), - TQT_SLOT( slotTotalDirs( TDEIO::Job*, unsigned long ) ) ); - - connect( job, TQT_SIGNAL( processedSize( TDEIO::Job*, TDEIO::filesize_t ) ), - TQT_SLOT( slotProcessedSize( TDEIO::Job*, TDEIO::filesize_t ) ) ); - connect( job, TQT_SIGNAL( processedFiles( TDEIO::Job*, unsigned long ) ), - TQT_SLOT( slotProcessedFiles( TDEIO::Job*, unsigned long ) ) ); - connect( job, TQT_SIGNAL( processedDirs( TDEIO::Job*, unsigned long ) ), - TQT_SLOT( slotProcessedDirs( TDEIO::Job*, unsigned long ) ) ); - - connect( job, TQT_SIGNAL( speed( TDEIO::Job*, unsigned long ) ), - TQT_SLOT( slotSpeed( TDEIO::Job*, unsigned long ) ) ); - connect( job, TQT_SIGNAL( percent( TDEIO::Job*, unsigned long ) ), - TQT_SLOT( slotPercent( TDEIO::Job*, unsigned long ) ) ); - - connect( job, TQT_SIGNAL( deleting( TDEIO::Job*, const KURL& ) ), - TQT_SLOT( slotDeleting( TDEIO::Job*, const KURL& ) ) ); - - connect( job, TQT_SIGNAL( result( TDEIO::Job* ) ), - TQT_SLOT( slotFinished( TDEIO::Job* ) ) ); - - connect( job, TQT_SIGNAL( canceled( TDEIO::Job* ) ), - TQT_SLOT( slotFinished( TDEIO::Job* ) ) ); - - // then assign job - m_pJob = job; -} - - -void ProgressBase::closeEvent( TQCloseEvent* ) { - // kill job when desired - if ( m_bStopOnClose ) { - slotStop(); - } else { - // clean or delete dialog - if ( m_bOnlyClean ) { - slotClean(); - } else { - delete this; - } - } -} - -void ProgressBase::finished() { - // clean or delete dialog - if ( m_bOnlyClean ) { - slotClean(); - } else { - deleteLater(); - } -} - -void ProgressBase::slotFinished( TDEIO::Job* ) { - finished(); -} - - -void ProgressBase::slotStop() { - if ( m_pJob ) { - m_pJob->kill(); // this will call slotFinished - m_pJob = 0L; - } else { - slotFinished( 0 ); // here we call it ourselves - } - - emit stopped(); -} - - -void ProgressBase::slotClean() { - hide(); -} - -void ProgressBase::virtual_hook( int, void* ) -{ /*BASE::virtual_hook( id, data );*/ } - -} /* namespace */ - -#include "progressbase.moc" - diff --git a/kio/kio/progressbase.h b/kio/kio/progressbase.h deleted file mode 100644 index 2be545621..000000000 --- a/kio/kio/progressbase.h +++ /dev/null @@ -1,271 +0,0 @@ -/* This file is part of the KDE libraries - Copyright (C) 2000 Matej Koss - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License version 2 as published by the Free Software Foundation. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ -#ifndef __progressbase_h__ -#define __progressbase_h__ - - -#include - -#include - -class KURL; -namespace TDEIO { - class Job; - class CopyJob; - class DeleteJob; -} - -namespace TDEIO -{ - enum Progress { - DEFAULT = 1, - STATUSBAR = 2, - LIST = 3 - }; - -/** -* This class does all initialization stuff for progress, -* like connecting signals to slots. -* All slots are implemented as pure virtual methods. -* -* All custom IO progress dialog should inherit this class. -* Add your GUI code to the constructor and implemement those virtual -* methods which you need in order to display progress. -* -* E.g. StatusbarProgress only implements slotTotalSize(), -* slotPercent() and slotSpeed(). -* -* Custom progress dialog will be used like this : -* \code -* // create job -* CopyJob* job = TDEIO::copy(...); -* // create a dialog -* MyCustomProgress *customProgress; -* customProgress = new MyCustomProgress(); -* // connect progress with job -* customProgress->setJob( job ); -* ... -* \endcode -* -* There is a special method setStopOnClose() that controls the behavior of -* the dialog. -* @short Base class for IO progress dialogs. -* @author Matej Koss -*/ -class TDEIO_EXPORT ProgressBase : public TQWidget { - - Q_OBJECT - -public: - - /** - * Creates a new progress dialog. - * @param parent the parent of this dialog window, or 0 - */ - ProgressBase( TQWidget *parent ); - ~ProgressBase() {} - - /** - * Assign a TDEIO::Job to this progress dialog. - * @param job the job to assign - */ - void setJob( TDEIO::Job *job ); - /** - * Assign a TDEIO::Job to this progress dialog. - * @param job the job to assign - */ - void setJob( TDEIO::CopyJob *job ); - /** - * Assign a TDEIO::Job to this progress dialog. - * @param job the job to assign - */ - void setJob( TDEIO::DeleteJob *job ); - - // should we stop the job when the dialog is closed ? - void setStopOnClose( bool stopOnClose ) { m_bStopOnClose = stopOnClose; } - bool stopOnClose() const { return m_bStopOnClose; } - - // should we delete the dialog or just clean it when the job is finished ? - /** - * This controls whether the dialog should be deleted or only cleaned when - * the TDEIO::Job is finished (or canceled). - * - * If your dialog is an embedded widget and not a separate window, you should - * setOnlyClean(true) in the constructor of your custom dialog. - * - * @param onlyClean If true the dialog will only call method slotClean. - * If false the dialog will be deleted. - * @see onlyClean() - */ - void setOnlyClean( bool onlyClean ) { m_bOnlyClean = onlyClean; } - - /** - * Checks whether the dialog should be deleted or cleaned. - * @return true if the dialog only calls slotClean, false if it will be - * deleted - * @see setOnlyClean() - */ - bool onlyClean() const { return m_bOnlyClean; } - - /** - * Call when the operation finished. - * @since 3.1 - */ - void finished(); - -public slots: - /** - * This method should be called for correct cancellation of IO operation - * Connect this to the progress widgets buttons etc. - */ - void slotStop(); - /** - * This method is called when the widget should be cleaned (after job is finished). - * redefine this for custom behavior. - */ - virtual void slotClean(); - - // progress slots - /** - * Called to set the total size. - * @param job the TDEIO::Job - * @param size the total size in bytes - */ - virtual void slotTotalSize( TDEIO::Job* job, TDEIO::filesize_t size ) { - Q_UNUSED(job);Q_UNUSED(size);} - /** - * Called to set the total number of files. - * @param job the TDEIO::Job - * @param files the number of files - */ - virtual void slotTotalFiles( TDEIO::Job* job, unsigned long files ) { - Q_UNUSED(job);Q_UNUSED(files);} - /** - * Called to set the total number of directories. - * @param job the TDEIO::Job - * @param dirs the number of directories - */ - virtual void slotTotalDirs( TDEIO::Job* job, unsigned long dirs ) { - Q_UNUSED(job);Q_UNUSED(dirs);} - - /** - * Called to set the processed size. - * @param job the TDEIO::Job - * @param bytes the processed size in bytes - */ - virtual void slotProcessedSize( TDEIO::Job* job, TDEIO::filesize_t bytes ) { - Q_UNUSED(job);Q_UNUSED(bytes);} - /** - * Called to set the number of processed files. - * @param job the TDEIO::Job - * @param files the number of files - */ - virtual void slotProcessedFiles( TDEIO::Job* job, unsigned long files ) { - Q_UNUSED(job);Q_UNUSED(files);} - /** - * Called to set the number of processed directories. - * @param job the TDEIO::Job - * @param dirs the number of directories - */ - virtual void slotProcessedDirs( TDEIO::Job* job, unsigned long dirs ) { - Q_UNUSED(job);Q_UNUSED(dirs);} - - /** - * Called to set the speed. - * @param job the TDEIO::Job - * @param speed the speed in bytes/second - */ - virtual void slotSpeed( TDEIO::Job* job, unsigned long speed ) { - Q_UNUSED(job);Q_UNUSED(speed);} - - /** - * Called to set the percentage. - * @param job the TDEIO::Job - * @param percent the percentage - */ - virtual void slotPercent( TDEIO::Job* job, unsigned long percent ) { - Q_UNUSED(job);Q_UNUSED(percent);} - - /** - * Called when the job is copying. - * @param job the TDEIO::Job - * @param src the source of the operation - * @param dest the destination of the operation - */ - virtual void slotCopying( TDEIO::Job* job, const KURL& src, const KURL& dest ) { - Q_UNUSED(job);Q_UNUSED(src);Q_UNUSED(dest);} - /** - * Called when the job is moving. - * @param job the TDEIO::Job - * @param src the source of the operation - * @param dest the destination of the operation - */ - virtual void slotMoving( TDEIO::Job* job, const KURL& src, const KURL& dest ) { - Q_UNUSED(job);Q_UNUSED(src);Q_UNUSED(dest);} - /** - * Called when the job is deleting. - * @param job the TDEIO::Job - * @param url the URL to delete - */ - virtual void slotDeleting( TDEIO::Job* job, const KURL& url) { - Q_UNUSED(job);Q_UNUSED(url);} - /** - * Called when the job is creating a directory. - * @param job the TDEIO::Job - * @param dir the URL of the directory to create - */ - virtual void slotCreatingDir( TDEIO::Job* job, const KURL& dir ) { - Q_UNUSED(job);Q_UNUSED(dir);} - - /** - * Called when the job is resuming.. - * @param job the TDEIO::Job - * @param from the position to resume from in bytes - */ - virtual void slotCanResume( TDEIO::Job* job, TDEIO::filesize_t from) { - Q_UNUSED(job);Q_UNUSED(from);} - -signals: - /** - * Called when the operation stopped. - */ - void stopped(); - -protected slots: - void slotFinished( TDEIO::Job* ); - -protected: - - virtual void closeEvent( TQCloseEvent * ); - - TDEIO::Job* m_pJob; - -private: - bool m_bOnlyClean; - bool m_bStopOnClose; - - -protected: - virtual void virtual_hook( int id, void* data ); -private: - class ProgressBasePrivate* d; -}; - -} /* namespace */ - -#endif // __progressbase_h__ diff --git a/kio/kio/renamedlg.cpp b/kio/kio/renamedlg.cpp deleted file mode 100644 index 7bba95460..000000000 --- a/kio/kio/renamedlg.cpp +++ /dev/null @@ -1,574 +0,0 @@ -/* This file is part of the KDE libraries - Copyright (C) 2000 Stephan Kulow - David Faure - 2001 Holger Freyther - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include "kio/renamedlg.h" -#include "kio/renamedlgplugin.h" -#include -#include - -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#ifdef Q_WS_X11 -#include -#endif - -using namespace TDEIO; - -class RenameDlg::RenameDlgPrivate -{ - public: - RenameDlgPrivate(){ - bCancel = 0; - bRename = bSkip = bAutoSkip = bOverwrite = bOverwriteAll = 0; - bResume = bResumeAll = bSuggestNewName = 0; - m_pLineEdit = 0; - } - KPushButton *bCancel; - TQPushButton *bRename; - TQPushButton *bSkip; - TQPushButton *bAutoSkip; - TQPushButton *bOverwrite; - TQPushButton *bOverwriteAll; - TQPushButton *bResume; - TQPushButton *bResumeAll; - TQPushButton *bSuggestNewName; - TQLineEdit* m_pLineEdit; - KURL src; - KURL dest; - TQString mimeSrc; - TQString mimeDest; - bool modal; - bool plugin; -}; - -RenameDlg::RenameDlg(TQWidget *parent, const TQString & _caption, - const TQString &_src, const TQString &_dest, - RenameDlg_Mode _mode, - TDEIO::filesize_t sizeSrc, - TDEIO::filesize_t sizeDest, - time_t ctimeSrc, - time_t ctimeDest, - time_t mtimeSrc, - time_t mtimeDest, - bool _modal) - : TQDialog ( parent, "TDEIO::RenameDialog" , _modal ) -{ - d = new RenameDlgPrivate( ); - d->modal = _modal; -#if 0 - // Set "StaysOnTop", because this dialog is typically used in kio_uiserver, - // i.e. in a separate process. - // ####### This isn't the case anymore - remove? -#if !defined(Q_WS_QWS) && !defined(Q_WS_WIN) //FIXME(E): Implement for QT Embedded & win32 - if (d->modal) - KWin::setState( winId(), NET::StaysOnTop ); -#endif -#endif - - d->src = _src; - d->dest = _dest; - d->plugin = false; - - - setCaption( _caption ); - - d->bCancel = new KPushButton( KStdGuiItem::cancel(), this ); - connect(d->bCancel, TQT_SIGNAL(clicked()), this, TQT_SLOT(b0Pressed())); - - if ( ! (_mode & M_NORENAME ) ) { - d->bRename = new TQPushButton( i18n( "&Rename" ), this ); - d->bRename->setEnabled(false); - d->bSuggestNewName = new TQPushButton( i18n( "Suggest New &Name" ), this ); - connect(d->bSuggestNewName, TQT_SIGNAL(clicked()), this, TQT_SLOT(b8Pressed())); - connect(d->bRename, TQT_SIGNAL(clicked()), this, TQT_SLOT(b1Pressed())); - } - - if ( ( _mode & M_MULTI ) && ( _mode & M_SKIP ) ) { - d->bSkip = new TQPushButton( i18n( "&Skip" ), this ); - connect(d->bSkip, TQT_SIGNAL(clicked()), this, TQT_SLOT(b2Pressed())); - - d->bAutoSkip = new TQPushButton( i18n( "&Auto Skip" ), this ); - connect(d->bAutoSkip, TQT_SIGNAL(clicked()), this, TQT_SLOT(b3Pressed())); - } - - if ( _mode & M_OVERWRITE ) { - d->bOverwrite = new TQPushButton( i18n( "&Overwrite" ), this ); - connect(d->bOverwrite, TQT_SIGNAL(clicked()), this, TQT_SLOT(b4Pressed())); - - if ( _mode & M_MULTI ) { - d->bOverwriteAll = new TQPushButton( i18n( "O&verwrite All" ), this ); - connect(d->bOverwriteAll, TQT_SIGNAL(clicked()), this, TQT_SLOT(b5Pressed())); - } - } - - if ( _mode & M_RESUME ) { - d->bResume = new TQPushButton( i18n( "&Resume" ), this ); - connect(d->bResume, TQT_SIGNAL(clicked()), this, TQT_SLOT(b6Pressed())); - - if ( _mode & M_MULTI ) - { - d->bResumeAll = new TQPushButton( i18n( "R&esume All" ), this ); - connect(d->bResumeAll, TQT_SIGNAL(clicked()), this, TQT_SLOT(b7Pressed())); - } - } - - TQVBoxLayout* pLayout = new TQVBoxLayout( this, KDialog::marginHint(), - KDialog::spacingHint() ); - pLayout->addStrut( 360 ); // makes dlg at least that wide - - // User tries to overwrite a file with itself ? - if ( _mode & M_OVERWRITE_ITSELF ) { - TQLabel *lb = new TQLabel( i18n( "This action would overwrite '%1' with itself.\n" - "Please enter a new file name:" ).arg( KStringHandler::csqueeze( d->src.pathOrURL(),100 ) ), this ); - d->bRename->setText(i18n("C&ontinue")); - pLayout->addWidget( lb ); - } - else if ( _mode & M_OVERWRITE ) { - - // Figure out the mimetype and load one plugin - // (This is the only mode that is handled by plugins) - pluginHandling(); - KTrader::OfferList plugin_offers; - if( d->mimeSrc != KMimeType::defaultMimeType() ){ - plugin_offers = KTrader::self()->query(d->mimeSrc, "'RenameDlg/Plugin' in ServiceTypes"); - - }else if(d->mimeDest != KMimeType::defaultMimeType() ) { - plugin_offers = KTrader::self()->query(d->mimeDest, "'RenameDlg/Plugin' in ServiceTypes"); - } - if(!plugin_offers.isEmpty() ){ - kdDebug(7024) << "Offers" << endl; - KTrader::OfferList::ConstIterator it = plugin_offers.begin(); - KTrader::OfferList::ConstIterator end = plugin_offers.end(); - for( ; it != end; ++it ){ - TQString libName = (*it)->library(); - if( libName.isEmpty() ){ - kdDebug(7024) << "lib is empty" << endl; - continue; - } - KLibrary *lib = KLibLoader::self()->library(libName.local8Bit() ); - if(!lib) { - continue; - } - KLibFactory *factory = lib->factory(); - if(!factory){ - lib->unload(); - continue; - } - TQObject *obj = factory->create( TQT_TQOBJECT(this), (*it)->name().latin1() ); - if(!obj) { - lib->unload(); - continue; - } - RenameDlgPlugin *plugin = static_cast(TQT_TQWIDGET(obj)); - if(!plugin ){ - delete obj; - continue; - } - if( plugin->initialize( _mode, _src, _dest, d->mimeSrc, - d->mimeDest, sizeSrc, sizeDest, - ctimeSrc, ctimeDest, - mtimeSrc, mtimeDest ) ) { - d->plugin = true; - pLayout->addWidget(plugin ); - kdDebug(7024) << "RenameDlgPlugin" << endl; - break; - } else { - delete obj; - } - } - - } - - if( !d->plugin ){ - // No plugin found, build default dialog - TQGridLayout * gridLayout = new TQGridLayout( 0L, 9, 2, KDialog::marginHint(), - KDialog::spacingHint() ); - pLayout->addLayout(TQT_TQLAYOUT(gridLayout)); - gridLayout->setColStretch(0,0); - gridLayout->setColStretch(1,10); - - TQString sentence1; - if (mtimeDest < mtimeSrc) - sentence1 = i18n("An older item named '%1' already exists."); - else if (mtimeDest == mtimeSrc) - sentence1 = i18n("A similar file named '%1' already exists."); - else - sentence1 = i18n("A newer item named '%1' already exists."); - - TQLabel * lb1 = new KSqueezedTextLabel( sentence1.arg(d->dest.pathOrURL() ), this ); - gridLayout->addMultiCellWidget( lb1, 0, 0, 0, 1 ); // takes the complete first line - - lb1 = new TQLabel( this ); - lb1->setPixmap( KMimeType::pixmapForURL( d->dest ) ); - gridLayout->addMultiCellWidget( lb1, 1, 3, 0, 0 ); // takes the first column on rows 1-3 - - int row = 1; - if ( sizeDest != (TDEIO::filesize_t)-1 ) - { - TQLabel * lb = new TQLabel( i18n("size %1").arg( TDEIO::convertSize(sizeDest) ), this ); - gridLayout->addWidget( lb, row, 1 ); - row++; - - } - if ( ctimeDest != (time_t)-1 ) - { - TQDateTime dctime; dctime.setTime_t( ctimeDest ); - TQLabel * lb = new TQLabel( i18n("created on %1").arg( TDEGlobal::locale()->formatDateTime(dctime) ), this ); - gridLayout->addWidget( lb, row, 1 ); - row++; - } - if ( mtimeDest != (time_t)-1 ) - { - TQDateTime dmtime; dmtime.setTime_t( mtimeDest ); - TQLabel * lb = new TQLabel( i18n("modified on %1").arg( TDEGlobal::locale()->formatDateTime(dmtime) ), this ); - gridLayout->addWidget( lb, row, 1 ); - row++; - } - - if ( !d->src.isEmpty() ) - { - // rows 1 to 3 are the details (size/ctime/mtime), row 4 is empty - gridLayout->addRowSpacing( 4, 20 ); - - TQLabel * lb2 = new KSqueezedTextLabel( i18n("The source file is '%1'").arg(d->src.pathOrURL()), this ); - gridLayout->addMultiCellWidget( lb2, 5, 5, 0, 1 ); // takes the complete first line - - lb2 = new TQLabel( this ); - lb2->setPixmap( KMimeType::pixmapForURL( d->src ) ); - gridLayout->addMultiCellWidget( lb2, 6, 8, 0, 0 ); // takes the first column on rows 6-8 - - row = 6; - - if ( sizeSrc != (TDEIO::filesize_t)-1 ) - { - TQLabel * lb = new TQLabel( i18n("size %1").arg( TDEIO::convertSize(sizeSrc) ), this ); - gridLayout->addWidget( lb, row, 1 ); - row++; - } - if ( ctimeSrc != (time_t)-1 ) - { - TQDateTime dctime; dctime.setTime_t( ctimeSrc ); - TQLabel * lb = new TQLabel( i18n("created on %1").arg( TDEGlobal::locale()->formatDateTime(dctime) ), this ); - gridLayout->addWidget( lb, row, 1 ); - row++; - } - if ( mtimeSrc != (time_t)-1 ) - { - TQDateTime dmtime; dmtime.setTime_t( mtimeSrc ); - TQLabel * lb = new TQLabel( i18n("modified on %1").arg( TDEGlobal::locale()->formatDateTime(dmtime) ), this ); - gridLayout->addWidget( lb, row, 1 ); - row++; - } - } - } - } - else - { - // This is the case where we don't want to allow overwriting, the existing - // file must be preserved (e.g. when renaming). - TQString sentence1; - if (mtimeDest < mtimeSrc) - sentence1 = i18n("An older item named '%1' already exists."); - else if (mtimeDest == mtimeSrc) - sentence1 = i18n("A similar file named '%1' already exists."); - else - sentence1 = i18n("A newer item named '%1' already exists."); - - TQLabel *lb = new KSqueezedTextLabel( sentence1.arg(d->dest.pathOrURL()), this ); - pLayout->addWidget(lb); - } - TQHBoxLayout* layout2 = new TQHBoxLayout(); - pLayout->addLayout( layout2 ); - - d->m_pLineEdit = new TQLineEdit( this ); - layout2->addWidget( d->m_pLineEdit ); - TQString fileName = d->dest.fileName(); - d->m_pLineEdit->setText( TDEIO::decodeFileName( fileName ) ); - if ( d->bRename || d->bOverwrite ) - connect(d->m_pLineEdit, TQT_SIGNAL(textChanged(const TQString &)), - TQT_SLOT(enableRenameButton(const TQString &))); - if ( d->bSuggestNewName ) - { - layout2->addWidget( d->bSuggestNewName ); - setTabOrder( d->m_pLineEdit, d->bSuggestNewName ); - } - - KSeparator* separator = new KSeparator( this ); - pLayout->addWidget( separator ); - - TQHBoxLayout* layout = new TQHBoxLayout(); - pLayout->addLayout( layout ); - - layout->addStretch(1); - - if ( d->bRename ) - { - layout->addWidget( d->bRename ); - setTabOrder( d->bRename, d->bCancel ); - } - if ( d->bSkip ) - { - layout->addWidget( d->bSkip ); - setTabOrder( d->bSkip, d->bCancel ); - } - if ( d->bAutoSkip ) - { - layout->addWidget( d->bAutoSkip ); - setTabOrder( d->bAutoSkip, d->bCancel ); - } - if ( d->bOverwrite ) - { - layout->addWidget( d->bOverwrite ); - setTabOrder( d->bOverwrite, d->bCancel ); - } - if ( d->bOverwriteAll ) - { - layout->addWidget( d->bOverwriteAll ); - setTabOrder( d->bOverwriteAll, d->bCancel ); - } - if ( d->bResume ) - { - layout->addWidget( d->bResume ); - setTabOrder( d->bResume, d->bCancel ); - } - if ( d->bResumeAll ) - { - layout->addWidget( d->bResumeAll ); - setTabOrder( d->bResumeAll, d->bCancel ); - } - - d->bCancel->setDefault( true ); - layout->addWidget( d->bCancel ); - - resize( sizeHint() ); -} - -RenameDlg::~RenameDlg() -{ - delete d; - // no need to delete Pushbuttons,... qt will do this -} - -void RenameDlg::enableRenameButton(const TQString &newDest) -{ - if ( newDest != TDEIO::decodeFileName( d->dest.fileName() ) && !newDest.isEmpty() ) - { - d->bRename->setEnabled( true ); - d->bRename->setDefault( true ); - if ( d->bOverwrite ) - d->bOverwrite->setEnabled( false ); // prevent confusion (#83114) - } - else - { - d->bRename->setEnabled( false ); - if ( d->bOverwrite ) - d->bOverwrite->setEnabled( true ); - } -} - -KURL RenameDlg::newDestURL() -{ - KURL newDest( d->dest ); - TQString fileName = d->m_pLineEdit->text(); - newDest.setFileName( TDEIO::encodeFileName( fileName ) ); - return newDest; -} - -void RenameDlg::b0Pressed() -{ - done( 0 ); -} - -// Rename -void RenameDlg::b1Pressed() -{ - if ( d->m_pLineEdit->text().isEmpty() ) - return; - - KURL u = newDestURL(); - if ( !u.isValid() ) - { - KMessageBox::error( this, i18n( "Malformed URL\n%1" ).arg( u.url() ) ); - return; - } - - done( 1 ); -} - -TQString RenameDlg::suggestName(const KURL& baseURL, const TQString& oldName) -{ - TQString dotSuffix, suggestedName; - TQString basename = oldName; - - int index = basename.find( '.' ); - if ( index != -1 ) { - dotSuffix = basename.mid( index ); - basename.truncate( index ); - } - - int pos = basename.findRev( '_' ); - if(pos != -1 ){ - TQString tmp = basename.mid( pos+1 ); - bool ok; - int number = tmp.toInt( &ok ); - if ( !ok ) {// ok there is no number - suggestedName = basename + "1" + dotSuffix; - } - else { - // yes there's already a number behind the _ so increment it by one - basename.replace( pos+1, tmp.length(), TQString::number(number+1) ); - suggestedName = basename + dotSuffix; - } - } - else // no underscore yet - suggestedName = basename + "_1" + dotSuffix ; - - // Check if suggested name already exists - bool exists = false; - // TODO: network transparency. However, using NetAccess from a modal dialog - // could be a problem, no? (given that it uses a modal widget itself....) - if ( baseURL.isLocalFile() ) - exists = TQFileInfo( baseURL.path(+1) + suggestedName ).exists(); - - if ( !exists ) - return suggestedName; - else // already exists -> recurse - return suggestName( baseURL, suggestedName ); -} - -// Propose button clicked -void RenameDlg::b8Pressed() -{ - /* no name to play with */ - if ( d->m_pLineEdit->text().isEmpty() ) - return; - - KURL destDirectory( d->dest ); - destDirectory.setPath( destDirectory.directory() ); - d->m_pLineEdit->setText( suggestName( destDirectory, d->m_pLineEdit->text() ) ); - return; -} - -void RenameDlg::b2Pressed() -{ - done( 2 ); -} - -void RenameDlg::b3Pressed() -{ - done( 3 ); -} - -void RenameDlg::b4Pressed() -{ - done( 4 ); -} - -void RenameDlg::b5Pressed() -{ - done( 5 ); -} - -void RenameDlg::b6Pressed() -{ - done( 6 ); -} - -void RenameDlg::b7Pressed() -{ - done( 7 ); -} - -static TQString mime( const KURL& src ) -{ - KMimeType::Ptr type = KMimeType::findByURL( src ); - //if( type->name() == KMimeType::defaultMimeType() ){ // ok no mimetype - // TQString ty = TDEIO::NetAccess::mimetype(d->src ); - // return ty; - return type->name(); -} - -/** This will figure out the mimetypes and query for a plugin - * Loads it then and asks the plugin if it wants to do the job - * We'll take the first available mimetype - * The scanning for a mimetype will be done in 2 ways - * - */ -void RenameDlg::pluginHandling() -{ - d->mimeSrc = mime( d->src ); - d->mimeDest = mime(d->dest ); - - kdDebug(7024) << "Source Mimetype: "<< d->mimeSrc << endl; - kdDebug(7024) << "Dest Mimetype: "<< d->mimeDest << endl; -} - - -RenameDlg_Result TDEIO::open_RenameDlg( const TQString & _caption, - const TQString & _src, const TQString & _dest, - RenameDlg_Mode _mode, - TQString& _new, - TDEIO::filesize_t sizeSrc, - TDEIO::filesize_t sizeDest, - time_t ctimeSrc, - time_t ctimeDest, - time_t mtimeSrc, - time_t mtimeDest) -{ - Q_ASSERT(kapp); - - RenameDlg dlg( 0L, _caption, _src, _dest, _mode, - sizeSrc, sizeDest, ctimeSrc, ctimeDest, mtimeSrc, mtimeDest, - true /*modal*/ ); - int i = dlg.exec(); - _new = dlg.newDestURL().path(); - - return (RenameDlg_Result)i; -} - -#include "renamedlg.moc" - - - - - diff --git a/kio/kio/renamedlg.h b/kio/kio/renamedlg.h deleted file mode 100644 index 38dcac925..000000000 --- a/kio/kio/renamedlg.h +++ /dev/null @@ -1,153 +0,0 @@ -/* This file is part of the KDE libraries - Copyright (C) 2000 Stephan Kulow - David Faure - 2001 Holger Freyther - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef __kio_rename_dlg__ -#define __kio_rename_dlg__ - -#include -#include -#include -#include - -#include - -namespace TDEIO { - -// KDE4: get rid of M_OVERWRITE_ITSELF, trigger it internally if src==dest -enum RenameDlg_Mode { M_OVERWRITE = 1, M_OVERWRITE_ITSELF = 2, M_SKIP = 4, M_SINGLE = 8, M_MULTI = 16, M_RESUME = 32, M_NORENAME = 64 }; - -/** - * The result of open_RenameDlg(). - */ -enum RenameDlg_Result { R_RESUME = 6, R_RESUME_ALL = 7, R_OVERWRITE = 4, R_OVERWRITE_ALL = 5, R_SKIP = 2, R_AUTO_SKIP = 3, R_RENAME = 1, R_CANCEL = 0 }; - - -/** - * A dialog for the options to rename two files. - * @short A dialog for renaming files. - * @since 3.1 - */ -class TDEIO_EXPORT RenameDlg : public TQDialog -{ - Q_OBJECT -public: - /** - * Construct a "rename" dialog. - * @param parent parent widget (often 0) - * @param caption the caption for the dialog box - * @param src the url to the file/dir we're trying to copy, as it's part of the text message - * @param dest the path to destination file/dir, i.e. the one that already exists - * @param mode parameters for the dialog (which buttons to show...), - * @param sizeSrc size of source file - * @param sizeDest size of destination file - * @param ctimeSrc creation time of source file - * @param ctimeDest creation time of destination file - * @param mtimeSrc modification time of source file - * @param mtimeDest modification time of destination file - * @param modal set to true for a modal dialog - * @see RenameDlg_Mode - */ - RenameDlg( TQWidget *parent, const TQString & caption, - // KDE4: make those KURLs, and use pathOrURL() internally. - const TQString & src, const TQString & dest, - RenameDlg_Mode mode, - TDEIO::filesize_t sizeSrc = (TDEIO::filesize_t) -1, - TDEIO::filesize_t sizeDest = (TDEIO::filesize_t) -1, - time_t ctimeSrc = (time_t) -1, - time_t ctimeDest = (time_t) -1, - time_t mtimeSrc = (time_t) -1, - time_t mtimeDest = (time_t) -1, - bool modal = false ); - ~RenameDlg(); - - /** - * @return the new destination - * valid only if RENAME was chosen - */ - KURL newDestURL(); - - /** - * Given a directory path and a filename (which usually exists already), - * this function returns a suggested name for a file that doesn't exist - * in that directory. The existence is only checked for local urls though. - * The suggested file name is of the form foo_1 foo_2 etc. - * @since 3.4 - */ - static TQString suggestName(const KURL& baseURL, const TQString& oldName); - -public slots: - /// KDE4: rename to cancelPressed(), renamePressed() etc. - void b0Pressed(); - void b1Pressed(); - void b2Pressed(); - void b3Pressed(); - void b4Pressed(); - void b5Pressed(); - void b6Pressed(); - void b7Pressed(); - void b8Pressed(); - -protected slots: - void enableRenameButton(const TQString &); -private: - class RenameDlgPrivate; - RenameDlgPrivate *d; - void pluginHandling( ); -}; - - /** - * \addtogroup renamedlg "RenameDlg related Functions" - * @{ - * \relates TDEIO::RenameDlg - * Construct a modal, parent-less "rename" dialog, and return - * a result code, as well as the new dest. Much easier to use than the - * class RenameDlg directly. - - * @param caption the caption for the dialog box - * @param src the URL of the file/dir we're trying to copy, as it's part of the text message - * @param dest the URL of the destination file/dir, i.e. the one that already exists - * @param mode parameters for the dialog (which buttons to show...), - * see RenameDlg_Mode - * @param newDest the new destination path, valid if R_RENAME was returned. - * @param sizeSrc size of source file - * @param sizeDest size of destination file - * @param ctimeSrc creation time of source file - * @param ctimeDest creation time of destination file - * @param mtimeSrc modification time of source file - * @param mtimeDest modification time of destination file - * @return the result - */ -TDEIO_EXPORT RenameDlg_Result open_RenameDlg( const TQString & caption, - // KDE4: make those KURLs - const TQString& src, const TQString & dest, - RenameDlg_Mode mode, TQString& newDestPath, - TDEIO::filesize_t sizeSrc = (TDEIO::filesize_t) -1, - TDEIO::filesize_t sizeDest = (TDEIO::filesize_t) -1, - time_t ctimeSrc = (time_t) -1, - time_t ctimeDest = (time_t) -1, - time_t mtimeSrc = (time_t) -1, - time_t mtimeDest = (time_t) -1 - ); - -/*! @} */ - -} -#endif diff --git a/kio/kio/renamedlgplugin.h b/kio/kio/renamedlgplugin.h deleted file mode 100644 index b3604b084..000000000 --- a/kio/kio/renamedlgplugin.h +++ /dev/null @@ -1,59 +0,0 @@ -/* This file is part of the KDE libraries - Copyright (C) 2001 Holger Freyther - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef renamedlgplugin_h -#define renamedlgplugin_h - -#include -#include -#include -#include -#include - -/** - * This is the base class for all RenameDlg plugins. - * @short Base class for RenameDlg plugins. - * @since 3.1 - */ -class TDEIO_EXPORT RenameDlgPlugin : public TQWidget -{ -public: - /** - * This is the c'tor. - */ - RenameDlgPlugin(TQDialog *dialog, const char *name, const TQStringList &/*list*/ = TQStringList() ): TQWidget(dialog, name ) {}; - - /** - * This function will be called by RenameDlg. The params are infos about the files. - * @return If the plugin want's to display it return true, if not return false - */ - virtual bool initialize(TDEIO::RenameDlg_Mode /*mod*/ , const TQString &/*_src*/, const TQString &/*_dest*/, - const TQString &/*mimeSrc*/, - const TQString &/*mimeDest*/, - TDEIO::filesize_t /*sizeSrc*/, - TDEIO::filesize_t /*sizeDest*/, - time_t /*ctimeSrc*/, - time_t /*ctimeDest*/, - time_t /*mtimeSrc*/, - time_t /*mtimeDest*/ ) {return false;}; - -}; - -#endif - diff --git a/kio/kio/scheduler.cpp b/kio/kio/scheduler.cpp deleted file mode 100644 index 09560cb8b..000000000 --- a/kio/kio/scheduler.cpp +++ /dev/null @@ -1,922 +0,0 @@ -/* This file is part of the KDE libraries - Copyright (C) 2000 Stephan Kulow - Waldo Bastian - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License version 2 as published by the Free Software Foundation. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include "kio/sessiondata.h" -#include "kio/slaveconfig.h" -#include "kio/scheduler.h" -#include "kio/authinfo.h" -#include "kio/slave.h" -#include -#include - -#include - -#include -#include -#include -#include -#include -#include -#include - - -// Slaves may be idle for MAX_SLAVE_IDLE time before they are being returned -// to the system wide slave pool. (3 minutes) -#define MAX_SLAVE_IDLE (3*60) - -using namespace TDEIO; - -template class TQDict; - -Scheduler *Scheduler::instance = 0; - -class TDEIO::SlaveList: public TQPtrList -{ - public: - SlaveList() { } -}; - -// -// There are two kinds of protocol: -// (1) The protocol of the url -// (2) The actual protocol that the io-slave uses. -// -// These two often match, but not necasserily. Most notably, they don't -// match when doing ftp via a proxy. -// In that case (1) is ftp, but (2) is http. -// -// JobData::protocol stores (2) while Job::url().protocol() returns (1). -// The ProtocolInfoDict is indexed with (2). -// -// We schedule slaves based on (2) but tell the slave about (1) via -// Slave::setProtocol(). - -class TDEIO::Scheduler::JobData -{ -public: - JobData() : checkOnHold(false) { } - -public: - TQString protocol; - TQString proxy; - bool checkOnHold; -}; - -class TDEIO::Scheduler::ExtraJobData: public TQPtrDict -{ -public: - ExtraJobData() { setAutoDelete(true); } -}; - -class TDEIO::Scheduler::ProtocolInfo -{ -public: - ProtocolInfo() : maxSlaves(1), skipCount(0) - { - joblist.setAutoDelete(false); - } - - TQPtrList joblist; - SlaveList activeSlaves; - int maxSlaves; - int skipCount; - TQString protocol; -}; - -class TDEIO::Scheduler::ProtocolInfoDict : public TQDict -{ - public: - ProtocolInfoDict() { } - - TDEIO::Scheduler::ProtocolInfo *get( const TQString &protocol); -}; - -TDEIO::Scheduler::ProtocolInfo * -TDEIO::Scheduler::ProtocolInfoDict::get(const TQString &protocol) -{ - ProtocolInfo *info = find(protocol); - if (!info) - { - info = new ProtocolInfo; - info->protocol = protocol; - info->maxSlaves = KProtocolInfo::maxSlaves( protocol ); - - insert(protocol, info); - } - return info; -} - - -Scheduler::Scheduler() - : DCOPObject( "TDEIO::Scheduler" ), - TQObject(kapp, "scheduler"), - slaveTimer(0, "Scheduler::slaveTimer"), - coSlaveTimer(0, "Scheduler::coSlaveTimer"), - cleanupTimer(0, "Scheduler::cleanupTimer") -{ - checkOnHold = true; // !! Always check with KLauncher for the first request. - slaveOnHold = 0; - protInfoDict = new ProtocolInfoDict; - slaveList = new SlaveList; - idleSlaves = new SlaveList; - coIdleSlaves = new SlaveList; - extraJobData = new ExtraJobData; - sessionData = new SessionData; - slaveConfig = SlaveConfig::self(); - connect(&slaveTimer, TQT_SIGNAL(timeout()), TQT_SLOT(startStep())); - connect(&coSlaveTimer, TQT_SIGNAL(timeout()), TQT_SLOT(slotScheduleCoSlave())); - connect(&cleanupTimer, TQT_SIGNAL(timeout()), TQT_SLOT(slotCleanIdleSlaves())); - busy = false; -} - -Scheduler::~Scheduler() -{ - protInfoDict->setAutoDelete(true); - delete protInfoDict; protInfoDict = 0; - delete idleSlaves; idleSlaves = 0; - delete coIdleSlaves; coIdleSlaves = 0; - slaveList->setAutoDelete(true); - delete slaveList; slaveList = 0; - delete extraJobData; extraJobData = 0; - delete sessionData; sessionData = 0; - instance = 0; -} - -void -Scheduler::debug_info() -{ -} - -bool Scheduler::process(const TQCString &fun, const TQByteArray &data, TQCString &replyType, TQByteArray &replyData ) -{ - if ( fun != "reparseSlaveConfiguration(TQString)" ) - return DCOPObject::process( fun, data, replyType, replyData ); - - slaveConfig = SlaveConfig::self(); - replyType = "void"; - TQDataStream stream( data, IO_ReadOnly ); - TQString proto; - stream >> proto; - - kdDebug( 7006 ) << "reparseConfiguration( " << proto << " )" << endl; - KProtocolManager::reparseConfiguration(); - slaveConfig->reset(); - sessionData->reset(); - NetRC::self()->reload(); - - Slave *slave = slaveList->first(); - for (; slave; slave = slaveList->next() ) - if ( slave->slaveProtocol() == proto || proto.isEmpty() ) - { - slave->send( CMD_REPARSECONFIGURATION ); - slave->resetHost(); - } - return true; -} - -QCStringList Scheduler::functions() -{ - QCStringList funcs = DCOPObject::functions(); - funcs << "void reparseSlaveConfiguration(TQString)"; - return funcs; -} - -void Scheduler::_doJob(SimpleJob *job) { - JobData *jobData = new JobData; - jobData->protocol = KProtocolManager::slaveProtocol(job->url(), jobData->proxy); -// kdDebug(7006) << "Scheduler::_doJob protocol=" << jobData->protocol << endl; - if (job->command() == CMD_GET) - { - jobData->checkOnHold = checkOnHold; - checkOnHold = false; - } - extraJobData->replace(job, jobData); - newJobs.append(job); - slaveTimer.start(0, true); -#ifndef NDEBUG - if (newJobs.count() > 150) - kdDebug() << "WARNING - TDEIO::Scheduler got more than 150 jobs! This shows a misuse in your app (yes, a job is a TQObject)." << endl; -#endif -} - -void Scheduler::_scheduleJob(SimpleJob *job) { - newJobs.removeRef(job); - JobData *jobData = extraJobData->find(job); - if (!jobData) -{ - kdFatal(7006) << "BUG! _ScheduleJob(): No extraJobData for job!" << endl; - return; -} - TQString protocol = jobData->protocol; -// kdDebug(7006) << "Scheduler::_scheduleJob protocol=" << protocol << endl; - ProtocolInfo *protInfo = protInfoDict->get(protocol); - protInfo->joblist.append(job); - - slaveTimer.start(0, true); -} - -void Scheduler::_cancelJob(SimpleJob *job) { -// kdDebug(7006) << "Scheduler: canceling job " << job << endl; - Slave *slave = job->slave(); - if ( !slave ) - { - // was not yet running (don't call this on a finished job!) - JobData *jobData = extraJobData->find(job); - if (!jobData) - return; // I said: "Don't call this on a finished job!" - - newJobs.removeRef(job); - ProtocolInfo *protInfo = protInfoDict->get(jobData->protocol); - protInfo->joblist.removeRef(job); - - // Search all slaves to see if job is in the queue of a coSlave - slave = slaveList->first(); - for(; slave; slave = slaveList->next()) - { - JobList *list = coSlaves.find(slave); - if (list && list->removeRef(job)) - break; // Job was found and removed. - // Fall through to kill the slave as well! - } - if (!slave) - { - extraJobData->remove(job); - return; // Job was not yet running and not in a coSlave queue. - } - } - kdDebug(7006) << "Scheduler: killing slave " << slave->slave_pid() << endl; - slave->kill(); - _jobFinished( job, slave ); - slotSlaveDied( slave); -} - -void Scheduler::startStep() -{ - while(newJobs.count()) - { - (void) startJobDirect(); - } - TQDictIterator it(*protInfoDict); - while(it.current()) - { - if (startJobScheduled(it.current())) return; - ++it; - } -} - -void Scheduler::setupSlave(TDEIO::Slave *slave, const KURL &url, const TQString &protocol, const TQString &proxy , bool newSlave, const TDEIO::MetaData *config) -{ - TQString host = url.host(); - int port = url.port(); - TQString user = url.user(); - TQString passwd = url.pass(); - - if ((newSlave) || - (slave->host() != host) || - (slave->port() != port) || - (slave->user() != user) || - (slave->passwd() != passwd)) - { - slaveConfig = SlaveConfig::self(); - - MetaData configData = slaveConfig->configData(protocol, host); - sessionData->configDataFor( configData, protocol, host ); - - configData["UseProxy"] = proxy; - - TQString autoLogin = configData["EnableAutoLogin"].lower(); - if ( autoLogin == "true" ) - { - NetRC::AutoLogin l; - l.login = user; - bool usern = (protocol == "ftp"); - if ( NetRC::self()->lookup( url, l, usern) ) - { - configData["autoLoginUser"] = l.login; - configData["autoLoginPass"] = l.password; - if ( usern ) - { - TQString macdef; - TQMap::ConstIterator it = l.macdef.begin(); - for ( ; it != l.macdef.end(); ++it ) - macdef += it.key() + '\\' + it.data().join( "\\" ) + '\n'; - configData["autoLoginMacro"] = macdef; - } - } - } - if (config) - configData += *config; - slave->setConfig(configData); - slave->setProtocol(url.protocol()); - slave->setHost(host, port, user, passwd); - } -} - -bool Scheduler::startJobScheduled(ProtocolInfo *protInfo) -{ - if (protInfo->joblist.isEmpty()) - return false; - -// kdDebug(7006) << "Scheduling job" << endl; - debug_info(); - bool newSlave = false; - - SimpleJob *job = 0; - Slave *slave = 0; - - if (protInfo->skipCount > 2) - { - bool dummy; - // Prevent starvation. We skip the first entry in the queue at most - // 2 times in a row. The - protInfo->skipCount = 0; - job = protInfo->joblist.at(0); - slave = findIdleSlave(protInfo, job, dummy ); - } - else - { - bool exact=false; - SimpleJob *firstJob = 0; - Slave *firstSlave = 0; - for(uint i = 0; (i < protInfo->joblist.count()) && (i < 10); i++) - { - job = protInfo->joblist.at(i); - slave = findIdleSlave(protInfo, job, exact); - if (!firstSlave) - { - firstJob = job; - firstSlave = slave; - } - if (!slave) break; - if (exact) break; - } - - if (!exact) - { - slave = firstSlave; - job = firstJob; - } - if (job == firstJob) - protInfo->skipCount = 0; - else - protInfo->skipCount++; - } - - if (!slave) - { - if ( protInfo->maxSlaves > static_cast(protInfo->activeSlaves.count()) ) - { - newSlave = true; - slave = createSlave(protInfo, job, job->url()); - if (!slave) - slaveTimer.start(0, true); - } - } - - if (!slave) - { -// kdDebug(7006) << "No slaves available" << endl; -// kdDebug(7006) << " -- active: " << protInfo->activeSlaves.count() << endl; - return false; - } - - protInfo->activeSlaves.append(slave); - idleSlaves->removeRef(slave); - protInfo->joblist.removeRef(job); -// kdDebug(7006) << "scheduler: job started " << job << endl; - - - JobData *jobData = extraJobData->find(job); - setupSlave(slave, job->url(), jobData->protocol, jobData->proxy, newSlave); - job->start(slave); - - slaveTimer.start(0, true); - return true; -} - -bool Scheduler::startJobDirect() -{ - debug_info(); - SimpleJob *job = newJobs.take(0); - JobData *jobData = extraJobData->find(job); - if (!jobData) - { - kdFatal(7006) << "BUG! startjobDirect(): No extraJobData for job!" - << endl; - return false; - } - TQString protocol = jobData->protocol; - ProtocolInfo *protInfo = protInfoDict->get(protocol); - - bool newSlave = false; - bool dummy; - - // Look for matching slave - Slave *slave = findIdleSlave(protInfo, job, dummy); - - if (!slave) - { - newSlave = true; - slave = createSlave(protInfo, job, job->url()); - } - - if (!slave) - return false; - - idleSlaves->removeRef(slave); -// kdDebug(7006) << "scheduler: job started " << job << endl; - - setupSlave(slave, job->url(), protocol, jobData->proxy, newSlave); - job->start(slave); - return true; -} - -static Slave *searchIdleList(SlaveList *idleSlaves, const KURL &url, const TQString &protocol, bool &exact) -{ - TQString host = url.host(); - int port = url.port(); - TQString user = url.user(); - exact = true; - - for( Slave *slave = idleSlaves->first(); - slave; - slave = idleSlaves->next()) - { - if ((protocol == slave->slaveProtocol()) && - (host == slave->host()) && - (port == slave->port()) && - (user == slave->user())) - return slave; - } - - exact = false; - - // Look for slightly matching slave - for( Slave *slave = idleSlaves->first(); - slave; - slave = idleSlaves->next()) - { - if (protocol == slave->slaveProtocol()) - return slave; - } - return 0; -} - -Slave *Scheduler::findIdleSlave(ProtocolInfo *, SimpleJob *job, bool &exact) -{ - Slave *slave = 0; - JobData *jobData = extraJobData->find(job); - if (!jobData) - { - kdFatal(7006) << "BUG! findIdleSlave(): No extraJobData for job!" << endl; - return 0; - } - if (jobData->checkOnHold) - { - slave = Slave::holdSlave(jobData->protocol, job->url()); - if (slave) - return slave; - } - if (slaveOnHold) - { - // Make sure that the job wants to do a GET or a POST, and with no offset - bool bCanReuse = (job->command() == CMD_GET); - TDEIO::TransferJob * tJob = dynamic_cast(job); - if ( tJob ) - { - bCanReuse = (job->command() == CMD_GET || job->command() == CMD_SPECIAL); - if ( bCanReuse ) - { - TDEIO::MetaData outgoing = tJob->outgoingMetaData(); - TQString resume = (!outgoing.contains("resume")) ? TQString() : outgoing["resume"]; - kdDebug(7006) << "Resume metadata is '" << resume << "'" << endl; - bCanReuse = (resume.isEmpty() || resume == "0"); - } - } -// kdDebug(7006) << "bCanReuse = " << bCanReuse << endl; - if (bCanReuse) - { - if (job->url() == urlOnHold) - { - kdDebug(7006) << "HOLD: Reusing held slave for " << urlOnHold.prettyURL() << endl; - slave = slaveOnHold; - } - else - { - kdDebug(7006) << "HOLD: Discarding held slave (" << urlOnHold.prettyURL() << ")" << endl; - slaveOnHold->kill(); - } - slaveOnHold = 0; - urlOnHold = KURL(); - } - if (slave) - return slave; - } - - return searchIdleList(idleSlaves, job->url(), jobData->protocol, exact); -} - -Slave *Scheduler::createSlave(ProtocolInfo *protInfo, SimpleJob *job, const KURL &url) -{ - int error; - TQString errortext; - Slave *slave = Slave::createSlave(protInfo->protocol, url, error, errortext); - if (slave) - { - slaveList->append(slave); - idleSlaves->append(slave); - connect(slave, TQT_SIGNAL(slaveDied(TDEIO::Slave *)), - TQT_SLOT(slotSlaveDied(TDEIO::Slave *))); - connect(slave, TQT_SIGNAL(slaveStatus(pid_t,const TQCString &,const TQString &, bool)), - TQT_SLOT(slotSlaveStatus(pid_t,const TQCString &, const TQString &, bool))); - - connect(slave,TQT_SIGNAL(authorizationKey(const TQCString&, const TQCString&, bool)), - sessionData,TQT_SLOT(slotAuthData(const TQCString&, const TQCString&, bool))); - connect(slave,TQT_SIGNAL(delAuthorization(const TQCString&)), sessionData, - TQT_SLOT(slotDelAuthData(const TQCString&))); - } - else - { - kdError() <<": couldn't create slave : " << errortext << endl; - if (job) - { - protInfo->joblist.removeRef(job); - extraJobData->remove(job); - job->slotError( error, errortext ); - } - } - return slave; -} - -void Scheduler::slotSlaveStatus(pid_t, const TQCString &, const TQString &, bool) -{ -} - -void Scheduler::_jobFinished(SimpleJob *job, Slave *slave) -{ - JobData *jobData = extraJobData->take(job); - if (!jobData) - { - kdFatal(7006) << "BUG! _jobFinished(): No extraJobData for job!" << endl; - return; - } - ProtocolInfo *protInfo = protInfoDict->get(jobData->protocol); - delete jobData; - slave->disconnect(job); - protInfo->activeSlaves.removeRef(slave); - if (slave->isAlive()) - { - JobList *list = coSlaves.find(slave); - if (list) - { - assert(slave->isConnected()); - assert(!coIdleSlaves->contains(slave)); - coIdleSlaves->append(slave); - if (!list->isEmpty()) - coSlaveTimer.start(0, true); - return; - } - else - { - assert(!slave->isConnected()); - idleSlaves->append(slave); - slave->setIdle(); - _scheduleCleanup(); -// slave->send( CMD_SLAVE_STATUS ); - } - } - if (protInfo->joblist.count()) - { - slaveTimer.start(0, true); - } -} - -void Scheduler::slotSlaveDied(TDEIO::Slave *slave) -{ - assert(!slave->isAlive()); - ProtocolInfo *protInfo = protInfoDict->get(slave->slaveProtocol()); - protInfo->activeSlaves.removeRef(slave); - if (slave == slaveOnHold) - { - slaveOnHold = 0; - urlOnHold = KURL(); - } - idleSlaves->removeRef(slave); - JobList *list = coSlaves.find(slave); - if (list) - { - // coSlave dies, kill jobs waiting in queue - disconnectSlave(slave); - } - - if (!slaveList->removeRef(slave)) - kdDebug(7006) << "Scheduler: BUG!! Slave " << slave << "/" << slave->slave_pid() << " died, but is NOT in slaveList!!!\n" << endl; - else - slave->deref(); // Delete slave -} - -void Scheduler::slotCleanIdleSlaves() -{ - for(Slave *slave = idleSlaves->first();slave;) - { - if (slave->idleTime() >= MAX_SLAVE_IDLE) - { - // kdDebug(7006) << "Removing idle slave: " << slave->slaveProtocol() << " " << slave->host() << endl; - Slave *removeSlave = slave; - slave = idleSlaves->next(); - idleSlaves->removeRef(removeSlave); - slaveList->removeRef(removeSlave); - removeSlave->connection()->close(); - removeSlave->deref(); - } - else - { - slave = idleSlaves->next(); - } - } - _scheduleCleanup(); -} - -void Scheduler::_scheduleCleanup() -{ - if (idleSlaves->count()) - { - if (!cleanupTimer.isActive()) - cleanupTimer.start( MAX_SLAVE_IDLE*1000, true ); - } -} - -void Scheduler::_putSlaveOnHold(TDEIO::SimpleJob *job, const KURL &url) -{ - Slave *slave = job->slave(); - slave->disconnect(job); - - if (slaveOnHold) - { - slaveOnHold->kill(); - } - slaveOnHold = slave; - urlOnHold = url; - slaveOnHold->suspend(); -} - -void Scheduler::_publishSlaveOnHold() -{ - if (!slaveOnHold) - return; - - slaveOnHold->hold(urlOnHold); -} - -void Scheduler::_removeSlaveOnHold() -{ - if (slaveOnHold) - { - slaveOnHold->kill(); - } - slaveOnHold = 0; - urlOnHold = KURL(); -} - -Slave * -Scheduler::_getConnectedSlave(const KURL &url, const TDEIO::MetaData &config ) -{ - TQString proxy; - TQString protocol = KProtocolManager::slaveProtocol(url, proxy); - bool dummy; - Slave *slave = searchIdleList(idleSlaves, url, protocol, dummy); - if (!slave) - { - ProtocolInfo *protInfo = protInfoDict->get(protocol); - slave = createSlave(protInfo, 0, url); - } - if (!slave) - return 0; // Error - idleSlaves->removeRef(slave); - - setupSlave(slave, url, protocol, proxy, true, &config); - - slave->send( CMD_CONNECT ); - connect(slave, TQT_SIGNAL(connected()), - TQT_SLOT(slotSlaveConnected())); - connect(slave, TQT_SIGNAL(error(int, const TQString &)), - TQT_SLOT(slotSlaveError(int, const TQString &))); - - coSlaves.insert(slave, new TQPtrList()); -// kdDebug(7006) << "_getConnectedSlave( " << slave << ")" << endl; - return slave; -} - -void -Scheduler::slotScheduleCoSlave() -{ - Slave *nextSlave; - slaveConfig = SlaveConfig::self(); - for(Slave *slave = coIdleSlaves->first(); - slave; - slave = nextSlave) - { - nextSlave = coIdleSlaves->next(); - JobList *list = coSlaves.find(slave); - assert(list); - if (list && !list->isEmpty()) - { - SimpleJob *job = list->take(0); - coIdleSlaves->removeRef(slave); -// kdDebug(7006) << "scheduler: job started " << job << endl; - - assert(!coIdleSlaves->contains(slave)); - - KURL url =job->url(); - TQString host = url.host(); - int port = url.port(); - - if (slave->host() == "") - { - TQString user = url.user(); - TQString passwd = url.pass(); - - MetaData configData = slaveConfig->configData(url.protocol(), url.host()); - slave->setConfig(configData); - slave->setProtocol(url.protocol()); - slave->setHost(host, port, user, passwd); - } - - assert(slave->protocol() == url.protocol()); - assert(slave->host() == host); - assert(slave->port() == port); - job->start(slave); - } - } -} - -void -Scheduler::slotSlaveConnected() -{ - Slave *slave = (Slave *)sender(); -// kdDebug(7006) << "slotSlaveConnected( " << slave << ")" << endl; - slave->setConnected(true); - disconnect(slave, TQT_SIGNAL(connected()), - this, TQT_SLOT(slotSlaveConnected())); - emit slaveConnected(slave); - assert(!coIdleSlaves->contains(slave)); - coIdleSlaves->append(slave); - coSlaveTimer.start(0, true); -} - -void -Scheduler::slotSlaveError(int errorNr, const TQString &errorMsg) -{ - Slave *slave = (Slave *)sender(); - if (!slave->isConnected() || (coIdleSlaves->find(slave) != -1)) - { - // Only forward to application if slave is idle or still connecting. - emit slaveError(slave, errorNr, errorMsg); - } -} - -bool -Scheduler::_assignJobToSlave(TDEIO::Slave *slave, SimpleJob *job) -{ -// kdDebug(7006) << "_assignJobToSlave( " << job << ", " << slave << ")" << endl; - TQString dummy; - if ((slave->slaveProtocol() != KProtocolManager::slaveProtocol( job->url(), dummy )) - || - (!newJobs.removeRef(job))) - { - kdDebug(7006) << "_assignJobToSlave(): ERROR, nonmatching or unknown job." << endl; - job->kill(); - return false; - } - - JobList *list = coSlaves.find(slave); - assert(list); - if (!list) - { - kdDebug(7006) << "_assignJobToSlave(): ERROR, unknown slave." << endl; - job->kill(); - return false; - } - - assert(list->contains(job) == 0); - list->append(job); - coSlaveTimer.start(0, true); // Start job on timer event - - return true; -} - -bool -Scheduler::_disconnectSlave(TDEIO::Slave *slave) -{ -// kdDebug(7006) << "_disconnectSlave( " << slave << ")" << endl; - JobList *list = coSlaves.take(slave); - assert(list); - if (!list) - return false; - // Kill jobs still in queue. - while(!list->isEmpty()) - { - Job *job = list->take(0); - job->kill(); - } - delete list; - coIdleSlaves->removeRef(slave); - assert(!coIdleSlaves->contains(slave)); - disconnect(slave, TQT_SIGNAL(connected()), - this, TQT_SLOT(slotSlaveConnected())); - disconnect(slave, TQT_SIGNAL(error(int, const TQString &)), - this, TQT_SLOT(slotSlaveError(int, const TQString &))); - if (slave->isAlive()) - { - idleSlaves->append(slave); - slave->send( CMD_DISCONNECT ); - slave->setIdle(); - slave->setConnected(false); - _scheduleCleanup(); - } - return true; -} - -void -Scheduler::_checkSlaveOnHold(bool b) -{ - checkOnHold = b; -} - -void -Scheduler::_registerWindow(TQWidget *wid) -{ - if (!wid) - return; - - TQObject *obj = TQT_TQOBJECT(wid); - if (!m_windowList.contains(obj)) - { - // We must store the window Id because by the time - // the destroyed signal is emitted we can no longer - // access TQWidget::winId() (already destructed) - WId windowId = wid->winId(); - m_windowList.insert(obj, windowId); - connect(TQT_TQOBJECT(wid), TQT_SIGNAL(destroyed(TQObject *)), - this, TQT_SLOT(slotUnregisterWindow(TQObject*))); - TQByteArray params; - TQDataStream stream(params, IO_WriteOnly); - stream << windowId; - if( !kapp->dcopClient()->send( "kded", "kded", - "registerWindowId(long int)", params ) ) - kdDebug(7006) << "Could not register window with kded!" << endl; - } -} - -void -Scheduler::slotUnregisterWindow(TQObject *obj) -{ - if (!obj) - return; - - TQMap::Iterator it = m_windowList.find(obj); - if (it == m_windowList.end()) - return; - WId windowId = it.data(); - disconnect( it.key(), TQT_SIGNAL(destroyed(TQObject *)), - this, TQT_SLOT(slotUnregisterWindow(TQObject*))); - m_windowList.remove( it ); - if (kapp) - { - TQByteArray params; - TQDataStream stream(params, IO_WriteOnly); - stream << windowId; - kapp->dcopClient()->send( "kded", "kded", - "unregisterWindowId(long int)", params ); - } -} - -Scheduler* Scheduler::self() { - if ( !instance ) { - instance = new Scheduler; - } - return instance; -} - -void Scheduler::virtual_hook( int id, void* data ) -{ DCOPObject::virtual_hook( id, data ); } - - - -#include "scheduler.moc" diff --git a/kio/kio/scheduler.h b/kio/kio/scheduler.h deleted file mode 100644 index ac0764dc4..000000000 --- a/kio/kio/scheduler.h +++ /dev/null @@ -1,364 +0,0 @@ -// -*- c++ -*- -/* This file is part of the KDE libraries - Copyright (C) 2000 Stephan Kulow - Waldo Bastian - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef _kio_scheduler_h -#define _kio_scheduler_h - -#include "kio/job.h" -#include "kio/jobclasses.h" -#include -#include -#include - -#include - -namespace TDEIO { - - class Slave; - class SlaveList; - class SlaveConfig; - class SessionData; - - /** - * The TDEIO::Scheduler manages io-slaves for the application. - * It also queues jobs and assigns the job to a slave when one - * becomes available. - * - * There are 3 possible ways for a job to get a slave: - * - *

1. Direct

- * This is the default. When you create a job the - * TDEIO::Scheduler will be notified and will find either an existing - * slave that is idle or it will create a new slave for the job. - * - * Example: - * \code - * TransferJob *job = TDEIO::get(KURL("http://www.kde.org")); - * \endcode - * - * - *

2. Scheduled

- * If you create a lot of jobs, you might want not want to have a - * slave for each job. If you schedule a job, a maximum number - * of slaves will be created. When more jobs arrive, they will be - * queued. When a slave is finished with a job, it will be assigned - * a job from the queue. - * - * Example: - * \code - * TransferJob *job = TDEIO::get(KURL("http://www.kde.org")); - * TDEIO::Scheduler::scheduleJob(job); - * \endcode - * - *

3. Connection Oriented

- * For some operations it is important that multiple jobs use - * the same connection. This can only be ensured if all these jobs - * use the same slave. - * - * You can ask the scheduler to open a slave for connection oriented - * operations. You can then use the scheduler to assign jobs to this - * slave. The jobs will be queued and the slave will handle these jobs - * one after the other. - * - * Example: - * \code - * Slave *slave = TDEIO::Scheduler::getConnectedSlave( - * KURL("pop3://bastian:password@mail.kde.org")); - * TransferJob *job1 = TDEIO::get( - * KURL("pop3://bastian:password@mail.kde.org/msg1")); - * TDEIO::Scheduler::assignJobToSlave(slave, job1); - * TransferJob *job2 = TDEIO::get( - * KURL("pop3://bastian:password@mail.kde.org/msg2")); - * TDEIO::Scheduler::assignJobToSlave(slave, job2); - * TransferJob *job3 = TDEIO::get( - * KURL("pop3://bastian:password@mail.kde.org/msg3")); - * TDEIO::Scheduler::assignJobToSlave(slave, job3); - * - * // ... Wait for jobs to finish... - * - * TDEIO::Scheduler::disconnectSlave(slave); - * \endcode - * - * Note that you need to explicitly disconnect the slave when the - * connection goes down, so your error handler should contain: - * \code - * if (error == TDEIO::ERR_CONNECTION_BROKEN) - * TDEIO::Scheduler::disconnectSlave(slave); - * \endcode - * - * @see TDEIO::Slave - * @see TDEIO::Job - **/ - - class TDEIO_EXPORT Scheduler : public TQObject, virtual public DCOPObject { - Q_OBJECT - - public: - typedef TQPtrList JobList; - - // InfoDict needs Info, so we can't declare it private - class ProtocolInfo; - class JobData; - - ~Scheduler(); - - /** - * Register @p job with the scheduler. - * The default is to create a new slave for the job if no slave - * is available. This can be changed by calling scheduleJob. - * @param job the job to register - */ - static void doJob(SimpleJob *job) - { self()->_doJob(job); } - - /** - * Calling ths function makes that @p job gets scheduled for later - * execution, if multiple jobs are registered it might wait for - * other jobs to finish. - * @param job the job to schedule - */ - static void scheduleJob(SimpleJob *job) - { self()->_scheduleJob(job); } - - /** - * Stop the execution of a job. - * @param job the job to cancel - */ - static void cancelJob(SimpleJob *job) - { self()->_cancelJob(job); } - - /** - * Called when a job is done. - * @param job the finished job - * @param slave the slave that executed the @p job - */ - static void jobFinished(TDEIO::SimpleJob *job, TDEIO::Slave *slave) - { self()->_jobFinished(job, slave); } - - /** - * Puts a slave on notice. A next job may reuse this slave if it - * requests the same URL. - * - * A job can be put on hold after it has emit'ed its mimetype. - * Based on the mimetype, the program can give control to another - * component in the same process which can then resume the job - * by simply asking for the same URL again. - * @param job the job that should be stopped - * @param url the URL that is handled by the @p url - */ - static void putSlaveOnHold(TDEIO::SimpleJob *job, const KURL &url) - { self()->_putSlaveOnHold(job, url); } - - /** - * Removes any slave that might have been put on hold. If a slave - * was put on hold it will be killed. - */ - static void removeSlaveOnHold() - { self()->_removeSlaveOnHold(); } - - /** - * Send the slave that was put on hold back to KLauncher. This - * allows another process to take over the slave and resume the job - * that was started. - */ - static void publishSlaveOnHold() - { self()->_publishSlaveOnHold(); } - - /** - * Requests a slave for use in connection-oriented mode. - * - * @param url This defines the username,password,host & port to - * connect with. - * @param config Configuration data for the slave. - * - * @return A pointer to a connected slave or 0 if an error occurred. - * @see assignJobToSlave() - * @see disconnectSlave() - */ - static TDEIO::Slave *getConnectedSlave(const KURL &url, const TDEIO::MetaData &config = MetaData() ) - { return self()->_getConnectedSlave(url, config); } - - /* - * Uses @p slave to do @p job. - * This function should be called immediately after creating a Job. - * - * @param slave The slave to use. The slave must have been obtained - * with a call to getConnectedSlave and must not - * be currently assigned to any other job. - * @param job The job to do. - * - * @return true is successful, false otherwise. - * - * @see getConnectedSlave() - * @see disconnectSlave() - * @see slaveConnected() - * @see slaveError() - */ - static bool assignJobToSlave(TDEIO::Slave *slave, TDEIO::SimpleJob *job) - { return self()->_assignJobToSlave(slave, job); } - - /* - * Disconnects @p slave. - * - * @param slave The slave to disconnect. The slave must have been - * obtained with a call to getConnectedSlave - * and must not be assigned to any job. - * - * @return true is successful, false otherwise. - * - * @see getConnectedSlave - * @see assignJobToSlave - */ - static bool disconnectSlave(TDEIO::Slave *slave) - { return self()->_disconnectSlave(slave); } - - /** - * Send the slave that was put on hold back to KLauncher. This - * allows another process to take over the slave and resume the job - * the that was started. - * Register the mainwindow @p wid with the KIO subsystem - * Do not call this, it is called automatically from - * void TDEIO::Job::setWindow(TQWidget*). - * @param wid the window to register - * @since 3.1 - */ - static void registerWindow(TQWidget *wid) - { self()->_registerWindow(wid); } - - /** - * @internal - * Unregisters the window registered by registerWindow(). - */ - static void unregisterWindow(TQObject *wid) - { self()->slotUnregisterWindow(wid); } - - /** - * Function to connect signals emitted by the scheduler. - * - * @see slaveConnected() - * @see slaveError() - */ - static bool connect( const char *signal, const TQObject *receiver, - const char *member) - { return TQObject::connect(self(), signal, receiver, member); } - - static bool connect( const TQObject* sender, const char* signal, - const TQObject* receiver, const char* member ) - { return TQObject::connect(sender, signal, receiver, member); } - - static bool disconnect( const TQObject* sender, const char* signal, - const TQObject* receiver, const char* member ) - { return TQObject::disconnect(sender, signal, receiver, member); } - - bool connect( const TQObject *sender, const char *signal, - const char *member ) - { return TQObject::connect(sender, signal, member); } - - /** - * When true, the next job will check whether KLauncher has a slave - * on hold that is suitable for the job. - * @param b true when KLauncher has a job on hold - */ - static void checkSlaveOnHold(bool b) { self()->_checkSlaveOnHold(b); } - - void debug_info(); - - virtual bool process(const TQCString &fun, const TQByteArray &data, - TQCString& replyType, TQByteArray &replyData); - - virtual QCStringList functions(); - - public slots: - void slotSlaveDied(TDEIO::Slave *slave); - void slotSlaveStatus(pid_t pid, const TQCString &protocol, - const TQString &host, bool connected); - signals: - void slaveConnected(TDEIO::Slave *slave); - void slaveError(TDEIO::Slave *slave, int error, const TQString &errorMsg); - - protected: - void setupSlave(TDEIO::Slave *slave, const KURL &url, const TQString &protocol, const TQString &proxy , bool newSlave, const TDEIO::MetaData *config=0); - bool startJobScheduled(ProtocolInfo *protInfo); - bool startJobDirect(); - Scheduler(); - - protected slots: - void startStep(); - void slotCleanIdleSlaves(); - void slotSlaveConnected(); - void slotSlaveError(int error, const TQString &errorMsg); - void slotScheduleCoSlave(); - /// @since 3.1 - void slotUnregisterWindow(TQObject *); - - private: - class ProtocolInfoDict; - class ExtraJobData; - - Scheduler(const Scheduler&); - static Scheduler *self(); - static Scheduler *instance; - void _doJob(SimpleJob *job); - void _scheduleJob(SimpleJob *job); - void _cancelJob(SimpleJob *job); - void _jobFinished(TDEIO::SimpleJob *job, TDEIO::Slave *slave); - void _scheduleCleanup(); - void _putSlaveOnHold(TDEIO::SimpleJob *job, const KURL &url); - void _removeSlaveOnHold(); - Slave *_getConnectedSlave(const KURL &url, const TDEIO::MetaData &metaData ); - bool _assignJobToSlave(TDEIO::Slave *slave, TDEIO::SimpleJob *job); - bool _disconnectSlave(TDEIO::Slave *slave); - void _checkSlaveOnHold(bool b); - void _publishSlaveOnHold(); - void _registerWindow(TQWidget *wid); - - Slave *findIdleSlave(ProtocolInfo *protInfo, SimpleJob *job, bool &exact); - Slave *createSlave(ProtocolInfo *protInfo, SimpleJob *job, const KURL &url); - - - TQTimer slaveTimer; - TQTimer coSlaveTimer; - TQTimer cleanupTimer; - bool busy; - - SlaveList *slaveList; - SlaveList *idleSlaves; - SlaveList *coIdleSlaves; - - ProtocolInfoDict *protInfoDict; - Slave *slaveOnHold; - KURL urlOnHold; - JobList newJobs; - - TQPtrDict coSlaves; - ExtraJobData *extraJobData; - SlaveConfig *slaveConfig; - SessionData *sessionData; - bool checkOnHold; - TQMap m_windowList; - protected: - virtual void virtual_hook( int id, void* data ); - private: - class SchedulerPrivate* d; -}; - -} -#endif diff --git a/kio/kio/sessiondata.cpp b/kio/kio/sessiondata.cpp deleted file mode 100644 index e2517cc73..000000000 --- a/kio/kio/sessiondata.cpp +++ /dev/null @@ -1,311 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 2000 Dawit Alemayehu - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License (LGPL) as published by the Free Software Foundation; - either version 2 of the License, or (at your option) any - later version. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 51 Franklin Street, - Fifth Floor, Boston, MA 02110-1301, USA. -*/ - -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -#include "sessiondata.h" -#include "sessiondata.moc" - -namespace TDEIO { - -/***************************** SessionData::AuthData ************************/ -struct SessionData::AuthData -{ - -public: - AuthData() {} - - AuthData(const TQCString& k, const TQCString& g, bool p) { - key = k; - group = g; - persist = p; - } - - bool isKeyMatch( const TQCString& val ) const { - return (val==key); - } - - bool isGroupMatch( const TQCString& val ) const { - return (val==group); - } - - TQCString key; - TQCString group; - bool persist; -}; - -/************************* SessionData::AuthDataList ****************************/ -class SessionData::AuthDataList : public TQPtrList -{ -public: - AuthDataList(); - ~AuthDataList(); - - void addData( SessionData::AuthData* ); - void removeData( const TQCString& ); - - bool pingCacheDaemon(); - void registerAuthData( SessionData::AuthData* ); - void unregisterAuthData( SessionData::AuthData* ); - void purgeCachedData(); - -private: -#ifdef Q_OS_UNIX - KDEsuClient * m_tdesuClient; -#endif -}; - -SessionData::AuthDataList::AuthDataList() -{ -#ifdef Q_OS_UNIX - m_tdesuClient = new KDEsuClient; -#endif - setAutoDelete(true); -} - -SessionData::AuthDataList::~AuthDataList() -{ - purgeCachedData(); -#ifdef Q_OS_UNIX - delete m_tdesuClient; - m_tdesuClient = 0; -#endif -} - -void SessionData::AuthDataList::addData( SessionData::AuthData* d ) -{ - TQPtrListIterator it ( *this ); - for ( ; it.current(); ++it ) - { - if ( it.current()->isKeyMatch( d->key ) ) - return; - } - registerAuthData( d ); - append( d ); -} - -void SessionData::AuthDataList::removeData( const TQCString& gkey ) -{ - TQPtrListIterator it( *this ); - for( ; it.current(); ++it ) - { - if ( it.current()->isGroupMatch(gkey) && pingCacheDaemon() ) - { - unregisterAuthData( it.current() ); - remove( it.current() ); - } - } -} - -bool SessionData::AuthDataList::pingCacheDaemon() -{ -#ifdef Q_OS_UNIX - Q_ASSERT(m_tdesuClient); - - int success = m_tdesuClient->ping(); - if( success == -1 ) - { - success = m_tdesuClient->startServer(); - if( success == -1 ) - return false; - } - return true; -#else - return false; -#endif -} - -void SessionData::AuthDataList::registerAuthData( SessionData::AuthData* d ) -{ - if( !pingCacheDaemon() ) - return; - -#ifdef Q_OS_UNIX - bool ok; - TQCString ref_key = d->key + "-refcount"; - int count = m_tdesuClient->getVar(ref_key).toInt( &ok ); - if( ok ) - { - TQCString val; - val.setNum( count+1 ); - m_tdesuClient->setVar( ref_key, val, 0, d->group ); - } - else - m_tdesuClient->setVar( ref_key, "1", 0, d->group ); -#endif -} - -void SessionData::AuthDataList::unregisterAuthData( SessionData::AuthData* d ) -{ - if ( !d || d->persist ) - return; - - bool ok; - int count; - TQCString ref_key = d->key + "-refcount"; - -#ifdef Q_OS_UNIX - count = m_tdesuClient->getVar( ref_key ).toInt( &ok ); - if ( ok ) - { - if ( count > 1 ) - { - TQCString val; - val.setNum(count-1); - m_tdesuClient->setVar( ref_key, val, 0, d->group ); - } - else - { - m_tdesuClient->delVars(d->key); - } - } -#endif -} - -void SessionData::AuthDataList::purgeCachedData() -{ - if ( !isEmpty() && pingCacheDaemon() ) - { - TQPtrListIterator it( *this ); - for ( ; it.current(); ++it ) - unregisterAuthData( it.current() ); - } -} - -/********************************* SessionData ****************************/ - -class SessionData::SessionDataPrivate -{ -public: - SessionDataPrivate() { - useCookie = true; - initDone = false; - } - - bool initDone; - bool useCookie; - TQString charsets; - TQString language; -}; - -SessionData::SessionData() -{ - authData = 0; - d = new SessionDataPrivate; -} - -SessionData::~SessionData() -{ - delete d; - delete authData; - d = 0L; - authData = 0L; -} - -void SessionData::configDataFor( MetaData &configData, const TQString &proto, - const TQString & ) -{ - if ( (proto.find("http", 0, false) == 0 ) || - (proto.find("webdav", 0, false) == 0) ) - { - if (!d->initDone) - reset(); - - // These might have already been set so check first - // to make sure that we do not trumpt settings sent - // by apps or end-user. - if ( configData["Cookies"].isEmpty() ) - configData["Cookies"] = d->useCookie ? "true" : "false"; - if ( configData["Languages"].isEmpty() ) - configData["Languages"] = d->language; - if ( configData["Charsets"].isEmpty() ) - configData["Charsets"] = d->charsets; - if ( configData["CacheDir"].isEmpty() ) - configData["CacheDir"] = TDEGlobal::dirs()->saveLocation("cache", "http"); - if ( configData["UserAgent"].isEmpty() ) - { - configData["UserAgent"] = KProtocolManager::defaultUserAgent(); - } - } -} - -void SessionData::reset() -{ - d->initDone = true; - // Get Cookie settings... - TDEConfig* cfg = new TDEConfig("kcookiejarrc", true, false); - cfg->setGroup( "Cookie Policy" ); - d->useCookie = cfg->readBoolEntry( "Cookies", true ); - delete cfg; - - static const TQString & english = TDEGlobal::staticQString( "en" ); - - // Get language settings... - TQStringList languageList = TDEGlobal::locale()->languagesTwoAlpha(); - TQStringList::Iterator it = languageList.find( TQString::fromLatin1("C") ); - if ( it != languageList.end() ) - { - if ( languageList.contains( english ) > 0 ) - languageList.remove( it ); - else - (*it) = english; - } - if ( !languageList.contains( english ) ) - languageList.append( english ); - - d->language = languageList.join( ", " ); - - d->charsets = TQString::fromLatin1(TQTextCodec::codecForLocale()->mimeName()).lower(); - KProtocolManager::reparseConfiguration(); -} - -void SessionData::slotAuthData( const TQCString& key, const TQCString& gkey, - bool keep ) -{ - if (!authData) - authData = new AuthDataList; - authData->addData( new SessionData::AuthData(key, gkey, keep) ); -} - -void SessionData::slotDelAuthData( const TQCString& gkey ) -{ - if (!authData) - return; - authData->removeData( gkey ); -} - -void SessionData::virtual_hook( int, void* ) -{ /*BASE::virtual_hook( id, data );*/ } - -} diff --git a/kio/kio/sessiondata.h b/kio/kio/sessiondata.h deleted file mode 100644 index 4fef02161..000000000 --- a/kio/kio/sessiondata.h +++ /dev/null @@ -1,67 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 2000 Dawit Alemayehu -#include - -namespace TDEIO { - -class SlaveConfig; - - -/** - * @internal - */ -class TDEIO_EXPORT SessionData : public TQObject -{ - Q_OBJECT - -public: - SessionData(); - ~SessionData(); - - virtual void configDataFor( TDEIO::MetaData &configData, const TQString &proto, - const TQString &host ); - virtual void reset(); - - /// @since 3.1 - struct AuthData; -public slots: - void slotAuthData( const TQCString&, const TQCString&, bool ); - void slotDelAuthData( const TQCString& ); - -private: - class AuthDataList; - friend class AuthDataList; - AuthDataList* authData; - -protected: - virtual void virtual_hook( int id, void* data ); -private: - class SessionDataPrivate; - SessionDataPrivate* d; -}; - -} // namespace - -#endif diff --git a/kio/kio/skipdlg.cpp b/kio/kio/skipdlg.cpp deleted file mode 100644 index f4a14a229..000000000 --- a/kio/kio/skipdlg.cpp +++ /dev/null @@ -1,143 +0,0 @@ -/* This file is part of the KDE libraries - Copyright (C) 2000 David Faure - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License version 2 as published by the Free Software Foundation. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include "kio/skipdlg.h" - -#include -#include - -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -#ifdef Q_WS_X11 -#include -#endif - -using namespace TDEIO; - -SkipDlg::SkipDlg(TQWidget *parent, bool _multi, const TQString& _error_text, bool _modal ) : - KDialog ( parent, "" , _modal ) -{ - // TODO : port to KDialogBase - modal = _modal; - - // Set "StaysOnTop", because this dialog is typically used in kio_uiserver, - // i.e. in a separate process. -#ifdef Q_WS_X11 //FIXME(E): Implement for QT Embedded, mac & win32 - if (modal) - KWin::setState( winId(), NET::StaysOnTop ); -#endif - - b0 = b1 = b2 = 0L; - - setCaption( i18n( "Information" ) ); - - b0 = new KPushButton( KStdGuiItem::cancel(), this ); - connect(b0, TQT_SIGNAL(clicked()), this, TQT_SLOT(b0Pressed())); - - if ( _multi ) - { - b1 = new TQPushButton( i18n( "Skip" ), this ); - connect(b1, TQT_SIGNAL(clicked()), this, TQT_SLOT(b1Pressed())); - - b2 = new TQPushButton( i18n( "Auto Skip" ), this ); - connect(b2, TQT_SIGNAL(clicked()), this, TQT_SLOT(b2Pressed())); - } - - TQVBoxLayout *vlayout = new TQVBoxLayout( this, 10, 0 ); - // vlayout->addStrut( 360 ); makes dlg at least that wide - - TQLabel * lb = new TQLabel( _error_text, this ); - lb->setFixedHeight( lb->sizeHint().height() ); - lb->setMinimumWidth( lb->sizeHint().width() ); - vlayout->addWidget( lb ); - - vlayout->addSpacing( 10 ); - - TQHBoxLayout* layout = new TQHBoxLayout(); - vlayout->addLayout( layout ); - if ( b0 ) - { - b0->setDefault( true ); - b0->setFixedSize( b0->sizeHint() ); - layout->addWidget( b0 ); - layout->addSpacing( 5 ); - } - if ( b1 ) - { - b1->setFixedSize( b1->sizeHint() ); - layout->addWidget( b1 ); - layout->addSpacing( 5 ); - } - if ( b2 ) - { - b2->setFixedSize( b2->sizeHint() ); - layout->addWidget( b2 ); - layout->addSpacing( 5 ); - } - - vlayout->addStretch( 10 ); - vlayout->activate(); - resize( sizeHint() ); -} - -SkipDlg::~SkipDlg() -{ -} - -void SkipDlg::b0Pressed() -{ - if ( modal ) - done( 0 ); - else - emit result( this, 0 ); -} - -void SkipDlg::b1Pressed() -{ - if ( modal ) - done( 1 ); - else - emit result( this, 1 ); -} - -void SkipDlg::b2Pressed() -{ - if ( modal ) - done( 2 ); - else - emit result( this, 2 ); -} - -SkipDlg_Result TDEIO::open_SkipDlg( bool _multi, const TQString& _error_text ) -{ - Q_ASSERT(kapp); - - SkipDlg dlg( 0L, _multi, _error_text, true ); - return (SkipDlg_Result) dlg.exec(); -} - -#include "skipdlg.moc" diff --git a/kio/kio/skipdlg.h b/kio/kio/skipdlg.h deleted file mode 100644 index 56252dace..000000000 --- a/kio/kio/skipdlg.h +++ /dev/null @@ -1,61 +0,0 @@ -/* This file is part of the KDE libraries - Copyright (C) 2000 David Faure - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License version 2 as published by the Free Software Foundation. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef __kio_skip_dlg__ -#define __kio_skip_dlg__ - -#include -#include - -class TQPushButton; -class TQWidget; - -namespace TDEIO { - - enum SkipDlg_Result { S_SKIP = 1, S_AUTO_SKIP = 2, S_CANCEL = 0 }; - - TDEIO_EXPORT SkipDlg_Result open_SkipDlg( bool _multi, const TQString& _error_text = TQString::null ); - -/** - * @internal - */ -class TDEIO_EXPORT SkipDlg : public KDialog -{ - Q_OBJECT -public: - SkipDlg( TQWidget *parent, bool _multi, const TQString& _error_text, bool _modal = false ); - ~SkipDlg(); - -protected: - TQPushButton *b0; - TQPushButton *b1; - TQPushButton *b2; - - bool modal; - -public slots: - void b0Pressed(); - void b1Pressed(); - void b2Pressed(); - -signals: - void result( SkipDlg *_this, int _button ); -}; - -} -#endif diff --git a/kio/kio/slave.cpp b/kio/kio/slave.cpp deleted file mode 100644 index 6e834f5fa..000000000 --- a/kio/kio/slave.cpp +++ /dev/null @@ -1,519 +0,0 @@ -/* - * This file is part of the KDE libraries - * Copyright (c) 2000 Waldo Bastian - * 2000 Stephan Kulow - * - * $Id$ - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License version 2 as published by the Free Software Foundation. - * - * This library 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 - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public License - * along with this library; see the file COPYING.LIB. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - **/ - -#include - -#include -#include -#include -#include -#include -#include -#include - -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "kio/dataprotocol.h" -#include "kio/slave.h" -#include "kio/kservice.h" -#include -#include -#include - -#ifdef HAVE_PATHS_H -#include -#endif - -#ifndef _PATH_TMP -#define _PATH_TMP "/tmp" -#endif - -using namespace TDEIO; - -#define SLAVE_CONNECTION_TIMEOUT_MIN 2 - -// Without debug info we consider it an error if the slave doesn't connect -// within 10 seconds. -// With debug info we give the slave an hour so that developers have a chance -// to debug their slave. -#ifdef NDEBUG -#define SLAVE_CONNECTION_TIMEOUT_MAX 10 -#else -#define SLAVE_CONNECTION_TIMEOUT_MAX 3600 -#endif - -namespace TDEIO { - - /** - * @internal - */ - class SlavePrivate { - public: - bool derived; // true if this instance of Slave is actually an - // instance of a derived class. - - SlavePrivate(bool derived) : derived(derived) {} - }; -} - -void Slave::accept(TDESocket *socket) -{ -#ifndef Q_WS_WIN - slaveconn.init(socket); -#endif - delete serv; - serv = 0; - slaveconn.connect(this, TQT_SLOT(gotInput())); - unlinkSocket(); -} - -void Slave::unlinkSocket() -{ - if (m_socket.isEmpty()) return; - TQCString filename = TQFile::encodeName(m_socket); - unlink(filename.data()); - m_socket = TQString::null; -} - -void Slave::timeout() -{ - if (!serv) return; - kdDebug(7002) << "slave failed to connect to application pid=" << m_pid << " protocol=" << m_protocol << endl; - if (m_pid && (::kill(m_pid, 0) == 0)) - { - int delta_t = (int) difftime(time(0), contact_started); - kdDebug(7002) << "slave is slow... pid=" << m_pid << " t=" << delta_t << endl; - if (delta_t < SLAVE_CONNECTION_TIMEOUT_MAX) - { - TQTimer::singleShot(1000*SLAVE_CONNECTION_TIMEOUT_MIN, this, TQT_SLOT(timeout())); - return; - } - } - kdDebug(7002) << "Houston, we lost our slave, pid=" << m_pid << endl; - delete serv; - serv = 0; - unlinkSocket(); - dead = true; - TQString arg = m_protocol; - if (!m_host.isEmpty()) - arg += "://"+m_host; - kdDebug(7002) << "slave died pid = " << m_pid << endl; - ref(); - // Tell the job about the problem. - emit error(ERR_SLAVE_DIED, arg); - // Tell the scheduler about the problem. - emit slaveDied(this); - // After the above signal we're dead!! - deref(); -} - -Slave::Slave(TDEServerSocket *socket, const TQString &protocol, const TQString &socketname) - : SlaveInterface(&slaveconn), serv(socket), contacted(false), - d(new SlavePrivate(false)) -{ - m_refCount = 1; - m_protocol = protocol; - m_slaveProtocol = protocol; - m_socket = socketname; - dead = false; - contact_started = time(0); - idle_since = contact_started; - m_pid = 0; - m_port = 0; -#ifndef Q_WS_WIN - connect(serv, TQT_SIGNAL(accepted( TDESocket* )), - TQT_SLOT(accept(TDESocket*) ) ); -#endif -} - -Slave::Slave(bool /*derived*/, TDEServerSocket *socket, const TQString &protocol, - const TQString &socketname) - : SlaveInterface(&slaveconn), serv(socket), contacted(false), - d(new SlavePrivate(true)) -{ - // FIXME: hmm, duplicating code here from public ctor, no good (LS) - m_refCount = 1; - m_protocol = protocol; - m_slaveProtocol = protocol; - m_socket = socketname; - dead = false; - contact_started = time(0); - idle_since = contact_started; - m_pid = 0; - m_port = 0; - if (serv != 0) { -#ifndef Q_WS_WIN - connect(serv, TQT_SIGNAL(accepted( TDESocket* )), - TQT_SLOT(accept(TDESocket*) ) ); -#endif - } -} - -Slave::~Slave() -{ - // kdDebug(7002) << "destructing slave object pid = " << m_pid << endl; - if (serv != 0) { - delete serv; - serv = 0; - } - unlinkSocket(); - m_pid = 99999; - delete d; - d = 0; -} - -void Slave::setProtocol(const TQString & protocol) -{ - m_protocol = protocol; -} - -void Slave::setIdle() -{ - idle_since = time(0); -} - -time_t Slave::idleTime() -{ - return (time_t) difftime(time(0), idle_since); -} - -void Slave::setPID(pid_t pid) -{ - m_pid = pid; -} - -void Slave::hold(const KURL &url) -{ - if (d->derived) { // TODO: clean up before KDE 4 - HoldParams params; - params.url = &url; - virtual_hook(VIRTUAL_HOLD, ¶ms); - return; - }/*end if*/ - - ref(); - { - TQByteArray data; - TQDataStream stream( data, IO_WriteOnly ); - stream << url; - slaveconn.send( CMD_SLAVE_HOLD, data ); - slaveconn.close(); - dead = true; - emit slaveDied(this); - } - deref(); - // Call KLauncher::waitForSlave(pid); - { - DCOPClient *client = kapp->dcopClient(); - if (!client->isAttached()) - client->attach(); - - TQByteArray params, reply; - TQCString replyType; - TQDataStream stream(params, IO_WriteOnly); - pid_t pid = m_pid; - stream << pid; - - TQCString launcher = TDEApplication::launcher(); - client->call(launcher, launcher, "waitForSlave(pid_t)", - params, replyType, reply); - } -} - -void Slave::suspend() -{ - if (d->derived) { // TODO: clean up before KDE 4 - virtual_hook(VIRTUAL_SUSPEND, 0); - return; - }/*end if*/ - - slaveconn.suspend(); -} - -void Slave::resume() -{ - if (d->derived) { // TODO: clean up before KDE 4 - virtual_hook(VIRTUAL_RESUME, 0); - return; - }/*end if*/ - - slaveconn.resume(); -} - -bool Slave::suspended() -{ - if (d->derived) { // TODO: clean up before KDE 4 - SuspendedParams params; - virtual_hook(VIRTUAL_SUSPENDED, ¶ms); - return params.retval; - }/*end if*/ - - return slaveconn.suspended(); -} - -void Slave::send(int cmd, const TQByteArray &arr) { - if (d->derived) { // TODO: clean up before KDE 4 - SendParams params; - params.cmd = cmd; - params.arr = &arr; - virtual_hook(VIRTUAL_SEND, ¶ms); - return; - }/*end if*/ - - slaveconn.send(cmd, arr); -} - -void Slave::gotInput() -{ - ref(); - if (!dispatch()) - { - slaveconn.close(); - dead = true; - TQString arg = m_protocol; - if (!m_host.isEmpty()) - arg += "://"+m_host; - kdDebug(7002) << "slave died pid = " << m_pid << endl; - // Tell the job about the problem. - emit error(ERR_SLAVE_DIED, arg); - // Tell the scheduler about the problem. - emit slaveDied(this); - } - deref(); - // Here we might be dead!! -} - -void Slave::kill() -{ - dead = true; // OO can be such simple. - kdDebug(7002) << "killing slave pid=" << m_pid << " (" << m_protocol << "://" - << m_host << ")" << endl; - if (m_pid) - { - ::kill(m_pid, SIGTERM); - } -} - -void Slave::setHost( const TQString &host, int port, - const TQString &user, const TQString &passwd) -{ - m_host = host; - m_port = port; - m_user = user; - m_passwd = passwd; - - TQByteArray data; - TQDataStream stream( data, IO_WriteOnly ); - stream << m_host << m_port << m_user << m_passwd; - slaveconn.send( CMD_HOST, data ); -} - -void Slave::resetHost() -{ - m_host = ""; -} - -void Slave::setConfig(const MetaData &config) -{ - TQByteArray data; - TQDataStream stream( data, IO_WriteOnly ); - stream << config; - slaveconn.send( CMD_CONFIG, data ); -} - -Slave* Slave::createSlave( const TQString &protocol, const KURL& url, int& error, TQString& error_text ) -{ - //kdDebug(7002) << "createSlave '" << protocol << "' for " << url.prettyURL() << endl; - // Firstly take into account all special slaves - if (protocol == "data") - return new DataProtocol(); - - DCOPClient *client = kapp->dcopClient(); - if (!client->isAttached()) - client->attach(); - - TQString prefix = locateLocal("socket", TDEGlobal::instance()->instanceName()); - KTempFile socketfile(prefix, TQString::fromLatin1(".slave-socket")); - if ( socketfile.status() != 0 ) - { - error_text = i18n("Unable to create io-slave: %1").arg(strerror(errno)); - error = TDEIO::ERR_CANNOT_LAUNCH_PROCESS; - return 0; - } - -#ifdef __CYGWIN__ - socketfile.close(); -#endif - -#ifndef Q_WS_WIN - TDEServerSocket *kss = new TDEServerSocket(TQFile::encodeName(socketfile.name()).data()); - - Slave *slave = new Slave(kss, protocol, socketfile.name()); -#else - Slave *slave = 0; -#endif - - // WABA: if the dcopserver is running under another uid we don't ask - // klauncher for a slave, because the slave might have that other uid - // as well, which might either be a) undesired or b) make it impossible - // for the slave to connect to the application. - // In such case we start the slave via TDEProcess. - // It's possible to force this by setting the env. variable - // TDE_FORK_SLAVES, Clearcase seems to require this. - static bool bForkSlaves = !TQCString(getenv("TDE_FORK_SLAVES")).isEmpty(); - - if (bForkSlaves || !client->isAttached() || client->isAttachedToForeignServer()) - { - TQString _name = KProtocolInfo::exec(protocol); - if (_name.isEmpty()) - { - error_text = i18n("Unknown protocol '%1'.").arg(protocol); - error = TDEIO::ERR_CANNOT_LAUNCH_PROCESS; - delete slave; - return 0; - } - TQString lib_path = KLibLoader::findLibrary(_name.latin1()); - if (lib_path.isEmpty()) - { - error_text = i18n("Can not find io-slave for protocol '%1'.").arg(protocol); - error = TDEIO::ERR_CANNOT_LAUNCH_PROCESS; - return 0; - } - - TDEProcess proc; - - proc << locate("exe", "kioslave") << lib_path << protocol << "" << socketfile.name(); - kdDebug(7002) << "kioslave" << ", " << lib_path << ", " << protocol << ", " << TQString::null << ", " << socketfile.name() << endl; - - proc.start(TDEProcess::DontCare); - -#ifndef Q_WS_WIN - slave->setPID(proc.pid()); - TQTimer::singleShot(1000*SLAVE_CONNECTION_TIMEOUT_MIN, slave, TQT_SLOT(timeout())); -#endif - return slave; - } - - - TQByteArray params, reply; - TQCString replyType; - TQDataStream stream(params, IO_WriteOnly); - stream << protocol << url.host() << socketfile.name(); - - TQCString launcher = TDEApplication::launcher(); - if (!client->call(launcher, launcher, "requestSlave(TQString,TQString,TQString)", - params, replyType, reply)) { - error_text = i18n("Cannot talk to klauncher"); - error = TDEIO::ERR_SLAVE_DEFINED; - delete slave; - return 0; - } - TQDataStream stream2(reply, IO_ReadOnly); - TQString errorStr; - pid_t pid; - stream2 >> pid >> errorStr; - if (!pid) - { - error_text = i18n("Unable to create io-slave:\nklauncher said: %1").arg(errorStr); - error = TDEIO::ERR_CANNOT_LAUNCH_PROCESS; - delete slave; - return 0; - } -#ifndef Q_WS_WIN - slave->setPID(pid); - TQTimer::singleShot(1000*SLAVE_CONNECTION_TIMEOUT_MIN, slave, TQT_SLOT(timeout())); -#endif - return slave; -} - -Slave* Slave::holdSlave( const TQString &protocol, const KURL& url ) -{ - //kdDebug(7002) << "holdSlave '" << protocol << "' for " << url.prettyURL() << endl; - // Firstly take into account all special slaves - if (protocol == "data") - return 0; - - DCOPClient *client = kapp->dcopClient(); - if (!client->isAttached()) - client->attach(); - - TQString prefix = locateLocal("socket", TDEGlobal::instance()->instanceName()); - KTempFile socketfile(prefix, TQString::fromLatin1(".slave-socket")); - if ( socketfile.status() != 0 ) - return 0; - -#ifdef __CYGWIN__ - socketfile.close(); - socketfile.unlink(); -#endif - -#ifndef Q_WS_WIN - TDEServerSocket *kss = new TDEServerSocket(TQFile::encodeName(socketfile.name()).data()); - - Slave *slave = new Slave(kss, protocol, socketfile.name()); -#else - Slave *slave = 0; -#endif - - TQByteArray params, reply; - TQCString replyType; - TQDataStream stream(params, IO_WriteOnly); - stream << url << socketfile.name(); - - TQCString launcher = TDEApplication::launcher(); - if (!client->call(launcher, launcher, "requestHoldSlave(KURL,TQString)", - params, replyType, reply)) { - delete slave; - return 0; - } - TQDataStream stream2(reply, IO_ReadOnly); - pid_t pid; - stream2 >> pid; - if (!pid) - { - delete slave; - return 0; - } -#ifndef Q_WS_WIN - slave->setPID(pid); - TQTimer::singleShot(1000*SLAVE_CONNECTION_TIMEOUT_MIN, slave, TQT_SLOT(timeout())); -#endif - return slave; -} - -void Slave::virtual_hook( int id, void* data ) { - TDEIO::SlaveInterface::virtual_hook( id, data ); -} - -#include "slave.moc" diff --git a/kio/kio/slave.h b/kio/kio/slave.h deleted file mode 100644 index 6f9f02a2f..000000000 --- a/kio/kio/slave.h +++ /dev/null @@ -1,270 +0,0 @@ -// -*- c++ -*- -/* - * This file is part of the KDE libraries - * Copyright (c) 2000 Waldo Bastian - * 2000 Stephan Kulow - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License version 2 as published by the Free Software Foundation. - * - * This library 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 - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public License - * along with this library; see the file COPYING.LIB. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - **/ - -#ifndef KIO_SLAVE_H -#define KIO_SLAVE_H - -#include -#include - -#include - -#include - -#include "kio/slaveinterface.h" -#include "kio/connection.h" - -class TDEServerSocket; -class TDESocket; - -namespace TDEIO { - - /** Attention developers: If you change the implementation of TDEIO::Slave, - * do *not* use connection() or slaveconn but the respective TDEIO::Slave - * accessor methods. Otherwise classes derived from Slave might break. (LS) - */ - class TDEIO_EXPORT Slave : public TDEIO::SlaveInterface - { - Q_OBJECT - - - protected: - /** - * Use this constructor if you derive your own class from Slave - * @p derived must be true in any case - * @internal - * @since 3.2 - */ - Slave(bool derived, TDEServerSocket *unixdomain, const TQString &protocol, - const TQString &socketname); // TODO(BIC): Remove in KDE 4 - - public: - Slave(TDEServerSocket *unixdomain, - const TQString &protocol, const TQString &socketname); - - virtual ~Slave(); - - void setPID(pid_t); - - int slave_pid() { return m_pid; } - - /** - * Force termination - */ - void kill(); - - /** - * @return true if the slave survived the last mission. - */ - bool isAlive() { return !dead; } - - /** - * Set host for url - * @param host to connect to. - * @param port to connect to. - * @param user to login as - * @param passwd to login with - */ - void setHost( const TQString &host, int port, - const TQString &user, const TQString &passwd); // TODO(BIC): make virtual - - /** - * Clear host info. - */ - void resetHost(); - - /** - * Configure slave - */ - void setConfig(const MetaData &config); // TODO(BIC): make virtual - - /** - * The protocol this slave handles. - * - * @return name of protocol handled by this slave, as seen by the user - */ - TQString protocol() { return m_protocol; } - - void setProtocol(const TQString & protocol); - /** - * The actual protocol used to handle the request. - * - * This method will return a different protocol than - * the one obtained by using protocol() if a - * proxy-server is used for the given protocol. This - * usually means that this method will return "http" - * when the actuall request was to retrieve a resource - * from an "ftp" server by going through a proxy server. - * - * @return the actual protocol (io-slave) that handled the request - */ - TQString slaveProtocol() { return m_slaveProtocol; } - - /** - * @return Host this slave is (was?) connected to - */ - TQString host() { return m_host; } - - /** - * @return port this slave is (was?) connected to - */ - int port() { return m_port; } - - /** - * @return User this slave is (was?) logged in as - */ - TQString user() { return m_user; } - - /** - * @return Passwd used to log in - */ - TQString passwd() { return m_passwd; } - - /** - * Creates a new slave. - * - * @param protocol protocol the slave is for. - * @param url URL the slave should operate on. - * @param error is the error code on failure and undefined else. - * @param error_text is the error text on failure and undefined else. - * - * @return 0 on failure, or a pointer to a slave otherwise. - * @todo What are legal @p protocol values? - */ - static Slave* createSlave( const TQString &protocol, const KURL& url, int& error, TQString& error_text ); - - static Slave* holdSlave( const TQString &protocol, const KURL& url ); - - // == communication with connected kioslave == - // whenever possible prefer these methods over the respective - // methods in connection() - /** - * Suspends the operation of the attached kioslave. - */ - void suspend(); // TODO(BIC): make virtual - /** - * Resumes the operation of the attached kioslave. - */ - void resume(); // TODO(BIC): make virtual - /** - * Tells wether the kioslave is suspended. - * @return true if the kioslave is suspended. - * @since 3.2 - */ - bool suspended(); // TODO(BIC): make virtual - /** - * Sends the given command to the kioslave. - * @param cmd command id - * @param data byte array containing data - * @since 3.2 - */ - void send(int cmd, const TQByteArray &data = TQByteArray());// TODO(BIC): make virtual - // == end communication with connected kioslave == - - /** - * Puts the kioslave associated with @p url at halt. - */ - void hold(const KURL &url); // TODO(BIC): make virtual - - /** - * @return The time this slave has been idle. - */ - time_t idleTime(); - - /** - * Marks this slave as idle. - */ - void setIdle(); - - /* - * @returns Whether the slave is connected - * (Connection oriented slaves only) - */ - bool isConnected() { return contacted; } - void setConnected(bool c) { contacted = c; } - - /** @deprecated This method is obsolete, use the accessor methods - * within TDEIO::Slave instead. Old code directly accessing connection() - * will not be able to access special protocols. - */ - KDE_DEPRECATED Connection *connection() { return &slaveconn; } // TODO(BIC): remove before KDE 4 - - void ref() { m_refCount++; } - void deref() { m_refCount--; if (!m_refCount) delete this; } - - public slots: - void accept(TDESocket *socket); - void gotInput(); - void timeout(); - signals: - void slaveDied(TDEIO::Slave *slave); - - protected: - void unlinkSocket(); - - private: - TQString m_protocol; - TQString m_slaveProtocol; - TQString m_host; - int m_port; - TQString m_user; - TQString m_passwd; - TDEServerSocket *serv; - TQString m_socket; - pid_t m_pid; - bool contacted; - bool dead; - time_t contact_started; - time_t idle_since; - TDEIO::Connection slaveconn; - int m_refCount; - protected: - virtual void virtual_hook( int id, void* data ); - // grant SlaveInterface all IDs < 0x200 - enum { VIRTUAL_SUSPEND = 0x200, VIRTUAL_RESUME, VIRTUAL_SEND, - VIRTUAL_HOLD, VIRTUAL_SUSPENDED, - VIRTUAL_SET_HOST, VIRTUAL_SET_CONFIG }; - struct SendParams { - int cmd; - const TQByteArray *arr; - }; - struct HoldParams { - const KURL *url; - }; - struct SuspendedParams { - bool retval; - }; - struct SetHostParams { - const TQString *host; - int port; - const TQString *user; - const TQString *passwd; - }; - struct SetConfigParams { - const MetaData *config; - }; - private: - class SlavePrivate* d; - }; - -} - -#endif diff --git a/kio/kio/slavebase.cpp b/kio/kio/slavebase.cpp deleted file mode 100644 index 07d784527..000000000 --- a/kio/kio/slavebase.cpp +++ /dev/null @@ -1,1315 +0,0 @@ -/* - * - * This file is part of the KDE libraries - * Copyright (c) 2000 Waldo Bastian - * Copyright (c) 2000 David Faure - * Copyright (c) 2000 Stephan Kulow - * - * $Id$ - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License version 2 as published by the Free Software Foundation. - * - * This library 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 - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public License - * along with this library; see the file COPYING.LIB. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - * - **/ - -#include "slavebase.h" - -#include - -#include -#ifdef HAVE_SYS_SELECT_H -#include // Needed on some systems. -#endif - -#include -#include -#include -#include -#include -#include -#include - -#include - -#include - -#include -#include -#include -#include -#include -#include - -#include "kremoteencoding.h" - -#include "kio/slavebase.h" -#include "kio/connection.h" -#include "kio/ioslave_defaults.h" -#include "kio/slaveinterface.h" - -#include "uiserver_stub.h" - -#ifndef NDEBUG -#ifdef HAVE_BACKTRACE -#include -#endif -#endif - -using namespace TDEIO; - -template class TQPtrList >; -typedef TQValueList AuthKeysList; -typedef TQMap AuthKeysMap; -#define KIO_DATA TQByteArray data; TQDataStream stream( data, IO_WriteOnly ); stream -#define KIO_FILESIZE_T(x) (unsigned long)(x & 0xffffffff) << (unsigned long)(x >> 32) - -namespace TDEIO { - -class SlaveBaseConfig : public TDEConfigBase -{ -public: - SlaveBaseConfig(SlaveBase *_slave) - : slave(_slave) { } - - bool internalHasGroup(const TQCString &) const { tqWarning("hasGroup(const TQCString &)"); -return false; } - - TQStringList groupList() const { return TQStringList(); } - - TQMap entryMap(const TQString &group) const - { Q_UNUSED(group); return TQMap(); } - - void reparseConfiguration() { } - - KEntryMap internalEntryMap( const TQString &pGroup) const { Q_UNUSED(pGroup); return KEntryMap(); } - - KEntryMap internalEntryMap() const { return KEntryMap(); } - - void putData(const KEntryKey &_key, const KEntry&_data, bool _checkGroup) - { Q_UNUSED(_key); Q_UNUSED(_data); Q_UNUSED(_checkGroup); } - - KEntry lookupData(const KEntryKey &_key) const - { - KEntry entry; - TQString value = slave->metaData(_key.c_key); - if (!value.isNull()) - entry.mValue = value.utf8(); - return entry; - } -protected: - SlaveBase *slave; -}; - - -class SlaveBasePrivate { -public: - TQString slaveid; - bool resume:1; - bool needSendCanResume:1; - bool onHold:1; - bool wasKilled:1; - MetaData configData; - SlaveBaseConfig *config; - KURL onHoldUrl; - - struct timeval last_tv; - TDEIO::filesize_t totalSize; - TDEIO::filesize_t sentListEntries; - DCOPClient *dcopClient; - KRemoteEncoding *remotefile; - time_t timeout; - TQByteArray timeoutData; -}; - -} - -static SlaveBase *globalSlave; -long SlaveBase::s_seqNr; - -static volatile bool slaveWriteError = false; - -static const char *s_protocol; - -#ifdef Q_OS_UNIX -static void genericsig_handler(int sigNumber) -{ - signal(sigNumber,SIG_IGN); - //WABA: Don't do anything that requires malloc, we can deadlock on it since - //a SIGTERM signal can come in while we are in malloc/free. - //kdDebug()<<"kioslave : exiting due to signal "<setKillFlag(); - signal(SIGALRM,SIG_DFL); - alarm(5); //generate an alarm signal in 5 seconds, in this time the slave has to exit -} -#endif - -////////////// - -SlaveBase::SlaveBase( const TQCString &protocol, - const TQCString &pool_socket, - const TQCString &app_socket ) - : mProtocol(protocol), m_pConnection(0), - mPoolSocket( TQFile::decodeName(pool_socket)), - mAppSocket( TQFile::decodeName(app_socket)) -{ - s_protocol = protocol.data(); -#ifdef Q_OS_UNIX - if (!getenv("TDE_DEBUG")) - { - KCrash::setCrashHandler( sigsegv_handler ); - signal(SIGILL,&sigsegv_handler); - signal(SIGTRAP,&sigsegv_handler); - signal(SIGABRT,&sigsegv_handler); - signal(SIGBUS,&sigsegv_handler); - signal(SIGALRM,&sigsegv_handler); - signal(SIGFPE,&sigsegv_handler); -#ifdef SIGPOLL - signal(SIGPOLL, &sigsegv_handler); -#endif -#ifdef SIGSYS - signal(SIGSYS, &sigsegv_handler); -#endif -#ifdef SIGVTALRM - signal(SIGVTALRM, &sigsegv_handler); -#endif -#ifdef SIGXCPU - signal(SIGXCPU, &sigsegv_handler); -#endif -#ifdef SIGXFSZ - signal(SIGXFSZ, &sigsegv_handler); -#endif - } - - struct sigaction act; - act.sa_handler = sigpipe_handler; - sigemptyset( &act.sa_mask ); - act.sa_flags = 0; - sigaction( SIGPIPE, &act, 0 ); - - signal(SIGINT,&genericsig_handler); - signal(SIGQUIT,&genericsig_handler); - signal(SIGTERM,&genericsig_handler); -#endif - - globalSlave=this; - - appconn = new Connection(); - listEntryCurrentSize = 100; - struct timeval tp; - gettimeofday(&tp, 0); - listEntry_sec = tp.tv_sec; - listEntry_usec = tp.tv_usec; - mConnectedToApp = true; - - d = new SlaveBasePrivate; - // by kahl for netmgr (need a way to identify slaves) - d->slaveid = protocol; - d->slaveid += TQString::number(getpid()); - d->resume = false; - d->needSendCanResume = false; - d->config = new SlaveBaseConfig(this); - d->onHold = false; - d->wasKilled=false; - d->last_tv.tv_sec = 0; - d->last_tv.tv_usec = 0; -// d->processed_size = 0; - d->totalSize=0; - d->sentListEntries=0; - d->timeout = 0; - connectSlave(mAppSocket); - - d->dcopClient = 0; - d->remotefile = 0; -} - -SlaveBase::~SlaveBase() -{ - delete d; - s_protocol = ""; -} - -DCOPClient *SlaveBase::dcopClient() -{ - if (!d->dcopClient) - { - d->dcopClient = TDEApplication::dcopClient(); - if (!d->dcopClient->isAttached()) - d->dcopClient->attach(); - d->dcopClient->setDaemonMode( true ); - } - return d->dcopClient; -} - -void SlaveBase::dispatchLoop() -{ -#ifdef Q_OS_UNIX //TODO: WIN32 - fd_set rfds; - int retval; - - while (true) - { - if (d->timeout && (d->timeout < time(0))) - { - TQByteArray data = d->timeoutData; - d->timeout = 0; - d->timeoutData = TQByteArray(); - special(data); - } - FD_ZERO(&rfds); - - assert(appconn->inited()); - int maxfd = appconn->fd_from(); - FD_SET(appconn->fd_from(), &rfds); - if( d->dcopClient ) - { - FD_SET( d->dcopClient->socket(), &rfds ); - if( d->dcopClient->socket() > maxfd ) - maxfd = d->dcopClient->socket(); - } - - if (!d->timeout) // we can wait forever - { - retval = select( maxfd + 1, &rfds, NULL, NULL, NULL); - } - else - { - struct timeval tv; - tv.tv_sec = kMax(d->timeout-time(0),(time_t) 1); - tv.tv_usec = 0; - retval = select( maxfd + 1, &rfds, NULL, NULL, &tv); - } - if ((retval>0) && FD_ISSET(appconn->fd_from(), &rfds)) - { // dispatch application messages - int cmd; - TQByteArray data; - if ( appconn->read(&cmd, data) != -1 ) - { - dispatch(cmd, data); - } - else // some error occurred, perhaps no more application - { - // When the app exits, should the slave be put back in the pool ? - if (mConnectedToApp && !mPoolSocket.isEmpty()) - { - disconnectSlave(); - mConnectedToApp = false; - closeConnection(); - connectSlave(mPoolSocket); - } - else - { - return; - } - } - } - if( retval > 0 && d->dcopClient && FD_ISSET( d->dcopClient->socket(), &rfds )) - { - d->dcopClient->processSocketData( d->dcopClient->socket()); - } - if ((retval<0) && (errno != EINTR)) - { - kdDebug(7019) << "dispatchLoop(): select returned " << retval << " " - << (errno==EBADF?"EBADF":errno==EINTR?"EINTR":errno==EINVAL?"EINVAL":errno==ENOMEM?"ENOMEM":"unknown") - << " (" << errno << ")" << endl; - return; - } - //I think we get here when we were killed in dispatch() and not in select() - if (wasKilled()) - { - kdDebug(7019)<<" dispatchLoop() slave was killed, returning"<init(new TDESocket(TQFile::encodeName(path).data())); - if (!appconn->inited()) - { - kdDebug(7019) << "SlaveBase: failed to connect to " << path << endl; - exit(); - } - - setConnection(appconn); -#endif -} - -void SlaveBase::disconnectSlave() -{ - appconn->close(); -} - -void SlaveBase::setMetaData(const TQString &key, const TQString &value) -{ - mOutgoingMetaData.replace(key, value); -} - -TQString SlaveBase::metaData(const TQString &key) const -{ - if (mIncomingMetaData.contains(key)) - return mIncomingMetaData[key]; - if (d->configData.contains(key)) - return d->configData[key]; - return TQString::null; -} - -bool SlaveBase::hasMetaData(const TQString &key) const -{ - if (mIncomingMetaData.contains(key)) - return true; - if (d->configData.contains(key)) - return true; - return false; -} - -// ### remove the next two methods for KDE4 (they miss the const) -TQString SlaveBase::metaData(const TQString &key) { - return const_cast(this)->metaData( key ); -} -bool SlaveBase::hasMetaData(const TQString &key) { - return const_cast(this)->hasMetaData( key ); -} - -TDEConfigBase *SlaveBase::config() -{ - return d->config; -} - -void SlaveBase::sendMetaData() -{ - KIO_DATA << mOutgoingMetaData; - - slaveWriteError = false; - m_pConnection->send( INF_META_DATA, data ); - if (slaveWriteError) exit(); - mOutgoingMetaData.clear(); // Clear -} - -KRemoteEncoding *SlaveBase::remoteEncoding() -{ - if (d->remotefile != 0) - return d->remotefile; - - return d->remotefile = new KRemoteEncoding(metaData("Charset").latin1()); -} - -void SlaveBase::data( const TQByteArray &data ) -{ - if (!mOutgoingMetaData.isEmpty()) - sendMetaData(); - slaveWriteError = false; - m_pConnection->send( MSG_DATA, data ); - if (slaveWriteError) exit(); -} - -void SlaveBase::dataReq( ) -{ -/* - if (!mOutgoingMetaData.isEmpty()) - sendMetaData(); -*/ - if (d->needSendCanResume) - canResume(0); - m_pConnection->send( MSG_DATA_REQ ); -} - -void SlaveBase::error( int _errid, const TQString &_text ) -{ - mIncomingMetaData.clear(); // Clear meta data - mOutgoingMetaData.clear(); - KIO_DATA << (TQ_INT32) _errid << _text; - - m_pConnection->send( MSG_ERROR, data ); - //reset - listEntryCurrentSize = 100; - d->sentListEntries=0; - d->totalSize=0; -} - -void SlaveBase::connected() -{ - slaveWriteError = false; - m_pConnection->send( MSG_CONNECTED ); - if (slaveWriteError) exit(); -} - -void SlaveBase::finished() -{ - mIncomingMetaData.clear(); // Clear meta data - if (!mOutgoingMetaData.isEmpty()) - sendMetaData(); - m_pConnection->send( MSG_FINISHED ); - - // reset - listEntryCurrentSize = 100; - d->sentListEntries=0; - d->totalSize=0; -} - -void SlaveBase::needSubURLData() -{ - m_pConnection->send( MSG_NEED_SUBURL_DATA ); -} - -void SlaveBase::slaveStatus( const TQString &host, bool connected ) -{ - pid_t pid = getpid(); - TQ_INT8 b = connected ? 1 : 0; - KIO_DATA << pid << mProtocol << host << b; - if (d->onHold) - stream << d->onHoldUrl; - m_pConnection->send( MSG_SLAVE_STATUS, data ); -} - -void SlaveBase::canResume() -{ - m_pConnection->send( MSG_CANRESUME ); -} - -void SlaveBase::totalSize( TDEIO::filesize_t _bytes ) -{ - KIO_DATA << KIO_FILESIZE_T(_bytes); - slaveWriteError = false; - m_pConnection->send( INF_TOTAL_SIZE, data ); - if (slaveWriteError) exit(); - - //this one is usually called before the first item is listed in listDir() - struct timeval tp; - gettimeofday(&tp, 0); - listEntry_sec = tp.tv_sec; - listEntry_usec = tp.tv_usec; - d->totalSize=_bytes; - d->sentListEntries=0; -} - -void SlaveBase::processedSize( TDEIO::filesize_t _bytes ) -{ - bool emitSignal=false; - struct timeval tv; - int gettimeofday_res=gettimeofday( &tv, 0L ); - - if( _bytes == d->totalSize ) - emitSignal=true; - else if ( gettimeofday_res == 0 ) { - time_t msecdiff = 2000; - if (d->last_tv.tv_sec) { - // Compute difference, in ms - msecdiff = 1000 * ( tv.tv_sec - d->last_tv.tv_sec ); - time_t usecdiff = tv.tv_usec - d->last_tv.tv_usec; - if ( usecdiff < 0 ) { - msecdiff--; - msecdiff += 1000; - } - msecdiff += usecdiff / 1000; - } - emitSignal=msecdiff >= 100; // emit size 10 times a second - } - - if( emitSignal ) { - KIO_DATA << KIO_FILESIZE_T(_bytes); - slaveWriteError = false; - m_pConnection->send( INF_PROCESSED_SIZE, data ); - if (slaveWriteError) exit(); - if ( gettimeofday_res == 0 ) { - d->last_tv.tv_sec = tv.tv_sec; - d->last_tv.tv_usec = tv.tv_usec; - } - } -// d->processed_size = _bytes; -} - -void SlaveBase::processedPercent( float /* percent */ ) -{ - kdDebug(7019) << "SlaveBase::processedPercent: STUB" << endl; -} - - -void SlaveBase::speed( unsigned long _bytes_per_second ) -{ - KIO_DATA << (TQ_UINT32) _bytes_per_second; - slaveWriteError = false; - m_pConnection->send( INF_SPEED, data ); - if (slaveWriteError) exit(); -} - -void SlaveBase::redirection( const KURL& _url ) -{ - KIO_DATA << _url; - m_pConnection->send( INF_REDIRECTION, data ); -} - -void SlaveBase::errorPage() -{ - m_pConnection->send( INF_ERROR_PAGE ); -} - -static bool isSubCommand(int cmd) -{ - return ( (cmd == CMD_REPARSECONFIGURATION) || - (cmd == CMD_META_DATA) || - (cmd == CMD_CONFIG) || - (cmd == CMD_SUBURL) || - (cmd == CMD_SLAVE_STATUS) || - (cmd == CMD_SLAVE_CONNECT) || - (cmd == CMD_SLAVE_HOLD) || - (cmd == CMD_MULTI_GET)); -} - -void SlaveBase::mimeType( const TQString &_type) -{ - // kdDebug(7019) << "(" << getpid() << ") SlaveBase::mimeType '" << _type << "'" << endl; - int cmd; - do - { - // Send the meta-data each time we send the mime-type. - if (!mOutgoingMetaData.isEmpty()) - { - // kdDebug(7019) << "(" << getpid() << ") mimeType: emitting meta data" << endl; - KIO_DATA << mOutgoingMetaData; - m_pConnection->send( INF_META_DATA, data ); - } - KIO_DATA << _type; - m_pConnection->send( INF_MIME_TYPE, data ); - while(true) - { - cmd = 0; - if ( m_pConnection->read( &cmd, data ) == -1 ) { - kdDebug(7019) << "SlaveBase: mimetype: read error" << endl; - exit(); - } - // kdDebug(7019) << "(" << getpid() << ") Slavebase: mimetype got " << cmd << endl; - if ( cmd == CMD_HOST) // Ignore. - continue; - if ( isSubCommand(cmd) ) - { - dispatch( cmd, data ); - continue; // Disguised goto - } - break; - } - } - while (cmd != CMD_NONE); - mOutgoingMetaData.clear(); -} - -void SlaveBase::exit() -{ - this->~SlaveBase(); - ::exit(255); -} - -void SlaveBase::warning( const TQString &_msg) -{ - KIO_DATA << _msg; - m_pConnection->send( INF_WARNING, data ); -} - -void SlaveBase::infoMessage( const TQString &_msg) -{ - KIO_DATA << _msg; - m_pConnection->send( INF_INFOMESSAGE, data ); -} - -bool SlaveBase::requestNetwork(const TQString& host) -{ - KIO_DATA << host << d->slaveid; - m_pConnection->send( MSG_NET_REQUEST, data ); - - if ( waitForAnswer( INF_NETWORK_STATUS, 0, data ) != -1 ) - { - bool status; - TQDataStream stream( data, IO_ReadOnly ); - stream >> status; - return status; - } else - return false; -} - -void SlaveBase::dropNetwork(const TQString& host) -{ - KIO_DATA << host << d->slaveid; - m_pConnection->send( MSG_NET_DROP, data ); -} - -void SlaveBase::statEntry( const UDSEntry& entry ) -{ - KIO_DATA << entry; - slaveWriteError = false; - m_pConnection->send( MSG_STAT_ENTRY, data ); - if (slaveWriteError) exit(); -} - -void SlaveBase::listEntry( const UDSEntry& entry, bool _ready ) -{ - static struct timeval tp; - static const int maximum_updatetime = 300; - static const int minimum_updatetime = 100; - - if (!_ready) { - pendingListEntries.append(entry); - - if (pendingListEntries.count() > listEntryCurrentSize) { - gettimeofday(&tp, 0); - - long diff = ((tp.tv_sec - listEntry_sec) * 1000000 + - tp.tv_usec - listEntry_usec) / 1000; - if (diff==0) diff=1; - - if (diff > maximum_updatetime) { - listEntryCurrentSize = listEntryCurrentSize * 3 / 4; - _ready = true; - } -//if we can send all list entries of this dir which have not yet been sent -//within maximum_updatetime, then make listEntryCurrentSize big enough for all of them - else if (((pendingListEntries.count()*maximum_updatetime)/diff) > (d->totalSize-d->sentListEntries)) - listEntryCurrentSize=d->totalSize-d->sentListEntries+1; -//if we are below minimum_updatetime, estimate how much we will get within -//maximum_updatetime - else if (diff < minimum_updatetime) - listEntryCurrentSize = (pendingListEntries.count() * maximum_updatetime) / diff; - else - _ready=true; - } - } - if (_ready) { // may happen when we started with !ready - listEntries( pendingListEntries ); - pendingListEntries.clear(); - - gettimeofday(&tp, 0); - listEntry_sec = tp.tv_sec; - listEntry_usec = tp.tv_usec; - } -} - -void SlaveBase::listEntries( const UDSEntryList& list ) -{ - KIO_DATA << (TQ_UINT32)list.count(); - UDSEntryListConstIterator it = list.begin(); - UDSEntryListConstIterator end = list.end(); - for (; it != end; ++it) - stream << *it; - slaveWriteError = false; - m_pConnection->send( MSG_LIST_ENTRIES, data); - if (slaveWriteError) exit(); - d->sentListEntries+=(uint)list.count(); -} - -void SlaveBase::sendAuthenticationKey( const TQCString& key, - const TQCString& group, - bool keepPass ) -{ - KIO_DATA << key << group << keepPass; - m_pConnection->send( MSG_AUTH_KEY, data ); -} - -void SlaveBase::delCachedAuthentication( const TQString& key ) -{ - KIO_DATA << key.utf8() ; - m_pConnection->send( MSG_DEL_AUTH_KEY, data ); -} - -void SlaveBase::sigsegv_handler(int sig) -{ -#ifdef Q_OS_UNIX - signal(sig,SIG_DFL); // Next one kills - - //Kill us if we deadlock - signal(SIGALRM,SIG_DFL); - alarm(5); //generate an alarm signal in 5 seconds, in this time the slave has to exit - - // Debug and printf should be avoided because they might - // call malloc.. and get in a nice recursive malloc loop - char buffer[120]; - snprintf(buffer, sizeof(buffer), "kioslave: ####### CRASH ###### protocol = %s pid = %d signal = %d\n", s_protocol, getpid(), sig); - write(2, buffer, strlen(buffer)); -#ifndef NDEBUG -#ifdef HAVE_BACKTRACE - void* trace[256]; - int n = backtrace(trace, 256); - if (n) - backtrace_symbols_fd(trace, n, 2); -#endif -#endif - ::exit(1); -#endif -} - -void SlaveBase::sigpipe_handler (int) -{ - // We ignore a SIGPIPE in slaves. - // A SIGPIPE can happen in two cases: - // 1) Communication error with application. - // 2) Communication error with network. - slaveWriteError = true; - - // Don't add anything else here, especially no debug output -} - -void SlaveBase::setHost(TQString const &, int, TQString const &, TQString const &) -{ -} - -void SlaveBase::openConnection(void) -{ error( ERR_UNSUPPORTED_ACTION, unsupportedActionErrorString(mProtocol, CMD_CONNECT)); } -void SlaveBase::closeConnection(void) -{ } // No response! -void SlaveBase::stat(KURL const &) -{ error( ERR_UNSUPPORTED_ACTION, unsupportedActionErrorString(mProtocol, CMD_STAT)); } -void SlaveBase::put(KURL const &, int, bool, bool) -{ error( ERR_UNSUPPORTED_ACTION, unsupportedActionErrorString(mProtocol, CMD_PUT)); } -void SlaveBase::special(const TQByteArray &) -{ error( ERR_UNSUPPORTED_ACTION, unsupportedActionErrorString(mProtocol, CMD_SPECIAL)); } -void SlaveBase::listDir(KURL const &) -{ error( ERR_UNSUPPORTED_ACTION, unsupportedActionErrorString(mProtocol, CMD_LISTDIR)); } -void SlaveBase::get(KURL const & ) -{ error( ERR_UNSUPPORTED_ACTION, unsupportedActionErrorString(mProtocol, CMD_GET)); } -void SlaveBase::mimetype(KURL const &url) -{ get(url); } -void SlaveBase::rename(KURL const &, KURL const &, bool) -{ error( ERR_UNSUPPORTED_ACTION, unsupportedActionErrorString(mProtocol, CMD_RENAME)); } -void SlaveBase::symlink(TQString const &, KURL const &, bool) -{ error( ERR_UNSUPPORTED_ACTION, unsupportedActionErrorString(mProtocol, CMD_SYMLINK)); } -void SlaveBase::copy(KURL const &, KURL const &, int, bool) -{ error( ERR_UNSUPPORTED_ACTION, unsupportedActionErrorString(mProtocol, CMD_COPY)); } -void SlaveBase::del(KURL const &, bool) -{ error( ERR_UNSUPPORTED_ACTION, unsupportedActionErrorString(mProtocol, CMD_DEL)); } -void SlaveBase::mkdir(KURL const &, int) -{ error( ERR_UNSUPPORTED_ACTION, unsupportedActionErrorString(mProtocol, CMD_MKDIR)); } -void SlaveBase::chmod(KURL const &, int) -{ error( ERR_UNSUPPORTED_ACTION, unsupportedActionErrorString(mProtocol, CMD_CHMOD)); } -void SlaveBase::setSubURL(KURL const &) -{ error( ERR_UNSUPPORTED_ACTION, unsupportedActionErrorString(mProtocol, CMD_SUBURL)); } -void SlaveBase::multiGet(const TQByteArray &) -{ error( ERR_UNSUPPORTED_ACTION, unsupportedActionErrorString(mProtocol, CMD_MULTI_GET)); } - - -void SlaveBase::slave_status() -{ slaveStatus( TQString::null, false ); } - -void SlaveBase::reparseConfiguration() -{ -} - -void SlaveBase::localURL(const KURL& remoteURL) -{ - bool local = remoteURL.isLocalFile(); - TQ_INT8 islocal; - KURL retURL; - if (local) { - islocal = true; - retURL = remoteURL; - } - else { - islocal = false; - retURL = remoteURL; - } - KIO_DATA << islocal << retURL; - m_pConnection->send( INF_LOCALURL, data ); -} - -bool SlaveBase::dispatch() -{ - assert( m_pConnection ); - - int cmd; - TQByteArray data; - if ( m_pConnection->read( &cmd, data ) == -1 ) - { - kdDebug(7019) << "SlaveBase::dispatch() has read error." << endl; - return false; - } - - dispatch( cmd, data ); - return true; -} - -bool SlaveBase::openPassDlg( AuthInfo& info ) -{ - return openPassDlg(info, TQString::null); -} - -bool SlaveBase::openPassDlg( AuthInfo& info, const TQString &errorMsg ) -{ - TQCString replyType; - TQByteArray params; - TQByteArray reply; - AuthInfo authResult; - long windowId = metaData("window-id").toLong(); - long progressId = metaData("progress-id").toLong(); - unsigned long userTimestamp = metaData("user-timestamp").toULong(); - - kdDebug(7019) << "SlaveBase::openPassDlg window-id=" << windowId << " progress-id=" << progressId << endl; - - (void) dcopClient(); // Make sure to have a dcop client. - - UIServer_stub uiserver( "kio_uiserver", "UIServer" ); - if (progressId) - uiserver.setJobVisible( progressId, false ); - - TQDataStream stream(params, IO_WriteOnly); - - if (metaData("no-auth-prompt").lower() == "true") - stream << info << TQString("") << windowId << s_seqNr << userTimestamp; - else - stream << info << errorMsg << windowId << s_seqNr << userTimestamp; - - bool callOK = d->dcopClient->call( "kded", "kpasswdserver", "queryAuthInfo(TDEIO::AuthInfo, TQString, long int, long int, unsigned long int)", - params, replyType, reply ); - - if (progressId) - uiserver.setJobVisible( progressId, true ); - - if (!callOK) - { - kdWarning(7019) << "Can't communicate with kded_kpasswdserver!" << endl; - return false; - } - - if ( replyType == "TDEIO::AuthInfo" ) - { - TQDataStream stream2( reply, IO_ReadOnly ); - stream2 >> authResult >> s_seqNr; - } - else - { - kdError(7019) << "DCOP function queryAuthInfo(...) returns " - << replyType << ", expected TDEIO::AuthInfo" << endl; - return false; - } - - if (!authResult.isModified()) - return false; - - info = authResult; - - kdDebug(7019) << "SlaveBase::openPassDlg: username=" << info.username << endl; - kdDebug(7019) << "SlaveBase::openPassDlg: password=[hidden]" << endl; - - return true; -} - -int SlaveBase::messageBox( MessageBoxType type, const TQString &text, const TQString &caption, - const TQString &buttonYes, const TQString &buttonNo ) -{ - return messageBox( text, type, caption, buttonYes, buttonNo, TQString::null ); -} - -int SlaveBase::messageBox( const TQString &text, MessageBoxType type, const TQString &caption, - const TQString &buttonYes, const TQString &buttonNo, const TQString &dontAskAgainName ) -{ - kdDebug(7019) << "messageBox " << type << " " << text << " - " << caption << buttonYes << buttonNo << endl; - KIO_DATA << (TQ_INT32)type << text << caption << buttonYes << buttonNo << dontAskAgainName; - m_pConnection->send( INF_MESSAGEBOX, data ); - if ( waitForAnswer( CMD_MESSAGEBOXANSWER, 0, data ) != -1 ) - { - TQDataStream stream( data, IO_ReadOnly ); - int answer; - stream >> answer; - kdDebug(7019) << "got messagebox answer" << answer << endl; - return answer; - } else - return 0; // communication failure -} - -bool SlaveBase::canResume( TDEIO::filesize_t offset ) -{ - kdDebug(7019) << "SlaveBase::canResume offset=" << TDEIO::number(offset) << endl; - d->needSendCanResume = false; - KIO_DATA << KIO_FILESIZE_T(offset); - m_pConnection->send( MSG_RESUME, data ); - if ( offset ) - { - int cmd; - if ( waitForAnswer( CMD_RESUMEANSWER, CMD_NONE, data, &cmd ) != -1 ) - { - kdDebug(7019) << "SlaveBase::canResume returning " << (cmd == CMD_RESUMEANSWER) << endl; - return cmd == CMD_RESUMEANSWER; - } else - return false; - } - else // No resuming possible -> no answer to wait for - return true; -} - - - -int SlaveBase::waitForAnswer( int expected1, int expected2, TQByteArray & data, int *pCmd ) -{ - int cmd, result; - for (;;) - { - result = m_pConnection->read( &cmd, data ); - if ( result == -1 ) - { - kdDebug(7019) << "SlaveBase::waitForAnswer has read error." << endl; - return -1; - } - if ( cmd == expected1 || cmd == expected2 ) - { - if ( pCmd ) *pCmd = cmd; - return result; - } - if ( isSubCommand(cmd) ) - { - dispatch( cmd, data ); - } - else - { - kdWarning() << "Got cmd " << cmd << " while waiting for an answer!" << endl; - } - } -} - - -int SlaveBase::readData( TQByteArray &buffer) -{ - int result = waitForAnswer( MSG_DATA, 0, buffer ); - //kdDebug(7019) << "readData: length = " << result << " " << endl; - return result; -} - -void SlaveBase::setTimeoutSpecialCommand(int timeout, const TQByteArray &data) -{ - if (timeout > 0) - d->timeout = time(0)+(time_t)timeout; - else if (timeout == 0) - d->timeout = 1; // Immediate timeout - else - d->timeout = 0; // Canceled - - d->timeoutData = data; -} - -void SlaveBase::dispatch( int command, const TQByteArray &data ) -{ - TQDataStream stream( data, IO_ReadOnly ); - - KURL url; - int i; - - switch( command ) { - case CMD_HOST: { - // Reset s_seqNr, see kpasswdserver/DESIGN - s_seqNr = 0; - TQString passwd; - TQString host, user; - stream >> host >> i >> user >> passwd; - setHost( host, i, user, passwd ); - } - break; - case CMD_CONNECT: - openConnection( ); - break; - case CMD_DISCONNECT: - closeConnection( ); - break; - case CMD_SLAVE_STATUS: - slave_status(); - break; - case CMD_SLAVE_CONNECT: - { - d->onHold = false; - TQString app_socket; - TQDataStream stream( data, IO_ReadOnly); - stream >> app_socket; - appconn->send( MSG_SLAVE_ACK ); - disconnectSlave(); - mConnectedToApp = true; - connectSlave(app_socket); - } break; - case CMD_SLAVE_HOLD: - { - KURL url; - TQDataStream stream( data, IO_ReadOnly); - stream >> url; - d->onHoldUrl = url; - d->onHold = true; - disconnectSlave(); - mConnectedToApp = false; - // Do not close connection! - connectSlave(mPoolSocket); - } break; - case CMD_REPARSECONFIGURATION: - reparseConfiguration(); - break; - case CMD_CONFIG: - stream >> d->configData; -#ifdef Q_OS_UNIX //TODO: not yet available on WIN32 - KSocks::setConfig(d->config); -#endif - delete d->remotefile; - d->remotefile = 0; - break; - case CMD_GET: - { - stream >> url; - get( url ); - } break; - case CMD_PUT: - { - int permissions; - TQ_INT8 iOverwrite, iResume; - stream >> url >> iOverwrite >> iResume >> permissions; - bool overwrite = ( iOverwrite != 0 ); - bool resume = ( iResume != 0 ); - - // Remember that we need to send canResume(), TransferJob is expecting - // it. Well, in theory this shouldn't be done if resume is true. - // (the resume bool is currently unused) - d->needSendCanResume = true /* !resume */; - - put( url, permissions, overwrite, resume); - } break; - case CMD_STAT: - stream >> url; - stat( url ); - break; - case CMD_MIMETYPE: - stream >> url; - mimetype( url ); - break; - case CMD_LISTDIR: - stream >> url; - listDir( url ); - break; - case CMD_MKDIR: - stream >> url >> i; - mkdir( url, i ); - break; - case CMD_RENAME: - { - TQ_INT8 iOverwrite; - KURL url2; - stream >> url >> url2 >> iOverwrite; - bool overwrite = (iOverwrite != 0); - rename( url, url2, overwrite ); - } break; - case CMD_SYMLINK: - { - TQ_INT8 iOverwrite; - TQString target; - stream >> target >> url >> iOverwrite; - bool overwrite = (iOverwrite != 0); - symlink( target, url, overwrite ); - } break; - case CMD_COPY: - { - int permissions; - TQ_INT8 iOverwrite; - KURL url2; - stream >> url >> url2 >> permissions >> iOverwrite; - bool overwrite = (iOverwrite != 0); - copy( url, url2, permissions, overwrite ); - } break; - case CMD_DEL: - { - TQ_INT8 isFile; - stream >> url >> isFile; - del( url, isFile != 0); - } break; - case CMD_CHMOD: - stream >> url >> i; - chmod( url, i); - break; - case CMD_SPECIAL: - special( data ); - break; - case CMD_META_DATA: - //kdDebug(7019) << "(" << getpid() << ") Incoming meta-data..." << endl; - stream >> mIncomingMetaData; - break; - case CMD_SUBURL: - stream >> url; - setSubURL(url); - break; - case CMD_NONE: - fprintf(stderr, "Got unexpected CMD_NONE!\n"); - break; - case CMD_MULTI_GET: - multiGet( data ); - break; - case CMD_LOCALURL: - { - stream >> url; - localURL( url ); - } break; - default: - // Some command we don't understand. - // Just ignore it, it may come from some future version of KDE. - break; - } -} - -TQString SlaveBase::createAuthCacheKey( const KURL& url ) -{ - if( !url.isValid() ) - return TQString::null; - - // Generate the basic key sequence. - TQString key = url.protocol(); - key += '-'; - key += url.host(); - int port = url.port(); - if( port ) - { - key += ':'; - key += TQString::number(port); - } - - return key; -} - -bool SlaveBase::pingCacheDaemon() const -{ -#ifdef Q_OS_UNIX - // TODO: Ping kded / kpasswdserver - KDEsuClient client; - int success = client.ping(); - if( success == -1 ) - { - success = client.startServer(); - if( success == -1 ) - { - kdDebug(7019) << "Cannot start a new deamon!!" << endl; - return false; - } - kdDebug(7019) << "Sucessfully started new cache deamon!!" << endl; - } - return true; -#else - return false; -#endif -} - -bool SlaveBase::checkCachedAuthentication( AuthInfo& info ) -{ - TQCString replyType; - TQByteArray params; - TQByteArray reply; - AuthInfo authResult; - long windowId = metaData("window-id").toLong(); - unsigned long userTimestamp = metaData("user-timestamp").toULong(); - - kdDebug(7019) << "SlaveBase::checkCachedAuthInfo window = " << windowId << " url = " << info.url.url() << endl; - - (void) dcopClient(); // Make sure to have a dcop client. - - TQDataStream stream(params, IO_WriteOnly); - stream << info << windowId << userTimestamp; - - if ( !d->dcopClient->call( "kded", "kpasswdserver", "checkAuthInfo(TDEIO::AuthInfo, long int, unsigned long int)", - params, replyType, reply ) ) - { - kdWarning(7019) << "Can't communicate with kded_kpasswdserver!" << endl; - return false; - } - - if ( replyType == "TDEIO::AuthInfo" ) - { - TQDataStream stream2( reply, IO_ReadOnly ); - stream2 >> authResult; - } - else - { - kdError(7019) << "DCOP function checkAuthInfo(...) returns " - << replyType << ", expected TDEIO::AuthInfo" << endl; - return false; - } - if (!authResult.isModified()) - { - return false; - } - - info = authResult; - return true; -} - -bool SlaveBase::cacheAuthentication( const AuthInfo& info ) -{ - TQByteArray params; - long windowId = metaData("window-id").toLong(); - - (void) dcopClient(); // Make sure to have a dcop client. - - TQDataStream stream(params, IO_WriteOnly); - stream << info << windowId; - - d->dcopClient->send( "kded", "kpasswdserver", "addAuthInfo(TDEIO::AuthInfo, long int)", params ); - - return true; -} - -int SlaveBase::connectTimeout() -{ - bool ok; - TQString tmp = metaData("ConnectTimeout"); - int result = tmp.toInt(&ok); - if (ok) - return result; - return DEFAULT_CONNECT_TIMEOUT; -} - -int SlaveBase::proxyConnectTimeout() -{ - bool ok; - TQString tmp = metaData("ProxyConnectTimeout"); - int result = tmp.toInt(&ok); - if (ok) - return result; - return DEFAULT_PROXY_CONNECT_TIMEOUT; -} - - -int SlaveBase::responseTimeout() -{ - bool ok; - TQString tmp = metaData("ResponseTimeout"); - int result = tmp.toInt(&ok); - if (ok) - return result; - return DEFAULT_RESPONSE_TIMEOUT; -} - - -int SlaveBase::readTimeout() -{ - bool ok; - TQString tmp = metaData("ReadTimeout"); - int result = tmp.toInt(&ok); - if (ok) - return result; - return DEFAULT_READ_TIMEOUT; -} - -bool SlaveBase::wasKilled() const -{ - return d->wasKilled; -} - -void SlaveBase::setKillFlag() -{ - d->wasKilled=true; -} - -void SlaveBase::virtual_hook( int, void* ) -{ /*BASE::virtual_hook( id, data );*/ } - diff --git a/kio/kio/slavebase.h b/kio/kio/slavebase.h deleted file mode 100644 index a65a1f94f..000000000 --- a/kio/kio/slavebase.h +++ /dev/null @@ -1,847 +0,0 @@ -/* - Copyright (C) 2000 David Faure - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef __slavebase_h -#define __slavebase_h - -#include -#include -#include -#include - -class DCOPClient; -class KRemoteEncoding; - -namespace TDEIO { - -class Connection; -class SlaveBasePrivate; - -/** - * There are two classes that specifies the protocol between application (job) - * and kioslave. SlaveInterface is the class to use on the application end, - * SlaveBase is the one to use on the slave end. - * - * Slave implementations should simply inherit SlaveBase - * - * A call to foo() results in a call to slotFoo() on the other end. - */ -class TDEIO_EXPORT SlaveBase -{ -public: - SlaveBase( const TQCString &protocol, const TQCString &pool_socket, const TQCString &app_socket); - virtual ~SlaveBase(); - - /** - * @internal - * Terminate the slave by calling the destructor and then ::exit() - */ - void exit(); - - /** - * @internal - */ - void dispatchLoop(); - - /** - * @internal - */ - void setConnection( Connection* connection ) { m_pConnection = connection; } - /** - * @internal - */ - Connection *connection() const { return m_pConnection; } - - - /////////// - // Message Signals to send to the job - /////////// - - /** - * Sends data in the slave to the job (i.e. in get). - * - * To signal end of data, simply send an empty - * TQByteArray(). - * - * @param data the data read by the slave - */ - void data( const TQByteArray &data ); - - /** - * Asks for data from the job. - * @see readData - */ - void dataReq( ); - - /** - * Call to signal an error. - * This also finishes the job, no need to call finished. - * - * If the Error code is TDEIO::ERR_SLAVE_DEFINED then the - * _text should contain the complete translated text of - * of the error message. This message will be displayed - * in an KTextBrowser which allows rich text complete - * with hyper links. Email links will call the default - * mailer, "exec:/command arg1 arg2" will be forked and - * all other links will call the default browser. - * - * @see TDEIO::Error - * @see KTextBrowser - * @param _errid the error code from TDEIO::Error - * @param _text the rich text error message - */ - void error( int _errid, const TQString &_text ); - - /** - * Call in openConnection, if you reimplement it, when you're done. - */ - void connected(); - - /** - * Call to signal successful completion of any command - * (besides openConnection and closeConnection) - */ - void finished(); - - /** - * Call to signal that data from the sub-URL is needed - */ - void needSubURLData(); - - /** - * Used to report the status of the slave. - * @param host the slave is currently connected to. (Should be - * empty if not connected) - * @param connected Whether an actual network connection exists. - **/ - void slaveStatus(const TQString &host, bool connected); - - /** - * Call this from stat() to express details about an object, the - * UDSEntry customarily contains the atoms describing file name, size, - * mimetype, etc. - * @param _entry The UDSEntry containing all of the object attributes. - */ - void statEntry( const UDSEntry& _entry ); - - /** - * Call this in listDir, each time you have a bunch of entries - * to report. - * @param _entry The UDSEntry containing all of the object attributes. - */ - void listEntries( const UDSEntryList& _entry ); - - /** - * Call this at the beginning of put(), to give the size of the existing - * partial file, if there is one. The @p offset argument notifies the - * other job (the one that gets the data) about the offset to use. - * In this case, the boolean returns whether we can indeed resume or not - * (we can't if the protocol doing the get() doesn't support setting an offset) - */ - bool canResume( TDEIO::filesize_t offset ); - - /* - * Call this at the beginning of get(), if the "resume" metadata was set - * and resuming is implemented by this protocol. - */ - void canResume(); - - /////////// - // Info Signals to send to the job - /////////// - - /** - * Call this in get and copy, to give the total size - * of the file - * Call in listDir too, when you know the total number of items. - */ - void totalSize( TDEIO::filesize_t _bytes ); - /** - * Call this during get and copy, once in a while, - * to give some info about the current state. - * Don't emit it in listDir, listEntries speaks for itself. - */ - void processedSize( TDEIO::filesize_t _bytes ); - - /** - * Only use this if you can't know in advance the size of the - * copied data. For example, if you're doing variable bitrate - * compression of the source. - * - * STUB ! Currently unimplemented. Here now for binary compatibility. - * - * Call this during get and copy, once in a while, - * to give some info about the current state. - * Don't emit it in listDir, listEntries speaks for itself. - */ - void processedPercent( float percent ); - - /** - * Call this in get and copy, to give the current transfer - * speed, but only if it can't be calculated out of the size you - * passed to processedSize (in most cases you don't want to call it) - */ - void speed( unsigned long _bytes_per_second ); - - /** - * Call this to signal a redirection - * The job will take care of going to that url. - */ - void redirection( const KURL &_url ); - - /** - * Tell that we will only get an error page here. - * This means: the data you'll get isn't the data you requested, - * but an error page (usually HTML) that describes an error. - */ - void errorPage(); - - /** - * Call this in mimetype() and in get(), when you know the mimetype. - * See mimetype about other ways to implement it. - */ - void mimeType( const TQString &_type ); - - /** - * Call to signal a warning, to be displayed in a dialog box. - */ - void warning( const TQString &msg ); - - /** - * Call to signal a message, to be displayed if the application wants to, - * for instance in a status bar. Usual examples are "connecting to host xyz", etc. - */ - void infoMessage( const TQString &msg ); - - enum MessageBoxType { QuestionYesNo = 1, WarningYesNo = 2, WarningContinueCancel = 3, WarningYesNoCancel = 4, Information = 5, SSLMessageBox = 6 }; - - /** - * Call this to show a message box from the slave - * @param type type of message box: QuestionYesNo, WarningYesNo, WarningContinueCancel... - * @param text Message string. May contain newlines. - * @param caption Message box title. - * @param buttonYes The text for the first button. - * The default is i18n("&Yes"). - * @param buttonNo The text for the second button. - * The default is i18n("&No"). - * Note: for ContinueCancel, buttonYes is the continue button and buttonNo is unused. - * and for Information, none is used. - * @return a button code, as defined in KMessageBox, or 0 on communication error. - */ - int messageBox( MessageBoxType type, const TQString &text, - const TQString &caption = TQString::null, - const TQString &buttonYes = TQString::null, - const TQString &buttonNo = TQString::null ); - - /** - * Call this to show a message box from the slave - * @param text Message string. May contain newlines. - * @param type type of message box: QuestionYesNo, WarningYesNo, WarningContinueCancel... - * @param caption Message box title. - * @param buttonYes The text for the first button. - * The default is i18n("&Yes"). - * @param buttonNo The text for the second button. - * The default is i18n("&No"). - * Note: for ContinueCancel, buttonYes is the continue button and buttonNo is unused. - * and for Information, none is used. - * @param dontAskAgainName A checkbox is added with which further confirmation can be turned off. - * The string is used to lookup and store the setting in kioslaverc. - * @return a button code, as defined in KMessageBox, or 0 on communication error. - * @since 3.3 - */ - int messageBox( const TQString &text, MessageBoxType type, - const TQString &caption = TQString::null, - const TQString &buttonYes = TQString::null, - const TQString &buttonNo = TQString::null, - const TQString &dontAskAgainName = TQString::null ); - - /** - * Sets meta-data to be send to the application before the first - * data() or finished() signal. - */ - void setMetaData(const TQString &key, const TQString &value); - - /** - * Queries for the existence of a certain config/meta-data entry - * send by the application to the slave. - * @since 3.2 - */ - bool hasMetaData(const TQString &key) const; - - /** - * Queries for config/meta-data send by the application to the slave. - * @since 3.2 - */ - TQString metaData(const TQString &key) const; - - /** - * @obsolete kept for binary compatibility - * Queries for the existence of a certain config/meta-data entry - * send by the application to the slave. - */ - bool hasMetaData(const TQString &key); - - /** - * @obsolete kept for binary compatibility - * Queries for config/meta-data sent by the application to the slave. - */ - TQString metaData(const TQString &key); - - /** - * @internal for ForwardingSlaveBase - * Contains all metadata (but no config) sent by the application to the slave. - * @since 3.5.2 - */ - MetaData allMetaData() const { return mIncomingMetaData; } - - /** - * Returns a configuration object to query config/meta-data information - * from. - * - * The application provides the slave with all configuration information - * relevant for the current protocol and host. - */ - TDEConfigBase* config(); - - /** - * Returns an object that can translate remote filenames into proper - * Unicode forms. This encoding can be set by the user. - * - * @since 3.3 - */ - KRemoteEncoding* remoteEncoding(); - - - /////////// - // Commands sent by the job, the slave has to - // override what it wants to implement - /////////// - - /** - * Set the host - * @param host - * @param port - * @param user - * @param pass - * Called directly by createSlave, this is why there is no equivalent in - * SlaveInterface, unlike the other methods. - * - * This method is called whenever a change in host, port or user occurs. - */ - virtual void setHost(const TQString& host, int port, const TQString& user, const TQString& pass); - - /** - * Prepare slave for streaming operation - */ - virtual void setSubURL(const KURL&url); - - /** - * Opens the connection (forced) - * When this function gets called the slave is operating in - * connection-oriented mode. - * When a connection gets lost while the slave operates in - * connection oriented mode, the slave should report - * ERR_CONNECTION_BROKEN instead of reconnecting. The user is - * expected to disconnect the slave in the error handler. - */ - virtual void openConnection(); - - /** - * Closes the connection (forced) - * Called when the application disconnects the slave to close - * any open network connections. - * - * When the slave was operating in connection-oriented mode, - * it should reset itself to connectionless (default) mode. - */ - virtual void closeConnection(); - - /** - * get, aka read. - * @param url the full url for this request. Host, port and user of the URL - * can be assumed to be the same as in the last setHost() call. - * The slave emits the data through data - */ - virtual void get( const KURL& url ); - - /** - * put, i.e. write data into a file. - * - * @param url where to write the file - * @param permissions may be -1. In this case no special permission mode is set. - * @param overwrite if true, any existing file will be overwritten. - * If the file indeed already exists, the slave should NOT apply the - * permissions change to it. - * @param resume currently unused, please ignore. - * The support for resuming using .part files is done by calling canResume(). - * - * IMPORTANT: Use the "modified" metadata in order to set the modification time of the file. - * - * @see canResume() - */ - virtual void put( const KURL& url, int permissions, bool overwrite, bool resume ); - - /** - * Finds all details for one file or directory. - * The information returned is the same as what listDir returns, - * but only for one file or directory. - */ - virtual void stat( const KURL& url ); - - /** - * Finds mimetype for one file or directory. - * - * This method should either emit 'mimeType' or it - * should send a block of data big enough to be able - * to determine the mimetype. - * - * If the slave doesn't reimplement it, a get will - * be issued, i.e. the whole file will be downloaded before - * determining the mimetype on it - this is obviously not a - * good thing in most cases. - */ - virtual void mimetype( const KURL& url ); - - /** - * Lists the contents of @p url. - * The slave should emit ERR_CANNOT_ENTER_DIRECTORY if it doesn't exist, - * if we don't have enough permissions, or if it is a file - * It should also emit totalFiles as soon as it knows how many - * files it will list. - */ - virtual void listDir( const KURL& url ); - - /** - * Create a directory - * @param url path to the directory to create - * @param permissions the permissions to set after creating the directory - * (-1 if no permissions to be set) - * The slave emits ERR_COULD_NOT_MKDIR if failure. - */ - virtual void mkdir( const KURL&url, int permissions ); - - /** - * Rename @p oldname into @p newname. - * If the slave returns an error ERR_UNSUPPORTED_ACTION, the job will - * ask for copy + del instead. - * @param src where to move the file from - * @param dest where to move the file to - * @param overwrite if true, any existing file will be overwritten - */ - virtual void rename( const KURL& src, const KURL& dest, bool overwrite ); - - /** - * Creates a symbolic link named @p dest, pointing to @p target, which - * may be a relative or an absolute path. - * @param target The string that will become the "target" of the link (can be relative) - * @param dest The symlink to create. - * @param overwrite whether to automatically overwrite if the dest exists - */ - virtual void symlink( const TQString& target, const KURL& dest, bool overwrite ); - - /** - * Change permissions on @p path - * The slave emits ERR_DOES_NOT_EXIST or ERR_CANNOT_CHMOD - */ - virtual void chmod( const KURL& url, int permissions ); - - /** - * Copy @p src into @p dest. - * If the slave returns an error ERR_UNSUPPORTED_ACTION, the job will - * ask for get + put instead. - * @param src where to copy the file from (decoded) - * @param dest where to copy the file to (decoded) - * @param permissions may be -1. In this case no special permission mode is set. - * @param overwrite if true, any existing file will be overwritten - * - */ - virtual void copy( const KURL &src, const KURL &dest, int permissions, bool overwrite ); - - /** - * Delete a file or directory. - * @param url file/directory to delete - * @param isfile if true, a file should be deleted. - * if false, a directory should be deleted. - */ - virtual void del( const KURL &url, bool isfile); - - // TODO KDE4: add setLinkDest() or something, to modify symlink targets. - // Will be used for kio_file but also kio_remote (#97129) - - /** - * Used for any command that is specific to this slave (protocol) - * Examples are : HTTP POST, mount and unmount (kio_file) - * - * @param data packed data; the meaning is completely dependent on the - * slave, but usually starts with an int for the command number. - * Document your slave's commands, at least in its header file. - */ - virtual void special( const TQByteArray & data ); - - /** - * Used for multiple get. Currently only used foir HTTP pielining - * support. - * - * @param data packed data; Contains number of URLs to fetch, and for - * each URL the URL itself and its associated MetaData. - */ - virtual void multiGet( const TQByteArray & data ); - - /** - * Called to get the status of the slave. Slave should respond - * by calling slaveStatus(...) - */ - virtual void slave_status(); - - /** - * Called by the scheduler to tell the slave that the configuration - * changed (i.e. proxy settings) . - */ - virtual void reparseConfiguration(); - - /** - * For use with for ForwardingSlaveBase - * Returns the local URL of the given remote URL if possible - * @since R14.0.0 - */ - virtual void localURL( const KURL& remoteURL ); - - /** - * @return timeout value for connecting to remote host. - */ - int connectTimeout(); - - /** - * @return timeout value for connecting to proxy in secs. - */ - int proxyConnectTimeout(); - - /** - * @return timeout value for read from first data from - * remote host in seconds. - */ - int responseTimeout(); - - /** - * @return timeout value for read from subsequent data from - * remote host in secs. - */ - int readTimeout(); - - /** - * This function sets a timeout of @p timeout seconds and calls - * special(data) when the timeout occurs as if it was called by the - * application. - * - * A timeout can only occur when the slave is waiting for a command - * from the application. - * - * Specifying a negative timeout cancels a pending timeout. - * - * Only one timeout at a time is supported, setting a timeout - * cancels any pending timeout. - * @since 3.1 - */ - void setTimeoutSpecialCommand(int timeout, const TQByteArray &data=TQByteArray()); - - /** - * @internal - */ - static void sigsegv_handler(int); - /** - * @internal - */ - static void sigpipe_handler(int); - - ///////////////// - // Dispatching (internal) - //////////////// - - /** - * @internal - */ - virtual bool dispatch(); - /** - * @internal - */ - virtual void dispatch( int command, const TQByteArray &data ); - - /** - * Read data send by the job, after a dataReq - * - * @param buffer buffer where data is stored - * @return 0 on end of data, - * > 0 bytes read - * < 0 error - **/ - int readData( TQByteArray &buffer ); - - /** - * internal function to be called by the slave. - * It collects entries and emits them via listEntries - * when enough of them are there or a certain time - * frame exceeded (to make sure the app gets some - * items in time but not too many items one by one - * as this will cause a drastic performance penalty) - * @param _entry The UDSEntry containing all of the object attributes. - * @param ready set to true after emitting all items. @p _entry is not - * used in this case - */ - void listEntry( const UDSEntry& _entry, bool ready); - - /** - * internal function to connect a slave to/ disconnect from - * either the slave pool or the application - */ - void connectSlave(const TQString& path); - void disconnectSlave(); - - /** - * Prompt the user for Authorization info (login & password). - * - * Use this function to request authorization information from - * the end user. You can also pass an error message which explains - * why a previous authorization attempt failed. Here is a very - * simple example: - * - * \code - * TDEIO::AuthInfo authInfo; - * if ( openPassDlg( authInfo ) ) - * { - * kdDebug() << TQString::fromLatin1("User: ") - * << authInfo.username << endl; - * kdDebug() << TQString::fromLatin1("Password: ") - * << TQString::fromLatin1("Not displayed here!") << endl; - * } - * \endcode - * - * You can also preset some values like the username, caption or - * comment as follows: - * - * \code - * TDEIO::AuthInfo authInfo; - * authInfo.caption= "Acme Password Dialog"; - * authInfo.username= "Wile E. Coyote"; - * TQString errorMsg = "You entered an incorrect password."; - * if ( openPassDlg( authInfo, errorMsg ) ) - * { - * kdDebug() << TQString::fromLatin1("User: ") - * << authInfo.username << endl; - * kdDebug() << TQString::fromLatin1("Password: ") - * << TQString::fromLatin1("Not displayed here!") << endl; - * } - * \endcode - * - * \note You should consider using checkCachedAuthentication() to - * see if the password is available in kpasswdserver before calling - * this function. - * - * \note A call to this function can fail and return @p false, - * if the UIServer could not be started for whatever reason. - * - * @see checkCachedAuthentication - * @param info See AuthInfo. - * @param errorMsg Error message to show - * @return @p true if user clicks on "OK", @p false otherwsie. - * @since 3.1 - */ - bool openPassDlg( TDEIO::AuthInfo& info, const TQString &errorMsg ); - - /** - * Same as above function except it does not need error message. - * BIC: Combine this function with the above for KDE4. - */ - bool openPassDlg( TDEIO::AuthInfo& info ); - - /** - * Checks for cached authentication based on parameters - * given by @p info. - * - * Use this function to check if any cached password exists - * for the URL given by @p info. If @p AuthInfo::realmValue - * and/or @p AuthInfo::verifyPath flag is specified, then - * they will also be factored in determining the presence - * of a cached password. Note that @p Auth::url is a required - * parameter when attempting to check for cached authorization - * info. Here is a simple example: - * - * \code - * AuthInfo info; - * info.url = KURL("http://www.foobar.org/foo/bar"); - * info.username = "somename"; - * info.verifyPath = true; - * if ( !checkCachedAuthentication( info ) ) - * { - * if ( !openPassDlg(info) ) - * .... - * } - * \endcode - * - * @param info See AuthInfo. - * @return @p true if cached Authorization is found, false otherwise. - */ - bool checkCachedAuthentication( AuthInfo& info ); - - /** - * Explicitly store authentication information. openPassDlg already - * stores password information automatically, you only need to call - * this function if you want to store authentication information that - * is different from the information returned by openPassDlg. - */ - bool cacheAuthentication( const AuthInfo& info ); - - /** - * @obsolete as of 3.1. - * TODO: Remove before KDE 4.0 - */ - bool pingCacheDaemon() const; - - /** - * @obsolete as of 3.1. Use openPassDlg instead. - * TODO: Remove before KDE 4.0 - * Creates a basic key to be used to cache the password. - * @param url the url from which the key is supposed to be generated - */ - TQString createAuthCacheKey( const KURL& url ); - - /** - * @obsolete as of 3.1. Use openPassDlg instead. - * TODO: Remove before KDE 4.0 - * - * Cache authentication information is now stored automatically - * by openPassDlg. - */ - void sendAuthenticationKey( const TQCString& gKey, const TQCString& key, bool keep ); - - /** - * @obsolete as of 3.1. Use openPassDlg instead. - * TODO: Remove before KDE 4.0 - * - * Cached authentication information is now session based and - * removed automatically when a given session ends, i.e. the - * application is closed. - */ - void delCachedAuthentication( const TQString& key ); - - /** - * @obsolete as of 3.1. Use openPassDlg instead. - * TODO: Remove before KDE 4.0 - */ - void setMultipleAuthCaching( bool ) {}; - - /** - * @obsolete as of 3.1. Use openPassDlg instead. - * TODO: Remove before KDE 4.0 - */ - bool multipleAuthCaching() const { return false; } - - /** - * Used by the slave to check if it can connect - * to a given host. This should be called where the slave is ready - * to do a ::connect() on a socket. For each call to - * requestNetwork must exist a matching call to - * dropNetwork, or the system will stay online until - * KNetMgr gets closed (or the SlaveBase gets destructed)! - * - * If KNetMgr is not running, then this is a no-op and returns true - * - * @param host tells the netmgr the host the slave wants to connect - * to. As this could also be a proxy, we can't just take - * the host currenctly connected to (but that's the default - * value) - * - * @return true in theorie, the host is reachable - * false the system is offline and the host is in a remote network. - */ - bool requestNetwork(const TQString& host = TQString::null); - - /** - * Used by the slave to withdraw a connection requested by - * requestNetwork. This function cancels the last call to - * requestNetwork. If a client uses more than one internet - * connection, it must use dropNetwork(host) to - * stop each request. - * - * If KNetMgr is not running, then this is a no-op. - * - * @param host the host passed to requestNetwork - * - * A slave should call this function every time it disconnect from a host. - * */ - void dropNetwork(const TQString& host = TQString::null); - - /** - * Return the dcop client used by this slave. - * @since 3.1 - */ - DCOPClient *dcopClient(); - - /** - * Wait for an answer to our request, until we get @p expected1 or @p expected2 - * @return the result from readData, as well as the cmd in *pCmd if set, and the data in @p data - */ - int waitForAnswer( int expected1, int expected2, TQByteArray & data, int * pCmd = 0 ); - - /** - * Internal function to transmit meta data to the application. - */ - void sendMetaData(); - - /** - * Name of the protocol supported by this slave - */ - TQCString mProtocol; - - Connection * m_pConnection; - - MetaData mOutgoingMetaData; - MetaData mIncomingMetaData; - - /** If your ioslave was killed by a signal, wasKilled() returns true. - Check it regularly in lengthy functions (e.g. in get();) and return - as fast as possible from this function if wasKilled() returns true. - This will ensure that your slave destructor will be called correctly. - @since 3.1 - */ - bool wasKilled() const; - - /** Internally used. - * @internal - * @since 3.1 - */ - void setKillFlag(); - -protected: - UDSEntryList pendingListEntries; - uint listEntryCurrentSize; - long listEntry_sec, listEntry_usec; - Connection *appconn; - TQString mPoolSocket; - TQString mAppSocket; - bool mConnectedToApp; - static long s_seqNr; - virtual void virtual_hook( int id, void* data ); - -private: - SlaveBasePrivate *d; -}; - -} - -#endif diff --git a/kio/kio/slaveconfig.cpp b/kio/kio/slaveconfig.cpp deleted file mode 100644 index c0ec44779..000000000 --- a/kio/kio/slaveconfig.cpp +++ /dev/null @@ -1,225 +0,0 @@ -// -*- c++ -*- -/* - * This file is part of the KDE libraries - * Copyright (c) 2001 Waldo Bastian - * - * $Id$ - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License version 2 as published by the Free Software Foundation. - * - * This library 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 - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public License - * along with this library; see the file COPYING.LIB. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - **/ - -#include - -#include - -#include -#include -#include -#include - -#include "slaveconfig.h" - -using namespace TDEIO; - -namespace TDEIO { - -class SlaveConfigProtocol -{ -public: - SlaveConfigProtocol() { host.setAutoDelete(true); } - ~SlaveConfigProtocol() - { - delete configFile; - } - -public: - MetaData global; - TQDict host; - TDEConfig *configFile; -}; - -static void readConfig(TDEConfig *config, const TQString & group, MetaData *metaData) -{ - *metaData += config->entryMap(group); -} - -class SlaveConfigPrivate -{ - public: - void readGlobalConfig(); - SlaveConfigProtocol *readProtocolConfig(const TQString &_protocol); - SlaveConfigProtocol *findProtocolConfig(const TQString &_protocol); - void readConfigProtocolHost(const TQString &_protocol, SlaveConfigProtocol *scp, const TQString &host); - public: - MetaData global; - TQDict protocol; -}; - -void SlaveConfigPrivate::readGlobalConfig() -{ - global.clear(); - // Read stuff... - TDEConfig *config = KProtocolManager::config(); - readConfig(TDEGlobal::config(), "Socks", &global); // Socks settings. - if ( config ) - readConfig(config, "", &global); -} - -SlaveConfigProtocol* SlaveConfigPrivate::readProtocolConfig(const TQString &_protocol) -{ - SlaveConfigProtocol *scp = protocol.find(_protocol); - if (!scp) - { - TQString filename = KProtocolInfo::config(_protocol); - scp = new SlaveConfigProtocol; - scp->configFile = new TDEConfig(filename, true, false); - protocol.insert(_protocol, scp); - } - // Read global stuff... - readConfig(scp->configFile, "", &(scp->global)); - return scp; -} - -SlaveConfigProtocol* SlaveConfigPrivate::findProtocolConfig(const TQString &_protocol) -{ - SlaveConfigProtocol *scp = protocol.find(_protocol); - if (!scp) - scp = readProtocolConfig(_protocol); - return scp; -} - -void SlaveConfigPrivate::readConfigProtocolHost(const TQString &, SlaveConfigProtocol *scp, const TQString &host) -{ - MetaData *metaData = new MetaData; - scp->host.replace(host, metaData); - - // Read stuff - // Break host into domains - TQString domain = host; - - if (!domain.contains('.')) - { - // Host without domain. - if (scp->configFile->hasGroup("")) - readConfig(scp->configFile, "", metaData); - } - - int pos = 0; - do - { - pos = host.findRev('.', pos-1); - - if (pos < 0) - domain = host; - else - domain = host.mid(pos+1); - - if (scp->configFile->hasGroup(domain)) - readConfig(scp->configFile, domain.lower(), metaData); - } - while (pos > 0); -} - - -SlaveConfig *SlaveConfig::_self = 0; -static KStaticDeleter slaveconfigsd; - -SlaveConfig *SlaveConfig::self() -{ - if (!_self) - _self = slaveconfigsd.setObject(_self, new SlaveConfig); - return _self; -} - -SlaveConfig::SlaveConfig() -{ - d = new SlaveConfigPrivate; - d->protocol.setAutoDelete(true); - d->readGlobalConfig(); -} - -SlaveConfig::~SlaveConfig() -{ - delete d; d = 0; - _self = 0; -} - -void SlaveConfig::setConfigData(const TQString &protocol, - const TQString &host, - const TQString &key, - const TQString &value ) -{ - MetaData config; - config.insert(key, value); - setConfigData(protocol, host, config); -} - -void SlaveConfig::setConfigData(const TQString &protocol, const TQString &host, const MetaData &config ) -{ - if (protocol.isEmpty()) - d->global += config; - else { - SlaveConfigProtocol *scp = d->findProtocolConfig(protocol); - if (host.isEmpty()) - { - scp->global += config; - } - else - { - MetaData *hostConfig = scp->host.find(host); - if (!hostConfig) - { - d->readConfigProtocolHost(protocol, scp, host); - hostConfig = scp->host.find(host); - assert(hostConfig); - } - *hostConfig += config; - } - } -} - -MetaData SlaveConfig::configData(const TQString &protocol, const TQString &host) -{ - MetaData config = d->global; - SlaveConfigProtocol *scp = d->findProtocolConfig(protocol); - config += scp->global; - if (host.isEmpty()) - return config; - MetaData *hostConfig = scp->host.find(host); - if (!hostConfig) - { - d->readConfigProtocolHost(protocol, scp, host); - emit configNeeded(protocol, host); - hostConfig = scp->host.find(host); - assert(hostConfig); - } - config += *hostConfig; - return config; -} - -TQString SlaveConfig::configData(const TQString &protocol, const TQString &host, const TQString &key) -{ - return configData(protocol, host)[key]; -} - -void SlaveConfig::reset() -{ - d->protocol.clear(); - d->readGlobalConfig(); -} - -} - -#include "slaveconfig.moc" diff --git a/kio/kio/slaveconfig.h b/kio/kio/slaveconfig.h deleted file mode 100644 index 5bdc6cda8..000000000 --- a/kio/kio/slaveconfig.h +++ /dev/null @@ -1,106 +0,0 @@ -// -*- c++ -*- -/* - * This file is part of the KDE libraries - * Copyright (c) 2001 Waldo Bastian - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License version 2 as published by the Free Software Foundation. - * - * This library 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 - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public License - * along with this library; see the file COPYING.LIB. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - **/ - -#ifndef KIO_SLAVE_CONFIG_H -#define KIO_SLAVE_CONFIG_H - -#include -#include - -namespace TDEIO { - - class SlaveConfigPrivate; - /** - * SlaveConfig - * - * This class manages the configuration for io-slaves based on protocol - * and host. The Scheduler makes use of this class to configure the slave - * whenever it has to connect to a new host. - * - * You only need to use this class if you want to override specific - * configuration items of an io-slave when the io-slave is used by - * your application. - * - * Normally io-slaves are being configured by "kio_rc" - * configuration files. Groups defined in such files are treated as host - * or domain specification. Configuration items defined in a group are - * only applied when the slave is connecting with a host that matches with - * the host and/or domain specified by the group. - */ - class TDEIO_EXPORT SlaveConfig : public TQObject - { - Q_OBJECT - public: - static SlaveConfig *self(); - ~SlaveConfig(); - /** - * Configure slaves of type @p protocol by setting @p key to @p value. - * If @p host is specified the configuration only applies when dealing - * with @p host. - * - * Changes made to the slave configuration only apply to slaves - * used by the current process. - */ - void setConfigData(const TQString &protocol, const TQString &host, const TQString &key, const TQString &value ); - - /** - * Configure slaves of type @p protocol with @p config. - * If @p host is specified the configuration only applies when dealing - * with @p host. - * - * Changes made to the slave configuration only apply to slaves - * used by the current process. - */ - void setConfigData(const TQString &protocol, const TQString &host, const MetaData &config ); - - /** - * Query slave configuration for slaves of type @p protocol when - * dealing with @p host. - */ - MetaData configData(const TQString &protocol, const TQString &host); - - /** - * Query a specific configuration key for slaves of type @p protocol when - * dealing with @p host. - */ - TQString configData(const TQString &protocol, const TQString &host, const TQString &key); - - /** - * Undo any changes made by calls to setConfigData. - */ - void reset(); - signals: - /** - * This signal is raised when a slave of type @p protocol deals - * with @p host for the first time. - * - * Your application can use this signal to make some last minute - * configuration changes with setConfigData based on the - * host. - */ - void configNeeded(const TQString &protocol, const TQString &host); - protected: - SlaveConfig(); - static SlaveConfig *_self; - SlaveConfigPrivate *d; - }; -} - -#endif diff --git a/kio/kio/slaveinterface.cpp b/kio/kio/slaveinterface.cpp deleted file mode 100644 index 5ba2f6e86..000000000 --- a/kio/kio/slaveinterface.cpp +++ /dev/null @@ -1,550 +0,0 @@ -/* This file is part of the KDE libraries - Copyright (C) 2000 David Faure - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License version 2 as published by the Free Software Foundation. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include "kio/slaveinterface.h" -#include "kio/slavebase.h" -#include "kio/connection.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -using namespace TDEIO; - - -TQDataStream &operator <<(TQDataStream &s, const TDEIO::UDSEntry &e ) -{ - // On 32-bit platforms we send UDS_SIZE with UDS_SIZE_LARGE in front - // of it to carry the 32 msb. We can't send a 64 bit UDS_SIZE because - // that would break the compatibility of the wire-protocol with KDE 2. - // We do the same on 64-bit platforms in case we run in a mixed 32/64bit - // environment. - - TQ_UINT32 size = 0; - TDEIO::UDSEntry::ConstIterator it = e.begin(); - for( ; it != e.end(); ++it ) - { - size++; - if ((*it).m_uds == TDEIO::UDS_SIZE) - size++; - } - s << size; - it = e.begin(); - for( ; it != e.end(); ++it ) - { - if ((*it).m_uds == TDEIO::UDS_SIZE) - { - TDEIO::UDSAtom a; - a.m_uds = TDEIO::UDS_SIZE_LARGE; - a.m_long = (*it).m_long >> 32; - s << a; - } - s << *it; - } - return s; -} - -TQDataStream &operator >>(TQDataStream &s, TDEIO::UDSEntry &e ) -{ - e.clear(); - TQ_UINT32 size; - s >> size; - - // On 32-bit platforms we send UDS_SIZE with UDS_SIZE_LARGE in front - // of it to carry the 32 msb. We can't send a 64 bit UDS_SIZE because - // that would break the compatibility of the wire-protocol with KDE 2. - // We do the same on 64-bit platforms in case we run in a mixed 32/64bit - // environment. - TQ_LLONG msb = 0; - for(TQ_UINT32 i = 0; i < size; i++) - { - TDEIO::UDSAtom a; - s >> a; - if (a.m_uds == TDEIO::UDS_SIZE_LARGE) - { - msb = a.m_long; - } - else - { - if (a.m_uds == TDEIO::UDS_SIZE) - { - if (a.m_long < 0) - a.m_long += (TQ_LLONG) 1 << 32; - a.m_long += msb << 32; - } - e.append(a); - msb = 0; - } - } - return s; -} - -static const unsigned int max_nums = 8; - -class TDEIO::SlaveInterfacePrivate -{ -public: - SlaveInterfacePrivate() { - slave_calcs_speed = false; - start_time.tv_sec = 0; - start_time.tv_usec = 0; - last_time = 0; - nums = 0; - filesize = 0; - offset = 0; - } - bool slave_calcs_speed; - struct timeval start_time; - uint nums; - long times[max_nums]; - TDEIO::filesize_t sizes[max_nums]; - size_t last_time; - TDEIO::filesize_t filesize, offset; - - TQTimer speed_timer; -}; - -////////////// - -SlaveInterface::SlaveInterface( Connection * connection ) -{ - m_pConnection = connection; - m_progressId = 0; - - d = new SlaveInterfacePrivate; - connect(&d->speed_timer, TQT_SIGNAL(timeout()), TQT_SLOT(calcSpeed())); -} - -SlaveInterface::~SlaveInterface() -{ - // Note: no kdDebug() here (scheduler is deleted very late) - m_pConnection = 0; // a bit like the "wasDeleted" of TQObject... - - delete d; -} - -static TDEIO::filesize_t readFilesize_t(TQDataStream &stream) -{ - TDEIO::filesize_t result; - unsigned long ul; - stream >> ul; - result = ul; - if (stream.atEnd()) - return result; - stream >> ul; - result += ((TDEIO::filesize_t)ul) << 32; - return result; -} - - -bool SlaveInterface::dispatch() -{ - assert( m_pConnection ); - - int cmd; - TQByteArray data; - - if (m_pConnection->read( &cmd, data ) == -1) - return false; - - return dispatch( cmd, data ); -} - -void SlaveInterface::calcSpeed() -{ - if (d->slave_calcs_speed) { - d->speed_timer.stop(); - return; - } - - struct timeval tv; - gettimeofday(&tv, 0); - - long diff = ((tv.tv_sec - d->start_time.tv_sec) * 1000000 + - tv.tv_usec - d->start_time.tv_usec) / 1000; - if (diff - d->last_time >= 900) { - d->last_time = diff; - if (d->nums == max_nums) { - // let's hope gcc can optimize that well enough - // otherwise I'd try memcpy :) - for (unsigned int i = 1; i < max_nums; ++i) { - d->times[i-1] = d->times[i]; - d->sizes[i-1] = d->sizes[i]; - } - d->nums--; - } - d->times[d->nums] = diff; - d->sizes[d->nums++] = d->filesize - d->offset; - - TDEIO::filesize_t lspeed = 1000 * (d->sizes[d->nums-1] - d->sizes[0]) / (d->times[d->nums-1] - d->times[0]); - -// kdDebug() << "proceeed " << (long)d->filesize << " " << diff << " " -// << long(d->sizes[d->nums-1] - d->sizes[0]) << " " -// << d->times[d->nums-1] - d->times[0] << " " -// << long(lspeed) << " " << double(d->filesize) / diff -// << " " << convertSize(lspeed) << " " -// << convertSize(long(double(d->filesize) / diff) * 1000) << " " -// << endl ; - - if (!lspeed) { - d->nums = 1; - d->times[0] = diff; - d->sizes[0] = d->filesize - d->offset; - } - emit speed(lspeed); - } -} - -bool SlaveInterface::dispatch( int _cmd, const TQByteArray &rawdata ) -{ - //kdDebug(7007) << "dispatch " << _cmd << endl; - - TQDataStream stream( rawdata, IO_ReadOnly ); - - TQString str1; - TQ_INT32 i; - TQ_INT8 b; - TQ_UINT32 ul; - - switch( _cmd ) { - case MSG_DATA: - emit data( rawdata ); - break; - case MSG_DATA_REQ: - emit dataReq(); - break; - case MSG_FINISHED: - //kdDebug(7007) << "Finished [this = " << this << "]" << endl; - d->offset = 0; - d->speed_timer.stop(); - emit finished(); - break; - case MSG_STAT_ENTRY: - { - UDSEntry entry; - stream >> entry; - emit statEntry(entry); - } - break; - case MSG_LIST_ENTRIES: - { - TQ_UINT32 count; - stream >> count; - - UDSEntryList list; - UDSEntry entry; - for (uint i = 0; i < count; i++) { - stream >> entry; - list.append(entry); - } - emit listEntries(list); - - } - break; - case MSG_RESUME: // From the put job - { - d->offset = readFilesize_t(stream); - emit canResume( d->offset ); - } - break; - case MSG_CANRESUME: // From the get job - d->filesize = d->offset; - emit canResume(0); // the arg doesn't matter - break; - case MSG_ERROR: - stream >> i >> str1; - kdDebug(7007) << "error " << i << " " << str1 << endl; - emit error( i, str1 ); - break; - case MSG_SLAVE_STATUS: - { - pid_t pid; - TQCString protocol; - stream >> pid >> protocol >> str1 >> b; - emit slaveStatus(pid, protocol, str1, (b != 0)); - } - break; - case MSG_CONNECTED: - emit connected(); - break; - - case INF_TOTAL_SIZE: - { - TDEIO::filesize_t size = readFilesize_t(stream); - gettimeofday(&d->start_time, 0); - d->last_time = 0; - d->filesize = d->offset; - d->sizes[0] = d->filesize - d->offset; - d->times[0] = 0; - d->nums = 1; - d->speed_timer.start(1000); - d->slave_calcs_speed = false; - emit totalSize( size ); - } - break; - case INF_PROCESSED_SIZE: - { - TDEIO::filesize_t size = readFilesize_t(stream); - emit processedSize( size ); - d->filesize = size; - } - break; - case INF_SPEED: - stream >> ul; - d->slave_calcs_speed = true; - d->speed_timer.stop(); - - emit speed( ul ); - break; - case INF_GETTING_FILE: - break; - case INF_ERROR_PAGE: - emit errorPage(); - break; - case INF_REDIRECTION: - { - KURL url; - stream >> url; - - emit redirection( url ); - } - break; - case INF_MIME_TYPE: - stream >> str1; - - emit mimeType( str1 ); - if (!m_pConnection->suspended()) - m_pConnection->sendnow( CMD_NONE, TQByteArray() ); - break; - case INF_WARNING: - stream >> str1; - - emit warning( str1 ); - break; - case INF_NEED_PASSWD: { - AuthInfo info; - stream >> info; - openPassDlg( info ); - break; - } - case INF_MESSAGEBOX: { - kdDebug(7007) << "needs a msg box" << endl; - TQString text, caption, buttonYes, buttonNo, dontAskAgainName; - int type; - stream >> type >> text >> caption >> buttonYes >> buttonNo; - if (stream.atEnd()) - messageBox(type, text, caption, buttonYes, buttonNo); - else { - stream >> dontAskAgainName; - messageBox(type, text, caption, buttonYes, buttonNo, dontAskAgainName); - } - break; - } - case INF_INFOMESSAGE: { - TQString msg; - stream >> msg; - infoMessage(msg); - break; - } - case INF_META_DATA: { - MetaData meta_data; - stream >> meta_data; - metaData(meta_data); - break; - } - case INF_LOCALURL: { - TQ_INT8 islocal; - KURL url; - stream >> islocal >> url; - emit localURL( url, islocal ); - break; - } - case MSG_NET_REQUEST: { - TQString host; - TQString slaveid; - stream >> host >> slaveid; - requestNetwork(host, slaveid); - break; - } - case MSG_NET_DROP: { - TQString host; - TQString slaveid; - stream >> host >> slaveid; - dropNetwork(host, slaveid); - break; - } - case MSG_NEED_SUBURL_DATA: { - emit needSubURLData(); - break; - } - case MSG_AUTH_KEY: { - bool keep; - TQCString key, group; - stream >> key >> group >> keep; - kdDebug(7007) << "Got auth-key: " << key << endl - << " group-key: " << group << endl - << " keep password: " << keep << endl; - emit authorizationKey( key, group, keep ); - break; - } - case MSG_DEL_AUTH_KEY: { - TQCString key; - stream >> key; - kdDebug(7007) << "Delete auth-key: " << key << endl; - emit delAuthorization( key ); - } - default: - kdWarning(7007) << "Slave sends unknown command (" << _cmd << "), dropping slave" << endl; - return false; - } - return true; -} - -void SlaveInterface::setOffset( TDEIO::filesize_t o) -{ - d->offset = o; -} - -TDEIO::filesize_t SlaveInterface::offset() const { return d->offset; } - -void SlaveInterface::requestNetwork(const TQString &host, const TQString &slaveid) -{ - kdDebug(7007) << "requestNetwork " << host << slaveid << endl; - TQByteArray packedArgs; - TQDataStream stream( packedArgs, IO_WriteOnly ); - stream << true; - m_pConnection->sendnow( INF_NETWORK_STATUS, packedArgs ); -} - -void SlaveInterface::dropNetwork(const TQString &host, const TQString &slaveid) -{ - kdDebug(7007) << "dropNetwork " << host << slaveid << endl; -} - -void SlaveInterface::sendResumeAnswer( bool resume ) -{ - kdDebug(7007) << "SlaveInterface::sendResumeAnswer ok for resuming :" << resume << endl; - m_pConnection->sendnow( resume ? CMD_RESUMEANSWER : CMD_NONE, TQByteArray() ); -} - -void SlaveInterface::openPassDlg( const TQString& prompt, const TQString& user, bool readOnly ) -{ - AuthInfo info; - info.prompt = prompt; - info.username = user; - info.readOnly = readOnly; - openPassDlg( info ); -} - -void SlaveInterface::openPassDlg( const TQString& prompt, const TQString& user, - const TQString& caption, const TQString& comment, - const TQString& label, bool readOnly ) -{ - AuthInfo info; - info.prompt = prompt; - info.username = user; - info.caption = caption; - info.comment = comment; - info.commentLabel = label; - info.readOnly = readOnly; - openPassDlg( info ); -} - -void SlaveInterface::openPassDlg( AuthInfo& info ) -{ - kdDebug(7007) << "SlaveInterface::openPassDlg: " - << "User= " << info.username - << ", Message= " << info.prompt << endl; - bool result = Observer::self()->openPassDlg( info ); - if ( m_pConnection ) - { - TQByteArray data; - TQDataStream stream( data, IO_WriteOnly ); - if ( result ) - { - stream << info; - kdDebug(7007) << "SlaveInterface:::openPassDlg got: " - << "User= " << info.username - << ", Password= [hidden]" << endl; - m_pConnection->sendnow( CMD_USERPASS, data ); - } - else - m_pConnection->sendnow( CMD_NONE, data ); - } -} - -void SlaveInterface::messageBox( int type, const TQString &text, const TQString &_caption, - const TQString &buttonYes, const TQString &buttonNo ) -{ - messageBox( type, text, _caption, buttonYes, buttonNo, TQString::null ); -} - -void SlaveInterface::messageBox( int type, const TQString &text, const TQString &_caption, - const TQString &buttonYes, const TQString &buttonNo, const TQString &dontAskAgainName ) -{ - kdDebug(7007) << "messageBox " << type << " " << text << " - " << _caption << " " << dontAskAgainName << endl; - TQByteArray packedArgs; - TQDataStream stream( packedArgs, IO_WriteOnly ); - - TQString caption( _caption ); - if ( type == TDEIO::SlaveBase::SSLMessageBox ) - caption = TQString::fromUtf8(kapp->dcopClient()->appId()); // hack, see observer.cpp - - emit needProgressId(); - kdDebug(7007) << "SlaveInterface::messageBox m_progressId=" << m_progressId << endl; - TQGuardedPtr me = this; - m_pConnection->suspend(); - int result = Observer::/*self()->*/messageBox( m_progressId, type, text, caption, buttonYes, buttonNo, dontAskAgainName ); - if ( me && m_pConnection ) // Don't do anything if deleted meanwhile - { - m_pConnection->resume(); - kdDebug(7007) << this << " SlaveInterface result=" << result << endl; - stream << result; - m_pConnection->sendnow( CMD_MESSAGEBOXANSWER, packedArgs ); - } -} - -// No longer used. -// Remove in KDE 4.0 -void SlaveInterface::sigpipe_handler(int) -{ - int saved_errno = errno; - // Using kdDebug from a signal handler is not a good idea. -#ifndef NDEBUG - char msg[1000]; - sprintf(msg, "*** SIGPIPE *** (ignored, pid = %ld)\n", (long) getpid()); - write(2, msg, strlen(msg)); -#endif - - // Do nothing. - // dispatch will return false and that will trigger ERR_SLAVE_DIED in slave.cpp - errno = saved_errno; -} - -void SlaveInterface::virtual_hook( int, void* ) -{ /*BASE::virtual_hook( id, data );*/ } - -#include "slaveinterface.moc" diff --git a/kio/kio/slaveinterface.h b/kio/kio/slaveinterface.h deleted file mode 100644 index 8ac7b683e..000000000 --- a/kio/kio/slaveinterface.h +++ /dev/null @@ -1,290 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 2000 David Faure - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef __kio_slaveinterface_h -#define __kio_slaveinterface_h - -#include -#include - -#include - -#include -#include -#include -#include - -namespace TDEIO { - -class Connection; -// better there is one ... -class SlaveInterfacePrivate; - - // Definition of enum Command has been moved to global.h - - /** - * Identifiers for KIO informational messages. - */ - enum Info { - INF_TOTAL_SIZE = 10, - INF_PROCESSED_SIZE = 11, - INF_SPEED, - INF_REDIRECTION = 20, - INF_MIME_TYPE = 21, - INF_ERROR_PAGE = 22, - INF_WARNING = 23, - INF_GETTING_FILE, // Deprecated - INF_NEED_PASSWD = 25, - INF_INFOMESSAGE, - INF_META_DATA, - INF_NETWORK_STATUS, - INF_MESSAGEBOX, - INF_LOCALURL - // add new ones here once a release is done, to avoid breaking binary compatibility - }; - - /** - * Identifiers for KIO data messages. - */ - enum Message { - MSG_DATA = 100, - MSG_DATA_REQ, - MSG_ERROR, - MSG_CONNECTED, - MSG_FINISHED, - MSG_STAT_ENTRY, - MSG_LIST_ENTRIES, - MSG_RENAMED, // unused - MSG_RESUME, - MSG_SLAVE_STATUS, - MSG_SLAVE_ACK, - MSG_NET_REQUEST, - MSG_NET_DROP, - MSG_NEED_SUBURL_DATA, - MSG_CANRESUME, - MSG_AUTH_KEY, // deprecated. - MSG_DEL_AUTH_KEY // deprecated. - // add new ones here once a release is done, to avoid breaking binary compatibility - }; - -/** - * There are two classes that specifies the protocol between application - * (TDEIO::Job) and kioslave. SlaveInterface is the class to use on the application - * end, SlaveBase is the one to use on the slave end. - * - * A call to foo() results in a call to slotFoo() on the other end. - */ -class TDEIO_EXPORT SlaveInterface : public TQObject -{ - Q_OBJECT - -public: - SlaveInterface( Connection *connection ); - virtual ~SlaveInterface(); - - void setConnection( Connection* connection ) { m_pConnection = connection; } - Connection *connection() const { return m_pConnection; } - - void setProgressId( int id ) { m_progressId = id; } - int progressId() const { return m_progressId; } - - /** Send our answer to the MSG_RESUME (canResume) request - * (to tell the "put" job whether to resume or not) - */ - void sendResumeAnswer( bool resume ); - - void setOffset( TDEIO::filesize_t offset ); - TDEIO::filesize_t offset() const; - -signals: - /////////// - // Messages sent by the slave - /////////// - - void data( const TQByteArray & ); - void dataReq( ); - void error( int , const TQString & ); - void connected(); - void finished(); - void slaveStatus(pid_t, const TQCString &, const TQString &, bool); - void listEntries( const TDEIO::UDSEntryList& ); - void statEntry( const TDEIO::UDSEntry& ); - void needSubURLData(); - void needProgressId(); - - void canResume( TDEIO::filesize_t ) ; - - /////////// - // Info sent by the slave - ////////// - void metaData( const TDEIO::MetaData & ); - void totalSize( TDEIO::filesize_t ) ; - void processedSize( TDEIO::filesize_t ) ; - void redirection( const KURL& ) ; - void localURL( const KURL&, bool ) ; - - void speed( unsigned long ) ; - void errorPage() ; - void mimeType( const TQString & ) ; - void warning( const TQString & ) ; - void infoMessage( const TQString & ) ; - void connectFinished(); - - /** - * @deprecated. Obsolete as of 3.1. Replaced by kpassword, a kded module. - */ - void authorizationKey( const TQCString&, const TQCString&, bool ); - - /** - * @deprecated. Obsolete as of 3.1. Replaced by kpassword, a kded module. - */ - void delAuthorization( const TQCString& grpkey ); - -protected: - ///////////////// - // Dispatching - //////////////// - - virtual bool dispatch(); - virtual bool dispatch( int _cmd, const TQByteArray &data ); - - /** - * Prompt the user for authrization info (login & password). - * - * Use this function to request authorization info from the - * the end user. For example to open an empty password dialog - * using default values: - * - * \code - * TDEIO::AuthInfo authInfo; - * bool result = openPassDlg( authInfo ); - * if ( result ) - * { - * printf( "Username: %s", result.username.latin1() ); - * printf( "Username: %s", result.username.latin1() ); - * } - * \endcode - * - * You can also pre-set some values like the username before hand - * if it is known as well as the comment and caption to be displayed: - * - * \code - * authInfo.comment= "Enter username and password to access acmeone"; - * authInfo.caption= "Acme Password Dialog"; - * authInfo.username= "Wily E. kaiody"; - * bool result = openPassDlg( authInfo ); - * if ( result ) - * { - * printf( "Username: %s", result.username.latin1() ); - * printf( "Username: %s", result.username.latin1() ); - * } - * \endcode - * - * NOTE: A call to this function can also fail and result - * in a return value of @p false, if the UIServer could not - * be started for whatever reason. - * - * @param info See AuthInfo. - * @return true if user clicks on "OK", false otherwsie. - */ - void openPassDlg( TDEIO::AuthInfo& info ); - - /** - * @deprecated. Use openPassDlg( AuthInfo& ) instead. - */ - void openPassDlg( const TQString& prompt, const TQString& user, - const TQString& caption, const TQString& comment, - const TQString& label, bool readOnly ) KDE_DEPRECATED; - - /** - * @deprecated. Use openPassDlg( AuthInfo& ) instead. - */ - void openPassDlg( const TQString& prompt, const TQString& user, bool readOnly ) KDE_DEPRECATED; - - void messageBox( int type, const TQString &text, const TQString &caption, - const TQString &buttonYes, const TQString &buttonNo ); - - /** - * @since 3.3 - */ - void messageBox( int type, const TQString &text, const TQString &caption, - const TQString &buttonYes, const TQString &buttonNo, const TQString &dontAskAgainName ); - - // I need to identify the slaves - void requestNetwork( const TQString &, const TQString &); - void dropNetwork( const TQString &, const TQString &); - - /** - * @internal - * KDE 4.0: Remove - */ - static void sigpipe_handler(int); - -protected slots: - void calcSpeed(); - -protected: - Connection * m_pConnection; - -private: - int m_progressId; -protected: - virtual void virtual_hook( int id, void* data ); -private: - SlaveInterfacePrivate *d; -}; - -} - -inline TQDataStream &operator >>(TQDataStream &s, TDEIO::UDSAtom &a ) -{ - TQ_INT32 l; - s >> a.m_uds; - - if ( a.m_uds & TDEIO::UDS_LONG ) { - s >> l; - a.m_long = l; - a.m_str = TQString::null; - } else if ( a.m_uds & TDEIO::UDS_STRING ) { - s >> a.m_str; - a.m_long = 0; - } else {} // DIE! - // assert( 0 ); - - return s; -} - -inline TQDataStream &operator <<(TQDataStream &s, const TDEIO::UDSAtom &a ) -{ - s << a.m_uds; - - if ( a.m_uds & TDEIO::UDS_LONG ) - s << (TQ_INT32) a.m_long; - else if ( a.m_uds & TDEIO::UDS_STRING ) - s << a.m_str; - else {} // DIE! - // assert( 0 ); - - return s; -} - -TDEIO_EXPORT TQDataStream &operator <<(TQDataStream &s, const TDEIO::UDSEntry &e ); -TDEIO_EXPORT TQDataStream &operator >>(TQDataStream &s, TDEIO::UDSEntry &e ); - -#endif diff --git a/kio/kio/statusbarprogress.cpp b/kio/kio/statusbarprogress.cpp deleted file mode 100644 index 66517ca03..000000000 --- a/kio/kio/statusbarprogress.cpp +++ /dev/null @@ -1,166 +0,0 @@ -/* This file is part of the KDE libraries - Copyright (C) 2000 Matej Koss - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License version 2 as published by the Free Software Foundation. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -#include "jobclasses.h" -#include "statusbarprogress.h" - -namespace TDEIO { - -StatusbarProgress::StatusbarProgress( TQWidget* parent, bool button ) - : ProgressBase( parent ) { - - m_bShowButton = button; - - // only clean this dialog - setOnlyClean(true); - // TODO : is this really needed ? - setStopOnClose(false); - - int w = fontMetrics().width( " 999.9 kB/s 00:00:01 " ) + 8; - box = new TQHBoxLayout( this, 0, 0 ); - - m_pButton = new TQPushButton( "X", this ); - box->addWidget( m_pButton ); - stack = new TQWidgetStack( this ); - box->addWidget( stack ); - connect( m_pButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotStop() ) ); - - m_pProgressBar = new KProgress( this ); - m_pProgressBar->setFrameStyle( TQFrame::Box | TQFrame::Raised ); - m_pProgressBar->setLineWidth( 1 ); - m_pProgressBar->setBackgroundMode( TQWidget::PaletteBackground ); - m_pProgressBar->installEventFilter( this ); - m_pProgressBar->setMinimumWidth( w ); - stack->addWidget( m_pProgressBar, 1 ); - - m_pLabel = new TQLabel( "", this ); - m_pLabel->setAlignment( AlignHCenter | AlignVCenter ); - m_pLabel->installEventFilter( this ); - m_pLabel->setMinimumWidth( w ); - stack->addWidget( m_pLabel, 2 ); - setMinimumSize( sizeHint() ); - - mode = None; - setMode(); -} - - -void StatusbarProgress::setJob( TDEIO::Job *job ) -{ - ProgressBase::setJob( job ); - - mode = Progress; - setMode(); -} - - -void StatusbarProgress::setMode() { - switch ( mode ) { - case None: - if ( m_bShowButton ) { - m_pButton->hide(); - } - stack->hide(); - break; - - case Label: - if ( m_bShowButton ) { - m_pButton->show(); - } - stack->show(); - stack->raiseWidget( m_pLabel ); - break; - - case Progress: - if ( m_bShowButton ) { - m_pButton->show(); - } - stack->show(); - stack->raiseWidget( m_pProgressBar ); - break; - } -} - - -void StatusbarProgress::slotClean() { - // we don't want to delete this widget, only clean - m_pProgressBar->setValue( 0 ); - m_pLabel->clear(); - - mode = None; - setMode(); -} - - -void StatusbarProgress::slotTotalSize( TDEIO::Job*, TDEIO::filesize_t size ) { - m_iTotalSize = size; // size is measured in bytes -} - -void StatusbarProgress::slotPercent( TDEIO::Job*, unsigned long percent ) { - m_pProgressBar->setValue( percent ); -} - - -void StatusbarProgress::slotSpeed( TDEIO::Job*, unsigned long speed ) { - if ( speed == 0 ) { // spped is measured in bytes-per-second - m_pLabel->setText( i18n( " Stalled ") ); - } else { - m_pLabel->setText( i18n( " %1/s ").arg( TDEIO::convertSize( speed )) ); - } -} - - -bool StatusbarProgress::eventFilter( TQObject *, TQEvent *ev ) { - if ( ! m_pJob ) { // don't react when there isn't any job doing IO - return true; - } - - if ( ev->type() == TQEvent::MouseButtonPress ) { - TQMouseEvent *e = (TQMouseEvent*)ev; - - if ( e->button() == Qt::LeftButton ) { // toggle view on left mouse button - if ( mode == Label ) { - mode = Progress; - } else if ( mode == Progress ) { - mode = Label; - } - setMode(); - return true; - - } - } - - return false; -} - -void StatusbarProgress::virtual_hook( int id, void* data ) -{ ProgressBase::virtual_hook( id, data ); } - -} /* namespace */ -#include "statusbarprogress.moc" diff --git a/kio/kio/statusbarprogress.h b/kio/kio/statusbarprogress.h deleted file mode 100644 index d1d591fbe..000000000 --- a/kio/kio/statusbarprogress.h +++ /dev/null @@ -1,112 +0,0 @@ -/* This file is part of the KDE libraries - Copyright (C) 2000 Matej Koss - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License version 2 as published by the Free Software Foundation. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef __statusbarprogress_h__ -#define __statusbarprogress_h__ - -#include "progressbase.h" - -class TQWidgetStack; -class TQBoxLayout; -class TQPushButton; -class TQLabel; -class KProgress; - -namespace TDEIO { - -class Job; - -/** -* This is a special IO progress widget. -* -* Similarly to DefaultProgress, -* it's purpose is to show a progress of the IO operation. -* -* Instead of creating a separate window, this is only a widget that can be -* easily embedded in a statusbar. -* -* Usage of StatusbarProgress is little different. -* This dialog will be a part of some application. -* \code -* // create a dialog -* StatusbarProgress *statusProgress; -* statusProgress = new StatusbarProgress( statusBar() ); -* statusBar()->insertWidget( statusProgress, statusProgress->width() , 0 ); -* ... -* // create job and connect it to the progress -* CopyJob* job = TDEIO::copy(...); -* statusProgress->setJob( job ); -* ... -* \endcode -* -* @short IO progress widget for embedding in a statusbar. -* @author Matej Koss -*/ -class TDEIO_EXPORT StatusbarProgress : public ProgressBase { - - Q_OBJECT - -public: - - /** - * Creates a new StatusbarProgress. - * @param parent the parent of this widget - * @param button true to add an abort button. The button will be - * connected to ProgressBase::slotStop() - */ - StatusbarProgress( TQWidget* parent, bool button = true ); - ~StatusbarProgress() {} - - /** - * Sets the job to monitor. - * @param job the job to monitor - */ - void setJob( TDEIO::Job *job ); - -public slots: - virtual void slotClean(); - virtual void slotTotalSize( TDEIO::Job* job, TDEIO::filesize_t size ); - virtual void slotPercent( TDEIO::Job* job, unsigned long percent ); - virtual void slotSpeed( TDEIO::Job* job, unsigned long speed ); - -protected: - KProgress* m_pProgressBar; - TQLabel* m_pLabel; - TQPushButton* m_pButton; - - TDEIO::filesize_t m_iTotalSize; - - enum Mode { None, Label, Progress }; - - uint mode; - bool m_bShowButton; - - void setMode(); - - virtual bool eventFilter( TQObject *, TQEvent * ); - TQBoxLayout *box; - TQWidgetStack *stack; -protected: - virtual void virtual_hook( int id, void* data ); -private: - class StatusbarProgressPrivate* d; -}; - -} /* namespace */ - -#endif // __statusbarprogress_h__ diff --git a/kio/kio/tcpslavebase.cpp b/kio/kio/tcpslavebase.cpp deleted file mode 100644 index 8d3cc49ff..000000000 --- a/kio/kio/tcpslavebase.cpp +++ /dev/null @@ -1,1343 +0,0 @@ -/* - * $Id$ - * - * Copyright (C) 2000 Alex Zepeda - * Copyright (C) 2001 Dawit Alemayehu - * - * This file is part of the KDE project - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library 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 - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public License - * along with this library; see the file COPYING.LIB. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - */ - -#ifdef HAVE_CONFIG_H -#include -#endif - -#include -#include -#include -#include - -#include - -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#ifndef Q_WS_WIN //temporary -#include -#endif - -#include -#include -#include -#include - -#include - -#include -#include - -#include "kio/tcpslavebase.h" - -using namespace TDEIO; - -class TCPSlaveBase::TcpSlaveBasePrivate -{ -public: - - TcpSlaveBasePrivate() : rblockSz(256), militantSSL(false), userAborted(false) {} - ~TcpSlaveBasePrivate() {} - - KSSL *kssl; - bool usingTLS; - KSSLCertificateCache *cc; - TQString host; - TQString realHost; - TQString ip; - DCOPClient *dcc; - KSSLPKCS12 *pkcs; - - int status; - int timeout; - int rblockSz; // Size for reading blocks in readLine() - bool block; - bool useSSLTunneling; - bool needSSLHandShake; - bool militantSSL; // If true, we just drop a connection silently - // if SSL certificate check fails in any way. - bool userAborted; - MetaData savedMetaData; -}; - - -TCPSlaveBase::TCPSlaveBase(unsigned short int defaultPort, - const TQCString &protocol, - const TQCString &poolSocket, - const TQCString &appSocket) - :SlaveBase (protocol, poolSocket, appSocket), - m_iSock(-1), - m_iDefaultPort(defaultPort), - m_sServiceName(protocol), - fp(0) -{ - // We have to have two constructors, so don't add anything - // else in here. Put it in doConstructorStuff() instead. - doConstructorStuff(); - m_bIsSSL = false; -} - -TCPSlaveBase::TCPSlaveBase(unsigned short int defaultPort, - const TQCString &protocol, - const TQCString &poolSocket, - const TQCString &appSocket, - bool useSSL) - :SlaveBase (protocol, poolSocket, appSocket), - m_iSock(-1), - m_bIsSSL(useSSL), - m_iDefaultPort(defaultPort), - m_sServiceName(protocol), - fp(0) -{ - doConstructorStuff(); - if (useSSL) - m_bIsSSL = initializeSSL(); -} - -// The constructor procedures go here now. -void TCPSlaveBase::doConstructorStuff() -{ - d = new TcpSlaveBasePrivate; - d->kssl = 0L; - d->ip = ""; - d->cc = 0L; - d->usingTLS = false; - d->dcc = 0L; - d->pkcs = 0L; - d->status = -1; - d->timeout = KProtocolManager::connectTimeout(); - d->block = false; - d->useSSLTunneling = false; -} - -TCPSlaveBase::~TCPSlaveBase() -{ - cleanSSL(); - if (d->usingTLS) delete d->kssl; - if (d->dcc) delete d->dcc; - if (d->pkcs) delete d->pkcs; - delete d; -} - -ssize_t TCPSlaveBase::write(const void *data, ssize_t len) -{ -#ifdef Q_OS_UNIX - if ( (m_bIsSSL || d->usingTLS) && !d->useSSLTunneling ) - { - if ( d->needSSLHandShake ) - (void) doSSLHandShake( true ); - return d->kssl->write(data, len); - } - return KSocks::self()->write(m_iSock, data, len); -#else - return 0; -#endif -} - -ssize_t TCPSlaveBase::read(void *data, ssize_t len) -{ -#ifdef Q_OS_UNIX - if ( (m_bIsSSL || d->usingTLS) && !d->useSSLTunneling ) - { - if ( d->needSSLHandShake ) - (void) doSSLHandShake( true ); - return d->kssl->read(data, len); - } - return KSocks::self()->read(m_iSock, data, len); -#else - return 0; -#endif -} - - -void TCPSlaveBase::setBlockSize(int sz) -{ - if (sz <= 0) - sz = 1; - - d->rblockSz = sz; -} - - -ssize_t TCPSlaveBase::readLine(char *data, ssize_t len) -{ -// Optimization: -// It's small, but it probably results in a gain on very high -// speed connections. I moved 3 if statements out of the while loop -// so that the while loop is as small as possible. (GS) - - // let's not segfault! - if (!data) - return -1; - - char tmpbuf[1024]; // 1kb temporary buffer for peeking - *data = 0; - ssize_t clen = 0; - char *buf = data; - int rc = 0; - -if ((m_bIsSSL || d->usingTLS) && !d->useSSLTunneling) { // SSL CASE - if ( d->needSSLHandShake ) - (void) doSSLHandShake( true ); - - while (clen < len-1) { - rc = d->kssl->pending(); - if (rc > 0) { // Read a chunk - int bytes = rc; - if (bytes > d->rblockSz) - bytes = d->rblockSz; - - rc = d->kssl->peek(tmpbuf, bytes); - if (rc <= 0) { - // FIXME: this doesn't cover rc == 0 case - return -1; - } - - bytes = rc; // in case it contains no \n - for (int i = 0; i < rc; i++) { - if (tmpbuf[i] == '\n') { - bytes = i+1; - break; - } - } - - if (bytes+clen >= len) // don't read too much! - bytes = len - clen - 1; - - rc = d->kssl->read(buf, bytes); - if (rc > 0) { - clen += rc; - buf += (rc-1); - if (*buf++ == '\n') - break; - } else { - // FIXME: different case if rc == 0; - return -1; - } - } else { // Read a byte - rc = d->kssl->read(buf, 1); - if (rc <= 0) { - return -1; - // hm rc = 0 then - // SSL_read says to call SSL_get_error to see if - // this was an error. FIXME - } else { - clen++; - if (*buf++ == '\n') - break; - } - } - } -} else { // NON SSL CASE - while (clen < len-1) { -#ifdef Q_OS_UNIX - rc = KSocks::self()->read(m_iSock, buf, 1); -#else - rc = 0; -#endif - if (rc <= 0) { - // FIXME: this doesn't cover rc == 0 case - return -1; - } else { - clen++; - if (*buf++ == '\n') - break; - } - } -} - - // Both cases fall through to here - *buf = 0; -return clen; -} - -unsigned short int TCPSlaveBase::port(unsigned short int _p) -{ - unsigned short int p = _p; - - if (_p <= 0) - { - p = m_iDefaultPort; - } - - return p; -} - -// This function is simply a wrapper to establish the connection -// to the server. It's a bit more complicated than ::connect -// because we first have to check to see if the user specified -// a port, and if so use it, otherwise we check to see if there -// is a port specified in /etc/services, and if so use that -// otherwise as a last resort use the supplied default port. -bool TCPSlaveBase::connectToHost( const TQString &host, - unsigned int _port, - bool sendError ) -{ -#ifdef Q_OS_UNIX - unsigned short int p; - KExtendedSocket ks; - - d->userAborted = false; - - // - leaving SSL - warn before we even connect - if (metaData("main_frame_request") == "TRUE" && - metaData("ssl_activate_warnings") == "TRUE" && - metaData("ssl_was_in_use") == "TRUE" && - !m_bIsSSL) { - KSSLSettings kss; - if (kss.warnOnLeave()) { - int result = messageBox( i18n("You are about to leave secure " - "mode. Transmissions will no " - "longer be encrypted.\nThis " - "means that a third party could " - "observe your data in transit."), - WarningContinueCancel, - i18n("Security Information"), - i18n("C&ontinue Loading"), TQString::null, - "WarnOnLeaveSSLMode" ); - - // Move this setting into KSSL instead - TDEConfig *config = new TDEConfig("kioslaverc"); - config->setGroup("Notification Messages"); - - if (!config->readBoolEntry("WarnOnLeaveSSLMode", true)) { - config->deleteEntry("WarnOnLeaveSSLMode"); - config->sync(); - kss.setWarnOnLeave(false); - kss.save(); - } - delete config; - - if ( result == KMessageBox::Cancel ) { - d->userAborted = true; - return false; - } - } - } - - d->status = -1; - d->host = host; - d->needSSLHandShake = m_bIsSSL; - p = port(_port); - ks.setAddress(host, p); - if ( d->timeout > -1 ) - ks.setTimeout( d->timeout ); - - if (ks.connect() < 0) - { - d->status = ks.status(); - if ( sendError ) - { - if (d->status == IO_LookupError) - error( ERR_UNKNOWN_HOST, host); - else if ( d->status != -1 ) - error( ERR_COULD_NOT_CONNECT, host); - } - return false; - } - - m_iSock = ks.fd(); - - // store the IP for later - const TDESocketAddress *sa = ks.peerAddress(); - if (sa) - d->ip = sa->nodeName(); - else - d->ip = ""; - - ks.release(); // KExtendedSocket no longer applicable - - if ( d->block != ks.blockingMode() ) - ks.setBlockingMode( d->block ); - - m_iPort=p; - - if (m_bIsSSL && !d->useSSLTunneling) { - if ( !doSSLHandShake( sendError ) ) - return false; - } - else - setMetaData("ssl_in_use", "FALSE"); - - // Since we want to use stdio on the socket, - // we must fdopen it to get a file pointer, - // if it fails, close everything up - if ((fp = KDE_fdopen(m_iSock, "w+")) == 0) { - closeDescriptor(); - return false; - } - - return true; -#else //!Q_OS_UNIX - return false; -#endif //Q_OS_UNIX -} - -void TCPSlaveBase::closeDescriptor() -{ - stopTLS(); - if (fp) { - fclose(fp); - fp=0; - m_iSock=-1; - if (m_bIsSSL) - d->kssl->close(); - } - if (m_iSock != -1) { - close(m_iSock); - m_iSock=-1; - } - d->ip = ""; - d->host = ""; -} - -bool TCPSlaveBase::initializeSSL() -{ - if (m_bIsSSL) { - if (KSSL::doesSSLWork()) { - d->kssl = new KSSL; - return true; - } - } -return false; -} - -void TCPSlaveBase::cleanSSL() -{ - delete d->cc; - - if (m_bIsSSL) { - delete d->kssl; - d->kssl = 0; - } - d->militantSSL = false; -} - -bool TCPSlaveBase::atEnd() -{ - return feof(fp); -} - -int TCPSlaveBase::startTLS() -{ - if (d->usingTLS || d->useSSLTunneling || m_bIsSSL || !KSSL::doesSSLWork()) - return false; - - d->kssl = new KSSL(false); - if (!d->kssl->TLSInit()) { - delete d->kssl; - return -1; - } - - if ( !d->realHost.isEmpty() ) - { - kdDebug(7029) << "Setting real hostname: " << d->realHost << endl; - d->kssl->setPeerHost(d->realHost); - } else { - kdDebug(7029) << "Setting real hostname: " << d->host << endl; - d->kssl->setPeerHost(d->host); - } - - if (hasMetaData("ssl_session_id")) { - KSSLSession *s = KSSLSession::fromString(metaData("ssl_session_id")); - if (s) { - d->kssl->setSession(s); - delete s; - } - } - certificatePrompt(); - - int rc = d->kssl->connect(m_iSock); - if (rc < 0) { - delete d->kssl; - return -2; - } - - setMetaData("ssl_session_id", d->kssl->session()->toString()); - - d->usingTLS = true; - setMetaData("ssl_in_use", "TRUE"); - - if (!d->kssl->reusingSession()) { - rc = verifyCertificate(); - if (rc != 1) { - setMetaData("ssl_in_use", "FALSE"); - d->usingTLS = false; - delete d->kssl; - return -3; - } - } - - d->savedMetaData = mOutgoingMetaData; - return (d->usingTLS ? 1 : 0); -} - - -void TCPSlaveBase::stopTLS() -{ - if (d->usingTLS) { - delete d->kssl; - d->usingTLS = false; - setMetaData("ssl_in_use", "FALSE"); - } -} - - -void TCPSlaveBase::setSSLMetaData() { - if (!(d->usingTLS || d->useSSLTunneling || m_bIsSSL)) - return; - - mOutgoingMetaData = d->savedMetaData; -} - - -bool TCPSlaveBase::canUseTLS() -{ - if (m_bIsSSL || d->needSSLHandShake || !KSSL::doesSSLWork()) - return false; - - KSSLSettings kss; - return kss.tlsv1(); -} - - -void TCPSlaveBase::certificatePrompt() -{ -TQString certname; // the cert to use this session -bool send = false, prompt = false, save = false, forcePrompt = false; -KSSLCertificateHome::KSSLAuthAction aa; - - setMetaData("ssl_using_client_cert", "FALSE"); // we change this if needed - - if (metaData("ssl_no_client_cert") == "TRUE") return; - forcePrompt = (metaData("ssl_force_cert_prompt") == "TRUE"); - - // Delete the old cert since we're certainly done with it now - if (d->pkcs) { - delete d->pkcs; - d->pkcs = NULL; - } - - if (!d->kssl) return; - - // Look for a general certificate - if (!forcePrompt) { - certname = KSSLCertificateHome::getDefaultCertificateName(&aa); - switch(aa) { - case KSSLCertificateHome::AuthSend: - send = true; prompt = false; - break; - case KSSLCertificateHome::AuthDont: - send = false; prompt = false; - certname = TQString::null; - break; - case KSSLCertificateHome::AuthPrompt: - send = false; prompt = true; - break; - default: - break; - } - } - - TQString ourHost; - if (!d->realHost.isEmpty()) { - ourHost = d->realHost; - } else { - ourHost = d->host; - } - - // Look for a certificate on a per-host basis as an override - TQString tmpcn = KSSLCertificateHome::getDefaultCertificateName(ourHost, &aa); - if (aa != KSSLCertificateHome::AuthNone) { // we must override - switch (aa) { - case KSSLCertificateHome::AuthSend: - send = true; - prompt = false; - certname = tmpcn; - break; - case KSSLCertificateHome::AuthDont: - send = false; - prompt = false; - certname = TQString::null; - break; - case KSSLCertificateHome::AuthPrompt: - send = false; - prompt = true; - certname = tmpcn; - break; - default: - break; - } - } - - // Finally, we allow the application to override anything. - if (hasMetaData("ssl_demand_certificate")) { - certname = metaData("ssl_demand_certificate"); - if (!certname.isEmpty()) { - forcePrompt = false; - prompt = false; - send = true; - } - } - - if (certname.isEmpty() && !prompt && !forcePrompt) return; - - // Ok, we're supposed to prompt the user.... - if (prompt || forcePrompt) { - TQStringList certs = KSSLCertificateHome::getCertificateList(); - - for (TQStringList::Iterator it = certs.begin(); it != certs.end(); ++it) { - KSSLPKCS12 *pkcs = KSSLCertificateHome::getCertificateByName(*it); - if (pkcs && (!pkcs->getCertificate() || - !pkcs->getCertificate()->x509V3Extensions().certTypeSSLClient())) { - certs.remove(*it); - } - delete pkcs; - } - - if (certs.isEmpty()) return; // we had nothing else, and prompt failed - - if (!d->dcc) { - d->dcc = new DCOPClient; - d->dcc->attach(); - if (!d->dcc->isApplicationRegistered("kio_uiserver")) { - TDEApplication::startServiceByDesktopPath("kio_uiserver.desktop", - TQStringList() ); - } - } - - TQByteArray data, retval; - TQCString rettype; - TQDataStream arg(data, IO_WriteOnly); - arg << ourHost; - arg << certs; - arg << metaData("window-id").toInt(); - bool rc = d->dcc->call("kio_uiserver", "UIServer", - "showSSLCertDialog(TQString, TQStringList,int)", - data, rettype, retval); - - if (rc && rettype == "KSSLCertDlgRet") { - TQDataStream retStream(retval, IO_ReadOnly); - KSSLCertDlgRet drc; - retStream >> drc; - if (drc.ok) { - send = drc.send; - save = drc.save; - certname = drc.choice; - } - } - } - - // The user may have said to not send the certificate, - // but to save the choice - if (!send) { - if (save) { - KSSLCertificateHome::setDefaultCertificate(certname, ourHost, - false, false); - } - return; - } - - // We're almost committed. If we can read the cert, we'll send it now. - KSSLPKCS12 *pkcs = KSSLCertificateHome::getCertificateByName(certname); - if (!pkcs && KSSLCertificateHome::hasCertificateByName(certname)) { // We need the password - TDEIO::AuthInfo ai; - bool first = true; - do { - ai.prompt = i18n("Enter the certificate password:"); - ai.caption = i18n("SSL Certificate Password"); - ai.url.setProtocol("kssl"); - ai.url.setHost(certname); - ai.username = certname; - ai.keepPassword = true; - - bool showprompt; - if (first) - showprompt = !checkCachedAuthentication(ai); - else - showprompt = true; - if (showprompt) { - if (!openPassDlg(ai, first ? TQString::null : - i18n("Unable to open the certificate. Try a new password?"))) - break; - } - - first = false; - pkcs = KSSLCertificateHome::getCertificateByName(certname, ai.password); - } while (!pkcs); - - } - - // If we could open the certificate, let's send it - if (pkcs) { - if (!d->kssl->setClientCertificate(pkcs)) { - messageBox(Information, i18n("The procedure to set the " - "client certificate for the session " - "failed."), i18n("SSL")); - delete pkcs; // we don't need this anymore - pkcs = 0L; - } else { - kdDebug(7029) << "Client SSL certificate is being used." << endl; - setMetaData("ssl_using_client_cert", "TRUE"); - if (save) { - KSSLCertificateHome::setDefaultCertificate(certname, ourHost, - true, false); - } - } - d->pkcs = pkcs; - } -} - - - -bool TCPSlaveBase::usingTLS() const -{ - return d->usingTLS; -} - -// ### remove this for KDE4 (misses const): -bool TCPSlaveBase::usingTLS() -{ - return d->usingTLS; -} - - -// Returns 0 for failed verification, -1 for rejected cert and 1 for ok -int TCPSlaveBase::verifyCertificate() -{ - int rc = 0; - bool permacache = false; - bool isChild = false; - bool _IPmatchesCN = false; - int result; - bool doAddHost = false; - TQString ourHost; - - if (!d->realHost.isEmpty()) - ourHost = d->realHost; - else ourHost = d->host; - - TQString theurl = TQString(m_sServiceName)+"://"+ourHost+":"+TQString::number(m_iPort); - - if (!hasMetaData("ssl_militant") || metaData("ssl_militant") == "FALSE") - d->militantSSL = false; - else if (metaData("ssl_militant") == "TRUE") - d->militantSSL = true; - - if (!d->cc) d->cc = new KSSLCertificateCache; - - KSSLCertificate& pc = d->kssl->peerInfo().getPeerCertificate(); - - KSSLCertificate::KSSLValidationList ksvl = pc.validateVerbose(KSSLCertificate::SSLServer); - - _IPmatchesCN = d->kssl->peerInfo().certMatchesAddress(); - if (!_IPmatchesCN) { -#ifndef Q_WS_WIN //temporary - KNetwork::KResolverResults res = KNetwork::KResolver::resolve(d->kssl->peerInfo().peerHost(), "80", KNetwork::KResolver::CanonName); - if (!res.isEmpty()) { - TQString old = d->kssl->peerInfo().peerHost(); - d->kssl->peerInfo().setPeerHost(res[0].canonicalName()); - _IPmatchesCN = d->kssl->peerInfo().certMatchesAddress(); - if (!_IPmatchesCN) { - d->kssl->peerInfo().setPeerHost(old); - } - } -#endif - if (!_IPmatchesCN && !d->militantSSL) { // force this if the user wants it - if (d->cc->getHostList(pc).contains(ourHost)) { - _IPmatchesCN = true; - } - } - } - - if (!_IPmatchesCN) { - ksvl << KSSLCertificate::InvalidHost; - } - - KSSLCertificate::KSSLValidation ksv = KSSLCertificate::Ok; - if (!ksvl.isEmpty()) - ksv = ksvl.first(); - - /* Setting the various bits of meta-info that will be needed. */ - setMetaData("ssl_cipher", d->kssl->connectionInfo().getCipher()); - setMetaData("ssl_cipher_desc", - d->kssl->connectionInfo().getCipherDescription()); - setMetaData("ssl_cipher_version", - d->kssl->connectionInfo().getCipherVersion()); - setMetaData("ssl_cipher_used_bits", - TQString::number(d->kssl->connectionInfo().getCipherUsedBits())); - setMetaData("ssl_cipher_bits", - TQString::number(d->kssl->connectionInfo().getCipherBits())); - setMetaData("ssl_peer_ip", d->ip); - if (!d->realHost.isEmpty()) { - setMetaData("ssl_proxied", "true"); - } - - TQString errorStr; - for(KSSLCertificate::KSSLValidationList::ConstIterator it = ksvl.begin(); - it != ksvl.end(); ++it) - { - errorStr += TQString::number(*it)+":"; - } - setMetaData("ssl_cert_errors", errorStr); - setMetaData("ssl_peer_certificate", pc.toString()); - - if (pc.chain().isValid() && pc.chain().depth() > 1) { - TQString theChain; - TQPtrList chain = pc.chain().getChain(); - chain.setAutoDelete(true); - for (KSSLCertificate *c = chain.first(); c; c = chain.next()) { - theChain += c->toString(); - theChain += "\n"; - } - setMetaData("ssl_peer_chain", theChain); - } else setMetaData("ssl_peer_chain", ""); - - setMetaData("ssl_cert_state", TQString::number(ksv)); - - if (ksv == KSSLCertificate::Ok) { - rc = 1; - setMetaData("ssl_action", "accept"); - } - - kdDebug(7029) << "SSL HTTP frame the parent? " << metaData("main_frame_request") << endl; - if (!hasMetaData("main_frame_request") || metaData("main_frame_request") == "TRUE") { - // Since we're the parent, we need to teach the child. - setMetaData("ssl_parent_ip", d->ip); - setMetaData("ssl_parent_cert", pc.toString()); - // - Read from cache and see if there is a policy for this - KSSLCertificateCache::KSSLCertificatePolicy cp = - d->cc->getPolicyByCertificate(pc); - - // - validation code - if (ksv != KSSLCertificate::Ok) { - if (d->militantSSL) { - return -1; - } - - if (cp == KSSLCertificateCache::Unknown || - cp == KSSLCertificateCache::Ambiguous) { - cp = KSSLCertificateCache::Prompt; - } else { - // A policy was already set so let's honor that. - permacache = d->cc->isPermanent(pc); - } - - if (!_IPmatchesCN && cp == KSSLCertificateCache::Accept) { - cp = KSSLCertificateCache::Prompt; -// ksv = KSSLCertificate::Ok; - } - - // Precondition: cp is one of Reject, Accept or Prompt - switch (cp) { - case KSSLCertificateCache::Accept: - rc = 1; - setMetaData("ssl_action", "accept"); - break; - case KSSLCertificateCache::Reject: - rc = -1; - setMetaData("ssl_action", "reject"); - break; - case KSSLCertificateCache::Prompt: - { - do { - if (ksv == KSSLCertificate::InvalidHost) { - TQString msg = i18n("The IP address of the host %1 " - "does not match the one the " - "certificate was issued to."); - result = messageBox( WarningYesNoCancel, - msg.arg(ourHost), - i18n("Server Authentication"), - i18n("&Details"), - i18n("Co&ntinue") ); - } else { - TQString msg = i18n("The server certificate failed the " - "authenticity test (%1)."); - result = messageBox( WarningYesNoCancel, - msg.arg(ourHost), - i18n("Server Authentication"), - i18n("&Details"), - i18n("Co&ntinue") ); - } - - if (result == KMessageBox::Yes) { - if (!d->dcc) { - d->dcc = new DCOPClient; - d->dcc->attach(); - if (!d->dcc->isApplicationRegistered("kio_uiserver")) { - TDEApplication::startServiceByDesktopPath("kio_uiserver.desktop", - TQStringList() ); - } - - } - TQByteArray data, ignore; - TQCString ignoretype; - TQDataStream arg(data, IO_WriteOnly); - arg << theurl << mOutgoingMetaData; - arg << metaData("window-id").toInt(); - d->dcc->call("kio_uiserver", "UIServer", - "showSSLInfoDialog(TQString,TDEIO::MetaData,int)", - data, ignoretype, ignore); - } - } while (result == KMessageBox::Yes); - - if (result == KMessageBox::No) { - setMetaData("ssl_action", "accept"); - rc = 1; - cp = KSSLCertificateCache::Accept; - doAddHost = true; - result = messageBox( WarningYesNo, - i18n("Would you like to accept this " - "certificate forever without " - "being prompted?"), - i18n("Server Authentication"), - i18n("&Forever"), - i18n("&Current Sessions Only")); - if (result == KMessageBox::Yes) - permacache = true; - else - permacache = false; - } else { - setMetaData("ssl_action", "reject"); - rc = -1; - cp = KSSLCertificateCache::Prompt; - } - break; - } - default: - kdDebug(7029) << "TCPSlaveBase/SSL error in cert code." - << "Please report this to kfm-devel@kde.org." - << endl; - break; - } - } - - - // - cache the results - d->cc->addCertificate(pc, cp, permacache); - if (doAddHost) d->cc->addHost(pc, ourHost); - } else { // Child frame - // - Read from cache and see if there is a policy for this - KSSLCertificateCache::KSSLCertificatePolicy cp = - d->cc->getPolicyByCertificate(pc); - isChild = true; - - // Check the cert and IP to make sure they're the same - // as the parent frame - bool certAndIPTheSame = (d->ip == metaData("ssl_parent_ip") && - pc.toString() == metaData("ssl_parent_cert")); - - if (ksv == KSSLCertificate::Ok) { - if (certAndIPTheSame) { // success - rc = 1; - setMetaData("ssl_action", "accept"); - } else { - /* - if (d->militantSSL) { - return -1; - } - result = messageBox(WarningYesNo, - i18n("The certificate is valid but does not appear to have been assigned to this server. Do you wish to continue loading?"), - i18n("Server Authentication")); - if (result == KMessageBox::Yes) { // success - rc = 1; - setMetaData("ssl_action", "accept"); - } else { // fail - rc = -1; - setMetaData("ssl_action", "reject"); - } - */ - setMetaData("ssl_action", "accept"); - rc = 1; // Let's accept this now. It's bad, but at least the user - // will see potential attacks in KDE3 with the pseudo-lock - // icon on the toolbar, and can investigate with the RMB - } - } else { - if (d->militantSSL) { - return -1; - } - - if (cp == KSSLCertificateCache::Accept) { - if (certAndIPTheSame) { // success - rc = 1; - setMetaData("ssl_action", "accept"); - } else { // fail - result = messageBox(WarningYesNo, - i18n("You have indicated that you wish to accept this certificate, but it is not issued to the server who is presenting it. Do you wish to continue loading?"), - i18n("Server Authentication")); - if (result == KMessageBox::Yes) { - rc = 1; - setMetaData("ssl_action", "accept"); - d->cc->addHost(pc, ourHost); - } else { - rc = -1; - setMetaData("ssl_action", "reject"); - } - } - } else if (cp == KSSLCertificateCache::Reject) { // fail - messageBox(Information, i18n("SSL certificate is being rejected as requested. You can disable this in the TDE Control Center."), - i18n("Server Authentication")); - rc = -1; - setMetaData("ssl_action", "reject"); - } else { - do { - TQString msg = i18n("The server certificate failed the " - "authenticity test (%1)."); - result = messageBox(WarningYesNoCancel, - msg.arg(ourHost), - i18n("Server Authentication"), - i18n("&Details"), - i18n("Co&nnect")); - if (result == KMessageBox::Yes) { - if (!d->dcc) { - d->dcc = new DCOPClient; - d->dcc->attach(); - if (!d->dcc->isApplicationRegistered("kio_uiserver")) { - TDEApplication::startServiceByDesktopPath("kio_uiserver.desktop", - TQStringList() ); - } - } - TQByteArray data, ignore; - TQCString ignoretype; - TQDataStream arg(data, IO_WriteOnly); - arg << theurl << mOutgoingMetaData; - arg << metaData("window-id").toInt(); - d->dcc->call("kio_uiserver", "UIServer", - "showSSLInfoDialog(TQString,TDEIO::MetaData,int)", - data, ignoretype, ignore); - } - } while (result == KMessageBox::Yes); - - if (result == KMessageBox::No) { - setMetaData("ssl_action", "accept"); - rc = 1; - cp = KSSLCertificateCache::Accept; - result = messageBox(WarningYesNo, - i18n("Would you like to accept this " - "certificate forever without " - "being prompted?"), - i18n("Server Authentication"), - i18n("&Forever"), - i18n("&Current Sessions Only")); - permacache = (result == KMessageBox::Yes); - d->cc->addCertificate(pc, cp, permacache); - d->cc->addHost(pc, ourHost); - } else { - setMetaData("ssl_action", "reject"); - rc = -1; - cp = KSSLCertificateCache::Prompt; - d->cc->addCertificate(pc, cp, permacache); - } - } - } - } - - - if (rc == -1) { - return rc; - } - - if (metaData("ssl_activate_warnings") == "TRUE") { - // - entering SSL - if (!isChild && metaData("ssl_was_in_use") == "FALSE" && - d->kssl->settings()->warnOnEnter()) { - int result; - do { - result = messageBox( i18n("You are about to " - "enter secure mode. " - "All transmissions " - "will be encrypted " - "unless otherwise " - "noted.\nThis means " - "that no third party " - "will be able to " - "easily observe your " - "data in transit."), - WarningYesNo, - i18n("Security Information"), - i18n("Display SSL " - "&Information"), - i18n("C&onnect"), - "WarnOnEnterSSLMode" ); - // Move this setting into KSSL instead - TDEConfig *config = new TDEConfig("kioslaverc"); - config->setGroup("Notification Messages"); - - if (!config->readBoolEntry("WarnOnEnterSSLMode", true)) { - config->deleteEntry("WarnOnEnterSSLMode"); - config->sync(); - d->kssl->settings()->setWarnOnEnter(false); - d->kssl->settings()->save(); - } - delete config; - - if ( result == KMessageBox::Yes ) - { - if (!d->dcc) { - d->dcc = new DCOPClient; - d->dcc->attach(); - if (!d->dcc->isApplicationRegistered("kio_uiserver")) { - TDEApplication::startServiceByDesktopPath("kio_uiserver.desktop", - TQStringList() ); - } - } - TQByteArray data, ignore; - TQCString ignoretype; - TQDataStream arg(data, IO_WriteOnly); - arg << theurl << mOutgoingMetaData; - arg << metaData("window-id").toInt(); - d->dcc->call("kio_uiserver", "UIServer", - "showSSLInfoDialog(TQString,TDEIO::MetaData,int)", - data, ignoretype, ignore); - } - } while (result != KMessageBox::No); - } - - } // if ssl_activate_warnings - - - kdDebug(7029) << "SSL connection information follows:" << endl - << "+-----------------------------------------------" << endl - << "| Cipher: " << d->kssl->connectionInfo().getCipher() << endl - << "| Description: " << d->kssl->connectionInfo().getCipherDescription() << endl - << "| Version: " << d->kssl->connectionInfo().getCipherVersion() << endl - << "| Strength: " << d->kssl->connectionInfo().getCipherUsedBits() - << " of " << d->kssl->connectionInfo().getCipherBits() - << " bits used." << endl - << "| PEER:" << endl - << "| Subject: " << d->kssl->peerInfo().getPeerCertificate().getSubject() << endl - << "| Issuer: " << d->kssl->peerInfo().getPeerCertificate().getIssuer() << endl - << "| Validation: " << (int)ksv << endl - << "| Certificate matches IP: " << _IPmatchesCN << endl - << "+-----------------------------------------------" - << endl; - - // sendMetaData(); Do not call this function!! - return rc; -} - - -bool TCPSlaveBase::isConnectionValid() -{ - if ( m_iSock == -1 ) - return false; - - fd_set rdfs; - FD_ZERO(&rdfs); - FD_SET(m_iSock , &rdfs); - - struct timeval tv; - tv.tv_usec = 0; - tv.tv_sec = 0; - int retval; -#ifdef Q_OS_UNIX - do { - retval = KSocks::self()->select(m_iSock+1, &rdfs, NULL, NULL, &tv); - if (wasKilled()) - return false; // Beam us out of here - } while ((retval == -1) && (errno == EAGAIN)); -#else - retval = -1; -#endif - // retval == -1 ==> Error - // retval == 0 ==> Connection Idle - // retval >= 1 ==> Connection Active - //kdDebug(7029) << "TCPSlaveBase::isConnectionValid: select returned: " - // << retval << endl; - - if (retval == -1) - return false; - - if (retval == 0) - return true; - - // Connection is active, check if it has closed. - char buffer[100]; -#ifdef Q_OS_UNIX - do { - retval = KSocks::self()->recv(m_iSock, buffer, 80, MSG_PEEK); - - } while ((retval == -1) && (errno == EAGAIN)); -#else - retval = -1; -#endif - //kdDebug(7029) << "TCPSlaveBase::isConnectionValid: recv returned: " - // << retval << endl; - if (retval <= 0) - return false; // Error or connection closed. - - return true; // Connection still valid. -} - - -bool TCPSlaveBase::waitForResponse( int t ) -{ - fd_set rd; - struct timeval timeout; - - if ( (m_bIsSSL || d->usingTLS) && !d->useSSLTunneling && d->kssl ) - if (d->kssl->pending() > 0) - return true; - - FD_ZERO(&rd); - FD_SET(m_iSock, &rd); - - timeout.tv_usec = 0; - timeout.tv_sec = t; - time_t startTime; - - int rc; - int n = t; - -reSelect: - startTime = time(NULL); -#ifdef Q_OS_UNIX - rc = KSocks::self()->select(m_iSock+1, &rd, NULL, NULL, &timeout); -#else - rc = -1; -#endif - if (wasKilled()) - return false; // We're dead. - - if (rc == -1) - return false; - - if (FD_ISSET(m_iSock, &rd)) - return true; - - // Well it returned but it wasn't set. Let's see if it - // returned too early (perhaps from an errant signal) and - // start over with the remaining time - int timeDone = time(NULL) - startTime; - if (timeDone < n) - { - n -= timeDone; - timeout.tv_sec = n; - goto reSelect; - } - - return false; // Timed out! -} - -int TCPSlaveBase::connectResult() -{ - return d->status; -} - -void TCPSlaveBase::setBlockConnection( bool b ) -{ - d->block = b; -} - -void TCPSlaveBase::setConnectTimeout( int t ) -{ - d->timeout = t; -} - -bool TCPSlaveBase::isSSLTunnelEnabled() -{ - return d->useSSLTunneling; -} - -void TCPSlaveBase::setEnableSSLTunnel( bool enable ) -{ - d->useSSLTunneling = enable; -} - -void TCPSlaveBase::setRealHost( const TQString& realHost ) -{ - d->realHost = realHost; -} - -bool TCPSlaveBase::doSSLHandShake( bool sendError ) -{ - kdDebug(7029) << "TCPSlaveBase::doSSLHandShake: " << endl; - TQString msgHost = d->host; - - d->kssl->reInitialize(); - - if (hasMetaData("ssl_session_id")) { - KSSLSession *s = KSSLSession::fromString(metaData("ssl_session_id")); - if (s) { - d->kssl->setSession(s); - delete s; - } - } - certificatePrompt(); - - if ( !d->realHost.isEmpty() ) - { - msgHost = d->realHost; - } - - kdDebug(7029) << "Setting real hostname: " << msgHost << endl; - d->kssl->setPeerHost(msgHost); - - d->status = d->kssl->connect(m_iSock); - if (d->status < 0) - { - closeDescriptor(); - if ( sendError ) - error( ERR_COULD_NOT_CONNECT, msgHost); - return false; - } - - setMetaData("ssl_session_id", d->kssl->session()->toString()); - setMetaData("ssl_in_use", "TRUE"); - - if (!d->kssl->reusingSession()) { - int rc = verifyCertificate(); - if ( rc != 1 ) { - d->status = -1; - closeDescriptor(); - if ( sendError ) - error( ERR_COULD_NOT_CONNECT, msgHost); - return false; - } - } - - d->needSSLHandShake = false; - - d->savedMetaData = mOutgoingMetaData; - return true; -} - - -bool TCPSlaveBase::userAborted() const -{ - return d->userAborted; -} - -void TCPSlaveBase::virtual_hook( int id, void* data ) -{ SlaveBase::virtual_hook( id, data ); } - diff --git a/kio/kio/tcpslavebase.h b/kio/kio/tcpslavebase.h deleted file mode 100644 index 52081c807..000000000 --- a/kio/kio/tcpslavebase.h +++ /dev/null @@ -1,389 +0,0 @@ -/* - * Copyright (C) 2000 Alex Zepeda - * Copyright (C) 2001 George Staikos - * Copyright (C) 2001 Dawit Alemayehu - * - * This file is part of the KDE project - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library 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 - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public License - * along with this library; see the file COPYING.LIB. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - */ - -#ifndef _TCP_SLAVEBASE_H -#define _TCP_SLAVEBASE_H - -#include -#include - -#include -#include - - -namespace TDEIO { - -/** - * There are two classes that specifies the protocol between application (job) - * and kioslave. SlaveInterface is the class to use on the application end, - * SlaveBase is the one to use on the slave end. - * - * Slave implementations should simply inherit SlaveBase - * - * A call to foo() results in a call to slotFoo() on the other end. - */ -class TDEIO_EXPORT TCPSlaveBase : public SlaveBase -{ -public: - TCPSlaveBase(unsigned short int defaultPort, const TQCString &protocol, - const TQCString &poolSocket, const TQCString &appSocket); - - TCPSlaveBase(unsigned short int defaultPort, const TQCString &protocol, - const TQCString &poolSocket, const TQCString &appSocket, - bool useSSL); - - virtual ~TCPSlaveBase(); - -protected: - -#ifndef KDE_NO_COMPAT - /** - * @deprecated Due to inconsistency with KDE naming convention. - */ - KDE_DEPRECATED ssize_t Write(const void *data, ssize_t len) { return write( data, len ); } - - /** - * @deprecated Due to inconsistency with KDE naming convention. - */ - KDE_DEPRECATED ssize_t Read(void *data, ssize_t len) { return read( data, len ); } - - /** - * @deprecated Due to inconsistency with KDE naming convention. - */ - KDE_DEPRECATED ssize_t ReadLine(char *data, ssize_t len) { return readLine( data, len ); } - - /** - * @deprecated Due to inconsistency with KDE naming convention. - */ - KDE_DEPRECATED unsigned short int GetPort(unsigned short int p) { return port(p); } - - /** - * @deprecated Due to inconsistency with KDE naming convention. - */ - KDE_DEPRECATED bool ConnectToHost( const TQString &host, unsigned int port, - bool sendError ) { return connectToHost( host, port, sendError ); } - - /** - * @deprecated Due to inconsistency with KDE naming convention. - */ - KDE_DEPRECATED void CloseDescriptor() { closeDescriptor(); } - - /** - * @deprecated Due to inconsistency with KDE naming convention. - */ - KDE_DEPRECATED bool AtEOF() { return atEnd(); } - - /** - * @deprecated Due to inconsistency with KDE naming convention. - */ - KDE_DEPRECATED bool InitializeSSL() { return initializeSSL(); } - - /** - * @deprecated Due to inconsistency with KDE naming convention. - */ - KDE_DEPRECATED void CleanSSL() { cleanSSL(); } -#endif - - /** - * This function acts like standard write function call - * except it is also capable of making SSL or SOCKS - * connections. - * - * @param data info to be sent to remote machine - * @param len the length of the data to be sent - * - * @return the actual size of the data that was sent - */ - ssize_t write(const void *data, ssize_t len); - - /** - * This function acts like standard read function call - * except it is also capable of deciphering SSL data as - * well as handling data over SOCKSified connections. - * - * @param data storage for the info read from server - * @param len length of the info to read from the server - * - * @return the actual size of data that was obtained - */ - ssize_t read(void *data, ssize_t len); - - /** - * Same as above except it reads data one line at a time. - */ - ssize_t readLine(char *data, ssize_t len); - - /** - * Sets the maximum size of blocks read in during calls to readLine(). - * This allows a slave to optimize for the protocol which it implements. - * Ideally this should be (common_line_length+1) or so. - * Making this too large will have adverse effects on performance. - * Initial/default value is 256(bytes) - */ - void setBlockSize(int sz); - - /** - * Determines the appropriate port to use. - * - * This functions attempts to discover the appropriate port. - * - * @param _port the port to try, if it works, it is returned - * @return the default port if the given port doesn't work - */ - unsigned short int port(unsigned short int _port); - - /** - * Performs the initial TCP connection stuff and/or - * SSL handshaking as necessary. - * - * Please note that unlike its deprecated counterpart, this - * function allows you to disable any error message from being - * sent back to the calling application! You can then use the - * connectResult() function to determine the result of the - * request for connection. - * - * @param host hostname - * @param port port number to connect to - * @param sendError if true sends error message to calling app. - * - * @return on succes, true is returned. - * on failure, false is returned and an appropriate - * error message is send to the application. - */ - bool connectToHost( const TQString &host, unsigned int port, - bool sendError = true ); - - /** - * Are we using SSL? - * - * @return if so, true is returned. - * if not, true isn't returned. - * @since 3.2 - */ - bool usingSSL() const { return m_bIsSSL; } - - /** - * Are we using TLS? - * - * @return if so, true is returned. - * if not, true isn't returned. - * @since 3.2 - */ - bool usingTLS() const; - - /** - * @obsolete kept for binary compatibility - * Are we using TLS? - * - * @return if so, true is returned. - * if not, true isn't returned. - */ - bool usingTLS(); - - /** - * Can we use TLS? - * - * @return if so, true is returned. - * if not, true isn't returned. - */ - bool canUseTLS(); - - /** - * Start using TLS on the connection. - * - * @return on success, 1 is returned. - * on failure, 0 is returned. - * on TLS init failure, -1 is returned. - * on connect failure, -2 is returned. - * on certificate failure, -3 is returned. - */ - int startTLS(); - - /** - * Stop using TLS on the connection. - */ - void stopTLS(); - - /** - * Closes the current file descriptor. - * - * Call this function to properly close up the socket - * since it also takes care to prroperly close the stdio - * fstream stuff, as well as sets the socket back to -1 - */ - void closeDescriptor(); - - - /** - * Returns true when end of data is reached - */ - bool atEnd(); - - - /** - * Call this if you use persistent connections and want all the - * metadata restored. This is particularly important for SSL - * sessions since the app needs to know the state of connection, - * certificates, etc. - */ - void setSSLMetaData(); - - - /** - * Initializs all SSL variables - */ - bool initializeSSL(); - - - /** - * Cleans up all SSL settings. - */ - void cleanSSL(); - - /** - * Determines whether or not we are still connected - * to the remote machine. - * - * This method may fail to detect a closed SSL connection. - * - * return @p true if the socket is still active or - * false otherwise. - */ - bool isConnectionValid(); - - /** - * Returns the status of the connection. - * - * This function allows you to invoke ConnectToHost - * with the @p sendError flag set to false so that you - * can send the appropriate error message back to the - * calling io-slave. - * - * @return the status code as returned by KExtendedSocket. - */ - int connectResult(); - - /** - * Wait for some type of activity on the socket - * for the period specified by @p t. - * - * @param t length of time in seconds that we should monitor the - * socket before timing out. - * - * @return true if any activity was seen on the socket before the - * timeout value was reached, false otherwise. - */ - bool waitForResponse( int t ); - - /** - * Sets the mode of the connection to blocking or non-blocking. - * - * Be sure to call this function before calling connectToHost. - * Otherwise, this setting will not have any effect until the next - * @p connectToHost. - * - * @param b true to make the connection a blocking one, false otherwise. - */ - void setBlockConnection( bool b ); - - /** - * Sets how long to wait for orignally connecting to - * the requested before timinig out. - * - * Be sure to call this function before calling ConnectToHost, - * otherwise the setting will not take effect until the next call - * to @p ConnectToHost. - * - * @param t timeout value - */ - void setConnectTimeout( int t ); - - /** - * Returns true if SSL tunneling is enabled. - * - * @see setEnableSSlTunnel - */ - bool isSSLTunnelEnabled(); - - /** - * Set up SSL tunneling mode. - * - * Calling this function with a @p true argument will allow - * you to temprarly ignore the @p m_bIsSSL flag setting and - * make a non-SSL connection. It is mostly useful for making - * connections to SSL sites through a non-transparent proxy - * server (i.e. most proxy servers out there). - * - * Note that once you have successfully "tunneled" through the - * proxy server you must call this function with its argument - * set to false to properly connect to the SSL site. - * - * @param enable if true SSL Tunneling will be enabled - */ - void setEnableSSLTunnel( bool enable ); - - /** - * Sets up the the real hostname for an SSL connection - * that goes through a proxy server. - * - * This function is essential in making sure that the - * real hostname is used for validating certificates from - * SSL sites! - * - * @param realHost the actual host name we are connecting to - */ - void setRealHost( const TQString& realHost ); - - // don't use me! - void doConstructorStuff(); - - // For the certificate verification code - int verifyCertificate(); - - // For prompting for the certificate to use - void certificatePrompt(); - - // Did the user abort (as the reason for connectToHost returning false) - bool userAborted() const; - -protected: - int m_iSock; - bool m_bIsSSL; - unsigned short int m_iPort; - unsigned short int m_iDefaultPort; - TQCString m_sServiceName; - FILE *fp; - -private: - bool doSSLHandShake( bool sendError ); - -protected: - virtual void virtual_hook( int id, void* data ); -private: - class TcpSlaveBasePrivate; - TcpSlaveBasePrivate *d; -}; - -} - -#endif diff --git a/kio/kio/tdelficon.cpp b/kio/kio/tdelficon.cpp deleted file mode 100644 index 49ceffd24..000000000 --- a/kio/kio/tdelficon.cpp +++ /dev/null @@ -1,89 +0,0 @@ -#include "tdelficon.h" - -#include - -/* - * Obtain an existing icon resource list - */ -int get_iconlist(libr_file *file_handle, iconlist *icons) -{ - if(icons == NULL) - { - /* Need to be able to return SOMETHING */ - return false; - } - /* Obtain the icon resource list */ - icons->buffer = libr_malloc(file_handle, ICON_SECTION, &(icons->size)); - if(icons->buffer == NULL) - return false; - return true; -} - -/* - * Get the next entry in an icon resource list - */ -iconentry *get_nexticon(iconlist *icons, iconentry *last_entry) -{ - size_t i; - - /* The icon list is needed both for the data buffer and for a call-specific iconentry instance */ - if(icons == NULL) - return NULL; - /* If this is the first call (last_entry == NULL) then return the first entry */ - if(last_entry == NULL) - icons->entry.offset = sizeof(uint32_t)+sizeof(UUID); - else - icons->entry.offset += icons->entry.entry_size; - /* Check to see if we've run out of entries */ - if(icons->entry.offset >= icons->size) - return NULL; - i = icons->entry.offset; - memcpy(&(icons->entry.entry_size), &(icons->buffer[i]), sizeof(uint32_t)); - i += sizeof(uint32_t); - icons->entry.type = (libr_icontype_t)icons->buffer[i]; - i += sizeof(unsigned char); - switch(icons->entry.type) - { - case LIBR_SVG: - icons->entry.icon_size = 0; - icons->entry.name = &(icons->buffer[i]); - break; - case LIBR_PNG: - memcpy(&(icons->entry.icon_size), &(icons->buffer[i]), sizeof(uint32_t)); - i += sizeof(uint32_t); - icons->entry.name = &(icons->buffer[i]); - break; - default: - /* Invalid entry type */ - return NULL; - } - return &(icons->entry); -} - -TQString elf_get_resource(libr_file *handle, char *section_name) -{ - size_t buffer_size = 0; - char *buffer = NULL; - TQString result; - - /* Get the resource from the ELF binary */ - if(!libr_size(handle, section_name, &buffer_size)) - { -// kdWarning() << "failed to obtain ELF resource size: " << libr_errmsg() << endl; - return result; - } - /* Get the resource from the ELF file */ - buffer = (char *) malloc(buffer_size+1); - buffer[buffer_size] = 0; - if(!libr_read(handle, section_name, buffer)) - { -// kdWarning() << "failed to obtain ELF resource: " << libr_errmsg() << endl; - goto fail; - } - result = buffer; - -fail: - free(buffer); - - return result; -} diff --git a/kio/kio/tdelficon.h b/kio/kio/tdelficon.h deleted file mode 100644 index 7a962bdaa..000000000 --- a/kio/kio/tdelficon.h +++ /dev/null @@ -1,54 +0,0 @@ -#include -#include -#include - -#include -#include -#include -#include -#include - -extern "C" { - #include - - // BEGIN HACK - // libr does not export these structures and defines, - // but we need access to them to make the UI behave sanely - // Keep them in sync with libr and all should be OK - - // Valid for libr version 0.6.0 - // See libr detection code in ConfigureChecks.cmake - - typedef uint32_t ID8; - typedef uint16_t ID4; - typedef struct {uint64_t p:48;} __attribute__((__packed__)) ID12; - - typedef struct { - ID8 g1; - ID4 g2; - ID4 g3; - ID4 g4; - ID12 g5; - } __attribute__((__packed__)) UUID; - - typedef struct { - char *name; - size_t offset; - size_t entry_size; - libr_icontype_t type; - unsigned int icon_size; - } iconentry; - - typedef struct{ - size_t size; - char *buffer; - iconentry entry; - } iconlist; - - #define ICON_SECTION ".icon" - // END HACK -} - -int get_iconlist(libr_file *file_handle, iconlist *icons); -iconentry *get_nexticon(iconlist *icons, iconentry *last_entry); -TQString elf_get_resource(libr_file *handle, char *section_name); \ No newline at end of file diff --git a/kio/kio/thumbcreator.h b/kio/kio/thumbcreator.h deleted file mode 100644 index 79d499e7f..000000000 --- a/kio/kio/thumbcreator.h +++ /dev/null @@ -1,124 +0,0 @@ -/* This file is part of the KDE libraries - Copyright (C) 2000 Malte Starostik - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef _THUMBCREATOR_H_ -#define _THUMBCREATOR_H_ - -#include - -class TQString; -class TQImage; -/** - * This is the baseclass for "thumbnail-plugins" in KDE. Using the class - * TDEIO::PreviewJob allows you to generate small images (thumbnails) - * for any kind of file, where a "ThumbCreator" is available. Have a look - * at tdebase/kioslave/thumbnail/ for existing ThumbCreators. - * - * What you need to do to create and register a ThumbCreator: - * @li Inherit from this class and reimplement the create() method to - * generate a thumbnail for the given file-path. - * @li Provide a factory method in your implementation file to instantiate - * your plugin, e.g.: - * \code - * extern "C" - * { - * ThumbCreator *new_creator() - * { - * return new YourThumbCreator(); - * } - * }; - * \endcode - * - * Compile your ThumbCreator as a module. The contents of Makefile.am - * need to look like this: - * \code - * INCLUDES = $(all_includes) - * kde_module_LTLIBRARIES = yourthumbcreator.la - * yourthumbcreator_la_SOURCES = yourthumbcreator.cpp - * yourthumbcreator_la_LIBADD = $(LIB_KIO) - * yourthumbcreator_la_LDFLAGS = $(all_libraries) -module $(KDE_PLUGIN) - * kde_services_DATA = yourthumbcreator.desktop - * \endcode - * - * @li Create a file yourthumbcreator.desktop with the following contents: - * \code - * [Desktop Entry] - * Encoding=UTF-8 - * Type=Service - * Name=Name of the type of files your ThumbCreator supports - * ServiceTypes=ThumbCreator - * MimeTypes=application/x-somemimetype - * CacheThumbnail=true - * X-TDE-Library=yourthumbcreator - * \endcode - * - * You can supply a comma-separated list of mimetypes to the MimeTypes entry, - * naming all mimetypes your ThumbCreator supports. You can also use simple - * wildcards, like (where you see [slash], put a /) - * \code - * text[slash]* or image[slash]*. - * \endcode - * - * If your plugin is rather inexpensive (e.g. like the text preview ThumbCreator), - * you can set CacheThumbnail=false to prevent your thumbnails from being cached - * on disk. - * - * @short Baseclass for thumbnail-generating plugins. - */ -class ThumbCreator -{ -public: - /** - * The flags of this plugin. - * @see flags() - */ - enum Flags { None = 0, DrawFrame = 1, BlendIcon = 2 }; - virtual ~ThumbCreator() {} - - /** - * Creates a thumbnail - * Note that the width and height parameters should not be used - * for scaling. Only plugins that create an image "from scratch", - * like the TextCreator should directly use the specified size. - * If the resulting preview is larger than width x height, it will be - * scaled down. - * - * @param path the (always local) file path to create a preview for - * @param width maximum width for the preview - * @param height maximum height for the preview - * @param img this image will contain the preview on success - * - * @return true if preview generation succeeded - */ - virtual bool create(const TQString &path, int width, int height, TQImage &img) = 0; - - /** - * The flags of this plugin: - * @li None nothing special - * @li DrawFrame a frame should be painted around the preview - * @li BlendIcon the mimetype icon should be blended over the preview - * - * @return flags for this plugin - */ - virtual Flags flags() const { return None; } -}; - -typedef ThumbCreator *(*newCreator)(); - -#endif diff --git a/kio/kio/yacc.c b/kio/kio/yacc.c deleted file mode 100644 index a6fa63428..000000000 --- a/kio/kio/yacc.c +++ /dev/null @@ -1,1522 +0,0 @@ -/* A Bison parser, made by GNU Bison 2.0. */ - -/* Skeleton parser for Yacc-like parsing with Bison, - Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. - - 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, 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 Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -/* As a special exception, when this file is copied by Bison into a - Bison output file, you may use that output file without restriction. - This special exception was added by the Free Software Foundation - in version 1.24 of Bison. */ - -/* Written by Richard Stallman by simplifying the original so called - ``semantic'' parser. */ - -/* All symbols defined below should begin with yy or YY, to avoid - infringing on user name space. This should be done even for local - variables, as they might otherwise be expanded by user macros. - There are some unavoidable exceptions within include files to - define necessary library symbols; they are noted "INFRINGES ON - USER NAME SPACE" below. */ - -/* Identify Bison output. */ -#define YYBISON 1 - -/* Skeleton name. */ -#define YYSKELETON_NAME "yacc.c" - -/* Pure parsers. */ -#define YYPURE 0 - -/* Using locations. */ -#define YYLSP_NEEDED 0 - -/* Substitute the variable and function names. */ -#define yyparse kiotraderparse -#define yylex kiotraderlex -#define yyerror kiotradererror -#define yylval kiotraderlval -#define yychar kiotraderchar -#define yydebug kiotraderdebug -#define yynerrs kiotradernerrs - - -/* Tokens. */ -#ifndef YYTOKENTYPE -# define YYTOKENTYPE - /* Put the tokens into the symbol table, so that GDB and other debuggers - know about them. */ - enum yytokentype { - NOT = 258, - EQ = 259, - NEQ = 260, - LEQ = 261, - GEQ = 262, - LE = 263, - GR = 264, - OR = 265, - AND = 266, - TOKEN_IN = 267, - EXIST = 268, - MAX = 269, - MIN = 270, - VAL_BOOL = 271, - VAL_STRING = 272, - VAL_ID = 273, - VAL_NUM = 274, - VAL_FLOAT = 275 - }; -#endif -#define NOT 258 -#define EQ 259 -#define NEQ 260 -#define LEQ 261 -#define GEQ 262 -#define LE 263 -#define GR 264 -#define OR 265 -#define AND 266 -#define TOKEN_IN 267 -#define EXIST 268 -#define MAX 269 -#define MIN 270 -#define VAL_BOOL 271 -#define VAL_STRING 272 -#define VAL_ID 273 -#define VAL_NUM 274 -#define VAL_FLOAT 275 - - - - -/* Copy the first part of user declarations. */ -#line 1 "yacc.y" - -#include -#include -#include "ktraderparse.h" - -void yyerror(const char *s); -int yylex(); -void KTraderParse_initFlex( const char *s ); - - - -/* Enabling traces. */ -#ifndef YYDEBUG -# define YYDEBUG 0 -#endif - -/* Enabling verbose error messages. */ -#ifdef YYERROR_VERBOSE -# undef YYERROR_VERBOSE -# define YYERROR_VERBOSE 1 -#else -# define YYERROR_VERBOSE 0 -#endif - -#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED) -#line 13 "yacc.y" -typedef union YYSTYPE { - char valb; - int vali; - double vald; - char *name; - void *ptr; -} YYSTYPE; -/* Line 190 of yacc.c. */ -#line 143 "yacc.tab.c" -# define yystype YYSTYPE /* obsolescent; will be withdrawn */ -# define YYSTYPE_IS_DECLARED 1 -# define YYSTYPE_IS_TRIVIAL 1 -#endif - - - -/* Copy the second part of user declarations. */ - - -/* Line 213 of yacc.c. */ -#line 155 "yacc.tab.c" - -#if ! defined (yyoverflow) || YYERROR_VERBOSE - -# ifndef YYFREE -# define YYFREE free -# endif -# ifndef YYMALLOC -# define YYMALLOC malloc -# endif - -/* The parser invokes alloca or malloc; define the necessary symbols. */ - -# ifdef YYSTACK_USE_ALLOCA -# if YYSTACK_USE_ALLOCA -# ifdef __GNUC__ -# define YYSTACK_ALLOC __builtin_alloca -# else -# define YYSTACK_ALLOC alloca -# endif -# endif -# endif - -# ifdef YYSTACK_ALLOC - /* Pacify GCC's `empty if-body' warning. */ -# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) -# else -# if defined (__STDC__) || defined (__cplusplus) -# include /* INFRINGES ON USER NAME SPACE */ -# define YYSIZE_T size_t -# endif -# define YYSTACK_ALLOC YYMALLOC -# define YYSTACK_FREE YYFREE -# endif -#endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */ - - -#if (! defined (yyoverflow) \ - && (! defined (__cplusplus) \ - || (defined (YYSTYPE_IS_TRIVIAL) && YYSTYPE_IS_TRIVIAL))) - -/* A type that is properly aligned for any stack member. */ -union yyalloc -{ - short int yyss; - YYSTYPE yyvs; - }; - -/* The size of the maximum gap between one aligned stack and the next. */ -# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) - -/* The size of an array large to enough to hold all stacks, each with - N elements. */ -# define YYSTACK_BYTES(N) \ - ((N) * (sizeof (short int) + sizeof (YYSTYPE)) \ - + YYSTACK_GAP_MAXIMUM) - -/* Copy COUNT objects from FROM to TO. The source and destination do - not overlap. */ -# ifndef YYCOPY -# if defined (__GNUC__) && 1 < __GNUC__ -# define YYCOPY(To, From, Count) \ - __builtin_memcpy (To, From, (Count) * sizeof (*(From))) -# else -# define YYCOPY(To, From, Count) \ - do \ - { \ - register YYSIZE_T yyi; \ - for (yyi = 0; yyi < (Count); yyi++) \ - (To)[yyi] = (From)[yyi]; \ - } \ - while (0) -# endif -# endif - -/* Relocate STACK from its old location to the new one. The - local variables YYSIZE and YYSTACKSIZE give the old and new number of - elements in the stack, and YYPTR gives the new location of the - stack. Advance YYPTR to a properly aligned location for the next - stack. */ -# define YYSTACK_RELOCATE(Stack) \ - do \ - { \ - YYSIZE_T yynewbytes; \ - YYCOPY (&yyptr->Stack, Stack, yysize); \ - Stack = &yyptr->Stack; \ - yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ - yyptr += yynewbytes / sizeof (*yyptr); \ - } \ - while (0) - -#endif - -#if defined (__STDC__) || defined (__cplusplus) - typedef signed char yysigned_char; -#else - typedef short int yysigned_char; -#endif - -/* YYFINAL -- State number of the termination state. */ -#define YYFINAL 27 -/* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 55 - -/* YYNTOKENS -- Number of terminals. */ -#define YYNTOKENS 28 -/* YYNNTS -- Number of nonterminals. */ -#define YYNNTS 12 -/* YYNRULES -- Number of rules. */ -#define YYNRULES 36 -/* YYNRULES -- Number of states. */ -#define YYNSTATES 57 - -/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ -#define YYUNDEFTOK 2 -#define YYMAXUTOK 275 - -#define YYTRANSLATE(YYX) \ - ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) - -/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ -static const unsigned char yytranslate[] = -{ - 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 26, 27, 24, 22, 2, 23, 2, 25, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 21, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, - 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, - 15, 16, 17, 18, 19, 20 -}; - -#if YYDEBUG -/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in - YYRHS. */ -static const unsigned char yyprhs[] = -{ - 0, 0, 3, 4, 6, 8, 12, 14, 18, 20, - 24, 28, 32, 36, 40, 44, 46, 50, 52, 56, - 58, 62, 66, 68, 72, 76, 78, 81, 83, 87, - 90, 92, 94, 96, 98, 100, 103 -}; - -/* YYRHS -- A `-1'-separated list of the rules' RHS. */ -static const yysigned_char yyrhs[] = -{ - 29, 0, -1, -1, 30, -1, 31, -1, 32, 10, - 31, -1, 32, -1, 33, 11, 32, -1, 33, -1, - 34, 4, 34, -1, 34, 5, 34, -1, 34, 7, - 34, -1, 34, 6, 34, -1, 34, 8, 34, -1, - 34, 9, 34, -1, 34, -1, 35, 12, 18, -1, - 35, -1, 36, 21, 36, -1, 36, -1, 36, 22, - 37, -1, 36, 23, 37, -1, 37, -1, 37, 24, - 38, -1, 37, 25, 38, -1, 38, -1, 3, 39, - -1, 39, -1, 26, 31, 27, -1, 13, 18, -1, - 18, -1, 19, -1, 20, -1, 17, -1, 16, -1, - 14, 18, -1, 15, 18, -1 -}; - -/* YYRLINE[YYN] -- source line where rule number YYN was defined. */ -static const unsigned char yyrline[] = -{ - 0, 56, 56, 57, 60, 63, 64, 67, 68, 71, - 72, 73, 74, 75, 76, 77, 80, 81, 84, 85, - 88, 89, 90, 93, 94, 95, 98, 99, 102, 103, - 104, 105, 106, 107, 108, 109, 110 -}; -#endif - -#if YYDEBUG || YYERROR_VERBOSE -/* YYTNME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. - First, the terminals, then, starting at YYNTOKENS, nonterminals. */ -static const char *const yytname[] = -{ - "$end", "error", "$undefined", "NOT", "EQ", "NEQ", "LEQ", "GEQ", "LE", - "GR", "OR", "AND", "TOKEN_IN", "EXIST", "MAX", "MIN", "VAL_BOOL", - "VAL_STRING", "VAL_ID", "VAL_NUM", "VAL_FLOAT", "'~'", "'+'", "'-'", - "'*'", "'/'", "'('", "')'", "$accept", "constraint", "bool", "bool_or", - "bool_and", "bool_compare", "expr_in", "expr_twiddle", "expr", "term", - "factor_non", "factor", 0 -}; -#endif - -# ifdef YYPRINT -/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to - token YYLEX-NUM. */ -static const unsigned short int yytoknum[] = -{ - 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, - 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, - 275, 126, 43, 45, 42, 47, 40, 41 -}; -# endif - -/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ -static const unsigned char yyr1[] = -{ - 0, 28, 29, 29, 30, 31, 31, 32, 32, 33, - 33, 33, 33, 33, 33, 33, 34, 34, 35, 35, - 36, 36, 36, 37, 37, 37, 38, 38, 39, 39, - 39, 39, 39, 39, 39, 39, 39 -}; - -/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ -static const unsigned char yyr2[] = -{ - 0, 2, 0, 1, 1, 3, 1, 3, 1, 3, - 3, 3, 3, 3, 3, 1, 3, 1, 3, 1, - 3, 3, 1, 3, 3, 1, 2, 1, 3, 2, - 1, 1, 1, 1, 1, 2, 2 -}; - -/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state - STATE-NUM when YYTABLE doesn't specify something else to do. Zero - means the default is an error. */ -static const unsigned char yydefact[] = -{ - 2, 0, 0, 0, 0, 34, 33, 30, 31, 32, - 0, 0, 3, 4, 6, 8, 15, 17, 19, 22, - 25, 27, 26, 29, 35, 36, 0, 1, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 28, 5, 7, 9, 10, 12, 11, 13, - 14, 16, 18, 20, 21, 23, 24 -}; - -/* YYDEFGOTO[NTERM-NUM]. */ -static const yysigned_char yydefgoto[] = -{ - -1, 11, 12, 13, 14, 15, 16, 17, 18, 19, - 20, 21 -}; - -/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing - STATE-NUM. */ -#define YYPACT_NINF -17 -static const yysigned_char yypact[] = -{ - -3, 11, 0, 18, 28, -17, -17, -17, -17, -17, - -3, 47, -17, -17, 38, 39, -2, 37, -1, -16, - -17, -17, -17, -17, -17, -17, 24, -17, -3, -3, - -3, -3, -3, -3, -3, -3, 34, -3, -3, -3, - -3, -3, -17, -17, -17, -17, -17, -17, -17, -17, - -17, -17, 10, -16, -16, -17, -17 -}; - -/* YYPGOTO[NTERM-NUM]. */ -static const yysigned_char yypgoto[] = -{ - -17, -17, -17, -9, 25, -17, 8, -17, 16, -4, - 4, 54 -}; - -/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If - positive, shift that token. If negative, reduce the rule which - number is the opposite. If zero, do what YYDEFACT says. - If YYTABLE_NINF, syntax error. */ -#define YYTABLE_NINF -1 -static const unsigned char yytable[] = -{ - 1, 26, 30, 31, 32, 33, 34, 35, 40, 41, - 2, 3, 4, 5, 6, 7, 8, 9, 23, 43, - 37, 38, 39, 10, 2, 3, 4, 5, 6, 7, - 8, 9, 38, 39, 53, 54, 24, 10, 45, 46, - 47, 48, 49, 50, 55, 56, 25, 27, 28, 36, - 29, 42, 51, 52, 44, 22 -}; - -static const unsigned char yycheck[] = -{ - 3, 10, 4, 5, 6, 7, 8, 9, 24, 25, - 13, 14, 15, 16, 17, 18, 19, 20, 18, 28, - 21, 22, 23, 26, 13, 14, 15, 16, 17, 18, - 19, 20, 22, 23, 38, 39, 18, 26, 30, 31, - 32, 33, 34, 35, 40, 41, 18, 0, 10, 12, - 11, 27, 18, 37, 29, 1 -}; - -/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing - symbol of state STATE-NUM. */ -static const unsigned char yystos[] = -{ - 0, 3, 13, 14, 15, 16, 17, 18, 19, 20, - 26, 29, 30, 31, 32, 33, 34, 35, 36, 37, - 38, 39, 39, 18, 18, 18, 31, 0, 10, 11, - 4, 5, 6, 7, 8, 9, 12, 21, 22, 23, - 24, 25, 27, 31, 32, 34, 34, 34, 34, 34, - 34, 18, 36, 37, 37, 38, 38 -}; - -#if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__) -# define YYSIZE_T __SIZE_TYPE__ -#endif -#if ! defined (YYSIZE_T) && defined (size_t) -# define YYSIZE_T size_t -#endif -#if ! defined (YYSIZE_T) -# if defined (__STDC__) || defined (__cplusplus) -# include /* INFRINGES ON USER NAME SPACE */ -# define YYSIZE_T size_t -# endif -#endif -#if ! defined (YYSIZE_T) -# define YYSIZE_T unsigned int -#endif - -#define yyerrok (yyerrstatus = 0) -#define yyclearin (yychar = YYEMPTY) -#define YYEMPTY (-2) -#define YYEOF 0 - -#define YYACCEPT goto yyacceptlab -#define YYABORT goto yyabortlab -#define YYERROR goto yyerrorlab - - -/* Like YYERROR except do call yyerror. This remains here temporarily - to ease the transition to the new meaning of YYERROR, for GCC. - Once GCC version 2 has supplanted version 1, this can go. */ - -#define YYFAIL goto yyerrlab - -#define YYRECOVERING() (!!yyerrstatus) - -#define YYBACKUP(Token, Value) \ -do \ - if (yychar == YYEMPTY && yylen == 1) \ - { \ - yychar = (Token); \ - yylval = (Value); \ - yytoken = YYTRANSLATE (yychar); \ - YYPOPSTACK; \ - goto yybackup; \ - } \ - else \ - { \ - yyerror ("syntax error: cannot back up");\ - YYERROR; \ - } \ -while (0) - - -#define YYTERROR 1 -#define YYERRCODE 256 - - -/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. - If N is 0, then set CURRENT to the empty location which ends - the previous symbol: RHS[0] (always defined). */ - -#define YYRHSLOC(Rhs, K) ((Rhs)[K]) -#ifndef YYLLOC_DEFAULT -# define YYLLOC_DEFAULT(Current, Rhs, N) \ - do \ - if (N) \ - { \ - (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ - (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ - (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ - (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ - } \ - else \ - { \ - (Current).first_line = (Current).last_line = \ - YYRHSLOC (Rhs, 0).last_line; \ - (Current).first_column = (Current).last_column = \ - YYRHSLOC (Rhs, 0).last_column; \ - } \ - while (0) -#endif - - -/* YY_LOCATION_PRINT -- Print the location on the stream. - This macro was not mandated originally: define only if we know - we won't break user code: when these are the locations we know. */ - -#ifndef YY_LOCATION_PRINT -# if YYLTYPE_IS_TRIVIAL -# define YY_LOCATION_PRINT(File, Loc) \ - fprintf (File, "%d.%d-%d.%d", \ - (Loc).first_line, (Loc).first_column, \ - (Loc).last_line, (Loc).last_column) -# else -# define YY_LOCATION_PRINT(File, Loc) ((void) 0) -# endif -#endif - - -/* YYLEX -- calling `yylex' with the right arguments. */ - -#ifdef YYLEX_PARAM -# define YYLEX yylex (YYLEX_PARAM) -#else -# define YYLEX yylex () -#endif - -/* Enable debugging if requested. */ -#if YYDEBUG - -# ifndef YYFPRINTF -# include /* INFRINGES ON USER NAME SPACE */ -# define YYFPRINTF fprintf -# endif - -# define YYDPRINTF(Args) \ -do { \ - if (yydebug) \ - YYFPRINTF Args; \ -} while (0) - -# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ -do { \ - if (yydebug) \ - { \ - YYFPRINTF (stderr, "%s ", Title); \ - yysymprint (stderr, \ - Type, Value); \ - YYFPRINTF (stderr, "\n"); \ - } \ -} while (0) - -/*------------------------------------------------------------------. -| yy_stack_print -- Print the state stack from its BOTTOM up to its | -| TOP (included). | -`------------------------------------------------------------------*/ - -#if defined (__STDC__) || defined (__cplusplus) -static void -yy_stack_print (short int *bottom, short int *top) -#else -static void -yy_stack_print (bottom, top) - short int *bottom; - short int *top; -#endif -{ - YYFPRINTF (stderr, "Stack now"); - for (/* Nothing. */; bottom <= top; ++bottom) - YYFPRINTF (stderr, " %d", *bottom); - YYFPRINTF (stderr, "\n"); -} - -# define YY_STACK_PRINT(Bottom, Top) \ -do { \ - if (yydebug) \ - yy_stack_print ((Bottom), (Top)); \ -} while (0) - - -/*------------------------------------------------. -| Report that the YYRULE is going to be reduced. | -`------------------------------------------------*/ - -#if defined (__STDC__) || defined (__cplusplus) -static void -yy_reduce_print (int yyrule) -#else -static void -yy_reduce_print (yyrule) - int yyrule; -#endif -{ - int yyi; - unsigned int yylno = yyrline[yyrule]; - YYFPRINTF (stderr, "Reducing stack by rule %d (line %u), ", - yyrule - 1, yylno); - /* Print the symbols being reduced, and their result. */ - for (yyi = yyprhs[yyrule]; 0 <= yyrhs[yyi]; yyi++) - YYFPRINTF (stderr, "%s ", yytname [yyrhs[yyi]]); - YYFPRINTF (stderr, "-> %s\n", yytname [yyr1[yyrule]]); -} - -# define YY_REDUCE_PRINT(Rule) \ -do { \ - if (yydebug) \ - yy_reduce_print (Rule); \ -} while (0) - -/* Nonzero means print parse trace. It is left uninitialized so that - multiple parsers can coexist. */ -int yydebug; -#else /* !YYDEBUG */ -# define YYDPRINTF(Args) -# define YY_SYMBOL_PRINT(Title, Type, Value, Location) -# define YY_STACK_PRINT(Bottom, Top) -# define YY_REDUCE_PRINT(Rule) -#endif /* !YYDEBUG */ - - -/* YYINITDEPTH -- initial size of the parser's stacks. */ -#ifndef YYINITDEPTH -# define YYINITDEPTH 200 -#endif - -/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only - if the built-in stack extension method is used). - - Do not make this value too large; the results are undefined if - SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH) - evaluated with infinite-precision integer arithmetic. */ - -#ifndef YYMAXDEPTH -# define YYMAXDEPTH 10000 -#endif - - - -#if YYERROR_VERBOSE - -# ifndef yystrlen -# if defined (__GLIBC__) && defined (_STRING_H) -# define yystrlen strlen -# else -/* Return the length of YYSTR. */ -static YYSIZE_T -# if defined (__STDC__) || defined (__cplusplus) -yystrlen (const char *yystr) -# else -yystrlen (yystr) - const char *yystr; -# endif -{ - register const char *yys = yystr; - - while (*yys++ != '\0') - continue; - - return yys - yystr - 1; -} -# endif -# endif - -# ifndef yystpcpy -# if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE) -# define yystpcpy stpcpy -# else -/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in - YYDEST. */ -static char * -# if defined (__STDC__) || defined (__cplusplus) -yystpcpy (char *yydest, const char *yysrc) -# else -yystpcpy (yydest, yysrc) - char *yydest; - const char *yysrc; -# endif -{ - register char *yyd = yydest; - register const char *yys = yysrc; - - while ((*yyd++ = *yys++) != '\0') - continue; - - return yyd - 1; -} -# endif -# endif - -#endif /* !YYERROR_VERBOSE */ - - - -#if YYDEBUG -/*--------------------------------. -| Print this symbol on YYOUTPUT. | -`--------------------------------*/ - -#if defined (__STDC__) || defined (__cplusplus) -static void -yysymprint (FILE *yyoutput, int yytype, YYSTYPE *yyvaluep) -#else -static void -yysymprint (yyoutput, yytype, yyvaluep) - FILE *yyoutput; - int yytype; - YYSTYPE *yyvaluep; -#endif -{ - /* Pacify ``unused variable'' warnings. */ - (void) yyvaluep; - - if (yytype < YYNTOKENS) - YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); - else - YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); - - -# ifdef YYPRINT - if (yytype < YYNTOKENS) - YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); -# endif - switch (yytype) - { - default: - break; - } - YYFPRINTF (yyoutput, ")"); -} - -#endif /* ! YYDEBUG */ -/*-----------------------------------------------. -| Release the memory associated to this symbol. | -`-----------------------------------------------*/ - -#if defined (__STDC__) || defined (__cplusplus) -static void -yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep) -#else -static void -yydestruct (yymsg, yytype, yyvaluep) - const char *yymsg; - int yytype; - YYSTYPE *yyvaluep; -#endif -{ - /* Pacify ``unused variable'' warnings. */ - (void) yyvaluep; - - if (!yymsg) - yymsg = "Deleting"; - YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); - - switch (yytype) - { - - default: - break; - } -} - - -/* Prevent warnings from -Wmissing-prototypes. */ - -#ifdef YYPARSE_PARAM -# if defined (__STDC__) || defined (__cplusplus) -int yyparse (void *YYPARSE_PARAM); -# else -int yyparse (); -# endif -#else /* ! YYPARSE_PARAM */ -#if defined (__STDC__) || defined (__cplusplus) -int yyparse (void); -#else -int yyparse (); -#endif -#endif /* ! YYPARSE_PARAM */ - - - -/* The look-ahead symbol. */ -int yychar; - -/* The semantic value of the look-ahead symbol. */ -YYSTYPE yylval; - -/* Number of syntax errors so far. */ -int yynerrs; - - - -/*----------. -| yyparse. | -`----------*/ - -#ifdef YYPARSE_PARAM -# if defined (__STDC__) || defined (__cplusplus) -int yyparse (void *YYPARSE_PARAM) -# else -int yyparse (YYPARSE_PARAM) - void *YYPARSE_PARAM; -# endif -#else /* ! YYPARSE_PARAM */ -#if defined (__STDC__) || defined (__cplusplus) -int -yyparse (void) -#else -int -yyparse () - -#endif -#endif -{ - - register int yystate; - register int yyn; - int yyresult; - /* Number of tokens to shift before error messages enabled. */ - int yyerrstatus; - /* Look-ahead token as an internal (translated) token number. */ - int yytoken = 0; - - /* Three stacks and their tools: - `yyss': related to states, - `yyvs': related to semantic values, - `yyls': related to locations. - - Refer to the stacks thru separate pointers, to allow yyoverflow - to reallocate them elsewhere. */ - - /* The state stack. */ - short int yyssa[YYINITDEPTH]; - short int *yyss = yyssa; - register short int *yyssp; - - /* The semantic value stack. */ - YYSTYPE yyvsa[YYINITDEPTH]; - YYSTYPE *yyvs = yyvsa; - register YYSTYPE *yyvsp; - - - -#define YYPOPSTACK (yyvsp--, yyssp--) - - YYSIZE_T yystacksize = YYINITDEPTH; - - /* The variables used to return semantic value and location from the - action routines. */ - YYSTYPE yyval; - - - /* When reducing, the number of symbols on the RHS of the reduced - rule. */ - int yylen; - - YYDPRINTF ((stderr, "Starting parse\n")); - - yystate = 0; - yyerrstatus = 0; - yynerrs = 0; - yychar = YYEMPTY; /* Cause a token to be read. */ - - /* Initialize stack pointers. - Waste one element of value and location stack - so that they stay on the same level as the state stack. - The wasted elements are never initialized. */ - - yyssp = yyss; - yyvsp = yyvs; - - - yyvsp[0] = yylval; - - goto yysetstate; - -/*------------------------------------------------------------. -| yynewstate -- Push a new state, which is found in yystate. | -`------------------------------------------------------------*/ - yynewstate: - /* In all cases, when you get here, the value and location stacks - have just been pushed. so pushing a state here evens the stacks. - */ - yyssp++; - - yysetstate: - *yyssp = yystate; - - if (yyss + yystacksize - 1 <= yyssp) - { - /* Get the current used size of the three stacks, in elements. */ - YYSIZE_T yysize = yyssp - yyss + 1; - -#ifdef yyoverflow - { - /* Give user a chance to reallocate the stack. Use copies of - these so that the &'s don't force the real ones into - memory. */ - YYSTYPE *yyvs1 = yyvs; - short int *yyss1 = yyss; - - - /* Each stack pointer address is followed by the size of the - data in use in that stack, in bytes. This used to be a - conditional around just the two extra args, but that might - be undefined if yyoverflow is a macro. */ - yyoverflow ("parser stack overflow", - &yyss1, yysize * sizeof (*yyssp), - &yyvs1, yysize * sizeof (*yyvsp), - - &yystacksize); - - yyss = yyss1; - yyvs = yyvs1; - } -#else /* no yyoverflow */ -# ifndef YYSTACK_RELOCATE - goto yyoverflowlab; -# else - /* Extend the stack our own way. */ - if (YYMAXDEPTH <= yystacksize) - goto yyoverflowlab; - yystacksize *= 2; - if (YYMAXDEPTH < yystacksize) - yystacksize = YYMAXDEPTH; - - { - short int *yyss1 = yyss; - union yyalloc *yyptr = - (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); - if (! yyptr) - goto yyoverflowlab; - YYSTACK_RELOCATE (yyss); - YYSTACK_RELOCATE (yyvs); - -# undef YYSTACK_RELOCATE - if (yyss1 != yyssa) - YYSTACK_FREE (yyss1); - } -# endif -#endif /* no yyoverflow */ - - yyssp = yyss + yysize - 1; - yyvsp = yyvs + yysize - 1; - - - YYDPRINTF ((stderr, "Stack size increased to %lu\n", - (unsigned long int) yystacksize)); - - if (yyss + yystacksize - 1 <= yyssp) - YYABORT; - } - - YYDPRINTF ((stderr, "Entering state %d\n", yystate)); - - goto yybackup; - -/*-----------. -| yybackup. | -`-----------*/ -yybackup: - -/* Do appropriate processing given the current state. */ -/* Read a look-ahead token if we need one and don't already have one. */ -/* yyresume: */ - - /* First try to decide what to do without reference to look-ahead token. */ - - yyn = yypact[yystate]; - if (yyn == YYPACT_NINF) - goto yydefault; - - /* Not known => get a look-ahead token if don't already have one. */ - - /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */ - if (yychar == YYEMPTY) - { - YYDPRINTF ((stderr, "Reading a token: ")); - yychar = YYLEX; - } - - if (yychar <= YYEOF) - { - yychar = yytoken = YYEOF; - YYDPRINTF ((stderr, "Now at end of input.\n")); - } - else - { - yytoken = YYTRANSLATE (yychar); - YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); - } - - /* If the proper action on seeing token YYTOKEN is to reduce or to - detect an error, take that action. */ - yyn += yytoken; - if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) - goto yydefault; - yyn = yytable[yyn]; - if (yyn <= 0) - { - if (yyn == 0 || yyn == YYTABLE_NINF) - goto yyerrlab; - yyn = -yyn; - goto yyreduce; - } - - if (yyn == YYFINAL) - YYACCEPT; - - /* Shift the look-ahead token. */ - YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); - - /* Discard the token being shifted unless it is eof. */ - if (yychar != YYEOF) - yychar = YYEMPTY; - - *++yyvsp = yylval; - - - /* Count tokens shifted since error; after three, turn off error - status. */ - if (yyerrstatus) - yyerrstatus--; - - yystate = yyn; - goto yynewstate; - - -/*-----------------------------------------------------------. -| yydefault -- do the default action for the current state. | -`-----------------------------------------------------------*/ -yydefault: - yyn = yydefact[yystate]; - if (yyn == 0) - goto yyerrlab; - goto yyreduce; - - -/*-----------------------------. -| yyreduce -- Do a reduction. | -`-----------------------------*/ -yyreduce: - /* yyn is the number of a rule to reduce with. */ - yylen = yyr2[yyn]; - - /* If YYLEN is nonzero, implement the default value of the action: - `$$ = $1'. - - Otherwise, the following line sets YYVAL to garbage. - This behavior is undocumented and Bison - users should not rely upon it. Assigning to YYVAL - unconditionally makes the parser a bit smaller, and it avoids a - GCC warning that YYVAL may be used uninitialized. */ - yyval = yyvsp[1-yylen]; - - - YY_REDUCE_PRINT (yyn); - switch (yyn) - { - case 2: -#line 56 "yacc.y" - { KTraderParse_setParseTree( 0L ); ;} - break; - - case 3: -#line 57 "yacc.y" - { KTraderParse_setParseTree( (yyvsp[0].ptr) ); ;} - break; - - case 4: -#line 60 "yacc.y" - { (yyval.ptr) = (yyvsp[0].ptr); ;} - break; - - case 5: -#line 63 "yacc.y" - { (yyval.ptr) = KTraderParse_newOR( (yyvsp[-2].ptr), (yyvsp[0].ptr) ); ;} - break; - - case 6: -#line 64 "yacc.y" - { (yyval.ptr) = (yyvsp[0].ptr); ;} - break; - - case 7: -#line 67 "yacc.y" - { (yyval.ptr) = KTraderParse_newAND( (yyvsp[-2].ptr), (yyvsp[0].ptr) ); ;} - break; - - case 8: -#line 68 "yacc.y" - { (yyval.ptr) = (yyvsp[0].ptr); ;} - break; - - case 9: -#line 71 "yacc.y" - { (yyval.ptr) = KTraderParse_newCMP( (yyvsp[-2].ptr), (yyvsp[0].ptr), 1 ); ;} - break; - - case 10: -#line 72 "yacc.y" - { (yyval.ptr) = KTraderParse_newCMP( (yyvsp[-2].ptr), (yyvsp[0].ptr), 2 ); ;} - break; - - case 11: -#line 73 "yacc.y" - { (yyval.ptr) = KTraderParse_newCMP( (yyvsp[-2].ptr), (yyvsp[0].ptr), 3 ); ;} - break; - - case 12: -#line 74 "yacc.y" - { (yyval.ptr) = KTraderParse_newCMP( (yyvsp[-2].ptr), (yyvsp[0].ptr), 4 ); ;} - break; - - case 13: -#line 75 "yacc.y" - { (yyval.ptr) = KTraderParse_newCMP( (yyvsp[-2].ptr), (yyvsp[0].ptr), 5 ); ;} - break; - - case 14: -#line 76 "yacc.y" - { (yyval.ptr) = KTraderParse_newCMP( (yyvsp[-2].ptr), (yyvsp[0].ptr), 6 ); ;} - break; - - case 15: -#line 77 "yacc.y" - { (yyval.ptr) = (yyvsp[0].ptr); ;} - break; - - case 16: -#line 80 "yacc.y" - { (yyval.ptr) = KTraderParse_newIN( (yyvsp[-2].ptr), KTraderParse_newID( (yyvsp[0].name) ) ); ;} - break; - - case 17: -#line 81 "yacc.y" - { (yyval.ptr) = (yyvsp[0].ptr); ;} - break; - - case 18: -#line 84 "yacc.y" - { (yyval.ptr) = KTraderParse_newMATCH( (yyvsp[-2].ptr), (yyvsp[0].ptr) ); ;} - break; - - case 19: -#line 85 "yacc.y" - { (yyval.ptr) = (yyvsp[0].ptr); ;} - break; - - case 20: -#line 88 "yacc.y" - { (yyval.ptr) = KTraderParse_newCALC( (yyvsp[-2].ptr), (yyvsp[0].ptr), 1 ); ;} - break; - - case 21: -#line 89 "yacc.y" - { (yyval.ptr) = KTraderParse_newCALC( (yyvsp[-2].ptr), (yyvsp[0].ptr), 2 ); ;} - break; - - case 22: -#line 90 "yacc.y" - { (yyval.ptr) = (yyvsp[0].ptr); ;} - break; - - case 23: -#line 93 "yacc.y" - { (yyval.ptr) = KTraderParse_newCALC( (yyvsp[-2].ptr), (yyvsp[0].ptr), 3 ); ;} - break; - - case 24: -#line 94 "yacc.y" - { (yyval.ptr) = KTraderParse_newCALC( (yyvsp[-2].ptr), (yyvsp[0].ptr), 4 ); ;} - break; - - case 25: -#line 95 "yacc.y" - { (yyval.ptr) = (yyvsp[0].ptr); ;} - break; - - case 26: -#line 98 "yacc.y" - { (yyval.ptr) = KTraderParse_newNOT( (yyvsp[0].ptr) ); ;} - break; - - case 27: -#line 99 "yacc.y" - { (yyval.ptr) = (yyvsp[0].ptr); ;} - break; - - case 28: -#line 102 "yacc.y" - { (yyval.ptr) = KTraderParse_newBRACKETS( (yyvsp[-1].ptr) ); ;} - break; - - case 29: -#line 103 "yacc.y" - { (yyval.ptr) = KTraderParse_newEXIST( (yyvsp[0].name) ); ;} - break; - - case 30: -#line 104 "yacc.y" - { (yyval.ptr) = KTraderParse_newID( (yyvsp[0].name) ); ;} - break; - - case 31: -#line 105 "yacc.y" - { (yyval.ptr) = KTraderParse_newNUM( (yyvsp[0].vali) ); ;} - break; - - case 32: -#line 106 "yacc.y" - { (yyval.ptr) = KTraderParse_newFLOAT( (yyvsp[0].vald) ); ;} - break; - - case 33: -#line 107 "yacc.y" - { (yyval.ptr) = KTraderParse_newSTRING( (yyvsp[0].name) ); ;} - break; - - case 34: -#line 108 "yacc.y" - { (yyval.ptr) = KTraderParse_newBOOL( (yyvsp[0].valb) ); ;} - break; - - case 35: -#line 109 "yacc.y" - { (yyval.ptr) = KTraderParse_newMAX2( (yyvsp[0].name) ); ;} - break; - - case 36: -#line 110 "yacc.y" - { (yyval.ptr) = KTraderParse_newMIN2( (yyvsp[0].name) ); ;} - break; - - - } - -/* Line 1037 of yacc.c. */ -#line 1281 "yacc.tab.c" - - yyvsp -= yylen; - yyssp -= yylen; - - - YY_STACK_PRINT (yyss, yyssp); - - *++yyvsp = yyval; - - - /* Now `shift' the result of the reduction. Determine what state - that goes to, based on the state we popped back to and the rule - number reduced by. */ - - yyn = yyr1[yyn]; - - yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; - if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) - yystate = yytable[yystate]; - else - yystate = yydefgoto[yyn - YYNTOKENS]; - - goto yynewstate; - - -/*------------------------------------. -| yyerrlab -- here on detecting error | -`------------------------------------*/ -yyerrlab: - /* If not already recovering from an error, report this error. */ - if (!yyerrstatus) - { - ++yynerrs; -#if YYERROR_VERBOSE - yyn = yypact[yystate]; - - if (YYPACT_NINF < yyn && yyn < YYLAST) - { - YYSIZE_T yysize = 0; - int yytype = YYTRANSLATE (yychar); - const char* yyprefix; - char *yymsg; - int yyx; - - /* Start YYX at -YYN if negative to avoid negative indexes in - YYCHECK. */ - int yyxbegin = yyn < 0 ? -yyn : 0; - - /* Stay within bounds of both yycheck and yytname. */ - int yychecklim = YYLAST - yyn; - int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; - int yycount = 0; - - yyprefix = ", expecting "; - for (yyx = yyxbegin; yyx < yyxend; ++yyx) - if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) - { - yysize += yystrlen (yyprefix) + yystrlen (yytname [yyx]); - yycount += 1; - if (yycount == 5) - { - yysize = 0; - break; - } - } - yysize += (sizeof ("syntax error, unexpected ") - + yystrlen (yytname[yytype])); - yymsg = (char *) YYSTACK_ALLOC (yysize); - if (yymsg != 0) - { - char *yyp = yystpcpy (yymsg, "syntax error, unexpected "); - yyp = yystpcpy (yyp, yytname[yytype]); - - if (yycount < 5) - { - yyprefix = ", expecting "; - for (yyx = yyxbegin; yyx < yyxend; ++yyx) - if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) - { - yyp = yystpcpy (yyp, yyprefix); - yyp = yystpcpy (yyp, yytname[yyx]); - yyprefix = " or "; - } - } - yyerror (yymsg); - YYSTACK_FREE (yymsg); - } - else - yyerror ("syntax error; also virtual memory exhausted"); - } - else -#endif /* YYERROR_VERBOSE */ - yyerror ("syntax error"); - } - - - - if (yyerrstatus == 3) - { - /* If just tried and failed to reuse look-ahead token after an - error, discard it. */ - - if (yychar <= YYEOF) - { - /* If at end of input, pop the error token, - then the rest of the stack, then return failure. */ - if (yychar == YYEOF) - for (;;) - { - - YYPOPSTACK; - if (yyssp == yyss) - YYABORT; - yydestruct ("Error: popping", - yystos[*yyssp], yyvsp); - } - } - else - { - yydestruct ("Error: discarding", yytoken, &yylval); - yychar = YYEMPTY; - } - } - - /* Else will try to reuse look-ahead token after shifting the error - token. */ - goto yyerrlab1; - - -/*---------------------------------------------------. -| yyerrorlab -- error raised explicitly by YYERROR. | -`---------------------------------------------------*/ -yyerrorlab: - -#ifdef __GNUC__ - /* Pacify GCC when the user code never invokes YYERROR and the label - yyerrorlab therefore never appears in user code. */ - if (0) - goto yyerrorlab; -#endif - -yyvsp -= yylen; - yyssp -= yylen; - yystate = *yyssp; - goto yyerrlab1; - - -/*-------------------------------------------------------------. -| yyerrlab1 -- common code for both syntax error and YYERROR. | -`-------------------------------------------------------------*/ -yyerrlab1: - yyerrstatus = 3; /* Each real token shifted decrements this. */ - - for (;;) - { - yyn = yypact[yystate]; - if (yyn != YYPACT_NINF) - { - yyn += YYTERROR; - if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) - { - yyn = yytable[yyn]; - if (0 < yyn) - break; - } - } - - /* Pop the current state because it cannot handle the error token. */ - if (yyssp == yyss) - YYABORT; - - - yydestruct ("Error: popping", yystos[yystate], yyvsp); - YYPOPSTACK; - yystate = *yyssp; - YY_STACK_PRINT (yyss, yyssp); - } - - if (yyn == YYFINAL) - YYACCEPT; - - *++yyvsp = yylval; - - - /* Shift the error token. */ - YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); - - yystate = yyn; - goto yynewstate; - - -/*-------------------------------------. -| yyacceptlab -- YYACCEPT comes here. | -`-------------------------------------*/ -yyacceptlab: - yyresult = 0; - goto yyreturn; - -/*-----------------------------------. -| yyabortlab -- YYABORT comes here. | -`-----------------------------------*/ -yyabortlab: - yydestruct ("Error: discarding lookahead", - yytoken, &yylval); - yychar = YYEMPTY; - yyresult = 1; - goto yyreturn; - -#ifndef yyoverflow -/*----------------------------------------------. -| yyoverflowlab -- parser overflow comes here. | -`----------------------------------------------*/ -yyoverflowlab: - yyerror ("parser stack overflow"); - yyresult = 2; - /* Fall through. */ -#endif - -yyreturn: -#ifndef yyoverflow - if (yyss != yyssa) - YYSTACK_FREE (yyss); -#endif - return yyresult; -} - - -#line 115 "yacc.y" - - -void yyerror ( const char *s ) /* Called by yyparse on error */ -{ - KTraderParse_error( s ); -} - -void KTraderParse_mainParse( const char *_code ) -{ - KTraderParse_initFlex( _code ); - yyparse(); -} - diff --git a/kio/kio/yacc.h b/kio/kio/yacc.h deleted file mode 100644 index ca84fb025..000000000 --- a/kio/kio/yacc.h +++ /dev/null @@ -1,93 +0,0 @@ -/* A Bison parser, made by GNU Bison 1.875. */ - -/* Skeleton parser for Yacc-like parsing with Bison, - Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002 Free Software Foundation, Inc. - - 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, 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. */ - -/* As a special exception, when this file is copied by Bison into a - Bison output file, you may use that output file without restriction. - This special exception was added by the Free Software Foundation - in version 1.24 of Bison. */ - -/* Tokens. */ -#ifndef YYTOKENTYPE -# define YYTOKENTYPE - /* Put the tokens into the symbol table, so that GDB and other debuggers - know about them. */ - enum yytokentype { - NOT = 258, - EQ = 259, - NEQ = 260, - LEQ = 261, - GEQ = 262, - LE = 263, - GR = 264, - OR = 265, - AND = 266, - TOKEN_IN = 267, - EXIST = 268, - MAX = 269, - MIN = 270, - VAL_BOOL = 271, - VAL_STRING = 272, - VAL_ID = 273, - VAL_NUM = 274, - VAL_FLOAT = 275 - }; -#endif -#define NOT 258 -#define EQ 259 -#define NEQ 260 -#define LEQ 261 -#define GEQ 262 -#define LE 263 -#define GR 264 -#define OR 265 -#define AND 266 -#define TOKEN_IN 267 -#define EXIST 268 -#define MAX 269 -#define MIN 270 -#define VAL_BOOL 271 -#define VAL_STRING 272 -#define VAL_ID 273 -#define VAL_NUM 274 -#define VAL_FLOAT 275 - - - - -#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED) -#line 13 "yacc.y" -typedef union YYSTYPE { - char valb; - int vali; - double vald; - char *name; - void *ptr; -} YYSTYPE; -/* Line 1240 of yacc.c. */ -#line 84 "yacc.tab.h" -# define yystype YYSTYPE /* obsolescent; will be withdrawn */ -# define YYSTYPE_IS_DECLARED 1 -# define YYSTYPE_IS_TRIVIAL 1 -#endif - -extern YYSTYPE kiotraderlval; - - - diff --git a/kio/kio/yacc.y b/kio/kio/yacc.y deleted file mode 100644 index 1b86f4737..000000000 --- a/kio/kio/yacc.y +++ /dev/null @@ -1,126 +0,0 @@ -%{ -#include -#include -#include "ktraderparse.h" - -void yyerror(const char *s); -int yylex(); -void KTraderParse_initFlex( const char *s ); - -%} - -%union -{ - char valb; - int vali; - double vald; - char *name; - void *ptr; -} - -%token NOT -%token EQ -%token NEQ -%token LEQ -%token GEQ -%token LE -%token GR -%token OR -%token AND -%token TOKEN_IN -%token EXIST -%token MAX -%token MIN - -%token VAL_BOOL -%token VAL_STRING -%token VAL_ID -%token VAL_NUM -%token VAL_FLOAT - -%type bool -%type bool_or -%type bool_and -%type bool_compare -%type expr_in -%type expr_twiddle -%type expr -%type term -%type factor_non -%type factor - -/* Grammar follows */ - -%% - -constraint: /* empty */ { KTraderParse_setParseTree( 0L ); } - | bool { KTraderParse_setParseTree( $1 ); } -; - -bool: bool_or { $$ = $1; } -; - -bool_or: bool_and OR bool_or { $$ = KTraderParse_newOR( $1, $3 ); } - | bool_and { $$ = $1; } -; - -bool_and: bool_compare AND bool_and { $$ = KTraderParse_newAND( $1, $3 ); } - | bool_compare { $$ = $1; } -; - -bool_compare: expr_in EQ expr_in { $$ = KTraderParse_newCMP( $1, $3, 1 ); } - | expr_in NEQ expr_in { $$ = KTraderParse_newCMP( $1, $3, 2 ); } - | expr_in GEQ expr_in { $$ = KTraderParse_newCMP( $1, $3, 3 ); } - | expr_in LEQ expr_in { $$ = KTraderParse_newCMP( $1, $3, 4 ); } - | expr_in LE expr_in { $$ = KTraderParse_newCMP( $1, $3, 5 ); } - | expr_in GR expr_in { $$ = KTraderParse_newCMP( $1, $3, 6 ); } - | expr_in { $$ = $1; } -; - -expr_in: expr_twiddle TOKEN_IN VAL_ID { $$ = KTraderParse_newIN( $1, KTraderParse_newID( $3 ) ); } - | expr_twiddle { $$ = $1; } -; - -expr_twiddle: expr '~' expr { $$ = KTraderParse_newMATCH( $1, $3 ); } - | expr { $$ = $1; } -; - -expr: expr '+' term { $$ = KTraderParse_newCALC( $1, $3, 1 ); } - | expr '-' term { $$ = KTraderParse_newCALC( $1, $3, 2 ); } - | term { $$ = $1; } -; - -term: term '*' factor_non { $$ = KTraderParse_newCALC( $1, $3, 3 ); } - | term '/' factor_non { $$ = KTraderParse_newCALC( $1, $3, 4 ); } - | factor_non { $$ = $1; } -; - -factor_non: NOT factor { $$ = KTraderParse_newNOT( $2 ); } - | factor { $$ = $1; } -; - -factor: '(' bool_or ')' { $$ = KTraderParse_newBRACKETS( $2 ); } - | EXIST VAL_ID { $$ = KTraderParse_newEXIST( $2 ); } - | VAL_ID { $$ = KTraderParse_newID( $1 ); } - | VAL_NUM { $$ = KTraderParse_newNUM( $1 ); } - | VAL_FLOAT { $$ = KTraderParse_newFLOAT( $1 ); } - | VAL_STRING { $$ = KTraderParse_newSTRING( $1 ); } - | VAL_BOOL { $$ = KTraderParse_newBOOL( $1 ); } - | MAX VAL_ID { $$ = KTraderParse_newMAX2( $2 ); } - | MIN VAL_ID { $$ = KTraderParse_newMIN2( $2 ); } -; - -/* End of grammar */ - -%% - -void yyerror ( const char *s ) /* Called by yyparse on error */ -{ - KTraderParse_error( s ); -} - -void KTraderParse_mainParse( const char *_code ) -{ - KTraderParse_initFlex( _code ); - yyparse(); -} diff --git a/kio/kioexec/CMakeLists.txt b/kio/kioexec/CMakeLists.txt deleted file mode 100644 index 0ab606643..000000000 --- a/kio/kioexec/CMakeLists.txt +++ /dev/null @@ -1,42 +0,0 @@ -################################################# -# -# (C) 2010 Serghei Amelian -# serghei (DOT) amelian (AT) gmail.com -# -# Improvements and feedback are welcome -# -# This file is released under GPL >= 2 -# -################################################# - -include_directories( - ${TQT_INCLUDE_DIRS} - ${CMAKE_CURRENT_BINARY_DIR} - ${CMAKE_BINARY_DIR} - ${CMAKE_BINARY_DIR}/tdecore - ${CMAKE_SOURCE_DIR}/tdecore - ${CMAKE_SOURCE_DIR}/tdeui - ${CMAKE_SOURCE_DIR}/kio - ${CMAKE_SOURCE_DIR}/kio/kio -) - -link_directories( - ${TQT_LIBRARY_DIRS} -) - - -##### kioexec ################################### - -set( target kioexec ) - -set( ${target}_SRCS - main.cpp -) - -tde_add_executable( ${target} AUTOMOC - SOURCES ${${target}_SRCS} - LINK kio-shared - DESTINATION ${BIN_INSTALL_DIR} -) - -tde_install_symlink( ${target} ${BIN_INSTALL_DIR}/kfmexec ) diff --git a/kio/kioexec/Makefile.am b/kio/kioexec/Makefile.am deleted file mode 100644 index 5325ce875..000000000 --- a/kio/kioexec/Makefile.am +++ /dev/null @@ -1,19 +0,0 @@ -AM_CPPFLAGS = $(all_includes) - -bin_PROGRAMS = kioexec - -kioexec_SOURCES = main.cpp -kioexec_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor -kioexec_LDADD = $(LIB_KIO) - -noinst_HEADERS = main.h -METASOURCES = AUTO - -messages: - $(XGETTEXT) $(kioexec_SOURCES) -o $(podir)/kioexec.pot - -install-exec-local: - @rm -f $(DESTDIR)$(bindir)/kfmexec - @$(LN_S) kioexec $(DESTDIR)$(bindir)/kfmexec - -include $(top_srcdir)/admin/Doxyfile.am diff --git a/kio/kioexec/README b/kio/kioexec/README deleted file mode 100644 index daaa38bdb..000000000 --- a/kio/kioexec/README +++ /dev/null @@ -1,26 +0,0 @@ -kfmexec is launched when the user wants to open a remote file with -an application that only supports local files. - -For this it does the following: -- downloads a remote file to a temp location -- starts a 'local' application with that temp file as argument -- wait fors application to be exited -- if the modification time of the file is different from the original one, -(because the file was modified) then it offers re-uploading the modified version. -This is how you offer network transparency to apps that don't have it. - -BUT: with KUniqueApplication, this breaks, because the app returns at once, -so we have no way to know when the user finished editing the file... - -Conclusion: if the application has network transparency built-in, it should -put "%u" in its desktop file - and kfmexec isn't used -. If it doesn't, either -it's a TDEApplication and kfmexec does its job, or it's a KUniqueApplication -and... kfmexec can't see modifications to the file. Be warned. - -From Waldo: "The program doesn't return _at once_. It returns -after "newInstance()" returns. So if you open the file there it will still work. -(Or rename it)" - -David Faure -20-May-2000 - diff --git a/kio/kioexec/main.cpp b/kio/kioexec/main.cpp deleted file mode 100644 index 40badcbe0..000000000 --- a/kio/kioexec/main.cpp +++ /dev/null @@ -1,294 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 1998, 1999 Torben Weis - Copyright (C) 2000 David Faure - Copyright (C) 2001 Waldo Bastian - - 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; see the file COPYING. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include -#include -#include -#include - -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - - -#include "main.h" - - -static const char description[] = - I18N_NOOP("KIO Exec - Opens remote files, watches modifications, asks for upload"); - -static KCmdLineOptions options[] = -{ - { "tempfiles", I18N_NOOP("Treat URLs as local files and delete them afterwards"), 0 }, - { "suggestedfilename ", I18N_NOOP("Suggested file name for the downloaded file"), 0 }, - { "+command", I18N_NOOP("Command to execute"), 0 }, - { "+[URLs]", I18N_NOOP("URL(s) or local file(s) used for 'command'"), 0 }, - KCmdLineLastOption -}; - - -int jobCounter = 0; - -TQPtrList* jobList = 0L; - -KIOExec::KIOExec() -{ - jobList = new TQPtrList; - jobList->setAutoDelete( false ); // jobs autodelete themselves - - TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs(); - if (args->count() < 1) - TDECmdLineArgs::usage(i18n("'command' expected.\n")); - - tempfiles = args->isSet("tempfiles"); - if ( args->isSet( "suggestedfilename" ) ) - suggestedFileName = TQString::fromLocal8Bit( args->getOption( "suggestedfilename" ) ); - expectedCounter = 0; - command = args->arg(0); - kdDebug() << "command=" << command << endl; - - for ( int i = 1; i < args->count(); i++ ) - { - KURL url = args->url(i); - // we need to map system:/ etc to make sure we get this right - url = TDEIO::NetAccess::mostLocalURL( url, 0 ); - - //kdDebug() << "url=" << url.url() << " filename=" << url.fileName() << endl; - // A local file, not an URL ? - // => It is not encoded and not shell escaped, too. - if ( url.isLocalFile() ) - { - fileInfo file; - file.path = url.path(); - file.url = url; - fileList.append(file); - } - // It is an URL - else - { - if ( !url.isValid() ) - KMessageBox::error( 0L, i18n( "The URL %1\nis malformed" ).arg( url.url() ) ); - else if ( tempfiles ) - KMessageBox::error( 0L, i18n( "Remote URL %1\nnot allowed with --tempfiles switch" ).arg( url.url() ) ); - else - // We must fetch the file - { - TQString fileName = TDEIO::encodeFileName( url.fileName() ); - if ( !suggestedFileName.isEmpty() ) - fileName = suggestedFileName; - // Build the destination filename, in ~/.trinity/cache-*/krun/ - // Unlike KDE-1.1, we put the filename at the end so that the extension is kept - // (Some programs rely on it) - TQString tmp = TDEGlobal::dirs()->saveLocation( "cache", "krun/" ) + - TQString("%1.%2.%3").arg(getpid()).arg(jobCounter++).arg(fileName); - fileInfo file; - file.path = tmp; - file.url = url; - fileList.append(file); - - expectedCounter++; - KURL dest; - dest.setPath( tmp ); - kdDebug() << "Copying " << url.prettyURL() << " to " << dest << endl; - TDEIO::Job *job = TDEIO::file_copy( url, dest ); - jobList->append( job ); - - connect( job, TQT_SIGNAL( result( TDEIO::Job * ) ), TQT_SLOT( slotResult( TDEIO::Job * ) ) ); - } - } - } - args->clear(); - - if ( tempfiles ) { - // #113991 - TQTimer::singleShot( 0, this, TQT_SLOT( slotRunApp() ) ); - //slotRunApp(); // does not return - return; - } - - counter = 0; - if ( counter == expectedCounter ) - slotResult( 0L ); -} - -void KIOExec::slotResult( TDEIO::Job * job ) -{ - if (job && job->error()) - { - // That error dialog would be queued, i.e. not immediate... - //job->showErrorDialog(); - if ( (job->error() != TDEIO::ERR_USER_CANCELED) ) - KMessageBox::error( 0L, job->errorString() ); - - TQString path = static_cast(job)->destURL().path(); - - TQValueList::Iterator it = fileList.begin(); - for(;it != fileList.end(); ++it) - { - if ((*it).path == path) - break; - } - - if ( it != fileList.end() ) - fileList.remove( it ); - else - kdDebug() << static_cast(job)->destURL().path() << " not found in list" << endl; - } - - counter++; - - if ( counter < expectedCounter ) - return; - - kdDebug() << "All files downloaded, will call slotRunApp shortly" << endl; - // We know we can run the app now - but let's finish the job properly first. - TQTimer::singleShot( 0, this, TQT_SLOT( slotRunApp() ) ); - - jobList->clear(); -} - -void KIOExec::slotRunApp() -{ - if ( fileList.isEmpty() ) { - kdDebug() << k_funcinfo << "No files downloaded -> exiting" << endl; - exit(1); - } - - KService service("dummy", command, TQString::null); - - KURL::List list; - // Store modification times - TQValueList::Iterator it = fileList.begin(); - for ( ; it != fileList.end() ; ++it ) - { - KDE_struct_stat buff; - (*it).time = KDE_stat( TQFile::encodeName((*it).path), &buff ) ? 0 : buff.st_mtime; - KURL url; - url.setPath((*it).path); - list << url; - } - - TQStringList params = KRun::processDesktopExec(service, list, false /*no shell*/); - - kdDebug() << "EXEC " << KShell::joinArgs( params ) << endl; - -#ifdef Q_WS_X11 - // propagate the startup indentification to the started process - KStartupInfoId id; - id.initId( kapp->startupId()); - id.setupStartupEnv(); -#endif - - TDEProcess proc; - proc << params; - proc.start( TDEProcess::Block ); - -#ifdef Q_WS_X11 - KStartupInfo::resetStartupEnv(); -#endif - - kdDebug() << "EXEC done" << endl; - - // Test whether one of the files changed - it = fileList.begin(); - for( ;it != fileList.end(); ++it ) - { - KDE_struct_stat buff; - TQString src = (*it).path; - KURL dest = (*it).url; - if ( (KDE_stat( TQFile::encodeName(src), &buff ) == 0) && - ((*it).time != buff.st_mtime) ) - { - if ( tempfiles ) - { - if ( KMessageBox::questionYesNo( 0L, - i18n( "The supposedly temporary file\n%1\nhas been modified.\nDo you still want to delete it?" ).arg(dest.prettyURL()), - i18n( "File Changed" ), KStdGuiItem::del(), i18n("Do Not Delete") ) != KMessageBox::Yes ) - continue; // don't delete the temp file - } - else if ( ! dest.isLocalFile() ) // no upload when it's already a local file - { - if ( KMessageBox::questionYesNo( 0L, - i18n( "The file\n%1\nhas been modified.\nDo you want to upload the changes?" ).arg(dest.prettyURL()), - i18n( "File Changed" ), i18n("Upload"), i18n("Do Not Upload") ) == KMessageBox::Yes ) - { - kdDebug() << TQString(TQString("src='%1' dest='%2'").arg(src).arg(dest.url())).ascii() << endl; - // Do it the synchronous way. - if ( !TDEIO::NetAccess::upload( src, dest, 0 ) ) - { - KMessageBox::error( 0L, TDEIO::NetAccess::lastErrorString() ); - continue; // don't delete the temp file - } - } - } - } - - if ( !dest.isLocalFile() || tempfiles ) { - // Wait for a reasonable time so that even if the application forks on startup (like OOo or amarok) - // it will have time to start up and read the file before it gets deleted. #130709. - kdDebug() << "sleeping..." << endl; - sleep(180); // 3 mn - kdDebug() << "about to delete " << src << endl; - unlink( TQFile::encodeName(src) ); - } - } - - //kapp->quit(); not efficient enough - exit(0); -} - -int main( int argc, char **argv ) -{ - TDEAboutData aboutData( "kioexec", I18N_NOOP("KIOExec"), - VERSION, description, TDEAboutData::License_GPL, - "(c) 1998-2000,2003 The KFM/Konqueror Developers"); - aboutData.addAuthor("David Faure",0, "faure@kde.org"); - aboutData.addAuthor("Stephan Kulow",0, "coolo@kde.org"); - aboutData.addAuthor("Bernhard Rosenkraenzer",0, "bero@arklinux.org"); - aboutData.addAuthor("Waldo Bastian",0, "bastian@kde.org"); - aboutData.addAuthor("Oswald Buddenhagen",0, "ossi@kde.org"); - - TDECmdLineArgs::init( argc, argv, &aboutData ); - TDECmdLineArgs::addCmdLineOptions( options ); - - TDEApplication app; - - KIOExec exec; - - kdDebug() << "Constructor returned..." << endl; - return app.exec(); -} - -#include "main.moc" diff --git a/kio/kioexec/main.h b/kio/kioexec/main.h deleted file mode 100644 index beb6a2297..000000000 --- a/kio/kioexec/main.h +++ /dev/null @@ -1,35 +0,0 @@ -#ifndef _main_h -#define _main_h - -#include -#include -#include -#include - -namespace TDEIO { class Job; } - -class KIOExec : public TQObject -{ - Q_OBJECT -public: - KIOExec(); - -public slots: - void slotResult( TDEIO::Job * ); - void slotRunApp(); - -protected: - bool tempfiles; - TQString suggestedFileName; - int counter; - int expectedCounter; - TQString command; - struct fileInfo { - TQString path; - KURL url; - int time; - }; - TQValueList fileList; -}; - -#endif diff --git a/kio/kioslave.upd b/kio/kioslave.upd deleted file mode 100644 index f1ad015d3..000000000 --- a/kio/kioslave.upd +++ /dev/null @@ -1,18 +0,0 @@ -# Hello world -Id=kde2.2/r1 -File=kioslaverc,kio_httprc -Group=Cache Settings, -Key=MaxCacheSize -Key=MaxCacheAge -Key=UseCache -File=kioslaverc -Group=Browser Settings/UserAgent,UserAgent -AllKeys -Id=kde2.2/r2 -File=kioslaverc,kio_httprc -Group=UserAgent -Script=useragent.pl,perl -Id=kde2.2/r3 -File=kioslaverc -Group=Proxy Settings -Script=proxytype.pl,perl diff --git a/kio/kpasswdserver.desktop b/kio/kpasswdserver.desktop deleted file mode 100644 index db43d621c..000000000 --- a/kio/kpasswdserver.desktop +++ /dev/null @@ -1,157 +0,0 @@ -[Desktop Entry] -Type=Service -Name=KDED Password Module -Name[af]=KDED Wagwoord Module -Name[ar]=وحدة كلمة سر KDED -Name[az]=KDED Şifrə Modulu -Name[be]=Модуль захавання пароляў KDED -Name[bg]=Модул за пароли KDED -Name[bn]=KDED পাসওয়ার্ড মডিউল -Name[br]=Mollad tremenger KDED -Name[bs]=KDED šifra modul -Name[ca]=Mòdul de contrasenya KDED -Name[cs]=KDED modul pro hesla -Name[csb]=Parole -Name[cy]=Modiwl Cyfrinair KDED -Name[da]=KDED-kodeordsmodul -Name[de]=Passwort-Zwischenspeicherung -Name[el]=Άρθρωμα κωδικού πρόσβασης του KDED -Name[eo]=KDED-pasvortmodulo -Name[es]=Módulo de contraseña de KDED -Name[et]=KDED parooli moodul -Name[eu]=KDEDren pasahitz-modulua -Name[fa]=پیمانۀ اسم رمز KDED -Name[fi]=KDED-salasanamoduuli -Name[fr]=Module de mot de passe KDED -Name[fy]=KDED-wachtwurdmodule -Name[ga]=Modúl Fhocail Fhaire KDED -Name[gl]=Módulo de Contrasinais de KDED -Name[he]=מודול סיסמה של KDED -Name[hi]=KDED पासवर्ड घटक (मॉड्यूल) -Name[hr]=KDED modul za lozinke -Name[hu]=KDED jelszómodul -Name[id]=Modul Password KDED -Name[is]=KDED Lykilorðaeining -Name[it]=Modulo password di KDED -Name[ja]=KDED パスワードモジュール -Name[ka]=KDED პაროლების მოდული -Name[kk]=KDED пароль модулі -Name[km]=ម៉ូឌុល​ពាក្យ​សម្ងាត់ KDED -Name[ko]=KDED 열쇠글 모듈 -Name[lb]=KDED-Passwuertmodul -Name[lt]=KDED slaptažodžių modulis -Name[lv]=KDED paroļu modulis -Name[mk]=KDED модул за лозинка -Name[mn]=KDED-Тест модул -Name[ms]=Modul Kata laluan KDED -Name[mt]=Modulu tal-passwords KDED -Name[nb]=KDED Passordmodul -Name[nds]=KDED-Passwoortmoduul -Name[ne]=KDED पासवर्ड मोड्युल -Name[nl]=KDED-wachtwoordmodule -Name[nn]=KDED-passordmodul -Name[nso]=Seripa sa Lentsuphetiso la KDED -Name[pa]=KDED ਗੁਪਤ-ਕੋਡ ਮੈਡੀਊਲ -Name[pl]=Hasła -Name[pt]=Módulo de Senhas do KDED -Name[pt_BR]=Módulo de Senha do KDED -Name[ro]=Modul parolă KDED -Name[ru]=Служба паролей -Name[rw]=Igice cy'Ijambobanga KDED -Name[se]=KDED beassansátni-moduvla -Name[sk]=Modul hesla KDED -Name[sl]=Geselni modul KDED -Name[sq]=Modula për Parullë(Password) - KDED -Name[sr]=KDED модул за лозинке -Name[sr@Latn]=KDED modul za lozinke -Name[sv]=KDED-lösenordsmodul -Name[ta]=KDED கடவுச்சொல் பகுதி -Name[te]=కెడిఈ పాస్ వర్డ్ మాడ్యూల్ -Name[tg]=KDED Модули номи шаб -Name[th]=โมดูลรหัสผ่าน KDED -Name[tr]=KDED Parola Modülü -Name[tt]=KDED'nıñ Sersüz Modulı -Name[uk]=Модуль паролів KDED -Name[uz]=KDED maxfiy soʻz moduli -Name[uz@cyrillic]=KDED махфий сўз модули -Name[ven]=Modulu wa phasewede ya KDED -Name[vi]=Mô-đun mật khẩu KDED -Name[wa]=Module di screts po KDED -Name[xh]=Igama lokugqitha le Sicatshulwa se KDED -Name[zh_CN]=KDED 密码模块 -Name[zh_HK]=KDED 密碼模組 -Name[zh_TW]=KDED 密碼模組 -Name[zu]=Ingxenye Yegama lokudlula le-KDED -Comment=Password caching support -Comment[af]=Wagwoord kasberging ondersteuning -Comment[be]=Падтрымка захоўвання пароляў -Comment[bg]=Кеширане на пароли -Comment[bn]=পাসওয়ার্ড ক্যাশ-এ রাখা সমর্থন করে -Comment[bs]=Podrška za keširanje šifre -Comment[ca]=Permet l'ús de memòria cau de contrasenyes -Comment[cs]=Podpora pro kešování hesel -Comment[csb]=Spamiãtôwanié môlowëch parolów -Comment[da]=Understøttelse for caching af kodeord -Comment[de]=Verwaltet zwischengespeicherte Passwörter in KDED -Comment[el]=Υποστήριξη προσωρινής αποθήκευσης κωδικού πρόσβασης -Comment[eo]=Subteno por kaŝmemorigo de pasvortoj -Comment[es]=Soporte de caché de contraseñas -Comment[et]=Parooli meelespidamise toetus -Comment[eu]=Pasahitzen cachearen euskarria -Comment[fa]=پشتیبانی از مخفی کردن اسم رمز -Comment[fi]=Salasanojen välimuistituki -Comment[fr]=Gestion du cache des mots de passe -Comment[fy]=Wachtwurd caching stype -Comment[gl]=Soporte de cacheado de contrasinais -Comment[he]=תמיכה בשמירת ססמאות במטמון -Comment[hi]=पासवर्ड कैचिंग समर्थन -Comment[hr]=Podrška međuspremanja lozinki -Comment[hu]=Jelszóelmentési támogatás -Comment[id]=Dukungan penyimpanan password -Comment[is]=Skyndiminni fyrir lykilorð -Comment[it]=Supporto per la memorizzazione temporanea delle password -Comment[ja]=パスワードキャッシュサポート -Comment[ka]=პაროლის ბუფერირება -Comment[kk]=KDED парольдерді басқару -Comment[km]=ទ្រទ្រង់​ការ​រក្សាទុក​ពាក្យសម្ងាត់​នៅ​ក្នុង​ឃ្លាំង​សម្ងាត់ -Comment[lb]=Ënnerstëtzung fir d'Zwëschespäichere vu Passwierder -Comment[lt]=Slaptažodžių krepšio palaikymas -Comment[mk]=Поддршка за кеширање на лозинки -Comment[ms]=Sokongan Penyimpan Kata Laluan -Comment[nb]=Støtte for passordlagring -Comment[nds]=Ünnerstütten för't Twischenspiekern vun Passwöör -Comment[ne]=पासवर्ड क्यासिङ समर्थन -Comment[nl]=Ondersteuning voor het tussentijds bewaren van wachtwoorden -Comment[nn]=Støtte for passordlagring -Comment[pa]=ਗੁਪਤ-ਕੋਡ ਕੈਚੇਇੰਗ ਸਹਾਇਤਾ -Comment[pl]=Zapamiętywanie haseł lokalnych -Comment[pt]=Suporte a 'cache' de senhas -Comment[pt_BR]=Suporte de cache das senhas -Comment[ro]=Suport pentru memorarea parolelor -Comment[ru]=Управление паролями KDED -Comment[rw]=Ifasha ry'uguhisha ijambobanga -Comment[se]=Beassansáni gaskarádjama doarjja -Comment[sk]=Podpora ukladania hesiel -Comment[sl]=Podpora prepomnjenju gesel -Comment[sr]=Подршка за кеширање лозинки -Comment[sr@Latn]=Podrška za keširanje lozinki -Comment[sv]=Stöd för lösenordscache -Comment[ta]=கடவுச்சொல் சேமிக்க ஆதரவு -Comment[te]=పాస్ వర్డులను దాయుటకు సహకరించును -Comment[tg]=Дастгирии Ҳофизаи Гузарвожа -Comment[th]=สนับสนุนการจดจำรหัสผ่าน -Comment[tr]=Parola önbellekleme desteği -Comment[tt]=Sersüz alxäterläw totu -Comment[uk]=Підтримка кешування паролів -Comment[uz]=Maxfiy soʻzlarni keshda saqlash -Comment[uz@cyrillic]=Махфий сўзларни кэшда сақлаш -Comment[vi]=Cách hỗ trợ khả năng lưu tạm mật khẩu. -Comment[zh_CN]=密码缓存支持 -Comment[zh_HK]=密碼暫存支援 -Comment[zh_TW]=密碼暫存(cache)支援 -ServiceTypes=KDEDModule -X-TDE-ModuleType=Library -X-TDE-Library=kpasswdserver -X-TDE-FactoryName=kpasswdserver -X-TDE-Kded-autoload=false -X-TDE-Kded-load-on-demand=true diff --git a/kio/kpasswdserver/CMakeLists.txt b/kio/kpasswdserver/CMakeLists.txt deleted file mode 100644 index 5209e53c9..000000000 --- a/kio/kpasswdserver/CMakeLists.txt +++ /dev/null @@ -1,43 +0,0 @@ -################################################# -# -# (C) 2010 Serghei Amelian -# serghei (DOT) amelian (AT) gmail.com -# -# Improvements and feedback are welcome -# -# This file is released under GPL >= 2 -# -################################################# - -include_directories( - ${TQT_INCLUDE_DIRS} - ${CMAKE_CURRENT_BINARY_DIR} - ${CMAKE_BINARY_DIR} - ${CMAKE_BINARY_DIR}/tdecore - ${CMAKE_SOURCE_DIR} - ${CMAKE_SOURCE_DIR}/dcop - ${CMAKE_SOURCE_DIR}/tdecore - ${CMAKE_SOURCE_DIR}/tdeui - ${CMAKE_SOURCE_DIR}/tdewallet/client - ${CMAKE_SOURCE_DIR}/kio -) - -link_directories( - ${TQT_LIBRARY_DIRS} -) - - -#### kded_kpasswdserver ############################## - -set( target kded_kpasswdserver ) - -set( ${target}_SRCS - kpasswdserver.cpp kpasswdserver.skel -) - -tde_add_kpart( ${target} AUTOMOC - SOURCES ${${target}_SRCS} - LINK tdeinit_kded-shared - DEPENDENCIES dcopidl - DESTINATION ${PLUGIN_INSTALL_DIR} -) diff --git a/kio/kpasswdserver/DESIGN b/kio/kpasswdserver/DESIGN deleted file mode 100644 index 6a128f9df..000000000 --- a/kio/kpasswdserver/DESIGN +++ /dev/null @@ -1,56 +0,0 @@ -Sequence numbers -================ -The idea is that whenever the user is queried for a password this -login/pw combination gets a seq-nr. When a slave needs a login/pw -it asks kpasswdserver and sends along the last seqnr it received. If -this seqnr is older (lower) than the seq nr of the login/pw -combination stored in kpasswdserver then appearantly the user has -already been prompted for a new login/pw combination since the last -time this slave asked for a login/pw and therefor it is not necessary -to prompt the user again but kpassword will send the io-slave this -new login/pw combination. If this new combination fails as well the -user is being prompted for a new login/pw combo since the one stored -in kpasswdserver doesn't work. - -Let me try to draw the situation I had in mind when writing this: - -Slave1 Slave2 kpasswdserver -Asks for auth - asks user for login/pw (1) -sends login/pw (1) to ftp site - Asks for auth - sends back login/pw (1) - sends login/pw (1) to ftp site -gets login error, -asks for new auth -sends along seq.nr 1 - seq.nr 1 == (1) --> - asks user for new login/pw (2) -sends login/pw (2) to ftp site - gets login error, - asks for new auth - sends along seq.nr 1 - seq.nr 1 < (2) --> - don't ask user for new login/pw - but send back login/pw (2) without asking - sends login/pw (2) to ftp site - - -Actually, I had mostly http in mind, and not so much ftp. In http you -typically try without password first, and only when you get an -authentication error you ask for a password. The above scenario is -then suddenly a lot more common than with ftp because it can happen -that you have 4 requests /io-slaves who alll discover at about the -same time that they need to have authentication credentials. The -above scenario (and the seq. nrs) is to prevent that you get 4 login -dialogs in such case. - -Now the assumption in this all, looking back on it, seems to be that -when you ask for the same auth credentials twice in a row, it must be -that the credentials issued the first time where wrong, and you will -be prompted again. But if the user goes to ftp-site1, then -ftp-site2 and then back to ftp-site1 again, the credentials for ftp-site1 -are still valid. This is why we reset the seq.nr stored in the io-slave -to 0 whenever the io-slave switches hosts (or logins). - -Waldo Bastian diff --git a/kio/kpasswdserver/Makefile.am b/kio/kpasswdserver/Makefile.am deleted file mode 100644 index 9ba393ef3..000000000 --- a/kio/kpasswdserver/Makefile.am +++ /dev/null @@ -1,15 +0,0 @@ -# $Id$ -# Makefile.am of tdebase/kioslave/http - -INCLUDES= -I$(top_srcdir)/tdewallet/client $(all_includes) - -####### Files - -kde_module_LTLIBRARIES = kded_kpasswdserver.la - -kded_kpasswdserver_la_SOURCES = kpasswdserver.cpp kpasswdserver.skel -kded_kpasswdserver_la_METASOURCES = AUTO -kded_kpasswdserver_la_LDFLAGS = $(all_libraries) -module -avoid-version -kded_kpasswdserver_la_LIBADD = $(top_builddir)/tdewallet/client/libtdewalletclient.la $(LIB_KIO) $(LIB_KDED) $(LIB_QT) $(LIB_TDEUI) $(LIB_TDECORE) $(top_builddir)/dcop/libDCOP.la $(LIB_X11) - -include $(top_srcdir)/admin/Doxyfile.am diff --git a/kio/kpasswdserver/kpasswdserver.cpp b/kio/kpasswdserver/kpasswdserver.cpp deleted file mode 100644 index b6a9aa696..000000000 --- a/kio/kpasswdserver/kpasswdserver.cpp +++ /dev/null @@ -1,715 +0,0 @@ -/* - This file is part of the KDE Password Server - - Copyright (C) 2002 Waldo Bastian (bastian@kde.org) - Copyright (C) 2005 David Faure (faure@kde.org) - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public License - version 2 as published by the Free Software Foundation. - - This software 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 library; see the file COPYING. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ -//---------------------------------------------------------------------------- -// -// KDE Password Server -// $Id$ - -#include "kpasswdserver.h" - -#include - -#include - -#include -#include -#include -#include -#include -#include - -#include "config.h" -#ifdef Q_WS_X11 -#include -#include -#endif - -extern "C" { - KDE_EXPORT KDEDModule *create_kpasswdserver(const TQCString &name) - { - return new KPasswdServer(name); - } -} - -int -KPasswdServer::AuthInfoList::compareItems(TQPtrCollection::Item n1, TQPtrCollection::Item n2) -{ - if (!n1 || !n2) - return 0; - - AuthInfo *i1 = (AuthInfo *) n1; - AuthInfo *i2 = (AuthInfo *) n2; - - int l1 = i1->directory.length(); - int l2 = i2->directory.length(); - - if (l1 > l2) - return -1; - if (l1 < l2) - return 1; - return 0; -} - - -KPasswdServer::KPasswdServer(const TQCString &name) - : KDEDModule(name) -{ - m_authDict.setAutoDelete(true); - m_authPending.setAutoDelete(true); - m_seqNr = 0; - m_wallet = 0; - connect(this, TQT_SIGNAL(windowUnregistered(long)), - this, TQT_SLOT(removeAuthForWindowId(long))); -} - -KPasswdServer::~KPasswdServer() -{ - delete m_wallet; -} - -// Helper - returns the wallet key to use for read/store/checking for existence. -static TQString makeWalletKey( const TQString& key, const TQString& realm ) -{ - return realm.isEmpty() ? key : key + '-' + realm; -} - -// Helper for storeInWallet/readFromWallet -static TQString makeMapKey( const char* key, int entryNumber ) -{ - TQString str = TQString::fromLatin1( key ); - if ( entryNumber > 1 ) - str += "-" + TQString::number( entryNumber ); - return str; -} - -static bool storeInWallet( KWallet::Wallet* wallet, const TQString& key, const TDEIO::AuthInfo &info ) -{ - if ( !wallet->hasFolder( KWallet::Wallet::PasswordFolder() ) ) - if ( !wallet->createFolder( KWallet::Wallet::PasswordFolder() ) ) - return false; - wallet->setFolder( KWallet::Wallet::PasswordFolder() ); - // Before saving, check if there's already an entry with this login. - // If so, replace it (with the new password). Otherwise, add a new entry. - typedef TQMap Map; - int entryNumber = 1; - Map map; - TQString walletKey = makeWalletKey( key, info.realmValue ); - kdDebug(130) << "storeInWallet: walletKey=" << walletKey << " reading existing map" << endl; - if ( wallet->readMap( walletKey, map ) == 0 ) { - Map::ConstIterator end = map.end(); - Map::ConstIterator it = map.find( "login" ); - while ( it != end ) { - if ( it.data() == info.username ) { - break; // OK, overwrite this entry - } - it = map.find( TQString( "login-" ) + TQString::number( ++entryNumber ) ); - } - // If no entry was found, create a new entry - entryNumber is set already. - } - const TQString loginKey = makeMapKey( "login", entryNumber ); - const TQString passwordKey = makeMapKey( "password", entryNumber ); - kdDebug(130) << "storeInWallet: writing to " << loginKey << "," << passwordKey << endl; - // note the overwrite=true by default - map.insert( loginKey, info.username ); - map.insert( passwordKey, info.password ); - wallet->writeMap( walletKey, map ); - return true; -} - - -static bool readFromWallet( KWallet::Wallet* wallet, const TQString& key, const TQString& realm, TQString& username, TQString& password, bool userReadOnly, TQMap& knownLogins ) -{ - //kdDebug(130) << "readFromWallet: key=" << key << " username=" << username << " password=" /*<< password*/ << " userReadOnly=" << userReadOnly << " realm=" << realm << endl; - if ( wallet->hasFolder( KWallet::Wallet::PasswordFolder() ) ) - { - wallet->setFolder( KWallet::Wallet::PasswordFolder() ); - - TQMap map; - if ( wallet->readMap( makeWalletKey( key, realm ), map ) == 0 ) - { - typedef TQMap Map; - int entryNumber = 1; - Map::ConstIterator end = map.end(); - Map::ConstIterator it = map.find( "login" ); - while ( it != end ) { - //kdDebug(130) << "readFromWallet: found " << it.key() << "=" << it.data() << endl; - Map::ConstIterator pwdIter = map.find( makeMapKey( "password", entryNumber ) ); - if ( pwdIter != end ) { - if ( it.data() == username ) - password = pwdIter.data(); - knownLogins.insert( it.data(), pwdIter.data() ); - } - - it = map.find( TQString( "login-" ) + TQString::number( ++entryNumber ) ); - } - //kdDebug(130) << knownLogins.count() << " known logins" << endl; - - if ( !userReadOnly && !knownLogins.isEmpty() && username.isEmpty() ) { - // Pick one, any one... - username = knownLogins.begin().key(); - password = knownLogins.begin().data(); - //kdDebug(130) << "readFromWallet: picked the first one : " << username << endl; - } - - return true; - } - } - return false; -} - -TDEIO::AuthInfo -KPasswdServer::checkAuthInfo(TDEIO::AuthInfo info, long windowId) -{ - return checkAuthInfo(info, windowId, 0); -} - -TDEIO::AuthInfo -KPasswdServer::checkAuthInfo(TDEIO::AuthInfo info, long windowId, unsigned long usertime) -{ - kdDebug(130) << "KPasswdServer::checkAuthInfo: User= " << info.username - << ", WindowId = " << windowId << endl; - if( usertime != 0 ) - kapp->updateUserTimestamp( usertime ); - - TQString key = createCacheKey(info); - - Request *request = m_authPending.first(); - TQString path2 = info.url.directory(false, false); - for(; request; request = m_authPending.next()) - { - if (request->key != key) - continue; - - if (info.verifyPath) - { - TQString path1 = request->info.url.directory(false, false); - if (!path2.startsWith(path1)) - continue; - } - - request = new Request; - request->client = callingDcopClient(); - request->transaction = request->client->beginTransaction(); - request->key = key; - request->info = info; - m_authWait.append(request); - return info; - } - - const AuthInfo *result = findAuthInfoItem(key, info); - if (!result || result->isCanceled) - { - if (!result && - (info.username.isEmpty() || info.password.isEmpty()) && - !KWallet::Wallet::keyDoesNotExist(KWallet::Wallet::NetworkWallet(), - KWallet::Wallet::PasswordFolder(), makeWalletKey(key, info.realmValue))) - { - TQMap knownLogins; - if (openWallet(windowId)) { - if (readFromWallet(m_wallet, key, info.realmValue, info.username, info.password, - info.readOnly, knownLogins)) - { - info.setModified(true); - return info; - } - } - } - - info.setModified(false); - return info; - } - - updateAuthExpire(key, result, windowId, false); - - return copyAuthInfo(result); -} - -TDEIO::AuthInfo -KPasswdServer::queryAuthInfo(TDEIO::AuthInfo info, TQString errorMsg, long windowId, long seqNr) -{ - return queryAuthInfo(info, errorMsg, windowId, seqNr, 0 ); -} - -TDEIO::AuthInfo -KPasswdServer::queryAuthInfo(TDEIO::AuthInfo info, TQString errorMsg, long windowId, long seqNr, unsigned long usertime) -{ - kdDebug(130) << "KPasswdServer::queryAuthInfo: User= " << info.username - << ", Message= " << info.prompt << ", WindowId = " << windowId << endl; - if ( !info.password.isEmpty() ) // should we really allow the caller to pre-fill the password? - kdDebug(130) << "password was set by caller" << endl; - if( usertime != 0 ) - kapp->updateUserTimestamp( usertime ); - - TQString key = createCacheKey(info); - Request *request = new Request; - request->client = callingDcopClient(); - request->transaction = request->client->beginTransaction(); - request->key = key; - request->info = info; - request->windowId = windowId; - request->seqNr = seqNr; - if (errorMsg == "") - { - request->errorMsg = TQString::null; - request->prompt = false; - } - else - { - request->errorMsg = errorMsg; - request->prompt = true; - } - m_authPending.append(request); - - if (m_authPending.count() == 1) - TQTimer::singleShot(0, this, TQT_SLOT(processRequest())); - - return info; -} - -void -KPasswdServer::addAuthInfo(TDEIO::AuthInfo info, long windowId) -{ - kdDebug(130) << "KPasswdServer::addAuthInfo: User= " << info.username - << ", RealmValue= " << info.realmValue << ", WindowId = " << windowId << endl; - TQString key = createCacheKey(info); - - m_seqNr++; - - addAuthInfoItem(key, info, windowId, m_seqNr, false); -} - -bool -KPasswdServer::openWallet( WId windowId ) -{ - if ( m_wallet && !m_wallet->isOpen() ) { // forced closed - delete m_wallet; - m_wallet = 0; - } - if ( !m_wallet ) - m_wallet = KWallet::Wallet::openWallet( - KWallet::Wallet::NetworkWallet(), windowId ); - return m_wallet != 0; -} - -void -KPasswdServer::processRequest() -{ - Request *request = m_authPending.first(); - if (!request) - return; - - TDEIO::AuthInfo &info = request->info; - - kdDebug(130) << "KPasswdServer::processRequest: User= " << info.username - << ", Message= " << info.prompt << endl; - const AuthInfo *result = findAuthInfoItem(request->key, request->info); - - if (result && (request->seqNr < result->seqNr)) - { - kdDebug(130) << "KPasswdServer::processRequest: auto retry!" << endl; - if (result->isCanceled) - { - info.setModified(false); - } - else - { - updateAuthExpire(request->key, result, request->windowId, false); - info = copyAuthInfo(result); - } - } - else - { - m_seqNr++; - bool askPw = request->prompt; - if (result && !info.username.isEmpty() && - !request->errorMsg.isEmpty()) - { - TQString prompt = request->errorMsg; - prompt += i18n(" Do you want to retry?"); - int dlgResult = KMessageBox::warningContinueCancelWId(request->windowId, prompt, - i18n("Authentication"), i18n("Retry")); - if (dlgResult != KMessageBox::Continue) - askPw = false; - } - - int dlgResult = TQDialog::Rejected; - if (askPw) - { - TQString username = info.username; - TQString password = info.password; - bool hasWalletData = false; - TQMap knownLogins; - - if ( ( username.isEmpty() || password.isEmpty() ) - && !KWallet::Wallet::keyDoesNotExist(KWallet::Wallet::NetworkWallet(), KWallet::Wallet::PasswordFolder(), makeWalletKey( request->key, info.realmValue )) ) - { - // no login+pass provided, check if tdewallet has one - if ( openWallet( request->windowId ) ) - hasWalletData = readFromWallet( m_wallet, request->key, info.realmValue, username, password, info.readOnly, knownLogins ); - } - - TDEIO::PasswordDialog dlg( info.prompt, username, info.keepPassword ); - if (info.caption.isEmpty()) - dlg.setPlainCaption( i18n("Authorization Dialog") ); - else - dlg.setPlainCaption( info.caption ); - - if ( !info.comment.isEmpty() ) - dlg.addCommentLine( info.commentLabel, info.comment ); - - if ( !password.isEmpty() ) - dlg.setPassword( password ); - - if (info.readOnly) - dlg.setUserReadOnly( true ); - else - dlg.setKnownLogins( knownLogins ); - - if (hasWalletData) - dlg.setKeepPassword( true ); - -#ifdef Q_WS_X11 - XSetTransientForHint( tqt_xdisplay(), dlg.winId(), request->windowId); -#endif - - dlgResult = dlg.exec(); - - if (dlgResult == TQDialog::Accepted) - { - info.username = dlg.username(); - info.password = dlg.password(); - info.keepPassword = dlg.keepPassword(); - - // When the user checks "keep password", that means: - // * if the wallet is enabled, store it there for long-term, and in kpasswdserver - // only for the duration of the window (#92928) - // * otherwise store in kpasswdserver for the duration of the KDE session. - if ( info.keepPassword ) { - if ( openWallet( request->windowId ) ) { - if ( storeInWallet( m_wallet, request->key, info ) ) - // password is in wallet, don't keep it in memory after window is closed - info.keepPassword = false; - } - } - } - } - if ( dlgResult != TQDialog::Accepted ) - { - addAuthInfoItem(request->key, info, 0, m_seqNr, true); - info.setModified( false ); - } - else - { - addAuthInfoItem(request->key, info, request->windowId, m_seqNr, false); - info.setModified( true ); - } - } - - TQCString replyType; - TQByteArray replyData; - - TQDataStream stream2(replyData, IO_WriteOnly); - stream2 << info << m_seqNr; - replyType = "TDEIO::AuthInfo"; - request->client->endTransaction( request->transaction, - replyType, replyData); - - m_authPending.remove((unsigned int) 0); - - // Check all requests in the wait queue. - for(Request *waitRequest = m_authWait.first(); - waitRequest; ) - { - bool keepQueued = false; - TQString key = waitRequest->key; - - request = m_authPending.first(); - TQString path2 = waitRequest->info.url.directory(false, false); - for(; request; request = m_authPending.next()) - { - if (request->key != key) - continue; - - if (info.verifyPath) - { - TQString path1 = request->info.url.directory(false, false); - if (!path2.startsWith(path1)) - continue; - } - - keepQueued = true; - break; - } - if (keepQueued) - { - waitRequest = m_authWait.next(); - } - else - { - const AuthInfo *result = findAuthInfoItem(waitRequest->key, waitRequest->info); - - TQCString replyType; - TQByteArray replyData; - - TQDataStream stream2(replyData, IO_WriteOnly); - - if (!result || result->isCanceled) - { - waitRequest->info.setModified(false); - stream2 << waitRequest->info; - } - else - { - updateAuthExpire(waitRequest->key, result, waitRequest->windowId, false); - TDEIO::AuthInfo info = copyAuthInfo(result); - stream2 << info; - } - - replyType = "TDEIO::AuthInfo"; - waitRequest->client->endTransaction( waitRequest->transaction, - replyType, replyData); - - m_authWait.remove(); - waitRequest = m_authWait.current(); - } - } - - if (m_authPending.count()) - TQTimer::singleShot(0, this, TQT_SLOT(processRequest())); - -} - -TQString KPasswdServer::createCacheKey( const TDEIO::AuthInfo &info ) -{ - if( !info.url.isValid() ) { - // Note that a null key will break findAuthInfoItem later on... - kdWarning(130) << "createCacheKey: invalid URL " << info.url << endl; - return TQString::null; - } - - // Generate the basic key sequence. - TQString key = info.url.protocol(); - key += '-'; - if (!info.url.user().isEmpty()) - { - key += info.url.user(); - key += "@"; - } - key += info.url.host(); - int port = info.url.port(); - if( port ) - { - key += ':'; - key += TQString::number(port); - } - - return key; -} - -TDEIO::AuthInfo -KPasswdServer::copyAuthInfo(const AuthInfo *i) -{ - TDEIO::AuthInfo result; - result.url = i->url; - result.username = i->username; - result.password = i->password; - result.realmValue = i->realmValue; - result.digestInfo = i->digestInfo; - result.setModified(true); - - return result; -} - -const KPasswdServer::AuthInfo * -KPasswdServer::findAuthInfoItem(const TQString &key, const TDEIO::AuthInfo &info) -{ - AuthInfoList *authList = m_authDict.find(key); - if (!authList) - return 0; - - TQString path2 = info.url.directory(false, false); - for(AuthInfo *current = authList->first(); - current; ) - { - if ((current->expire == AuthInfo::expTime) && - (difftime(time(0), current->expireTime) > 0)) - { - authList->remove(); - current = authList->current(); - continue; - } - - if (info.verifyPath) - { - TQString path1 = current->directory; - if (path2.startsWith(path1) && - (info.username.isEmpty() || info.username == current->username)) - return current; - } - else - { - if (current->realmValue == info.realmValue && - (info.username.isEmpty() || info.username == current->username)) - return current; // TODO: Update directory info, - } - - current = authList->next(); - } - return 0; -} - -void -KPasswdServer::removeAuthInfoItem(const TQString &key, const TDEIO::AuthInfo &info) -{ - AuthInfoList *authList = m_authDict.find(key); - if (!authList) - return; - - for(AuthInfo *current = authList->first(); - current; ) - { - if (current->realmValue == info.realmValue) - { - authList->remove(); - current = authList->current(); - } - else - { - current = authList->next(); - } - } - if (authList->isEmpty()) - { - m_authDict.remove(key); - } -} - - -void -KPasswdServer::addAuthInfoItem(const TQString &key, const TDEIO::AuthInfo &info, long windowId, long seqNr, bool canceled) -{ - AuthInfoList *authList = m_authDict.find(key); - if (!authList) - { - authList = new AuthInfoList; - m_authDict.insert(key, authList); - } - AuthInfo *current = authList->first(); - for(; current; current = authList->next()) - { - if (current->realmValue == info.realmValue) - { - authList->take(); - break; - } - } - - if (!current) - { - current = new AuthInfo; - current->expire = AuthInfo::expTime; - kdDebug(130) << "Creating AuthInfo" << endl; - } - else - { - kdDebug(130) << "Updating AuthInfo" << endl; - } - - current->url = info.url; - current->directory = info.url.directory(false, false); - current->username = info.username; - current->password = info.password; - current->realmValue = info.realmValue; - current->digestInfo = info.digestInfo; - current->seqNr = seqNr; - current->isCanceled = canceled; - - updateAuthExpire(key, current, windowId, info.keepPassword && !canceled); - - // Insert into list, keep the list sorted "longest path" first. - authList->inSort(current); -} - -void -KPasswdServer::updateAuthExpire(const TQString &key, const AuthInfo *auth, long windowId, bool keep) -{ - AuthInfo *current = const_cast(auth); - if (keep) - { - current->expire = AuthInfo::expNever; - } - else if (windowId && (current->expire != AuthInfo::expNever)) - { - current->expire = AuthInfo::expWindowClose; - if (!current->windowList.contains(windowId)) - current->windowList.append(windowId); - } - else if (current->expire == AuthInfo::expTime) - { - current->expireTime = time(0)+10; - } - - // Update mWindowIdList - if (windowId) - { - TQStringList *keysChanged = mWindowIdList.find(windowId); - if (!keysChanged) - { - keysChanged = new TQStringList; - mWindowIdList.insert(windowId, keysChanged); - } - if (!keysChanged->contains(key)) - keysChanged->append(key); - } -} - -void -KPasswdServer::removeAuthForWindowId(long windowId) -{ - TQStringList *keysChanged = mWindowIdList.find(windowId); - if (!keysChanged) return; - - for(TQStringList::ConstIterator it = keysChanged->begin(); - it != keysChanged->end(); ++it) - { - TQString key = *it; - AuthInfoList *authList = m_authDict.find(key); - if (!authList) - continue; - - AuthInfo *current = authList->first(); - for(; current; ) - { - if (current->expire == AuthInfo::expWindowClose) - { - if (current->windowList.remove(windowId) && current->windowList.isEmpty()) - { - authList->remove(); - current = authList->current(); - continue; - } - } - current = authList->next(); - } - } -} - -#include "kpasswdserver.moc" diff --git a/kio/kpasswdserver/kpasswdserver.h b/kio/kpasswdserver/kpasswdserver.h deleted file mode 100644 index 46e7191db..000000000 --- a/kio/kpasswdserver/kpasswdserver.h +++ /dev/null @@ -1,118 +0,0 @@ -/* - This file is part of the KDE Password Server - - Copyright (C) 2002 Waldo Bastian (bastian@kde.org) - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public License - version 2 as published by the Free Software Foundation. - - This software 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 library; see the file COPYING. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ -//---------------------------------------------------------------------------- -// -// KDE Password Server -// $Id$ - -#ifndef KPASSWDSERVER_H -#define KPASSWDSERVER_H - -#include -#include - -#include -#include -#include - -namespace KWallet { - class Wallet; -} - -class KPasswdServer : public KDEDModule -{ - Q_OBJECT - K_DCOP -public: - KPasswdServer(const TQCString &); - ~KPasswdServer(); - -k_dcop: - // KDE4 merge - TDEIO::AuthInfo checkAuthInfo(TDEIO::AuthInfo, long, unsigned long); - TDEIO::AuthInfo checkAuthInfo(TDEIO::AuthInfo, long); - TDEIO::AuthInfo queryAuthInfo(TDEIO::AuthInfo, TQString, long, long, unsigned long); - TDEIO::AuthInfo queryAuthInfo(TDEIO::AuthInfo, TQString, long, long); - void addAuthInfo(TDEIO::AuthInfo, long); - -public slots: - void processRequest(); - // Remove all authentication info associated with windowId - void removeAuthForWindowId(long windowId); - -protected: - struct AuthInfo; - - TQString createCacheKey( const TDEIO::AuthInfo &info ); - const AuthInfo *findAuthInfoItem(const TQString &key, const TDEIO::AuthInfo &info); - void removeAuthInfoItem(const TQString &key, const TDEIO::AuthInfo &info); - void addAuthInfoItem(const TQString &key, const TDEIO::AuthInfo &info, long windowId, long seqNr, bool canceled); - TDEIO::AuthInfo copyAuthInfo(const AuthInfo *); - void updateAuthExpire(const TQString &key, const AuthInfo *, long windowId, bool keep); - int findWalletEntry( const TQMap& map, const TQString& username ); - bool openWallet( WId windowId ); - - struct AuthInfo { - AuthInfo() { expire = expNever; isCanceled = false; seqNr = 0; } - - KURL url; - TQString directory; - TQString username; - TQString password; - TQString realmValue; - TQString digestInfo; - - enum { expNever, expWindowClose, expTime } expire; - TQValueList windowList; - unsigned long expireTime; - long seqNr; - - bool isCanceled; - }; - - class AuthInfoList : public TQPtrList - { - public: - AuthInfoList() { setAutoDelete(true); } - int compareItems(TQPtrCollection::Item n1, TQPtrCollection::Item n2); - }; - - TQDict< AuthInfoList > m_authDict; - - struct Request { - DCOPClient *client; - DCOPClientTransaction *transaction; - TQString key; - TDEIO::AuthInfo info; - TQString errorMsg; - long windowId; - long seqNr; - bool prompt; - }; - - TQPtrList< Request > m_authPending; - TQPtrList< Request > m_authWait; - TQIntDict mWindowIdList; - DCOPClient *m_dcopClient; - KWallet::Wallet* m_wallet; - long m_seqNr; -}; - -#endif diff --git a/kio/kscan.desktop b/kio/kscan.desktop deleted file mode 100644 index 8d3a026fb..000000000 --- a/kio/kscan.desktop +++ /dev/null @@ -1,19 +0,0 @@ -[Desktop Entry] -Type=ServiceType -X-TDE-ServiceType=KScan/KScanDialog -Name=KScan -Name[bn]=কে-স্ক্যান -Name[cy]=KSgan -Name[eo]=Bildciferecigo -Name[is]=KScan myndlesari -Name[ka]=სკანერი -Name[ko]=K스캔 -Name[nso]=KTebelelo -Name[pl]=Skan -Name[ru]=Сканер -Name[rw]=KGusikana -Name[sv]=Kscan -Name[ta]=Kவருடல் -Name[te]=కేస్కేన్ -Name[th]=สแกนภาพ - K -Name[ven]=U nanga ha K diff --git a/kio/kssl/CMakeLists.txt b/kio/kssl/CMakeLists.txt deleted file mode 100644 index a2c9f00d6..000000000 --- a/kio/kssl/CMakeLists.txt +++ /dev/null @@ -1,57 +0,0 @@ -################################################# -# -# (C) 2010 Serghei Amelian -# serghei (DOT) amelian (AT) gmail.com -# -# Improvements and feedback are welcome -# -# This file is released under GPL >= 2 -# -################################################# - -add_subdirectory( kssl ) - -include_directories( - ${TQT_INCLUDE_DIRS} - ${CMAKE_CURRENT_BINARY_DIR} - ${CMAKE_BINARY_DIR} - ${CMAKE_CURRENT_SOURCE_DIR} - ${CMAKE_BINARY_DIR}/tdecore - ${CMAKE_SOURCE_DIR}/dcop - ${CMAKE_SOURCE_DIR}/tdecore - ${CMAKE_SOURCE_DIR}/tdecore/network - ${CMAKE_SOURCE_DIR}/tdeui - ${CMAKE_SOURCE_DIR}/tdewallet/client -) - - -##### headers ################################### - -install( FILES - kssl.h ksslcertificatehome.h ksslsettings.h ksslcertificate.h - ksslconnectioninfo.h ksslcertificatefactory.h ksslcertificatecache.h - ksslpeerinfo.h ksslinfodlg.h ksslcertdlg.h ksslutils.h kopenssl.h - ksslall.h ksslpkcs12.h ksslcertchain.h ksslkeygen.h ksslx509v3.h - ksslsigners.h ksslpkcs7.h ksslpemcallback.h ksslsession.h - ${CMAKE_CURRENT_BINARY_DIR}/ksslconfig.h ksslx509map.h ksmimecrypto.h - DESTINATION ${INCLUDE_INSTALL_DIR} ) - - -##### kssl ###################################### - -set( target kssl ) - -set( ${target}_SRCS - kssl.cc ksslcertificatehome.cc ksslsettings.cc - ksslcertificate.cc ksslconnectioninfo.cc ksslcertificatefactory.cc - ksslcertificatecache.cc ksslpeerinfo.cc ksslinfodlg.cc - ksslcertdlg.cc ksslutils.cc kopenssl.cc ksslpkcs12.cc - ksslcertchain.cc ksslkeygen.cc ksslx509v3.cc - ksslsigners.cc ksslpkcs7.cc ksslpemcallback.cc - ksslx509map.cc ksslsession.cc keygenwizard.ui - keygenwizard2.ui ksmimecrypto.cc ksslcsessioncache.cc -) - -tde_add_library( ${target} STATIC_PIC AUTOMOC - SOURCES ${${target}_SRCS} -) diff --git a/kio/kssl/KPMG-CA-16389.0.DC80502.pdf b/kio/kssl/KPMG-CA-16389.0.DC80502.pdf deleted file mode 100644 index 63a7633ee..000000000 Binary files a/kio/kssl/KPMG-CA-16389.0.DC80502.pdf and /dev/null differ diff --git a/kio/kssl/Makefile.am b/kio/kssl/Makefile.am deleted file mode 100644 index 5d57ab7ab..000000000 --- a/kio/kssl/Makefile.am +++ /dev/null @@ -1,72 +0,0 @@ -# don't change the order of this one. it breaks when openssl is in /usr/include -# and the distro's KDE is there too, but the current "devel" KDE prefix is -# somewhere else. Another option for the future (needs testing) would be to -# change SSL_INCLUDES to .../include/openssl and make the source use #include -# instead of #include -INCLUDES=-I$(top_srcdir)/tdecore/network -I$(top_srcdir)/tdewallet/client $(all_includes) $(SSL_INCLUDES) - -noinst_LTLIBRARIES = libkssl.la -KSSLVERSION= 3.0.0 -KSSLPATCH= 0 -METASOURCES= AUTO - -include_HEADERS = \ - kssl.h \ - ksslcertificatehome.h \ - ksslsettings.h \ - ksslcertificate.h \ - ksslconnectioninfo.h \ - ksslcertificatefactory.h \ - ksslcertificatecache.h \ - ksslpeerinfo.h \ - ksslinfodlg.h \ - ksslcertdlg.h \ - ksslutils.h \ - kopenssl.h \ - ksslall.h \ - ksslpkcs12.h \ - ksslcertchain.h \ - ksslkeygen.h \ - ksslx509v3.h \ - ksslsigners.h \ - ksslpkcs7.h \ - ksslpemcallback.h \ - ksslconfig.h \ - ksslsession.h \ - ksslx509map.h \ - ksmimecrypto.h - -noinst_HEADERS = ksslcsessioncache.h - - -libkssl_la_SOURCES = \ - kssl.cc \ - ksslcertificatehome.cc \ - ksslsettings.cc \ - ksslcertificate.cc \ - ksslconnectioninfo.cc \ - ksslcertificatefactory.cc \ - ksslcertificatecache.cc \ - ksslpeerinfo.cc \ - ksslinfodlg.cc \ - ksslcertdlg.cc \ - ksslutils.cc \ - kopenssl.cc \ - ksslpkcs12.cc \ - ksslcertchain.cc \ - ksslkeygen.cc \ - ksslx509v3.cc \ - ksslsigners.cc \ - ksslpkcs7.cc \ - ksslpemcallback.cc \ - ksslx509map.cc \ - ksslsession.cc \ - keygenwizard.ui \ - keygenwizard2.ui \ - ksmimecrypto.cc \ - ksslcsessioncache.cc - - -SUBDIRS = kssl - -include $(top_srcdir)/admin/Doxyfile.am diff --git a/kio/kssl/README b/kio/kssl/README deleted file mode 100644 index b5f404fc7..000000000 --- a/kio/kssl/README +++ /dev/null @@ -1,15 +0,0 @@ - -This library includes cryptographic software written by Eric Young -(eay@cryptsoft.com). - -This set of classes is designed to make SSL easier to integrate in KDE -applications. It currently uses OpenSSL and if it is not successfully -compiled with OpenSSL, then it will do virtually nothing. The SSL settings -for a user are shared across applications and managed with the kcontrol -module "crypto". If this file is not updated by release, you can contact -the author for development information. - - -George Staikos - - diff --git a/kio/kssl/SECURITY-HOLES b/kio/kssl/SECURITY-HOLES deleted file mode 100644 index 62b8e9ca7..000000000 --- a/kio/kssl/SECURITY-HOLES +++ /dev/null @@ -1,17 +0,0 @@ -List of known security holes in KDE's SSL implementation and HTTPS support in -Konqueror. ------------------------------------------------------------------------------ - - -1) Caching should be done on a per-host basis, not per-certificate. - -2) Autocompletion in form fields in HTTPS mode will result in various fields -such as pin numbers and possibly credit cards or other sensitive information -being silently written to disk in some cases. - - -3) Certificate revocation lists (CRLs) are not implemented. This should be -done after 2.2. - - - diff --git a/kio/kssl/TODO b/kio/kssl/TODO deleted file mode 100644 index 7e2270575..000000000 --- a/kio/kssl/TODO +++ /dev/null @@ -1,25 +0,0 @@ -- KSSLServer class needs to be written (in a separate lib!!) so that an app - can act as an SSL server. - -- The certificate factory is not done. This is needed to generate personal - certificates (self signed) for users. - This should be a separate app I guess, and can include a CA signer even. - -- KDE4 - fix constness and reference arguments - -- CRL support (not much left to do?) - -- Code checking for OCX. - -- KSSLD should emit dcop signals to tell people when things change - -- is not working. - -- Namespace it all to TDEIO::SSL:: in KDE4 - -- Remove SSLv2 - -- Fix ksslcalist and any code that uses subject/issuer name as provided by - openssl since this is broken by design. Use MD5 sum for indexing the database - instead - diff --git a/kio/kssl/configure.in.in b/kio/kssl/configure.in.in deleted file mode 100644 index fa256cbdb..000000000 --- a/kio/kssl/configure.in.in +++ /dev/null @@ -1,7 +0,0 @@ -KDE_CHECK_SSL - -if test "$have_ssl" = yes; then - AC_DEFINE(KSSL_HAVE_SSL, 1, [Define if we shall use KSSL]) -fi - -AM_CONFIG_HEADER([kio/kssl/ksslconfig.h]) diff --git a/kio/kssl/keygenwizard.ui b/kio/kssl/keygenwizard.ui deleted file mode 100644 index 4cb5fe1df..000000000 --- a/kio/kssl/keygenwizard.ui +++ /dev/null @@ -1,46 +0,0 @@ - -KGWizardPage1 -George Staikos <staikos@kde.org> - - - KGWizardPage1 - - - - 0 - 0 - 345 - 142 - - - - - unnamed - - - - TextLabel1 - - - You have indicated that you wish to obtain or purchase a secure certificate. This wizard is intended to guide you through the procedure. You may cancel at any time, and this will abort the transaction. - - - RichText - - - false - - - WordBreak|AlignVCenter|AlignLeft - - - - - - - - kdialog.h - - - - diff --git a/kio/kssl/keygenwizard2.ui b/kio/kssl/keygenwizard2.ui deleted file mode 100644 index 90fef8fef..000000000 --- a/kio/kssl/keygenwizard2.ui +++ /dev/null @@ -1,78 +0,0 @@ - -KGWizardPage2 -George Staikos <staikos@kde.org> - - - KGWizardPage2 - - - - 0 - 0 - 343 - 155 - - - - - unnamed - - - - TextLabel4 - - - You must now provide a password for the certificate request. Please choose a very secure password as this will be used to encrypt your private key. - - - WordBreak|AlignVCenter|AlignLeft - - - - - - - TextLabel6 - - - &Repeat password: - - - _password2 - - - - - TextLabel5 - - - &Choose password: - - - _password1 - - - - - _password1 - - - Password - - - - - _password2 - - - Password - - - - - - kdialog.h - - - - diff --git a/kio/kssl/kopenssl.cc b/kio/kssl/kopenssl.cc deleted file mode 100644 index 9983edceb..000000000 --- a/kio/kssl/kopenssl.cc +++ /dev/null @@ -1,1601 +0,0 @@ -/* This file is part of the KDE libraries - Copyright (C) 2001-2003 George Staikos - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License version 2 as published by the Free Software Foundation. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifdef HAVE_CONFIG_H -#include -#endif - -#ifdef KSSL_HAVE_SSL -#include -#endif - -#include -#include -#include -#include -#include - -#include -#include -#include "kopenssl.h" - -extern "C" { -#ifdef KSSL_HAVE_SSL -static int (*K_SSL_connect) (SSL *) = 0L; -static int (*K_SSL_accept) (SSL *) = 0L; -static int (*K_SSL_read) (SSL *, void *, int) = 0L; -static int (*K_SSL_write) (SSL *, const void *, int) = 0L; -static SSL *(*K_SSL_new) (SSL_CTX *) = 0L; -static void (*K_SSL_free) (SSL *) = 0L; -static int (*K_SSL_shutdown) (SSL *) = 0L; -static SSL_CTX *(*K_SSL_CTX_new)(SSL_METHOD *) = 0L; -static void (*K_SSL_CTX_free) (SSL_CTX *) = 0L; -static int (*K_SSL_set_fd) (SSL *, int) = 0L; -static int (*K_SSL_pending) (SSL *) = 0L; -static int (*K_SSL_peek) (SSL *, void *, int) = 0L; -static int (*K_SSL_CTX_set_cipher_list)(SSL_CTX *, const char *) = 0L; -static void (*K_SSL_CTX_set_verify)(SSL_CTX *, int, - int (*)(int, X509_STORE_CTX *)) = 0L; -static int (*K_SSL_use_certificate)(SSL *, X509 *) = 0L; -static SSL_CIPHER *(*K_SSL_get_current_cipher)(SSL *) = 0L; -static long (*K_SSL_ctrl) (SSL *,int, long, char *) = 0L; -static int (*K_RAND_egd) (const char *) = 0L; -static const char* (*K_RAND_file_name) (char *, size_t) = 0L; -static int (*K_RAND_load_file) (const char *, long) = 0L; -static int (*K_RAND_write_file) (const char *) = 0L; -static SSL_METHOD * (*K_TLSv1_client_method) () = 0L; -static SSL_METHOD * (*K_SSLv2_client_method) () = 0L; -static SSL_METHOD * (*K_SSLv3_client_method) () = 0L; -static SSL_METHOD * (*K_SSLv23_client_method) () = 0L; -static X509 * (*K_SSL_get_peer_certificate) (SSL *) = 0L; -static int (*K_SSL_CIPHER_get_bits) (SSL_CIPHER *,int *) = 0L; -static char * (*K_SSL_CIPHER_get_version) (SSL_CIPHER *) = 0L; -static const char * (*K_SSL_CIPHER_get_name) (SSL_CIPHER *) = 0L; -static char * (*K_SSL_CIPHER_description) (SSL_CIPHER *, char *, int) = 0L; -static X509 * (*K_d2i_X509) (X509 **,unsigned char **,long) = 0L; -static int (*K_i2d_X509) (X509 *,unsigned char **) = 0L; -static int (*K_X509_cmp) (X509 *, X509 *) = 0L; -static void (*K_X509_STORE_CTX_free) (X509_STORE_CTX *) = 0L; -static int (*K_X509_verify_cert) (X509_STORE_CTX *) = 0L; -static X509_STORE_CTX *(*K_X509_STORE_CTX_new) (void) = 0L; -static void (*K_X509_STORE_free) (X509_STORE *) = 0L; -static X509_STORE *(*K_X509_STORE_new) (void) = 0L; -static void (*K_X509_free) (X509 *) = 0L; -static char *(*K_X509_NAME_oneline) (X509_NAME *,char *,int) = 0L; -static X509_NAME *(*K_X509_get_subject_name) (X509 *) = 0L; -static X509_NAME *(*K_X509_get_issuer_name) (X509 *) = 0L; -static X509_LOOKUP *(*K_X509_STORE_add_lookup) (X509_STORE *, X509_LOOKUP_METHOD *) = 0L; -static X509_LOOKUP_METHOD *(*K_X509_LOOKUP_file)(void) = 0L; -static void (*K_X509_LOOKUP_free)(X509_LOOKUP *) = 0L; -static int (*K_X509_LOOKUP_ctrl)(X509_LOOKUP *, int, const char *, long, char **) = 0L; -static void (*K_X509_STORE_CTX_init)(X509_STORE_CTX *, X509_STORE *, X509 *, STACK_OF(X509) *) = 0L; -static void (*K_CRYPTO_free) (void *) = 0L; -static X509* (*K_X509_dup) (X509 *) = 0L; -static BIO_METHOD *(*K_BIO_s_mem) (void) = 0L; -static BIO* (*K_BIO_new) (BIO_METHOD *) = 0L; -static BIO* (*K_BIO_new_fp) (FILE *, int) = 0L; -static BIO* (*K_BIO_new_mem_buf) (void *, int) = 0L; -static int (*K_BIO_free) (BIO *) = 0L; -static long (*K_BIO_ctrl) (BIO *,int,long,void *) = 0L; -static int (*K_BIO_write) (BIO *b, const void *data, int len) = 0L; -static int (*K_PEM_ASN1_write_bio) (int (*)(),const char *,BIO *,char *, - const EVP_CIPHER *,unsigned char *,int , - pem_password_cb *, void *) = 0L; -#if OPENSSL_VERSION_NUMBER >= 0x10000000L -static int (*K_ASN1_item_i2d_fp)(ASN1_ITEM *,FILE *,unsigned char *) = 0L; -static ASN1_ITEM *K_NETSCAPE_X509_it = 0L; -#else -static ASN1_METHOD* (*K_X509_asn1_meth) (void) = 0L; -static int (*K_ASN1_i2d_fp)(int (*)(),FILE *,unsigned char *) = 0L; -static int (*K_i2d_ASN1_HEADER)(ASN1_HEADER *, unsigned char **) = 0L; -#endif -static int (*K_X509_print_fp) (FILE *, X509*) = 0L; -static int (*K_i2d_PKCS12) (PKCS12*, unsigned char**) = 0L; -static int (*K_i2d_PKCS12_fp) (FILE *, PKCS12*) = 0L; -static int (*K_PKCS12_newpass) (PKCS12*, char*, char*) = 0L; -static PKCS12* (*K_d2i_PKCS12_fp) (FILE*, PKCS12**) = 0L; -static PKCS12* (*K_PKCS12_new) (void) = 0L; -static void (*K_PKCS12_free) (PKCS12 *) = 0L; -static int (*K_PKCS12_parse) (PKCS12*, const char *, EVP_PKEY**, - X509**, STACK_OF(X509)**) = 0L; -static void (*K_EVP_PKEY_free) (EVP_PKEY *) = 0L; -static EVP_PKEY* (*K_EVP_PKEY_new) () = 0L; -static void (*K_X509_REQ_free) (X509_REQ *) = 0L; -static X509_REQ* (*K_X509_REQ_new) () = 0L; -static int (*K_SSL_CTX_use_PrivateKey) (SSL_CTX*, EVP_PKEY*) = 0L; -static int (*K_SSL_CTX_use_certificate) (SSL_CTX*, X509*) = 0L; -static int (*K_SSL_get_error) (SSL*, int) = 0L; -static STACK_OF(X509)* (*K_SSL_get_peer_cert_chain) (SSL*) = 0L; -static void (*K_X509_STORE_CTX_set_chain) (X509_STORE_CTX *, STACK_OF(X509)*) = 0L; -static void (*K_X509_STORE_CTX_set_purpose) (X509_STORE_CTX *, int) = 0L; -static void (*K_sk_free) (STACK*) = 0L; -static int (*K_sk_num) (STACK*) = 0L; -static char* (*K_sk_pop) (STACK*) = 0L; -static char* (*K_sk_value) (STACK*, int) = 0L; -static STACK* (*K_sk_new) (int (*)()) = 0L; -static int (*K_sk_push) (STACK*, char*) = 0L; -static STACK* (*K_sk_dup) (STACK *) = 0L; -static char * (*K_i2s_ASN1_INTEGER) (X509V3_EXT_METHOD *, ASN1_INTEGER *) =0L; -static ASN1_INTEGER * (*K_X509_get_serialNumber) (X509 *) = 0L; -static EVP_PKEY *(*K_X509_get_pubkey)(X509 *) = 0L; -static int (*K_i2d_PublicKey)(EVP_PKEY *, unsigned char **) = 0L; -static int (*K_X509_check_private_key)(X509 *, EVP_PKEY *) = 0L; -static char * (*K_BN_bn2hex)(const BIGNUM *) = 0L; -static int (*K_X509_digest)(const X509 *,const EVP_MD *, unsigned char *, unsigned int *) = 0L; -static EVP_MD* (*K_EVP_md5)() = 0L; -static void (*K_ASN1_INTEGER_free)(ASN1_INTEGER *) = 0L; -static int (*K_OBJ_obj2nid)(ASN1_OBJECT *) = 0L; -static const char * (*K_OBJ_nid2ln)(int) = 0L; -static int (*K_X509_get_ext_count)(X509*) = 0L; -static int (*K_X509_get_ext_by_NID)(X509*, int, int) = 0L; -static int (*K_X509_get_ext_by_OBJ)(X509*,ASN1_OBJECT*,int) = 0L; -static X509_EXTENSION *(*K_X509_get_ext)(X509*, int loc) = 0L; -static X509_EXTENSION *(*K_X509_delete_ext)(X509*, int) = 0L; -static int (*K_X509_add_ext)(X509*, X509_EXTENSION*, int) = 0L; -static void *(*K_X509_get_ext_d2i)(X509*, int, int*, int*) = 0L; -static char *(*K_i2s_ASN1_OCTET_STRING)(X509V3_EXT_METHOD*, ASN1_OCTET_STRING*) = 0L; -static int (*K_ASN1_BIT_STRING_get_bit)(ASN1_BIT_STRING*, int) = 0L; -static PKCS7 *(*K_PKCS7_new)() = 0L; -static void (*K_PKCS7_free)(PKCS7*) = 0L; -static void (*K_PKCS7_content_free)(PKCS7*) = 0L; -static int (*K_i2d_PKCS7)(PKCS7*, unsigned char**) = 0L; -static PKCS7 *(*K_d2i_PKCS7)(PKCS7**, unsigned char**,long) = 0L; -static int (*K_i2d_PKCS7_fp)(FILE*,PKCS7*) = 0L; -static PKCS7* (*K_d2i_PKCS7_fp)(FILE*,PKCS7**) = 0L; -static int (*K_i2d_PKCS7_bio)(BIO *bp,PKCS7 *p7) = 0L; -static PKCS7 *(*K_d2i_PKCS7_bio)(BIO *bp,PKCS7 **p7) = 0L; -static PKCS7* (*K_PKCS7_dup)(PKCS7*) = 0L; -static STACK_OF(X509_NAME) *(*K_SSL_load_client_CA_file)(const char*) = 0L; -static STACK_OF(X509_INFO) *(*K_PEM_X509_INFO_read)(FILE*, STACK_OF(X509_INFO)*, pem_password_cb*, void*) = 0L; -static char *(*K_ASN1_d2i_fp)(char *(*)(),char *(*)(),FILE*,unsigned char**) = 0L; -static X509 *(*K_X509_new)() = 0L; -static int (*K_X509_PURPOSE_get_count)() = 0L; -static int (*K_X509_PURPOSE_get_id)(X509_PURPOSE *) = 0L; -static int (*K_X509_check_purpose)(X509*,int,int) = 0L; -static X509_PURPOSE* (*K_X509_PURPOSE_get0)(int) = 0L; -static int (*K_EVP_PKEY_assign)(EVP_PKEY*, int, char*) = 0L; -static int (*K_X509_REQ_set_pubkey)(X509_REQ*, EVP_PKEY*) = 0L; -static RSA *(*K_RSA_generate_key)(int, unsigned long, void (*)(int,int,void *), void *) = 0L; -static int (*K_i2d_X509_REQ_fp)(FILE*, X509_REQ*) = 0L; -static void (*K_ERR_clear_error)() = 0L; -static unsigned long (*K_ERR_get_error)() = 0L; -static void (*K_ERR_print_errors_fp)(FILE*) = 0L; -static PKCS7 *(*K_PKCS7_sign)(X509*, EVP_PKEY*, STACK_OF(X509)*, BIO*, int) = 0L; -static int (*K_PKCS7_verify)(PKCS7*,STACK_OF(X509)*,X509_STORE*,BIO*,BIO*,int) = 0L; -static STACK_OF(X509) *(*K_PKCS7_get0_signers)(PKCS7 *, STACK_OF(X509) *, int) = 0L; -static PKCS7 *(*K_PKCS7_encrypt)(STACK_OF(X509) *, BIO *, EVP_CIPHER *, int) = 0L; -static int (*K_PKCS7_decrypt)(PKCS7 *, EVP_PKEY *, X509 *, BIO *, int) = 0L; -static SSL_SESSION* (*K_SSL_get1_session)(SSL*) = 0L; -static void (*K_SSL_SESSION_free)(SSL_SESSION*) = 0L; -static int (*K_SSL_set_session)(SSL*,SSL_SESSION*) = 0L; -static SSL_SESSION* (*K_d2i_SSL_SESSION)(SSL_SESSION**,unsigned char**, long) = 0L; -static int (*K_i2d_SSL_SESSION)(SSL_SESSION*,unsigned char**) = 0L; -static STACK *(*K_X509_get1_email)(X509 *x) = 0L; -static void (*K_X509_email_free)(STACK *sk) = 0L; -static EVP_CIPHER *(*K_EVP_des_ede3_cbc)() = 0L; -static EVP_CIPHER *(*K_EVP_des_cbc)() = 0L; -static EVP_CIPHER *(*K_EVP_rc2_cbc)() = 0L; -static EVP_CIPHER *(*K_EVP_rc2_64_cbc)() = 0L; -static EVP_CIPHER *(*K_EVP_rc2_40_cbc)() = 0L; -static int (*K_i2d_PrivateKey_fp)(FILE*,EVP_PKEY*) = 0L; -static int (*K_i2d_PKCS8PrivateKey_fp)(FILE*, EVP_PKEY*, const EVP_CIPHER*, char*, int, pem_password_cb*, void*) = 0L; -static void (*K_RSA_free)(RSA*) = 0L; -static EVP_CIPHER *(*K_EVP_bf_cbc)() = 0L; -static int (*K_X509_REQ_sign)(X509_REQ*, EVP_PKEY*, const EVP_MD*) = 0L; -static int (*K_X509_NAME_add_entry_by_txt)(X509_NAME*, char*, int, unsigned char*, int, int, int) = 0L; -static X509_NAME *(*K_X509_NAME_new)() = 0L; -static int (*K_X509_REQ_set_subject_name)(X509_REQ*,X509_NAME*) = 0L; -static unsigned char *(*K_ASN1_STRING_data)(ASN1_STRING*) = 0L; -static int (*K_ASN1_STRING_length)(ASN1_STRING*) = 0L; -static STACK_OF(SSL_CIPHER) *(*K_SSL_get_ciphers)(const SSL *ssl) = 0L; - -#endif -} - - -bool KOpenSSLProxy::hasLibSSL() const { - return _sslLib != 0L; -} - - -bool KOpenSSLProxy::hasLibCrypto() const { - return _cryptoLib != 0L; -} - - -void KOpenSSLProxy::destroy() { - delete this; - _me = 0L; -} - -#ifdef __OpenBSD__ -#include -#include -#include - -static TQString findMostRecentLib(TQString dir, TQString name) -{ - // Grab all shared libraries in the directory - TQString filter = "lib"+name+".so.*"; - TQDir d(dir, filter); - if (!d.exists()) - return 0L; - TQStringList l = d.entryList(); - - // Find the best one - int bestmaj = -1; - int bestmin = -1; - TQString best = 0L; - // where do we start - uint s = filter.length()-1; - for (TQStringList::Iterator it = l.begin(); it != l.end(); ++it) { - TQString numberpart = (*it).mid(s); - uint endmaj = numberpart.find('.'); - if (endmaj == -1) - continue; - bool ok; - int maj = numberpart.left(endmaj).toInt(&ok); - if (!ok) - continue; - int min = numberpart.mid(endmaj+1).toInt(&ok); - if (!ok) - continue; - if (maj > bestmaj || (maj == bestmaj && min > bestmin)) { - bestmaj = maj; - bestmin = min; - best = (*it); - } - } - if (best.isNull()) - return 0L; - else - return dir+"/"+best; -} -#endif - - -KOpenSSLProxy::KOpenSSLProxy() { -KLibLoader *ll = KLibLoader::self(); -_ok = false; -TQStringList libpaths, libnamesc, libnamess; -TDEConfig *cfg; - - _cryptoLib = 0L; - _sslLib = 0L; - - cfg = new TDEConfig("cryptodefaults", false, false); - cfg->setGroup("OpenSSL"); - TQString upath = cfg->readPathEntry("Path"); - if (!upath.isEmpty()) - libpaths << upath; - - delete cfg; - -#ifdef __OpenBSD__ - { - TQString libname = findMostRecentLib("/usr/lib" KDELIBSUFF, "crypto"); - if (!libname.isNull()) - _cryptoLib = ll->globalLibrary(libname.latin1()); - } -#elif defined(__CYGWIN__) - libpaths << "/usr/bin/" - << "/usr/local/bin" - << "/usr/local/openssl/bin" - << "/opt/openssl/bin" - << "/opt/trinity/bin" - << ""; - - libnamess << "cygssl-0.9.7.dll" - << "cygssl.dll" - << "libssl.dll" - << ""; - - libnamesc << "cygcrypto.dll" - << "libcrypto.dll" - << ""; -#else - libpaths - #ifdef _AIX - << "/opt/freeware/lib/" - #endif - << "/usr/lib" KDELIBSUFF "/" - << "/usr/ssl/lib" KDELIBSUFF "/" - << "/usr/local/lib" KDELIBSUFF "/" - << "/usr/local/openssl/lib" KDELIBSUFF "/" - << "/usr/local/ssl/lib" KDELIBSUFF "/" - << "/opt/openssl/lib" KDELIBSUFF "/" - << "/lib" KDELIBSUFF "/" - << ""; - -// FIXME: #define here for the various OS types to optimize - libnamess - #ifdef hpux - << "libssl.sl" - #elif defined(_AIX) - << "libssl.a(libssl.so.0)" - #elif defined(__APPLE__) - << "libssl.dylib" - << "libssl.0.9.dylib" - #else - #ifdef SHLIB_VERSION_NUMBER - << "libssl.so." SHLIB_VERSION_NUMBER - #endif - << "libssl.so" - << "libssl.so.0" - #endif - ; - - libnamesc - #ifdef hpux - << "libcrypto.sl" - #elif defined(_AIX) - << "libcrypto.a(libcrypto.so.0)" - #elif defined(__APPLE__) - << "libcrypto.dylib" - << "libcrypto.0.9.dylib" - #else - #ifdef SHLIB_VERSION_NUMBER - << "libcrypto.so." SHLIB_VERSION_NUMBER - #endif - << "libcrypto.so" - << "libcrypto.so.0" - #endif - ; -#endif - - for (TQStringList::Iterator it = libpaths.begin(); - it != libpaths.end(); - ++it) { - for (TQStringList::Iterator shit = libnamesc.begin(); - shit != libnamesc.end(); - ++shit) { - TQString alib = *it; - if (!alib.isEmpty() && !alib.endsWith("/")) - alib += "/"; - alib += *shit; - TQString tmpStr(alib.latin1()); - tmpStr.replace(TQRegExp("\\(.*\\)"), ""); - if (!access(tmpStr.latin1(), R_OK)) - _cryptoLib = ll->globalLibrary(alib.latin1()); - if (!_cryptoLib) { - // Multiarch triplet search - TQDir madir (*it); - TQStringList multiarchdirs = madir.entryList("*-*-*", TQDir::Dirs); - for (TQStringList::Iterator mait = multiarchdirs.begin(); mait != multiarchdirs.end(); ++mait ) { - TQString malib = *it + *mait + "/" + *shit; - TQString tmpStr(malib.latin1()); - tmpStr.replace(TQRegExp("\\(.*\\)"), ""); - if (!access(tmpStr.latin1(), R_OK)) - _cryptoLib = ll->globalLibrary(malib.latin1()); - } - } - if (_cryptoLib) break; - } - if (_cryptoLib) break; - } - - if (_cryptoLib) { -#ifdef KSSL_HAVE_SSL - K_X509_free = (void (*) (X509 *)) _cryptoLib->symbol("X509_free"); - K_RAND_egd = (int (*)(const char *)) _cryptoLib->symbol("RAND_egd"); - K_RAND_load_file = (int (*)(const char *, long)) _cryptoLib->symbol("RAND_load_file"); - K_RAND_file_name = (const char* (*)(char *, size_t)) _cryptoLib->symbol("RAND_file_name"); - K_RAND_write_file = (int (*)(const char *)) _cryptoLib->symbol("RAND_write_file"); - K_CRYPTO_free = (void (*) (void *)) _cryptoLib->symbol("CRYPTO_free"); - K_d2i_X509 = (X509 * (*)(X509 **,unsigned char **,long)) _cryptoLib->symbol("d2i_X509"); - K_i2d_X509 = (int (*)(X509 *,unsigned char **)) _cryptoLib->symbol("i2d_X509"); - K_X509_cmp = (int (*)(X509 *, X509 *)) _cryptoLib->symbol("X509_cmp"); - K_X509_STORE_CTX_new = (X509_STORE_CTX * (*) (void)) _cryptoLib->symbol("X509_STORE_CTX_new"); - K_X509_STORE_CTX_free = (void (*) (X509_STORE_CTX *)) _cryptoLib->symbol("X509_STORE_CTX_free"); - K_X509_verify_cert = (int (*) (X509_STORE_CTX *)) _cryptoLib->symbol("X509_verify_cert"); - K_X509_STORE_new = (X509_STORE * (*) (void)) _cryptoLib->symbol("X509_STORE_new"); - K_X509_STORE_free = (void (*) (X509_STORE *)) _cryptoLib->symbol("X509_STORE_free"); - K_X509_NAME_oneline = (char * (*) (X509_NAME *,char *,int)) _cryptoLib->symbol("X509_NAME_oneline"); - K_X509_get_subject_name = (X509_NAME * (*) (X509 *)) _cryptoLib->symbol("X509_get_subject_name"); - K_X509_get_issuer_name = (X509_NAME * (*) (X509 *)) _cryptoLib->symbol("X509_get_issuer_name"); - K_X509_STORE_add_lookup = (X509_LOOKUP *(*) (X509_STORE *, X509_LOOKUP_METHOD *)) _cryptoLib->symbol("X509_STORE_add_lookup"); - K_X509_LOOKUP_file = (X509_LOOKUP_METHOD *(*)(void)) _cryptoLib->symbol("X509_LOOKUP_file"); - K_X509_LOOKUP_free = (void (*)(X509_LOOKUP *)) _cryptoLib->symbol("X509_LOOKUP_free"); - K_X509_LOOKUP_ctrl = (int (*)(X509_LOOKUP *, int, const char *, long, char **)) _cryptoLib->symbol("X509_LOOKUP_ctrl"); - K_X509_STORE_CTX_init = (void (*)(X509_STORE_CTX *, X509_STORE *, X509 *, STACK_OF(X509) *)) _cryptoLib->symbol("X509_STORE_CTX_init"); - K_X509_dup = (X509* (*)(X509*)) _cryptoLib->symbol("X509_dup"); - K_BIO_s_mem = (BIO_METHOD *(*) (void)) _cryptoLib->symbol("BIO_s_mem"); - K_BIO_new = (BIO* (*)(BIO_METHOD *)) _cryptoLib->symbol("BIO_new"); - K_BIO_new_fp = (BIO* (*)(FILE*, int)) _cryptoLib->symbol("BIO_new_fp"); - K_BIO_new_mem_buf = (BIO* (*)(void *, int)) _cryptoLib->symbol("BIO_new_mem_buf"); - K_BIO_free = (int (*)(BIO*)) _cryptoLib->symbol("BIO_free"); - K_BIO_ctrl = (long (*) (BIO *,int,long,void *)) _cryptoLib->symbol("BIO_ctrl"); - K_BIO_write = (int (*) (BIO *b, const void *data, int len)) _cryptoLib->symbol("BIO_write"); - K_PEM_ASN1_write_bio = (int (*)(int (*)(), const char *,BIO*, char*, const EVP_CIPHER *, unsigned char *, int, pem_password_cb *, void *)) _cryptoLib->symbol("PEM_ASN1_write_bio"); -#if OPENSSL_VERSION_NUMBER >= 0x10000000L - K_ASN1_item_i2d_fp = (int (*)(ASN1_ITEM *, FILE*, unsigned char *)) _cryptoLib->symbol("ASN1_item_i2d_fp"); - K_NETSCAPE_X509_it = (ASN1_ITEM *) _cryptoLib->symbol("NETSCAPE_X509_it"); -#else - K_X509_asn1_meth = (ASN1_METHOD* (*)(void)) _cryptoLib->symbol("X509_asn1_meth"); - K_ASN1_i2d_fp = (int (*)(int (*)(), FILE*, unsigned char *)) _cryptoLib->symbol("ASN1_i2d_fp"); - K_i2d_ASN1_HEADER = (int (*)(ASN1_HEADER *, unsigned char **)) _cryptoLib->symbol("i2d_ASN1_HEADER"); -#endif - K_X509_print_fp = (int (*)(FILE*, X509*)) _cryptoLib->symbol("X509_print_fp"); - K_i2d_PKCS12 = (int (*)(PKCS12*, unsigned char**)) _cryptoLib->symbol("i2d_PKCS12"); - K_i2d_PKCS12_fp = (int (*)(FILE *, PKCS12*)) _cryptoLib->symbol("i2d_PKCS12_fp"); - K_PKCS12_newpass = (int (*)(PKCS12*, char*, char*)) _cryptoLib->symbol("PKCS12_newpass"); - K_d2i_PKCS12_fp = (PKCS12* (*)(FILE*, PKCS12**)) _cryptoLib->symbol("d2i_PKCS12_fp"); - K_PKCS12_new = (PKCS12* (*)()) _cryptoLib->symbol("PKCS12_new"); - K_PKCS12_free = (void (*)(PKCS12 *)) _cryptoLib->symbol("PKCS12_free"); - K_PKCS12_parse = (int (*)(PKCS12*, const char *, EVP_PKEY**, - X509**, STACK_OF(X509)**)) _cryptoLib->symbol("PKCS12_parse"); - K_EVP_PKEY_free = (void (*) (EVP_PKEY *)) _cryptoLib->symbol("EVP_PKEY_free"); - K_EVP_PKEY_new = (EVP_PKEY* (*)()) _cryptoLib->symbol("EVP_PKEY_new"); - K_X509_REQ_free = (void (*)(X509_REQ*)) _cryptoLib->symbol("X509_REQ_free"); - K_X509_REQ_new = (X509_REQ* (*)()) _cryptoLib->symbol("X509_REQ_new"); - K_X509_STORE_CTX_set_chain = (void (*)(X509_STORE_CTX *, STACK_OF(X509)*)) _cryptoLib->symbol("X509_STORE_CTX_set_chain"); - K_X509_STORE_CTX_set_purpose = (void (*)(X509_STORE_CTX *, int)) _cryptoLib->symbol("X509_STORE_CTX_set_purpose"); - K_sk_free = (void (*) (STACK *)) _cryptoLib->symbol("sk_free"); - K_sk_num = (int (*) (STACK *)) _cryptoLib->symbol("sk_num"); - K_sk_pop = (char* (*) (STACK *)) _cryptoLib->symbol("sk_pop"); - K_sk_value = (char* (*) (STACK *, int)) _cryptoLib->symbol("sk_value"); - K_sk_new = (STACK* (*) (int (*)())) _cryptoLib->symbol("sk_new"); - K_sk_push = (int (*) (STACK*, char*)) _cryptoLib->symbol("sk_push"); - K_sk_dup = (STACK* (*) (STACK *)) _cryptoLib->symbol("sk_dup"); - K_i2s_ASN1_INTEGER = (char *(*) (X509V3_EXT_METHOD *, ASN1_INTEGER *)) _cryptoLib->symbol("i2s_ASN1_INTEGER"); - K_X509_get_serialNumber = (ASN1_INTEGER * (*) (X509 *)) _cryptoLib->symbol("X509_get_serialNumber"); - K_X509_get_pubkey = (EVP_PKEY *(*)(X509 *)) _cryptoLib->symbol("X509_get_pubkey"); - K_i2d_PublicKey = (int (*)(EVP_PKEY *, unsigned char **)) _cryptoLib->symbol("i2d_PublicKey"); - K_X509_check_private_key = (int (*)(X509 *, EVP_PKEY *)) _cryptoLib->symbol("X509_check_private_key"); - K_BN_bn2hex = (char *(*)(const BIGNUM *)) _cryptoLib->symbol("BN_bn2hex"); - K_X509_digest = (int (*)(const X509 *,const EVP_MD *, unsigned char *, unsigned int *)) _cryptoLib->symbol("X509_digest"); - K_EVP_md5 = (EVP_MD *(*)()) _cryptoLib->symbol("EVP_md5"); - K_ASN1_INTEGER_free = (void (*)(ASN1_INTEGER *)) _cryptoLib->symbol("ASN1_INTEGER_free"); - K_OBJ_obj2nid = (int (*)(ASN1_OBJECT *)) _cryptoLib->symbol("OBJ_obj2nid"); - K_OBJ_nid2ln = (const char *(*)(int)) _cryptoLib->symbol("OBJ_nid2ln"); - K_X509_get_ext_count = (int (*)(X509*)) _cryptoLib->symbol("X509_get_ext_count"); - K_X509_get_ext_by_NID = (int (*)(X509*,int,int)) _cryptoLib->symbol("X509_get_ext_by_NID"); - K_X509_get_ext_by_OBJ = (int (*)(X509*,ASN1_OBJECT*,int)) _cryptoLib->symbol("X509_get_ext_by_OBJ"); - K_X509_get_ext = (X509_EXTENSION* (*)(X509*,int)) _cryptoLib->symbol("X509_get_ext"); - K_X509_delete_ext = (X509_EXTENSION* (*)(X509*,int)) _cryptoLib->symbol("X509_delete_ext"); - K_X509_add_ext = (int (*)(X509*,X509_EXTENSION*,int)) _cryptoLib->symbol("X509_add_ext"); - K_X509_get_ext_d2i = (void* (*)(X509*,int,int*,int*)) _cryptoLib->symbol("X509_get_ext_d2i"); - K_i2s_ASN1_OCTET_STRING = (char *(*)(X509V3_EXT_METHOD*,ASN1_OCTET_STRING*)) _cryptoLib->symbol("i2s_ASN1_OCTET_STRING"); - K_ASN1_BIT_STRING_get_bit = (int (*)(ASN1_BIT_STRING*,int)) _cryptoLib->symbol("ASN1_BIT_STRING_get_bit"); - K_PKCS7_new = (PKCS7 *(*)()) _cryptoLib->symbol("PKCS7_new"); - K_PKCS7_free = (void (*)(PKCS7*)) _cryptoLib->symbol("PKCS7_free"); - K_PKCS7_content_free = (void (*)(PKCS7*)) _cryptoLib->symbol("PKCS7_content_free"); - K_i2d_PKCS7 = (int (*)(PKCS7*, unsigned char**)) _cryptoLib->symbol("i2d_PKCS7"); - K_i2d_PKCS7_fp = (int (*)(FILE*,PKCS7*)) _cryptoLib->symbol("i2d_PKCS7_fp"); - K_i2d_PKCS7_bio = (int (*)(BIO *bp,PKCS7 *p7)) _cryptoLib->symbol("i2d_PKCS7_bio"); - K_d2i_PKCS7 = (PKCS7* (*)(PKCS7**,unsigned char**,long)) _cryptoLib->symbol("d2i_PKCS7"); - K_d2i_PKCS7_fp = (PKCS7 *(*)(FILE *,PKCS7**)) _cryptoLib->symbol("d2i_PKCS7_fp"); - K_d2i_PKCS7_bio = (PKCS7 *(*)(BIO *bp,PKCS7 **p7)) _cryptoLib->symbol("d2i_PKCS7_bio"); - K_PKCS7_dup = (PKCS7* (*)(PKCS7*)) _cryptoLib->symbol("PKCS7_dup"); - K_PKCS7_sign = (PKCS7 *(*)(X509*, EVP_PKEY*, STACK_OF(X509)*, BIO*, int)) _cryptoLib->symbol("PKCS7_sign"); - K_PKCS7_verify = (int (*)(PKCS7*,STACK_OF(X509)*,X509_STORE*,BIO*,BIO*,int)) _cryptoLib->symbol("PKCS7_verify"); - K_PKCS7_get0_signers = (STACK_OF(X509) *(*)(PKCS7 *, STACK_OF(X509) *, int)) _cryptoLib->symbol("PKCS7_get0_signers"); - K_PKCS7_encrypt = (PKCS7* (*)(STACK_OF(X509) *, BIO *, EVP_CIPHER *, int)) _cryptoLib->symbol("PKCS7_encrypt"); - K_PKCS7_decrypt = (int (*)(PKCS7 *, EVP_PKEY *, X509 *, BIO *, int)) _cryptoLib->symbol("PKCS7_decrypt"); - K_PEM_X509_INFO_read = (STACK_OF(X509_INFO) *(*)(FILE*, STACK_OF(X509_INFO)*, pem_password_cb*, void *)) _cryptoLib->symbol("PEM_X509_INFO_read"); - K_ASN1_d2i_fp = (char *(*)(char *(*)(),char *(*)(),FILE*,unsigned char**)) _cryptoLib->symbol("ASN1_d2i_fp"); - K_X509_new = (X509 *(*)()) _cryptoLib->symbol("X509_new"); - K_X509_PURPOSE_get_count = (int (*)()) _cryptoLib->symbol("X509_PURPOSE_get_count"); - K_X509_PURPOSE_get_id = (int (*)(X509_PURPOSE *)) _cryptoLib->symbol("X509_PURPOSE_get_id"); - K_X509_check_purpose = (int (*)(X509*,int,int)) _cryptoLib->symbol("X509_check_purpose"); - K_X509_PURPOSE_get0 = (X509_PURPOSE *(*)(int)) _cryptoLib->symbol("X509_PURPOSE_get0"); - K_EVP_PKEY_assign = (int (*)(EVP_PKEY*, int, char*)) _cryptoLib->symbol("EVP_PKEY_assign"); - K_X509_REQ_set_pubkey = (int (*)(X509_REQ*, EVP_PKEY*)) _cryptoLib->symbol("X509_REQ_set_pubkey"); - K_RSA_generate_key = (RSA* (*)(int, unsigned long, void (*)(int,int,void *), void *)) _cryptoLib->symbol("RSA_generate_key"); - K_i2d_X509_REQ_fp = (int (*)(FILE *, X509_REQ *)) _cryptoLib->symbol("i2d_X509_REQ_fp"); - K_ERR_clear_error = (void (*)()) _cryptoLib->symbol("ERR_clear_error"); - K_ERR_get_error = (unsigned long (*)()) _cryptoLib->symbol("ERR_get_error"); - K_ERR_print_errors_fp = (void (*)(FILE*)) _cryptoLib->symbol("ERR_print_errors_fp"); - K_X509_get1_email = (STACK *(*)(X509 *x)) _cryptoLib->symbol("X509_get1_email"); - K_X509_email_free = (void (*)(STACK *sk)) _cryptoLib->symbol("X509_email_free"); - K_EVP_des_ede3_cbc = (EVP_CIPHER *(*)()) _cryptoLib->symbol("EVP_des_ede3_cbc"); - K_EVP_des_cbc = (EVP_CIPHER *(*)()) _cryptoLib->symbol("EVP_des_cbc"); - K_EVP_rc2_cbc = (EVP_CIPHER *(*)()) _cryptoLib->symbol("EVP_rc2_cbc"); - K_EVP_rc2_64_cbc = (EVP_CIPHER *(*)()) _cryptoLib->symbol("EVP_rc2_64_cbc"); - K_EVP_rc2_40_cbc = (EVP_CIPHER *(*)()) _cryptoLib->symbol("EVP_rc2_40_cbc"); - K_i2d_PrivateKey_fp = (int (*)(FILE*,EVP_PKEY*)) _cryptoLib->symbol("i2d_PrivateKey_fp"); - K_i2d_PKCS8PrivateKey_fp = (int (*)(FILE*, EVP_PKEY*, const EVP_CIPHER*, char*, int, pem_password_cb*, void*)) _cryptoLib->symbol("i2d_PKCS8PrivateKey_fp"); - K_RSA_free = (void (*)(RSA*)) _cryptoLib->symbol("RSA_free"); - K_EVP_bf_cbc = (EVP_CIPHER *(*)()) _cryptoLib->symbol("EVP_bf_cbc"); - K_X509_REQ_sign = (int (*)(X509_REQ*, EVP_PKEY*, const EVP_MD*)) _cryptoLib->symbol("X509_REQ_sign"); - K_X509_NAME_add_entry_by_txt = (int (*)(X509_NAME*, char*, int, unsigned char*, int, int, int)) _cryptoLib->symbol("X509_NAME_add_entry_by_txt"); - K_X509_NAME_new = (X509_NAME *(*)()) _cryptoLib->symbol("X509_NAME_new"); - K_X509_REQ_set_subject_name = (int (*)(X509_REQ*,X509_NAME*)) _cryptoLib->symbol("X509_REQ_set_subject_name"); - K_ASN1_STRING_data = (unsigned char *(*)(ASN1_STRING*)) _cryptoLib->symbol("ASN1_STRING_data"); - K_ASN1_STRING_length = (int (*)(ASN1_STRING*)) _cryptoLib->symbol("ASN1_STRING_length"); -#endif - } - -#ifdef __OpenBSD__ - { - TQString libname = findMostRecentLib("/usr/lib", "ssl"); - if (!libname.isNull()) - _sslLib = ll->globalLibrary(libname.latin1()); - } -#else - for (TQStringList::Iterator it = libpaths.begin(); - it != libpaths.end(); - ++it) { - for (TQStringList::Iterator shit = libnamess.begin(); - shit != libnamess.end(); - ++shit) { - TQString alib = *it; - if (!alib.isEmpty() && !alib.endsWith("/")) - alib += "/"; - alib += *shit; - TQString tmpStr(alib.latin1()); - tmpStr.replace(TQRegExp("\\(.*\\)"), ""); - if (!access(tmpStr.latin1(), R_OK)) - _sslLib = ll->globalLibrary(alib.latin1()); - if (!_sslLib) { - // Multiarch triplet search - TQDir madir (*it); - TQStringList multiarchdirs = madir.entryList("*-*-*", TQDir::Dirs); - for (TQStringList::Iterator mait = multiarchdirs.begin(); mait != multiarchdirs.end(); ++mait ) { - TQString malib = *it + *mait + "/" + *shit; - TQString tmpStr(malib.latin1()); - tmpStr.replace(TQRegExp("\\(.*\\)"), ""); - if (!access(tmpStr.latin1(), R_OK)) - _sslLib = ll->globalLibrary(malib.latin1()); - } - } - if (_sslLib) break; - } - if (_sslLib) break; - } -#endif - - if (_sslLib) { -#ifdef KSSL_HAVE_SSL - // stand back from your monitor and look at this. it's fun! :) - K_SSL_connect = (int (*)(SSL *)) _sslLib->symbol("SSL_connect"); - K_SSL_accept = (int (*)(SSL *)) _sslLib->symbol("SSL_accept"); - K_SSL_read = (int (*)(SSL *, void *, int)) _sslLib->symbol("SSL_read"); - K_SSL_write = (int (*)(SSL *, const void *, int)) - _sslLib->symbol("SSL_write"); - K_SSL_new = (SSL* (*)(SSL_CTX *)) _sslLib->symbol("SSL_new"); - K_SSL_free = (void (*)(SSL *)) _sslLib->symbol("SSL_free"); - K_SSL_shutdown = (int (*)(SSL *)) _sslLib->symbol("SSL_shutdown"); - K_SSL_CTX_new = (SSL_CTX* (*)(SSL_METHOD*)) _sslLib->symbol("SSL_CTX_new"); - K_SSL_CTX_free = (void (*)(SSL_CTX*)) _sslLib->symbol("SSL_CTX_free"); - K_SSL_set_fd = (int (*)(SSL *, int)) _sslLib->symbol("SSL_set_fd"); - K_SSL_pending = (int (*)(SSL *)) _sslLib->symbol("SSL_pending"); - K_SSL_CTX_set_cipher_list = (int (*)(SSL_CTX *, const char *)) - _sslLib->symbol("SSL_CTX_set_cipher_list"); - K_SSL_CTX_set_verify = (void (*)(SSL_CTX*, int, int (*)(int, X509_STORE_CTX*))) _sslLib->symbol("SSL_CTX_set_verify"); - K_SSL_use_certificate = (int (*)(SSL*, X509*)) - _sslLib->symbol("SSL_CTX_use_certificate"); - K_SSL_get_current_cipher = (SSL_CIPHER *(*)(SSL *)) - _sslLib->symbol("SSL_get_current_cipher"); - K_SSL_ctrl = (long (*)(SSL * ,int, long, char *)) - _sslLib->symbol("SSL_ctrl"); - K_TLSv1_client_method = (SSL_METHOD *(*)()) _sslLib->symbol("TLSv1_client_method"); - K_SSLv2_client_method = (SSL_METHOD *(*)()) _sslLib->symbol("SSLv2_client_method"); - K_SSLv3_client_method = (SSL_METHOD *(*)()) _sslLib->symbol("SSLv3_client_method"); - K_SSLv23_client_method = (SSL_METHOD *(*)()) _sslLib->symbol("SSLv23_client_method"); - K_SSL_get_peer_certificate = (X509 *(*)(SSL *)) _sslLib->symbol("SSL_get_peer_certificate"); - K_SSL_CIPHER_get_bits = (int (*)(SSL_CIPHER *,int *)) _sslLib->symbol("SSL_CIPHER_get_bits"); - K_SSL_CIPHER_get_version = (char * (*)(SSL_CIPHER *)) _sslLib->symbol("SSL_CIPHER_get_version"); - K_SSL_CIPHER_get_name = (const char * (*)(SSL_CIPHER *)) _sslLib->symbol("SSL_CIPHER_get_name"); - K_SSL_CIPHER_description = (char * (*)(SSL_CIPHER *, char *, int)) _sslLib->symbol("SSL_CIPHER_description"); - K_SSL_CTX_use_PrivateKey = (int (*)(SSL_CTX*, EVP_PKEY*)) _sslLib->symbol("SSL_CTX_use_PrivateKey"); - K_SSL_CTX_use_certificate = (int (*)(SSL_CTX*, X509*)) _sslLib->symbol("SSL_CTX_use_certificate"); - K_SSL_get_error = (int (*)(SSL*, int)) _sslLib->symbol("SSL_get_error"); - K_SSL_get_peer_cert_chain = (STACK_OF(X509)* (*)(SSL*)) _sslLib->symbol("SSL_get_peer_cert_chain"); - K_SSL_load_client_CA_file = (STACK_OF(X509_NAME)* (*)(const char *)) _sslLib->symbol("SSL_load_client_CA_file"); - K_SSL_peek = (int (*)(SSL*,void*,int)) _sslLib->symbol("SSL_peek"); - K_SSL_get1_session = (SSL_SESSION* (*)(SSL*)) _sslLib->symbol("SSL_get1_session"); - K_SSL_SESSION_free = (void (*)(SSL_SESSION*)) _sslLib->symbol("SSL_SESSION_free"); - K_SSL_set_session = (int (*)(SSL*,SSL_SESSION*)) _sslLib->symbol("SSL_set_session"); - K_d2i_SSL_SESSION = (SSL_SESSION* (*)(SSL_SESSION**,unsigned char**, long)) _sslLib->symbol("d2i_SSL_SESSION"); - K_i2d_SSL_SESSION = (int (*)(SSL_SESSION*,unsigned char**)) _sslLib->symbol("i2d_SSL_SESSION"); - K_SSL_get_ciphers = (STACK_OF(SSL_CIPHER) *(*)(const SSL*)) _sslLib->symbol("SSL_get_ciphers"); -#endif - - - // Initialize the library (once only!) - void *x; - x = _sslLib->symbol("SSL_library_init"); - if (_cryptoLib) { - if (x) ((int (*)())x)(); - x = _cryptoLib->symbol("OpenSSL_add_all_algorithms"); - if (!x) - x = _cryptoLib->symbol("OPENSSL_add_all_algorithms"); - if (x) { - ((void (*)())x)(); - } else { - x = _cryptoLib->symbol("OpenSSL_add_all_algorithms_conf"); - if (!x) - x = _cryptoLib->symbol("OPENSSL_add_all_algorithms_conf"); - if (x) { - ((void (*)())x)(); - } else { - x = _cryptoLib->symbol("OpenSSL_add_all_algorithms_noconf"); - if (!x) - x = _cryptoLib->symbol("OPENSSL_add_all_algorithms_noconf"); - if (x) - ((void (*)())x)(); - } - } - x = _cryptoLib->symbol("OpenSSL_add_all_ciphers"); - if (!x) - x = _cryptoLib->symbol("OPENSSL_add_all_ciphers"); - if (x) ((void (*)())x)(); - x = _cryptoLib->symbol("OpenSSL_add_all_digests"); - if (!x) - x = _cryptoLib->symbol("OPENSSL_add_all_digests"); - if (x) ((void (*)())x)(); - } - } - -} - - -KOpenSSLProxy* KOpenSSLProxy::_me = 0L; -static KStaticDeleter medProxy; - - - -KOpenSSLProxy::~KOpenSSLProxy() { - if (_sslLib) { - _sslLib->unload(); - } - if (_cryptoLib) { - _cryptoLib->unload(); - } - medProxy.setObject(0); -} - - -// FIXME: we should check "ok" and allow this to init the lib if !ok. - -KOpenSSLProxy *KOpenSSLProxy::self() { -#ifdef KSSL_HAVE_SSL - if (!_me) { - _me = medProxy.setObject(_me, new KOpenSSLProxy); - } -#endif - return _me; -} - - - - - - - -#ifdef KSSL_HAVE_SSL - - - -int KOpenSSLProxy::SSL_connect(SSL *ssl) { - if (K_SSL_connect) return (K_SSL_connect)(ssl); - return -1; -} - - -int KOpenSSLProxy::SSL_accept(SSL *ssl) { - if (K_SSL_accept) return (K_SSL_accept)(ssl); - return -1; -} - - -int KOpenSSLProxy::SSL_read(SSL *ssl, void *buf, int num) { - if (K_SSL_read) return (K_SSL_read)(ssl, buf, num); - return -1; -} - - -int KOpenSSLProxy::SSL_write(SSL *ssl, const void *buf, int num) { - if (K_SSL_write) return (K_SSL_write)(ssl, buf, num); - return -1; -} - - -SSL *KOpenSSLProxy::SSL_new(SSL_CTX *ctx) { - if (K_SSL_new) return (K_SSL_new)(ctx); - return 0L; -} - - -void KOpenSSLProxy::SSL_free(SSL *ssl) { - if (K_SSL_free) (K_SSL_free)(ssl); -} - - -int KOpenSSLProxy::SSL_shutdown(SSL *ssl) { - if (K_SSL_shutdown) return (K_SSL_shutdown)(ssl); - return -1; -} - - -SSL_CTX *KOpenSSLProxy::SSL_CTX_new(SSL_METHOD *method) { - if (K_SSL_CTX_new) return (K_SSL_CTX_new)(method); - return 0L; -} - - -void KOpenSSLProxy::SSL_CTX_free(SSL_CTX *ctx) { - if (K_SSL_CTX_free) (K_SSL_CTX_free)(ctx); -} - - -int KOpenSSLProxy::SSL_set_fd(SSL *ssl, int fd) { - if (K_SSL_set_fd) return (K_SSL_set_fd)(ssl, fd); - return -1; -} - - -int KOpenSSLProxy::SSL_pending(SSL *ssl) { - if (K_SSL_pending) return (K_SSL_pending)(ssl); - return -1; -} - - -int KOpenSSLProxy::SSL_CTX_set_cipher_list(SSL_CTX *ctx, const char *str) { - if (K_SSL_CTX_set_cipher_list) return (K_SSL_CTX_set_cipher_list)(ctx, str); - return -1; -} - - -void KOpenSSLProxy::SSL_CTX_set_verify(SSL_CTX *ctx, int mode, - int (*verify_callback)(int, X509_STORE_CTX *)) { - if (K_SSL_CTX_set_verify) (K_SSL_CTX_set_verify)(ctx, mode, verify_callback); -} - - -int KOpenSSLProxy::SSL_use_certificate(SSL *ssl, X509 *x) { - if (K_SSL_use_certificate) return (K_SSL_use_certificate)(ssl, x); - return -1; -} - - -SSL_CIPHER *KOpenSSLProxy::SSL_get_current_cipher(SSL *ssl) { - if (K_SSL_get_current_cipher) return (K_SSL_get_current_cipher)(ssl); - return 0L; -} - - -long KOpenSSLProxy::SSL_ctrl(SSL *ssl,int cmd, long larg, char *parg) { - if (K_SSL_ctrl) return (K_SSL_ctrl)(ssl, cmd, larg, parg); - return -1; -} - - -int KOpenSSLProxy::RAND_egd(const char *path) { - if (K_RAND_egd) return (K_RAND_egd)(path); - return -1; -} - - -SSL_METHOD *KOpenSSLProxy::TLSv1_client_method() { - if (K_TLSv1_client_method) return (K_TLSv1_client_method)(); - return 0L; -} - - -SSL_METHOD *KOpenSSLProxy::SSLv2_client_method() { - if (K_SSLv2_client_method) return (K_SSLv2_client_method)(); - return 0L; -} - - -SSL_METHOD *KOpenSSLProxy::SSLv3_client_method() { - if (K_SSLv3_client_method) return (K_SSLv3_client_method)(); - return 0L; -} - - -SSL_METHOD *KOpenSSLProxy::SSLv23_client_method() { - if (K_SSLv23_client_method) return (K_SSLv23_client_method)(); - return 0L; -} - - -X509 *KOpenSSLProxy::SSL_get_peer_certificate(SSL *s) { - if (K_SSL_get_peer_certificate) return (K_SSL_get_peer_certificate)(s); - return 0L; -} - - -int KOpenSSLProxy::SSL_CIPHER_get_bits(SSL_CIPHER *c,int *alg_bits) { - if (K_SSL_CIPHER_get_bits) return (K_SSL_CIPHER_get_bits)(c, alg_bits); - return -1; -} - - -char * KOpenSSLProxy::SSL_CIPHER_get_version(SSL_CIPHER *c) { - if (K_SSL_CIPHER_get_version) return (K_SSL_CIPHER_get_version)(c); - return 0L; -} - - -const char * KOpenSSLProxy::SSL_CIPHER_get_name(SSL_CIPHER *c) { - if (K_SSL_CIPHER_get_name) return (K_SSL_CIPHER_get_name)(c); - return 0L; -} - - -char * KOpenSSLProxy::SSL_CIPHER_description(SSL_CIPHER *c,char *buf,int size) { - if (K_SSL_CIPHER_description) return (K_SSL_CIPHER_description)(c,buf,size); - return 0L; -} - - -X509 * KOpenSSLProxy::d2i_X509(X509 **a,unsigned char **pp,long length) { - if (K_d2i_X509) return (K_d2i_X509)(a,pp,length); - return 0L; -} - - -int KOpenSSLProxy::i2d_X509(X509 *a,unsigned char **pp) { - if (K_i2d_X509) return (K_i2d_X509)(a,pp); - return -1; -} - - -int KOpenSSLProxy::X509_cmp(X509 *a, X509 *b) { - if (K_X509_cmp) return (K_X509_cmp)(a,b); - return 0; -} - - -X509_STORE *KOpenSSLProxy::X509_STORE_new(void) { - if (K_X509_STORE_new) return (K_X509_STORE_new)(); - return 0L; -} - - -void KOpenSSLProxy::X509_STORE_free(X509_STORE *v) { - if (K_X509_STORE_free) (K_X509_STORE_free)(v); -} - - -X509_STORE_CTX *KOpenSSLProxy::X509_STORE_CTX_new(void) { - if (K_X509_STORE_CTX_new) return (K_X509_STORE_CTX_new)(); - return 0L; -} - - -void KOpenSSLProxy::X509_STORE_CTX_free(X509_STORE_CTX *ctx) { - if (K_X509_STORE_CTX_free) (K_X509_STORE_CTX_free)(ctx); -} - - -int KOpenSSLProxy::X509_verify_cert(X509_STORE_CTX *ctx) { - if (K_X509_verify_cert) return (K_X509_verify_cert)(ctx); - return -1; -} - - -void KOpenSSLProxy::X509_free(X509 *a) { - if (K_X509_free) (K_X509_free)(a); -} - - -char *KOpenSSLProxy::X509_NAME_oneline(X509_NAME *a,char *buf,int size) { - if (K_X509_NAME_oneline) return (K_X509_NAME_oneline)(a,buf,size); - return 0L; -} - - -X509_NAME *KOpenSSLProxy::X509_get_subject_name(X509 *a) { - if (K_X509_get_subject_name) return (K_X509_get_subject_name)(a); - return 0L; -} - - -X509_NAME *KOpenSSLProxy::X509_get_issuer_name(X509 *a) { - if (K_X509_get_issuer_name) return (K_X509_get_issuer_name)(a); - return 0L; -} - - -X509_LOOKUP *KOpenSSLProxy::X509_STORE_add_lookup(X509_STORE *v, X509_LOOKUP_METHOD *m) { - if (K_X509_STORE_add_lookup) return (K_X509_STORE_add_lookup)(v,m); - return 0L; -} - - -X509_LOOKUP_METHOD *KOpenSSLProxy::X509_LOOKUP_file(void) { - if (K_X509_LOOKUP_file) return (K_X509_LOOKUP_file)(); - return 0L; -} - - -void KOpenSSLProxy::X509_LOOKUP_free(X509_LOOKUP *x) { - if (K_X509_LOOKUP_free) (K_X509_LOOKUP_free)(x); -} - - -int KOpenSSLProxy::X509_LOOKUP_ctrl(X509_LOOKUP *ctx, int cmd, const char *argc, long argl, char **ret) { - if (K_X509_LOOKUP_ctrl) return (K_X509_LOOKUP_ctrl)(ctx,cmd,argc,argl,ret); - return -1; -} - - -void KOpenSSLProxy::X509_STORE_CTX_init(X509_STORE_CTX *ctx, X509_STORE *store, X509 *x509, STACK_OF(X509) *chain) { - if (K_X509_STORE_CTX_init) (K_X509_STORE_CTX_init)(ctx,store,x509,chain); -} - - -void KOpenSSLProxy::CRYPTO_free(void *x) { - if (K_CRYPTO_free) (K_CRYPTO_free)(x); -} - - -X509 *KOpenSSLProxy::X509_dup(X509 *x509) { - if (K_X509_dup) return (K_X509_dup)(x509); - return 0L; -} - - -BIO *KOpenSSLProxy::BIO_new(BIO_METHOD *type) { - if (K_BIO_new) return (K_BIO_new)(type); - else return 0L; -} - - -BIO_METHOD *KOpenSSLProxy::BIO_s_mem(void) { - if (K_BIO_s_mem) return (K_BIO_s_mem)(); - else return 0L; -} - - -BIO *KOpenSSLProxy::BIO_new_fp(FILE *stream, int close_flag) { - if (K_BIO_new_fp) return (K_BIO_new_fp)(stream, close_flag); - return 0L; -} - - -BIO *KOpenSSLProxy::BIO_new_mem_buf(void *buf, int len) { - if (K_BIO_new_mem_buf) return (K_BIO_new_mem_buf)(buf,len); - else return 0L; -} - - -int KOpenSSLProxy::BIO_free(BIO *a) { - if (K_BIO_free) return (K_BIO_free)(a); - return -1; -} - - -long KOpenSSLProxy::BIO_ctrl(BIO *bp,int cmd,long larg,void *parg) { - if (K_BIO_ctrl) return (K_BIO_ctrl)(bp,cmd,larg,parg); - else return 0; // failure return for BIO_ctrl is quite individual, maybe we should abort() instead -} - - -int KOpenSSLProxy::BIO_write(BIO *b, const void *data, int len) { - if (K_BIO_write) return (K_BIO_write)(b, data, len); - else return -1; -} - - -int KOpenSSLProxy::PEM_write_bio_X509(BIO *bp, X509 *x) { - if (K_PEM_ASN1_write_bio) return (K_PEM_ASN1_write_bio) ((int (*)())K_i2d_X509, PEM_STRING_X509, bp, (char *)x, 0L, 0L, 0, 0L, 0L); - else return -1; -} - -#if OPENSSL_VERSION_NUMBER >= 0x10000000L -int KOpenSSLProxy::ASN1_i2d_fp(FILE *out,unsigned char *x) { - if (K_ASN1_item_i2d_fp && K_NETSCAPE_X509_it) - return (K_ASN1_item_i2d_fp)(K_NETSCAPE_X509_it, out, x); - else return -1; -} -#else -ASN1_METHOD *KOpenSSLProxy::X509_asn1_meth(void) { - if (K_X509_asn1_meth) return (K_X509_asn1_meth)(); - else return 0L; -} - - -int KOpenSSLProxy::ASN1_i2d_fp(FILE *out,unsigned char *x) { - if (K_ASN1_i2d_fp && K_i2d_ASN1_HEADER) - return (K_ASN1_i2d_fp)((int (*)())K_i2d_ASN1_HEADER, out, x); - else return -1; -} -#endif - -int KOpenSSLProxy::X509_print(FILE *fp, X509 *x) { - if (K_X509_print_fp) return (K_X509_print_fp)(fp, x); - return -1; -} - - -PKCS12 *KOpenSSLProxy::d2i_PKCS12_fp(FILE *fp, PKCS12 **p12) { - if (K_d2i_PKCS12_fp) return (K_d2i_PKCS12_fp)(fp, p12); - else return 0L; -} - - -int KOpenSSLProxy::PKCS12_newpass(PKCS12 *p12, char *oldpass, char *newpass) { - if (K_PKCS12_newpass) return (K_PKCS12_newpass)(p12, oldpass, newpass); - else return -1; -} - - -int KOpenSSLProxy::i2d_PKCS12(PKCS12 *p12, unsigned char **p) { - if (K_i2d_PKCS12) return (K_i2d_PKCS12)(p12, p); - else return -1; -} - - -int KOpenSSLProxy::i2d_PKCS12_fp(FILE *fp, PKCS12 *p12) { - if (K_i2d_PKCS12_fp) return (K_i2d_PKCS12_fp)(fp, p12); - else return -1; -} - - -PKCS12 *KOpenSSLProxy::PKCS12_new(void) { - if (K_PKCS12_new) return (K_PKCS12_new)(); - else return 0L; -} - - -void KOpenSSLProxy::PKCS12_free(PKCS12 *a) { - if (K_PKCS12_free) (K_PKCS12_free)(a); -} - - -int KOpenSSLProxy::PKCS12_parse(PKCS12 *p12, const char *pass, EVP_PKEY **pkey, - X509 **cert, STACK_OF(X509) **ca) { - if (K_PKCS12_parse) return (K_PKCS12_parse) (p12, pass, pkey, cert, ca); - else return -1; -} - - -void KOpenSSLProxy::EVP_PKEY_free(EVP_PKEY *x) { - if (K_EVP_PKEY_free) (K_EVP_PKEY_free)(x); -} - - -EVP_PKEY* KOpenSSLProxy::EVP_PKEY_new() { - if (K_EVP_PKEY_new) return (K_EVP_PKEY_new)(); - else return 0L; -} - - -void KOpenSSLProxy::X509_REQ_free(X509_REQ *x) { - if (K_X509_REQ_free) (K_X509_REQ_free)(x); -} - - -X509_REQ* KOpenSSLProxy::X509_REQ_new() { - if (K_X509_REQ_new) return (K_X509_REQ_new)(); - else return 0L; -} - - -int KOpenSSLProxy::SSL_CTX_use_PrivateKey(SSL_CTX *ctx, EVP_PKEY *pkey) { - if (K_SSL_CTX_use_PrivateKey) return (K_SSL_CTX_use_PrivateKey)(ctx,pkey); - else return -1; -} - - -int KOpenSSLProxy::SSL_CTX_use_certificate(SSL_CTX *ctx, X509 *x) { - if (K_SSL_CTX_use_certificate) return (K_SSL_CTX_use_certificate)(ctx,x); - else return -1; -} - - -int KOpenSSLProxy::SSL_get_error(SSL *ssl, int rc) { - if (K_SSL_get_error) return (K_SSL_get_error)(ssl,rc); - else return -1; -} - - -STACK_OF(X509) *KOpenSSLProxy::SSL_get_peer_cert_chain(SSL *s) { - if (K_SSL_get_peer_cert_chain) return (K_SSL_get_peer_cert_chain)(s); - else return 0L; -} - - -void KOpenSSLProxy::sk_free(STACK *s) { - if (K_sk_free) (K_sk_free)(s); -} - - -int KOpenSSLProxy::sk_num(STACK *s) { - if (K_sk_num) return (K_sk_num)(s); - else return -1; -} - - -char *KOpenSSLProxy::sk_pop(STACK *s) { - if (K_sk_pop) return (K_sk_pop)(s); - else return 0L; -} - - -char *KOpenSSLProxy::sk_value(STACK *s, int n) { - if (K_sk_value) return (K_sk_value)(s, n); - else return 0L; -} - - -void KOpenSSLProxy::X509_STORE_CTX_set_chain(X509_STORE_CTX *v, STACK_OF(X509)* x) { - if (K_X509_STORE_CTX_set_chain) (K_X509_STORE_CTX_set_chain)(v,x); -} - -void KOpenSSLProxy::X509_STORE_CTX_set_purpose(X509_STORE_CTX *v, int purpose) { - if (K_X509_STORE_CTX_set_purpose) (K_X509_STORE_CTX_set_purpose)(v,purpose); -} - - -STACK* KOpenSSLProxy::sk_dup(STACK *s) { - if (K_sk_dup) return (K_sk_dup)(s); - else return 0L; -} - - -STACK* KOpenSSLProxy::sk_new(int (*cmp)()) { - if (K_sk_new) return (K_sk_new)(cmp); - else return 0L; -} - - -int KOpenSSLProxy::sk_push(STACK* s, char* d) { - if (K_sk_push) return (K_sk_push)(s,d); - else return -1; -} - - -char *KOpenSSLProxy::i2s_ASN1_INTEGER(X509V3_EXT_METHOD *meth, ASN1_INTEGER *aint) { - if (K_i2s_ASN1_INTEGER) return (K_i2s_ASN1_INTEGER)(meth, aint); - else return 0L; -} - - -ASN1_INTEGER *KOpenSSLProxy::X509_get_serialNumber(X509 *x) { - if (K_X509_get_serialNumber) return (K_X509_get_serialNumber)(x); - else return 0L; -} - - -EVP_PKEY *KOpenSSLProxy::X509_get_pubkey(X509 *x) { - if (K_X509_get_pubkey) return (K_X509_get_pubkey)(x); - else return 0L; -} - - -int KOpenSSLProxy::i2d_PublicKey(EVP_PKEY *a, unsigned char **pp) { - if (K_i2d_PublicKey) return (K_i2d_PublicKey)(a,pp); - else return 0; -} - - -int KOpenSSLProxy::X509_check_private_key(X509 *x, EVP_PKEY *p) { - if (K_X509_check_private_key) return (K_X509_check_private_key)(x,p); - return -1; -} - - -char *KOpenSSLProxy::BN_bn2hex(const BIGNUM *a) { - if (K_BN_bn2hex) return (K_BN_bn2hex)(a); - else return 0L; -} - - -int KOpenSSLProxy::X509_digest(const X509 *x,const EVP_MD *t, unsigned char *md, unsigned int *len) { - if (K_X509_digest) return (K_X509_digest)(x, t, md, len); - else return -1; -} - - -EVP_MD *KOpenSSLProxy::EVP_md5() { - if (K_EVP_md5) return (K_EVP_md5)(); - return 0L; -} - - -void KOpenSSLProxy::ASN1_INTEGER_free(ASN1_INTEGER *a) { - if (K_ASN1_INTEGER_free) (K_ASN1_INTEGER_free)(a); -} - - -int KOpenSSLProxy::OBJ_obj2nid(ASN1_OBJECT *o) { - if (K_OBJ_obj2nid) return (K_OBJ_obj2nid)(o); - else return -1; -} - - -const char * KOpenSSLProxy::OBJ_nid2ln(int n) { - if (K_OBJ_nid2ln) return (K_OBJ_nid2ln)(n); - else return 0L; -} - - -int KOpenSSLProxy::X509_get_ext_count(X509 *x) { - if (K_X509_get_ext_count) return (K_X509_get_ext_count)(x); - else return -1; -} - - -int KOpenSSLProxy::X509_get_ext_by_NID(X509 *x, int nid, int lastpos) { - if (K_X509_get_ext_by_NID) return (K_X509_get_ext_by_NID)(x,nid,lastpos); - else return -1; -} - - -int KOpenSSLProxy::X509_get_ext_by_OBJ(X509 *x,ASN1_OBJECT *obj,int lastpos) { - if (K_X509_get_ext_by_OBJ) return (K_X509_get_ext_by_OBJ)(x,obj,lastpos); - else return -1; -} - - -X509_EXTENSION *KOpenSSLProxy::X509_get_ext(X509 *x, int loc) { - if (K_X509_get_ext) return (K_X509_get_ext)(x,loc); - else return 0L; -} - - -X509_EXTENSION *KOpenSSLProxy::X509_delete_ext(X509 *x, int loc) { - if (K_X509_delete_ext) return (K_X509_delete_ext)(x,loc); - else return 0L; -} - - -int KOpenSSLProxy::X509_add_ext(X509 *x, X509_EXTENSION *ex, int loc) { - if (K_X509_add_ext) return (K_X509_add_ext)(x,ex,loc); - else return -1; -} - - -void *KOpenSSLProxy::X509_get_ext_d2i(X509 *x, int nid, int *crit, int *idx) { - if (K_X509_get_ext_d2i) return (K_X509_get_ext_d2i)(x,nid,crit,idx); - else return 0L; -} - - -char *KOpenSSLProxy::i2s_ASN1_OCTET_STRING(X509V3_EXT_METHOD *method, ASN1_OCTET_STRING *ia5) { - if (K_i2s_ASN1_OCTET_STRING) return (K_i2s_ASN1_OCTET_STRING)(method,ia5); - else return 0L; -} - - -int KOpenSSLProxy::ASN1_BIT_STRING_get_bit(ASN1_BIT_STRING *a, int n) { - if (K_ASN1_BIT_STRING_get_bit) return (K_ASN1_BIT_STRING_get_bit)(a,n); - else return -1; -} - - -PKCS7 *KOpenSSLProxy::PKCS7_new(void) { - if (K_PKCS7_new) return (K_PKCS7_new)(); - else return 0L; -} - - -void KOpenSSLProxy::PKCS7_free(PKCS7 *a) { - if (K_PKCS7_free) (K_PKCS7_free)(a); -} - - -void KOpenSSLProxy::PKCS7_content_free(PKCS7 *a) { - if (K_PKCS7_content_free) (K_PKCS7_content_free)(a); -} - - -int KOpenSSLProxy::i2d_PKCS7(PKCS7 *a, unsigned char **pp) { - if (K_i2d_PKCS7) return (K_i2d_PKCS7)(a,pp); - else return -1; -} - - -PKCS7 *KOpenSSLProxy::d2i_PKCS7(PKCS7 **a, unsigned char **pp,long length) { - if (K_d2i_PKCS7) return (K_d2i_PKCS7)(a,pp,length); - else return 0L; -} - - -int KOpenSSLProxy::i2d_PKCS7_fp(FILE *fp,PKCS7 *p7) { - if (K_i2d_PKCS7_fp) return (K_i2d_PKCS7_fp)(fp,p7); - else return -1; -} - - -PKCS7 *KOpenSSLProxy::d2i_PKCS7_fp(FILE *fp,PKCS7 **p7) { - if (K_d2i_PKCS7_fp) return (K_d2i_PKCS7_fp)(fp,p7); - else return 0L; -} - - -int KOpenSSLProxy::i2d_PKCS7_bio(BIO *bp,PKCS7 *p7) { - if (K_i2d_PKCS7_bio) return (K_i2d_PKCS7_bio)(bp, p7); - else return -1; -} - - -PKCS7 *KOpenSSLProxy::d2i_PKCS7_bio(BIO *bp,PKCS7 **p7) { - if (K_d2i_PKCS7_bio) return (K_d2i_PKCS7_bio)(bp, p7); - else return 0L; -} - - -PKCS7 *KOpenSSLProxy::PKCS7_dup(PKCS7 *p7) { - if (K_PKCS7_dup) return (K_PKCS7_dup)(p7); - else return 0L; -} - - -PKCS7 *KOpenSSLProxy::PKCS7_sign(X509 *signcert, EVP_PKEY *pkey, STACK_OF(X509) *certs, - BIO *data, int flags) { - if (K_PKCS7_sign) return (K_PKCS7_sign)(signcert,pkey,certs,data,flags); - else return 0L; -} - - -int KOpenSSLProxy::PKCS7_verify(PKCS7* p, STACK_OF(X509)* st, X509_STORE* s, BIO* in, BIO *out, int flags) { - if (K_PKCS7_verify) return (K_PKCS7_verify)(p,st,s,in,out,flags); - else return 0; -} - - -STACK_OF(X509) *KOpenSSLProxy::PKCS7_get0_signers(PKCS7 *p7, STACK_OF(X509) *certs, int flags) { - if (K_PKCS7_get0_signers) return (K_PKCS7_get0_signers)(p7,certs,flags); - else return 0L; -} - - -PKCS7 *KOpenSSLProxy::PKCS7_encrypt(STACK_OF(X509) *certs, BIO *in, EVP_CIPHER *cipher, - int flags) { - if (K_PKCS7_encrypt) return (K_PKCS7_encrypt)(certs,in,cipher,flags); - else return 0L; -} - - -int KOpenSSLProxy::PKCS7_decrypt(PKCS7 *p7, EVP_PKEY *pkey, X509 *cert, BIO *data, int flags) { - if (K_PKCS7_decrypt) return (K_PKCS7_decrypt)(p7,pkey,cert,data,flags); - else return 0; -} - - -STACK_OF(X509_NAME) *KOpenSSLProxy::SSL_load_client_CA_file(const char *file) { - if (K_SSL_load_client_CA_file) return (K_SSL_load_client_CA_file)(file); - else return 0L; -} - - -STACK_OF(X509_INFO) *KOpenSSLProxy::PEM_X509_INFO_read(FILE *fp, STACK_OF(X509_INFO) *sk, pem_password_cb *cb, void *u) { - if (K_PEM_X509_INFO_read) return (K_PEM_X509_INFO_read)(fp,sk,cb,u); - else return 0L; -} - - -X509 *KOpenSSLProxy::X509_d2i_fp(FILE *out, X509** buf) { - if (K_ASN1_d2i_fp) return reinterpret_cast((K_ASN1_d2i_fp)(reinterpret_cast(K_X509_new), reinterpret_cast(K_d2i_X509), out, reinterpret_cast(buf))); - else return 0L; -} - - -int KOpenSSLProxy::SSL_peek(SSL *ssl,void *buf,int num) { - if (K_SSL_peek) return (K_SSL_peek)(ssl,buf,num); - else return -1; -} - - -const char *KOpenSSLProxy::RAND_file_name(char *buf, size_t num) { - if (K_RAND_file_name) return (K_RAND_file_name)(buf, num); - else return 0L; -} - - -int KOpenSSLProxy::RAND_load_file(const char *filename, long max_bytes) { - if (K_RAND_load_file) return (K_RAND_load_file)(filename, max_bytes); - else return -1; -} - - -int KOpenSSLProxy::RAND_write_file(const char *filename) { - if (K_RAND_write_file) return (K_RAND_write_file)(filename); - else return -1; -} - - -int KOpenSSLProxy::X509_PURPOSE_get_count() { - if (K_X509_PURPOSE_get_count) return (K_X509_PURPOSE_get_count)(); - else return -1; -} - - -int KOpenSSLProxy::X509_PURPOSE_get_id(X509_PURPOSE *p) { - if (K_X509_PURPOSE_get_id) return (K_X509_PURPOSE_get_id)(p); - else return -1; -} - - -int KOpenSSLProxy::X509_check_purpose(X509 *x, int id, int ca) { - if (K_X509_check_purpose) return (K_X509_check_purpose)(x, id, ca); - else return -1; -} - - -X509_PURPOSE *KOpenSSLProxy::X509_PURPOSE_get0(int idx) { - if (K_X509_PURPOSE_get0) return (K_X509_PURPOSE_get0)(idx); - else return 0L; -} - - -int KOpenSSLProxy::EVP_PKEY_assign(EVP_PKEY *pkey, int type, char *key) { - if (K_EVP_PKEY_assign) return (K_EVP_PKEY_assign)(pkey, type, key); - else return -1; -} - - -int KOpenSSLProxy::X509_REQ_set_pubkey(X509_REQ *x, EVP_PKEY *pkey) { - if (K_X509_REQ_set_pubkey) return (K_X509_REQ_set_pubkey)(x, pkey); - else return -1; -} - - -RSA* KOpenSSLProxy::RSA_generate_key(int bits, unsigned long e, void - (*callback)(int,int,void *), void *cb_arg) { - if (K_RSA_generate_key) return (K_RSA_generate_key)(bits, e, callback, cb_arg); - else return 0L; -} - -STACK *KOpenSSLProxy::X509_get1_email(X509 *x) { - if (K_X509_get1_email) return (K_X509_get1_email)(x); - else return 0L; -} - -void KOpenSSLProxy::X509_email_free(STACK *sk) { - if (K_X509_email_free) (K_X509_email_free)(sk); -} - -EVP_CIPHER *KOpenSSLProxy::EVP_des_ede3_cbc() { - if (K_EVP_des_ede3_cbc) return (K_EVP_des_ede3_cbc)(); - else return 0L; -} - -EVP_CIPHER *KOpenSSLProxy::EVP_des_cbc() { - if (K_EVP_des_cbc) return (K_EVP_des_cbc)(); - else return 0L; -} - -EVP_CIPHER *KOpenSSLProxy::EVP_rc2_cbc() { - if (K_EVP_rc2_cbc) return (K_EVP_rc2_cbc)(); - else return 0L; -} - -EVP_CIPHER *KOpenSSLProxy::EVP_rc2_64_cbc() { - if (K_EVP_rc2_64_cbc) return (K_EVP_rc2_64_cbc)(); - else return 0L; -} - -EVP_CIPHER *KOpenSSLProxy::EVP_rc2_40_cbc() { - if (K_EVP_rc2_40_cbc) return (K_EVP_rc2_40_cbc)(); - else return 0L; -} - -int KOpenSSLProxy::i2d_X509_REQ_fp(FILE *fp, X509_REQ *x) { - if (K_i2d_X509_REQ_fp) return (K_i2d_X509_REQ_fp)(fp,x); - else return -1; -} - - -void KOpenSSLProxy::ERR_clear_error() { - if (K_ERR_clear_error) (K_ERR_clear_error)(); -} - - -unsigned long KOpenSSLProxy::ERR_get_error() { - if (K_ERR_get_error) return (K_ERR_get_error)(); - else return 0xffffffff; -} - - -void KOpenSSLProxy::ERR_print_errors_fp(FILE* fp) { - if (K_ERR_print_errors_fp) (K_ERR_print_errors_fp)(fp); -} - - -SSL_SESSION *KOpenSSLProxy::SSL_get1_session(SSL *ssl) { - if (K_SSL_get1_session) return (K_SSL_get1_session)(ssl); - else return 0L; -} - - -void KOpenSSLProxy::SSL_SESSION_free(SSL_SESSION *session) { - if (K_SSL_SESSION_free) (K_SSL_SESSION_free)(session); -} - - -int KOpenSSLProxy::SSL_set_session(SSL *ssl, SSL_SESSION *session) { - if (K_SSL_set_session) return (K_SSL_set_session)(ssl, session); - else return -1; -} - - -SSL_SESSION *KOpenSSLProxy::d2i_SSL_SESSION(SSL_SESSION **a, unsigned char **pp, long length) { - if (K_d2i_SSL_SESSION) return (K_d2i_SSL_SESSION)(a, pp, length); - else return 0L; -} - - -int KOpenSSLProxy::i2d_SSL_SESSION(SSL_SESSION *in, unsigned char **pp) { - if (K_i2d_SSL_SESSION) return (K_i2d_SSL_SESSION)(in, pp); - else return -1; -} - - -int KOpenSSLProxy::i2d_PrivateKey_fp(FILE *fp, EVP_PKEY *p) { - if (K_i2d_PrivateKey_fp) return (K_i2d_PrivateKey_fp)(fp, p); - else return -1; -} - - -int KOpenSSLProxy::i2d_PKCS8PrivateKey_fp(FILE *fp, EVP_PKEY *p, const EVP_CIPHER *c, char *k, int klen, pem_password_cb *cb, void *u) { - if (K_i2d_PKCS8PrivateKey_fp) return (K_i2d_PKCS8PrivateKey_fp)(fp, p, c, k, klen, cb, u); - else return -1; -} - - -void KOpenSSLProxy::RSA_free(RSA *rsa) { - if (K_RSA_free) (K_RSA_free)(rsa); -} - - -EVP_CIPHER *KOpenSSLProxy::EVP_bf_cbc() { - if (K_EVP_bf_cbc) return (K_EVP_bf_cbc)(); - return 0L; -} - - -int KOpenSSLProxy::X509_REQ_sign(X509_REQ *x, EVP_PKEY *pkey, const EVP_MD *md) { - if (K_X509_REQ_sign) return (K_X509_REQ_sign)(x, pkey, md); - return -1; -} - - -int KOpenSSLProxy::X509_NAME_add_entry_by_txt(X509_NAME *name, char *field, - int type, unsigned char *bytes, int len, int loc, int set) { - if (K_X509_NAME_add_entry_by_txt) return (K_X509_NAME_add_entry_by_txt)(name, field, type, bytes, len, loc, set); - return -1; -} - - -X509_NAME *KOpenSSLProxy::X509_NAME_new() { - if (K_X509_NAME_new) return (K_X509_NAME_new)(); - return 0L; -} - - -int KOpenSSLProxy::X509_REQ_set_subject_name(X509_REQ *req,X509_NAME *name) { - if (K_X509_REQ_set_subject_name) return (K_X509_REQ_set_subject_name)(req, name); - return -1; -} - - -unsigned char *KOpenSSLProxy::ASN1_STRING_data(ASN1_STRING *x) { - if (K_ASN1_STRING_data) return (K_ASN1_STRING_data)(x); - return 0L; -} - -int KOpenSSLProxy::ASN1_STRING_length(ASN1_STRING *x) { - if (K_ASN1_STRING_length) return (K_ASN1_STRING_length)(x); - return 0L; -} - -STACK_OF(SSL_CIPHER) *KOpenSSLProxy::SSL_get_ciphers(const SSL* ssl) { - if (K_SSL_get_ciphers) return (K_SSL_get_ciphers)(ssl); - return 0L; -} - -#endif - diff --git a/kio/kssl/kopenssl.h b/kio/kssl/kopenssl.h deleted file mode 100644 index 59cf7b560..000000000 --- a/kio/kssl/kopenssl.h +++ /dev/null @@ -1,920 +0,0 @@ -/* This file is part of the KDE libraries - Copyright (C) 2001-2003 George Staikos - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License version 2 as published by the Free Software Foundation. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - - -// IF YOU ARE USING THIS CLASS, YOU ARE MAKING A MISTAKE. - -#ifndef __KOPENSSLPROXY_H -#define __KOPENSSLPROXY_H - -#define KOSSL KOpenSSLProxy -class KOpenSSLProxyPrivate; - -#include - -#ifdef Q_WS_WIN -#include "ksslconfig_win.h" -#else -#include "ksslconfig.h" -#endif - -#ifdef KSSL_HAVE_SSL -#define crypt _openssl_crypt -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#undef crypt -#if OPENSSL_VERSION_NUMBER >= 0x10000000L -#define STACK _STACK -#endif -#endif - -#include - -/** - * Dynamically load and wrap OpenSSL. - * - * @author George Staikos - * @see KSSL - * @short KDE OpenSSL Wrapper - * @internal - */ -class TDEIO_EXPORT KOpenSSLProxy { -friend class KStaticDeleter; -public: - - /** - * Return an instance of class KOpenSSLProxy * - * You cannot delete this object. It is a singleton class. - */ - static KOpenSSLProxy *self(); - - /** - * Return true of libcrypto was found and loaded - */ - bool hasLibCrypto() const; - - /** - * Return true of libssl was found and loaded - */ - bool hasLibSSL() const; - - /** - * Destroy the class and start over - don't use this unless you know - * what you are doing. - */ - void destroy(); - - // Here are the symbols that we need. -#ifdef KSSL_HAVE_SSL - - /* - * SSL_connect - initiate the TLS/SSL handshake with an TLS/SSL server - */ - int SSL_connect(SSL *ssl); - - /* - * SSL_accept - initiate the TLS/SSL handshake with an TLS/SSL server - */ - int SSL_accept(SSL *ssl); - - /* - * SSL_get_error - get the error code - */ - int SSL_get_error(SSL *ssl, int rc); - - /* - * SSL_read - read bytes from a TLS/SSL connection. - */ - int SSL_read(SSL *ssl, void *buf, int num); - - /* - * SSL_write - write bytes to a TLS/SSL connection. - */ - int SSL_write(SSL *ssl, const void *buf, int num); - - /* - * SSL_new - create a new SSL structure for a connection - */ - SSL *SSL_new(SSL_CTX *ctx); - - /* - * SSL_free - free an allocated SSL structure - */ - void SSL_free(SSL *ssl); - - /* - * SSL_shutdown - shutdown an allocated SSL connection - */ - int SSL_shutdown(SSL *ssl); - - /* - * SSL_CTX_new - create a new SSL_CTX object as framework for TLS/SSL enabled functions - */ - SSL_CTX *SSL_CTX_new(SSL_METHOD *method); - - /* - * SSL_CTX_free - free an allocated SSL_CTX object - */ - void SSL_CTX_free(SSL_CTX *ctx); - - /* - * SSL_set_fd - connect the SSL object with a file descriptor - */ - int SSL_set_fd(SSL *ssl, int fd); - - /* - * SSL_pending - obtain number of readable bytes buffered in an SSL object - */ - int SSL_pending(SSL *ssl); - - /* - * SSL_peek - obtain bytes buffered in an SSL object - */ - int SSL_peek(SSL *ssl, void *buf, int num); - - /* - * SSL_CTX_set_cipher_list - choose list of available SSL_CIPHERs - */ - int SSL_CTX_set_cipher_list(SSL_CTX *ctx, const char *str); - - /* - * SSL_CTX_set_verify - set peer certificate verification parameters - */ - void SSL_CTX_set_verify(SSL_CTX *ctx, int mode, - int (*verify_callback)(int, X509_STORE_CTX *)); - - /* - * SSL_use_certificate - load certificate - */ - int SSL_use_certificate(SSL *ssl, X509 *x); - - /* - * SSL_get_current_cipher - get SSL_CIPHER of a connection - */ - SSL_CIPHER *SSL_get_current_cipher(SSL *ssl); - - /* - * SSL_set_options - manipulate SSL engine options - * Note: These are all mapped to SSL_ctrl so call them as the comment - * specifies but know that they use SSL_ctrl. They are #define - * so they will map to the one in this class if called as a - * member function of this class. - */ - /* long SSL_set_options(SSL *ssl, long options); */ - /* Returns 0 if not reused, 1 if session id is reused */ - /* int SSL_session_reused(SSL *ssl); */ - long SSL_ctrl(SSL *ssl,int cmd, long larg, char *parg); - - /* - * RAND_egd - set the path to the EGD - */ - int RAND_egd(const char *path); - - - /* - * RAND_file_name - */ - const char *RAND_file_name(char *buf, size_t num); - - - /* - * RAND_load_file - */ - int RAND_load_file(const char *filename, long max_bytes); - - - /* - * RAND_write_file - */ - int RAND_write_file(const char *filename); - - - /* - * TLSv1_client_method - return a TLSv1 client method object - */ - SSL_METHOD *TLSv1_client_method(); - - - /* - * SSLv2_client_method - return a SSLv2 client method object - */ - SSL_METHOD *SSLv2_client_method(); - - - /* - * SSLv3_client_method - return a SSLv3 client method object - */ - SSL_METHOD *SSLv3_client_method(); - - - /* - * SSLv23_client_method - return a SSLv23 client method object - */ - SSL_METHOD *SSLv23_client_method(); - - - /* - * SSL_get_peer_certificate - return the peer's certificate - */ - X509 *SSL_get_peer_certificate(SSL *s); - - - /* - * SSL_get_peer_cert_chain - get the peer's certificate chain - */ - STACK_OF(X509) *SSL_get_peer_cert_chain(SSL *s); - - /* - * SSL_CIPHER_get_bits - get the number of bits in this cipher - */ - int SSL_CIPHER_get_bits(SSL_CIPHER *c,int *alg_bits); - - - /* - * SSL_CIPHER_get_version - get the version of this cipher - */ - char *SSL_CIPHER_get_version(SSL_CIPHER *c); - - - /* - * SSL_CIPHER_get_name - get the name of this cipher - */ - const char *SSL_CIPHER_get_name(SSL_CIPHER *c); - - - /* - * SSL_CIPHER_description - get the description of this cipher - */ - char *SSL_CIPHER_description(SSL_CIPHER *,char *buf,int size); - - - /* - * SSL_CTX_use_PrivateKey - set the private key for the session. - * - for use with client certificates - */ - int SSL_CTX_use_PrivateKey(SSL_CTX *ctx, EVP_PKEY *pkey); - - - /* - * SSL_CTX_use_certificate - set the client certificate for the session. - */ - int SSL_CTX_use_certificate(SSL_CTX *ctx, X509 *x); - - - /* - * d2i_X509 - Covert a text representation of X509 to an X509 object - */ - X509 * d2i_X509(X509 **a,unsigned char **pp,long length); - - - /* - * i2d_X509 - Covert an X509 object into a text representation - */ - int i2d_X509(X509 *a,unsigned char **pp); - - - /* - * X509_cmp - compare two X509 objects - */ - int X509_cmp(X509 *a, X509 *b); - - - /* - * X509_dup - duplicate an X509 object - */ - X509 *X509_dup(X509 *x509); - - - /* - * X509_STORE_CTX_new - create an X509 store context - */ - X509_STORE_CTX *X509_STORE_CTX_new(void); - - - /* - * X509_STORE_CTX_free - free up an X509 store context - */ - void X509_STORE_CTX_free(X509_STORE_CTX *v); - - - /* - * X509_STORE_CTX_set_chain - set the certificate chain - */ - void X509_STORE_CTX_set_chain(X509_STORE_CTX *v, STACK_OF(X509)* x); - - /* - * X509_STORE_CTX_set_purpose - set the purpose of the certificate - */ - void X509_STORE_CTX_set_purpose(X509_STORE_CTX *v, int purpose); - - /* - * X509_verify_cert - verify the certificate - */ - int X509_verify_cert(X509_STORE_CTX *v); - - - /* - * X509_STORE_new - create an X509 store - */ - X509_STORE *X509_STORE_new(void); - - - /* - * X509_STORE_free - free up an X509 store - */ - void X509_STORE_free(X509_STORE *v); - - - /* - * X509_free - free up an X509 - */ - void X509_free(X509 *v); - - - /* - * X509_NAME_oneline - return the X509 data in a string - */ - char *X509_NAME_oneline(X509_NAME *a, char *buf, int size); - - - /* - * X509_get_subject_name - return the X509_NAME for the subject field - */ - X509_NAME *X509_get_subject_name(X509 *a); - - - /* - * X509_get_issuer_name - return the X509_NAME for the issuer field - */ - X509_NAME *X509_get_issuer_name(X509 *a); - - - /* - * X509_STORE_add_lookup - add a lookup file/method to an X509 store - */ - X509_LOOKUP *X509_STORE_add_lookup(X509_STORE *v, X509_LOOKUP_METHOD *m); - - - /* - * X509_LOOKUP_file - Definition of the LOOKUP_file method - */ - X509_LOOKUP_METHOD *X509_LOOKUP_file(void); - - - /* - * X509_LOOKUP_free - Free an X509_LOOKUP - */ - void X509_LOOKUP_free(X509_LOOKUP *x); - - - /* - * X509_LOOKUP_ctrl - This is not normally called directly (use macros) - */ - int X509_LOOKUP_ctrl(X509_LOOKUP *ctx, int cmd, const char *argc, long argl, char **ret); - - - /* - * X509_STORE_CTX_init - initialize an X509 STORE context - */ - void X509_STORE_CTX_init(X509_STORE_CTX *ctx, X509_STORE *store, X509 *x509, STACK_OF(X509) *chain); - - - /* - * CRYPTO_free - free up an internally allocated object - */ - void CRYPTO_free(void *x); - - /* - * BIO_new - create new BIO - */ - BIO *BIO_new(BIO_METHOD *type); - - /* - * BIO methods - only one defined here yet - */ - BIO_METHOD *BIO_s_mem(void); - - /* - * BIO_new_fp - nastiness called BIO - used to create BIO* from FILE* - */ - BIO *BIO_new_fp(FILE *stream, int close_flag); - - /* - * BIO_new_mem_buf - read only BIO from memory region - */ - BIO *BIO_new_mem_buf(void *buf, int len); - - /* - * BIO_free - nastiness called BIO - used to destroy BIO* - */ - int BIO_free(BIO *a); - - /* - * BIO_ctrl - BIO control method - */ - long BIO_ctrl(BIO *bp,int cmd,long larg,void *parg); - - /* - * BIO_write - equivalent to ::write for BIO - */ - int BIO_write(BIO *b, const void *data, int len); - - /* - * PEM_write_bio_X509 - write a PEM encoded cert to a BIO* - */ - int PEM_write_bio_X509(BIO *bp, X509 *x); - -#if OPENSSL_VERSION_NUMBER < 0x10000000L - /* - * X509_asn1_meth - used for netscape output - */ - ASN1_METHOD *X509_asn1_meth(); -#endif - - /* - * ASN1_i2d_fp - used for netscape output - */ - int ASN1_i2d_fp(FILE *out, unsigned char *x); - - - /* - * ASN1_d2i_fp - read an X509 from a DER encoded file (buf can be NULL) - */ - X509 *X509_d2i_fp(FILE *out, X509** buf); - - - /* - * X509_print - print the text form of an X509 - */ - int X509_print(FILE *fp, X509 *x); - - - /* - * Read a PKCS#12 cert from fp - */ - PKCS12 *d2i_PKCS12_fp(FILE *fp, PKCS12 **p12); - - - /* - * Change the password on a PKCS#12 cert - */ - int PKCS12_newpass(PKCS12 *p12, char *oldpass, char *newpass); - - - /* - * Write a PKCS#12 to mem - */ - int i2d_PKCS12(PKCS12 *p12, unsigned char **p); - - - /* - * Write a PKCS#12 to FILE* - */ - int i2d_PKCS12_fp(FILE *fp, PKCS12 *p12); - - - /* - * Create a new PKCS#12 object - */ - PKCS12 *PKCS12_new(void); - - - /* - * Destroy that PKCS#12 that you created! - */ - void PKCS12_free(PKCS12 *a); - - - /* - * Parse the PKCS#12 - */ - int PKCS12_parse(PKCS12 *p12, const char *pass, EVP_PKEY **pkey, - X509 **cert, STACK_OF(X509) **ca); - - - /* - * Free the Private Key - */ - void EVP_PKEY_free(EVP_PKEY *x); - - - /* - * Pop off the stack - */ - char *sk_pop(STACK *s); - - - /* - * Free the stack - */ - void sk_free(STACK *s); - -#if OPENSSL_VERSION_NUMBER >= 0x10000000L - void sk_free(void *s) { return sk_free(reinterpret_cast(s)); } -#endif - - /* - * Number of elements in the stack - */ - int sk_num(STACK *s); - - - /* - * Value of element n in the stack - */ - char *sk_value(STACK *s, int n); - -#if OPENSSL_VERSION_NUMBER >= 0x10000000L - char *sk_value(void *s, int n) { return sk_value(reinterpret_cast(s), n); } -#endif - - /* - * Create a new stack - */ - STACK *sk_new(int (*cmp)()); - - - /* - * Add an element to the stack - */ - int sk_push(STACK *s, char *d); - -#if OPENSSL_VERSION_NUMBER >= 0x10000000L - int sk_push(void *s, void *d) { return sk_push(reinterpret_cast(s), reinterpret_cast(d)); } -#endif - - /* - * Duplicate the stack - */ - STACK *sk_dup(STACK *s); - - - /* - * Convert an ASN1_INTEGER to it's text form - */ - char *i2s_ASN1_INTEGER(X509V3_EXT_METHOD *meth, ASN1_INTEGER *aint); - - - /* - * Get the certificate's serial number - */ - ASN1_INTEGER *X509_get_serialNumber(X509 *x); - - - /* - * Get the certificate's public key - */ - EVP_PKEY *X509_get_pubkey(X509 *x); - - - /* - * Convert the public key to a decimal form - */ - int i2d_PublicKey(EVP_PKEY *a, unsigned char **pp); - - - /* - * Check the private key of a PKCS bundle against the X509 - */ - int X509_check_private_key(X509 *x, EVP_PKEY *p); - - - /* - * Convert a BIGNUM to a hex string - */ - char *BN_bn2hex(const BIGNUM *a); - - - /* - * Compute the digest of an X.509 - */ - int X509_digest(const X509 *x,const EVP_MD *t, unsigned char *md, unsigned int *len); - - - /* - * EVP_md5 - */ - EVP_MD *EVP_md5(); - - - /* - * ASN1_INTEGER free - */ - void ASN1_INTEGER_free(ASN1_INTEGER *x); - - - /* - * ASN1_STRING_data - */ - unsigned char *ASN1_STRING_data(ASN1_STRING *x); - - /* - * ASN1_STRING_length - */ - int ASN1_STRING_length(ASN1_STRING *x); - - /* - * - */ - int OBJ_obj2nid(ASN1_OBJECT *o); - - /* - * - */ - const char * OBJ_nid2ln(int n); - - /* - * get the number of extensions - */ - int X509_get_ext_count(X509 *x); - - /* - * - */ - int X509_get_ext_by_NID(X509 *x, int nid, int lastpos); - - /* - * - */ - int X509_get_ext_by_OBJ(X509 *x,ASN1_OBJECT *obj,int lastpos); - - /* - * - */ - X509_EXTENSION *X509_get_ext(X509 *x, int loc); - - /* - * - */ - X509_EXTENSION *X509_delete_ext(X509 *x, int loc); - - /* - * - */ - int X509_add_ext(X509 *x, X509_EXTENSION *ex, int loc); - - /* - * - */ - void *X509_get_ext_d2i(X509 *x, int nid, int *crit, int *idx); - - /* - * - */ - char *i2s_ASN1_OCTET_STRING(X509V3_EXT_METHOD *method, ASN1_OCTET_STRING *ia5); - - /* - * - */ - int ASN1_BIT_STRING_get_bit(ASN1_BIT_STRING *a, int n); - - /* - * - */ - PKCS7 *PKCS7_new(void); - - /* - * - */ - void PKCS7_free(PKCS7 *a); - - /* - * - */ - void PKCS7_content_free(PKCS7 *a); - - /* - * - */ - int i2d_PKCS7(PKCS7 *a, unsigned char **pp); - - /* - * - */ - PKCS7 *d2i_PKCS7(PKCS7 **a, unsigned char **pp,long length); - - /* - * - */ - int i2d_PKCS7_fp(FILE *fp,PKCS7 *p7); - - /* - * - */ - PKCS7 *d2i_PKCS7_fp(FILE *fp,PKCS7 **p7); - - /* - * - */ - int i2d_PKCS7_bio(BIO *bp,PKCS7 *p7); - - /* - * - */ - PKCS7 *d2i_PKCS7_bio(BIO *bp,PKCS7 **p7); - - /* - * - */ - PKCS7 *PKCS7_dup(PKCS7 *p7); - - /* - * Create a PKCS7 signature / signed message - */ - PKCS7 *PKCS7_sign(X509 *signcert, EVP_PKEY *pkey, STACK_OF(X509) *certs, - BIO *data, int flags); - - /* - * Verify a PKCS7 signature. - */ - int PKCS7_verify(PKCS7 *p7, STACK_OF(X509) *certs, X509_STORE *store, - BIO *indata, BIO *out, int flags); - - /* - * Get signers of a verified PKCS7 signature - */ - STACK_OF(X509) *PKCS7_get0_signers(PKCS7 *p7, STACK_OF(X509) *certs, int flags); - - /* - * PKCS7 encrypt message - */ - PKCS7 *PKCS7_encrypt(STACK_OF(X509) *certs, BIO *in, EVP_CIPHER *cipher, - int flags); - - /* - * decrypt PKCS7 message - */ - int PKCS7_decrypt(PKCS7 *p7, EVP_PKEY *pkey, X509 *cert, BIO *data, int flags); - - - /* - * Load a CA list file. - */ - STACK_OF(X509_NAME) *SSL_load_client_CA_file(const char *file); - - /* - * Load a file of PEM encoded objects. - */ - STACK_OF(X509_INFO) *PEM_X509_INFO_read(FILE *fp, STACK_OF(X509_INFO) *sk, - pem_password_cb *cb, void *u); - - /* - * Get the number of purposes available - */ - int X509_PURPOSE_get_count(); - - - /* - * Get the ID of a purpose - */ - int X509_PURPOSE_get_id(X509_PURPOSE *); - - - /* - * Check the existence of purpose id "id" in x. for CA, set ca = 1, else 0 - */ - int X509_check_purpose(X509 *x, int id, int ca); - - - /* - * Get the purpose with index #idx - */ - X509_PURPOSE * X509_PURPOSE_get0(int idx); - - - /* - * Create a new Private KEY - */ - EVP_PKEY* EVP_PKEY_new(); - - - /* - * Assign a private key - */ - int EVP_PKEY_assign(EVP_PKEY *pkey, int type, char *key); - - - /* - * Generate a RSA key - */ - RSA *RSA_generate_key(int bits, unsigned long e, void - (*callback)(int,int,void *), void *cb_arg); - - - /* - * Create/destroy a certificate request - */ - X509_REQ *X509_REQ_new(); - void X509_REQ_free(X509_REQ *a); - - - /* - * Set the public key in the REQ object - */ - int X509_REQ_set_pubkey(X509_REQ *x, EVP_PKEY *pkey); - - /* for testing */ - int i2d_X509_REQ_fp(FILE *fp, X509_REQ *x); - - /* SMime support */ - STACK *X509_get1_email(X509 *x); - void X509_email_free(STACK *sk); - - /* Ciphers needed for SMime */ - EVP_CIPHER *EVP_des_ede3_cbc(); - EVP_CIPHER *EVP_des_cbc(); - EVP_CIPHER *EVP_rc2_cbc(); - EVP_CIPHER *EVP_rc2_64_cbc(); - EVP_CIPHER *EVP_rc2_40_cbc(); - - /* clear the current error - use this often*/ - void ERR_clear_error(); - - /* retrieve the latest error */ - unsigned long ERR_get_error(); - - /* Print the errors to this stream */ - void ERR_print_errors_fp(FILE *fp); - - /* Get a pointer to the SSL session id (reference counted) */ - SSL_SESSION *SSL_get1_session(SSL *ssl); - - /* Frees a pointer to the SSL session id (reference decremented if needed) */ - void SSL_SESSION_free(SSL_SESSION *session); - - /* Set the SSL session to reuse. */ - int SSL_set_session(SSL *ssl, SSL_SESSION *session); - - /* Decode ASN.1 to SSL_SESSION */ - SSL_SESSION *d2i_SSL_SESSION(SSL_SESSION **a, unsigned char **pp, long length); - /* Encode SSL_SESSION to ASN.1 */ - int i2d_SSL_SESSION(SSL_SESSION *in, unsigned char **pp); - - /* Write privatekey to FILE stream */ - int i2d_PrivateKey_fp(FILE*, EVP_PKEY*); - - /* Write PKCS#8privatekey to FILE stream */ - int i2d_PKCS8PrivateKey_fp(FILE*, EVP_PKEY*, const EVP_CIPHER*, char*, int, pem_password_cb*, void*); - - /* Free RSA structure */ - void RSA_free(RSA*); - - /* Get a blowfish CBC pointer */ - EVP_CIPHER *EVP_bf_cbc(); - - /* Sign a CSR */ - int X509_REQ_sign(X509_REQ*, EVP_PKEY*, const EVP_MD*); - - /* add a name entry */ - int X509_NAME_add_entry_by_txt(X509_NAME*, char*, int, unsigned char*, int, int, int); - - /* Create a name */ - X509_NAME *X509_NAME_new(); - - /* Set the subject */ - int X509_REQ_set_subject_name(X509_REQ*,X509_NAME*); - - /* get list of available SSL_CIPHER's sorted by preference */ - STACK_OF(SSL_CIPHER) *SSL_get_ciphers(const SSL* ssl); - -#endif - -private: - KOpenSSLProxy(); - ~KOpenSSLProxy(); - KOpenSSLProxyPrivate *d; - - KLibrary *_sslLib; - KLibrary *_cryptoLib; - static KOpenSSLProxy *_me; - - bool _ok; -}; - -#endif - diff --git a/kio/kssl/ksmimecrypto.cc b/kio/kssl/ksmimecrypto.cc deleted file mode 100644 index 1a9e37e60..000000000 --- a/kio/kssl/ksmimecrypto.cc +++ /dev/null @@ -1,424 +0,0 @@ -/* This file is part of the KDE project - * - * Copyright (C) 2003 Stefan Rompf - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library 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 - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public License - * along with this library; see the file COPYING.LIB. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - */ - - -#include -#include -#include -#include - -#include "kopenssl.h" -#include "ksslcertificate.h" -#include "ksslpkcs12.h" -#include "ksmimecrypto.h" - -// this hack provided by Malte Starostik to avoid glibc/openssl bug -// on some systems -#ifdef KSSL_HAVE_SSL -#define crypt _openssl_crypt -#include -#undef crypt -#endif - - -// forward included macros to KOpenSSLProxy -#define sk_new kossl->sk_new -#define sk_free kossl->sk_free -#define sk_push kossl->sk_push -#define sk_value kossl->sk_value -#define sk_num kossl->sk_num -#define BIO_ctrl kossl->BIO_ctrl - - -#ifdef KSSL_HAVE_SSL -static const char eot = 0; - -class KSMIMECryptoPrivate { - KOpenSSLProxy *kossl; - -public: - KSMIMECryptoPrivate(KOpenSSLProxy *kossl); - - - STACK_OF(X509) *certsToX509(TQPtrList &certs); - - KSMIMECrypto::rc signMessage(BIO *clearText, - BIO *cipherText, - KSSLPKCS12 &privKey, TQPtrList &certs, - bool detached); - - KSMIMECrypto::rc encryptMessage(BIO *clearText, - BIO *cipherText, KSMIMECrypto::algo algorithm, - TQPtrList &recip); - - KSMIMECrypto::rc checkSignature(BIO *clearText, - BIO *signature, bool detached, - TQPtrList &recip); - - KSMIMECrypto::rc decryptMessage(BIO *cipherText, - BIO *clearText, - KSSLPKCS12 &privKey); - - void MemBIOToQByteArray(BIO *src, TQByteArray &dest); - - KSMIMECrypto::rc sslErrToRc(void); -}; - - -KSMIMECryptoPrivate::KSMIMECryptoPrivate(KOpenSSLProxy *kossl): kossl(kossl) { -} - - -STACK_OF(X509) *KSMIMECryptoPrivate::certsToX509(TQPtrList &certs) { - STACK_OF(X509) *x509 = reinterpret_cast(sk_new(NULL)); - KSSLCertificate *cert = certs.first(); - while(cert) { - sk_X509_push(x509, cert->getCert()); - cert = certs.next(); - } - return x509; -} - - -KSMIMECrypto::rc KSMIMECryptoPrivate::signMessage(BIO *clearText, - BIO *cipherText, - KSSLPKCS12 &privKey, TQPtrList &certs, - bool detached) { - - STACK_OF(X509) *other = NULL; - KSMIMECrypto::rc rc; - int flags = detached?PKCS7_DETACHED:0; - - if (certs.count()) other = certsToX509(certs); - - PKCS7 *p7 = kossl->PKCS7_sign(privKey.getCertificate()->getCert(), privKey.getPrivateKey(), - other, clearText, flags); - - if (other) sk_X509_free(other); - - if (!p7) return sslErrToRc(); - - if (kossl->i2d_PKCS7_bio(cipherText, p7)) { - rc = KSMIMECrypto::KSC_R_OK; - } else { - rc = sslErrToRc(); - } - - kossl->PKCS7_free(p7); - - return rc; -} - -KSMIMECrypto::rc KSMIMECryptoPrivate::encryptMessage(BIO *clearText, - BIO *cipherText, KSMIMECrypto::algo algorithm, - TQPtrList &recip) { - EVP_CIPHER *cipher = NULL; - KSMIMECrypto::rc rc; - switch(algorithm) { - case KSMIMECrypto::KSC_C_DES3_CBC: - cipher = kossl->EVP_des_ede3_cbc(); - break; - case KSMIMECrypto::KSC_C_RC2_CBC_128: - cipher = kossl->EVP_rc2_cbc(); - break; - case KSMIMECrypto::KSC_C_RC2_CBC_64: - cipher = kossl->EVP_rc2_64_cbc(); - break; - case KSMIMECrypto::KSC_C_DES_CBC: - cipher = kossl->EVP_des_cbc(); - break; - case KSMIMECrypto::KSC_C_RC2_CBC_40: - cipher = kossl->EVP_rc2_40_cbc(); - break; - } - if (!cipher) return KSMIMECrypto::KSC_R_NOCIPHER; - - STACK_OF(X509) *certs = certsToX509(recip); - - PKCS7 *p7 = kossl->PKCS7_encrypt(certs, clearText, cipher, 0); - - sk_X509_free(certs); - - if (!p7) return sslErrToRc(); - - if (kossl->i2d_PKCS7_bio(cipherText, p7)) { - rc = KSMIMECrypto::KSC_R_OK; - } else { - rc = sslErrToRc(); - } - - kossl->PKCS7_free(p7); - - return rc; -} - - -KSMIMECrypto::rc KSMIMECryptoPrivate::checkSignature(BIO *clearText, - BIO *signature, bool detached, - TQPtrList &recip) { - - PKCS7 *p7 = kossl->d2i_PKCS7_bio(signature, NULL); - KSMIMECrypto::rc rc = KSMIMECrypto::KSC_R_OTHER; - - if (!p7) return sslErrToRc(); - - BIO *in; - BIO *out; - if (detached) { - in = clearText; - out = NULL; - } else { - in = NULL; - out = clearText; - } - - X509_STORE *dummystore = kossl->X509_STORE_new(); - if (kossl->PKCS7_verify(p7, NULL, dummystore, in, out, PKCS7_NOVERIFY)) { - STACK_OF(X509) *signers = kossl->PKCS7_get0_signers(p7, 0, PKCS7_NOVERIFY); - int num = sk_X509_num(signers); - - for(int n=0; nX509_STORE_free(dummystore); - kossl->PKCS7_free(p7); - - return rc; -} - - -KSMIMECrypto::rc KSMIMECryptoPrivate::decryptMessage(BIO *cipherText, - BIO *clearText, - KSSLPKCS12 &privKey) { - - PKCS7 *p7 = kossl->d2i_PKCS7_bio(cipherText, NULL); - KSMIMECrypto::rc rc; - - if (!p7) return sslErrToRc(); - - if (kossl->PKCS7_decrypt(p7, privKey.getPrivateKey(), privKey.getCertificate()->getCert(), - clearText, 0)) { - rc = KSMIMECrypto::KSC_R_OK; - } else { - rc = sslErrToRc(); - } - - kossl->PKCS7_free(p7); - - return rc; -} - - -void KSMIMECryptoPrivate::MemBIOToQByteArray(BIO *src, TQByteArray &dest) { - char *buf; - long len = BIO_get_mem_data(src, &buf); - dest.assign(buf, len); - /* Now this goes quite a bit into openssl internals. - We assume that openssl uses malloc() (it does in - default config) and rip out the buffer. - */ - reinterpret_cast(src->ptr)->data = NULL; -} - - -KSMIMECrypto::rc KSMIMECryptoPrivate::sslErrToRc(void) { - unsigned long cerr = kossl->ERR_get_error(); - - // To be completed and possibly fixed - - switch(ERR_GET_REASON(cerr)) { - case ERR_R_MALLOC_FAILURE: - return KSMIMECrypto::KSC_R_NOMEM; - } - - switch(ERR_GET_LIB(cerr)) { - case ERR_LIB_PKCS7: - switch(ERR_GET_REASON(cerr)) { - case PKCS7_R_WRONG_CONTENT_TYPE: - case PKCS7_R_NO_CONTENT: - case PKCS7_R_NO_SIGNATURES_ON_DATA: - return KSMIMECrypto::KSC_R_FORMAT; - break; - case PKCS7_R_PRIVATE_KEY_DOES_NOT_MATCH_CERTIFICATE: - case PKCS7_R_DECRYPT_ERROR: // Hmm? - return KSMIMECrypto::KSC_R_WRONGKEY; - break; - case PKCS7_R_DIGEST_FAILURE: - return KSMIMECrypto::KSC_R_VERIFY; - default: - break; - } - break; - default: - break; - } - - kdDebug(7029) <<"KSMIMECrypto: uncaught error " <hasLibCrypto()) kossl = 0L; -#else - kossl = 0L; -#endif -} - - -KSMIMECrypto::~KSMIMECrypto() { -#ifdef KSSL_HAVE_SSL - delete priv; -#endif -} - - -KSMIMECrypto::rc KSMIMECrypto::signMessage(const TQCString &clearText, - TQByteArray &cipherText, - const KSSLPKCS12 &privKey, - const TQPtrList &certs, - bool detached) { -#ifdef KSSL_HAVE_SSL - if (!kossl) return KSC_R_NO_SSL; - BIO *in = kossl->BIO_new_mem_buf((char *)clearText.data(), clearText.size()); - BIO *out = kossl->BIO_new(kossl->BIO_s_mem()); - - rc rc = priv->signMessage(in, out, - const_cast(privKey), - const_cast &>(certs), - detached); - - if (!rc) priv->MemBIOToQByteArray(out, cipherText); - - kossl->BIO_free(out); - kossl->BIO_free(in); - - return rc; -#else - return KSC_R_NO_SSL; -#endif -} - - -KSMIMECrypto::rc KSMIMECrypto::checkDetachedSignature(const TQCString &clearText, - const TQByteArray &signature, - TQPtrList &foundCerts) { -#ifdef KSSL_HAVE_SSL - if (!kossl) return KSC_R_NO_SSL; - BIO *txt = kossl->BIO_new_mem_buf((char *)clearText.data(), clearText.length()); - BIO *sig = kossl->BIO_new_mem_buf((char *)signature.data(), signature.size()); - - rc rc = priv->checkSignature(txt, sig, true, foundCerts); - - kossl->BIO_free(sig); - kossl->BIO_free(txt); - - return rc; -#else - return KSC_R_NO_SSL; -#endif -} - - -KSMIMECrypto::rc KSMIMECrypto::checkOpaqueSignature(const TQByteArray &signedText, - TQCString &clearText, - TQPtrList &foundCerts) { -#ifdef KSSL_HAVE_SSL - if (!kossl) return KSC_R_NO_SSL; - - BIO *in = kossl->BIO_new_mem_buf((char *)signedText.data(), signedText.size()); - BIO *out = kossl->BIO_new(kossl->BIO_s_mem()); - - rc rc = priv->checkSignature(out, in, false, foundCerts); - - kossl->BIO_write(out, &eot, 1); - priv->MemBIOToQByteArray(out, clearText); - - kossl->BIO_free(out); - kossl->BIO_free(in); - - return rc; -#else - return KSC_R_NO_SSL; -#endif -} - - -KSMIMECrypto::rc KSMIMECrypto::encryptMessage(const TQCString &clearText, - TQByteArray &cipherText, - algo algorithm, - const TQPtrList &recip) { -#ifdef KSSL_HAVE_SSL - if (!kossl) return KSC_R_NO_SSL; - - BIO *in = kossl->BIO_new_mem_buf((char *)clearText.data(), clearText.size()); - BIO *out = kossl->BIO_new(kossl->BIO_s_mem()); - - rc rc = priv->encryptMessage(in,out,algorithm, - const_cast< TQPtrList &>(recip)); - - if (!rc) priv->MemBIOToQByteArray(out, cipherText); - - kossl->BIO_free(out); - kossl->BIO_free(in); - - return rc; -#else - return KSC_R_NO_SSL; -#endif -} - - -KSMIMECrypto::rc KSMIMECrypto::decryptMessage(const TQByteArray &cipherText, - TQCString &clearText, - const KSSLPKCS12 &privKey) { -#ifdef KSSL_HAVE_SSL - if (!kossl) return KSC_R_NO_SSL; - - BIO *in = kossl->BIO_new_mem_buf((char *)cipherText.data(), cipherText.size()); - BIO *out = kossl->BIO_new(kossl->BIO_s_mem()); - - rc rc = priv->decryptMessage(in,out, - const_cast(privKey)); - - kossl->BIO_write(out, &eot, 1); - priv->MemBIOToQByteArray(out, clearText); - - kossl->BIO_free(out); - kossl->BIO_free(in); - - return rc; -#else - return KSC_R_NO_SSL; -#endif -} diff --git a/kio/kssl/ksmimecrypto.h b/kio/kssl/ksmimecrypto.h deleted file mode 100644 index 5f8e1da73..000000000 --- a/kio/kssl/ksmimecrypto.h +++ /dev/null @@ -1,128 +0,0 @@ -/* This file is part of the KDE project - * - * Copyright (C) 2003 Stefan Rompf - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library 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 - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public License - * along with this library; see the file COPYING.LIB. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - */ - -#ifndef __KSMIMECRYPTO_H -#define __KSMIMECRYPTO_H - - -#include -#include -#include "ksslpkcs12.h" -#include "ksslcertificate.h" - -class KOpenSSLProxy; -class KSMIMECryptoPrivate; - -class TDEIO_EXPORT KSMIMECrypto { - public: - KSMIMECrypto(); - ~KSMIMECrypto(); - - enum algo { KSC_C_DES3_CBC = 1, - KSC_C_RC2_CBC_128, - KSC_C_RC2_CBC_64, - KSC_C_DES_CBC, - KSC_C_RC2_CBC_40 }; - - enum rc { KSC_R_OK, /* everything ok */ - KSC_R_OTHER, /* unspecified error */ - KSC_R_NO_SSL, /* No crypto lib / compiled without SSL */ - KSC_R_NOCIPHER, /* encryption cipher n/a */ - KSC_R_NOMEM, /* out of memory */ - KSC_R_FORMAT, /* wrong input data format */ - KSC_R_WRONGKEY, /* wrong decryption/signature key */ - KSC_R_VERIFY /* data does not match signature */ - }; - - /** - * Sign a message - * @param clearText MIME representation of the message (part) to sign - * @param cipherText signature to append or signature block - * @param privKey private key/certificate to sign with - * @param certs additional certificates (may be empty) - * @param detached create detached or opaque signature - * @return 0 on success - */ - rc signMessage(const TQCString &clearText, - TQByteArray &cipherText, - const KSSLPKCS12 &privKey, - const TQPtrList &certs, - bool detached); - - /** - * Check a detached message signature - * Will check if messages matches signature and extract certificates - * Does not check certificates for validity! - * @param clearText MIME representation of signed message (without SIG) - * @param signature signature - * @param foundCerts certificates found in this message - * @return 0 on success - */ - rc checkDetachedSignature(const TQCString &clearText, - const TQByteArray &signature, - TQPtrList &foundCerts); - - /** - * Check an opaque signed message - * Will check if signature matches and extract message - * Does not check certificates for validity! - * @param signedText signed message block - * @param clearText cleartext of signed message - * @param foundCerts certificates found in this mesasge - * @return 0 on success - */ - rc checkOpaqueSignature(const TQByteArray &signedText, - TQCString &clearText, - TQPtrList &foundCerts); - - /** - * Encrypt a message - * encrypts a message for the given list of recipients and the - * selected algorithm. Note that any algorithm <128 bytes is - * insecure and should never be used, even if SMIME-2 requires - * only RC2-40 - * @param clearText MIME representation of message to encrypt - * @param cipherText returned encrypted message - * @param algorithm encryption algorithm - * @param recip recipient certificates - * @return 0 on success - */ - rc encryptMessage(const TQCString &clearText, - TQByteArray &cipherText, - algo algorithm, - const TQPtrList &recip); - - /** - * Decrypt a message - * @param cipherText encrypted message block - * @param clearText returns decrypted message - * @param privKey private key to use - * @return 0 on success - */ - rc decryptMessage(const TQByteArray &cipherText, - TQCString &clearText, - const KSSLPKCS12 &privKey); - - private: - KSMIMECryptoPrivate *priv; - KOpenSSLProxy *kossl; -}; - -#endif diff --git a/kio/kssl/kssl.cc b/kio/kssl/kssl.cc deleted file mode 100644 index 66cc503d5..000000000 --- a/kio/kssl/kssl.cc +++ /dev/null @@ -1,688 +0,0 @@ -/* This file is part of the KDE project - * - * Copyright (C) 2000-2003 George Staikos - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library 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 - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public License - * along with this library; see the file COPYING.LIB. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - */ - -#ifdef HAVE_CONFIG_H -#include -#endif - -// this hack provided by Malte Starostik to avoid glibc/openssl bug -// on some systems -#ifdef KSSL_HAVE_SSL -#include -#include -#include -#define crypt _openssl_crypt -#include -#include -#include -#include -#include -#undef crypt -#endif - -#include "kssl.h" - -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include - -#define sk_dup d->kossl->sk_dup - -class KSSLPrivate { -public: - KSSLPrivate() { - lastInitTLS = false; - kossl = KOpenSSLProxy::self(); - session = 0L; - } - - ~KSSLPrivate() { - delete session; - session = 0L; - } - - bool lastInitTLS; - KSSLCertificate::KSSLValidation m_cert_vfy_res; - TQString proxyPeer; - -#ifdef KSSL_HAVE_SSL - SSL *m_ssl; - SSL_CTX *m_ctx; - SSL_METHOD *m_meth; -#endif - KSSLSession *session; - KOSSL *kossl; -}; - - -KSSL::KSSL(bool init) { - d = new KSSLPrivate; - m_bInit = false; - m_bAutoReconfig = true; - m_cfg = new KSSLSettings(); -#ifdef KSSL_HAVE_SSL - d->m_ssl = 0L; -#endif - - if (init) - initialize(); -} - - -KSSL::~KSSL() { - close(); - delete m_cfg; - delete d; -} - - -int KSSL::seedWithEGD() { -int rc = 0; -#ifdef KSSL_HAVE_SSL - if (m_cfg->useEGD() && !m_cfg->getEGDPath().isEmpty()) { - rc = d->kossl->RAND_egd(m_cfg->getEGDPath().latin1()); - if (rc < 0) - kdDebug(7029) << "KSSL: Error seeding PRNG with the EGD." << endl; - else kdDebug(7029) << "KSSL: PRNG was seeded with " << rc - << " bytes from the EGD." << endl; - } else if (m_cfg->useEFile() && !m_cfg->getEGDPath().isEmpty()) { - rc = d->kossl->RAND_load_file(m_cfg->getEGDPath().latin1(), -1); - if (rc < 0) - kdDebug(7029) << "KSSL: Error seeding PRNG with the entropy file." << endl; - else kdDebug(7029) << "KSSL: PRNG was seeded with " << rc - << " bytes from the entropy file." << endl; - } -#endif -return rc; -} - - -bool KSSL::TLSInit() { -#ifdef KSSL_HAVE_SSL -// kdDebug(7029) << "KSSL TLS initialize" << endl; - if (m_bInit) - return false; - - if (m_bAutoReconfig) - m_cfg->load(); - - if (!m_cfg->tlsv1()) - return false; - - seedWithEGD(); - d->m_meth = d->kossl->TLSv1_client_method(); - d->lastInitTLS = true; - - m_pi.reset(); - - d->m_ctx = d->kossl->SSL_CTX_new(d->m_meth); - if (d->m_ctx == 0L) { - return false; - } - - // set cipher list - TQString clist = m_cfg->getCipherList(); - //kdDebug(7029) << "Cipher list: " << clist << endl; - if (!clist.isEmpty()) - d->kossl->SSL_CTX_set_cipher_list(d->m_ctx, const_cast(clist.ascii())); - - m_bInit = true; -return true; -#else -return false; -#endif -} - - -bool KSSL::initialize() { -#ifdef KSSL_HAVE_SSL - kdDebug(7029) << "KSSL initialize" << endl; - if (m_bInit) - return false; - - if (m_bAutoReconfig) - m_cfg->load(); - - seedWithEGD(); - // FIXME: we should be able to force SSL off entirely. - d->lastInitTLS = false; - - m_pi.reset(); - - if (!m_cfg->tlsv1() && !m_cfg->sslv3() && m_cfg->sslv2()) - d->m_meth = d->kossl->SSLv2_client_method(); - else if (m_cfg->tlsv1() && !m_cfg->sslv3() && !m_cfg->sslv2()) - d->m_meth = d->kossl->TLSv1_client_method(); - else if (!m_cfg->tlsv1() && m_cfg->sslv3() && !m_cfg->sslv2()) - d->m_meth = d->kossl->SSLv3_client_method(); - else d->m_meth = d->kossl->SSLv23_client_method(); - -/* -if (m_cfg->sslv2() && m_cfg->sslv3()) kdDebug(7029) << "Double method" << endl; -else if (m_cfg->sslv2()) kdDebug(7029) << "SSL2 method" << endl; -else if (m_cfg->sslv3()) kdDebug(7029) << "SSL3 method" << endl; -*/ - - d->m_ctx = d->kossl->SSL_CTX_new(d->m_meth); - if (d->m_ctx == 0L) { - return false; - } - - // set cipher list - TQString clist = m_cfg->getCipherList(); - kdDebug(7029) << "Cipher list: " << clist << endl; - if (!clist.isEmpty()) - d->kossl->SSL_CTX_set_cipher_list(d->m_ctx, const_cast(clist.ascii())); - - m_bInit = true; -return true; -#else -return false; -#endif -} - - -bool KSSL::setSession(const KSSLSession *session) { -#ifdef KSSL_HAVE_SSL - if (!session) { - delete d->session; - d->session = 0L; - return true; - } - - // Obtain a reference by incrementing the reference count. Yuck. - static_cast(session->_session)->references++; - - d->session = new KSSLSession; - d->session->_session = session->_session; - - return true; -#else - return false; -#endif -} - - -void KSSL::close() { -#ifdef KSSL_HAVE_SSL -//kdDebug(7029) << "KSSL close" << endl; - if (!m_bInit) - return; - - delete d->session; - d->session = 0L; - - if (d->m_ssl) { - d->kossl->SSL_shutdown(d->m_ssl); - d->kossl->SSL_free(d->m_ssl); - d->m_ssl = 0L; - } - - d->kossl->SSL_CTX_free(d->m_ctx); - if (m_cfg->useEFile() && !m_cfg->getEGDPath().isEmpty()) { - d->kossl->RAND_write_file(m_cfg->getEGDPath().latin1()); - } - - m_bInit = false; -#endif -} - - -bool KSSL::reInitialize() { - close(); -return initialize(); -} - -// get the callback file - it's hidden away in here -//#include "ksslcallback.c" - - -bool KSSL::setVerificationLogic() { -#if 0 -#ifdef KSSL_HAVE_SSL - // SSL_set_verify_result(d->m_ssl, X509_V_OK); - // SSL_CTX_set_verify(d->m_ctx, SSL_VERIFY_PEER, X509Callback); -#endif -#endif -return true; -} - - -int KSSL::accept(int sock) { -#ifdef KSSL_HAVE_SSL -// kdDebug(7029) << "KSSL accept" << endl; -int rc; - if (!m_bInit) - return -1; - d->m_ssl = d->kossl->SSL_new(d->m_ctx); - if (!d->m_ssl) - return -1; - - if (d->session) { - if (static_cast(d->session->_session)->sess_cert == 0) - { - kdDebug(7029) << "Can't reuse session, no certificate." << endl; - delete d->session; - d->session = 0; - } else if (1 == d->kossl->SSL_set_session(d->m_ssl, - static_cast(d->session->_session))) { - kdDebug(7029) << "Session ID is being reused." << endl; - } else { - kdDebug(7029) << "Error attempting to reuse session." << endl; - delete d->session; - d->session = 0; - } - } - -/* - if (!setVerificationLogic()) { - d->kossl->SSL_shutdown(d->m_ssl); - d->kossl->SSL_free(d->m_ssl); - d->m_ssl = 0; - return -1; - } -*/ - - int off = SSL_OP_ALL; - if (!d->lastInitTLS && !m_cfg->tlsv1()) - off |= SSL_OP_NO_TLSv1; - if (!m_cfg->sslv3()) - off |= SSL_OP_NO_SSLv3; - if (!m_cfg->sslv2()) - off |= SSL_OP_NO_SSLv2; - - d->kossl->SSL_set_options(d->m_ssl, off); - - rc = d->kossl->SSL_set_fd(d->m_ssl, sock); - if (rc == 0) { - d->kossl->SSL_shutdown(d->m_ssl); - d->kossl->SSL_free(d->m_ssl); - d->m_ssl = 0; - return rc; - } - - rc = d->kossl->SSL_accept(d->m_ssl); - if (rc == 1) { - setConnectionInfo(); - setPeerInfo(); - kdDebug(7029) << "KSSL connected OK" << endl; - } else { - kdDebug(7029) << "KSSL accept failed - rc = " << rc << endl; - kdDebug(7029) << " ERROR = " - << d->kossl->SSL_get_error(d->m_ssl, rc) << endl; - d->kossl->SSL_shutdown(d->m_ssl); - d->kossl->SSL_free(d->m_ssl); - d->m_ssl = 0; - return -1; - } - - if (!d->kossl->SSL_session_reused(d->m_ssl)) { - if (d->session) { - kdDebug(7029) << "Session reuse failed. New session used instead." << endl; - delete d->session; - d->session = 0L; - } - } - - if (!d->session) { - SSL_SESSION *sess = d->kossl->SSL_get1_session(d->m_ssl); - if (sess) { - d->session = new KSSLSession; - d->session->_session = sess; - } - } - -return rc; -#else -return -1; -#endif -} - - -int KSSL::connect(int sock) { -#ifdef KSSL_HAVE_SSL -// kdDebug(7029) << "KSSL connect" << endl; -int rc; - if (!m_bInit) - return -1; - d->m_ssl = d->kossl->SSL_new(d->m_ctx); - if (!d->m_ssl) - return -1; - - if (d->session) { - if (static_cast(d->session->_session)->sess_cert == 0) - { - kdDebug(7029) << "Can't reuse session, no certificate." << endl; - delete d->session; - d->session = 0; - } else if (1 == d->kossl->SSL_set_session(d->m_ssl, - static_cast(d->session->_session))) { - kdDebug(7029) << "Session ID is being reused." << endl; - } else { - kdDebug(7029) << "Error attempting to reuse session." << endl; - delete d->session; - d->session = 0; - } - } - -/* - if (!setVerificationLogic()) { - d->kossl->SSL_shutdown(d->m_ssl); - d->kossl->SSL_free(d->m_ssl); - d->m_ssl = 0; - return -1; - } -*/ - - int off = SSL_OP_ALL; - if (!d->lastInitTLS && !m_cfg->tlsv1()) - off |= SSL_OP_NO_TLSv1; - if (!m_cfg->sslv3()) - off |= SSL_OP_NO_SSLv3; - if (!m_cfg->sslv2()) - off |= SSL_OP_NO_SSLv2; - - d->kossl->SSL_set_options(d->m_ssl, off); - - rc = d->kossl->SSL_set_fd(d->m_ssl, sock); - if (rc == 0) { - d->kossl->SSL_shutdown(d->m_ssl); - d->kossl->SSL_free(d->m_ssl); - d->m_ssl = 0; - return rc; - } - -connect_again: - rc = d->kossl->SSL_connect(d->m_ssl); - if (rc == 1) { - setConnectionInfo(); - setPeerInfo(); - kdDebug(7029) << "KSSL connected OK" << endl; - } else { - int err = d->kossl->SSL_get_error(d->m_ssl, rc); - if (err == SSL_ERROR_WANT_READ || err == SSL_ERROR_WANT_WRITE) { - // nonblocking - but we block anyways in connect() :) - goto connect_again; - } else { - kdDebug(7029) << "KSSL connect failed - rc = " - << rc << endl; - kdDebug(7029) << " ERROR = " - << err << endl; - d->kossl->ERR_print_errors_fp(stderr); - d->kossl->SSL_shutdown(d->m_ssl); - d->kossl->SSL_free(d->m_ssl); - d->m_ssl = 0; - return -1; - } - } - - if (!d->kossl->SSL_session_reused(d->m_ssl)) { - if (d->session) { - kdDebug(7029) << "Session reuse failed. New session used instead." << endl; - delete d->session; - d->session = 0L; - } - } - - if (!d->session) { - SSL_SESSION *sess = d->kossl->SSL_get1_session(d->m_ssl); - if (sess) { - d->session = new KSSLSession; - d->session->_session = sess; - } - } - -return rc; -#else -return -1; -#endif -} - - -int KSSL::pending() { -#ifdef KSSL_HAVE_SSL - if (!m_bInit) - return -1; -return d->kossl->SSL_pending(d->m_ssl); -#else -return -1; -#endif -} - - -int KSSL::peek(void *buf, int len) { -#ifdef KSSL_HAVE_SSL - if (!m_bInit) - return -1; - // FIXME: enhance to work the way read() does below, handling errors -return d->kossl->SSL_peek(d->m_ssl, buf, len); -#else -return -1; -#endif -} - - -int KSSL::read(void *buf, int len) { -#ifdef KSSL_HAVE_SSL - int rc = 0; - int maxIters = 10; - - if (!m_bInit) - return -1; - -read_again: - rc = d->kossl->SSL_read(d->m_ssl, (char *)buf, len); - if (rc <= 0) { - int err = d->kossl->SSL_get_error(d->m_ssl, rc); - - if (err == SSL_ERROR_WANT_READ || err == SSL_ERROR_WANT_WRITE) { - kdDebug(7029) << "SSL read() returning 0: " << err << endl; - if (maxIters-- > 0) { - ::usleep(20000); // 20ms sleep - goto read_again; - } - return 0; - } - - kdDebug(7029) << "SSL READ ERROR: " << err << endl; - if (err != SSL_ERROR_NONE && - err != SSL_ERROR_ZERO_RETURN && err != SSL_ERROR_SYSCALL) { - rc = -1; // OpenSSL returns 0 on error too - d->kossl->ERR_print_errors_fp(stderr); - } - -// else if (err == SSL_ERROR_ZERO_RETURN) -// rc = 0; - } -return rc; -#else -return -1; -#endif -} - - -int KSSL::write(const void *buf, int len) { -#ifdef KSSL_HAVE_SSL - if (!m_bInit) - return -1; - -write_again: - int rc = d->kossl->SSL_write(d->m_ssl, (const char *)buf, len); - if (rc <= 0) { // OpenSSL returns 0 on error too - int err = d->kossl->SSL_get_error(d->m_ssl, rc); - - if (err == SSL_ERROR_WANT_WRITE) { - ::usleep(20000); // 20ms sleep - goto write_again; - } - - kdDebug(7029) << "SSL WRITE ERROR: " << err << endl; - if (err != SSL_ERROR_NONE && - err != SSL_ERROR_ZERO_RETURN && err != SSL_ERROR_SYSCALL) - rc = -1; - } - -return rc; -#else -return -1; -#endif -} - - -bool KSSL::reconfig() { - return reInitialize(); -} - - -void KSSL::setAutoReconfig(bool ar) { - m_bAutoReconfig = ar; -} - - -bool KSSL::setSettings(KSSLSettings *settings) { - delete m_cfg; - m_cfg = settings; - return reconfig(); -} - - -#ifdef KSSL_HAVE_SSL -bool KSSL::m_bSSLWorks = true; -#else -bool KSSL::m_bSSLWorks = false; -#endif - -bool KSSL::doesSSLWork() { - return m_bSSLWorks; -} - - -void KSSL::setConnectionInfo() { -#ifdef KSSL_HAVE_SSL -SSL_CIPHER *sc; -char buf[1024]; - - buf[0] = 0; // for safety. - sc = d->kossl->SSL_get_current_cipher(d->m_ssl); - if (!sc) { - kdDebug(7029) << "KSSL get current cipher failed - we're probably gonna crash!" << endl; - return; - } - - // set the number of bits, bits used - m_ci.m_iCipherUsedBits = d->kossl->SSL_CIPHER_get_bits(sc, &(m_ci.m_iCipherBits)); - // set the cipher version - m_ci.m_cipherVersion = d->kossl->SSL_CIPHER_get_version(sc); - // set the cipher name - m_ci.m_cipherName = d->kossl->SSL_CIPHER_get_name(sc); - // set the cipher description - m_ci.m_cipherDescription = d->kossl->SSL_CIPHER_description(sc, buf, 1023); - -#endif -} - - -void KSSL::setPeerInfo() { -#ifdef KSSL_HAVE_SSL - m_pi.setPeerHost(d->proxyPeer); - m_pi.m_cert.setCert(d->kossl->SSL_get_peer_certificate(d->m_ssl)); - STACK_OF(X509) *xs = d->kossl->SSL_get_peer_cert_chain(d->m_ssl); - if (xs) - xs = sk_X509_dup(xs); // Leak? - m_pi.m_cert.setChain((void *)xs); -#endif -} - - -KSSLConnectionInfo& KSSL::connectionInfo() { - return m_ci; -} - - -// KDE 4: Make it const TQString & -void KSSL::setPeerHost(TQString realHost) { - d->proxyPeer = realHost; -} - -// deprecated -void KSSL::setProxyUse(bool, TQString, int, TQString) { -} - - -KSSLPeerInfo& KSSL::peerInfo() { - return m_pi; -} - - -bool KSSL::setClientCertificate(KSSLPKCS12 *pkcs) { -#ifdef KSSL_HAVE_SSL - if (!pkcs || !pkcs->getCertificate()) - return false; - -int rc; -X509 *x = pkcs->getCertificate()->getCert(); -EVP_PKEY *k = pkcs->getPrivateKey(); - - if (!x || !k) return false; - - if (!pkcs->getCertificate()->x509V3Extensions().certTypeSSLClient()) - return false; - - rc = d->kossl->SSL_CTX_use_certificate(d->m_ctx, x); - if (rc <= 0) { - kdDebug(7029) << "KSSL - SSL_CTX_use_certificate failed. rc = " << rc << endl; - return false; - } - - rc = d->kossl->SSL_CTX_use_PrivateKey(d->m_ctx, k); - if (rc <= 0) { - kdDebug(7029) << "KSSL - SSL_CTX_use_PrivateKey failed. rc = " << rc << endl; - return false; - } - - return true; -#else - return false; -#endif -} - -#undef sk_dup - -const KSSLSession* KSSL::session() const { - return d->session; -} - -bool KSSL::reusingSession() const { -#ifdef KSSL_HAVE_SSL - return (d->m_ssl && d->kossl->SSL_session_reused(d->m_ssl)); -#else - return false; -#endif -} - - diff --git a/kio/kssl/kssl.h b/kio/kssl/kssl.h deleted file mode 100644 index e10b10eaf..000000000 --- a/kio/kssl/kssl.h +++ /dev/null @@ -1,301 +0,0 @@ -/* This file is part of the KDE project - * - * Copyright (C) 2000-2003 George Staikos - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library 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 - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public License - * along with this library; see the file COPYING.LIB. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - */ - -#ifndef _KSSL_H -#define _KSSL_H - -#include -#include -#include - -class KSSLPrivate; -class KSSLCertificate; -class KSSLPKCS12; -class KSSLSession; - -/** - * KDE SSL Wrapper Class - * - * This class implements KDE's SSL support by wrapping OpenSSL. - * - * @author George Staikos - * @see KExtendedSocket, TCPSlaveBase - * @short KDE SSL Class - */ -class TDEIO_EXPORT KSSL { -public: - /** - * Construct a KSSL object - * - * @param init Set this to false if you do not want this class to - * immediately initialize OpenSSL. - */ - KSSL(bool init = true); - - /** - * Destroy this KSSL object - * - * Does not close any socket. - */ - ~KSSL(); - - /** - * Determine if SSL is available and works. - * - * @return true is SSL is available and usable - */ - static bool doesSSLWork(); - - /** - * Initialize OpenSSL. - * - * @return true on success - * - * This will do nothing if it is already initialized. - * @see reInitialize - */ - bool initialize(); - - /** - * This is used for applicationss which do STARTTLS or something - * similar. It creates a TLS method regardless of the user's settings. - * - * @return true if TLS is successfully initialized - */ - bool TLSInit(); - - /** - * Set an SSL session to use. This deep copies the session so it - * doesn't have to remain valid. You need to call it after calling - * initialize or reInitialize. The ID is cleared in close(). - * - * @param session A valid session to reuse. If 0L, it will clear the - * session ID in memory. - * - * @return true on success - */ - bool setSession(const KSSLSession *session); - - /** - * Close the SSL session. - */ - void close(); - - /** - * Reinitialize OpenSSL. - * - * @return true on success - * - * This is not generally needed unless you are reusing the KSSL object - * for a new session. - * @see initialize - */ - bool reInitialize(); - - /** - * Trigger a reread of KSSL configuration and reInitialize() KSSL. - * - * @return true on successful reinitalizations - * - * If you setAutoReconfig() to false, then this will simply - * reInitialize() and not read in the new configuration. - * @see setAutoReconfig - */ - bool reconfig(); - - /** - * Enable or disable automatic reconfiguration on initialize(). - * - * @param ar Set to false in order to disable auto-reloading of the - * KSSL configuration during initialize(). - * - * By default, KSSL will read its configuration on initialize(). You - * might want to disable this for performance reasons. - */ - void setAutoReconfig(bool ar); - - /** - * This will reseed the pseudo-random number generator with the EGD - * (entropy gathering daemon) if the EGD is configured and enabled. - * You don't need to call this yourself normally. - * - * @return 0 on success - */ - int seedWithEGD(); - - /** - * Set a new KSSLSettings instance as the settings. This deletes the - * current instance of KSSLSettings. - * - * @param settings A new, valid settings object. - * - * @return true on success - */ - bool setSettings(KSSLSettings *settings); - - /** - * One is built by the constructor, so this will only return a NULL - * pointer if you set one with setSettings(). - * - * @return the current settings instance - */ - KSSLSettings * settings() { return m_cfg; } - - /** - * Use this to set the certificate to send to the server. - * Do NOT delete the KSSLPKCS12 object until you are done with the - * session. It is not defined when KSSL will be done with this. - * - * @param pkcs the valid PKCS#12 object to send. - * - * @return true if the certificate was properly set to the session. - */ - bool setClientCertificate(KSSLPKCS12 *pkcs); - - /** - * Set the status of the connection with respect to proxies. - * - * @param active is not used - * @param realIP is the IP address of the host you're connecting to - * @param realPort is the port of the host you're connecting to - * @param proxy is the IP or hostname of the proxy server - * @deprecated - */ - void setProxyUse(bool active, TQString realIP = TQString::null, int realPort = 0, TQString proxy = TQString::null) KDE_DEPRECATED; - - /** - * Set the peer hostname to be used for certificate verification. - * - * @param realHost the remote hostname as the user believes to be - * connecting to - */ - void setPeerHost(TQString realHost = TQString::null); - - /** - * Connect the SSL session to the remote host using the provided - * socket descriptor. - * - * @param sock the socket descriptor to connect with. This must be - * an already connected socket. - * @return 1 on success, 0 on error setting the file descriptor, - * -1 on other error. - */ - int connect(int sock); - - /** - * Connect the SSL session to the remote host using the provided - * socket descriptor. This is for use with an SSL server application. - * - * @param sock the socket descriptor to connect with. This must be - * an already connected socket. - * @return 1 on success, 0 on error setting the file descriptor, - * -1 on other error. - */ - int accept(int sock); - - /** - * Read data from the remote host via SSL. - * - * @param buf the buffer to read the data into. - * @param len the maximum length of data to read. - * @return the number of bytes read, 0 on an exception, or -1 on error. - */ - int read(void *buf, int len); - - /** - * Peek at available data from the remote host via SSL. - * - * @param buf the buffer to read the data into. - * @param len the maximum length of data to read. - * @return the number of bytes read, 0 on an exception, or -1 on error. - */ - int peek(void *buf, int len); - - /** - * Write data to the remote host via SSL. - * - * @param buf the buffer to read the data from. - * @param len the length of data to send from the buffer. - * @return the number of bytes written, 0 on an exception, - * or -1 on error. - */ - int write(const void *buf, int len); - - /** - * Determine if data is waiting to be read. - * - * @return -1 on error, 0 if no data is waiting, > 0 if data is waiting. - */ - int pending(); - - /** - * Obtain a reference to the connection information. - * - * @return a reference to the connection information, - * valid after connected - * @see KSSLConnectionInfo - */ - KSSLConnectionInfo& connectionInfo(); - - /** - * Obtain a reference to the information about the peer. - * - * @return a reference to the peer information, - * valid after connected - * @see KSSLPeerInfo - */ - KSSLPeerInfo& peerInfo(); - - /** - * Obtain a pointer to the session information. - * - * @return a pointer to the session information. - * This is valid after connected, while connected. - * It is deleted by the KSSL object which returns it. - * May return 0L if no valid session exists. - * @see KSSLSession - */ - const KSSLSession* session() const; - - /** - * Determine if we are currently reusing an SSL session ID. - * - * @return true if we are reusing a session ID. - */ - bool reusingSession() const; - -private: - static bool m_bSSLWorks; - bool m_bInit; - bool m_bAutoReconfig; - KSSLSettings *m_cfg; - KSSLConnectionInfo m_ci; - KSSLPeerInfo m_pi; - - KSSLPrivate *d; - - void setConnectionInfo(); - void setPeerInfo(); - bool setVerificationLogic(); -}; - - -#endif - diff --git a/kio/kssl/kssl/CMakeLists.txt b/kio/kssl/kssl/CMakeLists.txt deleted file mode 100644 index eeed10125..000000000 --- a/kio/kssl/kssl/CMakeLists.txt +++ /dev/null @@ -1,14 +0,0 @@ -################################################# -# -# (C) 2010 Serghei Amelian -# serghei (DOT) amelian (AT) gmail.com -# -# Improvements and feedback are welcome -# -# This file is released under GPL >= 2 -# -################################################# - -add_subdirectory( caroot ) - -install( FILES ksslcalist DESTINATION ${CONFIG_INSTALL_DIR} ) diff --git a/kio/kssl/kssl/DigiCertAssuredIDRootCA.pem b/kio/kssl/kssl/DigiCertAssuredIDRootCA.pem deleted file mode 100644 index 2731638b6..000000000 --- a/kio/kssl/kssl/DigiCertAssuredIDRootCA.pem +++ /dev/null @@ -1,22 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIDtzCCAp+gAwIBAgIQDOfg5RfYRv6P5WD8G/AwOTANBgkqhkiG9w0BAQUFADBl -MQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3 -d3cuZGlnaWNlcnQuY29tMSQwIgYDVQQDExtEaWdpQ2VydCBBc3N1cmVkIElEIFJv -b3QgQ0EwHhcNMDYxMTEwMDAwMDAwWhcNMzExMTEwMDAwMDAwWjBlMQswCQYDVQQG -EwJVUzEVMBMGA1UEChMMR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/kssl/DigiCertGlobalRootCA.pem deleted file mode 100644 index fd4341df2..000000000 --- a/kio/kssl/kssl/DigiCertGlobalRootCA.pem +++ /dev/null @@ -1,22 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIDrzCCApegAwIBAgIQCDvgVpBCRrGhdWrJWZHHSjANBgkqhkiG9w0BAQUFADBh -MQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3 -d3cuZGlnaWNlcnQuY29tMSAwHgYDVQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBD -QTAeFw0wNjExMTAwMDAwMDBaFw0zMTExMTAwMDAwMDBaMGExCzAJBgNVBAYTAlVT -MRUwEwYDVQQKEwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5j -b20xIDAeBgNVBAMTF0RpZ2lDZXJ0IEdsb2JhbCBSb290IENBMIIBIjANBgkqhkiG -9w0BAQEFAAOCAQ8AMIIBCgKCAQEA4jvhEXLeqKTTo1eqUKKPC3eQyaKl7hLOllsB -CSDMAZOnTjC3U/dDxGkAV53ijSLdhwZAAIEJzs4bg7/fzTtxRuLWZscFs3YnFo97 -nh6Vfe63SKMI2tavegw5BmV/Sl0fvBf4q77uKNd0f3p4mVmFaG5cIzJLv07A6Fpt -43C/dxC//AH2hdmoRBBYMql1GNXRor5H4idq9Joz+EkIYIvUX7Q6hL+hqkpMfT7P -T19sdl6gSzeRntwi5m3OFBqOasv+zbMUZBfHWymeMr/y7vrTC0LUq7dBMtoM1O/4 -gdW7jVg/tRvoSSiicNoxBN33shbyTApOB6jtSj1etX+jkMOvJwIDAQABo2MwYTAO -BgNVHQ8BAf8EBAMCAYYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUA95QNVbR -TLtm8KPiGxvDl7I90VUwHwYDVR0jBBgwFoAUA95QNVbRTLtm8KPiGxvDl7I90VUw -DQYJKoZIhvcNAQEFBQADggEBAMucN6pIExIK+t1EnE9SsPTfrgT1eXkIoyQY/Esr -hMAtudXH/vTBH1jLuG2cenTnmCmrEbXjcKChzUyImZOMkXDiqw8cvpOp/2PV5Adg -06O/nVsJ8dWO41P0jmP6P6fbtGbfYmbW0W5BjfIttep3Sp+dWOIrWcBAI+0tKIJF -PnlUkiaY4IBIqDfv8NZ5YBberOgOzW6sRBc4L0na4UU+Krk2U886UAb3LujEV0ls -YSEY1QSteDwsOoBrp+uvFRTp2InBuThs4pFsiv9kuXclVzDAGySj4dzp30d8tbQk -CAUw7C29C79Fv1C5qfPrmAESrciIxpg0X40KPMbp1ZWVbd4= ------END CERTIFICATE----- diff --git a/kio/kssl/kssl/DigiCertHighAssuranceEVRootCA.pem b/kio/kssl/kssl/DigiCertHighAssuranceEVRootCA.pem deleted file mode 100644 index 9e6810ab7..000000000 --- a/kio/kssl/kssl/DigiCertHighAssuranceEVRootCA.pem +++ /dev/null @@ -1,23 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIDxTCCAq2gAwIBAgIQAqxcJmoLQJuPC3nyrkYldzANBgkqhkiG9w0BAQUFADBs -MQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3 -d3cuZGlnaWNlcnQuY29tMSswKQYDVQQDEyJEaWdpQ2VydCBIaWdoIEFzc3VyYW5j -ZSBFViBSb290IENBMB4XDTA2MTExMDAwMDAwMFoXDTMxMTExMDAwMDAwMFowbDEL -MAkGA1UEBhMCVVMxFTATBgNVBAoTDERpZ2lDZXJ0IEluYzEZMBcGA1UECxMQd3d3 -LmRpZ2ljZXJ0LmNvbTErMCkGA1UEAxMiRGlnaUNlcnQgSGlnaCBBc3N1cmFuY2Ug -RVYgUm9vdCBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMbM5XPm -+9S75S0tMqbf5YE/yc0lSbZxKsPVlDRnogocsF9ppkCxxLeyj9CYpKlBWTrT3JTW -PNt0OKRKzE0lgvdKpVMSOO7zSW1xkX5jtqumX8OkhPhPYlG++MXs2ziS4wblCJEM -xChBVfvLWokVfnHoNb9Ncgk9vjo4UFt3MRuNs8ckRZqnrG0AFFoEt7oT61EKmEFB -Ik5lYYeBQVCmeVyJ3hlKV9Uu5l0cUyx+mM0aBhakaHPQNAQTXKFx01p8VdteZOE3 -hzBWBOURtCmAEvF5OYiiAhF8J2a3iLd48soKqDirCmTCv2ZdlYTBoSUeh10aUAsg -EsxBu24LUTi4S8sCAwEAAaNjMGEwDgYDVR0PAQH/BAQDAgGGMA8GA1UdEwEB/wQF -MAMBAf8wHQYDVR0OBBYEFLE+w2kD+L9HAdSYJhoIAu9jZCvDMB8GA1UdIwQYMBaA -FLE+w2kD+L9HAdSYJhoIAu9jZCvDMA0GCSqGSIb3DQEBBQUAA4IBAQAcGgaX3Nec -nzyIZgYIVyHbIUf4KmeqvxgydkAQV8GK83rZEWWONfqe/EW1ntlMMUu4kehDLI6z -eM7b41N5cdblIZQB2lWHmiRk9opmzN6cN82oNLFpmyPInngiK3BD41VHMWEZ71jF -hS9OMPagMRYjyOfiZRYzy78aG6A9+MpeizGLYAiJLQwGXFK3xPkKmNEVX58Svnw2 -Yzi9RKR/5CYrCsSXaQ3pjOLAEFe4yHYSkVXySGnYvCoCWw9E1CAx2/S6cCZdkGCe -vEsXCS+0yx5DaMkHJ8HSXPfqIbloEpw8nL+e/IBcm2PN7EeqJSdnoDfzAIJ9VNep -+OkuE6N36B9K ------END CERTIFICATE----- diff --git a/kio/kssl/kssl/GeoTrust_Universal_CA.pem b/kio/kssl/kssl/GeoTrust_Universal_CA.pem deleted file mode 100644 index 31d9e7aa7..000000000 --- a/kio/kssl/kssl/GeoTrust_Universal_CA.pem +++ /dev/null @@ -1,32 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIFaDCCA1CgAwIBAgIBATANBgkqhkiG9w0BAQUFADBFMQswCQYDVQQGEwJVUzEW -MBQGA1UEChMNR2VvVHJ1c3QgSW5jLjEeMBwGA1UEA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w0BAQUFAAOCAgEAMXjmx7XfuJRAyXHEqDXsRh3ChfMoWIawC/yOsjmPRFWrZIRc -aanQmjg8+uUfNeVE44B5lGiku8SfPeE0zTBGi1QrlaXv9z+ZhP015s8xxtxqv6fX -IwjhmF7DWgh2qaavdy+3YL1ERmrvl/9zlcGO6JP7/TG37FcREUWbMPEaiDnBTzyn -ANXH/KttgCJwpQzgXQQpAvvLoJHRfNbDflDVnVi+QTjruXU8FdmbyUqDWcDaU/0z -uzYYm4UPFd3uLax2k7nZAY1IEKj79TiG8dsKxr2EoyNB3tZ3b4XUhRxQ4K5RirqN -Pnbiucon8l+f725ZDQbYKxek0nxru18UGkiPGkzns0ccjkxFKyDuSN/n3QmOGKja -QI2SJhFTYXNd673nxE0pN2HrrDktZy4W1vUAg4WhzH92xH3kt0tm7wNFYGm2DFKW -koRepqO1pD4r2czYG0eq8kTaT/kD6PAUyz/zg97QwVTjt+gKN02LIFkDMBmhLMi9 -ER/frslKxfMnZmaGrGiR/9nmUxwPi1xpZQomyB40w11Re9epnAahNt3ViZS82eQt -DF4JbAiXfKM9fJP/P6EUp8+1Xevb2xzEdt+Iub1FBZUbrvxGakyvSOPOrg/Sfuvm -bJxPgWp6ZKy7PtXny3YuxadIwVyQD8vIP/rmMuGNG2+k5o7Y+SlIis5z/iw= ------END CERTIFICATE----- - diff --git a/kio/kssl/kssl/GeoTrust_Universal_CA2.pem b/kio/kssl/kssl/GeoTrust_Universal_CA2.pem deleted file mode 100644 index b61946475..000000000 --- a/kio/kssl/kssl/GeoTrust_Universal_CA2.pem +++ /dev/null @@ -1,31 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIFbDCCA1SgAwIBAgIBATANBgkqhkiG9w0BAQUFADBHMQswCQYDVQQGEwJVUzEW -MBQGA1UEChMNR2VvVHJ1c3QgSW5jLjEgMB4GA1UEAxMXR2VvVHJ1c3QgVW5pdmVy -c2FsIENBIDIwHhcNMDQwMzA0MDUwMDAwWhcNMjkwMzA0MDUwMDAwW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oS9tcBc0kf5nfo/sm+VegqlVHy/c1FEHEv6sFj4sNcZj/NwQ6w2jqtB8zNHQ -L1EuxBRa3ugZ4T7GzKQp5y6EqgYweHZUcyiYWTjgAA1i00J9IZ+uPTqM1fp3DRgr -Fg5fNuH8KrUwJM/gYwx7WBr+mbpCErGR9Hxo4sjoryzqyX6uuyo9DRXcNJW2GHSo -ag/HtPQTxORb7QrSpJdMKu0vbBKJPfEncKpqA1Ihn0CoZ1Dy81of398j9tx4TuaY -T1U6U+Pv8vSfx3zYWK8pIpe44L2RLrB27FcRz+8pRPPphXpgY+RdM4kX2TGq2tbz -GDVyz4crL2MjhF2EjD9XoIj8mZEoJmmZ1I+XRL6O1UixpCgp8RW04eWe3fiPpm8m -1wk8OhwRDqZsN/etRIcsKMfYdIKz0G9KV7s1KSegi+ghp4dkNl3M2Basx7InQJJV -OCiNUW7dFGdTbHFcJoRNdVq2fmBWqU2t+5sel/MN2dKXVHfaPRK34B7vCAas+YWH -6aLcr34YEoP9VhdBLtUpgn2Z9DH2canPLAEnpQW5qrJITirvn5NSUZU8UnOOVkwX -QMAJKOSLakhT2+zNVVXxxvjpoixMptEmX36vWkzaH6byHCx+rgIW0lbQL1dTR+iS ------END CERTIFICATE----- \ No newline at end of file diff --git a/kio/kssl/kssl/HOWTO b/kio/kssl/kssl/HOWTO deleted file mode 100644 index 9a74e418b..000000000 --- a/kio/kssl/kssl/HOWTO +++ /dev/null @@ -1,30 +0,0 @@ - -NOTE: If you want to add a root file, please contact kde-core-devel and the -maintainer (currently bradh@kde.org) with full details. - - -1) Build cert_extract -2) Make a directory 'certtmp' -3) cd 'certtmp' -4) Run ../cert_extract /path/to/netscape/cert7.db - This will create many files and an index -5) Remove the TrustCenter level 0 certificate. -6) Merge these files into a bundle with: - ../cert_bundle /path/to/netscape/cert7.db cert.index ../caroot/ca-bundle.crt -7) Merge these files into a KDE config file with: - ../certkde -8) mv ksslcalist ../ -9) Merge in the local certs that we added ourselves with: - cd .. - ./mergelocal -10) *Do your diffs*! Make *sure* you commit what you think you are committing. -11) svn commit - - - - -To add local files: -1) Create the .pem file and check it into cvs in tdelibs/kio/kssl/kssl. -2) List the pem file name as a single line in 'localcerts'. - - diff --git a/kio/kssl/kssl/Makefile.am b/kio/kssl/kssl/Makefile.am deleted file mode 100644 index a7ad33e95..000000000 --- a/kio/kssl/kssl/Makefile.am +++ /dev/null @@ -1,6 +0,0 @@ - -SUBDIRS = caroot - -confdir = $(kde_confdir) -conf_DATA = ksslcalist - diff --git a/kio/kssl/kssl/StartCom.pem b/kio/kssl/kssl/StartCom.pem deleted file mode 100644 index a7c9b39a0..000000000 --- a/kio/kssl/kssl/StartCom.pem +++ /dev/null @@ -1,148 +0,0 @@ -Certificate: - Data: - Version: 3 (0x2) - Serial Number: 1 (0x1) - Signature Algorithm: sha1WithRSAEncryption - Issuer: C=IL, O=StartCom Ltd., OU=Secure Digital Certificate Signing, CN=StartCom Certification Authority - Validity - Not Before: Sep 17 19:46:36 2006 GMT - Not After : Sep 17 19:46:36 2036 GMT - Subject: C=IL, O=StartCom Ltd., OU=Secure Digital Certificate Signing, CN=StartCom Certification Authority - Subject Public Key Info: - Public Key Algorithm: rsaEncryption - RSA Public Key: (4096 bit) - Modulus (4096 bit): - 00:c1:88:db:09:bc:6c:46:7c:78:9f:95:7b:b5:33: - 90:f2:72:62:d6:c1:36:20:22:24:5e:ce:e9:77:f2: - 43:0a:a2:06:64:a4:cc:8e:36:f8:38:e6:23:f0:6e: - 6d:b1:3c:dd:72:a3:85:1c:a1:d3:3d:b4:33:2b:d3: - 2f:af:fe:ea:b0:41:59:67:b6:c4:06:7d:0a:9e:74: - 85:d6:79:4c:80:37:7a:df:39:05:52:59:f7:f4:1b: - 46:43:a4:d2:85:85:d2:c3:71:f3:75:62:34:ba:2c: - 8a:7f:1e:8f:ee:ed:34:d0:11:c7:96:cd:52:3d:ba: - 33:d6:dd:4d:de:0b:3b:4a:4b:9f:c2:26:2f:fa:b5: - 16:1c:72:35:77:ca:3c:5d:e6:ca:e1:26:8b:1a:36: - 76:5c:01:db:74:14:25:fe:ed:b5:a0:88:0f:dd:78: - ca:2d:1f:07:97:30:01:2d:72:79:fa:46:d6:13:2a: - a8:b9:a6:ab:83:49:1d:e5:f2:ef:dd:e4:01:8e:18: - 0a:8f:63:53:16:85:62:a9:0e:19:3a:cc:b5:66:a6: - c2:6b:74:07:e4:2b:e1:76:3e:b4:6d:d8:f6:44:e1: - 73:62:1f:3b:c4:be:a0:53:56:25:6c:51:09:f7:aa: - ab:ca:bf:76:fd:6d:9b:f3:9d:db:bf:3d:66:bc:0c: - 56:aa:af:98:48:95:3a:4b:df:a7:58:50:d9:38:75: - a9:5b:ea:43:0c:02:ff:99:eb:e8:6c:4d:70:5b:29: - 65:9c:dd:aa:5d:cc:af:01:31:ec:0c:eb:d2:8d:e8: - ea:9c:7b:e6:6e:f7:27:66:0c:1a:48:d7:6e:42:e3: - 3f:de:21:3e:7b:e1:0d:70:fb:63:aa:a8:6c:1a:54: - b4:5c:25:7a:c9:a2:c9:8b:16:a6:bb:2c:7e:17:5e: - 05:4d:58:6e:12:1d:01:ee:12:10:0d:c6:32:7f:18: - ff:fc:f4:fa:cd:6e:91:e8:36:49:be:1a:48:69:8b: - c2:96:4d:1a:12:b2:69:17:c1:0a:90:d6:fa:79:22: - 48:bf:ba:7b:69:f8:70:c7:fa:7a:37:d8:d8:0d:d2: - 76:4f:57:ff:90:b7:e3:91:d2:dd:ef:c2:60:b7:67: - 3a:dd:fe:aa:9c:f0:d4:8b:7f:72:22:ce:c6:9f:97: - b6:f8:af:8a:a0:10:a8:d9:fb:18:c6:b6:b5:5c:52: - 3c:89:b6:19:2a:73:01:0a:0f:03:b3:12:60:f2:7a: - 2f:81:db:a3:6e:ff:26:30:97:f5:8b:dd:89:57:b6: - ad:3d:b3:af:2b:c5:b7:76:02:f0:a5:d6:2b:9a:86: - 14:2a:72:f6:e3:33:8c:5d:09:4b:13:df:bb:8c:74: - 13:52:4b - Exponent: 65537 (0x10001) - X509v3 extensions: - X509v3 Basic Constraints: - CA:TRUE - X509v3 Key Usage: - Digital Signature, Key Encipherment, Key Agreement, Certificate Sign, CRL Sign - X509v3 Subject Key Identifier: - 4E:0B:EF:1A:A4:40:5B:A5:17:69:87:30:CA:34:68:43:D0:41:AE:F2 - X509v3 CRL Distribution Points: - URI:http://cert.startcom.org/sfsca-crl.crl - URI:http://crl.startcom.org/sfsca-crl.crl - - X509v3 Certificate Policies: - Policy: ca_policy_id - CPS: http://cert.startcom.org/policy.pdf - CPS: http://cert.startcom.org/intermediate.pdf - User Notice: - Organization: Start Commercial (StartCom) Ltd. - Number: 1 - Explicit Text: Limited Liability, read the section *Legal Limitations* of the StartCom Certification Authority Policy available at http://cert.startcom.org/policy.pdf - - Netscape Cert Type: - SSL CA, S/MIME CA, Object Signing CA - Netscape Comment: - StartCom Free SSL Certification Authority - Signature Algorithm: sha1WithRSAEncryption - 16:6c:99:f4:66:0c:34:f5:d0:85:5e:7d:0a:ec:da:10:4e:38: - 1c:5e:df:a6:25:05:4b:91:32:c1:e8:3b:f1:3d:dd:44:09:5b: - 07:49:8a:29:cb:66:02:b7:b1:9a:f7:25:98:09:3c:8e:1b:e1: - dd:36:87:2b:4b:bb:68:d3:39:66:3d:a0:26:c7:f2:39:91:1d: - 51:ab:82:7b:7e:d5:ce:5a:e4:e2:03:57:70:69:97:08:f9:5e: - 58:a6:0a:df:8c:06:9a:45:16:16:38:0a:5e:57:f6:62:c7:7a: - 02:05:e6:bc:1e:b5:f2:9e:f4:a9:29:83:f8:b2:14:e3:6e:28: - 87:44:c3:90:1a:de:38:a9:3c:ac:43:4d:64:45:ce:dd:28:a9: - 5c:f2:73:7b:04:f8:17:e8:ab:b1:f3:2e:5c:64:6e:73:31:3a: - 12:b8:bc:b3:11:e4:7d:8f:81:51:9a:3b:8d:89:f4:4d:93:66: - 7b:3c:03:ed:d3:9a:1d:9a:f3:65:50:f5:a0:d0:75:9f:2f:af: - f0:ea:82:43:98:f8:69:9c:89:79:c4:43:8e:46:72:e3:64:36: - 12:af:f7:25:1e:38:89:90:77:7e:c3:6b:6a:b9:c3:cb:44:4b: - ac:78:90:8b:e7:c7:2c:1e:4b:11:44:c8:34:52:27:cd:0a:5d: - 9f:85:c1:89:d5:1a:78:f2:95:10:53:32:dd:80:84:66:75:d9: - b5:68:28:fb:61:2e:be:84:a8:38:c0:99:12:86:a5:1e:67:64: - ad:06:2e:2f:a9:70:85:c7:96:0f:7c:89:65:f5:8e:43:54:0e: - ab:dd:a5:80:39:94:60:c0:34:c9:96:70:2c:a3:12:f5:1f:48: - 7b:bd:1c:7e:6b:b7:9d:90:f4:22:3b:ae:f8:fc:2a:ca:fa:82: - 52:a0:ef:af:4b:55:93:eb:c1:b5:f0:22:8b:ac:34:4e:26:22: - 04:a1:87:2c:75:4a:b7:e5:7d:13:d7:b8:0c:64:c0:36:d2:c9: - 2f:86:12:8c:23:09:c1:1b:82:3b:73:49:a3:6a:57:87:94:e5: - d6:78:c5:99:43:63:e3:4d:e0:77:2d:e1:65:99:72:69:04:1a: - 47:09:e6:0f:01:56:24:fb:1f:bf:0e:79:a9:58:2e:b9:c4:09: - 01:7e:95:ba:6d:00:06:3e:b2:ea:4a:10:39:d8:d0:2b:f5:bf: - ec:75:bf:97:02:c5:09:1b:08:dc:55:37:e2:81:fb:37:84:43: - 62:20:ca:e7:56:4b:65:ea:fe:6c:c1:24:93:24:a1:34:eb:05: - ff:9a:22:ae:9b:7d:3f:f1:65:51:0a:a6:30:6a:b3:f4:88:1c: - 80:0d:fc:72:8a:e8:83:5e ------BEGIN CERTIFICATE----- -MIIHyTCCBbGgAwIBAgIBATANBgkqhkiG9w0BAQUFADB9MQswCQYDVQQGEwJJTDEW -MBQGA1UEChMNU3RhcnRDb20gTHRkLjErMCkGA1UECxMiU2VjdXJlIERpZ2l0YWwg -Q2VydGlmaWNhdGUgU2lnbmluZzEpMCcGA1UEAxMgU3RhcnRDb20gQ2VydGlmaWNh -dGlvbiBBdXRob3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Qi+fHLB5L -EUTINFInzQpdn4XBidUaePKVEFMy3YCEZnXZtWgo+2EuvoSoOMCZEoalHmdkrQYu -L6lwhceWD3yJZfWOQ1QOq92lgDmUYMA0yZZwLKMS9R9Ie70cfmu3nZD0Ijuu+Pwq -yvqCUqDvr0tVk+vBtfAii6w0TiYiBKGHLHVKt+V9E9e4DGTANtLJL4YSjCMJwRuC -O3NJo2pXh5Tl1njFmUNj403gdy3hZZlyaQQaRwnmDwFWJPsfvw55qVguucQJAX6V -um0ABj6y6koQOdjQK/W/7HW/lwLFCRsI3FU34oH7N4RDYiDK51ZLZer+bMEkkySh -NOsF/5oirpt9P/FlUQqmMGqz9IgcgA38corog14= ------END CERTIFICATE----- diff --git a/kio/kssl/kssl/SwissSign-Gold-G2.pem b/kio/kssl/kssl/SwissSign-Gold-G2.pem deleted file mode 100644 index d72118781..000000000 --- a/kio/kssl/kssl/SwissSign-Gold-G2.pem +++ /dev/null @@ -1,33 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIFujCCA6KgAwIBAgIJALtAHEP1Xk+wMA0GCSqGSIb3DQEBBQUAMEUxCzAJBgNV -BAYTAkNIMRUwEwYDVQQKEwxTd2lzc1NpZ24gQUcxHzAdBgNVBAMTFlN3aXNzU2ln -biBHb2xkIENBIC0gRzIwHhcNMDYxMDI1MDgzMDM1WhcNMzYxMDI1MDgzMDM1WjBF -MQswCQYDVQQGEwJDSDEVMBMGA1UEChMMU3dpc3NTaWduIEFHMR8wHQYDVQQDExZT -d2lzc1NpZ24gR29sZCBDQSAtIEcyMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIIC -CgKCAgEAr+TufoskDhJuqVAtFkQ7kpJcyrhdhJJCEyq8ZVeCQD5XJM1QiyUqt2/8 -76LQwB8CJEoTlo8jE+YoWACjR8cGp4QjK7u9lit/VcyLwVcfDmJlD909Vopz2q5+ -bbqBHH5CjCA12UNNhPqE21Is8w4ndwtrvxEvcnifLtg+5hg3Wipy+dpikJKVyh+c -6bM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tI5z0V9QkvfsywexcZdylU6oJxpmo/a -77KwPJ+HbBIrZXAVUjEaJM9vMSNQH4xPjyPDdEFjHFWoFN0+4FFQz/EbMFYOkrCC -hdiDyyJkvC24JdVUorgG6q2SpCSgwYa1ShNqR88uC1aVVMvOmttqtKay20EIhid3 -92qgQmwLOM7XdVAyksLfKzAiSNDVQTglXaTpXZ/GlHXQRf0wl0OPkKsKx4ZzYEpp -Ld6leNcG2mqeSz53OiATIgHQv2ieY2BrNU0LbbqhPcCT4H8js1WtciVORvnSFu+w -ZMEBnunKoGqYDs/YYPIvSbjkQuE4NRb0yG5P94FW6LqjviOvrv1vA+ACOzB2+htt -Qc8Bsem4yWb02ybzOqR08kkkW8mw0FfB+j564ZfJ ------END CERTIFICATE----- diff --git a/kio/kssl/kssl/SwissSign-Platinum-G2.pem b/kio/kssl/kssl/SwissSign-Platinum-G2.pem deleted file mode 100644 index 0aa3e3577..000000000 --- a/kio/kssl/kssl/SwissSign-Platinum-G2.pem +++ /dev/null @@ -1,33 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIFwTCCA6mgAwIBAgIITrIAZwwDXU8wDQYJKoZIhvcNAQEFBQAwSTELMAkGA1UE -BhMCQ0gxFTATBgNVBAoTDFN3aXNzU2lnbiBBRzEjMCEGA1UEAxMaU3dpc3NTaWdu -IFBsYXRpbnVtIENBIC0gRzIwHhcNMDYxMDI1MDgzNjAwWhcNMzYxMDI1MDgzNjAw -WjBJMQswCQYDVQQGEwJDSDEVMBMGA1UEChMMU3dpc3NTaWduIEFHMSMwIQYDVQQD -ExpTd2lzc1NpZ24gUGxhdGludW0gQ0EgLSBHMjCCAiIwDQYJKoZIhvcNAQEBBQAD -ggIPADCCAgoCggIBAMrfogLi2vj8Bxax3mCq3pZcZB/HL37PZ/pEQtZ2Y5Wu669y -IIpFR4ZieIbWIDkm9K6j/SPnpZy1IiEZtzeTIsBQnIJ71NUERFzLtMKfkr4k2Htn -IuJpX+UFeNSH2XFwMyVTtIc7KZAoN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4ooTHbG/ -u0IdUt1O2BReEMYxB+9xJ/cbOQncguqLs5WGXv312l0xpuAxtpTmREl0xRbl9x8D -YSjFyMsSoEJL+WuICI20MhjzdZ/EfwBPBZWcoxcCw7NTm6ogOSkrZvqdr16zktK1 -puEa+S1BaYEUtLS17Yk9zvupnTVCRLEcFHOBzyoBNZox1S2PbYTfgE1X4z/FhHXa -icYwu+uPyyIIoK6q8QNsOktNCaUOcsZWayFCTiMlFGiudgp8DAdwZPmaL/YFOSbG -DI8Zf0NebvRbFS/bYV3mZy8/CJT5YLSYMdp08YSTcU1f+2BY0fvEwW2JorsgH51x -kcsymxM9Pn2SUjWskpSi0xjCfMfqr3YFFt1nJ8J+HAciIfNAChs0B0QTwoRqjt8Z -Wr9/6x3iGjjRXK9HkmuAtTClyY3YqzGBH9/CZjfTk6mFhnll0g== ------END CERTIFICATE----- diff --git a/kio/kssl/kssl/SwissSign-Silver-G2.pem b/kio/kssl/kssl/SwissSign-Silver-G2.pem deleted file mode 100644 index 67a172cb6..000000000 --- a/kio/kssl/kssl/SwissSign-Silver-G2.pem +++ /dev/null @@ -1,33 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIFvTCCA6WgAwIBAgIITxvUL1S7L0swDQYJKoZIhvcNAQEFBQAwRzELMAkGA1UE -BhMCQ0gxFTATBgNVBAoTDFN3aXNzU2lnbiBBRzEhMB8GA1UEAxMYU3dpc3NTaWdu -IFNpbHZlciBDQSAtIEcyMB4XDTA2MTAyNTA4MzI0NloXDTM2MTAyNTA4MzI0Nlow -RzELMAkGA1UEBhMCQ0gxFTATBgNVBAoTDFN3aXNzU2lnbiBBRzEhMB8GA1UEAxMY -U3dpc3NTaWduIFNpbHZlciBDQSAtIEcyMIICIjANBgkqhkiG9w0BAQEFAAOCAg8A -MIICCgKCAgEAxPGHf9N4Mfc4yfjDmUO8x/e8N+dOcbpLj6VzHVxumK4DV644N0Mv -Fz0fyM5oEMF4rhkDKxD6LHmD9ui5aLlV8gREpzn5/ASLH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QEsixT2tOnqfGhpHkXkzuoLcMmkDlm4fS/Bx/uNncqCxv1yL5PqZ -IseEuRuNI5c/7SXgz2W79WEE790eslpBIlqhn10s6FvJbakMDHiqYMZWjwFaDGi8 -aRl5xB9+lwW/xekkUV7U1UtT7dkjWjYDZaPBA61BMPNGG4WQr2W11bHkFlt4dR2X -em1ZqSqPe97Dh4kQmUlzeMg9vVE1dCrV8X5pGyq7O70luJpaPXJhkGaH7gzWTdQR -dAtq/gsD/KNVV4n+SsuuWxcFyPKNIzFTONItaj+CuY0IavdeQXRuwxF+B6wpYJE/ -OMpXEA29MC/HpeZBoNquBYeaoKRlbEwJDIm6uNO5wJOKMPqN5ZprFQFOZ6raYlY+ -hAhm0sQ2fac+EPyI4NSA5QC9qvNOBqN6avlicuMJT+ubDgEj8Z+7fNzcbBGXJbLy -tGMU0gYqZ4yD9c7qB9iaah7s5Aq7KkzrCWA5zspi2C5u ------END CERTIFICATE----- diff --git a/kio/kssl/kssl/WiseKey.pem b/kio/kssl/kssl/WiseKey.pem deleted file mode 100644 index a695c21bb..000000000 --- a/kio/kssl/kssl/WiseKey.pem +++ /dev/null @@ -1,24 +0,0 @@ ------BEGIN CERTIFICATE----- -MIID8TCCAtmgAwIBAgIQQT1yx/RrH4FDffHSKFTfmjANBgkqhkiG9w0BAQUFADCB -ijELMAkGA1UEBhMCQ0gxEDAOBgNVBAoTB1dJU2VLZXkxGzAZBgNVBAsTEkNvcHly -aWdodCAoYykgMjAwNTEiMCAGA1UECxMZT0lTVEUgRm91bmRhdGlvbiBFbmRvcnNl -ZDEoMCYGA1UEAxMfT0lTVEUgV0lTZUtleSBHbG9iYWwgUm9vdCBHQSBDQTAeFw0w -NTEyMTExNjAzNDRaFw0zNzEyMTExNjA5NTFaMIGKMQswCQYDVQQGEwJDSDEQMA4G -A1UEChMHV0lTZUtleTEbMBkGA1UECxMSQ29weXJpZ2h0IChjKSAyMDA1MSIwIAYD -VQQLExlPSVNURSBGb3VuZGF0aW9uIEVuZG9yc2VkMSgwJgYDVQQDEx9PSVNURSBX -SVNlS2V5IEdsb2JhbCBSb290IEdBIENBMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8A -MIIBCgKCAQEAy0+zAJs9Nt350UlqaxBJH+zYK7LG+DKBKUOVTJoZIyEVRd7jyBxR -VVuuk+g3/ytr6dTqvirdqFEr12bDYVxgAsj1znJ7O7jyTmUIms2kahnBAbtzptf2 -w93NvKSLtZlhuAGio9RN1AU9ka34tAhxZK9w8RxrfvbDd50kc3vkDIzh2TbhmYsF -mQvtRTEJysIA2/dyoJaqlYfQjse2YXMNdmaM3Bu0Y6Kff5MTMPGhJ9vZ/yxViJGg -4E8HsChWjBgbl0SOid3gF27nKu+POQoxhILYQBRJLnpB5Kf+42TMwVlxSywhp1t9 -4B3RLoGbw9ho972WG6xwsRYUC9tguSYBBQIDAQABo1EwTzALBgNVHQ8EBAMCAYYw -DwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUswN+rja8sHnR3JQmthG+IbJphpQw -EAYJKwYBBAGCNxUBBAMCAQAwDQYJKoZIhvcNAQEFBQADggEBAEuh/wuHbrP5wUOx -SPMowB0uyQlB+pQAHKSkq0lPjz0e701vvbyk9vImMMkQyh2I+3QZH4VFvbBsUfk2 -ftv1TDI6QU9bR8/oCy22xBmddMVHxjtqD6wU2zz0c5ypBd8A3HR4+vg1YFkCExh8 -vPtNsCBtQ7tgMHpnM1zFmdH4LTlSc/uMqpclXHLZCB6rTjzjgTGfA6b7wP4piFXa -hNVQA7bihKOmNqoROgHhGEvWRGizPflTdISzRpFGlgC3gCy24eMQ4tui5yiPAZZi -Fj4A4xylNoEYokxSdsARo27mHbrjWr42U8U+dY+GaSlYU7Wcu2+fXMUY7N0v4ZjJ -/L7fCg0= ------END CERTIFICATE----- diff --git a/kio/kssl/kssl/ac_offline_raiz_certicamara.pem b/kio/kssl/kssl/ac_offline_raiz_certicamara.pem deleted file mode 100644 index c60cce890..000000000 --- a/kio/kssl/kssl/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y3/pDceiz+/ -RL5hRqGEPQgnTIEgd4kI6mdAXmwIUV80WoyWaM3X94nCHNMyAK9Sy9NgWyo6R35r -MDOhYil/SrnhLecUIw4OGEfhefwVVdCx/CVxY3UzHCMrr1zZ7Ud3YA47Dx7SwNxk -BYn8eNZcLCZDqQ== ------END CERTIFICATE----- diff --git a/kio/kssl/kssl/argedaten-root-ca-cert.pem b/kio/kssl/kssl/argedaten-root-ca-cert.pem deleted file mode 100644 index 621e30e20..000000000 --- a/kio/kssl/kssl/argedaten-root-ca-cert.pem +++ /dev/null @@ -1,23 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIDwzCCAyygAwIBAgIBADANBgkqhkiG9w0BAQQFADCBmDELMAkGA1UEBhMCQVQx -EDAOBgNVBAgTB0F1c3RyaWExDzANBgNVBAcTBlZpZW5uYTFCMEAGA1UEChM5QXJn -ZSBEYXRlbiBPZXN0ZXJyZWljaGlzY2hlIEdlc2VsbHNjaGFmdCBmdWVyIERhdGVu -c2NodXR6MSIwIAYJKoZIhvcNAQkBFhNhLWNlcnRAYXJnZWRhdGVuLmF0MB4XDTAx -MDIxMjExMzAzMFoXDTA5MDIxMjExMzAzMFowgZgxCzAJBgNVBAYTAkFUMRAwDgYD -VQQIEwdBdXN0cmlhMQ8wDQYDVQQHEwZWaWVubmExQjBABgNVBAoTOUFyZ2UgRGF0 -ZW4gT2VzdGVycmVpY2hpc2NoZSBHZXNlbGxzY2hhZnQgZnVlciBEYXRlbnNjaHV0 -ejEiMCAGCSqGSIb3DQEJARYTYS1jZXJ0QGFyZ2VkYXRlbi5hdDCBnzANBgkqhkiG -9w0BAQEFAAOBjQAwgYkCgYEAwgsHqoNtmmrJ86+e1I4hOVBaL4kokqKN2IPOIL+1 -XwY8vfOOUfPEdhWpaC0ldt7VYrksgDiUccgH0FROANWK2GkfKMDzjjXHysR04uEb -Om7Kqjqn0nproOGkFG+QvBZgs+Ws+HXNFJA6V76fU4+JXq4452LSK4Lr5YcBquu3 -NJECAwEAAaOCARkwggEVMB0GA1UdDgQWBBQ0j59zH/G31zRjgK1y2P//tSAWZjCB -xQYDVR0jBIG9MIG6gBQ0j59zH/G31zRjgK1y2P//tSAWZqGBnqSBmzCBmDELMAkG -A1UEBhMCQVQxEDAOBgNVBAgTB0F1c3RyaWExDzANBgNVBAcTBlZpZW5uYTFCMEAG -A1UEChM5QXJnZSBEYXRlbiBPZXN0ZXJyZWljaGlzY2hlIEdlc2VsbHNjaGFmdCBm -dWVyIERhdGVuc2NodXR6MSIwIAYJKoZIhvcNAQkBFhNhLWNlcnRAYXJnZWRhdGVu -LmF0ggEAMAwGA1UdEwQFMAMBAf8wCwYDVR0PBAQDAgEGMBEGCWCGSAGG+EIBAQQE -AwICBDANBgkqhkiG9w0BAQQFAAOBgQBFuJYncqMYB6gXQS3eDOI90BEHfFTKy/dV -AV+K7QdAYikWmqgBheRdPKddJdccPy/Zl/p3ZT7GhDyC5f3wZjcuu8AJ27BNwbCA -x54dgxgCNcyPm79nY8MRtEdEpoRGdSsFKJemz6hpXM++MWFciyrRWIIA44XB0Gv3 -US0spjsDPQ== ------END CERTIFICATE----- diff --git a/kio/kssl/kssl/belgacom.pem b/kio/kssl/kssl/belgacom.pem deleted file mode 100644 index 0b581a774..000000000 --- a/kio/kssl/kssl/belgacom.pem +++ /dev/null @@ -1,16 +0,0 @@ ------BEGIN CERTIFICATE----- -MIICiTCCAfKgAwIBAgIEN4dnrDANBgkqhkiG9w0BAQUFADB1MQswCQYDVQQGEwJi -ZTERMA8GA1UEChMIQmVsZ2Fjb20xDDAKBgNVBAsTA01UTTEkMCIGA1UEAxMbQmVs -Z2Fjb20gRS1UcnVzdCBQcmltYXJ5IENBMR8wHQYKCZImiZPyLGQBAxQPaW5mb0Bl -LXRydXN0LmJlMB4XDTk4MTEwNDEzMDQzOVoXDTEwMDEyMTEzMDQzOVowdTELMAkG -A1UEBhMCYmUxETAPBgNVBAoTCEJlbGdhY29tMQwwCgYDVQQLEwNNVE0xJDAiBgNV -BAMTG0JlbGdhY29tIEUtVHJ1c3QgUHJpbWFyeSBDQTEfMB0GCgmSJomT8ixkAQMU -D2luZm9AZS10cnVzdC5iZTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAqtm5 -s9VPak3FQdB7BGFqi3GBB9pk41huJ1XCrc4XsPz6ko0I8Bxy/7LDMf7gaoeXTMxD -V6coeTq1g12kHWrxasU+FCIdWQZv8KYxd9ywSTjmywwP/qpyNIjaKDohWu50Kxuk -21sTFrVzX8OujNLAPj2wy/Dsi4YLwsFEGFpjqNUCAwEAAaMmMCQwDwYDVR0TBAgw -BgEB/wIBATARBglghkgBhvhCAQEEBAMCAAcwDQYJKoZIhvcNAQEFBQADgYEAerKx -pbF9M+nC4RvO05OMfwH9Gx1amq6rB1Ev7Ymr3VBCux//SrWknLFhKQpM6oNZSY2v -hmnXgaxHqqRxblnvynxqblSK2qiSyfVms3lf1IsBniFjRjWTpcJfImIDcB1jI+hr -SB0jECfY9t9HorrsgFBKbMRwpnrkdCJ/9oRiMn8= ------END CERTIFICATE----- diff --git a/kio/kssl/kssl/caroot/CMakeLists.txt b/kio/kssl/kssl/caroot/CMakeLists.txt deleted file mode 100644 index 05e2381a9..000000000 --- a/kio/kssl/kssl/caroot/CMakeLists.txt +++ /dev/null @@ -1,12 +0,0 @@ -################################################# -# -# (C) 2010 Serghei Amelian -# serghei (DOT) amelian (AT) gmail.com -# -# Improvements and feedback are welcome -# -# This file is released under GPL >= 2 -# -################################################# - -install( FILES ca-bundle.crt DESTINATION ${DATA_INSTALL_DIR}/kssl ) diff --git a/kio/kssl/kssl/caroot/Makefile.am b/kio/kssl/kssl/caroot/Makefile.am deleted file mode 100644 index cd049a036..000000000 --- a/kio/kssl/kssl/caroot/Makefile.am +++ /dev/null @@ -1,4 +0,0 @@ - -kssldatadir = $(kde_datadir)/kssl -kssldata_DATA = ca-bundle.crt - diff --git a/kio/kssl/kssl/caroot/ca-bundle.crt b/kio/kssl/kssl/caroot/ca-bundle.crt deleted file mode 100644 index 31409b62f..000000000 --- a/kio/kssl/kssl/caroot/ca-bundle.crt +++ /dev/null @@ -1,2973 +0,0 @@ -## -## ca-bundle.crt -- Bundle of CA Certificates -## Last Modified: Tue Jun 30 02:55:18 UTC 2009 -## -## This is a bundle of X.509 certificates of public -## Certificate Authorities (CA). -## - ------BEGIN CERTIFICATE----- -MIIDtTCCAp2gAwIBAgIRANAeQJAAAEZSAAAAAQAAAAQwDQYJKoZIhvcNAQEFBQAw -gYkxCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJEQzETMBEGA1UEBxMKV2FzaGluZ3Rv -bjEXMBUGA1UEChMOQUJBLkVDT00sIElOQy4xGTAXBgNVBAMTEEFCQS5FQ09NIFJv -b3QgQ0ExJDAiBgkqhkiG9w0BCQEWFWFkbWluQGRpZ3NpZ3RydXN0LmNvbTAeFw05 -OTA3MTIxNzMzNTNaFw0wOTA3MDkxNzMzNTNaMIGJMQswCQYDVQQGEwJVUzELMAkG -A1UECBMCREMxEzARBgNVBAcTCldhc2hpbmd0b24xFzAVBgNVBAoTDkFCQS5FQ09N -LCBJTkMuMRkwFwYDVQQDExBBQkEuRUNPTSBSb290IENBMSQwIgYJKoZIhvcNAQkB -FhVhZG1pbkBkaWdzaWd0cnVzdC5jb20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAw -ggEKAoIBAQCx0xHgeVVDBwhMywVCAOINg0Y95JO6tgbTDVm9PsHOQ2cBiiGo77zM -0KLMsFWWU4RmBQDaREmA2FQKpSWGlO1jVv9wbKOhGdJ4vmgqRF4vz8wYXke8OrFG -PR7wuSw0X4x8TAgpnUBV6zx9g9618PeKgw6hTLQ6pbNfWiKX7BmbwQVo/ea3qZGU -LOR4SCQaJRk665WcOQqKz0Ky8BzVX/tr7WhWezkscjiw7pOp03t3POtxA6k4ShZs -iSrK2jMTecJVjO2cu/LLWxD4LmE1xilMKtAqY9FlWbT4zfn0AIS2V0KFnTKo+SpU -+/94Qby9cSj0u5C8/5Y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owkHOBpinPkDX3clFDIUfWiw0Ro08s8SrrFqR -8Szwbrj52Xv1RM56oGqCjnkvJctxihODV7NcpxoAFjIZokDom0q6zPrrTUsLFQov -Plovc3w5hmALiDMshaTvE1nm3Psn4yQ+FlRE8epTZrQiIGypZkZC6lcz0mYawueW -cThYWGFhVG4ktQzOjjNRsNxopW+W7cF1zQTxiWUDnxIKSj7gtdQ2jiubxEEhfVag -r8DMtAccNVTZVURpGi56TptOOuotrTqqC+2GviW4hlxvdvmuQN0OlXlUwzz2Trxc -FamNnuA54lZw/8arLtxsFmHrcnPw53+1spumLD0S5UkxHNu40h6LIVpZz3H+0rLz -uFofTfiyMjcfK2AyHQTgUCbsrvgNuLDQUbyFGVchdFUkhztX3DhEVnxnnrpY4BVj -QdTqWIvw7lGlSuDCjxEQAOc= ------END CERTIFICATE----- - ------BEGIN CERTIFICATE----- -MIICWjCCAcMCAgGlMA0GCSqGSIb3DQEBBAUAMHUxCzAJBgNVBAYTAlVTMRgwFgYD -VQQKEw9HVEUgQ29ycG9yYXRpb24xJzAlBgNVBAsTHkdURSBDeWJlclRydXN0IFNv -bHV0aW9ucywgSW5jLjEjMCEGA1UEAxMaR1RFIEN5YmVyVHJ1c3QgR2xvYmFsIFJv -b3QwHhcNOTgwODEzMDAyOTAwWhcNMTgwODEzMjM1OTAwWjB1MQswCQYDVQQGEwJV -UzEYMBYGA1UEChMPR1RFIENvcnBvcmF0aW9uMScwJQYDVQQLEx5HVEUgQ3liZXJU -cnVzdCBTb2x1dGlvbnMsIEluYy4xIzAhBgNVBAMTGkdURSBDeWJlclRydXN0IEds -b2JhbCBSb290MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCVD6C28FCc6HrH -iM3dFw4usJTQGz0O9pTAipTHBsiQl8i4ZBp6fmw8U+E3KHNgf7KXUwefU/ltWJTS -r41tiGeA5u2ylc9yMcqlHHK6XALnZELn+aks1joNrI1CqiQBOeacPwGFVw1Yh0X4 -04Wqk2kmhXBIgD8SFcd5tB8FLztimQIDAQABMA0GCSqGSIb3DQEBBAUAA4GBAG3r -GwnpXtlR22ciYaQqPEh346B8pt5zohQDhT37qw4wxYMWM4ETCJ57NE7fQMh017l9 -3PR2VX2bY1QY6fDq81yx2YtCHrnAlU66+tXifPVoYb+O7AWXX1uw16OFNMQkpw0P -lZPvy5TYnh+dXIVtx6quTx8itc2VrbqnzPmrC3p/ ------END CERTIFICATE----- - ------BEGIN CERTIFICATE----- -MIICETCCAXoCAU4wDQYJKoZIhvcNAQEEBQAwUTELMAkGA1UEBhMCSlAxHzAdBgNV -BAoTFkN5YmVyVHJ1c3QgSmFwYW4sIEluYy4xITAfBgNVBAMTGEN5YmVyVHJ1c3Qg -SkFQQU4gUm9vdCBDQTAeFw05ODA4MDQwNzU3MDBaFw0wMzA4MDQyMzU5MDBaMFEx -CzAJBgNVBAYTAkpQMR8wHQYDVQQKExZDeWJlclRydXN0IEphcGFuLCBJbmMuMSEw -HwYDVQQDExhDeWJlclRydXN0IEpBUEFOIFJvb3QgQ0EwgZ8wDQYJKoZIhvcNAQEB -BQADgY0AMIGJAoGBALet/MpHEHaJ/Wes5HMGfIFLHda1fA5Hr+ymVHWoxP1lr+fI -sbFsNDWN97lkVygLIVredP7ceC6GRhJMfxEf3JO9X75mmIa4t+xtSdOQ2eF5AFZo -uq1sHyw7H8ksjEOwBELqgXOmzjN1RQ2KRXIvqldV5AfDQ+J1Og+8PNCEzrrvAgMB -AAEwDQYJKoZIhvcNAQEEBQADgYEAt6ZkowyAPBzE2O5BO+WGpJ5gXdYBMqhqZC0g -cEC6ck5m+gdlTgOOC/1W4K07IKcy+rISHoDfHuN6GMxX2+bJNGDvdesQFtCkLnDY -JCO4pXdzQvkHOt0BbAiTBzUmECVgKf8J5WSfabkWSfNc3SRjRpMNsFM2dbxIILsZ -to/QIv0= ------END CERTIFICATE----- - ------BEGIN CERTIFICATE----- -MIICIzCCAYwCAU8wDQYJKoZIhvcNAQEEBQAwWjELMAkGA1UEBhMCSl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g5tgf+tQx6sFEC097TgCwaVI -0v5loMC86qYjFmZsGySp8+x5NRhPJsjjr1BKx6cxa9B8GJ1Qv6km+iYrRpwUqbtb -MJhCKLVLU7tDCZJAuqiqWqTGtotXTcU= ------END CERTIFICATE----- - ------BEGIN CERTIFICATE----- -MIICNDCCAaECEAKtZn5ORf5eV288mBle3cAwDQYJKoZIhvcNAQECBQAwXzELMAkG -A1UEBhMCVVMxIDAeBgNVBAoTF1JTQSBEYXRhIFNlY3VyaXR5LCBJbmMuMS4wLAYD -VQQLEyVTZWN1cmUgU2VydmVyIENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4XDTk0 -MTEwOTAwMDAwMFoXDTEwMDEwNzIzNTk1OVowXzELMAkGA1UEBhMCVVMxIDAeBgNV -BAoTF1JTQSBEYXRhIFNlY3VyaXR5LCBJbmMuMS4wLAYDVQQLEyVTZWN1cmUgU2Vy -dmVyIENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIGbMA0GCSqGSIb3DQEBAQUAA4GJ -ADCBhQJ+AJLOesGugz5aqomDV6wlAXYMra6OLDfO6zV4ZFQD5YRAUcm/jwjiioII -0haGN1XpsSECrXZogZoFokvJSyVmIlZsiAeP94FZbYQHZXATcXY+m3dM41CJVphI -uR2nKRoTLkoRWZweFdVJVCxzOmmCsZc5nG1wZ0jl3S3WyB57AgMBAAEwDQYJKoZI -hvcNAQECBQADfgBl3X7hsuyw4jrg7HFGmhkRuNPHoLQDQCYCPgmc4RKz0Vr2N6W3 -YQO2WxZpO8ZECAyIUwxrl0nHPjXcbLm7qt9cuzovk2C2qUtN8iD3zV9/ZHuO3ABc -1/p3yjkWWW8O6tO1g39NTUJWdrTJXwT4OPjr0l91X817/OWOgHz8UA== ------END CERTIFICATE----- - ------BEGIN CERTIFICATE----- -MIIDWDCCAkCgAwIBAgICAx0wDQYJKoZIhvcNAQEFBQAwTTELMAkGA1UEBhMCVVMx -DTALBgNVBAoTBFZJU0ExLzAtBgNVBAsTJlZpc2EgS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KKY/e97gKvDIr1MvnsoFAZMej2YcOadN -+lq2cwQlZut3f+dZxkqZJRRU6ybH838Z1TBwj6+wRir/resp7defqgSHo9T5iaU0 -X9tDkYI22WY8sbi5gv2cOj4QyDvvBmVmepsZGD3/cVE8MC5fvj13c7JdBmzDI1aa -K4UmkhynArPkPw2vCHmCuDY96pzTNbO8acr1zJ3o/WSNF4Azbl5KXZnJHoe0nRrA -1W4TNSNe35tfPe/W93bC6j67eA0cQmdrBNj41tpvi/JEoAGrAgEDo4HFMIHCMB0G -A1UdDgQWBBS/X7fRzt0fhvRbVazc1xDCDqmI5zCBkgYDVR0jBIGKMIGHgBS/X7fR -zt0fhvRbVazc1xDCDqmI56FspGowaDELMAkGA1UEBhMCVVMxJTAjBgNVBAoTHFN0 -YXJmaWVsZCBUZWNobm9sb2dpZXMsIEluYy4xMjAwBgNVBAsTKVN0YXJmaWVsZCBD -bGFzcyAyIENlcnRpZmljYXRpb24gQXV0aG9yaXR5ggEAMAwGA1UdEwQFMAMBAf8w -DQYJKoZIhvcNAQEFBQADggEBAAWdP4id0ckaVaGsafPzWdqbAYcaT1epoXkJKtv3 -L7IezMdeatiDh6GX70k1PncGQVhiv45YuApnP+yz3SFmH8lU+nLMPUxA2IGvd56D -eruix/U0F47ZEUD0/CwqTRV/p2JdLiXTAAsgGh1o+Re49L2L7ShZ3U0WixeDyLJl -xy16paq8U4Zt3VekyvggQQto8PT7dL5WXXp59fkdheMtlb71cZBDzI0fmgAKhynp -VSJYACPq4xJDKVtHCN2MQWplBqjlIapBtJUhlbl90TSrE9atvNziPTnNvT51cKEY -WQPJIrSPnNVeKtelttQKbfi3QBFGmh95DmK/D5fs4C8fF5Q= ------END CERTIFICATE----- - ------BEGIN CERTIFICATE----- -MIIDujCCAqKgAwIBAgIEAJiWijANBgkqhkiG9w0BAQUFADBVMQswCQYDVQQGEwJO -TDEeMBwGA1UEChMVU3RhYXQgZGVyIE5lZGVybGFuZGVuMSYwJAYDVQQDEx1TdGFh -dCB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GgeAn0i0P4JUw4ppBf1AsX19iYamGamkYDHRJ1l2E6kFSGG9YrVBWIGrGvShp -WJHckRE1qTodvBqlYJ7YH39FkWnZfrt4csEGDyrOj4VwYaygzQu4OSlWhDJOhrs9 -xCrZ1x9y7v5RoSJBsXECYxqCsGKrXlcSH9/L3XWgwF15kIwb4FDm3jH+mHtwX6WQ -2K34ArZv02DdQEsixT2tOnqfGhpHkXkzuoLcMmkDlm4fS/Bx/uNncqCxv1yL5PqZ -IseEuRuNI5c/7SXgz2W79WEE790eslpBIlqhn10s6FvJbakMDHiqYMZWjwFaDGi8 -aRl5xB9+lwW/xekkUV7U1UtT7dkjWjYDZaPBA61BMPNGG4WQr2W11bHkFlt4dR2X -em1ZqSqPe97Dh4kQmUlzeMg9vVE1dCrV8X5pGyq7O70luJpaPXJhkGaH7gzWTdQR -dAtq/gsD/KNVV4n+SsuuWxcFyPKNIzFTONItaj+CuY0IavdeQXRuwxF+B6wpYJE/ -OMpXEA29MC/HpeZBoNquBYeaoKRlbEwJDIm6uNO5wJOKMPqN5ZprFQFOZ6raYlY+ -hAhm0sQ2fac+EPyI4NSA5QC9qvNOBqN6avlicuMJT+ubDgEj8Z+7fNzcbBGXJbLy -tGMU0gYqZ4yD9c7qB9iaah7s5Aq7KkzrCWA5zspi2C5u ------END CERTIFICATE----- diff --git a/kio/kssl/kssl/cert_bundle b/kio/kssl/kssl/cert_bundle deleted file mode 100755 index 331a64286..000000000 --- a/kio/kssl/kssl/cert_bundle +++ /dev/null @@ -1,47 +0,0 @@ -: -eval 'exec perl -S $0 ${1+"$@"}' - if $running_under_some_shell; - -## -## cert_bundle -- Bundle CA Certificates into one file -## Copyright (c) 1998 Ralf S. Engelschall, All Rights Reserved. -## - -($certdb, $indexfile, $bundlefile) = @ARGV; - -%CERT = (); -open(IDX, "<$indexfile") || die; -while () { - if (m|^(\S+):\s+(.+)\s*$|) { - $CERT{$2} = $1; - } -} -close(IDX); - -$date = `date`; -$date =~ s|\n$||; -open(BDL, ">$bundlefile") || die; -print BDL "##\n"; -print BDL "## $bundlefile -- Bundle of CA Certificates\n"; -print BDL "## Last Modified: $date\n"; -print BDL "##\n"; -print BDL "## This is a bundle of X.509 certificates of public\n"; -print BDL "## Certificate Authorities (CA). These were automatically\n"; -print BDL "## extracted from Netscape Communicator's certificate database\n"; -print BDL "## (the file `$certdb').\n"; -print BDL "##\n"; -foreach $cert (sort(keys(%CERT))) { - $file = $CERT{$cert}; - print STDERR "Bundling: $cert ($file)\n"; - $pem = `openssl x509 -in $file -inform DER -outform PEM`; - $pem =~ s|\n$||; - $purpose = `openssl x509 -in $file -inform DER -noout -purpose`; - # - $_ = $purpose; - if ( /server CA : Yes\n/ || /client CA : Yes\n/ || (/Any Purpose CA : Yes\n/ && (/client : Yes\n/ || /server : Yes\n/ ))) { - print BDL "\n"; - print BDL "$pem\n"; - } -} -close(BDL); - diff --git a/kio/kssl/kssl/cert_extract.c b/kio/kssl/kssl/cert_extract.c deleted file mode 100644 index 095f810f4..000000000 --- a/kio/kssl/kssl/cert_extract.c +++ /dev/null @@ -1,183 +0,0 @@ -//krazy:excludeall=license (program, not a library) -/* -** cert_extract.c -- Extract CA Certs out of Netscape certN.db files -** -** Copyright Ariel Glenn -** Copyright 1998 Ralf S. Engelschall -** -** 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 -** -** -** Originally written and released under the GPL by -** Ariel Glenn from the AcIS R&D group at Columbia -** as the two sources findoffset.c and dblist.c. See under -** http://www.columbia.edu/~ariel/good-certs/ for more details. -** -** Merged into one single program in August 1998 -** by Ralf S. Engelschall for use in the mod_ssl project. -** See under http://www.engelschall.com/sw/mod_ssl/ for more details. -** -*/ - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -#include "openssl/asn1.h" -#include "openssl/x509.h" - -int findoffset(char *dbname); - -int findoffset(char *dbname) -{ - DB *db; - DBT dkey, dvalue; - int result; - int offset = 0; - char *p; - int ptag = 0, pclass, plen; - X509 *mycert; - - if ((db = dbopen(dbname, O_RDONLY, 0, DB_HASH, NULL)) == NULL) { - fprintf(stderr, "Failed to open DB file '%s': %s\n", dbname, strerror(errno)); - exit(1); - } - while ((result = (db->seq(db, &dkey, &dvalue, R_NEXT))) == 0) { - if ((dvalue.size) > 520) { - while (offset < dvalue.size) { - p = (char *)dvalue.data + offset - 1; - ASN1_get_object((unsigned char **)&p, (long *)&plen, &ptag, &pclass, dvalue.size); - if (ptag == V_ASN1_SEQUENCE) { /* ok, it might be a cert then. */ - /* include length of object header junk */ - plen += p - ((char *) dvalue.data + offset - 1); - mycert = NULL; - p = (char *) dvalue.data + offset - 1; - d2i_X509(&mycert, (unsigned char **) &p, plen); - if (mycert == NULL) { /* must be garbage after all */ - offset++; - continue; - } - break; - } - else - offset++; - } - if (offset > 0) - break; /* found it, let's quit */ - } - } - db->close(db); - return (offset); -} - -int main(int argc, char **argv) -{ - char *dbname; - DB *db; - int j; - int offset; - DBT dkey, dvalue; - int result; - char oname[40]; - int fout; - int find; - char *p; - int ptag = 0, pclass, plen; - X509 *mycert; - char *shortname; - char byte1, byte2; - - if (argc != 2) { - fprintf(stderr, "usage: %s /path/to/netscape/cert.db\n", argv[0]); - exit(1); - } - - dbname = argv[1]; - offset = findoffset(dbname); - if (offset == 0) { - fprintf(stderr, "Could not determine cert offset in DB file '%s'\n", dbname); - exit(1); - } - else { - fprintf(stderr, "Ok: certificates are at offset %d\n", offset); - } - - if ((db = dbopen(dbname, O_RDONLY, 0, DB_HASH, NULL)) == NULL) { - fprintf(stderr, "Failed to open DB file '%s': %s\n", dbname, strerror(errno)); - exit(1); - } - if ((find = open("cert.index", O_WRONLY | O_CREAT | O_TRUNC, 0755)) == -1) { - fprintf(stderr, "Failed to open Index file '%s': %s\n", "cert-index", strerror(errno)); - exit(1); - } - j = 0; - byte1 = -1; - byte2 = -1; - while ((result = (db->seq(db, &dkey, &dvalue, R_NEXT))) == 0) { - if (dvalue.size > offset && ((dvalue.size) - offset) > 500) { - p = (char *)dvalue.data + offset - 1; - if (byte1 != -1 && byte2 != -1) - if (byte1 != p[0] || byte2 != p[1]) - continue; - ASN1_get_object((unsigned char **)&p, (long *)&plen, &ptag, &pclass, dvalue.size); - if (ptag == V_ASN1_SEQUENCE) { /* ok, it might be a cert then. */ - if (byte1 == -1 && byte2 == -1) { - byte1 = p[0]; - byte2 = p[1]; - } - /* include length of object header junk */ - plen += p - ((char *) dvalue.data + offset - 1); - mycert = NULL; - p = (char *) dvalue.data + offset - 1; - d2i_X509(&mycert, (unsigned char **) &p, plen); - if (mycert == NULL) { /* must be garbage after all */ - continue; - } - j++; - sprintf(oname, "cert.%02d.der", j); - if ((fout = open(oname, O_WRONLY | O_CREAT | O_TRUNC, 0755)) == -1) { - fprintf(stderr, "could not open %s\n", oname); - continue; - } - write(fout, (char *) dvalue.data + offset - 1, plen); - close(fout); - write(find, oname, strlen(oname)); - write(find, ": ", 2); - shortname = (char *) dvalue.data + offset - 1 + plen; - write(find, shortname, dvalue.size - plen - offset); - write(find, "\n", 1); - fprintf(stderr, "Extracted: %s (", oname); - write(fileno(stderr), shortname, dvalue.size - plen - offset); - fprintf(stderr, ")\n"); - } - else { - /* fprintf(stderr, "Hmmm... ptag is %d, plen is %d\n", ptag, plen); */ - } - } - } - close(find); - db->close(db); - - return (0); -} - diff --git a/kio/kssl/kssl/certbundle_Makefile b/kio/kssl/kssl/certbundle_Makefile deleted file mode 100644 index 5a288f3b6..000000000 --- a/kio/kssl/kssl/certbundle_Makefile +++ /dev/null @@ -1,43 +0,0 @@ -## -## Makefile for building and driving the CA cert extraction -## Copyright (c) 1998 Ralf S. Engelschall, All Rights Reserved. -## - -V=1.0 - -SSLEAY_INC=/sw/pkg/ssleay/include -SSLEAY_LIB=/sw/pkg/ssleay/lib - -CC=cc -CFLAGS=-pipe -O -g -ggdb3 -Wall -Wshadow -Wpointer-arith -Wcast-align -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Winline -LDFLAGS=-g -ggdb3 - -all: extract - -extract: cert_extract - ./cert_extract cert7.db - ./cert_bundle cert7.db cert.index ca-cert-bundle.pem - -cert_extract.o: cert_extract.c - $(CC) $(CFLAGS) -I$(SSLEAY_INC) -o cert_extract.o -c cert_extract.c - -cert_extract: cert_extract.o - $(CC) $(LDFLAGS) -ocert_extract cert_extract.o -L$(SSLEAY_LIB) -lcrypto -ldb1 - -clean: - -rm -f cert_extract.o - -rm -f cert_extract - -rm -f core *.core - -distclean: clean - -rm -f cert.*.der cert.index - -dist: distclean - gtar --no-recursion -cvf - `find * -depth -print | sort` |\ - tardy --user_number=1000 --user_name=rse \ - --group_number=1000 --group_name=en \ - --prefix=certbundle-$(V) - |\ - gzip --best >/tmp/certbundle-$(V).tar.gz && \ - mv /tmp/certbundle-$(V).tar.gz .. - ls -l ../certbundle-$(V).tar.gz - diff --git a/kio/kssl/kssl/certkde b/kio/kssl/kssl/certkde deleted file mode 100755 index 37c924f83..000000000 --- a/kio/kssl/kssl/certkde +++ /dev/null @@ -1,75 +0,0 @@ -: -eval 'exec perl -S $0 ${1+"$@"}' - if $running_under_some_shell; - -## -## Generate the KDE CA list TDEConfig file -## - -%CERT = (); -open(IDX, ") { - if (m|^(\S+):\s+(.+)\s*$|) { - $CERT{$2} = $1; - } -} -close(IDX); - -$date = `date`; -$date =~ s|\n$||; -open(BDL, ">ksslcalist") || die; -foreach $cert (sort(keys(%CERT))) { - $file = $CERT{$cert}; - print STDERR "Bundling: $cert ($file)\n"; - $pem = `openssl x509 -in $file -inform DER -outform PEM`; - $pem =~ s|[\n\r]||g; - $pem =~ s|-----BEGIN CERTIFICATE-----||; - $pem =~ s|-----END CERTIFICATE-----||; - $subj = `openssl x509 -in $file -inform DER -noout -subject`; - $_ = $subj; - # We don't trust this anymore, so we keep our own copy - if ( /TrustCenter/ ) { - continue; - } - if ( /[Oo]bject/ || /[Cc]ode/ ) { - $codeSubj = 1; - } else { - $codeSubj = 0; - } - $subj =~ s|\n$||; - $subj =~ s/^subject= //; - $purpose = `openssl x509 -in $file -inform DER -noout -purpose`; - print BDL "\n"; - print BDL "[$subj]\n"; - print BDL "x509=$pem\n"; - # - $_ = $purpose; - if ( /server CA : Yes\n/ || /client CA : Yes\n/ || (/Any Purpose CA : Yes\n/ && (/client : Yes\n/ || /server : Yes\n/ ))) { - $v_site="true"; - } else { - $v_site="false"; - } - # - if ( /MIME signing CA : Yes\n/ || /MIME encryption CA : Yes\n/ ) { - $v_email="true"; - } else { - $v_email="false"; - } - # - if ( /Any Purpose CA : Yes\n/ && $codeSubj == 1) { - $v_code="true"; - } else { - $v_code="false"; - } - - # are some certificates really broken? - if ($v_code == "false" && $v_email == "false") { - $v_site = "true"; - } - - print BDL "site=$v_site\n"; - print BDL "email=$v_email\n"; - print BDL "code=$v_code\n"; -} -close(BDL); - diff --git a/kio/kssl/kssl/certum.pem b/kio/kssl/kssl/certum.pem deleted file mode 100644 index b133fcb49..000000000 --- a/kio/kssl/kssl/certum.pem +++ /dev/null @@ -1,19 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIDDDCCAfSgAwIBAgIDAQAgMA0GCSqGSIb3DQEBBQUAMD4xCzAJBgNVBAYTAlBM -MRswGQYDVQQKExJVbml6ZXRvIFNwLiB6IG8uby4xEjAQBgNVBAMTCUNlcnR1bSBD -QTAeFw0wMjA2MTExMDQ2MzlaFw0yNzA2MTExMDQ2MzlaMD4xCzAJBgNVBAYTAlBM -MRswGQYDVQQKExJVbml6ZXRvIFNwLiB6IG8uby4xEjAQBgNVBAMTCUNlcnR1bSBD -QTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAM6xwS7TT3zNJc4YPk/E -jG+AanPIW1H4m9LcuwBcsaD8dQPugfCI7iNS6eYVM42sLQnFdvkrOYCJ5JdLkKWo -ePhzQ3ukYbDYWMzhbGZ+nPMJXlVjhNWo7/OxLjBos8Q82KxujZlakE403Daaj4GI -ULdtlkIJ89eVgw1BS7Bqa/j8D35in2fE7SZfECYPCE/wpFcozo+47UX2bu4lXapu -Ob7kky/ZR6By6/qmW6/KUz/iDsaWVhFu9+lmqSbYf5VT7QqFiLpPKaVCjF62/IUg -AKpoC6EahQGcxEZjgoi2IrHu/qpGWX7PNSzVttpd90gzFFS269lvzs2I1qsb2pY7 -HVkCAwEAAaMTMBEwDwYDVR0TAQH/BAUwAwEB/zANBgkqhkiG9w0BAQUFAAOCAQEA -uI3O7+cUus/usESSbLQ5PqKEbq24IXfS1HeCh+YgQYHu4vgRt2PRFze+GXYkHAQa -TOs9qmdvLdTN/mUxcMUbpgIKumB7bVjCmkn+YzILa+M6wKyrO7Do0wlRjBCDxjTg -xSvgGrZgFCdsMneMvLJymM/NzD+5yCRCFNZX/OYmQ6kd5YCQzgNUKD73P9P4Te1q -CjqTE5s7FCMTY5w/0YcneeVMUeMBrYVdGjux1XMQpNPyvG5k9VpWkKjHDkx0Dy5x -O/fIR/RpbxXyEV6DHpx8Uq79AtoSqFlnGNu8cN2bsWntgM6JQEhqDjXKKWYVIZQs -6GAqm4VKQPNriiTsBhYscw== ------END CERTIFICATE----- diff --git a/kio/kssl/kssl/certum1.pem b/kio/kssl/kssl/certum1.pem deleted file mode 100644 index aaf9cbc9a..000000000 --- a/kio/kssl/kssl/certum1.pem +++ /dev/null @@ -1,16 +0,0 @@ ------BEGIN CERTIFICATE----- -MIICjTCCAXWgAwIBAgIDAQAhMA0GCSqGSIb3DQEBBQUAMD4xCzAJBgNVBAYTAlBM -MRswGQYDVQQKExJVbml6ZXRvIFNwLiB6IG8uby4xEjAQBgNVBAMTCUNlcnR1bSBD -QTAeFw0wMjA3MTIxNjMxNTNaFw0xMjA3MTIxNjMxNTNaMEMxCzAJBgNVBAYTAlBM -MRswGQYDVQQKExJVbml6ZXRvIFNwLiB6IG8uby4xFzAVBgNVBAMTDkNlcnR1bSBM -ZXZlbCBJMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCl73pZ9DFcn7Qy0qBZ -K+So18cav7drUrJ8SiYOlDDVskt81+eIcL/4FelTSGjuAOvYdmm+HGYG998RPB0i -Z+Ak67vXFJ537vRWOcu6aMjNuAwu8BOdc5eSgB0Y8X4+3LOYfugtaZa8mrEQ8Hit -0yLE9UBcU9J+4PmkVGecmZ8jZQIDAQABoxMwETAPBgNVHRMBAf8EBTADAQH/MA0G -CSqGSIb3DQEBBQUAA4IBAQAlDS4aTmgK0YgmUvt/3zN7G2/ZrtBBCtONlUvC69c7 -TmLJWJ842y2AH7ryNXXkcsn6p0ZBTrTJ2tA2y/j2PXJeXrCkK/qAJIpM0l4u0MT7 -enY5akasduHp2NXMP9vDlgMy7elU2s3nkOT79gfh5XttC+5D/x4JDNi1DMAA9hk1 -6DK4zWmDVfjkiP/G3fEndtJgNDQsyqnaQ3E3bljv3f1KJTjZUvtA2Ml6MP2hFRhg -ZPsxuhW8QXidQYNiua1h7XUUiPiERLDLWZmfY6dxGrHXjSTx3shHNaQM0qkDs9gS -6UK8uWJN2bf2YBnvGmzy0IQvx5wDCH7h8AdaBD6DgIG1 ------END CERTIFICATE----- diff --git a/kio/kssl/kssl/certum2.pem b/kio/kssl/kssl/certum2.pem deleted file mode 100644 index a90ca2a91..000000000 --- a/kio/kssl/kssl/certum2.pem +++ /dev/null @@ -1,16 +0,0 @@ ------BEGIN CERTIFICATE----- -MIICjjCCAXagAwIBAgIDAQAiMA0GCSqGSIb3DQEBBQUAMD4xCzAJBgNVBAYTAlBM -MRswGQYDVQQKExJVbml6ZXRvIFNwLiB6IG8uby4xEjAQBgNVBAMTCUNlcnR1bSBD -QTAeFw0wMjA3MTIxNjMyMDNaFw0xMjA3MTIxNjMyMDNaMEQxCzAJBgNVBAYTAlBM -MRswGQYDVQQKExJVbml6ZXRvIFNwLiB6IG8uby4xGDAWBgNVBAMTD0NlcnR1bSBM -ZXZlbCBJSTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAyMQSaN5fA94hNE46 -bMKpGUb5yIPEowReGZzGttYBQnC6oUOy+iM3md8WerzXeBKf7iIZEDW2HAp7BKhS -4rMB6taxT07vDtkNfEKwOk6X7dODw6KY4mxnzjmjh5pf2feKKJ3MoZxi2HAz2a6J -vHKFMq8dAlGL2GBtLvzlFp2jwkMCAwEAAaMTMBEwDwYDVR0TAQH/BAUwAwEB/zAN -BgkqhkiG9w0BAQUFAAOCAQEAWo3wgy+/0B7UiTCu4Wn1rvGRXIUtbPNp4Bc4PP/i -1q6pPheIe0ooCopuqnDX9maTHhZeNpnApgCUSbyw71EaOremD7HjWXASRUTylhwL -5FdSx+D6MgF2uW9uwZ+NErkeRJYT2aRXe5FBOVIseC4g93Ay0D8Hg50MkAC5pQqW -+8GSszT94NzT7ppIaMtq53PZpUtLGiL3UBZ5vUJ5pE4lLKD7Ce+pXzZevy/MnkMG -D1L7LgjRWL17OcMlASFETyUTajNjvxMy+oM4C22rwHRh2WQrvgw5MO+Q3UyYA1r5 -VrSaqgQ1g06ZcQt+mhzoc2swlOSwm8iis8H6orR8xmCWrA== ------END CERTIFICATE----- diff --git a/kio/kssl/kssl/certum3.pem b/kio/kssl/kssl/certum3.pem deleted file mode 100644 index d6233c43c..000000000 --- a/kio/kssl/kssl/certum3.pem +++ /dev/null @@ -1,16 +0,0 @@ ------BEGIN CERTIFICATE----- -MIICjzCCAXegAwIBAgIDAQAjMA0GCSqGSIb3DQEBBQUAMD4xCzAJBgNVBAYTAlBM -MRswGQYDVQQKExJVbml6ZXRvIFNwLiB6IG8uby4xEjAQBgNVBAMTCUNlcnR1bSBD -QTAeFw0wMjA3MTIxNjMyMTdaFw0xMjA3MTIxNjMyMTdaMEUxCzAJBgNVBAYTAlBM -MRswGQYDVQQKExJVbml6ZXRvIFNwLiB6IG8uby4xGTAXBgNVBAMTEENlcnR1bSBM -ZXZlbCBJSUkwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBALZjBbfGFmlsLjPe -pWaDwG0LqhF11lWKabaHi1sQhK3qomHY7Em7qpL11dUQ1vsMcnnpzz/J0AEH6KDh -+yAyXV1SE/tVToLYYByZK+JGacLYIYF9aCwV8AhqyzOGurO5QX6vLboXB2WNnwmX -hyNVKUgnUVy4ktAR2qZJIw5Bjsn/AgMBAAGjEzARMA8GA1UdEwEB/wQFMAMBAf8w -DQYJKoZIhvcNAQEFBQADggEBAIsLt3vKCZqd/gui45ovm3FSO6FLjzzq4pagPvbN -nZ39HrhRaCpqkHDAj71L5L27U3eW2D4ILL0iUmZadbC4i3at/PUL9mjhGlajcCN8 -EF6IXGT87Tbcii735jRaaXSbEY4YhNOg9DPBoD4uJMkA8Z0Y/6lYmk4S6KUMCzzt -t5zZBiWjdd08yFi5VGMvpE74KVOMdMa3JNVaR0XvT0Q8yXo1XKCrY9OFIxnhVgDb -hzr9fwjKWDwu8kxhT9khAETm0BU2Buu+CTasaJdT/bBR2YEx9qcN7XyXTeDtkOO5 -QeGSqFgzquwjWEbKhf7l/e+efdRCg+ikH3O5snHB6iS+dgg= ------END CERTIFICATE----- diff --git a/kio/kssl/kssl/certum4.pem b/kio/kssl/kssl/certum4.pem deleted file mode 100644 index decbac005..000000000 --- a/kio/kssl/kssl/certum4.pem +++ /dev/null @@ -1,16 +0,0 @@ ------BEGIN CERTIFICATE----- -MIICjjCCAXagAwIBAgIDAQAkMA0GCSqGSIb3DQEBBQUAMD4xCzAJBgNVBAYTAlBM -MRswGQYDVQQKExJVbml6ZXRvIFNwLiB6IG8uby4xEjAQBgNVBAMTCUNlcnR1bSBD -QTAeFw0wMjA3MTIxNjMyMzVaFw0xMjA3MTIxNjMyMzVaMEQxCzAJBgNVBAYTAlBM -MRswGQYDVQQKExJVbml6ZXRvIFNwLiB6IG8uby4xGDAWBgNVBAMTD0NlcnR1bSBM -ZXZlbCBJVjCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAmyb1lKqCAKE4juAy -6lpVNUl6aJ2DuWPSiJ3BBk3/6ty6I4Lr2Dpy1b1vjVelhaFsVKEDgK2JyQlk9XMq -LPZI2Ql166mJiPKFg77aY/W78EcQfGyjnRvVcs0tG40mAs/p84OEpFcVe/RSqDrD -/D7R01u+Wj5xLl0PUsFplIGDbikCAwEAAaMTMBEwDwYDVR0TAQH/BAUwAwEB/zAN -BgkqhkiG9w0BAQUFAAOCAQEAPS99JujKGVRfa50TKfieq+uK1SxjidErYaZTb3cJ -NNfQDYn6nk4lnrnab5EUVhO/NegP2yIu3YOnZGfxFDhvVozMTKKAB5r5XKOvzsP9 -9C9578PVMLozucfUMCSwau7Z4l5uuQOHuzjzlVLCibbbf4RwfvZ7hh5sB5c0pNbw -RQq64RXQUUEvul/W9gUeT9ISHOsASGTq+HJ5i7vNARjukEAXW/maqs9vyTWWbGVI -1FSOnVyteymq4Xk+9YlIyNPNyacgnsMnU72XKBLDS0KJdhIWALFAZI4dSh5WZNuW -ZguUnEmeH81lLbR+p/N3iuN8+oSo8UXik92jxeUY2tQJUA== ------END CERTIFICATE----- diff --git a/kio/kssl/kssl/comodo1.pem b/kio/kssl/kssl/comodo1.pem deleted file mode 100644 index 536b087db..000000000 --- a/kio/kssl/kssl/comodo1.pem +++ /dev/null @@ -1,25 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIEMjCCAxqgAwIBAgIBATANBgkqhkiG9w0BAQUFADB7MQswCQYDVQQGEwJHQjEb -MBkGA1UECAwSR3JlYXRlciBNYW5jaGVzdGVyMRAwDgYDVQQHDAdTYWxmb3JkMRow -GAYDVQQKDBFDb21vZG8gQ0EgTGltaXRlZDEhMB8GA1UEAwwYQUFBIENlcnRpZmlj -YXRlIFNlcnZpY2VzMB4XDTA0MDEwMTAwMDAwMFoXDTI4MTIzMTIz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2 -G9w84FoVxp7Z8VlIMCFlA2zs6SFz7JsDoeA3raAVGI/6ugLOpyypEBMs1OUIJqsi -l2D4kF501KKaU73yqWjgom7C12yxow+ev+to51byrvLjKzg6CYG1a4XXvi3tPxq3 -smPi9WIsgtRqAEFQ8TmDn5XpNpaYbg== ------END CERTIFICATE----- diff --git a/kio/kssl/kssl/comodo2.pem b/kio/kssl/kssl/comodo2.pem deleted file mode 100644 index fef46d9c7..000000000 --- a/kio/kssl/kssl/comodo2.pem +++ /dev/null @@ -1,25 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIEPzCCAyegAwIBAgIBATANBgkqhkiG9w0BAQUFADB+MQswCQYDVQQGEwJHQjEb -MBkGA1UECAwSR3JlYXRlciBNYW5jaGVzdGVyMRAwDgYDVQQHDAdTYWxmb3JkMRow -GAYDVQQKDBFDb21vZG8gQ0EgTGltaXRlZDEkMCIGA1UEAwwbU2VjdXJlIENlcnRp -ZmljYXRlIFNlcnZpY2VzMB4XDTA0MDEwMTAwMDAwMFoXDTI4MTIzMTIzNTk1OVow -fjELMAkGA1UEBhMCR0IxGzAZBgNVBAgMEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4G -A1UEBwwHU2FsZm9yZDEaMBgGA1UECgwRQ29tb2RvIENBIExpbWl0ZWQxJDAiBgNV -BAMMG1NlY3VyZSBDZXJ0aWZpY2F0ZSBTZXJ2aWNlczCCASIwDQYJKoZIhvcNAQEB -BQADggEPADCCAQoCggEBAMBxM4KK0HDrc4eCQNUd5MvJDkKQ+d40uaG6EfQlhfPM -cm3ye5drswfxdySRXyWP9nQ95IDC+DwN879A6vfIUtFyb+/Iq0G4bi4XKpVpDM3S -HpR7LZQdqnXXs5jLrLxkU0C8j6ysNstcrbvd4JQX7NFc0L/vpZXJkMWwrPsbQ996 -CF23uPJAGysnnlDOXmWCiIxe004MeuoIkbY2qitC++rCoznl2yY4rYsK7hljxxwk -3wN42ubqwUcaCwtGCd0C/N7Lh1/XMGNooa7cMqG6vv5Eq2i2pRcV/b3Vp6ea5EQz -6YiO/O1R65NxTq0B50SOqy3LqP4BSUjwwN3HaNiS/j0CAwEAAaOBxzCBxDAdBgNV -HQ4EFgQUPNiTiMLAggnMAZkGkyDpnnAJY08wDgYDVR0PAQH/BAQDAgEGMA8GA1Ud -EwEB/wQFMAMBAf8wgYEGA1UdHwR6MHgwO6A5oDeGNWh0dHA6Ly9jcmwuY29tb2Rv -Y2EuY29tL1NlY3VyZUNlcnRpZmljYXRlU2VydmljZXMuY3JsMDmgN6A1hjNodHRw -Oi8vY3JsLmNvbW9kby5uZXQvU2VjdXJlQ2VydGlmaWNhdGVTZXJ2aWNlcy5jcmww -DQYJKoZIhvcNAQEFBQADggEBAIcBbSMdflsXfcFhMs+P5/OKlFlm4J4oqF7Tt/Q0 -5qo5spcWxYJvMqTpjOev/e/C6LlLqqP05tqNZSH7uoDrJiiFGv45jN5bBAS0VPmj -Z55B+glSzAVIqMk/IQQezkhr/IXownuvf7fM+F86/TXGDe+X3EyrEeFryzHRbPtI -gKvcnDe4IRRLDXE97IMzbtFuMhbsmMcWi1mmNKsFVy2T96oTy9IT4rcuO81rUBcJ -aD61JlfutuC23bkpgHl9j6PwpCikFcSF9CfUa7/lXORlAnZUtOM3ZiTTGWHIUhDl -izeauan5Hb/qmZJhlv8BzaFfDbxxvA6sCx1HRR3B7Hzs/Sk= ------END CERTIFICATE----- diff --git a/kio/kssl/kssl/comodo3.pem b/kio/kssl/kssl/comodo3.pem deleted file mode 100644 index 40c137095..000000000 --- a/kio/kssl/kssl/comodo3.pem +++ /dev/null @@ -1,25 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIEQzCCAyugAwIBAgIBATANBgkqhkiG9w0BAQUFADB/MQswCQYDVQQGEwJHQjEb -MBkGA1UECAwSR3JlYXRlciBNYW5jaGVzdGVyMRAwDgYDVQQHDAdTYWxmb3JkMRow -GAYDVQQKDBFDb21vZG8gQ0EgTGltaXRlZDElMCMGA1UEAwwcVHJ1c3RlZC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ZZvH9/0BAKkn0U+yNj6NkZEUD+Cl5EfKNsYEYwq5GWDVxIS -jBc/lDb+XbDABHcTuPQV1T84zJQ6VdCsmPW6AF/ghhmBeC8owH7TzEIK9a5QoNE+ -xqFx7D+gIIxmOom0jtTYsU0lR+4viMi14QVFwL4Ucd56/Y57fU0IlqUSc/Atyjcn -dBInTMu2l+nZrghtWjlA3QVHdWpaIbOjGM9O9y5Xt5hwXsjEeLBi ------END CERTIFICATE----- diff --git a/kio/kssl/kssl/comodo4.pem b/kio/kssl/kssl/comodo4.pem deleted file mode 100644 index 7490b02be..000000000 --- a/kio/kssl/kssl/comodo4.pem +++ /dev/null @@ -1,26 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIEdDCCA1ygAwIBAgIQRL4Mi1AAJLQR0zYq/mUK/TANBgkqhkiG9w0BAQUFADCB -lzELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAlVUMRcwFQYDVQQHEw5TYWx0IExha2Ug -Q2l0eTEeMBwGA1UEChMVVGhlIFVTRVJUUlVTVCBOZXR3b3JrMSEwHwYDVQQLExho -dHRwOi8vd3d3LnVzZXJ0cnVzdC5jb20xHzAdBgNVBAMTFlVUTi1VU0VSRmlyc3Qt -SGFyZHdhcmUwHhcNOTkwNzA5MTgxMDQyWhcNMTkwNzA5MTgxOTIyWjCBlzELMAkG -A1UEBhMCVVMxCzAJBgNVBAgTAlVUMRcwFQYDVQQHEw5TYWx0IExha2UgQ2l0eTEe -MBwGA1UEChMVVGhlIFVTRVJUUlVTVCBOZXR3b3JrMSEwHwYDVQQLExhodHRwOi8v -d3d3LnVzZXJ0cnVzdC5jb20xHzAdBgNVBAMTFlVUTi1VU0VSRmlyc3QtSGFyZHdh -cmUwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCx98M4P7Sof885glFn -0G2f0v9Y8+efK+wNiVSZuTiZFvfgIXlIwrthdBKWHTxqctU8EGc6Oe0rE81m65UJ -M6Rsl7HoxuzBdXmcRl6Nq9Bq/bkqVRcQVLMZ8Jr28bFdtqdt++BxF2uiiPsA3/4a -MXcMmgF6sTLjKwEHOG7DpV4jvEWbe1DByTCP2+UretNb+zNAHqDVmBe8i4fDidNd -oI6yqqr2jmmIBsX6iSHzCJ1pLgkzmykNRg+MzEk0sGlRvfkGzWitZky8PqxhvQqI -DsjfPe58BEydCl5rkdbux+0ojatNh4lz0G6k0B4WixThdkQDf2Os5M1JnMWS9Ksy -oUhbAgMBAAGjgbkwgbYwCwYDVR0PBAQDAgHGMA8GA1UdEwEB/wQFMAMBAf8wHQYD -VR0OBBYEFKFyXyYbKJhDlV0HN9WFlp1L0sNFMEQGA1UdHwQ9MDswOaA3oDWGM2h0 -dHA6Ly9jcmwudXNlcnRydXN0LmNvbS9VVE4tVVNFUkZpcnN0LUhhcmR3YXJlLmNy -bDAxBgNVHSUEKjAoBggrBgEFBQcDAQYIKwYBBQUHAwUGCCsGAQUFBwMGBggrBgEF -BQcDBzANBgkqhkiG9w0BAQUFAAOCAQEARxkP3nTGmZev/K0oXnWO6y1n7k57K9cM -//bey1WiCuFMVGWTYGufEpytXoMs61quwOQt9ABjHbjAbPLPSbtNk28Gpgoiskli -CE7/yMgUsogWXecB5BKV5UU0s4tpvc+0hY91UZ59Ojg6FEgSxvunOxqNDYJAB+gE -CJChicsZUN/KHAG8HQQZexB2lzvukJDKxA4fFm517zP4029bHpbj4HR3dHuKom4t -3XbWOTCC8KucUvIqx69JXn7HaOWCgchqJ/kniCrVWFCVH/A7HFe7fRQ5YiuayZSS -KqMiDP+JJn1fIytH1xUdqWqeUQ0qUZ6B+dQ7XnASfxAynB67nfhmqA== ------END CERTIFICATE----- diff --git a/kio/kssl/kssl/comodo5.pem b/kio/kssl/kssl/comodo5.pem deleted file mode 100644 index 824d542c1..000000000 --- a/kio/kssl/kssl/comodo5.pem +++ /dev/null @@ -1,26 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIEXjCCA0agAwIBAgIQRL4Mi1AAIbQR0ypoBqmt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QcDAQYKKwYBBAGCNwoDAwYJYIZIAYb4QgQBMA0GCSqGSIb3DQEBBQUAA4IB -AQAnNZcAiosovcYzMB4p/OL31ZjUQLtgyr+rFywJNn9Q+kHcrpY6CiM+iVnJowft -Gzet/Hy+UUla3joKVAgWRcKZsYfNjGjgaQPpxE6YsjuMFrMOoAyYUJuTqXAJyCyj -j98C5OBxOvG0I3KgqgHf35g+FFCgMSa9KOlaMCZ1+XtgHI3zzVAmbQQnmt/VDUVH -KWss5nbZqSl9Mt3JNjy9rjXxEZ4du5A/EkdOjtd+D2JzHVImOBwYSf0wdJrE5SIv -2MCN7ZF6TACPcn9d2t0bi0Vr591pl6jFVkwPDPafepE39peC4N1xaf92P2BNPM/3 -mfnGV/TJVTl4uix5yaaIK/QI ------END CERTIFICATE----- diff --git a/kio/kssl/kssl/comodo6.pem b/kio/kssl/kssl/comodo6.pem deleted file mode 100644 index 4b9f74824..000000000 --- a/kio/kssl/kssl/comodo6.pem +++ /dev/null @@ -1,27 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIEojCCA4qgAwIBAgIQRL4Mi1AAJLQR0zYlJWfJiTANBgkqhkiG9w0BAQUFADCB -rjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAlVUMRcwFQYDVQQHEw5TYWx0IExha2Ug -Q2l0eTEeMBwGA1UEChMVVGhlIFVTRVJUUlVTVCBOZXR3b3JrMSEwHwYDVQQLExho -dHRwOi8vd3d3LnVzZXJ0cnVzdC5jb20xNjA0BgNVBAMTLVVUTi1VU0VSRmlyc3Qt -Q2xpZW50IEF1dGhlbnRpY2F0aW9uIGFuZCBFbWFpbDAeFw05OTA3MDkxNzI4NTBa -Fw0xOTA3MDkxNzM2NThaMIGuMQswCQYDVQQGEwJVUzELMAkGA1UECBMCVVQxFzAV -BgNVBAcTDlNhbHQgTGFrZSBDaXR5MR4wHAYDVQQKExVUaGUgVVNFUlRSVVNUIE5l -dHdvcmsxITAfBgNVBAsTGGh0dHA6Ly93d3cudXNlc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uPmD0Wnu51tvjQjvLzxq4oW6fw8zYX/MMF08oDSlQ= ------END CERTIFICATE----- diff --git a/kio/kssl/kssl/comodo7.pem b/kio/kssl/kssl/comodo7.pem deleted file mode 100644 index 58b02ea94..000000000 --- a/kio/kssl/kssl/comodo7.pem +++ /dev/null @@ -1,26 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIEZjCCA06gAwIBAgIQRL4Mi1AAJLQR0zYt4LNfGzANBgkqhkiG9w0BAQUFADCB -lTELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAlVUMRcwFQYDVQQHEw5TYWx0IExha2Ug -Q2l0eTEeMBwGA1UEChMVVGhlIFVTRVJUUlVTVCBOZXR3b3JrMSEwHwYDVQQLExho -dHRwOi8vd3d3LnVzZXJ0cnVzdC5jb20xHTAbBgNVBAMTFFVUTi1VU0VSRmlyc3Qt -T2JqZWN0MB4XDTk5MDcwOTE4MzEyMFoXDTE5MDcwOTE4NDAzNlowgZUxCzAJBgNV -BAYTAlVTMQswCQYDVQQIEwJVVDEXMBUGA1UEBxMOU2FsdCBMYWtlIENpdHkxHjAc -BgNVBAoTFVRoZSBVU0VSVFJVU1QgTmV0d29yazEhMB8GA1UECxMYaHR0cDovL3d3 -dy51c2VydHJ1c3QuY29tMR0wGwYDVQQDExRVVE4tVVNFUkZpcnN0LU9iamVjdDCC -ASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAM6qgT+jo2F4qjEAVZURnicP -HxzfOpuCaDDASmEd8S8O+r5596Uj71VRloTN2+O5bj4x2AogZ8f02b+U60cEPgLO -KqJdhwQJ9jCdGIqXsqoc/EHSoTbL+z2RuufZcDX65OeQw5ujm9M89RKZd7G3CeBo -5hy485RjiGpq/gt2yb70IuRnuasaXnfBhQfdDWy/7gbHd2pBnqcP1/vulBe3/IW+ -pKvEHDHd17bR5PDv3xaPslKT16HUiaEHLr/hARJCHhrh2JU022R5KP+6LhHC5ehb -kkj7RwvCbNqtMoNB86XlQXD9ZZBt+vpRxPm9lisZBCzTbafc8H9vg2XiaquHhnUC -AwEAAaOBrzCBrDALBgNVHQ8EBAMCAcYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4E -FgQU2u1kdBScFDyr3ZmpvVsoTYs8ydgwQgYDVR0fBDswOTA3oDWgM4YxaHR0cDov -L2NybC51c2VydHJ1c3QuY29tL1VUTi1VU0VSRmlyc3QtT2JqZWN0LmNybDApBgNV -HSUEIjAgBggrBgEFBQcDAwYIKwYBBQUHAwgGCisGAQQBgjcKAwQwDQYJKoZIhvcN -AQEFBQADggEBAAgfUrE3RHjb/c652pWWmKpVZIC1WkDdIaXFwfNfLEzIR1pp6ujw -NTX00CXzyKakh0q9G7FzCL3Uw8q2NbtZhncxzaeAFK4T7/yxSPlrJSUtUbYsbUXB -mMiKVl0+7kNOPmsnjtA6S4ULX9Ptaqd1y9Fahy85dRNacrACgZ++8A+EVCBibGnU -4U3GDZlDAQ0Slox4nb9QorFEqmrPF3rPbw/U+CRVX/A0FklmPlBGyWNxODFiuGK5 -81OtbLUrohKqGU8J2l7nk8aOFAj+8DCAGKCGhU3IfdeLA/5u1fedFqySLKAj5ZyR -Uh+U3xeUc8OzwcFxBSAAeL0TUh2oPs0AH8g= ------END CERTIFICATE----- diff --git a/kio/kssl/kssl/dfn-root-ca-cert.pem b/kio/kssl/kssl/dfn-root-ca-cert.pem deleted file mode 100644 index eb8a054ac..000000000 --- a/kio/kssl/kssl/dfn-root-ca-cert.pem +++ /dev/null @@ -1,39 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIG2jCCBcKgAwIBAgIDFc/9MA0GCSqGSIb3DQEBBQUAMIGsMQswCQYDVQQGEwJE -RTEhMB8GA1UEChMYRGV1dHNjaGVzIEZvcnNjaHVuZ3NuZXR6MRYwFAYDVQQLEw1E -Rk4tQ0VSVCBHbWJIMRAwDgYDVQQLEwdERk4tUENBMS0wKwYDVQQDEyRERk4gVG9w -bGV2ZWwgQ2VydGlmaWNhdGlvbiBBdXRob3Jp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00 ------END CERTIFICATE----- diff --git a/kio/kssl/kssl/gd-class2-root.pem b/kio/kssl/kssl/gd-class2-root.pem deleted file mode 100644 index 42e8d1eef..000000000 --- a/kio/kssl/kssl/gd-class2-root.pem +++ /dev/null @@ -1,24 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIEADCCAuigAwIBAgIBADANBgkqhkiG9w0BAQUFADBjMQswCQYDVQQGEwJVUzEh -MB8GA1UEChMYVGhlIEdvIERhZGR5IEdyb3VwLCBJbmMuMTEwLwYDVQQLEyhHbyBE -YWRkeSBDbGFzcyAyIENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4XDTA0MDYyOTE3 -MDYyMFoXDTM0MDYyOTE3MDYyMFowYzELMAkGA1UEBhMCVVMxITAfBgNVBAoTGFRo -ZSBHbyBEYWRkeSBHcm91cCwgSW5jLjExMC8GA1UECxMoR28gRGFkZHkgQ2xhc3Mg -MiBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTCCASAwDQYJKoZIhvcNAQEBBQADggEN -ADCCAQgCggEBAN6d1+pXGEmhW+vXX0iG6r7d/+TvZxz0ZWizV3GgXne77ZtJ6XCA -PVYYYwhv2vLM0D9/AlQiVBDYsoHUwHU9S3/Hd8M+eKsaA7Ugay9qK7HFiH7Eux6w -wdhFJ2+qN1j3hybX2C32qRe3H3I2TqYXP2WYktsqbl2i/ojgC95/5Y0V4evLOtXi -EqITLdiOr18SPaAIBQi2XKVlOARFmR6jYGB0xUGlcmIbYsUfb18aQr4CUWWoriMY -avx4A6lNf4DD+qta/KFApMoZFv6yyO9ecw3ud72a9nmYvLEHZ6IVDd2gWMZEewo+ -YihfukEHU1jPEX44dMX4/7VpkI+EdOqXG68CAQOjgcAwgb0wHQYDVR0OBBYEFNLE -sNKR1EwRcbNhyz2h/t2oatTjMIGNBgNVHSMEgYUwgYKAFNLEsNKR1EwRcbNhyz2h -/t2oatTjoWekZTBjMQswCQYDVQQGEwJVUzEhMB8GA1UEChMYVGhlIEdvIERhZGR5 -IEdyb3VwLCBJbmMuMTEwLwYDVQQLEyhHbyBEYWRkeSBDbGFzcyAyIENlcnRpZmlj -YXRpb24gQXV0aG9yaXR5ggEAMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQAD -ggEBADJL87LKPpH8EsahB4yOd6AzBhRckB4Y9wimPQoZ+YeAEW5p5JYXMP80kWNy -OO7MHAGjHZQopDH2esRU1/blMVgDoszOYtuURXO1v0XJJLXVggKtI3lpjbi2Tc7P -TMozI+gciKqdi0FuFskg5YmezTvacPd+mSYgFFQlq25zheabIZ0KbIIOqPjCDPoQ -HmyW74cNxA9hi63ugyuV+I6ShHI56yDqg+2DzZduCLzrTia2cyvk0/ZM/iZx4mER -dEr/VxqHD3VILs9RaRegAhJhldXRQLIQTO7ErBBDpqWeCtWVYpoNz4iCxTIM5Cuf -ReYNnyicsbkqWletNw+vHX/bvZ8= ------END CERTIFICATE----- diff --git a/kio/kssl/kssl/geotrust-global-1.pem b/kio/kssl/kssl/geotrust-global-1.pem deleted file mode 100644 index b69f0029b..000000000 --- a/kio/kssl/kssl/geotrust-global-1.pem +++ /dev/null @@ -1,20 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIDVDCCAjygAwIBAgIDAjRWMA0GCSqGSIb3DQEBBQUAMEIxCzAJBgNVBAYTAlVT -MRYwFAYDVQQKEw1HZW9UcnVzdCBJbmMuMRswGQYDVQQDExJHZW9UcnVzdCBHbG9i -YWwgQ0EwHhcNMDIwNTIxMDQwMDAwWhcNMjIwNTIxMDQwMDAwWjBCMQswCQYDVQQG -EwJVUzEWMBQGA1UEChMNR2VvVHJ1c3QgSW5jLjEbMBkGA1UEAxMSR2VvVHJ1c3Qg -R2xvYmFsIENBMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA2swYYzD9 -9BcjGlZ+W988bDjkcbd4kdS8odhM+KhDtgPpTSEHCIjaWC9mOSm9BXiLnTjoBbdq -fnGk5sRgprDvgOSJKA+eJdbtg/OtppHHmMlCGDUUna2YRpIuT8rxh0PBFpVXLVDv -iS2Aelet8u5fa9IAjbkU+BQVNdnARqN7csiRv8lVK83Qlz6cJmTM386DGXHKTubU -1XupGc1V3sjs0l44U+VcT4wt/lAjNvxm5suOpDkZALeVAjmRCw7+OC7RHQWa9k0+ -bw8HHa8sHo9gOeL6NlMTOdReJivbPagUvTLrGAMoUgRx5aszPeE4uwc2hGKceeoW -MPRfwCvocWvk+QIDAQABo1MwUTAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBTA -ephojYn7qwVkDBF9qn1luMrMTjAfBgNVHSMEGDAWgBTAephojYn7qwVkDBF9qn1l -uMrMTjANBgkqhkiG9w0BAQUFAAOCAQEANeMpauUvXVSOKVCUn5kaFOSPeCpilKIn -Z57QzxpeR+nBsqTP3UEaBU6bS+5Kb1VSsyShNwrrZHYqLizz/Tt1kL/6cdjHPTfS -tQWVYrmm3ok9Nns4d0iXrKYgjy6myQzCsplFAMfOEVEiIuCl6rYVSAlk6l5PdPcF -PseKUgzbFbS9bZvlxrFUaKnjaZC2mqUPuLk/IH2uSrW4nOQdtqvmlKXBx4Ot2/Un -hw4EbNX/3aBd7YdStysVAq45pmp06drE57xNNB6pXE0zX5IJL4hmXXeXxx12E6nV -5fEWCRE11azbJHFwLJhWC9kXtNHjUStedejV0NxPNO3CBWaAocvmMw== ------END CERTIFICATE----- diff --git a/kio/kssl/kssl/geotrust-global-2.pem b/kio/kssl/kssl/geotrust-global-2.pem deleted file mode 100644 index d2ea26636..000000000 --- a/kio/kssl/kssl/geotrust-global-2.pem +++ /dev/null @@ -1,22 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIDZjCCAk6gAwIBAgIBATANBgkqhkiG9w0BAQUFADBEMQswCQYDVQQGEwJVUzEW -MBQGA1UEChMNR2VvVHJ1c3QgSW5jLjEdMBsGA1UEAxMUR2VvVHJ1c3QgR2xvYmFs -IENBIDIwHhcNMDQwMzA0MDUwMDAwWhcNMTkwMzA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io/kssl/kssl/globalsign-root-r1.pem deleted file mode 100644 index f4ce4ca43..000000000 --- a/kio/kssl/kssl/globalsign-root-r1.pem +++ /dev/null @@ -1,21 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIDdTCCAl2gAwIBAgILBAAAAAABFUtaw5QwDQYJKoZIhvcNAQEFBQAwVzELMAkG -A1UEBhMCQkUxGTAXBgNVBAoTEEdsb2JhbFNpZ24gbnYtc2ExEDAOBgNVBAsTB1Jv -b3QgQ0ExGzAZBgNVBAMTEkdsb2JhbFNpZ24gUm9vdCBDQTAeFw05ODA5MDExMjAw -MDBaFw0yODAxMjgxMjAwMDBaMFcxCzAJBgNVBAYTAkJFMRkwFwYDVQQKExBHbG9i -YWxTaWduIG52LXNhMRAwDgYDVQQLEwdSb290IENBMRswGQYDVQQDExJHbG9iYWxT -aWduIFJvb3QgQ0EwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDaDuaZ -jc6j40+Kfvvxi4Mla+pIH/EqsLmVEQS98GPR4mdmzxzdzxtIK+6NiY6arymAZavp -xy0Sy6scTHAHoT0KMM0VjU/43dSMUBUc71DuxC73/OlS8pF94G3VNTCOXkNz8kHp -1Wrjsok6Vjk4bwY8iGlbKk3Fp1S4bInMm/k8yuX9ifUSPJJ4ltbcdG6TRGHRjcdG -snUOhugZitVtbNV4FpWi6cgKOOvyJBNPc1STE4U6G7weNLWLBYy5d4ux2x8gkasJ -U26Qzns3dLlwR5EiUWMWea6xrkEmCMgZK9FGqkjWZCrXgzT/LCrBbBlDSgeF59N8 -9iFo7+ryUp9/k5DPAgMBAAGjQjBAMA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMBAf8E -BTADAQH/MB0GA1UdDgQWBBRge2YaRQ2XyolQL30EzTSo//z9SzANBgkqhkiG9w0B -AQUFAAOCAQEA1nPnfE920I2/7LqivjTFKDK1fPxsnCwrvQmeU79rXqoRSLblCKOz -yj1hTdNGCbM+w6DjY1Ub8rrvrTnhQ7k4o+YviiY776BQVvnGCv04zcQLcFGUl5gE -38NflNUVyRRBnMRddWQVDf9VMOyGj/8N7yy5Y0b2qvzfvGn9LhJIZJrglfCm7ymP -AbEVtQwdpf5pLGkkeB6zpxxxYu7KyJesF12KwvhHhm4qxFYxldBniYUr+WymXUad -DKqC5JlR3XC321Y9YeRq4VzW9v493kHMB65jUr9TU/Qr6cf9tveCX4XSQRjbgbME -HMUfpIBvFSDJ3gyICh3WZlXi/EjJKSZp4A== ------END CERTIFICATE----- diff --git a/kio/kssl/kssl/globalsign-root-r2.pem b/kio/kssl/kssl/globalsign-root-r2.pem deleted file mode 100644 index 6f0f8db0d..000000000 --- a/kio/kssl/kssl/globalsign-root-r2.pem +++ /dev/null @@ -1,22 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIDujCCAqKgAwIBAgILBAAAAAABD4Ym5g0wDQYJKoZIhvcNAQEFBQAwTDEgMB4G -A1UECxMXR2xvYmFsU2lnbiBSb290IENBIC0gUjIxEzARBgNVBAoTCkdsb2JhbFNp -Z24xEzARBgNVBAMTCkdsb2JhbFNpZ24wHhcNMDYxMjE1MDgwMDAwWhcNMjExMjE1 -MDgwMDAwWjBMMSAwHgYDVQQLExdHbG9iYWxTaWduIFJvb3QgQ0EgLSBSMjETMBEG -A1UEChMKR2xvYmFsU2lnbjETMBEGA1UEAxMKR2xvYmFsU2lnbjCCASIwDQYJKoZI -hvcNAQEBBQADggEPADCCAQoCggEBAKbPJA6+Lm8omUVCxKs+IVSbC9N/hHD6ErPL -v4dfxn+G07IwXNb9rfF73OX4YJYJkhD10FPe+3t+c4isUoh7SqbKSaZeqKeMWhG8 -eoLrvozps6yWJQeXSpkqBy+0Hne/ig+1AnwblrjFuTosvNYSuetZfeLQBoZfXklq -tTleiDTsvHgMCJiEbKjNS7SgfQx5TfC4LcshytVsW33hoCmEofnTlEnLJGKRILzd -C9XZzPnqJworc5HGnRusyMvo4KD0L5CLTfuwNhv2GXqF4G3yYROIXJ/gkwpRl4pa -zq+r1feqCapgvdzZX99yqWATXgAByUr6P6TqBwMhAo6CygPCm48CAwEAAaOBnDCB -mTAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUm+IH -V2ccHsBqBt5ZtJot39wZhi4wNgYDVR0fBC8wLTAroCmgJ4YlaHR0cDovL2NybC5n -bG9iYWxzaWduLm5ldC9yb290LXIyLmNybDAfBgNVHSMEGDAWgBSb4gdXZxwewGoG -3lm0mi3f3BmGLjANBgkqhkiG9w0BAQUFAAOCAQEAmYFThxxol4aR7OBKuEQLq4Gs -J0/WwbgcQ3izDJr86iw8bmEbTUsp9Z8FHSbBuOmDAGJFtqkIk7mpM0sYmsL4h4hO -291xNBrBVNpGP+DTKqttVCL1OmLNIG+6KYnX3ZHu01yiPqFbQfXf5WRDLenVOavS -ot+3i9DAgBkcRcAtjOj4LaR0VknFBbVPFd5uRHg5h6h+u/N5GJG79G+dwfCMNYxd -AfvDbbnvRG15RjF+Cv6pgsH/76tuIMRQyV+dTZsXjAzlAcmgQWpzU/qlULRuJQ/7 -TBj0/VLZjmmx6BEP3ojY+x1J96relc8geMJgEtslQIxq/H5COEBkEveegeGTLg== ------END CERTIFICATE----- diff --git a/kio/kssl/kssl/icpbrasil.pem b/kio/kssl/kssl/icpbrasil.pem deleted file mode 100644 index 53fa58c51..000000000 --- a/kio/kssl/kssl/icpbrasil.pem +++ /dev/null @@ -1,28 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIEuDCCA6CgAwIBAgIBBDANBgkqhkiG9w0BAQUFADCBtDELMAkGA1UEBhMCQlIx -EzARBgNVBAoTCklDUC1CcmFzaWwxPTA7BgNVBAsTNEluc3RpdHV0byBOYWNpb25h -bCBkZSBUZWNub2xvZ2lhIGRhIEluZm9ybWFjYW8gLSBJVEkxETAPBgNVBAcTCEJy -YXNpbGlhMQswCQYDVQQIEwJERjExMC8GA1UEAxMoQXV0b3JpZGFkZSBDZXJ0aWZp -Y2Fkb3JhIF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j8iBobJSm5uDpt7TirYh1Uxe3fQaGl -YjJe+9zd+izPRbBqXPVQA34EXcwk4qpWuf1hHriWfdrx8AcqSqr6CuQFwSr75Fos -SzlwDADa70mT7wZjAmQhnZx2xJ6wfWlT9VQfS//JYeIc7Fue2JNLd00UOSMMaiK/ -t79enKNHEA2fupH3vEigf5Eh4bVAN5VohrTm6MY53x7XQZZr1ME7a55lFEnSeT0u -mlOAjR2mAbvSM5X5oSZNrmetdzyTj2flCM8CC7MLab0kkdngRIlUBGHF1/S5nmPb -K+9A46sd33oqK8n8 ------END CERTIFICATE----- diff --git a/kio/kssl/kssl/ipsservidores.pem b/kio/kssl/kssl/ipsservidores.pem deleted file mode 100644 index e5963e72f..000000000 --- a/kio/kssl/kssl/ipsservidores.pem +++ /dev/null @@ -1,17 +0,0 @@ ------BEGIN CERTIFICATE----- -MIICtzCCAiACAQAwDQYJKoZIhvcNAQEEBQAwgaMxCzAJBgNVBAYTAkVTMRIwEAYD -VQQIEwlCQVJDRUxPTkExEjAQBgNVBAcTCUJBUkNFTE9OQTEZMBcGA1UEChMQSVBT -IFNlZ3VyaWRhZCBDQTEYMBYGA1UECxMPQ2VydGlmaWNhY2lvbmVzMRcwFQYDVQQD -Ew5JUFMgU0VSVklET1JFUzEeMBwGCSqGSIb3DQEJARYPaXBzQG1haWwuaXBzLmVz -MB4XDTk4MDEwMTIzMjEwN1oXDTA5MTIyOTIzMjEwN1owgaMxCzAJBgNVBAYTAkVT -MRIwEAYDVQQIEwlCQVJDRUxPTkExEjAQBgNVBAcTCUJBUkNFTE9OQTEZMBcGA1UE -ChMQSVBTIFNlZ3VyaWRhZCBDQTEYMBYGA1UECxMPQ2VydGlmaWNhY2lvbmVzMRcw -FQYDVQQDEw5JUFMgU0VSVklET1JFUzEeMBwGCSqGSIb3DQEJARYPaXBzQG1haWwu -aXBzLmVzMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCsT1J0nznqjtwlxLyY -XZhkJAk8IbPMGbWOlI6H0fg3PqHILVikgDVboXVsHUUMH2Fjal5vmwpMwci4YSM1 -gf/+rHhwLWjhOgeYlQJU3c0jt4BT18g3RXIGJBK6E2Ehim51KODFDzT9NthFf+G4 -Nu+z4cYgjui0OLzhPvYR3oydAQIDAQABMA0GCSqGSIb3DQEBBAUAA4GBACzzw3lY -JN7GO9HgQmm47mSzPWIBubOE3yN93ZjPEKn+ANgilgUTB1RXxafey9m4iEL2mdsU -dx+2/iU94aI+A6mB0i1sR/WWRowiq8jMDQ6XXotBtDvECgZAHd1G9AHduoIuPD14 -cJ58GNCr+Lh3B0Zx8coLY1xq+XKU1QFPoNtC ------END CERTIFICATE----- diff --git a/kio/kssl/kssl/ksslcalist b/kio/kssl/kssl/ksslcalist deleted file mode 100644 index a0761cf4a..000000000 --- a/kio/kssl/kssl/ksslcalist +++ /dev/null @@ -1,787 +0,0 @@ - -[/C=US/ST=DC/L=Washington/O=ABA.ECOM, INC./CN=ABA.ECOM Root CA/Email=admin@digsigtrust.com] -x509=MIIDtTCCAp2gAwIBAgIRANAeQJAAAEZSAAAAAQAAAAQwDQYJKoZIhvcNAQEFBQAwgYkxCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJEQzETMBEGA1UEBxMKV2FzaGluZ3RvbjEXMBUGA1UEChMOQUJBLkVDT00sIElOQy4xGTAXBgNVBAMTEEFCQS5FQ09NIFJvb3QgQ0ExJDAiBgkqhkiG9w0BCQEWFWFkbWluQGRpZ3NpZ3RydXN0LmNvbTAeFw05OTA3MTIxNzMzNTNaFw0wOTA3MDkxNzMzNTNaMIGJMQswCQYDVQQGEwJVUzELMAkGA1UECBMCREMxEzARBgNVBAcTCldhc2hpbmd0b24xFzAVBgNVBAoTDkFCQS5FQ09NLCBJTkMuMRkwFwYDVQQDExBBQkEuRUNPTSBSb290IENBMSQwIgYJKoZIhvcNAQkBFhVhZG1pbkBkaWdzaWd0cnVzdC5jb20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCx0xHgeVVDBwhMywVCAOINg0Y95JO6tgbTDVm9PsHOQ2cBiiGo77zM0KLMsFWWU4RmBQDaREmA2FQKpSWGlO1jVv9wbKOhGdJ4vmgqRF4vz8wYXke8OrFGPR7wuSw0X4x8TAgpnUBV6zx9g9618PeKgw6hTLQ6pbNfWiKX7BmbwQVo/ea3qZGULOR4SCQaJRk665WcOQqKz0Ky8BzVX/tr7WhWezkscjiw7pOp03t3POtxA6k4ShZsiSrK2jMTecJVjO2cu/LLWxD4LmE1xilMKtAqY9FlWbT4zfn0AIS2V0KFnTKo+SpU+/94Qby9cSj0u5C8/5Y0BONFnqFGKECBAgMBAAGjFjAUMBIGA1UdEwEB/wQIMAYBAf8CAQgwDQYJKoZIhvcNAQEFBQADggEBAARvJYbk5pYntNlCwNDJALF/VD6Hsm0kqS8Kfv2kRLD4VAe9G52dyntQJHsRW0mjpr8SdNWJt7cvmGQlFLdh6X9ggGvTZOirvRrWUfrAtF13Gn9kCF55xgVM8XrdTX3O5kh7VNJhkoHWG9YA8A6eKHegTYjHInYZw8eeG6Z3ePhfm1bR8PIXrI6dWeYf/le22V7hXZ9F7GFoGUHhsiAm/lowdiT/QHI8eZ98IkirRs3bs4Ysj78FQdPB4xTjQRcm0HyncUwZ6EoPclgxfexgeqMiKL0ZJGA/O4dzwGvky663qyVDslUte6sGDnVdNOVdc22esnVApVnJTzFxiNmIf1Q= -site=true -email=true -code=false - -[/C=SE/O=AddTrust AB/OU=AddTrust External TTP Network/CN=AddTrust External CA Root] -x509=MIIENjCCAx6gAwIBAgIBATANBgkqhkiG9w0BAQUFADBvMQswCQYDVQQGEwJTRTEUMBIGA1UEChMLQWRkVHJ1c3QgQUIxJjAkBgNVBAsTHUFkZFRydXN0IEV4dGVybmFsIFRUUCBOZXR3b3JrMSIwIAYDVQQDExlBZGRUcnVzdCBFeHRlcm5hbCBDQSBSb290MB4XDTAwMDUzMDEwNDgzOFoXDTIwMDUzMDEwNDgzOFowbzELMAkGA1UEBhMCU0UxF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Z4c+OLspoH4IcUkzBEMP9smcnrHAZcHF/nXGCwwfQ56HmIexkvA/X1id9NEHif2P0tEs7c42TkfYNVRknMDtABp4/MUTu7R3AnPdzRGULD4EfL+OHn3Bzn+UZKXC1sIXzSGAa2Il+tmzV7R/9x98oTaunet3IAIx6eH1lWfl2royBFkuucZKT8Rs3iQhCBSWxHveNCD9tVIkNAwHM+A+WD+eeSI8t0A65RF62WUaUC6wNW0uLp9BBGo6zEFlpROWCGOn9Bg/QIDAQABo4HRMIHOMB0GA1UdDgQWBBSBPjfYkrAfd59ctKtzquf2NGAv+jALBgNVHQ8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB/zCBjgYDVR0jBIGGMIGDgBSBPjfYkrAfd59ctKtzquf2NGAv+qFopGYwZDELMAkGA1UEBhMCU0UxFDASBgNVBAoTC0FkZFRydXN0IEFCMR0wGwYDVQQLExRBZGRUcnVzdCBUVFAgTmV0d29yazEgMB4GA1UEAxMXQWRkVHJ1c3QgUHVibGljIENBIFJvb3SCAQEwDQYJKoZIhvcNAQEFBQADggEBAAP3FUr4JNojVhaTdt02KLmuG7jD8WS6IBh4lSknVwW8fCr0uVFV2ocC3g8WFzH4qnkuCRO7r7IgGRLlk/lL+YPoRNWyQSW/iHVv/xD8SlTQX/D67zZzfRs2RcYhbbQVuE7PnFylPVoAjgbjPGsye/Kf8Lb93/AoGEjwxrzQvzSAlsJKsW2Ox5BF3i9nrEUEo3rcVZLJR2bYGozH7ZxOmuASu7VqTITh4SINhwBk/ox9Yjllpu9CtoAlEmEBqCQTcAARJl/6NVDFSMwGR+gn2HCNX2TmoUQmXiLsks3/QppEIW1cxeMiHV9HEufOX1362KqxMy3ZdvJOOjMMK7MtkAY= -site=true -email=true -code=false - -[/C=SE/O=AddTrust AB/OU=AddTrust TTP Network/CN=AddTrust Qualified CA Root] -x509=MIIEHjCCAwagAwIBAgIBATANBgkqhkiG9w0BAQUFADBnMQswCQYDVQQGEwJTRTEUMBIGA1UEChMLQWRkVHJ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wh/bDxGGuoYQ992zPlmhpwsaPXpF/gxsxjE1kh9I0xowX67ARRvxdlu3rsEQmr49lx95dr6h+sNNVJn0J6XdgWTP5XHAeZpVTh/EGGZyeNfpso+gmNIquIISD6q8rKFYqa0p9m9N5xotS1WfbC3P6CxB9bpT9zeRXEwMn8bLgn5v1Kh7sKAPgZcLlVAwRv1cEWw3F369nJad9Jjzc9YiQBCYz95OdBEsIJuQRno3eDBiFrRHnGTHyQwdOUeqN48Jzd/g66ed8/wMLH/S5noxqE= -site=true -email=true -code=false - -[/C=US/O=American Express Company, Inc./OU=American Express Technologies/CN=American Express Certificate Authority] -x509=MIICkDCCAfkCAgCNMA0GCSqGSIb3DQEBBAUAMIGPMQswCQYDVQQGEwJVUzEnMCUGA1UEChMeQW1lcmljYW4gRXhwcmVzcyBDb21wYW55LCBJbmMuMSYwJAYDVQQLEx1BbWVyaWNhbiBFeHByZXNzIFRlY2hub2xvZ2llczEvMC0GA1UEAxMmQW1lcmljYW4gRXhwcmVzcyBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkwHhcNOTgwODE0MjIwMTAwWhcNMDYwODE0MjM1OTAwWjCBjzELMAkGA1UEBhMCVVMxJzAlBgNVBAoTHkFtZXJpY2FuIEV4cHJlc3MgQ29tcGFueSwgSW5jLjEmMCQGA1UECxMdQW1lcmljYW4gRXhwcmVzcyBUZWNobm9sb2dpZXMxLzAtBgNVBAMTJkFtZXJpY2FuIEV4cHJlc3MgQ2VydGlmaWNhdGUgQXV0aG9yaXR5MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDJ8kmShcr9FSm1BrZE7PyIo/KGzv8UTyQckvnCI8HOQ99dNMi4FOzVKnCRSZXXVs2U8amT0Ggi3E19oApyKkfqJfCFAF82VGHPC/k3Wmed6R/pZD9wlWGn0DAC3iYopGYDBOkw+48zB/lvYYeictvzaHhjZlmpybdm4RWySDYs+QIDAQABMA0GCSqGSIb3DQEBBAUAA4GBAGgXYrhzi0xs60qlPqvlnS7SzYoHV/PGWZd2Fxf4Uo4nk9hY2Chs9KIEeorCdiSxArTfKPL386infiNIYYj0EWiuJl32oUtTJWrYKhQCDuCHIG6eGVxzkAsj4jGXIz/VIqLTBnvaN/XXtUFEF3pFAtmFRWbWjsfwegyZYiJpW+3S -site=true -email=false -code=false - -[/C=US/O=American Express Company, Inc./OU=American Express Technologies/CN=American Express Global Certificate Authority] -x509=MIIEBDCCAuygAwIBAgICAIUwDQYJKoZIhvcNAQEFBQAwgZYxCzAJBgNVBAYTAlVTMScwJQYDVQQKEx5BbWVyaWNhbiBFeHByZXNzIENvbXBhbnksIEluYy4xJjAkBgNVBAsTHUFtZXJpY2FuIEV4cHJlc3MgVGVjaG5vbG9naWVzMTYwNAYDVQQDEy1BbWVyaWNhbiBFeHByZXNzIEdsb2JhbCBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkwHhcNOTgwODE0MTkwNjAwWhcNMTMwODE0MjM1OTAwWjCBljELMAkGA1UEBhMCVVMxJzAlBgNVBAoTHkFtZXJpY2FuIEV4cHJlc3MgQ29tcGFueSwgSW5jLjEmMCQGA1UECxMdQW1lcmljYW4gRXhwcmVzcyBUZWNobm9sb2dpZXMxNjA0BgNVBAMTLUFtZXJpY2FuIEV4cHJlc3MgR2xvYmFsIENlcnRpZmljYXRlIEF1dGhvcml0eTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAPAkJmYu++tKc3FTiUfLJjxTkpRMysKFtQ34w1e9Lyofahi3V68MABb6oLaQpvcaoS5mJsdoo4qTaWa1RlYtHYLqkAwKIsKJUI0F89Src0HwzxKsKLRvFJSWWUuekHWG3+JH6+HpT0N+h8onGGaetcFAZX38YW+tm3LPqV7Y8/nabpEQ+ky16n4g3qk5L/WI5IpvNcYgnCuGRjMK/DFVpWusFkDpzTVZbzIEw3u1D3t3cPNIuypSgs6vKW3xEW9t5gcAAe+a8yYNpnkTZ6/4qxx1rJG1a75AsN6cDLFphRlxkRNFyt/R/eayypaDedv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+CchF0gDnqgqjaL+ii2eC6z7OhH8wTwkCO06q/lU7gF90ddK4bxp6TGOzW20g1SQdf0knXhogpQVoe+lwt7M4UQuSgY7jPqSBHXW5FHdiLU7s9d56hOHJ2Wkd2cvXQJqHJhqrAhOvE9LANWCdLB3MO1x1Q3q+YmorJGcXPKEYjuvOdk99ARGnNAWshJLA+375B/aIAEOAsbDzvU9aCzwo7hNLSAmW2edtSSKUCxldI3pGcSf+Biu641xZk2gkS45ngYM2Fxk1stjZ94lYLrbQIDAQABo1owWDATBgNVHSUEDDAKBggrBgEFBQcDAzAdBgNVHQ4EFgQUyEE0XBUVBOVA8tGrmm8kknqHQlowEgYDVR0TAQH/BAgwBgEB/wIBAzAOBgNVHQ8BAf8EBAMCAQYwDQYJKoZIhvcNAQEFBQADggEBAFJ0qpVLIozHPZak/l36L7W86/AL6VY4HdFtDaG8aIvwxYClJDT98pYYEYahNvU351RA1WQfw19wQmstOceeUgXO52py0o1yP0dQg6vHjSXJsOOnUxaVpmpT6hidj3ipd3ca+bSXR1mIJyi1yuEu1z4Oog24IkQD49FjsEE6ofWkLfd2HgRUmXgyQNcrfE26ppyweW4Hvozs7tc4aVvBDFZon/7r0eHIiPnyzX++hbREZwBQPvQmA2Tqd33oXj4cN0fI1uqk8zY8l8I5cgWUGSXD1zdBD8Efh4r9qr7psWRX5NuSoc/hSeg7H5ETWsOP2SVYSYBHD8YDrqzjv7fAqio= -site=false -email=false -code=true - -[/C=IE/O=Baltimore/OU=CyberTrust/CN=Baltimore CyberTrust Mobile Root] -x509=MIICfTCCAeagAwIBAgIEAgAAuDANBgkqhkiG9w0BAQUFADBhMQswCQYDVQQGEwJJRTESMBAGA1UEChMJQmFsdGltb3JlMRMwEQYDVQQLEwpDeWJlclRydXN0MSkwJwYDVQQDEyBCYWx0aW1vcmUgQ3liZXJUcnVzdCBNb2JpbGUgUm9vdDAeFw0wMDA1MTIxODIwMDBaFw0yMDA1MTIyMzU5MDBaMGExCzAJBgNVBAYTAklFMR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rV51Cni4eiVgLGw41uOKymaZN+hXe2wCQVt2yguzmKiYv60iNoS6zjrIZ3AQSsBUnuId9Mcj8e6uYi1agnnc+gRQKfRzMpijS3ljwumUNKoUMMo6vWrJYeKmpYcqWe4PwzV9/lSEy/CG9VwcPCPwBLKBsua4dnKM3p31vjsufFoREJIE9LAwqSuXmD+tqYF/LTdB1kC1FkYmGP1pWPgkAx9XbIGevOF6uvUA65ehD5f/xXtabz5OTZydc93Uk3zyZAsuT3lySNTPx8kmCFcB5kpvcY67Oduhjprl3RjM71oGDHweI12v/yejl0qhqdNkNwnGjkCAwEAAaNFMEMwHQYDVR0OBBYEFOWdWTCCR1jMrPoIVDaGezq1BE3wMBIGA1UdEwEB/wQIMAYBAf8CAQMwDgYDVR0PAQH/BAQDAgEGMA0GCSqGSIb3DQEBBQUAA4IBAQCFDF2O5G9RaEIFoN27TyclhAO992T9Ldcw46QQF+vaKSm2eT929hkTI7gQCvlYpNRhcL0EYWoSihfVCr3FvDB81ukMJY2GQE/szKN+OMY3EU/t3WgxjkzSswF07r51XgdIGn9w/xZchMB5hbgF/X++ZRGjD8ACtPhSNzkE1akxehi/oCr0Epn3o0WC4zxe9Z2etciefC7IpJ5OCBRLbf1wbWsaY71k5h+3zvDyny67G7fyUIhzksLi4xaNmjICq44Y3ekQEe5+NauQrz4wlHrQMz2nZQ/1/I6eYs9HRCwBXbsdtTLSR9I4LtD+gdwyah617jzV/OeBHRnDJELqYzmp -site=true -email=true -code=false - -[/C=CA/ST=ON/L=Toronto/O=BankEngine Inc./OU=Certification Authority Division/CN=bankengine/Email=ca@bankengine.com] -x509=MIID3TCCAsWgAwIBAgIBADANBgkqhkiG9w0BAQUFADCBqDELMAkGA1UEBhMCQ0ExCzAJBgNVBAgTAk9OMRAwDgYDVQQHEwdUb3JvbnRvMRgwFgYDVQQKEw9CYW5rRW5naW5lIEluYy4xKTAnBgNVBAsTIENlcnRpZmljYXRpb24gQXV0aG9yaXR5IERpdmlzaW9uMRMwEQYDV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HFRclR9qMM8aBnBZmf+Uv3K3uhT+UBzzY654U9Yi1JYnA -site=true -email=true -code=false - -[/C=BE/L=Brussels/O=BelSign NV/OU=BelSign Object Publishing Certificate Authority/CN=BelSign Object Publishing CA/Email=webmaster@belsign.be] -x509=MIIDAzCCAmygAwIBAgIBATANBgkqhkiG9w0BAQQFADCBuzELMAkGA1UEBhMCQkUxETAPBgNVBAcTCEJydXNzZWxzMRMwEQYDVQQKEwpCZWxTaWduIE5WMTgwNgYDVQQLEy9CZWxTaWduIE9iamVjdCBQdWJsaXNoaW5nIENlcnRpZmljYXRlIEF1dGhvcml0eTElMCMGA1UEAxMcQmVsU2lnbiBPYmplY3QgUHVibGlzaGluZyBDQTEjMCEGCSqGSIb3DQEJARYUd2VibWFzdGVyQGJlbHNpZ24uYmUwHhcNOTcwOTE5MjIwMzAwWhcNMDcwOTE5MjIwMzAwWjCBuzELMAkGA1UEBhMCQkUxETAPBgNVBAcTCEJydXNzZWxzMRMwEQYDVQQKEwpCZWxTaWduIE5WMTgwNgYDVQQLEy9CZWxTaWduIE9iamVjdCBQdWJsaXNoaW5nIENlcnRpZmljYXRlIEF1dGhvcml0eTElMCMGA1UEAxMcQmVsU2lnbiBPYmplY3QgUHVibGlzaGluZyBDQTEjMCEGCSqGSIb3DQEJARYUd2VibWFzdGVyQGJlbHNpZ24uYmUwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAMQuH7a/7oJA3fm3LkHVngWxWtAmfGJVA5v8y2HeS+/+6Jn+h7mIz5DaDwk8dt8Xl7bLPyVF/bS8WAC+sFq2FIeP7mdkrR2Ig7tnn2VhAFgIgFCfgMkx9iqQHC33SmwQ9iNDXTgJYIhXAs0WbBj8zfuSKnfQnpOjXYhk0Mj4XVRRAgMBAAGjFTATMBEGCWCGSAGG+EIBAQQEAwIABzANBgkqhkiG9w0BAQQFAAOBgQBjdhd8lvBTpV0BHFPOKcJ+daxMDaIIc7RqMf0CBhSZ3FQEpL/IloafMUMyJVf2hfYluze+oXkjyVcGJXFrRU/49AJAFoIir1TqMij2De6ZuksIUQ9uhiMhTC0liIHELg7xEyw4ipUCJMM6lWPkk45IuwhHcl+u5jpaR9Zxxp6aUg== -site=false -email=false -code=true - -[/C=BE/L=Brussels/O=BelSign NV/OU=BelSign Secure Server Certificate Authority/CN=BelSign Secure Server CA/Email=webmaster@belsign.be] -x509=MIIC8zCCAlygAwIBAgIBATANBgkqhkiG9w0BAQQFADCBszELMAkGA1UEBhMCQkUxETAPBgNVBAcTCEJydXNzZWxzMRMwEQYDVQQKEwpCZWxTaWduIE5WMTQwMgYDVQQLEytCZWxTaWduIFNlY3VyZSBTZXJ2ZXIgQ2VydGlmaWNhdGUgQXV0aG9yaXR5MSEwHwYDVQQDExhCZWxTaWduIFNlY3VyZSBTZXJ2ZXIgQ0ExIzAhBgkqhkiG9w0BCQEWFHdlYm1hc3RlckBiZWxzaWduLmJlMB4XDTk3MDcxNjIyMDA1NFoXDTA3MDcxNjIyMDA1NFowgbMxCzAJBgNVBAYTAkJFMREwDwYDVQQHEwhCcnVzc2VsczETMBEGA1UEChMKQmVsU2lnbiBOVjE0MDIGA1UECxMrQmVsU2lnbiBTZWN1cmUgU2VydmVyIENlcnRpZmljYXRlIEF1dGhvcml0eTEhMB8GA1UEAxMYQmVsU2lnbiBTZWN1cmUgU2VydmVyIENBMSMwIQYJKoZIhvcNAQkBFhR3ZWJtYXN0ZXJAYmVsc2lnbi5iZTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA1gESeJL4BEJ/yccig/x8R3AwK0kLPjZAkCjaIXODU/LE0RZAwFP/rqbGJLMnbaWzPTl3XagG9ubpvGMRTgZlcAqdk/miQIt/SoQOjRax1swIZBIM4ChLyKWEkBf7EUYu1qeFGMsYrmOasFgG9ADP+MQJGjUMofnuSv1t3v4mpTsCAwEAAaMVMBMwEQYJYIZIAYb4QgEBBAQDAgCgMA0GCSqGSIb3DQEBBAUAA4GBAGw9mcMF4h3K5S2qaIWLQDEgZhNo5lg6idCNdbLFYth9go/32TKBd/Y1W4UpzmeyubwrGXjP84f9RvGVdbIJVwMwwXrNckdxgMp9ncllPEcRIn36BwsoeKGT6AVFSOIyMko96FMcELfHc4wHUOH5yStTQfWDjeUJOUqOA2KqQGOL -site=true -email=false -code=false - -[/C=CA/ST=ON/L=Toronto/O=CertEngine Inc./OU=Certification Authority Division/CN=certengine/Email=ca@certengine.com] -x509=MIID3TCCAsWgAwIBAgIBADANBgkqhkiG9w0BAQUFADCBqDELMAkGA1UEBhMCQ0ExCzAJBgNVBAgTAk9OMRAwDgYDVQQHEwdUb3JvbnRvMRgwFgYDVQQKEw9DZXJ0RW5naW5lIEluYy4xKTAnBgNVBAsTIENlcnRpZmljYXRpb24gQXV0aG9yaXR5IERpdmlzaW9uMRMwEQYDVQQDEwpjZXJ0ZW5naW5lMSAwHgYJKoZIhvcNAQkBFhFjYUBjZXJ0ZW5naW5lLmNvbTAeFw05ODAxMDEwMDAwMDBaFw0zODAxMTcwMDAwMDBaMIGoMQswCQYDVQQGEwJDQTELMAkGA1UECBMCT04xEDAOBgNVBAcTB1Rvcm9udG8xGDAWBgNVBAoTD0NlcnRFbmdpbmUgSW5jLjEpMCcGA1UECxMgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkgRGl2aXNpb24xEzARBgNVBAMTCmNlcnRlbmdpbmUxIDAeBgkqhkiG9w0BCQEWEWNhQGNlcnRlbmdpbmUuY29tMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA7aTXURShaeVt9u/dP3Q2dVib3jTCZvEyc6yfpGgaYWewXWuP4HOSfI4hGZblbpl+dzJc6RjhR+pguIRtbT5FJB8SJGjRqoujBEOQOxtVtc2fjM9Dqh0iOvMWWS6buxHG55GVrHAQaO5HXEScKQBa9ZyNmpSXPTEBrDMej1OAGOkc524/TZrgFPF4AiJLLkxCcP8NuzUKlW3WzNMSSoCtjkUKy4wjSLlAWCFM0T9Df6/+Z8ZUQTzHoKCDncH5Qnynd7DlOwKQ2JwwxRhYGiGVTUN0GUq7qA11kW3+vnbFesKQXoF6o2PVx9s2YXviI2NXXUjZ0pVnsnFCc45Pm8XojwIDAQABoxAwDjAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBBQUAA4IBAQBP/aHOKJ00Akzc9HWM1X30hlWZFBaQi4pqD4Uhk8+pKzzwFP5DRLBOz8TYBbtdXrS6hxVMr2sqWmhVkuyepWhHZazKGyHY/y0FbOXsewAV1QxxSyx7ve89pCKv4/w0rQcP916iHc8Y/TCpmz7eITa3GId+8H/XTaBi8GBp9X9Ow8m25FmEB1NT+eJwefvfdKowjy4tSorKdW/eJspxNuTSRGmUy8G71W5dYvgpAlx6mdnHyzxEGvRYNNI2bS0ifXgbEFNWqSas9q34ea5KOpkJu8T/KyXfSb6rPOsBSb0twMowwGtCVH2C4Lw/8zo0EjhMpTOsPaub408PrZ+NQ2bl -site=true -email=true -code=false - -[/C=DE/O=Deutsche Telekom AG/OU=TeleSec Trust Center/CN=Deutsche Telekom Root CA] -x509=MIICjjCCAfegAwIBAgIBBjANBgkqhkiG9w0BAQQFADBtMQswCQYDVQQGEwJERTEcMBoGA1UEChMTRGV1dHNjaGUgVGVsZWtvbSBBRzEdMBsGA1UECxMUVGVsZVNlYyBUcnVzdCBDZW50ZXIxITAfBgNVBAMTGERldXRzY2hlIFRlbGVrb20gUm9vdCBDQTAeFw05ODEyMDkwOTExMDBaFw0wNDEyMDkyMzU5MDBaMG0xCzAJBgNVBAYTAkRFMRwwGgYDVQQKExNEZXV0c2NoZSBUZWxla29tIEFHMR0wGwYDVQQLExRUZWxlU2VjIFRydXN0IENlbnRlcjEhMB8GA1UEAxMYRGV1dHNjaGUgVGVsZWtvbSBSb290IENBMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDdBSz5BbO5EtdpcffqVjAIVxRDe7sanG0vV2HX4vVEa+42QZb2ZM7hwbK5pBQEmFDocPiONZp9ScFhHVmu2gYYlX2t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NVBAMTBENSTDEwKwYDVR0QBCQwIoAPMTk5ODEyMTAxODEwMjNagQ8yMDE4MTIxMDE4MTAyM1owCwYDVR0PBAQDAgEGMB8GA1UdIwQYMBaAFGp5fpFpRhgTCgJ3pVlbYJglDqL4MB0GA1UdDgQWBBRqeX6RaUYYEwoCd6VZW2CYJQ6i+DAMBgNVHRMEBTADAQH/MBkGCSqGSIb2fQdBAAQMMAobBFY0LjADAgSQMA0GCSqGSIb3DQEBBQUAA4GBACIS2Hod3IEGtgllsofIH160L+nEHvI8wbsEkBFKg05+k7lNQseSJqBcNJo4cvj9axY+IO6CizEqkzaFI4iKPANo08kJD038bKTaKHKTDomAsH3+gG9lbRgzl4vCa4nuYD3Im+9/KzJic5PLPON74nZ4RbyhkwS7hp86W0N6w4pl -site=true -email=true -code=false - -[/C=us/ST=Utah/L=Salt Lake City/O=Digital Signature Trust Co./OU=DSTCA X1/CN=DST RootCA X1/Email=ca@digsigtrust.com] -x509=MIID2DCCAsACEQDQHkCLAAACfAAAAAIAAAABMA0GCSqGSIb3DQEBBQUAMIGpMQswCQYDVQQGEwJ1czENMAsGA1UECBMEVXRhaDEXMBUGA1UEBxMOU2FsdCBMYWtlIENpdHkxJDAiBgNVBAoTG0RpZ2l0YWwgU2lnbmF0dXJlIFRydXN0IENvLjERMA8GA1UECxMIRFNUQ0EgWDExFjAUBgNVBAMTDURTVCBSb290Q0EgWDExITAfBgkqhkiG9w0BCQEWEmNhQGRpZ3NpZ3RydXN0LmNvbTAeFw05ODEyMDExODE4NTVaFw0wODExMjgxODE4NTVaMIGpMQswCQYDVQQGEwJ1czENMAsGA1UECBMEVXRhaDEXMBUGA1UEBxMOU2FsdCBMYWtlIENpdHkxJDAiBgNVBAoTG0RpZ2l0YWwgU2lnbmF0dXJlIFRydXN0IENvLjERMA8GA1UECxMIRFNUQ0EgWDExFjAUBgNVBAMTDURTVCBSb290Q0EgWDExITAfBgkqhkiG9w0BCQEWEmNhQGRpZ3NpZ3RydXN0LmNvb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BAsTCERTVENBIEUyMIGdMA0GCSqGSIb3DQEBAQUAA4GLADCBhwKBgQC/k48Xku8zExjrEH9OFr//Bo8qhbxe+SSmJIi2A7fBw18DW9Fvrn5C6mYjuGODVvsoLeE4i7TuqAHhzhy2iCoiRoX7n6dwqUcUP87eZfCocfdPJmyMvMa1795JJ/9IKn3oTQPMx7JSxhcxEzu1TdvIxPbDDyQq2gyd55FbgM2UnQIBA6OCASQwggEgMBEGCWCGSAGG+EIBAQQEAwIABzBoBgNVHR8EYTBfMF2gW6BZpFcwVTELMAkGA1UEBhMCVVMxJDAiBgNVBAoTG0RpZ2l0YWwgU2lnbmF0dXJlIFRydXN0IENvLjERMA8GA1UECxMIRFNUQ0EgRTIxDTALBgNVBAMTBENSTDEwKwYDVR0QBCQwIoAPMTk5ODEyMDkxOTE3MjZagQ8yMDE4MTIwOTE5MTcyNlowCwYDVR0PBAQDAgEGMB8GA1UdIwQYMBaAFB6CTShlgDzJQW6sNS5ay97u+DlbMB0GA1UdDgQWBBQegk0oZYA8yUFurDUuWsve7vg5WzAMBgNVHRMEBTADAQH/MBkGCSqGSIb2fQdBAAQMMAobBFY0LjADAgSQMA0GCSqGSIb3DQEBBQUAA4GBAEeNg61i8tuwnkUiBbmi1gMOOHLnnvx75pO2mqWilMg0HZHRxdf0CiUPPXiBng+xZ8SQTGPdXqfiup/1902lMXucKS1M/mQ+7LZT/uqb7YLbdHVLB3luHtgZg3Pe9T7Qtd7nS2h9Qy4qIOF+oHhEngj1mPnHfxsb1gYgAlihw6ID -site=true -email=true -code=false - -[/C=us/ST=Utah/L=Salt Lake City/O=Digital Signature Trust Co./OU=DSTCA X2/CN=DST RootCA X2/Email=ca@digsigtrust.com] -x509=MIID2DCCAsACEQDQHkCLAAB3bQAAAAEAAAAEMA0GCSqGSIb3DQEBBQUAMIGpMQswCQYDVQQGEwJ1czENMAsGA1UECBMEVXRhaDEXMBUGA1UEBxMOU2FsdCBMYWtlIENpdHkxJDAiBgNVBAoTG0RpZ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zE5q10mDEQb+64JYMzJM8FasHpwvVpp7wUocpf1VNs78lk30sPDst2yC7S8xmUJMqbINuBVd8d+6ybVK1GSYsyapMMj9puyrliGtf8J4tg== -site=true -email=false -code=false - -[/O=Entrust.net/OU=www.entrust.net/CPS_2048 incorp. by ref. (limits liab.)/OU=(c) 1999 Entrust.net Limited/CN=Entrust.net Certification Authority (2048)] -x509=MIIEXDCCA0SgAwIBAgIEOGO5ZjANBgkqhkiG9w0BAQUFADCBtDEUMBIGA1UEChMLRW50cnVzdC5uZXQxQDA+BgNVBAsUN3d3dy5lbnRydXN0Lm5ldC9DUFNfMjA0OCBpbmNvcnAuIGJ5IHJlZi4gKGxpbWl0cyBsaWFiLikxJTAjBgNVBAsTHChjKSAxOTk5IEVudHJ1c3QubmV0IExpbWl0ZWQxMzAxBgNVBAMTKkVudHJ1c3QubmV0IENlcnRpZmljYXRpb24gQXV0aG9yaXR5ICgyMDQ4KTAeFw05OTEyMjQxNzUwNTFaFw0xOTEyMjQxODIwNTFaMIG0MRQwEgYDVQQKEwtFbnRydXN0Lm5ldDFAMD4GA1UECxQ3d3d3LmVudHJ1c3QubmV0L0NQU18yMDQ4IGluY29ycC4gYnkgcmVmLiAobGltaXRzIGxpYWIuKTElMCMGA1UECxMcKGMpIDE5OTkgRW50cnVzdC5uZXQgTGltaXRlZDEzMDEGA1UEAxMqRW50cnVzdC5uZXQgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkgKDIwNDgpMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEArU1LqRKGsuqjIAcVFmQqK0vRvwtKTY7tgHalZ7d4QMBzQshowNtTK91euHaYNZOLGp18EzoOH1u3Hs/lJBQesYGpjX24zGtLA/ECDNyrpUAkAH90lKGdCCmziAv1h3edVc3kw37XamSrhRSGlVuXMlBvPci6Zgzj/L24ScF2iUkZ/cCovYmjZy/Gn7xxGWC4LeksyZB2ZnuU4q941mVTXTzWnLLPKQP5L6RQstRIzgUyVYr9smRMDuSYB3Xbf9+5CFVghTAp+XtIpGmG4zU/HoZdenoVve8AjhUiVBcAkCaTvA5JaJG/+EfTnZVCwQ5N328mz8MYIWJmQ3DW1cAH4QIDAQABo3QwcjARBglghkgBhvhCAQEEBAMCAAcwHwYDVR0jBBgwFoAUVeSB0RGAvtiJuQijMfmhJAkWuXAwHQYDVR0OBBYEFFXkgdERgL7YibkIozH5oSQJFrlwMB0GCSqGSIb2fQdBAAQQMA4bCFY1LjA6NC4wAwIEkDANBgkqhkiG9w0BAQUFAAOCAQEAWUesIYSKF8mciVMeuoCFGsY8Tj6xnLZ8xpJdGGQC49MGCBFhfGPjK50xA3B20qMooPS7mmNz7W3lKtvtFKkrxjYR0CvrB4ul2p5cGZ1WEvVUKcgF7bISKo30Axv/55IQh7A6tcOdBTcSo8f0FbnVpDkWm1M6I5HxqIKiaohowXkCIryqptau37AUX7iH0N18f3v/rxzP5tsHrV7bhZ3QKw0z2wTR5klAEyt2+z7pnIkPFc4YsIV4IU9rTw76NmfNB/L/CNDi3tm/Kq+4h4YhPATKt5Rof8886ZjXOP/swNlQ8C5LWK5Gb9Auw2DaclVyvUxFnmG6v4SBkgPR0ml8xQ== -site=false -email=false -code=false - -[/C=US/O=Entrust.net/OU=www.entrust.net/Client_CA_Info/CPS incorp. by ref. limits liab./OU=(c) 1999 Entrust.net Limited/CN=Entrust.net Client Certification Authority] -x509=MIIE7TCCBFagAwIBAgIEOAOR7jANBgkqhkiG9w0BAQQFADCByTELMAkGA1UEBhMCVVMxFDASBgNVBAoTC0VudHJ1c3QubmV0MUgwRgYDVQQLFD93d3cuZW50cnVzdC5uZXQvQ2xpZW50X0NBX0luZm8vQ1BTIGluY29ycC4gYnkgcmVmLiBsaW1pdHMgbGlhYi4xJTAjBgNVBAsTHChjKSAxOTk5IEVudHJ1c3QubmV0IExpbWl0ZWQxMzAxBgNVBAMTKkVudHJ1c3QubmV0IENsaWVudCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAeFw05OT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BYEFMT7nCl7l81MlvzuW7PKmXSLlepMMAwGA1UdEwQFMAMBAf8wGQYJKoZIhvZ9B0EABAwwChsEVjQuMAMCBJAwDQYJKoZIhvcNAQEEBQADgYEAP66K8ddmAwWePvrqHEa7pFuPeJoSSJn59DXeDDYHAmsQOokUgZwxpnyyQbJq5wcBoUv5nyU7lsqZwz6hURzzwy5E97BnRqqS5TvaHBkUODDV4qIxJS7x7EU47fgGWANzYrAQMY9Av2TgXD7FTx/aEkP/TOYGJqibGapEPHayXOw= -site=true -email=true -code=false - -[/C=US/O=Entrust.net/OU=www.entrust.net/CPS incorp. by ref. (limits liab.)/OU=(c) 1999 Entrust.net Limited/CN=Entrust.net Secure Server Certification Authority] -x509=MIIE2DCCBEGgAwIBAgIEN0rSQzANBgkqhkiG9w0BAQUFADCBwzELMAkGA1UEBhMCVVMxFDASBgNVBAoTC0VudHJ1c3QubmV0MTswOQYDVQQLEzJ3d3cuZW50cnVzdC5uZXQvQ1BTIGluY29ycC4gYnkgcmVmLiAobGltaXRzIGxpYWIuKTElMCMGA1UECxMcKGMpIDE5OTkgRW50cnVzdC5uZXQgTGltaXRlZDE6MDgGA1UEAxMxRW50cnVzdC5uZXQgU2VjdXJlIFNlcnZlciBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAeFw05OTA1MjUxNjA5NDBaFw0xOTA1MjUxNjM5NDBaMIHDMQswCQYDVQQGEwJVUzEUMBIGA1UEChMLRW50cnVzdC5uZXQxOzA5BgNVBAsTMnd3dy5lbnRydXN0Lm5ldC9DUFMgaW5jb3JwLiBieSByZWYuIChsaW1pdHMgbGlhYi4pMSUwIwYDVQQLExwoYykgMTk5OSBFbnRydXN0Lm5ldCBMaW1pdGVkMTowOAYDVQQDEzFFbnRydXN0Lm5ldCBTZWN1cmUgU2VydmVyIENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIGdMA0GCSqGSIb3DQEBAQUAA4GLADCBhwKBgQDNKIM0VBuJ8w+vN5Ex/68xYMmo6L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fqnc1zqcPGUIWVEX/r87yloqaKHee9570+sB3c4 -site=true -email=true -code=false - -[/C=US/O=Equifax Secure Inc./CN=Equifax Secure Global eBusiness CA-1] -x509=MIICkDCCAfmgAwIBAgIBATANBgkqhkiG9w0BAQQFADBaMQswCQYDVQQGEwJVUzEcMBoGA1UEChMTRXF1aWZheCBTZWN1cmUgSW5jLjEtMCsGA1UEAxMkRXF1aWZheCBTZWN1cmUgR2xvYmFsIGVCdXNpbmVzcyBDQS0xMB4XDTk5MDYyMTA0MDAwMFoXDTIwMDYyMTA0MDAwMFowWjELMAkGA1UEBhMCVVMxHDAaBgNVBAoTE0VxdWlmYXggU2VjdXJlIEluYy4xLTArBgNVBAMTJEVxdWlmYXggU2VjdXJlIEdsb2JhbCBlQnVzaW5lc3MgQ0EtMTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAuucXkAJlsTRVPEnCUdXfp9E3j9HngXNBUmCbnaEXJnitx7HoJpQytd4zjTov2/KaelpzmKNc6fuKcxtc58O/gGzNqfTWK8D3+ZmqY6KxRwIP1ORROhI8bIpaVIRw28HFkM9yRcuoWcDNM50/o5brhTMhHD4ePmBudpxnhcXIw2ECAwEAAaNmMGQwEQYJYIZIAYb4QgEBBAQDAgAHMA8GA1UdEwEB/wQFMAMBAf8wHwYDVR0jBBgwFoAUvqigdHJQa0S3ySPY+6j/s1draGwwHQYDVR0OBBYEFL6ooHRyUGtEt8kj2Puo/7NXa2hsMA0GCSqGSIb3DQEBBAUAA4GBADDiAVGqx+pf2rnQZQ8w1j7aDRRJbpGTJxQx78T3LUX47Me/okENI7SS+RkAZ70Br83gcfxaz2TE4JaY0KNA4gGK7ycH8WUBikQtBmV1UsCGECAhX2xrD2yuCRyv8qIYNMR1pHMc8Y3c7635s3a0kr/clRAevsvIO1qEYBlWlKlV -site=true -email=true -code=false - -[/C=US/O=Equifax Secure Inc./CN=Equifax Secure eBusiness CA-1] -x509=MIICgjCCAeugAwIBAgIBBDANBgkqhkiG9w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NVoXDTE5MDYyMzEyMTQ0NVowTjELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDkVxdWlmYXggU2VjdXJlMSYwJAYDVQQLEx1FcXVpZmF4IFNlY3VyZSBlQnVzaW5lc3MgQ0EtMjCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA5Dk5kx5SBhsoNviyoynF7Y6yEb3+6+e0dMKP/wXn2Z0GvxLIPw7y1tEkshHe0XMJitSxLJgJDR5QRrKDpkWNYmi7hRsgcDKqQM2mll/EcTc/BPO3QSQ5BxoeLmFYoBIL5aXfxavqN3HMHMg3OrmXUqesxWoklE6ce8/AatbfIb0CAwEAAaOCAQkwggEFMHAGA1UdHwRpMGcwZaBjoGGkXzBdMQswCQYDVQQGEwJVUzEXMBUGA1UEChMORXF1aWZheCBTZWN1cmUxJjAkBgNVBAsTHUVxdWlmYXggU2VjdXJlIGVCdXNpbmVzcyBDQS0yMQ0wCwYDVQQDEwRDUkwxMBoGA1UdEAQTMBGBDzIwMTkwNjIzMTIxNDQ1WjALBgNVHQ8EBAMCAQYwHwYDVR0jBBgwFoAUUJ4L6q9euSBIplBqy/3YIHqngnYwHQYDVR0OBBYEFFCeC+qvXrkgSKZQasv92CB6p4J2MAwGA1UdEwQFMAMBAf8wGgYJKoZIhvZ9B0EABA0wCxsFVjMuMGMDAgbAMA0GCSqGSIb3DQEBBQUAA4GBAAyGgq3oThr1jokn4jVYPSm0B482UJW/bsGe68SQsoWou7dC4A8HOd/7npCy0cE+U58DRLB+S/Rv5Hwf5+Kx5Lia78O9zt4LMjTZ3ijtM2vE1Nc9ElirfQkty3D1E4qUoSek1nDFbZS1yX2doNLGCEnZZpum0/QL3MUmV+GRMOrN -site=true -email=true -code=false - -[/C=CA/ST=ON/L=Toronto/O=FortEngine Inc./OU=Certification Authority Division/CN=fortengine/Email=ca@fortengine.com] -x509=MIIF3TCCA8WgAwIBAgIBADANBgkqhkiG9w0BAQUFADCBqDELMAkGA1UEBhMCQ0ExCzAJB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XE5bjrJcq6Oj/OTqZ3ID+OqbkUdAg0ggjRKcTgxnLHd/AbMzJ6PsclDDf7cLs0WSlxMxQR/z5bNST1rNtT9rsiv2TOhfvCBxO9AOjBioO8PLO032HTNECAwEAAaMQMA4wDAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQUFAAOCAgEAVyBpPWfT2VOyvVpslGKx8h0+CWP8cilygGRtZJ5dAJzc//1REAHdvK+TgZ4Foz3dqHhXI+RNN0FpzuWaYMjWZTS0kAmcOQuGY1Oo4PGlPHI21pNz29oFDTJr0ZmLBJ4JKVsE2soJg55jdk9MZHA7K//7HH9RsmrWZOE5DZDlrxp6+naixhMwnlPKKisIy9GNZUPqGdUWABMdB/BUVVNlNU5TtWpIXUClMd8a+eoKcItBeYXowkHOBpinPkDX3clFDIUfWiw0Ro08s8SrrFqR8Szwbrj52Xv1RM56oGqCjnkvJctxihODV7NcpxoAFjIZokDom0q6zPrrTUsLFQovPlovc3w5hmALiDMshaTvE1nm3Psn4yQ+FlRE8epTZrQiIGypZkZC6lcz0mYawueWcThYWGFhVG4ktQzOjjNRsNxopW+W7cF1zQTxiWUDnxIKSj7gtdQ2jiubxEEhfVagr8DMtAccNVTZVURpGi56TptOOuotrTqqC+2GviW4hlxvdvmuQN0OlXlUwzz2TrxcFamNnuA54lZw/8arLtxsFmHrcnPw53+1spumLD0S5UkxHNu40h6LIVpZz3H+0rLzuFofTfiyMjcfK2AyHQTgUCbsrvgNuLDQUbyFGVchdFUkhztX3DhEVnxnnrpY4BVjQdTqWIvw7lGlSuDCjxEQAOc= -site=true -email=true -code=false - -[/C=US/O=GTE Corporation/OU=GTE CyberTrust Solutions, Inc./CN=GTE CyberTrust Global Root] -x509=MIICWjCCAcMCAgGlMA0GCSqGSIb3DQEBBAUAMHUxCzAJBgNVBAYTAlVTMRgwFgYDVQQKEw9HVEUgQ29ycG9yYXRpb24xJzAlBgNVBAsTHkdURSBDeWJlclRydXN0IFNvbHV0aW9ucywgSW5jLjEjMCE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soJ7f4KWCluOxP9io8ct5gI738ESZfhT1I6MR42hLBTZuiOOrhqo4UwNCO9O5+eC/BenTX8NKp7b9t12QSfiasq1mpoIAk65g/yA= -site=true -email=false -code=false - -[/C=US/O=GTE Corporation/OU=GTE CyberTrust Solutions, Inc./CN=GTE CyberTrust Root 5] -x509=MIIDtjCCAp6gAwIBAgICAbYwDQYJKoZIhvcNAQEFBQAwcDELMAkGA1UEBhMCVVMxGDAWBgNVBAoTD0dURSBDb3Jwb3JhdGlvbjEnMCUGA1UECxMeR1RFIEN5YmVyVHJ1c3QgU29sdXRpb25zLCBJbmMuMR4wHAYDVQQDExVHVEUgQ3liZXJUcnVzdCBSb290IDUwHhcNOTgwODE0MTQ1MDAwWhcNMTMwODE0MjM1OTAwWjBwMQswCQYDVQQGEwJVUzEYMBYGA1UEChMPR1RFIENvcnBvcmF0aW9uMScwJQYDVQQLEx5HVEUgQ3liZXJUcnVzdCBTb2x1dGlvbnMsIEluYy4xHjAcBgNVBAMTFUdURSBDeWJlclRydXN0IFJvb3QgNTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALwSbj+KfHqXAeweuzlaAvR4RKJIG457SVJ6uHtHs6+Um2+7lvoramVcuByUc76/iQoigO5X/IwFu3CflzkE2qOHXKjlyq/AM5rVN1xLrOSA0KYjYPv9ci6UncfOwgQy73hgXe2thw9FZR48mgqavl0dmezn8tHGehfZrZtUln/EfGC/haoVNR1A2hG87FQhKC0joajwzy3N3fx+D17hZQdWywe00lboXjHMGGPEhtIthc+Tkqtt/mg5+95zvYb45EZ66p8My/QZ/mO80Sx7iDM29uThnAxTgWAc2i6rlqkWiBNQmbK9Vd8VMH7o5Zj7cH5stQf8/Ea30O03ln4y/iECAwEAAaNaMFgwEgYDVR0TAQH/BAgwBgEB/wIBBTAOBgNVHQ8BAf8EBAMCAQYwFwYDVR0gBBAwDjAMBgoqhkiG+GMBAgEDMBkGA1UdDgQSBBB2CkkhOEyf3vjEScdxcZGdMA0GCSqGSIb3DQEBBQUAA4IBAQBBOtQYW9q43iEc4Y4J5fFoNP/elvQH9ac886xKsZv6kvqb7eYyIapKdsXcTzjl39WG5NXIdn2Y17HNj021kSNsi4rr6nzvFJTExvAfSi0ycWMrY5EmAgm2gB3t4sy4f9uHY8jh0GwmsTUdQGYQG82VVBgzYewTT9oT95mvPtDPjqZyorPDBZrJJ32SzH5SjbOrcG2eiZ9N6xp1wpiq1QIW1wyKvyXk6y28mOlYOBl8uTf+2+KZCHMGx5eDan0QAS8yuRcFSmXmL86+XlOmgumaUwqEdC2DysiUFnZflGEo8IWnObvXi9moshMdVAk0JH0ggX1mfqKQdFwQxr3sqxvC -site=true -email=true -code=false - -[/C=US/O=GTE Corporation/CN=GTE CyberTrust Root] -x509=MIIB+jCCAWMCAgGjMA0GCSqGSIb3DQEBBAUAMEUxCzAJBgNVBAYTAlVTMRgwFgYDVQQKEw9HVEUgQ29ycG9yYXRpb24xHDAaBgNVBAMTE0dURSBDeWJlclRydXN0IFJvb3QwHhcNOTYwMjIzMjMwMTAwWhcNMDYwMjIzMjM1OTAwWjBFMQswCQYDVQQGEwJVUzEYMBYGA1UEChMPR1RFIENvcnBvcmF0aW9uMRwwGgYDVQQDExNHVEUgQ3liZXJUcnVzdCBSb290MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC45k+625h8cXyvRLfTD0bZZOWTwUKOx7pJjTUteueLveUFMVnGsS8KDPufpz+iCWaEVh43KRuH6X4MypqfpX/1FZSj1aJGgthoTNE3FQZor734sLPwKfWVWgkWYXcKIiXUT0Wqx73llt/51KiOQswkwB6RJ0q1bQaAYznEol44AwIDAQABMA0GCSqGSIb3DQEBBAUAA4GBABKzdcZfHeFhVYAA1IFLezEPI2PnPfMD+fQ2qLvZ46WXTeorKeDWanOB5sCJo9Px4KWlIjeaY8JIILTbcuPI9tl8vrGvU9oUtCG41tWW4/5ODFlitppK+ULdjG+BqXH/9ApybW1EDp3zdHSo1TRJ6V6e6bR64eVaH4Q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2qvzfvGn9LhJIZJrglfCm7ymPAbEVtQwdpf5pLGkkeB6zpxxxYu7KyJesF12KwvhHhm4qxFYxldBniYUr+WymXUadDKqC5JlR3XC321Y9YeRq4VzW9v493kHMB65jUr9TU/Qr6cf9tveCX4XSQRjbgbMEHMUfpIBvFSDJ3gyICh3WZlXi/EjJKSZp4A== -site=true -email=true -code=false - -[/C=CA/ST=ON/L=Toronto/O=MailEngine Inc./OU=Certification Authority Division/CN=mailengine/Email=ca@mailengine.com] -x509=MIID3TCCAsWgAwIBAgIBADANBgkqhkiG9w0BAQUFADCBqDELMAkGA1UEBhMCQ0ExCzAJBgNVBAgTAk9OMRAwDgYDVQQHEwdUb3JvbnRvMRgwFgYDVQQKEw9NYWlsRW5naW5lIEluYy4xKTAnBgNVBAsTIENlcnRpZmljYXRpb24gQXV0aG9yaXR5IERpdmlzaW9uMRMwEQYDVQQDEwptYWlsZW5naW5lMSAwHgYJKoZIhvcNAQkBFhFjYUBtYWlsZW5naW5lLmNvbTAeFw05ODAxMDEwMDAwMDBaFw0zODAxMTcwMDAwMDBaMIGoMQswCQYDVQQGEwJDQTELMAkGA1UECBMCT04xEDAOBgNVBAcTB1Rvcm9udG8xGDAWBgNVBAoTD01haWxFbmdpbmUgSW5jLjEpMCcGA1UECxMgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkgRGl2aXNpb24xEzARBgNVBAMTCm1haWxlbmdpbmUxIDAeBgkqhkiG9w0BCQEWEWNhQG1haWxlbmdpbmUuY29tMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAqXmfsU+lx+NFmn6tN17RTOyaddHqLnr/3rzEDIyT9TN+tF9TG7jmK7lJJrj5arQ3nTFaLF8JuND2U1z/cLPw6/TX+1tE3v3CNUDSjaisyUDiUyp3TE8hMMMzzfZQn0JsGgNhhWxqyzjhRQGtKL4+xtn8VsF/8zGgZYke7nlmVKz/FslDFTnNoodLBAEGiu9JQS9qqpbSs20NdZ6LXPL2A4iTjnsNFBW3jIMVIn/JVVyaycU7ue2oFviDvLNpkVZcR7A+jjIdIumOc5VSF0y7y74cQC5YwkR2mLK7UBYDK6NCY3ta/C4M8NsM0FpmvRl0+A1ivZtVwqI98dxDtp7HeQIDAQABoxAwDjAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBBQUAA4IBAQAjfNn5BCzxylBDakFQGWKE/P43PRibMOEzfd7+DzbYWIekoz3i00DwoH3b6j4gwlDJRAOq4dF6/Pt/uBOHDo/op+ef+9ErmKPd+ehXN9h37QbccTgz7DtVwA4iRlDRLru+JuXzT+OsCHuFZMOLJ+KD2JAGh3W68JjdcLkrlcptAU0wc5aOHPPfEBdIah8y8QtNzXRVzoBt8zzvgCARkXxTS2u/9QaXR1hML0JtDgQSSdZ6Kd8SN6yzqxD+buYD5sOfJmjBF/n3lqFHNMHnnGXy2TAXZtIAWzffU3A0cGPBN6FZ026a86HbF1X4k+xszhbJu/ikczyuWnCJIg3fTYSD -site=true -email=true -code=false - -[/C=ZA/ST=Western Cape/L=Cape Town/O=Thawte Consulting/OU=Certification Services Division/CN=Thawte Personal Basic CA/Email=personal-basic@thawte.com] -x509=MIIDITCCAoqgAwIBAgIBADANBgkqhkiG9w0BAQQFADCByzELMAkGA1UEBhMCWkExFTATBgNVBAgTDFdlc3Rlcm4gQ2FwZTESMBAGA1UEBxMJQ2FwZSBUb3duMRowGAYDVQQKExFUaGF3dGUgQ29uc3VsdGluZzEoMCYGA1UECxMfQ2VydGlmaWNhdGlvbiBTZXJ2aWNlcyBEaXZpc2lvbjEhMB8GA1UEAxMYVGhhd3RlIFBlcnNvbmFsIEJhc2ljIENBMSgwJgYJKoZIhvcNAQkBFhlwZXJzb25hbC1iYXNpY0B0aGF3dGUuY29tMB4XDTk2MDEwMTAwMDAwMFoXDTIwMTIzMTIzNTk1OVowgcsxCzAJBgNVBAYTAlpBMRUwEwYDVQQIEwxXZXN0ZXJuIENhcGUxEjAQBgNVBAcTCUNhcGUgVG93bjEaMBgGA1UEChMRVGhhd3RlIENvbnN1bHRpbmcxKDAmBgNVBAsTH0NlcnRpZmljYXRpb24gU2VydmljZXMgRGl2aXNpb24xITAfBgNVBAMTGFRoYXd0ZSBQZXJzb25hbCBCYXNpYyBDQTEoMCYGCSqGSIb3DQEJARYZcGVyc29uYWwtYmFzaWNAdGhhd3RlLmNvbTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAvLyTU23AUE+CFeZIlDWmWr5vQvoPR+53dXLdjUmbllegeNTKP1GzaQuRdhciB5dqxFGTS+CN7zeVoQxN2jSQHReJl+A1OFdKwPQIcOk8RHtQfmGakOMj04gRRif1CwcOu93RfyAKiLlWCy4cgNrx454p7xS9CkT7G1sY0b8jkyECAwEAAaMTMBEwDwYDVR0TAQH/BAUwAwEB/zANBgkqhkiG9w0BAQQFAAOBgQAt4plrsD16iddZopQBHyvdEktTwq1/qqcAXJFAVyVKOKqEcLnZgA+le1z7c8a914phXAPjLSeoF+CEhULcXpvGt7Jtu3Sv5D/Lp7ew4F2+eIMllNLbgQ95B21P9DkVWlIBe94y1k049hJcBlDfBVu9FEuh3ym6O0GN92NWod8isQ== -site=true -email=true -code=false - -[/C=ZA/ST=Western Cape/L=Cape Town/O=Thawte Consulting/OU=Certification Services Division/CN=Thawte Personal Freemail CA/Email=personal-freemail@thawte.com] -x509=MIIDLTCCApagAwIBAgIBADANBgkqhkiG9w0BAQQFADCB0TELMAkGA1UEBhMCWkExFTATBgNVBAgTDFdlc3Rlcm4gQ2FwZTESMBAGA1UEBxMJQ2FwZSBUb3duMRowGAYDVQQKExFUaGF3dGUgQ29uc3VsdGluZzEoMCYGA1UECxMfQ2VydGlmaWNhdGlvbiBTZXJ2aWNlcyBEaXZpc2lvbjEkMCIGA1UEAxMbVGhhd3RlIFBlcnNvbmFsIEZyZWVtYWlsIENBMSswKQYJKoZIhvcNAQkBFhxwZXJzb25hbC1mcmVlbWFpbEB0aGF3dGUuY29tMB4XDTk2MDEwMTAwMDAwMFoXDTIwMTIzMTIzNTk1OVowgdExCzAJBgNVBAYTAlpBMRUwEwYDVQQIEwxXZXN0ZXJuIENhcGUxEjAQBgNVBAcTCUNhcGUgVG93bjEaMBgGA1UEChMRVGhhd3RlIENvbnN1bHRpbmcxKDAmBgNVBAsTH0NlcnRpZmljYXRpb24gU2VydmljZXMgRGl2aXNpb24xJDAiBgNVBAMTG1RoYXd0ZSBQZXJzb25hbCBGcmVlbWFpbCBDQTErMCkGCSqGSIb3DQEJARYccGVyc29uYWwtZnJlZW1haWxAdGhhd3RlLmNvbTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA1GnX1LCUZFtx6UfYDFG26nKRsIRefS0Nj3sS34UldSh0OkIsYyeflXtL734Zhx2G6qPduc6WZBrCFG5ErHzmj+hND3EfQDimAKOHePb5lIZererAXnbr2RSjXW56fAylS1V/Bhkpf56aJtVquzgkCGqYx7Hao5iR/Xnb5VrEHLkCAwEAAaMTMBEwDwYDVR0TAQH/BAUwAwEB/zANBgkqhkiG9w0BAQQFAAOBgQDH7JJ+Tvj1lqVnYiqk8E0RYNBvjWBYYawmu1I1XAjPMPuoSpaKH2JCI4wXD/S6ZJwXrEcp352YXtJsYHFcoqzceePnbgBHH7UNKOgCneSa/RP0ptl8sfjcXyMmCZGAc9AUG95DqYMl8uacLxXK/qarigd1iwzdUYRr5PjRzneigQ== -site=true -email=true -code=false - -[/C=ZA/ST=Western Cape/L=Cape Town/O=Thawte Consulting/OU=Certification Services Division/CN=Thawte Personal Premium CA/Email=personal-premium@thawte.com] -x509=MIIDKTCCApKgAwIBAgIBADANBgkqhkiG9w0BAQQFADCBzzELMAkGA1UEBhMCWkExFTATBgNVBAgTDFdlc3Rlcm4gQ2FwZTESMBAGA1UEBxMJQ2FwZSBUb3duMRowGAYDVQQKExFUaGF3dGUgQ29uc3VsdGluZzEoMCYGA1UECxMfQ2VydGlmaWNhdGlvbiBTZXJ2aWNlcyBEaXZpc2lvbjEjMCEGA1UEAxMaVGhhd3RlIFBlcnNvbmFsIFByZW1pdW0gQ0ExKjAoBgkqhkiG9w0BCQEWG3BlcnNvbmFsLXByZW1pdW1AdGhhd3RlLmNvbTAeFw05NjAxMDEwMDAwMDBaFw0yMDEyMzEyMzU5NTlaMIHPMQswCQYDVQQGEwJaQTEVMBMGA1UECBMMV2VzdGVybiBDYXBlMRIwEAYDVQQHEwlDYXBlIFRvd24xGjAYBgNVBAoTEVRoYXd0ZSBDb25zdWx0aW5nMSgwJgYDVQQLEx9DZXJ0aWZpY2F0aW9uIFNlcnZpY2VzIERpdmlzaW9uMSMwIQYDVQQDExpUaGF3dGUgUGVyc29uYWwgUHJlbWl1bSBDQTEqMCgGCSqGSIb3DQEJARYbcGVyc29uYWwtcHJlbWl1bUB0aGF3dGUuY29tMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDJZtn4B0TPuYwu8KHvE0VsBd/eJxZRNkERbGw77f4QfRKe5ZtCmv5gMcNmt3M6SK5O0DI3lIi1DbbZ8/JE2dWIEt12TfIa/G8jHnrx2JhFTgcQ7xZC0EN1bUre4qrJMf8fAHB8Zs8QJQi6+u4A6UYDZicRFTuqW/KY3TZCstqIdQIDAQABoxMwETAPBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEBBAUAA4GBAGk2ifc0KjNyL2071CKyuG+axTZmDhs8obF1Wub9NdP4qPIHb4Vnjt4rueIXsDqg8A6iAJrf8xQVbrvIhVqYgPn/vnQdPfP+MCXRNzRn+qVxeTBhKXLA4CxM+1bkOqhv5TJZUtt1KFBZDPgLGeSs2a+WjS9Q2wfD6h+rM+D1KzGJ -site=true -email=true -code=false - -[/C=ZA/ST=Western Cape/L=Cape Town/O=Thawte Consulting cc/OU=Certification Services Division/CN=Thawte Premium Server CA/Email=premium-server@thawte.com] -x509=MIIDJzCCApCgAwIBAgIBATANBgkqhkiG9w0BAQQFADCBzjELMAkGA1UEBhMCWkExFTATBgNVBAgTDFdlc3Rlcm4gQ2FwZTESMBAGA1UEBxMJQ2FwZSBUb3duMR0wGwYDVQQKExRUaGF3dGUgQ29uc3VsdGluZyBjYzEoMCYGA1UECxMfQ2VydGlmaWNhdGlvbiBTZXJ2aWNlcyBEaXZpc2lvbjEhMB8GA1UEAxMYVGhhd3RlIFByZW1pdW0gU2VydmVyIENBMSgwJgYJKoZIhvcNAQkBFhlwcmVtaXVtLXNlcnZlckB0aGF3dGUuY29tMB4XDTk2MDgwMTAwMDAwMFoXDTIwMTIzMTIzNTk1OVowgc4xCzAJBgNVBAYTAlpBMRUwEwYDVQQIEwxXZXN0ZXJuIENhcGUxEjAQBgNVBAcTCUNhcGUgVG93bjEdMBsGA1UEChMUVGhhd3RlIENvbnN1bHRpbmcgY2MxKDAmBgNVBAsTH0NlcnRpZmljYXRpb24gU2VydmljZXMgRGl2aXNpb24xITAfBgNVBAMTGFRoYXd0ZSBQcmVtaXVtIFNlcnZlciBDQTEoMCYGCSqGSIb3DQEJARYZcHJlbWl1bS1zZXJ2ZXJAdGhhd3RlLmNvbTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA0jY2aovXwlue2oFBYo847kkEVdbQ7xwblRZH7xhINTpS9CtqBo87L+pW46+GjZ4X9560ZXUCTe/LCaIhUdib0GfQug2SBhRz1JPLlyoAnFxODLz6FVL88kRu2hFKbgifLy3j+ao6hnO2RlNYyIkFvYMRuHM/qgeN9EJN50CdHDcCAwEAAaMTMBEwDwYDVR0TAQH/BAUwAwEB/zANBgkqhkiG9w0BAQQFAAOBgQAmSCwWwlj66BZ0DKqqX1Q/8tfJeGBeXm43YyJ3Nn6yF8Q0ufUIhfzJATj/Tb7yFkJD57taRvvBxhEf8UqwKEbJw8RCfbz6q1lu1bdRiBHjpIUZa4JMpAwSremkrj/xw0llmozFyD4lt5SZu5IycQfwhl7tUCemDaYj+bvLpgcUQg== -site=true -email=true -code=false - -[/C=ZA/ST=Western Cape/L=Cape Town/O=Thawte Consulting cc/OU=Certification Services Division/CN=Thawte Server CA/Email=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BdPI8FA10afVQg83NLyHbIkaK0PdRGpVX8gWLGhntO0XoNsJufvtXIgAfBlOprpPGj3EqMUWS545t5pkiwIP879xXZndPojYx+6ETjeXKo5V9AQxkcDtTQmiAx7udqAA1aZgMqGfYQ+Wqz5XgUZWkFz9CnbgEztN5ecjTihYykuDXou7XN0wvrLh7vkX28RgznHs3piTZvECrAOnDN4ur2LbzXoFOsBRrBz4f7ML2RCKVu7Pmb9b5cGW6CoNlqg4TL4MTI1OLQBb6zi/8TQT469isxTbCFVdIOOxVs7Qeuq3SQgYXDXPIV6a+lk2p8sD7eiEc9clwqYKQtfEM1HkQvoGm6VxhnHd5mqTDNyZXN8lSLPoI/9BfxmHA9Ha+/N5Oz6tRmXHH33701s8GVhkTUwttdFlIGZtTBS2dMlTT5SxTi2Q+1GR744AJFMz+FkZja3Fp+PnLJ/aIVLxFs84CyJTuQFv5QgLC/7DYLOsof17JJgGZpw== -site=true -email=false -code=false - -[/C=CA/ST=ON/L=Toronto/O=TraderEngine Inc./OU=Certification Authority Division/CN=traderengine/Email=ca@traderengine.com] -x509=MIID6TCCAtGgAwIBAgIBADANBgkqhkiG9w0BAQUFADCBrjELMAkGA1UEBhMCQ0ExCzAJBgNVBAgTAk9OMRAwDgYDVQQHEwdUb3JvbnRvMRowGAYDVQQKExFUcmFkZXJFbmdpbmUgSW5jLjEpMCcGA1UECxMgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkgRGl2aXNpb24xFTATBgNVBAMTDHRyYWRlcmVuZ2luZTEiMCAGCSqGSIb3DQEJARYTY2FAdHJhZGVyZW5naW5lLmNvbTAeFw05ODAxMDEwMDAwMDBaFw0zODAxMTcwMDAwMDBaMIGuMQswCQYDVQQGEwJDQTELMAkGA1UECBMCT04xEDAOBgNVBAcTB1Rvcm9udG8xGjAYBgNVBAoTEVRyYWRlckVuZ2luZSBJbmMuMSkwJwYDVQQLEyBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSBEaXZpc2lvbjEVMBMGA1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wIBAaEDAgECogMCAQGjBAICJxEwEAYJYIZIhvltZAIBBAMKAQEwEAYJYIZIhvltZAIDBAMKAQYwUwYJYIZIhvltZAIEBEYwRKA0GjJDQSBNQVNURVIgUlNBIDEwMjQgQmVyIChTRUxGIFNJR04pIChDaHJ5c0FsaXMgQ1NQKaEMMAqhAwoBAKIDAwEAMB0GA1UdDgQWBBTTzoJ08y9LiWBypF4Rv191A6ICqzAdBgNVHREEFjAUgRJyb290MTAwMDFAdXNwcy5jb20wDwYDVR0PAQH/BAUDAwfGADAPBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEBBQUAA4GBAI7SbReJ5I5NalEKF2ARay289lC8DMpJqaw7qotxs9HL9hx+IkIh6av2EiAybbIYKhFpcdjKWUqYrTKYo5hjUW0jIfJRrqB3giO7nciBgas7CFr6y02kLHfLYKik//iMkFQtsLSDSguwPOvsY5vllP4Fo94aBCf2/0+o6iQIKyWa -site=true -email=true -code=false - -[/L=ValiCert Validation Network/O=ValiCert, Inc./OU=ValiCert Class 1 Policy Validation Authority/CN=http://www.valicert.com//Email=info@valicert.com] -x509=MIIC5zCCAlACAQEwDQYJKoZIhvcNAQEFBQAwgbsxJDAiBgNVBAcTG1ZhbGlDZXJ0IFZhbGlkYXRpb24gTmV0d29yazEXMBUGA1UEChMOVmFsaUNlcnQsIEluYy4xNTAzBgNVBAsTLFZhbGlDZXJ0IENsYXNzIDEgUG9saWN5IFZhbGlkYXRpb24gQXV0aG9yaXR5MSEwHwYDVQQDExhodHRwOi8vd3d3LnZhbGljZXJ0LmNvbS8xIDAeBgkqhkiG9w0BCQEWEWluZm9AdmFsaWNlcnQuY29tMB4XDTk5MDYyNTIyMjM0OFoXDTE5MDYyNTIyMjM0OFowgbsxJDAiBgNVBAcTG1ZhbGlDZXJ0IFZhbGlkYXRpb24gTmV0d29yazEXMBUGA1UEChMOVmFsaUNlcnQsIEluYy4xNTAzBgNVBAsTLFZhbGlDZXJ0IENsYXNzIDEgUG9saWN5IFZhbGlkYXRpb24gQXV0aG9yaXR5MSEwHwYDVQQDExhodHRwOi8vd3d3LnZhbGljZXJ0LmNvbS8xIDAeBgkqhkiG9w0BCQEWEWluZm9AdmFsaWNlcnQuY29tMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDYWYJ6ibiWuqYvaG9YLqdUHAZu9OqNSLwxlBfw8068srg1knaw0KWlAdcAAxIiGQj4/xEjm84H9b9pGib+TunRf50sQB1ZaG6m+FiwnRqP0z/x3BkGgagO4DrdyFNFCQbmD3DD+kCmDuJWBQ8YTfwggtFzVXSNdnKgHZ0dwN0/cQIDAQABMA0GCSqGSIb3DQEBBQUAA4GBAFBoPUn0LBwGlN+VYH+Wexf+T3GtZMjdd9LvWVXoP+iOBSoh8gfStadS/pyxtuJbdxdA6nLWI8sogTLDAHkY7FkXicnGah5xyf23dKUlRWnFSKsZ4UWKJWsZ7uW7EvV/96aNUcPwnXS3qT6gpf+2SQMT2iLM7XGCK5nPOrf1LXLI -site=true -email=false -code=false - -[/L=ValiCert Validation Network/O=ValiCert, Inc./OU=ValiCert Class 2 Policy Validation Authority/CN=http://www.valicert.com//Email=info@valicert.com] -x509=MIIC5zCCAlACAQEwDQYJKoZIhvcNAQEFBQAwgbsxJDAiBgNVBAcTG1ZhbGlDZXJ0IFZhbGlkYXRpb24gTmV0d29yazEXMBUGA1UEChMOVmFsaUNlcnQsIEluYy4xNTAzBgNVBAsTLFZhbGlDZXJ0IENsYXNzIDIgUG9saWN5IFZhbGlkYXRpb24gQXV0aG9yaXR5MSEwHwYDVQQDExhodHRwOi8vd3d3LnZhbGljZXJ0LmNvbS8xIDAeBgkqhkiG9w0BCQEWEWluZm9AdmFsaWNlcnQuY29tMB4XDTk5MDYyNjAwMTk1NFoXDTE5MDYyNjAwMTk1NFowgbsxJDAiBgNVBAcTG1ZhbGlDZXJ0IFZhbGlkYXRpb24gTmV0d29yazEXMBUGA1UEChMOVmFsaUNlcnQsIEluYy4xNTAzBgNVBAsTLFZhbGlDZXJ0IENsYXNzIDIgUG9saWN5IFZhbGlkYXRpb24gQXV0aG9yaXR5MSEwHwYDVQQDExhodHRwOi8vd3d3LnZhbGljZXJ0LmNvbS8xIDAeBgkqhkiG9w0BCQEWEWluZm9AdmFsaWNlcnQuY29tMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDOOnHK5avIWZJV16vYdA757tn2VUdZZUcOBVXc65g2PFxTXdMwzzjsvUGJ7SVCCSRrCl6zfN1SLUzm1NZ9WlmpZdRJEy0kTRxQb7XBhVQ7/nHk01xC+YDgkRoKWzk2Z/M/VXwbP7RfZHM047QSv4dk+NoS/zcnwbNDu+97bi5p9wIDAQABMA0GCSqGSIb3DQEBBQUAA4GBADt/UG9vUJSZSWI4OB9L+KXIPqeCgfYrx+jFzug6EILLGACOTb2oWH+heQC1u+mNr0HZDzTuIYEZoDJJKPTEjlbVUjP9UNV+mWwD5MlM/Mtsq2azSiGM5bUMMj4QssxsodyamEwCW/POuZ6lcg5Ktz885hZo+L7tdEy8W9ViH0Pd -site=true -email=false -code=false - -[/L=ValiCert Validation Network/O=ValiCert, Inc./OU=ValiCert Class 3 Policy Validation Authority/CN=http://www.valicert.com//Email=info@valicert.com] -x509=MIIC5zCCAlACAQEwDQYJKoZIhvcNAQEFBQAwgbsxJDAiBgNVBAcTG1ZhbGlDZXJ0IFZhbGlkYXRpb24gTmV0d29yazEXMBUGA1UEChMOVmFsaUNlcnQsIEluYy4xNTAzBgNVBAsTLFZhbGlDZXJ0IENsYXNzIDMgUG9saWN5IFZhbGlkYXRpb24gQXV0aG9yaXR5MSEwHwYDVQQDExhodHRwOi8vd3d3LnZhbGljZXJ0LmNvbS8xIDAeBgkqhkiG9w0BCQEWEWluZm9AdmFsaWNlcnQuY29tMB4XDTk5MDYyNjAwMjIzM1oXDTE5MDYyNjAwMjIzM1owgbsxJDAiBgNVBAcTG1ZhbGlDZXJ0IFZhbGlkYXRpb24gTmV0d29yazEXMBUGA1UEChMOVmFsaUNlcnQsIEluYy4xNTAzBgNVBAsTLFZhbGlDZXJ0IENsYXNzIDMgUG9saWN5IFZhbGlkYXRpb24gQXV0aG9yaXR5MSEwHwYDVQQDExhodHRwOi8vd3d3LnZhbGljZXJ0LmNvbS8xIDAeBgkqhkiG9w0BCQEWEWluZm9AdmFsaWNlcnQuY29tMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDjmFGWHOjVsQaBalfDcnWTq8+epvzzFlLWLU2fNUSoLgRNB0mKOCn1dzfnt6td3zZxFJmP3MKS8edgkpfs2Ejcv8ECIMYkpChMMFp2bbFc893enhBxoYjHW5tBbcqwuI4V7q0zK89HBFx1cQqYJJgpp0lZpd34t0NiYfPT4tBVPwIDAQABMA0GCSqGSIb3DQEBBQUAA4GBAFa7AliEZwgs3x/be0kz9dNnnfS0ChCzycUs4pJqcXgn8nCDQtM+z6lU9PHYkhaM0QTLS6vJn0WuPIqpsHEzXcjFV9+vqDWzf4mH6eglkrh/hXqu1rweN1gqZ8mRzyqBPu3GOd/APhmcGcwTTYJBtYze4D1gCCAPRX5ron+jjBXu -site=true -email=false -code=false - -[/L=ValiCert Validation Network/O=ValiCert, Inc./OU=Class 1 Validation Authority - OCSP/CN=http://www.valicert.net//Email=info@valicert.com] -x509=MIIDSDCCArGgAwIBAgIBATANBgkqhkiG9w0BAQUFADCBsjEkMCIGA1UEBxMbVmFsaUNlcnQgVmFsaWRhdGlvbiBOZXR3b3JrMRcwFQYDVQQKEw5WYWxpQ2VydCwgSW5jLjEsMCoGA1UECxMjQ2xhc3MgMSBWYWxpZGF0aW9uIEF1dGhvcml0eSAtIE9DU1AxITAfBgNVBAMTGGh0dHA6Ly93d3cudmFsaWNlcnQubmV0LzEgMB4GCSqGSIb3DQEJARYRaW5mb0B2YWxpY2VydC5jb20wHhcNMDAwMjEyMTE1MDA1WhcNMDUwMjEwMTE1MDA1WjCBsjEkMCIGA1UEBxMbVmFsaUNlcnQgVmFsaWRhdGlvbiBOZXR3b3Jr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2lnbiwgSW5jLjE3MDUGA1UECxMuQ2xhc3MgNCBQdWJsaWMgUHJpbWFyeSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA0LJ19njQrlpQ9OlQqZ+M1++RlHDo0iSQdomF1t+s5gEXMoDwnZNHvJplnR+Xrr/phnVjIIm9gFidBAydqMEk6QvlMXi9/C0MN2qeeIDpRnX57aP7E3vIwUzSo+/1PLBij0pdO92VZ48TucE81qcmm+zDO3rZTbxtm+gVAePwR6kCAwEAATANBgkqhkiG9w0BAQIFAAOBgQBT3dPwnCR+QKri/AAa19oM/DJhuBUNlvP6Vxt/M3yv6ZiaYch6s7f/sdyZg9ysEvxwyR84Qu1E9oAuW2szaayc01znX1oYx7EteQSWQZGZQbE8DbqEOcY7l/AmyY7uvcxClf8exwI/VAx49byqYHwCaejcrOICdmHEPgPq0ook0Q== -site=true -email=false -code=false - -[/C=US/O=VeriSign, Inc./OU=Class 1 Public Primary Certification Authority] -x509=MIICPTCCAaYCEQDNun9W8N/kvFT+IqyzcqpVMA0GCSqGSIb3DQEBAgUAMF8xCzAJBgNVBAYTAlVTMRcwFQYDVQQKEw5WZXJpU2lnbiwgSW5jLjE3MDUGA1UECxMuQ2xhc3MgMSBQdWJsaWMgUHJpbWFyeSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAeFw05NjAxMjkwMDAwMDBaFw0yODA4MDEyMzU5NTlaMF8xCzAJBgNVBAYTAlVTMRcwFQYDVQQKEw5WZXJpU2lnbiwgSW5jLjE3MDUGA1UECxMuQ2xhc3MgMSBQdWJsaWMgUHJpbWFyeSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA5Rm/baNWYS2ZSHH2Z965jeu3noaACpEO+jglr0aIguVzqKCbJF0NH8xlbgyw0FaEGIeaBpsQoXPftFg5a27B9hXVqKg/qhIGjTGsf7A01480Z4gJzRQR4k5FVmkfeAKA2txHkSm7NsljXMXg1y2He6G3MrB7MLoqLzGq7qNn2tsCAwEAATANBgkqhkiG9w0BAQIFAAOBgQBMP7iLxmjf7kMzDl3ppssHhE16M/+SG/Q2rdiVIjZoEWx8QszznC7EBz8UsA9P/5CSdvnivErpj82ggAr3xSnxgiJduLHdgSOjeyUVRjB5FvjqBUuUfx3CHMjjt/QQQDwTw18fU+hI5Ia0e6E1sHslurjTjqs/OJ0ANACY89FxlA== -site=true -email=false -code=false - -[/C=US/O=VeriSign, Inc./OU=Class 1 Public Primary Certification Authority - G2/OU=(c) 1998 VeriSign, Inc. - For authorized use only/OU=VeriSign Trust Network] -x509=MIIDAjCCAmsCEEzH6qqYPnHTkxD4PTqJkZIwDQYJKoZIhvcNAQEFBQAwgcExCzAJBgNVBAYTAlVTMRcwFQYDVQQKEw5WZXJpU2lnbiwgSW5jLjE8MDoGA1UECxMzQ2xhc3MgMSBQdWJsaWMgUHJpbWFyeSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAtIEcyMTowOAYDVQQLEzEoYykgMTk5OCBWZXJpU2lnbiwgSW5jLiAtIEZvciBhdXRob3JpemVkIHVzZSBvbmx5MR8wHQYDVQQLExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMB4XDTk4MDUxODAwMDAwMFoXDTI4MDgwMTIzNTk1OVowgcExCzAJBgNVBAYTAlVTMRcwFQYDVQQKEw5WZXJpU2lnbiwgSW5jLjE8MDoGA1UECxMzQ2xhc3MgMSBQdWJsaWMgUHJpbWFyeSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAtIEcyMTowOAYDVQQLEzEoYykgMTk5OCBWZXJpU2lnbiwgSW5jLiAtIEZvciBhdXRob3JpemVkIHVzZSBvbmx5MR8wHQYDVQQLExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCq0Lq+Fi24g9TK0g+8djHKlNgdk4xWArzZbxpvUjZudVYKVdPfQ4chEWWKfo+9Id5rMj8bhDSVBZ1BNeuS65bdqlk/AVNtmU/t5eIqWpDBucSmFc/IReumXY6cPvBkJHalzasab7bYe1FhbqZ/h8jit+U03EGI6glAvnOSPWvndQIDAQABMA0GCSqGSIb3DQEBBQUAA4GBAKlPww3HZ74sy9mozS11534Vnjty637rXC0Jh9ZrbWB85a7FkCMMXErQr7Fd88e2CtvgFZMN3QO8x3aKtd1Pw5sTdbgBwObJW2uluIncrKTdcu1OofdPvAbT6shkdHvClUGcZXNY8ZCaPGqxmMnEh7zPRW1F4m4iP/68DzFc6PLZ -site=true -email=false -code=false - -[/C=US/O=VeriSign, Inc./OU=VeriSign Trust Network/OU=(c) 1999 VeriSign, Inc. - For authorized use only/CN=VeriSign Class 1 Public Primary Certification Authority - G3] -x509=MIIEGjCCAwICEQCLW3VWhFSFCwDPrzhIzrGkMA0GCSqGSIb3DQEBBQUAMIHKMQswCQYDVQQGEwJVUzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZlcmlTaWduIFRydXN0IE5ldHdvcmsxOjA4BgNVBAsTMShjKSAxOTk5IFZlcmlTaWduLCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxRTBDBgNVBAMTPFZlcmlTaWduIENsYXNzIDEgUHVibGljIFByaW1hcnkgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkgLSBHMzAeFw05OTEwMDEwMDAwMDBaFw0zNjA3MTYyMzU5NTlaMIHKMQswCQYDVQQGEwJVUzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZlcmlTaWduIFRydXN0IE5ldHdvcmsxOjA4BgNVBAsTMShjKSAxOTk5IFZlcmlTaWduLCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxRTBDBgNVBAMTPFZlcmlTaWduIENsYXNzIDEgUHVibGljIFByaW1hcnkgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkgLSBHMzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAN2E1Lm0+afY8wR4nN493GwTFtl63SRRZsDHJlkNrAYIwpTRMx/wgzUfbhvI3qpuFU5UJ+/EbRrsC+MO8ESlV8dAWB6jRx9x7GD2bZTIGDnt/kIYVt/kTEkQeE4BdjVjEjbdZrwBBDajVWjVojYJrKshJlQGrT/KFOCsyq0GHZXi+J3x4GD/wn91K0zM2v6HmSHquv4+VNfSWXjbPG7PoBMAGrgnoeS+Z5bKoMWznN3JdZ7rMJpfo83ZrngZPyPpXNspva1VyBtUjGP26KbqxzcSXKMpHgLZ2x87tNcPVkeBFQRKr4Mn0cVYiMHd9qqnoxjaaKptEVHhv2Vrn5Z20T0CAwEAATANBgkqhkiG9w0BAQUFAAOCAQEAq2aN17O6x5q25lXQBfGfMY1aqtmqRiYPce2lrVNWYgFHKkTp/j90CxObufRNG7LRX7K20ohcs5/Ny9Sn2WCVhDr4wTcdYcrnsMXlkdpUpqwxga6X3s0IrLjAl4B/bnKk52kTlWUfxJM8/XmPBNQ+T+r3ns7NZ3xPZQL/kYVUc8f/NveGLezQXk//EZ9yBta4GvFMDSZl4kSAHsef493oCtrspSCAaWihT37ha88HQfqDjrw43bAuEbFrskLMmrz5SCJ5ShkPshw+IHTZasO+8ih4E1Z5T21Q6huwtVexN2ZYI/PcD98Kh8TvhgXVOBRgmaNL3gaWcSzy27YfpO8/7g== -site=true -email=false -code=false - -[/O=VeriSign, Inc./OU=VeriSign Trust Network/OU=Terms of use at https://www.verisign.com/RPA (c)00/CN=Class 1 Public Primary OCSP Responder] -x509=MIIDnjCCAwegAwIBAgIQK2jUo0aexTsoCas4XX8nIDANBgkqhkiG9w0BAQUFADBfMQswCQYDVQQGEwJVUzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xNzA1BgNVBAsTLkNsYXNzIDEgUHVibGljIFByaW1hcnkgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwHhc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c./OU=Class 2 Public Primary Certification Authority] -x509=MIICPDCCAaUCEC0b/EoXjaOR6+f/9YtFvgswDQYJKoZIhvcNAQECBQAwXzELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMTcwNQYDVQQLEy5DbGFzcyAyIFB1YmxpYyBQcmltYXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4XDTk2MDEyOTAwMDAwMFoXDTI4MDgwMTIzNTk1OVowXzELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMTcwNQYDVQQLEy5DbGFzcyAyIFB1YmxpYyBQcmltYXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC2WoujDWojg4BrzzmH9CETMwZMJaLtVRKXxaeAufqDwSCg+i8VDXyhYGt+eSz6Bg86rvYbb7HS/y8oUl+DfUvEerf4Zh+AVPy3wo5ZShRXRtGak75BkQO7FYCTXOvnzAhsPz6zSvz/S2wj1VCCJkQZjiPDceoZJEcEnnW/yKYAHwIDAQABMA0GCSqGSIb3DQEBAgUAA4GBAIobK/o5wXTXXtgZZKJYSi034DNHD6zt96rbHuSLBlxgJ8pFUs4W7z8GZOeUaHxgMxURaa+dYo2jA1Rrpr7l7gUYYAS/QoD90KioHgE796Ncr6Pc5iaAIzy4RHT3Cq5Ji2F4zCS/iIqnDupzGUH9TQPwiNHleI2lKk/2lw0Xd8rY -site=true -email=false -code=false - -[/C=US/O=VeriSign, Inc./OU=Class 2 Public Primary Certification Authority - G2/OU=(c) 1998 VeriSign, Inc. - For authorized use only/OU=VeriSign Trust Network] -x509=MIIDAzCCAmwCEQC5L2DMiJ+hekYJuFtwbIqvMA0GCSqGSIb3DQEBBQUAMIHBMQswCQYDVQQGEwJVUzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xPDA6BgNVBAsTM0NsYXNzIDIgUHVibGljIFByaW1hcnkgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkgLSBHMjE6MDgGA1UECxMxKGMpIDE5OTggVmVyaVNpZ24sIEluYy4gLSBGb3IgYXV0aG9yaXplZCB1c2Ugb25seTEfMB0GA1UECxMWVmVyaVNpZ24gVHJ1c3QgTmV0d29yazAeFw05ODA1MTgwMDAwMDBaFw0yODA4MDEyMzU5NTlaMIHBMQswCQYDVQQGEwJVUzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xPDA6BgNVBAsTM0NsYXNzIDIgUHVibGljIFByaW1hcnkgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkgLSBHMjE6MDgGA1UECxMxKGMpIDE5OTggVmVyaVNpZ24sIEluYy4gLSBGb3IgYXV0aG9yaXplZCB1c2Ugb25seTEfMB0GA1UECxMWVmVyaVNpZ24gVHJ1c3QgTmV0d29yazCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAp4gBIXQs5xoD8JjhlzwPIQjxnNuX6Zr8wgQGE75fUsjMHiwSViy4AWkszJkfrbCWrnkE8hM5wXuYuggs6MKEEyyqaekJ9MepAqRCwiNPStjwDqL7MWzJ5m+ZJwf15vRMeJ5t60aG+rmGyVTyssSv1EYcWskVMP8NbPUtDm3Of3cCAwEAATANBgkqhkiG9w0BAQUFAAOBgQByLvl/0fFx+8Se9sVeUYpAmLho+Jscg9jinb3/7aHmZuovCfTK1+qlK5X2JGCGTUQug6XELaDTrnhpb3LabK4I8GOSN+a7xDAXrXfMSTWqz9iP0b63GJZHc2pUIjRkLbYWm1lbtFFZOrMLFPQS32eg9K0yZF6xRnInjBJ7xUS0rg== -site=true -email=false -code=false - -[/C=US/O=VeriSign, Inc./OU=VeriSign Trust Network/OU=(c) 1999 VeriSign, Inc. - For authorized use only/CN=VeriSign Class 2 Public Primary Certification Authority - G3] -x509=MIIEGTCCAwECEGFwy0mMX5hFKeewptlQW3owDQYJKoZIhvcNAQEFBQAwgcoxCzAJBgNVBAYTAlVTMRcwFQYDVQQKEw5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7gU8pDM/CzmscHhzS5kr3zDCVLCoO1Wh/hYozUK9dG6A2ydEp85EXdQbkJgNHkKUsQAsBNB0owIFImNjzYO1+8FtYmtpdf1dcEG59b98377BMnMiIYtYgXsVkXq642RIsH/7NiXaldDxJBQX3RiAa0YjOVT1jmIJBB2UkKab5iXiQkWquJCtvgiPqQtCGJTPcjnhsUPgKM+351psE2tJs//jGHyJizNdrDPXp/naOlXJWBD5qu9ats9LS98q -site=true -email=false -code=false - -[/O=VeriSign, Inc./OU=VeriSign Trust Network/OU=Terms of use at https://www.verisign.com/RPA (c)00/CN=Class 2 Public Primary OCSP Responder] -x509=MIIDnjCCAwegAwIBAgIQCUYX5h3Y1BygDKBi6HmKpzANBgkqhkiG9w0BAQUFADBfMQswCQYDVQQGEwJVUzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xNzA1BgNVBAsTLkNsYXNzIDIgUHVibGljIFByaW1hcnkgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwHhcNMDAwODAxMDAwMDAwWhcNMDQwNzMxMjM1OTU5WjCBpzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZlcmlTaWduIFRydXN0IE5ldHdvcmsxOzA5BgNVBAsTMlRlcm1zIG9mIHVzZSBhdCBodHRwczovL3d3dy52ZXJpc2lnbi5jb20vUlBBIChjKTAwMS4wLAYDVQQDEyVDbGFzcyAyIFB1YmxpYyBQcmltYXJ5IE9DU1AgUmVzcG9uZGVyMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDQymMxYX9ENHwFfQs9apDLeUt3Cj9LxyPlwGItfpx+PoiHkdCs6E1Jh6KWkIrdBKUCP4yb6Yn+YqDiWr3I3bR45qVCkwhnAcAgTddc9F3as+M3plIaLExlTYqH2aij8UlUuzxcgFFoxvtJ/wtVqxXd+5rBuR10DbKMRF2J/J/5gwIDAQABo4IBEDCCAQwwIAYDVR0RBBkwF6QVMBMxETAPBgNVBAMTCE9DU1AgMS0yMDEGA1UdHwQqMCgwJqAkoCKGIGh0dHA6Ly9jcmwudmVyaXNpZ24uY29tL3BjYTIuY3JsMBMGA1UdJQQMMAoGCCsGAQUFBwMJMEIGCCsGAQUFBwEBBDYwNDAyBggrBgEFBQcwAaYmFiRodHRwOi8vb2NzcC52ZXJpc2lnbi5jb20vb2NzcC9zdGF0dXMwRAYDVR0gBD0wOzA5BgtghkgBhvhFAQcBATAqMCgGCCsGAQUFBwIBFhxodHRwczovL3d3dy52ZXJpc2lnbi5jb20vUlBBMAkGA1UdEwQCMAAwCwYDVR0PBAQDAgeAMA0GCSqGSIb3DQEBBQUAA4GBAB99CW4kRnUEnPMmm+M5bhfvvL2iG9IChIar0ECXLMRDiDcZayKoA3FQnSDcNmAgmnMtc1VsWJsswrQ0LHozQsqR2elDr88e4PXEeqs/cmMeqTfhWzuIsxOGgpBXy1f/9Fa+It3jl6jhvCJDwt1N2/aBnpIUnjkPE1TegtjAXjSN -site=false -email=false -code=false - -[/C=US/O=VeriSign, Inc./OU=Class 3 Public Primary Certification Authority] -x509=MIICPDCCAaUCEHC65B0Q2Sk0tjjKewPMur8wDQYJKoZIhvcNAQECBQAwXzELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMTcwNQYDVQQLEy5DbGFzcyAzIFB1YmxpYyBQcmltYXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4XDTk2MDEyOTAwMDAwMFoXDTI4MDgwMTIzNTk1OVowXzELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMTcwNQYDVQQLEy5DbGFzcyAzIFB1YmxpYyBQcmltYXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDJXFme8huKARS0EN8EQNvjV69qRUCPhAwL0TPZ2RHP7gJYHyX3KqhEBarsAx94f56TuZoAqiN91qyFomNFx3InzPRMxnVx0jnvT0Lwdd8KkMaOIG+YD/isI19wKTakyYbnsZogy1Olhec9vn2a/iRFM9x2Fe0PonFkTGUugWhFpwIDAQABMA0GCSqGSIb3DQEBAgUAA4GBALtMEivPLCYATxQT3ab7/AoRhIzzKBxnki98tsX63/Dolbwdj2wsqFHMc9ikwFPwTtYmwHYBV4GSXiHx0bH/59AhWM1pF+NEHJwZRDmJXNycAA9WjQKZ7aKQRUzkuxCkPfAyAw7xzvjoyVGM5mKf5p/AfbdynMk2OmufTqj/ZA1k -site=true -email=false -code=false - -[/C=US/O=VeriSign, Inc./OU=Class 3 Public Primary Certification Authority - G2/OU=(c) 1998 VeriSign, Inc. - For authorized use only/OU=VeriSign Trust Network] -x509=MIIDAjCCAmsCEH3Z/gfPqB63EHln+6eJNMYwDQYJKoZIhvcNAQEFBQAwgcExCzAJBgNVBAYTAlVTMRcwFQYDVQQKEw5WZXJpU2lnbiwgSW5jLjE8MDoGA1UECxMzQ2xhc3MgMyBQdWJsaWMgUHJpbWFyeSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAtIEcyMTowOAYDVQQLEzEoYykgMTk5OCBWZXJpU2lnbiwgSW5jLiAtIEZvciBhdXRob3JpemVkIHVzZSBvbmx5MR8wHQYDVQQLExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMB4XDTk4MDUxODAwMDAwMFoXDTI4MDgwMTIzNTk1OVowgcExCzAJBgNVBAYTAlVTMRcwFQYDVQQKEw5WZXJpU2lnbiwgSW5jLjE8MDoGA1UECxMzQ2xhc3MgMyBQdWJsaWMgUHJpbWFyeSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAtIEcyMTowOAYDVQQLEzEoYykgMTk5OCBWZXJpU2lnbiwgSW5jLiAtIEZvciBhdXRob3JpemVkIHVzZSBvbmx5MR8wHQYDVQQLExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDMXtERXVxp0KvTuWpMmR9ZmDCOFoUgRm1HP9SFIIThbbP4pO0M8RcPO/mn+SXXwc+EY/J8Y8+iR/LGWzOOZEAEaMGAuWQcRXfH2G71lSk8UOg013gfqLptQ5GVj0VXXn7F+8qkBOvqlzdUMG+7AUcyM83cV5tkaWH4mx0ciU9cZwIDAQABMA0GCSqGSIb3DQEBBQUAA4GBAFFNzb5cy5gZnBWyATl4Lk0PZ3BwmcYQWpSkU01UbSuvDV1Ai2TT1+7eVmGSX6bEHRBhNtMsJzzoKQm5EWR0zLVznxxIqbxhAe7iF6YM40AIOw7n60RzKprxaZLvcRTDOaxxp5EJb+RxBrO6WVcmeQD2+A2iMzAo1KpYoJ2daZH9 -site=true -email=false -code=false - -[/C=US/O=VeriSign, Inc./OU=VeriSign Trust Network/OU=(c) 1999 VeriSign, Inc. - For authorized use only/CN=VeriSign Class 3 Public Primary Certification Authority - G3] -x509=MIIEGjCCAwICEQCbfgZJoz5iudXukEhxKe9XMA0GCSqGSIb3DQEBBQUAMIHKMQswCQYDVQQGEwJVUzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZlcmlTaWduIFRydXN0IE5ldHdvcmsxOjA4BgNVBAsTMShjKSAxOTk5IFZlcmlTaWduLCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxRTBDBgNVBAMTPFZlcmlTaWduIENsYXNzIDMgUHVibGljIFByaW1hcnkgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkgLSBHMzAeFw05OTEwMDEwMDAwMDBaFw0zNjA3MTYyMzU5NTlaMIHKMQswCQYDVQQGEwJVUzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZlcmlTaWduIFRydXN0IE5ldHdvcmsxOjA4BgNVBAsTMShjKSAxOTk5IFZlcmlTaWduLCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxRTBDBgNVBAMTPFZlcmlTaWduIENsYXNzIDMgUHVibGljIFByaW1hcnkgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkgLSBHMzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMu6nFL8eB8aHm8bN3O9+MlrlBIwT/A2R/XQkQr1F8ilYcEWQE37imGQ5XYgwREGfassbqb1EUGO+i2tKmFZpGcmTNDovFJbcCAEWNF6yaRpvIMXZK0Fi7zQWM6NjPXr8EJJC52XJ2cybuGukxUccLwgTS8Y3pKI6GyFVxEa6X7jJhFUokWWVYPKMIno3Nij7SqAP395ZVc+FSBmCC+Vk7+qRy+oRpfwEuL+wgorUeZ25rdGt+INpsyow0xZVYnm6FNcHOqd8GIWC6fJXwzw3sJ2zq/3avL6QaaiMxTJ5Xpj055iN9WFZZ4O5lMkdBteHRJTW8cs54NJOxWuimi5V5cCAwEAATANBgkqhkiG9w0BAQUFAAOCAQEAERSWwauSCPc/L8my/uRan2Te2yFPhpk0djZX3dAVL8WtfxUfN2JzPtTnX84XA9s1+ivbrmAJXx5fj267Cz3qWhMeDGBvtcC1IyIuBwvLqXTLR7sdwdela8wv0kL9Sd2nic9TutoAWii/gt/4uhMdUIaC/Y4wjylGsB49Ndo4YhYYSq3mtlFs3q9i6wHQHiT+eo8SGhJouPtmmRQURVyu565pF4ErWjfJXir0xuKhXFSbplQAz/DxwceYMBo7Nhbbo27q/a2ywtrvAkcTisDxszGtTxzhT5yvDwyd93gN2PQ1VoDat20Xj50egWTh/sVFuq1ruQp6Tk9LhO5L8X3dEQ== -site=true -email=false -code=false - -[/O=VeriSign, Inc./OU=VeriSign Trust Network/OU=Terms of use at https://www.verisign.com/RPA (c)00/CN=Class 3 Public Primary OCSP Responder] -x509=MIIDojCCAwugAwIBAgIQLpaev7ZibOx76XPM42zBhDANBgkqhkiG9w0BAQUFADBfMQswCQYDVQQGEwJVUzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xNzA1BgNVBAsTLkNsYXNzIDMgUHVibGljIFByaW1hcnkgQ2VydGlmaWNhdGlvbiBBdXRob3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- -[/C=US/O=VeriSign, Inc./OU=Class 4 Public Primary Certification Authority - G2/OU=(c) 1998 VeriSign, Inc. - For authorized use only/OU=VeriSign Trust Network] -x509=MIIDAjCCAmsCEDKIjprS9esTR/h/xCA3JfgwDQYJKoZIhvcNAQEFBQAwgcExCzAJBgNVBAYTAlVTMRcwFQYDVQQKEw5WZXJpU2lnbiwgSW5jLjE8MDoGA1UECxMzQ2xhc3MgNCBQdWJsaWMgUHJpbWFyeSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAtIEcyMTowOAYDVQQLEzEoYykgMTk5OCBWZXJpU2lnbiwgSW5jLiAtIEZvciBhdXRob3JpemVkIHVzZSBvbmx5MR8wHQYDVQQLExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMB4XDTk4MDUxODAwMDAwMFoXDTI4MDgwMTIzNTk1OVowgcExCzAJBgNVBAYTAlVTMRcwFQYDVQQKEw5WZXJpU2lnbiwgSW5jLjE8MDoGA1UECxMzQ2xhc3MgNCBQdWJsaWMgUHJpbWFyeSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAtIEcyMTowOAYDVQQLEzEoYykgMTk5OCBWZXJpU2lnbiwgSW5jLiAtIEZvciBhdXRob3JpemVkIHVzZSBvbmx5MR8wHQYDVQQLExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC68OTP+cSuhVS5B1f5j8V/aBH4xBewRNzjMHPVKmIquNDMHO0oW369atyzkSTKQWI8/AIBvxwWMZQFl3Zuoq29YRdsTjCG8FE3KlDHqGKB3FtKqsGgtG7rL+VXxbErQHDbWk2hjh+9Ax/YA9SPTJlxvOKCzFjomDqG04Y48wApHwIDAQABMA0GCSqGSIb3DQEBBQUAA4GBAIWMEsGnuVAVess+rLhDityq3RS6iYF+ATwjcSGIL4LcY/oCRaxFWdcqWERbt5+BO5JoPeI3JPV7bI92NZYJqFmduc4jq3TWg/0ycyfYaT5DdPauxYma51N86Xv2S/PBZYPejYqcPIiNOVn8qj8ijaHBZlCBckztImRPT8qAkbYp -site=true -email=false -code=false - -[/C=US/O=VeriSign, Inc./OU=VeriSign Trust Network/OU=(c) 1999 VeriSign, Inc. - For authorized use only/CN=VeriSign Class 4 Public Primary Certification Authority - G3] -x509=MIIEGjCCAwICEQDsoKeLbnVqAc/EfMwvlF7XMA0GCSqGSIb3DQEBBQUAMIHKMQswCQYDVQQGEwJVUzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZlcmlTaWduIFRydXN0IE5ldHdvcmsxOjA4BgNVBAsTMShjKSAxOTk5IFZlcmlTaWduLCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxRTBDBgNVBAMTPFZlcmlTaWduIENsYXNzIDQgUHVibGljIFByaW1hcnkgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkgLSBHMzAeFw05OTEwMDEwMDAwMDBaFw0zNjA3MTYyMzU5NTlaMIHKMQswCQYDVQQGEwJVUzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZlcmlTaWduIFRydXN0IE5ldHdvcmsxOjA4BgNVBAsTMShjKSAxOTk5IFZlcmlTaWduLCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxRTBDBgNVBAMTPFZlcmlTaWduIENsYXNzIDQgUHVibGljIFByaW1hcnkgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkgLSBHMzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAK3LpRFpxlmr8Y+1GQ9Wzsy1HyDkniYlS+BzZYlZ3tCD5PUPtbut8XzoIfzk6AzufEUiGXaStBO3IFsJ+mGuqPKljYXCKtbeZjbSmwL0qJJgfJxptI8kHtCGUvYynEFYHiK9zUVilQhu0GbdU6LM8BDcVHOLBKFGMzNcF0C5nk3T875Vg+ixiY5afJqWIpA7iCXy0lOIAgwLePLmNxdLMEYH5IBtptiWLugs+BGzOA1mppvqySNb247i8xOOGlktqgLw7KSHZtzBP/XYufTsgsbSPZUd5cBPhMnZo0QoBmrXRazwa2rvTl/4EYIeOGM0ZlDUPpNz+jDDZq3/ky2X7wMCAwEAATANBgkqhkiG9w0BAQUFAAOCAQEAj/ola09b5KROJ1WrIhVZPMq1CtRK26vdoV9TxaBXOcLORyu+OshWv8LZJxA6sQU8wHcxuzrTBXttmhwwjIDLk5Mqg6sFUYICABFna/OIYUdfA5PVWw3g8dShMjWFsjrbsIKr0csKvE+MW8VLADsfKoKmfjaF3H48ZwC15DtS4KjrXRX5xm3wrR0OhbepmnMUWluPQSjA1egtTaRezarZ7c7c2NU8Qh0XwRJdRTjDOPP8hS6DRkiy1yBfkjaP53kPmF6Z6PDQpLv1U70qzlmwr25/bLvSHgCwIe34QWKCudiyxLtGUPMxxY8BqHTr9Xgn2uf3ZkPznoM+IKrDNWCRzg== -site=true -email=false -code=false - -[/O=VeriSign, Inc./OU=VeriSign Trust Network/OU=Terms of use at https://www.verisign.com/RPA (c)00/CN=Secure Server OCSP Responder] -x509=MIIDnzCCAwygAwIBAgIRAP9F1SddJPuzwjkkU1fhT94wDQYJKoZIhvcNAQEFBQAwXzELMAkGA1UEBhMCVVMxIDAeBgNVBAoTF1JTQSBEYXRhIFNlY3VyaXR5LCBJbmMuMS4wLAYDVQQLEyVTZWN1cmUgU2VydmVyIENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4XDTAwMDgwNDAwMDAwMFoXDTA0MDgwMzIzNTk1OVowgZ4xFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQLExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMTswOQYDVQQLEzJUZXJtcyBvZiB1c2UgYXQgaHR0cHM6Ly93d3cudmVyaXNpZ24uY29tL1JQQSAoYykwMDElMCMGA1UEAxMcU2VjdXJlIFNlcnZlciBPQ1NQIFJlc3BvbmRlcjCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAuFGZZIUO7rMKaPC/Y3YdU/X8oXiMM+6f9L452psPTUepjyDoS0S9zs17kNEw6JDEJXuJKN699pMd/7n/krWpjeSuzOLDB4Nqo3IQASdiIqY1Jjktns9gDPxHpNfQQninHWzQy08VpykKtJVFxLHnWgnXOZXYHTWewr2zXcEMSx8CAwEAAaOCAR0wggEZMCAGA1UdEQQZMBekFTATMREwDwYDVQQDEwhPQ1NQIDEtNDA+BgNVHR8ENzA1MDOgMaAvhi1odHRwOi8vY3JsLnZlcmlzaWduLmNvbS9SU0FTZWN1cmVTZXJ2ZXItcC5jcmwwEwYDVR0lBAwwCgYIKwYBBQUHAwkwQgYIKwYBBQUHAQEENjA0MDIGCCsGAQUFBzABpiYWJGh0dHA6Ly9vY3NwLnZlcmlzaWduLmNvbS9vY3NwL3N0YXR1czBEBgNVHSAEPTA7MDkGC2CGSAGG+EUBBwEBMCowKAYIKwYBBQUHAgEWHGh0dHBzOi8vd3d3LnZlcmlzaWduLmNvbS9SUEEwCQYDVR0TBAIwADALBgNVHQ8EBAMCB4AwDQYJKoZIhvcNAQEFBQADfgAAsxBTZpxJky4xoAJC0lhXfmah/huKYRhQQCweK0Gl1tv/rAgcWgVtAlwqtpZPR9u+TtvOzLqGuBjOsRKRX2P380g+zPFNE+RtCZR4AJLLoyCdBgtqoEMHztEZbI8YdZqfFzP9qSa44+LewqjEWop/mNYHBmvMVp6GcM7U7w== -site=false -email=false -code=false - -[/C=US/O=RSA Data Security, Inc./OU=Commercial Certification Authority] -x509=MIICIzCCAZACBQJBAAAWMA0GCSqGSIb3DQEBAgUAMFwxCzAJBgNVBAYTAlVTMSAwHgYDVQQKExdSU0EgRGF0YSBTZWN1cml0eSwgSW5jLjErMCkGA1UECxMiQ29tbWVyY2lhbCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAeFw05NDExMDQxODU4MzRaFw05OTExMDMxODU4MzRaMFwxCzAJBgNVBAYTAlVTMSAwHgYDVQQKExdSU0EgRGF0YSBTZWN1cml0eSwgSW5jLjErMCkGA1UECxMiQ29tbWVyY2lhbCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTCBmzANBgkqhkiG9w0BAQEFAAOBiQAwgYUCfgCk+4Fie84QJ93o975sbsZwmdu41QUDaSiCnHJ/lj+O7Kwpkj+KFPhCdr69XQO5kNTQvAayUTNfxMK/touPmbZiImDd298ggrTKoi8tUO2UMt7gVY3UaOLgTNLNBRYulWZcYVI4HlGogqHE7yXpCuaLK44xZtn42f29O2nZ6wIDAQABMA0GCSqGSIb3DQEBAgUAA34AdrW2EP4j9/dZYkuwX5zBaLxJu7NJbyFHXSudVMQAKD+YufKKg5tgf+tQx6sFEC097TgCwaVI0v5loMC86qYjFmZsGySp8+x5NRhPJsjjr1BKx6cxa9B8GJ1Qv6km+iYrRpwUqbtbMJhCKLVLU7tDCZJAuqiqWqTGtotXTcU= -site=true -email=false -code=false - -[/C=US/O=RSA Data Security, Inc./OU=Secure Server Certification Authority] -x509=MIICNDCCAaECEAKtZn5ORf5eV288mBle3cAwDQYJKoZIhvcNAQECBQAwXzELMAkGA1UEBhMCVVMxIDAeBgNVBAoTF1JTQSBEYXRhIFNlY3VyaXR5LCBJbmMuMS4wLAYDVQQLEyVTZWN1cmUgU2VydmVyIENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4XDTk0MTEwOTAwMDAwMFoXDTEwMDEwNzIzNTk1OVowXzELMAkGA1UEBhMCVVMxIDAeBgNVBAoTF1JTQSBEYXRhIFNlY3VyaXR5LCBJbmMuMS4wLAYDVQQLEyVTZWN1cmUgU2VydmVyIENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIGbMA0GCSqGSIb3DQEBAQUAA4GJADCBhQJ+AJLOesGugz5aqomDV6wlAXYMra6OLDfO6zV4ZFQD5YRAUcm/jwjiioII0haGN1XpsSECrXZogZoFokvJSyVmIlZsiAeP94FZbYQHZXATcXY+m3dM41CJVphIuR2nKRoTLkoRWZweFdVJVCxzOmmCsZ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vcNAQEFBQADggEBALYYhKS+5n/N+0aRFH0AQHd3hrmNcR2c/vHY5QE/2aJgG826czQs7l4EksQiRFbs6vv3yQEW/ego7fje/Tw+LpiMjeN44s+Oi+CvwY1gFIKCVrGHLvDpEhUdPmkKrY6mWPSZ/BFG7vfJ7cavLLmGJdKX/k+d2DLhwmZRc4YN3XXjivr0ijVm3YhnrXmo/Gn12/qvlbSckB9fwRbJyAiAGtcD8l5xo1ZjHkU2fXG+MWd0hi/Z7IjCIL2ZTT1VBdCiWkxVIpjQ8XX0F/rY4/7iFOAPZfqy1mksM1DJJ6CskDFLFOXrY2TgPeP8EkrFloIt2iU5/tR/LkHHYkjXcUU7eJI= -site=true -email=true -code=false - -[/C=US/O=VISA/OU=Visa International Service Association/CN=GP Root 2] -x509=MIIDgDCCAmigAwIBAgICAx4wDQYJKoZIhvcNAQEFBQAwYTELMAkGA1UEBhMCVVMxDTALBgNVBAoTBFZJU0ExLzAtBgNVBAsTJlZpc2EgSW50ZXJuYXRpb25hbCBTZXJ2aWNlIEFzc29jaWF0aW9uMRIwEAYDVQQDEwlHUCBSb290IDIwHhcNMDAwODE2MjI1MTAwWhcNMjAwODE1MjM1OTAwWjBhMQswCQYDVQQGEwJVUzENMAsGA1UEChMEVklTQTEvMC0GA1UECxMmVmlzYSBJbnRlcm5hdGlvbmFsIFNlcnZpY2UgQXNzb2NpYXRpb24xEjAQBgNVBAMTCUdQIFJvb3QgMjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKkBcLWqxEDwq2omYXkZAPy/mzdZDK9vZBv42pWUJGkzEXDK41Z0ohdXZFwgBuHW73G3O/erwWnQSaSxBNf0V2KJXLB1LRckaeNCYOTudNargFbYiCjh+20i/SN8RnNPflRzHqgsVVh1t0zzWkWlAhr62p3DRcMiXvOL8WAp0sdftAw6UYPvMPjU58fy+pmjIlC++QU3o63tmsPm7IgbthknGziLgE3sucfFicv8GjLtI/C1AVj59o/ghalMCXI5Etuz9c9OYmTaxhkVOmMd6RdVoUwiPDQyRvhlV7or7zaMavrZ2UT0qt2E1w0cslSsMoW0ZA3eQbuxNMYBhjJk1Z8CAwEAAaNCMEAwHQYDVR0OBBYEFJ59SzS/ca3CBfYDdYDOqU8axCRMMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMA0GCSqGSIb3DQEBBQUAA4IBAQAhpXYUVfmtJ3CPPPTVbMjMCqujmAuKBiPFyWHbmQdpNSYx/scuhMKZYdQN6X0uEyt8joW2hcdLzzW2LEc9zikv2G+fiRxkk78IvXbQkIqUs38oW26sTTMs7WXcFsziza6kPWKSBpUmv9+55CCmc2rBvveURNZNbyoLaxhNdBA2aGpawWqn3TYpjLgwi08hPwAuVDAHOrqK5MOeyti12HvOdUVmB/RtLdh6yumJivIj2C/LbgA2T/vwLwHMD8AiZfSr4k5hLQOCfZEWtTDVFN5ex5D8ofyrEK9ca3CnB+8phuiyJccg/ybdd+95RBTEvd07xQObdyPsoOy7Wjm1zK0G -site=true -email=true -code=false - -[/C=US/O=VISA/OU=Visa International Service Association/CN=GP Root 3] -x509=MIIDgDCCAmigAwIBAgICAx8wDQYJKoZIhvcNAQEFBQAwYTELMAkGA1UEBhMCVVMxDTALBgNVBAoTBFZJU0ExLzAtBgNVBAsTJlZpc2EgSW50ZXJuYXRpb25hbCBTZXJ2aWNlIEFzc29jaWF0aW9uMRIwEAYDVQQDEwlHUCBSb290IDMwHhcNMDAwODE2MjMzNDAwWhcNMjAwODE1MjM1OTAwWjBhMQswCQYDVQQGEwJVUzENMAsGA1UEChMEVklTQTEvMC0GA1UECxMmVmlzYSBJbnRlcm5hdGlvbmFsIFNlcnZpY2UgQXNzb2NpYXRpb24xEjAQBgNVBAMTCUdQIFJvb3QgMzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALrsQ7g06qNn33cJHxoQoh6pTpVMdOcM3GzGmNCr+hckmmejSRRkiY+TEi/vj9jOEASLhcDcL7wpmK+cQsXL0pbP9KXFLW5NjDiOsmoImdWRG6jtM5NJXcvnFUNtUvHI6NfaMOCYKqlbo8PRAQOBXX62CZXo2zJu/TrDtZ6b/VkZILMjwOJq7kSWgO9oCUCUwrczSYPlya4tIDeQGD0gNtp5Oa+4V59672AqIYT4/6A5IdPYbVTHw2o8yFwfLkdyFGxVSwkGzY7FawvnB0c6fZJffQ+wXDNXg4M/HoSoeZCfl04i3HUiyG4v1tDLduEMV5fhJo8phFPy5Y6TykuKTDUCAwEAAaNCMEAwHQYDVR0OBBYEFKJcbg1lCMH3TlvJbfDQVhs5gkO7MA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMA0GCSqGSIb3DQEBBQUAA4IBAQADjVYIs6Gt/XNC2WcsbprPvx7ITfJN0tk3yThEja6JDO+MmStKk/VtrGZKP1dqEKWiGhOmLOpi54D5vf3k/9oRnzlYbfVD8vT9pr+dsauaRgff4fBbP/5dWUAGrBgIR0w8TEhGzojhqLaedaag934btsSN7fAqUxVK2ylPOVPnUlijvtzkkC21yc6Y/yyGoQigyM73gjkJDMHC1KmkKg4zgcc8cMswbaRWt5tcfAIivuUHfW0k0Sex1h0eXEc8vy5u+ByESOz14aCVEc3nMOtc8Cl7dYICBrLzkznSDqzfXyQTFTBD9VDUx4OgQzlPZTS9punO4XS+IN/SchZLiUZ2 -site=true -email=true -code=false - -[/C=US/O=VISA/OU=Visa International Service Association/CN=GP Root 4] -x509=MIICezCCAeSgAwIBAgICAyAwDQYJKoZIhvcNAQEFBQAwYTELMAkGA1UEBhMCVVMxDTALBgNVBAoTBFZJU0ExLzAtBgNVBAsTJlZpc2EgSW50ZXJuYXRpb25hbCBTZXJ2aWNlIEFzc29jaWF0aW9uMRIwEAYDVQQDEwlHUCBSb290IDQwHhcNMDAwODE3MDAxOTAwWhcNMjAwODE2MjM1OTAwWjBhMQswCQYDVQQGEwJVUzENMAsGA1UEChMEVklTQTEvMC0GA1UECxMmVmlzYSBJbnRlcm5hdGlvbmFsIFNlcnZpY2UgQXNzb2NpYXRpb24xEjAQBgNVBAMTCUdQIFJvb3QgNDCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAuOvwj6Dm8eMAP15ynq4ED/RPzsraYjPq7lrCwfYuOIm0Dc+hrrkxs/2mx7bEbIMMgGE4Ogq+HAGgGRvn+3JtkmObpq8z9LRbGugo3kznN/EU8eAX4BRI7EQdeaVOquGkhHe9y0226nB+X6oXLEtbsOqF1GmoEekrNx27pgTum0ECAwEAAaNCMEAwHQYDVR0OBBYEFEPGSEDAD8YYWklJ5YGABk1f3dSFMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMA0GCSqGSIb3DQEBBQUAA4GBAKQZPXPOh9GfVhJcyDjl7vkSyNkB6p2DNMaia4t3epJ+h8dVIxSNwmhNGfJptOpHFJE7UYcY+nab4nscE9PmZh4KErldkMY7ExQizTWMLUVgAATI71gCxV2ZtJBt3lTXI+I5hCXDaKNio3nYmKFa0lyJ/eUWDPSrF0h+reuAwFWB -site=true -email=true -code=false - -[/C=US/O=VISA/OU=Visa International Service Association/CN=GP Root 5] -x509=MIICezCCAeSgAwIBAgICAyEwDQYJKoZIhvcNAQEFBQAwYTELMAkGA1UEBhMCVVMxDTALBgNVBAoTBFZJU0ExLzAtBgNVBAsTJlZpc2EgSW50ZXJuYXRpb25hbCBTZXJ2aWNlIEFzc29jaWF0aW9uMRIwEAYDVQQDEwlHUCBSb290IDUwHhcNMDAwODE3MDAyODAwWhcNMjAwODE2MjM1OTAwWjBhMQswCQYDVQQGEwJVUzENMAsGA1UEChMEVklTQTEvMC0GA1UECxMmVmlzYSBJbnRlcm5hdGlvbmFsIFNlcnZpY2UgQXNzb2NpYXRpb24xEjAQBgNVBAMTCUdQIFJvb3QgNTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEArQBu8qB8MREcQbA3j4OiQ8uXXwIgiQ1uvCqx8aVk79iOStZynZ5uH5qo+YUDrMEnaoTlZkhx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J0IFJvb3QgQ0EwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCotGGLHRw+kHtwMkBtjRbKNWFhteL7Fcn0IV6BG88inKyru2DQoDPeEVMaCQ87GhOp1IfMWPctUqmiwqk67c80naEC77jyuCtXiBCTtak1Y7sFQkMif79wXtMopVUoIEuTSY+nvz1AKA0Rr3ImCQU0CcWrAZNXoaxmVJginCPrugxknLY9++LGlsLPC0/qyDD6iivKHBGWGikAjOty1FFFqZ13INUSu7XyfwY4gk19kh7o1frIKUdpGhURjK+mLMEo9GlbaZ7kPBPuwKFg6kG/wmJLbaI3hDo+87AyroprbBPzOiEKe5ZYMylebqjKaaK+jgZFXfFmOVVKHFoksUvRAgMBAAGjYzBhMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMB8GA1UdIwQYMBaAFESoSTh1MWyrKOdx8tjUyK9BD0eRMB0GA1UdDgQWBBREqEk4dTFsqyjncfLY1MivQQ9HkTANBgkqhkiG9w0BAQUFAAOCAQEAPXNepQq7tRHD8WfREhqiRykRTE5ZNyCGCUDyRfFJeTkaPSXXLynQCAUVFPvkRGw/fl61UtiRWDyW+9RK7/EuwVYeTGkM2WAdSkcntQMz2xi721OeoXtRapDTpRXIggvAtzcydYVUXlUQfJE7qStgxjF2rMQwSQPEtlZApfBjr2lKiK/XqwvuOtu9E4OoO6LpuUX1UU2U8Fmp26E3Z9IUnqd71xmqFSNraXXREz5Y9PMB6IjElFbJwP7fT0dVH2uBTlTtE19y/CaGBDaPTxJNnFDiTlpWrLn9LB9YewUSB2M47xnj9DyRWqIlYle8xpSgd5zPNGLgv/t1POkbJhucZA== -site=true -email=true -code=false - -[/O=Xcert International Inc./OU=Xcert Root CA 1024] -x509=MIICaDCCAdGgAwIBAgIQCgEBAQAAAnwAAAADAAAAAjANBgkqhkiG9w0BAQUFADBAMSEwHwYDVQQKExhYY2VydCBJbnRlcm5hdGlvbmFsIEluYy4xGzAZBgNVBAsTElhjZXJ0IFJvb3QgQ0EgMTAyNDAeFw0wMDA4MTgxODMxMzJaFw0yNTA4MTUxOTAwNTZaMEAxITAfBgNVBAoTGFhjZXJ0IEludGVybmF0aW9uYWwgSW5jLjEbMBkGA1UECxMSWGNlcnQgUm9vdCBDQSAxMDI0MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDWvjeJEami90csKs9qACZlKESkiuTeoENVmURrvG64x87GY7bT6G/FmCskkbieorpxSN40ICF61tLFiTKlicbchYRU8p5I7cxEtgb/jsTOWa2fbOkiWME/FApDgIcZUlDjKAfIrBjisRqqo+Jgt3ZRByk5XkjpZnCBLjiavRl96wIDAQABo2MwYTAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBBjAfBgNVHSMEGDAWgBSEecdPB1mxa8E6Nbq49NWZJ8i6DjAdBgNVHQ4EFgQUhHnHTwdZsWvBOjW6uPTVmSfIug4wDQYJKoZIhvcNAQEFBQADgYEAc7DhAO2uaNJgA0br+RzxpaZ8XDJ87AJh0xwdczEsuo69SU3I3dl3dUHnkiGabCnbp2xwhqBcw+TzMswBhFnXiDk486ji4hqwl80rF9xkBA+qanOU1usIxoBpTd561cU38ZIXPG3TiiHMZBCq3mKHH4+4+Kp1SvQILPXcZs/DOH4= -site=true -email=true -code=false - -[/O=Xcert International Inc./OU=Xcert Root CA v1] -x509=MIIC/zCCAecCEAoBAQEAAAJ8AAAABAAAAAIwDQYJKoZIhvcNAQEFBQAwPjEhMB8GA1UEChMYWGNlcnQgSW50ZXJuYXRpb25hbCBJbmMuMRkwFwYDVQQLExBYY2VydCBSb290IENBIHYxMB4XDTAwMDgxODE4NDA1MFoXDTI1MDgxNTE5MDAzOFowPjEhMB8GA1UEChMYWGNlcnQgSW50ZXJuYXRpb25hbCBJbmMuMRkwFwYDVQQLExBYY2VydCBSb290IENBIHYxMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAwZKr8rY1NgJID4X0Ti+CZc1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R1bSBMZXZlbCBJVjCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAmyb1lKqCAKE4juAy6lpVNUl6aJ2DuWPSiJ3BBk3/6ty6I4Lr2Dpy1b1vjVelhaFsVKEDgK2JyQlk9XMqLPZI2Ql166mJiPKFg77aY/W78EcQfGyjnRvVcs0tG40mAs/p84OEpFcVe/RSqDrD/D7R01u+Wj5xLl0PUsFplIGDbikCAwEAAaMTMBEwDwYDVR0TAQH/BAUwAwEB/zANBgkqhkiG9w0BAQUFAAOCAQEAPS99JujKGVRfa50TKfieq+uK1SxjidErYaZTb3cJNNfQDYn6nk4lnrnab5EUVhO/NegP2yIu3YOnZGfxFDhvVozMTKKAB5r5XKOvzsP99C9578PVMLozucfUMCSwau7Z4l5uuQOHuzjzlVLCibbbf4RwfvZ7hh5sB5c0pNbwRQq64RXQUUEvul/W9gUeT9ISHOsASGTq+HJ5i7vNARjukEAXW/maqs9vyTWWbGVI1FSOnVyteymq4Xk+9YlIyNPNyacgnsMnU72XKBLDS0KJdhIWALFAZI4dSh5WZNuWZguUnEmeH81lLbR+p/N3iuN8+oSo8UXik92jxeUY2tQJUA== -site=true -email=true -code=false - -[/C=BR/O=ICP-Brasil/OU=Instituto Nacional de Tecnologia da Informacao - ITI/L=Brasilia/ST=DF/CN=Autoridade Certificadora Raiz Brasileira] -x509=MIIEuDCCA6CgAwIBAgIBBDANBgkqhkiG9w0BAQUFADCBtDELMAkGA1UEBhMCQlIxEzARBgNVBAoTCklDUC1CcmFzaWwxPTA7BgNVBAsTNEluc3RpdHV0byBOYWNpb25hbCBkZSBUZWNub2xvZ2lhIGRhIEluZm9ybWFjYW8gLSBJVEkxETAPBgNVBAcTCEJyYXNpbGlhMQswCQYDVQQIEwJERjExMC8GA1UEAxMoQXV0b3JpZGFkZSBDZXJ0aWZpY2Fkb3JhIFJhaXogQnJhc2lsZWlyYTAeFw0wMTExMzAxMjU4MDBaFw0xMTExMzAyMzU5MDBaMIG0MQswCQYDVQQ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a70mT7wZjAmQhnZx2xJ6wfWlT9VQfS//JYeIc7Fue2JNLd00UOSMMaiK/t79enKNHEA2fupH3vEigf5Eh4bVAN5VohrTm6MY53x7XQZZr1ME7a55lFEnSeT0umlOAjR2mAbvSM5X5oSZNrmetdzyTj2flCM8CC7MLab0kkdngRIlUBGHF1/S5nmPbK+9A46sd33oqK8n8 -site=true -email=true -code=false - - -[/C=DE/ST=Hamburg/L=Hamburg/O=TC TrustCenter for Security in Data Networks GmbH/OU=TC TrustCenter Class 2 CA/Email=certificate@trustcenter.de] -x509=MIIDXDCCAsWgAwIBAgICA+owDQYJKoZIhvcNAQEEBQAwgbwxCzAJBgNVBAYTAkRFMRAwDgYDVQQIEwdIYW1idXJnMRAwDgYDVQQHEwdIYW1idXJnMTowOAYDVQQKEzFUQyBUcnVzdENlbnRlciBmb3IgU2VjdXJpdHkgaW4gRGF0YSBOZXR3b3JrcyBHbWJIMSIwIAYDVQQLExlUQyBUcnVzdENlbnRlciBDbGFzcyAyIENBMSkwJwYJKoZIhvcNAQkBFhpjZXJ0aWZpY2F0ZUB0cnVzdGNlbnRlci5kZTAeFw05ODAzMDkxMTU5NTlaFw0xMTAxMDExMTU5NTlaMIG8MQswCQYDVQQGEwJERTEQMA4GA1UECBMHSGFtYnVyZzEQMA4GA1UEBxMHSGFtYnVyZzE6MDgGA1UEChMxVEMgVHJ1c3RDZW50ZXIgZm9yIFNlY3VyaXR5IGluIERhdGEgTmV0d29ya3MgR21iSDEiMCAGA1UECxMZVEMgVHJ1c3RDZW50ZXIgQ2xhc3MgMiBDQTEpMCcGCSqGSIb3DQEJARYaY2VydGlmaWNhdGVAdHJ1c3RjZW50ZXIuZGUwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBANo46O0yAClxgwENv4wB3NrGrTmkqYov1YtcaF9QxmL1Zr3KkSLsqh1R1z2zUbKDTl3LSbDwTFXlay3HhQswHJJOgtTKAu33b77c4OMUuAVT8pr0VotanoWT0bSCVq5Nu6hLVxa8/vhYnvgpjbB7zXjJT6yLZwzxnPv8V5tXXE8NAgMBAAGjazBpMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgGGMDMGCWCGSAGG+EIBCAQmFiRodHRwOi8vd3d3LnRydXN0Y2VudGVyLmRlL2d1aWRlbGluZXMwEQYJYIZIAYb4QgEBBAQDAgAHMA0GCSqGSIb3DQEBBAUAA4GBAIRS+yjf/x91AbwBvgRWl2p0QiQxg/lGsQaKic+WLDO/jLVfenKhhQbOhvgFjuj5Jcrag4wGrOs2bYWRNAQ29ELw+HkuCkhcq8xRT3h2oNmsGb0q0WkEKJHKNhAngFdb0lz1wlurZIFjdFH0l7/NEij3TWZ/p/AcASZ4smZHcFFk -site=true -email=true -code=false - -[/C=DE/ST=Hamburg/L=Hamburg/O=TC TrustCenter for Security in Data Networks GmbH/OU=TC TrustCenter Class 3 CA/Email=certificate@trustcenter.de] -x509=MIIDXDCCAsWgAwIBAgICA+swDQYJKoZIhvcNAQEEBQAwgbwxCzAJBgNVBAYTAkRFMRAwDgYDVQQIEwdIYW1idXJnMRAwDgYDVQQHEwdIYW1idXJnMTowOAYDVQQKEzFUQyBUcnVzdENlbnRlciBmb3IgU2VjdXJpdHkgaW4gRGF0YSBOZXR3b3JrcyBHbWJIMSIwIAYDVQQLExlUQyBUcnVzdENlbnRlciBDbGFzcyAzIENBMSkwJwYJKoZIhvcNAQkBFhpjZXJ0aWZpY2F0ZUB0cnVzdGNlbnRlci5kZTAeFw05ODAzMDkxMTU5NTlaFw0xMTAxMDExMTU5NTlaMIG8MQswCQYDVQQGEwJERTEQMA4GA1UECBMHSGFtYnVyZzEQMA4GA1UEBxMHSGFtYnVyZzE6MDgGA1UEChMxVEMgVHJ1c3RDZW50ZXIgZm9yIFNlY3VyaXR5IGluIERhdGEgTmV0d29ya3MgR21iSDEiMCAGA1UECxMZVEMgVHJ1c3RDZW50ZXIgQ2xhc3MgMyBDQTEpMCcGCSqGSIb3DQEJARYaY2VydGlmaWNhdGVAdHJ1c3RjZW50ZXIuZGUwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBALa0wTUFLg2N7KBAahwOJ6ZQkmtQGwfeLud2zODa/ISoXoxjaitN2U4CdhHBC/KNecoAtvGwDtf7pBc9r6tpepYnv68zoZoqWarEtTcI8hKlMbZD9TKWcSgoq40oht+77uMMfTDWw1Krj10nnGvAo+cFa1dJRLNu6mTP0o56UHd3AgMBAAGjazBpMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgGGMDMGCWCGSAGG+EIBCAQmFiRodHRwOi8vd3d3LnRydXN0Y2VudGVyLmRlL2d1aWRlbGluZXMwEQYJYIZIAYb4QgEBBAQDAgAHMA0GCSqGSIb3DQEBBAUAA4GBABY9xs3Bu4VxhUafPiCPUSiZ7C1FIWMjWwS7TJC4iJIETb19AaM/9uzO8d7+feXhPrvGq14L3T2WxMup1Pkm5gZOngylerpuw3yCGdHHsbHD2w2Om0B8NwvxXej9H5CIpQ5ON2QhqE6NtJ/x3kit1VYYUimLRzQSCdS7kjXvD9s0 -site=true -email=true -code=false - -[/C=DE/O=Deutsches Forschungsnetz/OU=DFN-CERT GmbH/OU=DFN-PCA/CN=DFN Toplevel Certification Authority/Email=certify@pca.dfn.de] -x509=MIIG2jCCBcKgAwIBAgIDFc/9MA0GCSqGSIb3DQEBBQUAMIGsMQswCQYDVQQGEwJERTEhMB8GA1UEChMYRGV1dHNjaGVzIEZvcnNjaHVuZ3NuZXR6MRYwFAYDVQQLEw1ERk4tQ0VSVCBHbWJIMRAwDgYDVQQLEwdERk4tUENBMS0wKwYDVQQDEyRERk4gVG9wbGV2ZWwgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkxITAfBgkqhkiG9w0BCQEWEmNlcnRpZnlAcGNhLmRmbi5kZTAeFw0wMTEyMDExMjExMTZaFw0xMDAxMzExMjExMTZaMIGsMQswCQYDVQQGEwJERTEhMB8GA1UEChMYRGV1dHNjaGVzIEZv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S9nMS9kYXRhL2NybHMvcm9vdC1jYS1jcmwuY3J4MEugSaBHhkVodHRwOi8vd3d3LmRmbi1wY2EuZGUvY2VydGlmaWNhdGlvbi94NTA5L2cxL2RhdGEvY3Jscy9yb290LWNhLWNybC5jcmwwOAYJYIZIAYb4QgEDBCsWKWh0dHBzOi8vd3d3LmRmbi1wY2EuZGUvY2dpL2NoZWNrLXJldi5jZ2k/MEsGCWCGSAGG+EIBCAQ+FjxodHRwOi8vd3d3LmRmbi1wY2EuZGUvY2VydGlmaWNhdGlvbi9wb2xpY2llcy94NTA5cG9saWN5Lmh0bWwwOAYJYIZIAYb4QgENBCsWKVRoZSBERk4gVG9wLUxldmVsIENlcnRpZmljYXRpb24gQXV0aG9yaXR5MGQGA1UdIARdMFswWQYLKwYBBAHZGoIsAQEwSjBIBggrBgEFBQcCARY8aHR0cDovL3d3dy5kZm4tcGNhLmRlL2NlcnRpZmljYXRpb24vcG9saWNpZXMveDUwOXBvbGljeS5odG1sMA0GCSqGSIb3DQEBBQUAA4IBAQAmbai6JMt7nkuavyvxKzLGn04Gyt0zKrp8zmERp4inktvY7p+vkaomYu2QYC7cHq0tlrPXQQhhetjiXGb+36aJtHDkEA0NwrJzYnHgPsvx7z0wysENP4wxf97KsSWm07RY+f6/gIQF7Je7CW30Rzq7N6R0NMBs32mJgdn3ntqlFNw3Nbs050FEjPNq54RdawlJo85x+w+QJd7uQM4yZjHpRhvwgte9Ge1UqCUdpMsLHzeMKJ0B9GhwIIqOJCMiPgKjcUBrn6ehSX70POvXvjjE2+FzhPGTyTkS474d2UCAnL9qhPrdWXzBjOumOjhJutT1aecm9eljlshmh1cNen00 -site=true -email=false -code=false - -[/C=AT/ST=Austria/L=Vienna/O=Arge Daten Oesterreichische Gesellschaft fuer Datenschutz/Email=a-cert@argedaten.at] -x509=MIIDwzCCAyygAwIBAgIBADANBgkqhkiG9w0BAQQFADCBmDELMAkGA1UEBhMCQVQxEDAOBgNVBAgTB0F1c3RyaWExDzANBgNV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K7QdAYikWmqgBheRdPKddJdccPy/Zl/p3ZT7GhDyC5f3wZjcuu8AJ27BNwbCAx54dgxgCNcyPm79nY8MRtEdEpoRGdSsFKJemz6hpXM++MWFciyrRWIIA44XB0Gv3US0spjsDPQ== -site=true -email=false -code=false - -[/C=ES/ST=BARCELONA/L=BARCELONA/O=IPS Seguridad CA/OU=Certificaciones/CN=IPS SERVIDORES/Email=ips@mail.ips.es] -x509=MIICtzCCAiACAQAwDQYJKoZIhvcNAQEEBQAwgaMxCzAJBgNVBAYTAkVTMRIwEAYDVQQIEwlCQVJDRUxPTkExEjAQBgNVBAcTCUJBUkNFTE9OQTEZMBcGA1UEChMQSVBTIFNlZ3VyaWRhZCBDQTEYMBYGA1UECxMPQ2VydGlmaWNhY2lvbmVzMRcwFQYDVQQDEw5JUFMgU0VSVklET1JFUzEeMBwGCSqGSIb3DQEJARYPaXBzQG1haWwuaXBzLmVzMB4XDTk4MDEwMTIzMjEwN1oXDTA5MTIyOTIzMjEwN1owgaMxCzAJBgNVBAYTAkVTMRIwEAYDVQQIEwlCQVJDRUxPTkExEjAQBgNVBAcTCUJBUkNFTE9OQTEZMBcGA1UEChMQSVBTIFNlZ3VyaWRhZCBDQTEYMBYGA1UECxMPQ2VydGlmaWNhY2lvbmVzMRcwFQYDVQQDEw5JUFMgU0VSVklET1JFUzEeMBwGCSqGSIb3DQEJARYPaXBzQG1haWwuaXBzLmVzMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCsT1J0nznqjtwlxLyYXZhkJAk8IbPMGbWOlI6H0fg3PqHILVikgDVboXVsHUUMH2Fjal5vmwpMwci4YSM1gf/+rHhwLWjhOgeYlQJU3c0jt4BT18g3RXIGJBK6E2Ehim51KODFDzT9NthFf+G4Nu+z4cYgjui0OLzhPvYR3oydAQIDAQABMA0GCSqGSIb3DQEBBAUAA4GBACzzw3lYJN7GO9HgQmm47mSzPWIBubOE3yN93ZjPEKn+ANgilgUTB1RXxafey9m4iEL2mdsUdx+2/iU94aI+A6mB0i1sR/WWRowiq8jMDQ6XXotBtDvECgZAHd1G9AHduoIuPD14cJ58GNCr+Lh3B0Zx8coLY1xq+XKU1QFPoNtC -site=true -email=false -code=false - -[/C=US/ST=UT/L=Salt Lake City/O=The USERTRUST Network/OU=http://www.usertrust.com/CN=UTN-USERFirst-Network Applications] -x509=MIIEZDCCA0ygAwIBAgIQRL4Mi1AAJLQR0zYwS8AzdzANBgkqhkiG9w0BAQUFADCBozELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAlVUMRcwFQYDVQQHEw5TYWx0IExha2UgQ2l0eTEeMBwGA1UEChMVVGhlIFVTRVJUUlVTVCBOZXR3b3JrMSEwHwYDVQQLExhodHRwOi8vd3d3LnVzZXJ0cnVzdC5jb20xKzApBgNVBAMTIlVUTi1VU0VSRmlyc3QtTmV0d29yayBBcHBsaWNhdGlvbnMwHhcNOTkwNzA5MTg0ODM5WhcNMTkwNzA5MTg1NzQ5WjCBozELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAlVUMRcwFQYDVQQHEw5TYWx0IExha2UgQ2l0eTEeMBwGA1UEChMVVGhlIFVTRVJUUlVTVCBOZXR3b3JrMSEwHwYDVQQLExhodHRwOi8vd3d3LnVzZXJ0cnVzdC5jb20xKzApBgNVBAMTIlVUTi1VU0VSRmlyc3QtTmV0d29yayBBcHBsaWNhdGlvbnMwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCz+5Gh5DZVhawGNFugmliy+LUPBXeDrjKxdpJo7CNKyXY/45y2N3kDuatpjQclthln5LAbGHNhSuh+zdMvZOOmfAz6F4CjDUeJT1FxL+78P/m4FoCHiZMlIJpDgmkkdihZNaEdwH+DBmQWICzTSaSFtMBhf1EI+GgVkYDLpdXuOzr0hAReYFmnjDRy7rh4xdE7EkpvfmUnuaRVxblvQ6TFHSyZwFKkeEwVs0CYCGtDxgGwenv1axwiP8vv/6jQOkt2FZ7S0cYu49tXGzKiuG/ohqY/cKvlcJKrRB5AUPuco2LkbG6gyN7igEL66S/ozjIEj3yNtxyjNTwV3Z7DrpelAgMBAAGjgZEwgY4wCwYDVR0PBAQDAgHGMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFPqGydvguul49Uuo1hXf8NPhahQ8ME8GA1UdHwRIMEYwRKBCoECGPmh0dHA6Ly9jcmwudXNlcnRydXN0LmNvbS9VVE4tVVNFUkZpcnN0LU5ldHdvcmtBcHBsaWNhdGlvbnMuY3JsMA0GCSqGSIb3DQEBBQUAA4IBAQCk8yXM0dSRgyLQzDKrm5ZONJFUICU0YV8qAhXhi6r/fWRRzwr/vH3YIWp4yy9Rb/hCHTO967V7lMPDqaAt39EpHx3+jz+7qEUqf9FuVSTiuwL7MT++6LzsQCv4AdRWOOTKRIK1YSAhZ2X28AvnNPilwpyjXEAfhZOVBt5P1CeptqX8Fs1zMT+4ZSfP1FMa8Kxun08FDAOBp4QpxFq9ZFdyrTvPNximmMatBrTcCKME1SmklpoSZ0qMYEWd8SOasACcaLWYUNPvji6SZbFIPiG+FTAqDbUMo2s/rn9X9R+WfN9v3YIwLGUbQErNaLly7HF27FSOH4UMAWr6pjisH8SE -site=true -email=false -code=false - -[/C=US/ST=UT/L=Salt Lake City/O=The USERTRUST Network/OU=http://www.usertrust.com/CN=UTN - DATACorp SGC] -x509=MIIEXjCCA0agAwIBAgIQRL4Mi1AAIbQR0ypoBqmtaTANBgkqhkiG9w0BAQUFADCBkzELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAlVUMRcwFQYDVQQHEw5TYWx0IExha2UgQ2l0eTEeMBwGA1UEChMVVGhlIFVTRVJUUlVTVCBOZXR3b3JrMSEwHwYDVQQLExhodHRwOi8vd3d3LnVzZXJ0cnVzdC5jb20xGzAZBgNVBAMTElVUTiAtIERBVEFDb3JwIFNHQzAeFw05OTA2MjQxODU3MjFaFw0xOTA2MjQxOTA2MzBaMIGTMQswCQYDVQQGEwJVUzELMAkGA1UECBMCVVQxFzAVBgNVB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2t0bi0Vr591pl6jFVkwPDPafepE39peC4N1xaf92P2BNPM/3mfnGV/TJVTl4uix5yaaIK/QI -site=true -email=false -code=false - -[/C=GB/ST=Greater Manchester/L=Salford/O=Comodo CA Limited/CN=AAA Certificate Services] -x509=MIIEMjCCAxqgAwIBAgIBATANBgkqhkiG9w0BAQUFADB7MQswCQYDVQQGEwJHQjEbMBkGA1UECAwSR3JlYXRlciBNYW5jaGVzdGVyMRAwDgYDVQQHDAdTYWxmb3JkMRowGAYDVQQKDBFDb21vZG8gQ0EgTGltaXRlZDEhMB8GA1UEAwwYQUFBIENlcnRpZmljYXRlIFNlcnZpY2VzMB4XDTA0MDEwMTAwMDAwMFoXDTI4MTIzMTIzNTk1OVowezELMAkGA1UEBhMCR0IxGzAZBgNVBAgMEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4GA1UEBwwHU2FsZm9yZDEaMBgGA1UECgwRQ29tb2RvIENBIExpbWl0ZWQxITAfBgNVBAMMGEFBQSBDZXJ0aWZpY2F0ZSBTZXJ2aWNlczCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAL5AnfRu4ep2hxxNRUSOvkbIgwadwSr+GB+O5AL686tdUIoWMQuaBtDFcCLNSS1UY8y2bmhGC1Pqy0wkwLxyTurxFa70VJoSCsN6sjNg4tqJVfMiWPPe3M/vg4aijJRPn2jymJBGhCfHdr/jzDUsi14HZGWCwEiwqJH5YZ92IFCokcdmtet4YgNW8IoaE+oxox6gmf049vYnMlhvB/VruPsUK6+3qszWY19zjNoFmag4qMsXeDZRrOme9Hg6jc8P2ULimAyrL58OAd7vn5lJ8S3frHRNG5i1R8XlKdH5kBjHYpy+g8cmez6KJcfA3Z3mNWgQIJ2P2N7Sw4ScDV7oL8kCAwEAAaOBwDCBvTAdBgNVHQ4EFgQUoBEKIz6W8Qfs4q8p74Klf9AwpLQwDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wewYDVR0fBHQwcjA4oDagNIYyaHR0cDovL2NybC5jb21vZG9jYS5jb20vQUFBQ2VydGlmaWNhdGVTZXJ2aWNlcy5jcmwwNqA0oDKGMGh0dHA6Ly9jcmwuY29tb2RvLm5ldC9BQUFDZXJ0aWZpY2F0ZVNlcnZpY2VzLmNybDANBgkqhkiG9w0BAQUFAAOCAQEACFb8AvCb6P+k+tZ7xkSAzk/ExfYAWMymtrwUSWgEdujm7l3sAg9g1o1QGE8mTgHj5rCl7r+8dFRBv/38ErjHT1r0iWAFf2C3BUrz9vHCv8S5dIa2LX1rzNLzRt0vxuBqw8M0Ayx9lt1awg6nCpnBBYurDC/zXDrPbDdVCYfeU0BsWO/8tqtlbgT2G9w84FoVxp7Z8VlIMCFlA2zs6SFz7JsDoeA3raAVGI/6ugLOpyypEBMs1OUIJqsil2D4kF501KKaU73yqWjgom7C12yxow+ev+to51byrvLjKzg6CYG1a4XXvi3tPxq3smPi9WIsgtRqAEFQ8TmDn5XpNpaYbg== -site=true -email=false -code=false - -[/C=GB/ST=Greater Manchester/L=Salford/O=Comodo CA Limited/CN=Secure Certificate Services] -x509=MIIEPzCCAyegAwIBAgIBATANBgkqhkiG9w0BAQUFADB+MQswCQYDVQQGEwJHQjEbMBkGA1UECAwSR3JlYXRlciBNYW5jaGVzdGVyMRAwDgYDVQQHDAdTYWxmb3JkMRowGAYDVQQKDBFDb21vZG8gQ0EgTGltaXRlZDEkMCIGA1UEAwwbU2VjdXJlIENlcnRpZmljYXRlIFNlcnZpY2VzMB4XDTA0MDEwMTAwMDAwMFoXDTI4MTIzMTIzNTk1OVowfjELMAkGA1UEBhMCR0IxGzAZBgNVBAgMEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4GA1UEBwwHU2FsZm9yZDEaMBgGA1UECgwRQ29tb2RvIENBIExpbWl0ZWQxJDAiBgNVBAMMG1NlY3VyZSBDZXJ0aWZpY2F0ZSBTZXJ2aWNlczCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMBxM4KK0HDrc4eCQNUd5MvJDkKQ+d40uaG6EfQlhfPMcm3ye5drswfxdySRXyWP9nQ95IDC+DwN879A6vfIUtFyb+/Iq0G4bi4XKpVpDM3SHpR7LZQdqnXXs5jLrLxkU0C8j6ysNstcrbvd4JQX7NFc0L/vpZXJkMWwrPsbQ996CF23uPJAGysnnlDOXmWCiIxe004MeuoIkbY2qitC++rCoznl2yY4rYsK7hljxxwk3wN42ubqwUcaCwtGCd0C/N7Lh1/XMGNooa7cMqG6vv5Eq2i2pRcV/b3Vp6ea5EQz6YiO/O1R65NxTq0B50SOqy3LqP4BSUjwwN3HaNiS/j0CAwEAAaOBxzCBxDAdBgNVHQ4EFgQUPNiTiMLAggnMAZkGkyDpnnAJY08wDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wgYEGA1UdHwR6MHgwO6A5oDeGNWh0dHA6Ly9jcmwuY29tb2RvY2EuY29tL1NlY3VyZUNlcnRpZmljYXRlU2VydmljZXMuY3JsMDmgN6A1hjNodHRwOi8vY3JsLmNvbW9kby5uZXQvU2VjdXJlQ2VydGlmaWNhdGVTZXJ2aWNlcy5jcmwwDQYJKoZIhvcNAQEFBQADggEBAIcBbSMdflsXfcFhMs+P5/OKlFlm4J4oqF7Tt/Q05qo5spcWxYJvMqTpjOev/e/C6LlLqqP05tqNZSH7uoDrJiiFGv45jN5bBAS0VPmjZ55B+glSzAVIqMk/IQQezkhr/IXownuvf7fM+F86/TXGDe+X3EyrEeFryzHRbPtIgKvcnDe4IRRLDXE97IMzbtFuMhbsmMcWi1mmNKsFVy2T96oTy9IT4rcuO81rUBcJaD61JlfutuC23bkpgHl9j6PwpCikFcSF9CfUa7/lXORlAnZUtOM3ZiTTGWHIUhDlizeauan5Hb/qmZJhlv8BzaFfDbxxvA6sCx1HRR3B7Hzs/Sk= -site=true -email=false -code=false - -[/C=GB/ST=Greater Manchester/L=Salford/O=Comodo CA Limited/CN=Trusted Certificate Services] -x509=MIIEQzCCAyugAwIBAgIBATAN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JAjPYok4doh28MCAwEAAaMzMDEwDwYDVR0TAQH/BAUwAwEB/zARBgNVHQ4ECgQISqCqWITTXjwwCwYDVR0PBAQDAgEGMA0GCSqGSIb3DQEBBQUAA4IBAQBazof5FnIVV0sd2ZvnoiYw7JNn39Yt0jSv9zilzqsWuasvfDXLrNAPtEwr/IDva4yRXzZ299uzGxnq9LIR/WFxRL8oszodv7ND6J+/3DEIcbCdjdY0RzKQxmUk96BKfARzjzlvF4xytb1LyHr4e4PDKE6cCepnP7JnBBvDFNr450kkkdAdavphOe9r5yF1BgfYErQhIHBCcYHaPJo2vqZbDWpsmh+Re/n570K6Tk6ezAyNlNzZRZxe7EJQY670XcSxEtzKO6gunRRaBXW37Ndj4ro1tgQIkejanZz2ZrUYrAqmVCY0M9IbwdR/GjqOC6oybtv8TyWf2TLHllpwrN9M -site=true -email=false -code=false - -[/C=US/ST=UT/L=Salt Lake City/O=The USERTRUST Network/OU=http://www.usertrust.com/CN=UTN-USERFirst-Hardware] -x509=MIIEdDCCA1ygAwIBAgIQRL4Mi1AAJLQR0zYq/mUK/TANBgkqhkiG9w0BAQUFADCBlzELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAlVUMRcwFQYDVQQHEw5TYWx0IExha2UgQ2l0eTEeMBwGA1UEChMVVGhlIFVTRVJUUlVTVCBOZXR3b3JrMSEwHwYDVQQLExhodHRwOi8vd3d3LnVzZXJ0cnVzdC5jb20xHzAdBgNVBAMTFlVUTi1VU0VSRmlyc3QtSGFyZHdhcmUwHhcNOTkwNzA5MTgxMDQyWhcNMTkwNzA5MTgxOTIyWjCBlzELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAlVUMRcwFQYDVQQHEw5TYWx0IExha2UgQ2l0eTEeMBwGA1UEChMVVGhlIFVTRVJUUlVTVCBOZXR3b3JrMSEwHwYDVQQLExhodHRwOi8vd3d3LnVzZXJ0cnVzdC5jb20xHzAdBgNVBAMTFlVUTi1VU0VSRmlyc3QtSGFyZHdhcmUwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCx98M4P7Sof885glFn0G2f0v9Y8+efK+wNiVSZuTiZFvfgIXlIwrthdBKWHTxqctU8EGc6Oe0rE81m65UJM6Rsl7HoxuzBdXmcRl6Nq9Bq/bkqVRcQVLMZ8Jr28bFdtqdt++BxF2uiiPsA3/4aMXcMmgF6sTLjKwEHOG7DpV4jvEWbe1DByTCP2+UretNb+zNAHqDVmBe8i4fDidNdoI6yqqr2jmmIBsX6iSHzCJ1pLgkzmykNRg+MzEk0sGlRvfkGzWitZky8PqxhvQqIDsjfPe58BEydCl5rkdbux+0ojatNh4lz0G6k0B4WixThdkQDf2Os5M1JnMWS9KsyoUhbAgMBAAGjgbkwgbYwCwYDVR0PBAQDAgHGMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFKFyXyYbKJhDlV0HN9WFlp1L0sNFMEQGA1UdHwQ9MDswOaA3oDWGM2h0dHA6Ly9jcmwudXNlcnRydXN0LmNvbS9VVE4tVVNFUkZpcnN0LUhhcmR3YXJlLmNybDAxBgNVHSUEKjAoBggrBgEFBQcDAQYIKwYBBQUHAwUGCCsGAQUFBwMGBggrBgEFBQcDBzANBgkqhkiG9w0BAQUFAAOCAQEARxkP3nTGmZev/K0oXnWO6y1n7k57K9cM//bey1WiCuFMVGWTYGufEpytXoMs61quwOQt9ABjHbjAbPLPSbtNk28GpgoiskliCE7/yMgUsogWXecB5BKV5UU0s4tpvc+0hY91UZ59Ojg6FEgSxvunOxqNDYJAB+gECJChicsZUN/KHAG8HQQZexB2lzvukJDKxA4fFm517zP4029bHpbj4HR3dHuKom4t3XbWOTCC8KucUvIqx69JXn7HaOWCgchqJ/kniCrVWFCVH/A7HFe7fRQ5YiuayZSSKqMiDP+JJn1fIytH1xUdqWqeUQ0qUZ6B+dQ7XnASfxAynB67nfhmqA== -site=true -email=false -code=false - -[/C=US/ST=UT/L=Salt Lake City/O=The USERTRUST Network/OU=http://www.usertrust.com/CN=UTN -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dDLmNybDAqBgNVHSUEIzAhBggrBgEFBQcDAQYKKwYBBAGCNwoDAwYJYIZIAYb4QgQBMA0GCSqGSIb3DQEBBQUAA4IBAQAnNZcAiosovcYzMB4p/OL31ZjUQLtgyr+rFywJNn9Q+kHcrpY6CiM+iVnJowftGzet/Hy+UUla3joKVAgWRcKZsYfNjGjgaQPpxE6YsjuMFrMOoAyYUJuTqXAJyCyjj98C5OBxOvG0I3KgqgHf35g+FFCgMSa9KOlaMCZ1+XtgHI3zzVAmbQQnmt/VDUVHKWss5nbZqSl9Mt3JNjy9rjXxEZ4du5A/EkdOjtd+D2JzHVImOBwYSf0wdJrE5SIv2MCN7ZF6TACPcn9d2t0bi0Vr591pl6jFVkwPDPafepE39peC4N1xaf92P2BNPM/3mfnGV/TJVTl4uix5yaaIK/QI -site=true -email=false -code=false - -[/C=US/ST=UT/L=Salt Lake City/O=The USERTRUST Network/OU=http://www.usertrust.com/CN=UTN-USERFirst-Client Authentication and Email] -x509=MIIEojCCA4qgAwIBAgIQRL4Mi1AAJLQR0zYlJWfJiTANBgkqhkiG9w0BAQUFADCBrjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAlVUMRcwFQYDVQQHEw5TYWx0IExha2UgQ2l0eTEeMBwGA1UEChMVVGhlIFVTRVJUUlVTVCBOZXR3b3JrMSEwHwYDVQQLExhodHRwOi8vd3d3LnVzZXJ0cnVzdC5jb20xNjA0BgNVBAMTLVVUTi1VU0VSRmlyc3QtQ2xpZW50IEF1dGhlbnRpY2F0aW9uIGFuZCBFbWFpbDAeFw05OTA3MDkxNzI4NTBaFw0xOTA3MDkxNzM2NThaMIGuMQswCQYDVQQGEwJVUzELMAkGA1UECBMCVVQxFzAVBgNVBAcTDlNhbHQgTGFrZSBDaXR5MR4wHAYDVQQKExVUaGUgVVNFUlRSVVNUIE5ldHdvcmsxITAfBgNVBAsTGGh0dHA6Ly93d3cudXNlcnRydXN0LmNvbTE2MDQGA1UEAxMtVVROLVVTRVJGaXJzdC1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M4YxaHR0cDovL2NybC51c2VydHJ1c3QuY29tL1VUTi1VU0VSRmlyc3QtT2JqZWN0LmNybDApBgNVHSUEIjAgBggrBgEFBQcDAwYIKwYBBQUHAwgGCisGAQQBgjcKAwQwDQYJKoZIhvcNAQEFBQADggEBAAgfUrE3RHjb/c652pWWmKpVZIC1WkDdIaXFwfNfLEzIR1pp6ujwNTX00CXzyKakh0q9G7FzCL3Uw8q2NbtZhncxzaeAFK4T7/yxSPlrJSUtUbYsbUXBmMiKVl0+7kNOPmsnjtA6S4ULX9Ptaqd1y9Fahy85dRNacrACgZ++8A+EVCBibGnU4U3GDZlDAQ0Slox4nb9QorFEqmrPF3rPbw/U+CRVX/A0FklmPlBGyWNxODFiuGK581OtbLUrohKqGU8J2l7nk8aOFAj+8DCAGKCGhU3IfdeLA/5u1fedFqySLKAj5ZyRUh+U3xeUc8OzwcFxBSAAeL0TUh2oPs0AH8g= -site=false -email=false -code=true - -[/C=HU/L=Budapest/O=NetLock Halozatbiztonsagi Kft./OU=Tanusitvanykiadok/CN=NetLock Expressz (Class C) Tanusitvanykiado] -x509=MIIFTzCCBLigAwIBAgIBaDANBgkqhkiG9w0BAQQFADCBmzELMAkGA1UEBhMCSFUxETAPBgNVBAcTCEJ1ZGFwZXN0MScwJQYDVQQKEx5OZXRMb2NrIEhhbG96YXRiaXp0b25zYWdpIEtmdC4xGjAYBgNVBAsTEVRhbnVzaXR2YW55a2lhZG9rMTQwMgYDVQQDEytOZXRMb2NrIEV4cHJlc3N6IChDbGFzcyBDKSBUYW51c2l0dmFueWtpYWRvMB4XDTk5MDIyNTE0MDgxMVoXDTE5MDIyMDE0MDgxMVowgZsxCzAJBgNVBAYTAkhVMREwDwYDVQQHEwhCdWRhcGVzdDEnMCUGA1UEChMeTmV0TG9jayBIYWxvemF0Yml6dG9uc2FnaSBLZnQuMRowGAYDVQQLExFUYW51c2l0dmFueWtpYWRvazE0MDIGA1UEAxMrTmV0TG9jayBFeHByZXNzeiAoQ2xhc3M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UgYXQgaHR0cHM6Ly93d3cubmV0bG9jay5uZXQvZG9jcyBvciBieSBlLW1haWwgYXQgY3BzQG5ldGxvY2submV0LjANBgkqhkiG9w0BAQQFAAOBgQAQrX/XDDKACtiG8XmYta3UzbM2xJZIwVzNmtkFLp++UOv0JhQQLdRmF/iewSf98e3ke0ugbLWrmldwpu2gpO0u9f38vf5NNwgMvOOWgyL1SRt/Syu0VMGAfJlOHdCM7tCs5ZL6dVb+ZKATj7i4Fp1hBWeAyNDYpQcCNJgEjTME1A== -site=true -email=true -code=false - -[/C=HU/ST=Hungary/L=Budapest/O=NetLock Halozatbiztonsagi Kft./OU=Tanusitvanykiadok/CN=NetLock Kozjegyzoi (Class A) Tanusitvanykiado] -x509=MIIGfTCCBWWgAwIBAgICAQMwDQYJKoZIhvcNAQEEBQAwga8xCzAJBgNVBAYTAkhVMRAwDgYDVQQIEwdIdW5nYXJ5MREwDwYDVQQHEwhCdWRhcGVzdDEnMCUGA1UEChMeTmV0TG9jayBIYWxvemF0Yml6dG9uc2FnaSBLZnQuMRowGAYDVQQLExFUYW51c2l0dmFueWtpYWRvazE2MDQGA1UEAxMtTmV0TG9jayBLb3pqZWd5em9pIChDbGFzcyBBKSBUYW51c2l0dmFueWtpYWRvMB4XDTk5MDIyNDIzMTQ0N1oXDTE5MDIxOTIzMTQ0N1owga8xCzAJBgNVBAYTAkhVMRAwDgYDVQQIEwdIdW5nYXJ5MREwDwYDVQQHEwhCdWRhcGVzdDEnMCUGA1UEChMeTmV0TG9jayBIYWxvemF0Yml6dG9uc2FnaSBLZnQuMRowGAYDVQQLExFUYW51c2l0dmFueWtpYWRvazE2MDQGA1UEAxMtTmV0TG9jayBLb3pqZWd5em9pIChDbGFzcyBBKSBUYW51c2l0dmFueWtpYWRvMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAvHSMD7tM9DceqQWC2ObhbHDqeLVu0ThEDaiDzl3S1tWBxdRL51uUcCbbO51qTGL3cfNk1mE7P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czovL3d3dy5uZXRsb2NrLm5ldC9kb2NzIG9yIGJ5IGUtbWFpbCBhdCBjcHNAbmV0bG9jay5uZXQuMA0GCSqGSIb3DQEBBAUAA4GBAATbrowXr/gOkDFOzT4JwG06sPgzTEdM43WIEJessDgVkcYplswhwG08pXTP2IKlOcNl40JwuyKQ433bNXbhoLXan3BukxowOR0w2y7jfLKRstE3Kfq51hdcR0/jHTjrn9V7lagonhVK0dHQKwCXoOKSNitjrFgBazMpUIaD8QFI -site=true -email=true -code=false - -[/C=be/O=Belgacom/OU=MTM/CN=Belgacom E-Trust Primary CA/mail=info@e-trust.be] -x509=MIICiTCCAfKgAwIBAgIEN4dnrDANBgkqhkiG9w0BAQUFADB1MQswCQYDVQQGEwJiZTERMA8GA1UEChMIQmVsZ2Fjb20xDDAKBgNVBAsTA01UTTEkMCIGA1UEAxMbQmVsZ2Fjb20gRS1UcnVzdCBQcmltYXJ5IENBMR8wHQYKCZImiZPyLGQBAxQPaW5mb0BlLXRydXN0LmJlMB4XDTk4MTEwNDEzMDQzOVoXDTEwMDEyMTEzMDQzOVowdTELMAkGA1UEBhMCYmUxETAPBgNVBAoTCEJlbGdhY29tMQwwCgYDVQQLEwNNVE0xJDAiBgNVBAMTG0JlbGdhY29tIEUtVHJ1c3QgUHJpbWFyeSBDQTEfMB0GCgmSJomT8ixkAQMUD2luZm9AZS10cnVzdC5iZTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAqtm5s9VPak3FQdB7BGFqi3GBB9pk41huJ1XCrc4XsPz6ko0I8Bxy/7LDMf7gaoeXTMxDV6coeTq1g12kHWrxasU+FCIdWQZv8KYxd9ywSTjmywwP/qpyNIjaKDohWu50Kxuk21sTFrVzX8OujNLAPj2wy/Dsi4YLwsFEGFpjqNUCAwEAAaMmMCQwDwYDVR0TBAgwBgEB/wIBATARBglghkgBhvhCAQEEBAMCAAcwDQYJKoZIhvcNAQEFBQADgYEAerKxpbF9M+nC4RvO05OMfwH9Gx1amq6rB1Ev7Ymr3VBCux//SrWknLFhKQpM6oNZSY2vhmnXgaxHqqRxblnvynxqblSK2qiSyfVms3lf1IsBniFjRjWTpcJfImIDcB1jI+hrSB0jECfY9t9HorrsgFBKbMRwpnrkdCJ/9oRiMn8= -site=true -email=false -code=false - -[/C=US/OU=www.xrampsecurity.com/O=XRamp Security Services Inc/CN=XRamp Global Certification Authority] -x509=MIIEMDCCAxigAwIBAgIQUJRs7Bjq1ZxN1ZfvdY+grTANBgkqhkiG9w0BAQUFADCBgjELMAkGA1UEBhMCVVMxHjAcBgNVBAsTFXd3dy54cmFtcHNlY3VyaXR5LmNvbTEkMCIGA1UEChMbWFJhbXAgU2VjdXJpdHkgU2VydmljZXMgSW5jMS0wKwYDVQQDEyRYUmFtcCBHbG9iYWwgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwHhcNMDQxMTAxMTcxNDA0WhcNMzUwMTAxMDUzNzE5WjCBgjELMAkGA1UEBhMCVVMxHjAcBgNVBAsTFXd3dy54cmFtcHNlY3VyaXR5LmNvbTEkMCIGA1UEChMbWFJhbXAgU2VjdXJpdHkgU2VydmljZXMgSW5jMS0wKwYDVQQDEyRYUmFtcCBHbG9iYWwgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCYJB69FbS638eMpSe2OAtp87ZOqCwuIR1cRN8hXX4jdP5efrRKt6atH67gBhbim1vZZ3RrXYCPKZ2GG9mcDZhtdhAoWORlsH9KmHmf4MMxfoArtYzAQDsRhtDLooY2YKTVMIJt2W7QDxIEM5dfT2Fa8OT5kavnHTu86M/0ay00fOJIYRyO82FEzG+gSqmUsE3a56k0enI4qEHMPJQRfevIpoy3hsvKMzvZPTeL+3o+hiznc9cKV6xkmxnr9A8ECIqsAxcZZPRaJSKNNCyy9mgdEm3Tih4U2sSPpuIjhdV6Db1q4Ons7Be7QhtnqiXtRYMh/MHJfNViPvryxS3T/dRlAgMBAAGjgZ8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mV0MR0wGwYDVQQLExRUREMgSW50ZXJuZXQgUm9vdCBDQTENMAsGA1UEAxMEQ1JMMTArBgNVHRAEJDAigA8yMDAxMDQwNTE2MzMxN1qBDzIwMjEwNDA1MTcwMzE3WjALBgNVHQ8EBAMCAQYwHwYDVR0jBBgwFoAUbGQBx/2FbazI2p5QCIUItTxWqFAwHQYDVR0OBBYEFGxkAcf9hW2syNqeUAiFCLU8VqhQMAwGA1UdEwQFMAMBAf8wHQYJKoZIhvZ9B0EABBAwDhsIVjUuMDo0LjADAgSQMA0GCSqGSIb3DQEBBQUAA4IBAQBOQ8zR3R0QGwZ/t6T609lN+yOfI1Rb5osvBCiLtSdtiaHsmGnc540mgwV5dOy0uaOXwTUA/RXaOYE6lTGQ3pfphqiZdwzlWqCE/xIWrG64jcN7ksKsLtB9KOy282A4aW8+2ARVPp7MVdK6/rtHBNcK2RYKNCn1WBPVT8+PVkuzHu7TmHnaCB4Mb7j4Fifvwm899qNLPg7kbWzbO0ESm70NRyN/PErQr8Cv9u8btRXE64PECV90i9kR+8JWsTz4cMo0jUNAE4z9mQNUecYu6oah9jrUCbz0vGbMPVjQV0kK7iXiQe4T+Zs4NNEA9X7nlB38aQNiuJkFBT1reBK9sG9l -site=true -email=false -code=false - -[/C=HU/L=Budapest/O=NetLock Halozatbiztonsagi Kft./OU=Tanusitvanykiadok/CN=NetLock Minositett Kozjegyzoi (Class QA) Tanusitvanykiado/Email=info@netlock.hu] -x509=MIIG0TCCBbmgAwIBAgIBezANBgkqhkiG9w0BAQUFADCByTELMAkGA1UEBhMCSFUxETAPBgNVBAcTCEJ1ZGFwZXN0MScwJQYDVQQKEx5OZXRMb2NrIEhhbG96YXRiaXp0b25zYWdpIEtmdC4xGjAYBgNVBAsTEVRhbnVzaXR2YW55a2lhZG9rMUIwQAYDVQQDEzlOZXRMb2NrIE1pbm9zaXRldHQgS296amVneXpvaSAoQ2xhc3MgUUEpIFRhbnVzaXR2YW55a2lhZG8xHjAcBgkqhkiG9w0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QopDH2esRU1/blMVgDoszOYtuURXO1v0XJJLXVggKtI3lpjbi2Tc7PTMozI+gciKqdi0FuFskg5YmezTvacPd+mSYgFFQlq25zheabIZ0KbIIOqPjCDPoQHmyW74cNxA9hi63ugyuV+I6ShHI56yDqg+2DzZduCLzrTia2cyvk0/ZM/iZx4mERdEr/VxqHD3VILs9RaRegAhJhldXRQLIQTO7ErBBDpqWeCtWVYpoNz4iCxTIM5CufReYNnyicsbkqWletNw+vHX/bvZ8= -site=true -email=true -code=true - -[/C=US/O=Starfield Technologies, Inc./OU=Starfield Class 2 Certification Authority] -x509=MIIEDzCCAvegAwIBAgIBADANBgkqhkiG9w0BAQUFADBoMQswCQYDVQQGEwJVUzElMCMGA1UEChMcU3RhcmZpZWxkIFRlY2hub2xvZ2llcywgSW5jLjEyMDAGA1UECxMpU3RhcmZpZWxkIENsYXNzIDIgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwHhcNMDQwNjI5MTczOTE2WhcNMzQwNjI5MTczOTE2WjBoMQswCQYDVQQGEwJVUzElMCMGA1UEChMcU3RhcmZpZWxkIFRlY2hub2xvZ2llcywgSW5jLjEyMDAGA1UECxMpU3RhcmZpZWxkIENsYXNzIDIgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwggEgMA0GCSqGSIb3DQEBAQUAA4IBDQAwggEIAoIBAQC3Msj+6XGmBIWtDBFk385N78gDGIc/oav7PKaf8MOh2tTYbitTkPskpD6E8J7oX+zlJ0T1KKY/e97gKvDIr1MvnsoFAZMej2YcOadN+lq2cwQlZut3f+dZxkqZJRRU6ybH838Z1TBwj6+wRir/resp7defqgSHo9T5iaU0X9tDkYI22WY8sbi5gv2cOj4QyDvvBmVmepsZGD3/cVE8MC5fvj13c7JdBmzDI1aaK4UmkhynArPkPw2vCHmCuDY96pzTNbO8acr1zJ3o/WSNF4Azbl5KXZnJHoe0nRrA1W4TNSNe35tfPe/W93bC6j67eA0cQmdrBNj41tpvi/JEoAGrAgEDo4HFMIHCMB0GA1UdDgQWBBS/X7fRzt0fhvRbVazc1xDCDqmI5zCBkgYDVR0jBIGKMIGHgBS/X7fRzt0fhvRbVazc1xDCDqmI56FspGowaDELMAkGA1UEBhMCVVMxJTAjBgNVBAoTHFN0YXJmaWVsZCBUZWNobm9sb2dpZXMsIEluYy4xMjAwBgNVBAsTKVN0YXJmaWVsZCBDbGFzcyAyIENlcnRpZmljYXRpb24gQXV0aG9yaXR5ggEAMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADggEBAAWdP4id0ckaVaGsafPzWdqbAYcaT1epoXkJKtv3L7IezMdeatiDh6GX70k1PncGQVhiv45YuApnP+yz3SFmH8lU+nLMPUxA2IGvd56Deruix/U0F47ZEUD0/CwqTRV/p2JdLiXTAAsgGh1o+Re49L2L7ShZ3U0WixeDyLJlxy16paq8U4Zt3VekyvggQQto8PT7dL5WXXp59fkdheMtlb71cZBDzI0fmgAKhynpVSJYACPq4xJDKVtHCN2MQWplBqjlIapBtJUhlbl90TSrE9atvNziPTnNvT51cKEYWQPJIrSPnNVeKtelttQKbfi3QBFGmh95DmK/D5fs4C8fF5Q= -site=true -email=true -code=true - -[/C=NL/O=Staat der Nederlanden/CN=Staat der Nederlanden Root CA] -x509=MIIDujCCAqKgAwIBAgIEAJiWijANBgkqhkiG9w0BAQUFADBVMQswCQYDVQQGEwJOTDEeMBwGA1UEChMVU3RhYXQgZGVyIE5lZGVybGFuZGVuMSYwJAYDVQQDEx1TdGFhdCBkZXIgTmVkZXJsYW5kZW4gUm9vdCBDQTAeFw0wMjEyMTcwOTIzNDlaFw0xNTEyMTYwOTE1MzhaMFUxCzAJBgNVBAYTAk5MMR4wHAYDVQQKExVTdGFhdCBkZXIgTmVkZXJsYW5kZW4xJjAkBgNVBAMTHVN0YWF0IGRlciBOZWRlcmxhbmRlbiBSb290IENBMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAmNK1URF6gaYUmHFtvsznExvWJw56s2oYHLZh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QADggIBAGbBxiPz2eAubl/oz66wsCVNK/g7WJtAJDday6sWSf+zdXkzoS9tcBc0kf5nfo/sm+VegqlVHy/c1FEHEv6sFj4sNcZj/NwQ6w2jqtB8zNHQL1EuxBRa3ugZ4T7GzKQp5y6EqgYweHZUcyiYWTjgAA1i00J9IZ+uPTqM1fp3DRgrFg5fNuH8KrUwJM/gYwx7WBr+mbpCErGR9Hxo4sjoryzqyX6uuyo9DRXcNJW2GHSoag/HtPQTxORb7QrSpJdMKu0vbBKJPfEncKpqA1Ihn0CoZ1Dy81of398j9tx4TuaYT1U6U+Pv8vSfx3zYWK8pIpe44L2RLrB27FcRz+8pRPPphXpgY+RdM4kX2TGq2tbzGDVyz4crL2MjhF2EjD9XoIj8mZEoJmmZ1I+XRL6O1UixpCgp8RW04eWe3fiPpm8m1wk8OhwRDqZsN/etRIcsKMfYdIKz0G9KV7s1KSegi+ghp4dkNl3M2Basx7InQJJVOCiNUW7dFGdTbHFcJoRNdVq2fmBWqU2t+5sel/MN2dKXVHfaPRK34B7vCAas+YWH6aLcr34YEoP9VhdBLtUpgn2Z9DH2canPLAEnpQW5qrJITirvn5NSUZU8UnOOVkwXQMAJKOSLakhT2+zNVVXxxvjpoixMptEmX36vWkzaH6byHCx+rgIW0lbQL1dTR+iS -site=true -email=true -code=true - -[/C=BM/O=QuoVadis Limited/OU=Root Certification Authority/CN=QuoVadis Root Certification Authority] -x509=MIIF0DCCBLigAwIBAgIEOrZQizANBgkqhkiG9w0BAQUFADB/MQswCQYDVQQGEwJCTTEZMBcGA1UEChMQUXVvVmFkaXMgTGltaXRlZDElMCMGA1UECxMcUm9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTEuMCwGA1UEAxMlUXVvVmFkaXMgUm9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAeFw0wMTAzMTkxODMzMzNaFw0yMTAzMTcxODMzMzNaMH8xCzAJBgNVBAYTAkJNMRkwFwYDVQQKExBRdW9WYWRpcyBMa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KbkGGew5Oanwl4Rqy+/foYGEpIGBMH8xCzAJBgNVBAYTAkJNMRkwFwYDVQQKExBRdW9WYWRpcyBMaW1pdGVkMSUwIwYDVQQLExxSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MS4wLAYDVQQDEyVRdW9WYWRpcyBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5ggQ6tlCLMA4GA1UdDwEB/wQEAwIBBjANBgkqhkiG9w0BAQUFAAOCAQEAitQUtf70mpKnGdSkfnIYj9lofFIk3WdvOXrEql494liwTXCYhGHoG+NpGA7O+0dQoE7/8CQfvbLO9Sf87C9TqnN7Az10buYWnuulLsS/VidQK2K6vkscPFVcQR0kvoIgR13VRH56FmjffU1RcHhXHTMe/QKZnAzNCgVPx7uOpHX6Sm2xgI4JVrmcGmD+XcHXetwReNDWXcG31a0ymQM6isxUJTkxgXsTIlG6Rmyhu576BGxJJnSP0nPrzDCi5upZIof4l/UO/erMkqQWxFIY6iHOsfHmhIHluqmGKPJDWl0Snawe2ajlCmqnf6CHKc/yiU3U7MXi5nrQNiOKSnQ2+Q== -site=true -email=true -code=false - -[/C=US/O=DigiCert Inc/OU=www.digicert.com/CN=DigiCert Assured ID Root CA] -x509=MIIDtzCCAp+gAwIBAgIQDOfg5RfYRv6P5WD8G/AwOTANBgkqhkiG9w0BAQUFADBlMQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSQwIgYDVQQDExtEaWdpQ2VydCBBc3N1cmVkIElEIFJvb3QgQ0EwHhcNMDYxMTEwMDAwMDAwWhcNMzExMTEwMDAwMDAwWjBlMQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSQwIgYDVQQDExtEaWdpQ2VydCBBc3N1cmVkIElEIFJvb3QgQ0EwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCtDhXO5EOAXLGH87dg+XESpa7cJpSIqvTO9SA5KFhgDPiA2qkVlTJhPLWxKISKityfCgyDF3qPkKyK53lTXDGEKvYPmDI2dsze3Tyoou9q+yHyUmHfnyDXH+Kx2f4YZNISW1/5WBg1vEfNoTb5a3/UsDg+wRvDjDPZ2C8Y/igPs6eD1sNuRMBhNZYW/lmci3Zt1/GiSw0r/wty2p5g0I6QNcZ4VYcgoc/lbQrISXwxmDNsIumH0DJaoroTghHtORedmTpyoeb6pNnVFzF1roV9Iq4/AUaG9ih5yLHa5FcXxH4cDrC0kqZWs72yl+2qp/C3xag/lRbQ/6GW6whfGHdPAgMBAAGjYzBhMA4GA1UdDwEB/wQEAwIBhjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBRF66Kv9JLLgjEtUYunpyGd823IDzAfBgNVHSMEGDAWgBRF66Kv9JLLgjEtUYunpyGd823IDzANBgkqhkiG9w0BAQUFAAOCAQEAog683+Lt8ONyc3pklL/3cmbYMuRCdWKuh+vy1dneVrOfzM4UKLkNl2BcEkxY5NM9g0lFWJc1aRqoR+pWxnmrEthngYTffwk8lOa4JiwgvT2zKIn3X/8i4peEH+ll74fg38FnSbNd67IJKusm7Xi+fT8r87cmNW1fiQG2SVufAQWbqz0lwcy2f8Lxb4bG+mRo64EtlOtCt/qMHt1i8b5QZ7dsvfPxH2sMNgcWfzd8qVttevESRmCD1ycEvkvOl77DZypoEd+A5wwzZr8TDRRu838fYxAe+o0bJW1sj6W3YQGx0qMmoRBxna3iw/nDmVG3KwcIzi7mULKn+gpFL6Lw8g== -site=true -email=true -code=false - -[/C=US/O=DigiCert Inc/OU=www.digicert.com/CN=DigiCert Global Root CA] -x509=MIIDrzCCApegAwIBAgIQCDvgVpBCRrGhdWrJWZHHSjANBgkqhkiG9w0BAQUFADBhMQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tM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GUgY2VydGlmaWNhZG8gc2UgcHVlZGVuIGVuY29udHJhciBlbiBsYSBEUEMuMA0GCSqGSIb3DQEBBQUAA4ICAQBclLW4RZFNjmEfAygPU3zmpFmps4p6xbD/CHwso3EcIRNnoZUSQDWDg4902zNc8El2CoFS3UnUmjIz75uny3XlesuXEpBcunvFm9+7OSPI/5jOCk0iAUgHforA1SBClETvv3eiiWdIG0ADBaGJ7M9i4z0ldma/Jre7Ir5v/zlXdLp6yQGVwZVR6Kss+LGGIOk/yzVb0hfpKv6DExdA7ohiZVvVO2Dpezy4ydV/NgIlqmjCMRW3MGXrfx1IebHPOeJCgBbT9ZMj/EyXyVo3bHwi2ErN0o42gzmRkBDI8ck1fj+404HGIGQatlDCIaR43NAvO2STdPCWkPHv+wlaNECW8DYSwaN0jJN+Qd53i+yG2dIPPy3RzECiiWZIHiCznCNZc6lEc7wkeZBWN7PGKX6jD/EpOe9+XCgycDWs2rjIdWb8m0w5R44bb5tNAlQiM+9hup4phO9OSzNHdpdqy35f/RWmnkJDW2ZaiogN9xa5P1FlK2Zqi9E4UqLWRhH6/JocdJ6PlwsCT2TG9WjTSy3/pDceiz+/RL5hRqGEPQgnTIEgd4kI6mdAXmwIUV80WoyWaM3X94nCHNMyAK9Sy9NgWyo6R35rMDOhYil/SrnhLecUIw4OGEfhefwVVdCx/CVxY3UzHCMrr1zZ7Ud3YA47Dx7SwNxkBYn8eNZcLCZDqQ== -site=true -email=true -code=true - -[/C=IL/O=StartCom Ltd./OU=Secure Digital Certificate Signing/CN=StartCom Certification Authority] -x509=MIIHyTCCBbGgAwIBAgIBATANBgkqhkiG9w0BAQUFADB9MQswCQYDVQQGEwJJTDEWMBQGA1UEChMNU3RhcnRDb20gTHRkLjErMCkGA1UECxMiU2VjdXJlIERpZ2l0YWwgQ2VydGlmaWNhdGUgU2lnbmluZzEpMCcGA1UEAxMgU3RhcnRDb20gQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwHhcNMDYwOTE3MTk0NjM2W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ceWD3yJZfWOQ1QOq92lgDmUYMA0yZZwLKMS9R9Ie70cfmu3nZD0Ijuu+PwqyvqCUqDvr0tVk+vBtfAii6w0TiYiBKGHLHVKt+V9E9e4DGTANtLJL4YSjCMJwRuCO3NJo2pXh5Tl1njFmUNj403gdy3hZZlyaQQaRwnmDwFWJPsfvw55qVguucQJAX6Vum0ABj6y6koQOdjQK/W/7HW/lwLFCRsI3FU34oH7N4RDYiDK51ZLZer+bMEkkyShNOsF/5oirpt9P/FlUQqmMGqz9IgcgA38corog14= -site=true -email=true -code=false - -[/C=CH/O=WISeKey/OU=Copyright (c) 2005/OU=OISTE Foundation Endorsed/CN=OISTE WISeKey Global Root GA CA] -x509=MIID8TCCAtmgAwIBAgIQQT1yx/RrH4FDffHSKFTfmjANBgkqhkiG9w0BAQUFADCBijELMAkGA1UEBhMCQ0gxEDAOBgNVBAoTB1dJU2VLZXkxGzAZBgNVBAsTEkNvcHlyaWdodCAoYykgMjAwNTEiMCAGA1UECxMZT0lTVEUgRm91bmRhdGlvbiBFbmRvcnNlZDEoMCYGA1UEAxMfT0lTVEUgV0lTZUtleSBHbG9iYWwgUm9vdCBHQSBDQTAeFw0wNTEyMTExNjAzNDRaFw0zNzEyMTExNjA5NTFaMIGKMQswCQYDVQQGEwJDSDEQMA4GA1UEChMHV0lTZUtleTEbMBkGA1UECxMSQ29weXJpZ2h0IChjKSAyMDA1MSIwIAYDVQQLExlPSVNURSBGb3VuZGF0aW9uIEVuZG9yc2VkMSgwJgYDVQQDEx9PSVNURSBXSVNlS2V5IEdsb2JhbCBSb290IEdBIENBMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAy0+zAJs9Nt350UlqaxBJH+zYK7LG+DKBKUOVTJoZIyEVRd7jyBxRVVuuk+g3/ytr6dTqvirdqFEr12bDYVxgAsj1znJ7O7jyTmUIms2kahnBAbtzptf2w93NvKSLtZlhuAGio9RN1AU9ka34tAhxZK9w8RxrfvbDd50kc3vkDIzh2T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X5pGyq7O70luJpaPXJhkGaH7gzWTdQRdAtq/gsD/KNVV4n+SsuuWxcFyPKNIzFTONItaj+CuY0IavdeQXRuwxF+B6wpYJE/OMpXEA29MC/HpeZBoNquBYeaoKRlbEwJDIm6uNO5wJOKMPqN5ZprFQFOZ6raYlY+hAhm0sQ2fac+EPyI4NSA5QC9qvNOBqN6avlicuMJT+ubDgEj8Z+7fNzcbBGXJbLytGMU0gYqZ4yD9c7qB9iaah7s5Aq7KkzrCWA5zspi2C5u -site=true -email=true -code=true diff --git a/kio/kssl/kssl/localcerts b/kio/kssl/kssl/localcerts deleted file mode 100644 index 150763522..000000000 --- a/kio/kssl/kssl/localcerts +++ /dev/null @@ -1,36 +0,0 @@ -certum.pem -certum1.pem -certum2.pem -certum3.pem -certum4.pem -icpbrasil.pem -dfn-root-ca-cert.pem -argedaten-root-ca-cert.pem -ipsservidores.pem -utn-network.pem -utn-sgc.pem -comodo1.pem -comodo2.pem -comodo3.pem -comodo4.pem -comodo5.pem -comodo6.pem -comodo7.pem -sonera1.pem -sonera2.pem -netlock1.pem -netlock2.pem -netlock3.pem -belgacom.pem -xgca.pem -oces.pem -tdca.pem -netlock4.pem -gd-class2-root.pem -sf-class2-root.pem -geotrust-global-1.pem -geotrust-global-2.pem -GeoTrust_Universal_CA.pem -GeoTrust_Universal_CA2.pem -quovadis.pem -ac_offline_raiz_certicamara.pem diff --git a/kio/kssl/kssl/mergelocal b/kio/kssl/kssl/mergelocal deleted file mode 100755 index 4fc0f0ff3..000000000 --- a/kio/kssl/kssl/mergelocal +++ /dev/null @@ -1,65 +0,0 @@ -: -eval 'exec perl -S $0 ${1+"$@"}' - if $running_under_some_shell; - -## -## Merge the local certificates -## - -$date = `date`; -$date =~ s|\n$||; -open(BDL, ">>ksslcalist") || die; -open(CDL, ">>caroot/ca-bundle.crt") || die; -open(IDX, ") { - $filename = $_; - chomp($filename); - - stat($filename); - next if ! -r _; - - print STDERR "Bundling: $filename\n"; - $pem = `cat $filename`; - print CDL "\n$pem\n"; - $pem =~ s|[\n\r]||g; - $pem =~ s|-----BEGIN CERTIFICATE-----||; - $pem =~ s|-----END CERTIFICATE-----||; - $subj = `openssl x509 -in $filename -inform PEM -noout -subject`; - $_ = $subj; - if ( /[Oo]bject/ || /[Cc]ode/ ) { - $codeSubj = 1; - } else { - $codeSubj = 0; - } - $subj =~ s|\n$||; - $subj =~ s/^subject= //; - $purpose = `openssl x509 -in $filename -inform PEM -noout -purpose`; - print BDL "\n"; - print BDL "[$subj]\n"; - print BDL "x509=$pem\n"; - # - $_ = $purpose; - if ( /server CA : Yes\n/ || /client CA : Yes\n/ || (/Any Purpose CA : Yes\n/ && (/client : Yes\n/ || /server : Yes\n/ ))) { - print BDL "site=true\n"; - } else { - print BDL "site=false\n"; - } - # - if ( /MIME signing CA : Yes\n/ || /MIME encryption CA : Yes\n/ ) { - print BDL "email=true\n"; - } else { - print BDL "email=false\n"; - } - # - if ( /Any Purpose CA : Yes\n/ && $codeSubj == 1) { - print BDL "code=true\n"; - } else { - print BDL "code=false\n"; - } - -} -close(BDL); -close(CDL); -close(IDX); - diff --git a/kio/kssl/kssl/netlock1.pem b/kio/kssl/kssl/netlock1.pem deleted file mode 100644 index 5f7c1ce43..000000000 --- a/kio/kssl/kssl/netlock1.pem +++ /dev/null @@ -1,31 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIFTzCCBLigAwIBAgIBaDANBgkqhkiG9w0BAQQFADCBmzELMAkGA1UEBhMCSFUx -ETAPBgNVBAcTCEJ1ZGFwZXN0MScwJQYDVQQKEx5OZXRMb2NrIEhhbG96YXRiaXp0 -b25zYWdpIEtmdC4xGjAYBgNVBAsTEVRhbnVzaXR2YW55a2lhZG9rMTQwMgYDVQQD -EytOZXRMb2NrIEV4cHJlc3N6IChDbGFzcyBDKSBUYW51c2l0dmFueWtpYWRvMB4X -DTk5MDIyNTE0MDgxMVoXDTE5MDIyMDE0MDgxMVowgZsxCzAJBgNVBAYTAkhVMREw -DwYDVQQHEw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emVzQG5ldGxvY2submV0IGUtbWFpbCBjaW1lbi4g -SU1QT1JUQU5UISBUaGUgaXNzdWFuY2UgYW5kIHRoZSB1c2Ugb2YgdGhpcyBjZXJ0 -aWZpY2F0ZSBpcyBzdWJqZWN0IHRvIHRoZSBOZXRMb2NrIENQUyBhdmFpbGFibGUg -YXQgaHR0cHM6Ly93d3cubmV0bG9jay5uZXQvZG9jcyBvciBieSBlLW1haWwgYXQg -Y3BzQG5ldGxvY2submV0LjANBgkqhkiG9w0BAQQFAAOBgQAQrX/XDDKACtiG8XmY -ta3UzbM2xJZIwVzNmtkFLp++UOv0JhQQLdRmF/iewSf98e3ke0ugbLWrmldwpu2g -pO0u9f38vf5NNwgMvOOWgyL1SRt/Syu0VMGAfJlOHdCM7tCs5ZL6dVb+ZKATj7i4 -Fp1hBWeAyNDYpQcCNJgEjTME1A== ------END CERTIFICATE----- diff --git a/kio/kssl/kssl/netlock2.pem b/kio/kssl/kssl/netlock2.pem deleted file mode 100644 index c4e610816..000000000 --- a/kio/kssl/kssl/netlock2.pem +++ /dev/null @@ -1,37 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIGfTCCBWWgAwIBAgICAQMwDQYJKoZIhvcNAQEEBQAwga8xCzAJBgNVBAYTAkhV -MRAwDgYDVQQIEwdIdW5nYXJ5MREwDwYDVQQHEwhCdWRhcGVzdDEnMCUGA1UEChMe -TmV0TG9jayBIYWxvemF0Yml6dG9uc2FnaSBLZnQuMRowGAYDVQQLExFUYW51c2l0 -dmFueWtpYWRvazE2MDQGA1UEAxMtTmV0TG9jayBLb3pqZWd5em9pIChDbGFzcyBB -KSBUYW51c2l0dmFueWtpYWRvMB4XDTk5MDIyNDIzMTQ0N1oXDTE5MDIxOTIzMTQ0 -N1owga8xCzAJBgNVBAYTAkhVMRAwDgYDVQQIEwdIdW5nYXJ5MREwDwYDVQQHEwhC -dWRhcGVzdDEnMCUGA1UEChMeTmV0TG9jayBIYWxvemF0Yml6dG9uc2FnaSBLZnQu -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LZnQuIEludGVybmV0IGhvbmxhcGphbiBhIGh0dHBzOi8vd3d3 -Lm5ldGxvY2submV0L2RvY3MgY2ltZW4gdmFneSBrZXJoZXRvIGF6IGVsbGVub3J6 -ZXNAbmV0bG9jay5uZXQgZS1tYWlsIGNpbWVuLiBJTVBPUlRBTlQhIFRoZSBpc3N1 -YW5jZSBhbmQgdGhlIHVzZSBvZiB0aGlzIGNlcnRpZmljYXRlIGlzIHN1YmplY3Qg -dG8gdGhlIE5ldExvY2sgQ1BTIGF2YWlsYWJsZSBhdCBodHRwczovL3d3dy5uZXRs -b2NrLm5ldC9kb2NzIG9yIGJ5IGUtbWFpbCBhdCBjcHNAbmV0bG9jay5uZXQuMA0G -CSqGSIb3DQEBBAUAA4IBAQBIJEb3ulZv+sgoA0BO5TE5ayZrU3/b39/zcT0mwBQO -xmd7I6gMc90Bu8bKbjc5VdXHjFYgDigKDtIqpLBJUsY4B/6+CgmM0ZjPytoUMaFP -0jn8DxEsQ8Pdq5PHVT5HfBgaANzze9jyf1JsIPQLX2lS9O74silg6+NJMSEN1rUQ -QeJBCWziGppWS3cC9qCbmieH6FUpccKQn0V4GuEVZD3QDtigdp+uxdAu6tYPVuxk -f1qbFFgBJ34TUMdrKuZoPL9coAob4Q566eKAw+np9v1sEZ7Q5SgnK1QyQhSCdeZK -8CtmdWOMovsEPoMOmzbwGOQmIMOM8CgHrTwXZoi1/baI ------END CERTIFICATE----- diff --git a/kio/kssl/kssl/netlock3.pem b/kio/kssl/kssl/netlock3.pem deleted file mode 100644 index dd373608e..000000000 --- a/kio/kssl/kssl/netlock3.pem +++ /dev/null @@ -1,31 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIFSzCCBLSgAwIBAgIBaTANBgkqhkiG9w0BAQQFADCBmTELMAkGA1UEBhMCSFUx -ETAPBgNVBAcTCEJ1ZGFwZXN0MScwJQYDVQQKEx5OZXRMb2NrIEhhbG96YXRiaXp0 -b25zYWdpIEtmdC4xGjAYBgNVBAsTEVRhb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phcmFzIGxlaXJh -c2EgbWVndGFsYWxoYXRvIGEgTmV0TG9jayBLZnQuIEludGVybmV0IGhvbmxhcGph -biBhIGh0dHBzOi8vd3d3Lm5ldGxvY2submV0L2RvY3MgY2ltZW4gdmFneSBrZXJo -ZXRvIGF6IGVsbGVub3J6ZXNAbmV0bG9jay5uZXQgZS1tYWlsIGNpbWVuLiBJTVBP -UlRBTlQhIFRoZSBpc3N1YW5jZSBhbmQgdGhlIHVzZSBvZiB0aGlzIGNlcnRpZmlj -YXRlIGlzIHN1YmplY3QgdG8gdGhlIE5ldExvY2sgQ1BTIGF2YWlsYWJsZSBhdCBo -dHRwczovL3d3dy5uZXRsb2NrLm5ldC9kb2NzIG9yIGJ5IGUtbWFpbCBhdCBjcHNA -bmV0bG9jay5uZXQuMA0GCSqGSIb3DQEBBAUAA4GBAATbrowXr/gOkDFOzT4JwG06 -sPgzTEdM43WIEJessDgVkcYplswhwG08pXTP2IKlOcNl40JwuyKQ433bNXbhoLXa -n3BukxowOR0w2y7jfLKRstE3Kfq51hdcR0/jHTjrn9V7lagonhVK0dHQKwCXoOKS -NitjrFgBazMpUIaD8QFI ------END CERTIFICATE----- diff --git a/kio/kssl/kssl/netlock4.pem b/kio/kssl/kssl/netlock4.pem deleted file mode 100644 index 3565fef78..000000000 --- a/kio/kssl/kssl/netlock4.pem +++ /dev/null @@ -1,39 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIG0TCCBbmgAwIBAgIBezANBgkqhkiG9w0BAQUFADCByTELMAkGA1UEBhMCSFUx -ETAPBgNVBAcTCEJ1ZGFwZXN0MScwJQYDVQQKEx5OZXRMb2NrIEhhbG96YXRiaXp0 -b25zYWdpIEtmdC4xGjAYBgNVBAsTEVRhbnVzaXR2YW55a2lhZG9rMUIwQAYDVQQD -EzlOZXRMb2NrIE1pbm9zaXRldHQgS296amVneXpvaSAoQ2xhc3MgUUEpIFRhbnVz -aXR2YW55a2lhZG8xHjAcBgkqhkiG9w0BCQEWD2luZm9A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ssl/oces.pem deleted file mode 100644 index 32e08236c..000000000 --- a/kio/kssl/kssl/oces.pem +++ /dev/null @@ -1,30 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIFGTCCBAGgAwIBAgIEPki9xDANBgkqhkiG9w0BAQUFADAxMQswCQYDVQQGEwJE -SzEMMAoGA1UEChMDVERDMRQwEgYDVQQDEwtUREMgT0NFUyBDQTAeFw0wMzAyMTEw -ODM5MzBaFw0zNzAyMTEwOTA5MzBaMDExCzAJBgNVBAYTAkRLMQwwCgYDVQQKEwNU -REMxFDASBgNVBAMTC1REQyBPQ0VTIENBMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8A -MIIBCgKCAQEArGL2YSCyz8DGhdfjeebM7fI5kqSXLmSjhFuHnEz9pPPEXyG9VhDr -2y5h7JNp46PMvZnDBfwGuMo2HP6QjklMxFaaL1a8z3sM8W9Hpg1DTeLpHTk0zY0s -2RKY+ePhwUp8hjjEqcRhiNJerxomTdXkoCJHhNlktxmW/OwZ5LKXJk5KTMuPJItU -GBxIYXvViGjaXbXqzRowwYCDdlCqT9HU3Tjw7xb04QxQBr/q+3pJoSgrHPb8FTKj -dGqPqcNiKXEx5TukYBdedObaE+3pHx8b0bJoc8YQNHVGEBDjkAB2QMuLt0MJIf+r -TpPGWOmlgtt3xDqZsXKVSQTwtyv6e1mO3QIDAQABo4ICNzCCAjMwDwYDVR0TAQH/ -BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwgewGA1UdIASB5DCB4TCB3gYIKoFQgSkB -AQEwgdEwLwYIKwYBBQUHAgEWI2h0dHA6Ly93d3cuY2VydGlmaWthdC5kay9yZXBv -c2l0b3J5MIGdBggrBgEFBQcCAjCBkDAKFgNUREMwAwIBARqBgUNlcnRpZmlrYXRl -ciBmcmEgZGVubmUgQ0EgdWRzdGVkZXMgdW5kZXIgT0lEIDEuMi4yMDguMTY5LjEu -MS4xLiBDZXJ0aWZpY2F0ZXMgZnJvbSB0aGlzIENBIGFyZSBpc3N1ZWQgdW5kZXIg -T0lEIDEuMi4yMDguMTY5LjEuMS4xLjARBglghkgBhvhCAQEEBAMCAAcwgYEGA1Ud -HwR6MHgwSKBGoESkQjBAMQswCQYDVQQGEwJESzEMMAoGA1UEChMDVERDMRQwEgYD -VQQDEwtUREMgT0NFUyBDQTENMAsGA1UEAxMEQ1JMMTAsoCqgKIYmaHR0cDovL2Ny -bC5vY2VzLmNlcnRpZmlrYXQuZGsvb2Nlcy5jcmwwKwYDVR0QBCQwIoAPMjAwMzAy -MTEwODM5MzBagQ8yMDM3MDIxMTA5MDkzMFowHwYDVR0jBBgwFoAUYLWF7FZkfhIZ -J2cdUBVLc647+RIwHQYDVR0OBBYEFGC1hexWZH4SGSdnHVAVS3OuO/kSMB0GCSqG -SIb2fQdBAAQQMA4bCFY2LjA6NC4wAwIEkDANBgkqhkiG9w0BAQUFAAOCAQEACrom -JkbTc6gJ82sLMJn9iuFXehHTuJTXCRBuo7E4A9G28kNBKWKnctj7fAXmMXAnVBhO -inxO5dHKjHiIzxvTkIvmI/gLDjNDfZziChmPyQE+dF10yYscA+UYyAFMP8uXBV2Y -caaYb7Z8vTd/vuGTJW1v8AqtFxjhA7wHKcitJuj4YfD9IQl+mo6paH1IYnK9AOoB -mbgGglGBTvH1tJFUuSN6AJqfXY3gPGS5GhKSKseCRHI53OI8xthV9RVOyAUO28bQ -YqbsFbS1AoLbrIyigfCbmTH1ICCoiGEKB5+U/NDXG8wuF/MEJ3Zn61SD/aSQfgY9 -BKNDLdr8C2LqL19iUw== ------END CERTIFICATE----- diff --git a/kio/kssl/kssl/quovadis.pem b/kio/kssl/kssl/quovadis.pem deleted file mode 100644 index ea68f8876..000000000 --- a/kio/kssl/kssl/quovadis.pem +++ /dev/null @@ -1,34 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIF0DCCBLigAwIBAgIEOrZQizANBgkqhkiG9w0BAQUFADB/MQswCQYDVQQGEwJC -TTEZMBcGA1UEChMQUXVvVmFkaXMgTGltaXRlZ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JtcyBhbmQgY29uZGl0aW9ucyBvZiB1c2UsIGNlcnRpZmljYXRpb24gcHJh -Y3RpY2VzLCBhbmQgdGhlIFF1b1ZhZGlzIENlcnRpZmljYXRlIFBvbGljeS4wIgYI -KwYBBQUHAgEWFmh0dHA6Ly93d3cucXVvdmFkaXMuYm0wHQYDVR0OBBYEFItLbe3T -KbkGGew5Oanwl4Rqy+/fMIGuBgNVHSMEgaYwgaOAFItLbe3TKbkGGew5Oanwl4Rq -y+/foYGEpIGBMH8xCzAJBgNVBAYTAkJNMRkwFwYDVQQKExBRdW9WYWRpcyBMaW1p -dGVkMSUwIwYDVQQLExxSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MS4wLAYD -VQQDEyVRdW9WYWRpcyBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5ggQ6tlCL -MA4GA1UdDwEB/wQEAwIBBjANBgkqhkiG9w0BAQUFAAOCAQEAitQUtf70mpKnGdSk -fnIYj9lofFIk3WdvOXrEql494liwTXCYhGHoG+NpGA7O+0dQoE7/8CQfvbLO9Sf8 -7C9TqnN7Az10buYWnuulLsS/VidQK2K6vkscPFVcQR0kvoIgR13VRH56FmjffU1R -cHhXHTMe/QKZnAzNCgVPx7uOpHX6Sm2xgI4JVrmcGmD+XcHXetwReNDWXcG31a0y -mQM6isxUJTkxgXsTIlG6Rmyhu576BGxJJnSP0nPrzDCi5upZIof4l/UO/erMkqQW -xFIY6iHOsfHmhIHluqmGKPJDWl0Snawe2ajlCmqnf6CHKc/yiU3U7MXi5nrQNiOK -SnQ2+Q== ------END CERTIFICATE----- diff --git a/kio/kssl/kssl/qvrca2.pem b/kio/kssl/kssl/qvrca2.pem deleted file mode 100644 index 35cc4eb56..000000000 --- a/kio/kssl/kssl/qvrca2.pem +++ /dev/null @@ -1,33 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIFtzCCA5+gAwIBAgICBQkwDQYJKoZIhvcNAQEFBQAwRTELMAkGA1UEBhMCQk0x -GTAXBgN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A8QZRtGUa6FJpEcwRTEL -MAkGA1UEBhMCQk0xGTAXBgNVBAoTEFF1b1ZhZGlzIExpbWl0ZWQxGzAZBgNVBAMT -ElF1b1ZhZGlzIFJvb3QgQ0EgMoICBQkwDQYJKoZIhvcNAQEFBQADggIBAD4KFk2f -BluornFdLwUvZ+YTRYPENvbzwCYMDbVHZF34tHLJRqUDGCdViXh9duqWNIAXINzn -g/iN/Ae42l9NLmeyhP3ZRPx3UIHmfLTJDQtyU/h2BwdBR5YM++CCJpNVjP4iH2Bl -fF/nJrP3MpCYUNQ3cVX2kiF495V5+vgtJodmVjB3pjd4M1IQWK4/YY7yarHvGH5K -WWPKjaJW1acvvFYfzznB4vsKqBUsfU16Y8Zsl0Q80m/DShcK+JDSV6IZUaUtl0Ha -B0+pUNqQjZRG4T7wlP0QADj1O+hA4bRuVhogzG9Yje0uRY/W6ZM/57Es3zrWIozc -hLsib9D45MY56QSIPMO661V6bYCZJPVsAfv4l7CUW+v90m/xd2gNNWQjrLhVoQPR -TUIZ3Ph1WVaj+ahJefivDrkRoHy3au000LYmYjgahwz46P0u05B/B5EqHdZ+XIWD -mbA4CD/pXvk1B+TJYm5Xf6dQlfe6yJvmjqIBxdZmv3lh8zwc4bmCXF2gw+nYSL0Z -ohEUGW6yhhtoPkg3Goi3XZZenMfvJ2II4pEZXNLxId26F0KCl3GBUzGpn/Z9Yr9y -4aOTHcyKJloJONDO1w2AFrR4pTqHTI2KpdVGl/IsELm8VCLAAVBpQ570su9t+Oza -8eOx79+Rj1QqCyXBJhnEUhAFZdWCEOrCMc0u ------END CERTIFICATE----- diff --git a/kio/kssl/kssl/qvrca3.pem b/kio/kssl/kssl/qvrca3.pem deleted file mode 100644 index bda7b1aa5..000000000 --- a/kio/kssl/kssl/qvrca3.pem +++ /dev/null @@ -1,38 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIGnTCCBIWgAwIBAgICBcYwDQYJKoZIhvcNAQEFBQAwRTELMAkGA1UEBhMCQk0x -GTAX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lglFwjz1onl14LBQaTNx47aTbrqZ5hHY8y2o4M1nQ+ewkk2gF3R8Q7zTSMmfXK -4SVhM7JZG+Ju1zdXtg2pEto= ------END CERTIFICATE----- diff --git a/kio/kssl/kssl/sf-class2-root.pem b/kio/kssl/kssl/sf-class2-root.pem deleted file mode 100644 index d552e65dd..000000000 --- a/kio/kssl/kssl/sf-class2-root.pem +++ /dev/null @@ -1,24 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIEDzCCAvegAwIBAgIBADANBgkqhkiG9w0BAQUFADBoMQswCQYDVQQGEwJVUzEl -MCMGA1UEChMcU3RhcmZpZWxkIFRlY2hub2xvZ2llcywgSW5jLjEyMDAGA1UECxMp -U3RhcmZpZWxkIENsYXNzIDIgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwHhcNMDQw -NjI5MTczOTE2WhcNMzQwNjI5MTczOTE2WjBoMQswCQYDVQQGEwJVUzElMCMGA1UE -ChMcU3RhcmZpZWxkIFRlY2hub2xvZ2llcywgSW5jLjEyMDAGA1UECxMpU3RhcmZp -ZWxkIENsYXNzIDIgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwggEgMA0GCSqGSIb3 -DQEBAQUAA4IBDQAwggEIAoIBAQC3Msj+6XGmBIWtDBFk385N78gDGIc/oav7PKaf -8MOh2tTYbitTkPskpD6E8J7oX+zlJ0T1KKY/e97gKvDIr1MvnsoFAZMej2YcOadN -+lq2cwQlZut3f+dZxkqZJRRU6ybH838Z1TBwj6+wRir/resp7defqgSHo9T5iaU0 -X9tDkYI22WY8sbi5gv2cOj4QyDvvBmVmepsZGD3/cVE8MC5fvj13c7JdBmzDI1aa -K4UmkhynArPkPw2vCHmCuDY96pzTNbO8acr1zJ3o/WSNF4Azbl5KXZnJHoe0nRrA -1W4TNSNe35tfPe/W93bC6j67eA0cQmdrBNj41tpvi/JEoAGrAgEDo4HFMIHCMB0G -A1UdDgQWBBS/X7fRzt0fhvRbVazc1xDCDqmI5zCBkgYDVR0jBIGKMIGHgBS/X7fR -zt0fhvRbVazc1xDCDqmI56FspGowaDELMAkGA1UEBhMCVVMxJTAjBgNVBAoTHFN0 -YXJmaWVsZCBUZWNobm9sb2dpZXMsIEluYy4xMjAwBgNVBAsTKVN0YXJmaWVsZCBD -bGFzcyAyIENlcnRpZmljYXRpb24gQXV0aG9yaXR5ggEAMAwGA1UdEwQFMAMBAf8w -DQYJKoZIhvcNAQEFBQADggEBAAWdP4id0ckaVaGsafPzWdqbAYcaT1epoXkJKtv3 -L7IezMdeatiDh6GX70k1PncGQVhiv45YuApnP+yz3SFmH8lU+nLMPUxA2IGvd56D -eruix/U0F47ZEUD0/CwqTRV/p2JdLiXTAAsgGh1o+Re49L2L7ShZ3U0WixeDyLJl -xy16paq8U4Zt3VekyvggQQto8PT7dL5WXXp59fkdheMtlb71cZBDzI0fmgAKhynp -VSJYACPq4xJDKVtHCN2MQWplBqjlIapBtJUhlbl90TSrE9atvNziPTnNvT51cKEY -WQPJIrSPnNVeKtelttQKbfi3QBFGmh95DmK/D5fs4C8fF5Q= ------END CERTIFICATE----- diff --git a/kio/kssl/kssl/sonera1.pem b/kio/kssl/kssl/sonera1.pem deleted file mode 100644 index c5dad57ac..000000000 --- a/kio/kssl/kssl/sonera1.pem +++ /dev/null @@ -1,19 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIDIDCCAgigAwIBAgIBJDANBgkqhkiG9w0BAQUFADA5MQswCQYDVQQGEwJGSTEP -MA0GA1UEChMGU29uZXJhMRkwFwYDVQQDExBTb25lcmEgQ2xhc3MxIENBMB4XDTAx -MDQwNjEwNDkxM1oXDTIxMDQwNjEwNDkxM1owOTELMAkGA1UEBhMCRkkxDzANBgNV -BAoTBlNvbmVyYTEZMBcGA1UEAxMQU29uZXJhIENsYXNzMSBDQTCCASIwDQYJKoZI -hvcNAQEBBQADggEPADCCAQoCggEBALWJHytPZwp5/8Ue+H887dF+2rDNbS82rDTG -29lkFwhjMDMiikzujrsPDUJVyZ0upe/3p4zDq7mXy47vPxVnqIJyY1MPQYx9EJUk -oVqlBvqSV536pQHydekfvFYmUk54GWVYVQNYwBSujHxVX3BbdyMGNpfzJLWaRpXk -3w0LBUXl0fIdgrvGE+D+qnr9aTCU89JFhfzyMlsy3uhsXR/LpCJ0sICOXZT3BgBL -qdReLjVQCfOAl/QMF6452F/NM8EcyonCIvdFEu1eEpOdY6uCLrnrQkFEy0oaAIIN -nvmLVz5MxxftLItyM19yejhW1ebZrgUaHXVFsculJRwSVzb9IjcCAwEAAaMzMDEw -DwYDVR0TAQH/BAUwAwEB/zARBgNVHQ4ECgQIR+IMi/ZTiFIwCwYDVR0PBAQDAgEG -MA0GCSqGSIb3DQEBBQUAA4IBAQCLGrLJXWG04bkruVPRsoWdd44W7hE928Jj2VuX -ZfsSZ9gqXLar5V7DtxYvyOirHYr9qxp81V9jz9yw3Xe5qObSIjiHBxTZ/75Wtf0H -DjxVyhbMp6Z3N/vbXB9OWQaHowND9Rart4S9Tu+fMTfwRvFAttEMpWT4Y14h21VO -TzF2nBBhjrZTOqMRvq9tfB69ri3iDGnHhVNoomG6xT60eVR4ngrHAr5i0RGCS2Uv -kVrCqIexVmiUefkl98HVrhq4uz2PqYo4Ffdz0Fpg0YCw8NzVUM1O7pJIae2yIx4w -zMiUyLb1O4Z/P6Yun/Y+LLWSlj7fLJOK/4GMDw9ZIRlXvVWa ------END CERTIFICATE----- diff --git a/kio/kssl/kssl/sonera2.pem b/kio/kssl/kssl/sonera2.pem deleted file mode 100644 index 36a998d22..000000000 --- a/kio/kssl/kssl/sonera2.pem +++ /dev/null @@ -1,19 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIDIDCCAgigAwIBAgIBHTANBgkqhkiG9w0BAQUFADA5MQswCQYDVQQGEwJGSTEP -MA0GA1UEChMGU29uZXJhMRkwFwYDVQQDExBTb25lcmEgQ2xhc3MyIENBMB4XDTAx -MDQwNjA3Mjk0MFoXDTIxMDQwNjA3Mjk0MFowOTELMAkGA1UEBhMCRkkxDzANBgNV -BAoTBlNvbmVyYTEZMBcGA1UEAxMQU29uZXJhIENsYXNzMiBDQTCCASIwDQYJKoZI -hvcNAQEBBQADggEPADCCAQoCggEBAJAXSjWdyvANlsdE+hY3/Ei9vX+ALTU74W+o -Z6m/AxxNjG8yR9VBaKQTBME1DJqEQ/xcHf+Js+gXGM2RX/uJ4+q/Tl18GybTdXnt -5oTjV+WtKcT0OijnpXuENmmz/V52vaMtmdOQTiMofRhj8VQ7Jp12W5dCsv+u8E7s -3TmVToMGf+dJQMjFAbJUWmYdPfz56TwKnoG4cPABi+QjVHzIrviQHgCWctRUz2Ej -vOr7nQKV0ba5cTppCD8PtOFCx4j1P5iop7oc4HFx71hXgVB6XGt0Rg6DA5jDjqhu -8nYybieDwnPz3BjotJPqdURrBGAgcVeHnfO+oJAjPYok4doh28MCAwEAAaMzMDEw -DwYDVR0TAQH/BAUwAwEB/zARBgNVHQ4ECgQISqCqWITTXjwwCwYDVR0PBAQDAgEG -MA0GCSqGSIb3DQEBBQUAA4IBAQBazof5FnIVV0sd2ZvnoiYw7JNn39Yt0jSv9zil -zqsWuasvfDXLrNAPtEwr/IDva4yRXzZ299uzGxnq9LIR/WFxRL8oszodv7ND6J+/ -3DEIcbCdjdY0RzKQxmUk96BKfARzjzlvF4xytb1LyHr4e4PDKE6cCepnP7JnBBvD -FNr450kkkdAdavphOe9r5yF1BgfYErQhIHBCcYHaPJo2vqZbDWpsmh+Re/n570K6 -Tk6ezAyNlNzZRZxe7EJQY670XcSxEtzKO6gunRRaBXW37Ndj4ro1tgQIkejanZz2 -ZrUYrAqmVCY0M9IbwdR/GjqOC6oybtv8TyWf2TLHllpwrN9M ------END CERTIFICATE----- diff --git a/kio/kssl/kssl/staatdernederlandenrotca.pem b/kio/kssl/kssl/staatdernederlandenrotca.pem deleted file mode 100644 index c4eb117fa..000000000 --- a/kio/kssl/kssl/staatdernederlandenrotca.pem +++ /dev/null @@ -1,22 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIDujC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DS1/PTfLbwMVcoEoJz6TMvplW0C5GUR5z6 -u3pCMuiufi3IvKwUv9kP2Vv8wfl6leF9fpb8cbDCTMjfRTTJzg3ynGQI0DvDKcWy -7ZAEwbEpkcUwb8GpcjPM/l0WFywRaed+/sWDCN+83CI6LiBpIzlWYGeQiy52OfsR -iJf2fL1LuCAWZwWN4jvBcj+UlTfHXbme2JOhF4//DGYVwSR8MnwDHTuhWEUykw== ------END CERTIFICATE----- diff --git a/kio/kssl/kssl/startcom.pem b/kio/kssl/kssl/startcom.pem deleted file mode 100644 index 957842c98..000000000 --- a/kio/kssl/kssl/startcom.pem +++ /dev/null @@ -1,30 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIFFjCCBH+gAwIBAgIBADANBgkqhkiG9w0BAQQFADCBsDELMAkGA1UEBhMCSUwx -DzANBgNVBAgTBklzcmFlbDEOMAwGA1UEBxMFRWlsYXQxFjAUBgNVBAoTDVN0YXJ0 -Q29tIEx0ZC4xGjAYBgNVBAsTEUNBIEF1dGhvcml0eSBEZXAuMSkwJwYDVQQDEyBG -cmVlIFNTTCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTEhMB8GCSqGSIb3DQEJARYS -YWRtaW5Ac3RhcnRjb20ub3JnMB4XDTA1MDMxNzE3Mzc0OFoXDTM1MDMxMDE3Mzc0 -OFowgbAxCzAJBgNVBAYTAklMMQ8wDQYDVQQIEwZJc3JhZWwxDjAMBgNVBAcTBUVp -bGF0MRYwFAYDVQQKEw1TdGFydENvbSBMdGQuMRowGAYDVQQLExFDQSBBdXRob3Jp -dHkgRGVwLjEpMCcGA1UEAxMgRnJlZSBTU0wgQ2VydGlmaWNhdGlvbiBBdXRob3Jp -dHkxITAfBgkqhkiG9w0BCQEWEmFkbWluQHN0YXJ0Y29tLm9yZzCBnzANBgkqhkiG -9w0BAQEFAAOBjQAwgYkCgYEA7YRgACOeyEpRKSfeOqE5tWmrCbIvNP1h3D3TsM+x -18LEwrHkllbEvqoUDufMOlDIOmK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iP2ZO1CnwYszx8JSFhKVU2Ui77qLzmLb -cCOxgN8aIDjnfg== ------END CERTIFICATE----- diff --git a/kio/kssl/kssl/startssl.pem b/kio/kssl/kssl/startssl.pem deleted file mode 100644 index 960f2657b..000000000 --- a/kio/kssl/kssl/startssl.pem +++ /dev/null @@ -1,44 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIHyTCCBbGgAwIBAgIBATANBgkqhkiG9w0BAQUFADB9MQswCQYDVQQGEwJJTDEW -MBQGA1UEChMNU3RhcnRDb20gTHRkLjErMCkGA1UECxMiU2VjdXJlIERpZ2l0YWwg -Q2VydGlmaWNhdGUgU2lnbmluZzEpMCcGA1UEAxMgU3RhcnRDb20gQ2VydGlmaWNh -dGlvbiBBdXRob3JpdHkwHhcNMDYwOTE3MTk0NjM2WhcNMzYwOTE3MTk0NjM2WjB9 -MQswCQYDVQQGEwJJTDEWMBQGA1UEChMNU3RhcnRDb20gTHRkLjErMCkGA1UECxMi -U2VjdXJlIERpZ2l0YWwgQ2VydGlmaWNhdGUgU2lnbmluZzEpMCcGA1UEAxMgU3Rh -cnRDb20gQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwggIiMA0GCSqGSIb3DQEBAQUA -A4ICDwAwggIKAoICAQDBiNsJvGxGfHiflXu1M5DycmLWwTYgIiRezul38kMKogZk -pMyONvg45iPwbm2xPN1yo4UcodM9tDMr0y+v/uqwQVlntsQGfQqedIXWeUyAN3rf -OQVSWff0G0ZDpNKFhdLDcfN1YjS6LIp/Ho/u7TTQEceWzVI9ujPW3U3eCztKS5/C -Ji/6tRYccjV3yjxd5srhJosaNnZcAdt0FCX+7bWgiA/deMotHweXMAEtcnn6RtYT -Kqi5pquDSR3l8u/d5AGOGAqPY1MWhWKpDhk6zLVmpsJrdAfkK+F2PrRt2PZE4XNi -HzvEvqBTViVsUQn3qqvKv3b9bZvzndu/PWa8DFaqr5hIlTpL36dYUNk4dalb6kMM -Av+Z6+hsTXBbKWWc3apdzK8BMewM69KN6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QrFilTdGFydENvbSBGcmVlIFNT -TCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTANBgkqhkiG9w0BAQUFAAOCAgEAFmyZ -9GYMNPXQhV59CuzaEE44HF7fpiUFS5Eyweg78T3dRAlbB0mKKctmArexmvclmAk8 -jhvh3TaHK0u7aNM5Zj2gJsfyOZEdUauCe37Vzlrk4gNXcGmXCPleWKYK34wGmkUW -FjgKXlf2Ysd6AgXmvB618p70qSmD+LIU424oh0TDkBreOKk8rENNZEXO3SipXPJz -ewT4F+irsfMuXGRuczE6Eri8sxHkfY+BUZo7jYn0TZNmezwD7dOaHZrzZVD1oNB1 -ny+v8OqCQ5j4aZyJecRDjkZy42Q2Eq/3JR44iZB3fsNrarnDy0RLrHiQi+fHLB5L -EUTINFInzQpdn4XBidUaePKVEFMy3YCEZnXZtWgo+2EuvoSoOMCZEoalHmdkrQYu -L6lwhceWD3yJZfWOQ1QOq92lgDmUYMA0yZZwLKMS9R9Ie70cfmu3nZD0Ijuu+Pwq -yvqCUqDvr0tVk+vBtfAii6w0TiYiBKGHLHVKt+V9E9e4DGTANtLJL4YSjCMJwRuC -O3NJo2pXh5Tl1njFmUNj403gdy3hZZlyaQQaRwnmDwFWJPsfvw55qVguucQJAX6V -um0ABj6y6koQOdjQK/W/7HW/lwLFCRsI3FU34oH7N4RDYiDK51ZLZer+bMEkkySh -NOsF/5oirpt9P/FlUQqmMGqz9IgcgA38corog14= ------END CERTIFICATE----- diff --git a/kio/kssl/kssl/tcclass2-2011.pem b/kio/kssl/kssl/tcclass2-2011.pem deleted file mode 100644 index 0c9d89e77..000000000 --- a/kio/kssl/kssl/tcclass2-2011.pem +++ /dev/null @@ -1,20 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIDXDCCAsWgAwIBAgICA+owDQYJKoZIhvcNAQEEBQAwgbwxCzAJBgNVBAYTAkRF -MRAwDgYDVQQIEwdIYW1idXJnMRAwDgYDVQQHEwdIYW1idXJnMTowOAYDVQQKEzFU -QyB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git a/kio/kssl/kssl/tcclass3-2011.pem b/kio/kssl/kssl/tcclass3-2011.pem deleted file mode 100644 index 14f81c830..000000000 --- a/kio/kssl/kssl/tcclass3-2011.pem +++ /dev/null @@ -1,20 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIDXDCCAsWgAwIBAgICA+swDQYJKoZIhvcNAQEEBQAwgbwxCzAJBgNVBAYTAkRF -MRAwDgYDVQQIEwdIYW1idXJnMRAwDgYDVQQHEwdIYW1idXJnMTowOAYDVQQKEzFU -QyBUcnVzdENlbnRlciBmb3IgU2VjdXJpdHkgaW4gRGF0YSBOZXR3b3JrcyBHbWJI -MSIwIAYDVQQLExlUQyBUcnVzdENlbnRlciBDbGFzcyAzIENBMSkwJwYJKoZIhvcN -AQkBFhpjZXJ0aWZpY2F0ZUB0cnVzdGNlbnRlci5kZTAeFw05ODAzMDkxMTU5NTla -Fw0xMTAxMDExMTU5NTlaMIG8MQswCQYDVQQGEwJERTEQMA4GA1UECBMHSGFtYnVy -ZzEQMA4GA1UEBxMHSGFtYnVyZzE6MDgGA1UEChMxVEMgVHJ1c3RDZW50ZXIgZm9y -IFNlY3VyaXR5IGluIERhdGEgTmV0d29ya3MgR21iSDEiMCAGA1UECxMZVEMgVHJ1 -c3RDZW50ZXIgQ2xhc3MgMyBDQTEpMCcGCSqGSIb3DQEJARYaY2VydGlmaWNhdGVA -dHJ1c3RjZW50ZXIuZGUwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBALa0wTUF -Lg2N7KBAahwOJ6ZQkmtQGwfeLud2zODa/ISoXoxjaitN2U4CdhHBC/KNecoAtvGw -Dtf7pBc9r6tpepYnv68zoZoqWarEtTcI8hKlMbZD9TKWcSgoq40oht+77uMMfTDW -w1Krj10nnGvAo+cFa1dJRLNu6mTP0o56UHd3AgMBAAGjazBpMA8GA1UdEwEB/wQF -MAMBAf8wDgYDVR0PAQH/BAQDAgGGMDMGCWCGSAGG+EIBCAQmFiRodHRwOi8vd3d3 -LnRydXN0Y2VudGVyLmRlL2d1aWRlbGluZXMwEQYJYIZIAYb4QgEBBAQDAgAHMA0G -CSqGSIb3DQEBBAUAA4GBABY9xs3Bu4VxhUafPiCPUSiZ7C1FIWMjWwS7TJC4iJIE -Tb19AaM/9uzO8d7+feXhPrvGq14L3T2WxMup1Pkm5gZOngylerpuw3yCGdHHsbHD -2w2Om0B8NwvxXej9H5CIpQ5ON2QhqE6NtJ/x3kit1VYYUimLRzQSCdS7kjXvD9s0 ------END CERTIFICATE----- diff --git a/kio/kssl/kssl/utn-network.pem b/kio/kssl/kssl/utn-network.pem deleted file mode 100644 index 72b576a59..000000000 --- a/kio/kssl/kssl/utn-network.pem +++ /dev/null @@ -1,26 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIEZDCCA0ygAwIBAgIQRL4Mi1AAJLQR0zYwS8AzdzANBgkqhkiG9w0BAQUFADCB -ozELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAlVUMRcwFQYDVQQHEw5TYWx0IExha2Ug -Q2l0eTEeMBwGA1UEChMVVGhlIFVTRVJUUlVTVCBOZXR3b3JrMSEwHwYDVQQLExho -dHRwOi8vd3d3LnVzZXJ0cnVzdC5jb20xKzApBgNVBAMTIlVUTi1VU0VSRmlyc3Qt -TmV0d29yayBBcHBsaWNhdGlvbnMwHhcNOTkwNzA5MTg0ODM5WhcNMTkwNzA5MTg1 -NzQ5WjCBozELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAlVUMRcwFQYDVQQHEw5TYWx0 -IExha2UgQ2l0eTEeMBwGA1UEChMVVGhlIFVTRVJUUlVTVCBOZXR3b3JrMSEwHwYD -VQQLExhodHRwOi8vd3d3LnVzZXJ0cnVzdC5jb20xKzApBgNVBAMTIlVUTi1VU0VS -Rmlyc3QtTmV0d29yayBBcHBsaWNhdGlvbnMwggEiMA0GCSqGSIb3DQEBAQUAA4IB -DwAwggEKAoIBAQCz+5Gh5DZVhawGNFugmliy+LUPBXeDrjKxdpJo7CNKyXY/45y2 -N3kDuatpjQclthln5LAbGHNhSuh+zdMvZOOmfAz6F4CjDUeJT1FxL+78P/m4FoCH -iZMlIJpDgmkkdihZNaEdwH+DBmQWICzTSaSFtMBhf1EI+GgVkYDLpdXuOzr0hARe -YFmnjDRy7rh4xdE7EkpvfmUnuaRVxblvQ6TFHSyZwFKkeEwVs0CYCGtDxgGwenv1 -axwiP8vv/6jQOkt2FZ7S0cYu49tXGzKiuG/ohqY/cKvlcJKrRB5AUPuco2LkbG6g -yN7igEL66S/ozjIEj3yNtxyjNTwV3Z7DrpelAgMBAAGjgZEwgY4wCwYDVR0PBAQD -AgHGMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFPqGydvguul49Uuo1hXf8NPh -ahQ8ME8GA1UdHwRIMEYwRKBCoECGPmh0dHA6Ly9jcmwudXNlcnRydXN0LmNvbS9V -VE4tVVNFUkZpcnN0LU5ldHdvcmtBcHBsaWNhdGlvbnMuY3JsMA0GCSqGSIb3DQEB -BQUAA4IBAQCk8yXM0dSRgyLQzDKrm5ZONJFUICU0YV8qAhXhi6r/fWRRzwr/vH3Y -IWp4yy9Rb/hCHTO967V7lMPDqaAt39EpHx3+jz+7qEUqf9FuVSTiuwL7MT++6Lzs -QCv4AdRWOOTKRIK1YSAhZ2X28AvnNPilwpyjXEAfhZOVBt5P1CeptqX8Fs1zMT+4 -ZSfP1FMa8Kxun08FDAOBp4QpxFq9ZFdyrTvPNximmMatBrTcCKME1SmklpoSZ0qM -YEWd8SOasACcaLWYUNPvji6SZbFIPiG+FTAqDbUMo2s/rn9X9R+WfN9v3YIwLGUb -QErNaLly7HF27FSOH4UMAWr6pjisH8SE ------END CERTIFICATE----- diff --git a/kio/kssl/kssl/utn-sgc.pem b/kio/kssl/kssl/utn-sgc.pem deleted file mode 100644 index 1c747eb57..000000000 --- a/kio/kssl/kssl/utn-sgc.pem +++ /dev/null @@ -1,26 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIEXjCCA0agAwIBAgIQRL4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HSUEIzAhBggr -BgEFBQcDAQYKKwYBBAGCNwoDAwYJYIZIAYb4QgQBMA0GCSqGSIb3DQEBBQUAA4IB -AQAnNZcAiosovcYzMB4p/OL31ZjUQLtgyr+rFywJNn9Q+kHcrpY6CiM+iVnJowft -Gzet/Hy+UUla3joKVAgWRcKZsYfNjGjgaQPpxE6YsjuMFrMOoAyYUJuTqXAJyCyj -j98C5OBxOvG0I3KgqgHf35g+FFCgMSa9KOlaMCZ1+XtgHI3zzVAmbQQnmt/VDUVH -KWss5nbZqSl9Mt3JNjy9rjXxEZ4du5A/EkdOjtd+D2JzHVImOBwYSf0wdJrE5SIv -2MCN7ZF6TACPcn9d2t0bi0Vr591pl6jFVkwPDPafepE39peC4N1xaf92P2BNPM/3 -mfnGV/TJVTl4uix5yaaIK/QI ------END CERTIFICATE----- diff --git a/kio/kssl/kssl/xgca.pem b/kio/kssl/kssl/xgca.pem deleted file mode 100644 index f21e6d8b7..000000000 --- a/kio/kssl/kssl/xgca.pem +++ /dev/null @@ -1,25 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIEMDCCAxigAwIBAgIQUJRs7Bjq1ZxN1ZfvdY+grTANBgkqhkiG9w0BAQUFADCB -gjELMAkGA1UEBhMCVVMxHjAcBgNVBAsTFXd3dy54cmFtcHNlY3VyaXR5LmNvbTEk -MCIGA1UEChMbWFJhbXAgU2VjdXJpdHkgU2VydmljZXMgSW5jMS0wKwYDVQQDEyRY -UmFtcCBHbG9iYWwgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwHhcNMDQxMTAxMTcx -NDA0WhcNMzUwMTAxMDUzNzE5WjCBgjELMAkGA1UEBhMCVVMxHjAcBgNVBAsTFXd3 -dy54cmFtcHNlY3VyaXR5LmNvbTEkMCIGA1UEChMbWFJhbXAgU2VjdXJpdHkgU2Vy -dmljZXMgSW5jMS0wKwYDVQQDEyRYUmFtcCBHbG9iYWwgQ2VydGlmaWNhdGlvbiBB -dXRob3JpdHkwggEiMA0GCSqGS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000000 --- a/kio/kssl/ksslall.h +++ /dev/null @@ -1,41 +0,0 @@ -/* This file is part of the KDE project - * - * Copyright (C) 2001-2003 George Staikos - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library 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 - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public License - * along with this library; see the file COPYING.LIB. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - */ - -#ifndef __INC_KSSL_ALL_H -#define __INC_KSSL_ALL_H -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#endif - diff --git a/kio/kssl/ksslcallback.c b/kio/kssl/ksslcallback.c deleted file mode 100644 index 59f342584..000000000 --- a/kio/kssl/ksslcallback.c +++ /dev/null @@ -1,89 +0,0 @@ -/* This file is part of the KDE project - * - * Copyright (C) 2000 George Staikos - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library 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 - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public License - * along with this library; see the file COPYING.LIB. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - */ - -#ifdef KSSL_HAVE_SSL -#ifndef _kde_ksslcallback_c -#define _kde_ksslcallback_c - -X509 *KSSL_X509CallBack_ca; -bool KSSL_X509CallBack_ca_found; - -extern "C" { -static int X509Callback(int ok, X509_STORE_CTX *ctx) { - - kdDebug(7029) << "X509Callback: ok = " << ok << " error = " << ctx->error << " depth = " << ctx->error_depth << endl; - // Here is how this works. We put "ok = 1;" in any case that we - // don't consider to be an error. In that case, it will return OK - // for the certificate check as long as there are no other critical - // errors. Don't forget that there can be multiple errors. - // - // Of course we can also put other code in here but any data returned - // back will not be threadsafe ofcourse. - - if (KSSL_X509CallBack_ca) - { - if (KOSSL::self()->X509_cmp(ctx->current_cert, KSSL_X509CallBack_ca) != 0) - return 1; // Ignore errors for this certificate - - KSSL_X509CallBack_ca_found = true; - } - - if (!ok) { - switch (ctx->error) { - case X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT: - case X509_V_ERR_UNABLE_TO_GET_CRL: - case X509_V_ERR_UNABLE_TO_DECRYPT_CERT_SIGNATURE: - case X509_V_ERR_UNABLE_TO_DECRYPT_CRL_SIGNATURE: - case X509_V_ERR_UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY: - case X509_V_ERR_CERT_SIGNATURE_FAILURE: - case X509_V_ERR_CRL_SIGNATURE_FAILURE: - case X509_V_ERR_CERT_NOT_YET_VALID: - case X509_V_ERR_CERT_HAS_EXPIRED: - case X509_V_ERR_CRL_NOT_YET_VALID: - case X509_V_ERR_CRL_HAS_EXPIRED: - case X509_V_ERR_ERROR_IN_CERT_NOT_BEFORE_FIELD: - case X509_V_ERR_ERROR_IN_CERT_NOT_AFTER_FIELD: - case X509_V_ERR_ERROR_IN_CRL_LAST_UPDATE_FIELD: - case X509_V_ERR_ERROR_IN_CRL_NEXT_UPDATE_FIELD: - case X509_V_ERR_OUT_OF_MEM: - case X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT: - case X509_V_ERR_SELF_SIGNED_CERT_IN_CHAIN: - case X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY: - case X509_V_ERR_UNABLE_TO_VERIFY_LEAF_SIGNATURE: - case X509_V_ERR_CERT_CHAIN_TOO_LONG: - case X509_V_ERR_CERT_REVOKED: - case X509_V_ERR_INVALID_CA: - case X509_V_ERR_PATH_LENGTH_EXCEEDED: - case X509_V_ERR_INVALID_PURPOSE: - case X509_V_ERR_CERT_UNTRUSTED: - case X509_V_ERR_CERT_REJECTED: - case X509_V_ERR_APPLICATION_VERIFICATION: - default: - break; - } - } - - return(ok); -} -} - -#endif -#endif - diff --git a/kio/kssl/ksslcertchain.cc b/kio/kssl/ksslcertchain.cc deleted file mode 100644 index a401aec3d..000000000 --- a/kio/kssl/ksslcertchain.cc +++ /dev/null @@ -1,216 +0,0 @@ -/* This file is part of the KDE project - * - * Copyright (C) 2001 George Staikos - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library 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 - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public License - * along with this library; see the file COPYING.LIB. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - */ -#ifdef HAVE_CONFIG_H -#include -#endif - -#include "kssldefs.h" -#include "ksslcertificate.h" -#include "ksslcertchain.h" - -// this hack provided by Malte Starostik to avoid glibc/openssl bug -// on some systems -#ifdef KSSL_HAVE_SSL -#define crypt _openssl_crypt -#include -#include -#include -#include -#include -#include -#include -#undef crypt -#endif - -#include -#include -#include - - - -#ifdef KSSL_HAVE_SSL -#define sk_new d->kossl->sk_new -#define sk_push d->kossl->sk_push -#define sk_free d->kossl->sk_free -#define sk_value d->kossl->sk_value -#define sk_num d->kossl->sk_num -#define sk_dup d->kossl->sk_dup -#define sk_pop d->kossl->sk_pop -#endif - -class KSSLCertChainPrivate { -public: - KSSLCertChainPrivate() { - kossl = KOSSL::self(); - } - - ~KSSLCertChainPrivate() { - } - - KOSSL *kossl; -}; - -KSSLCertChain::KSSLCertChain() { - d = new KSSLCertChainPrivate; - _chain = NULL; -} - - -KSSLCertChain::~KSSLCertChain() { -#ifdef KSSL_HAVE_SSL - if (_chain) { - STACK_OF(X509) *x = (STACK_OF(X509) *)_chain; - - for (;;) { - X509* x5 = sk_X509_pop(x); - if (!x5) break; - d->kossl->X509_free(x5); - } - sk_X509_free(x); - } -#endif - delete d; -} - - -bool KSSLCertChain::isValid() { - return (_chain && depth() > 0); -} - - -KSSLCertChain *KSSLCertChain::replicate() { -KSSLCertChain *x = new KSSLCertChain; -TQPtrList ch = getChain(); - - x->setChain(ch); // this will do a deep copy for us - ch.setAutoDelete(true); -return x; -} - - -int KSSLCertChain::depth() { -#ifdef KSSL_HAVE_SSL - return sk_X509_num((STACK_OF(X509)*)_chain); -#endif -return 0; -} - - -TQPtrList KSSLCertChain::getChain() { -TQPtrList cl; -if (!_chain) return cl; -#ifdef KSSL_HAVE_SSL -STACK_OF(X509) *x = (STACK_OF(X509) *)_chain; - - for (int i = 0; i < sk_X509_num(x); i++) { - X509* x5 = sk_X509_value(x, i); - if (!x5) continue; - KSSLCertificate *nc = new KSSLCertificate; - nc->setCert(d->kossl->X509_dup(x5)); - cl.append(nc); - } - -#endif -return cl; -} - - -void KSSLCertChain::setChain(TQPtrList& chain) { -#ifdef KSSL_HAVE_SSL -if (_chain) { - STACK_OF(X509) *x = (STACK_OF(X509) *)_chain; - - for (;;) { - X509* x5 = sk_X509_pop(x); - if (!x5) break; - d->kossl->X509_free(x5); - } - sk_X509_free(x); - _chain = NULL; -} - - if (chain.count() == 0) return; - _chain = (void *)sk_new(NULL); - for (KSSLCertificate *x = chain.first(); x != 0; x = chain.next()) { - sk_X509_push((STACK_OF(X509)*)_chain, d->kossl->X509_dup(x->getCert())); - } - -#endif -} - - -void KSSLCertChain::setChain(void *stack_of_x509) { -#ifdef KSSL_HAVE_SSL -if (_chain) { - STACK_OF(X509) *x = (STACK_OF(X509) *)_chain; - - for (;;) { - X509* x5 = sk_X509_pop(x); - if (!x5) break; - d->kossl->X509_free(x5); - } - sk_X509_free(x); - _chain = NULL; -} - -if (!stack_of_x509) return; - -_chain = (void *)sk_new(NULL); -STACK_OF(X509) *x = (STACK_OF(X509) *)stack_of_x509; - - for (int i = 0; i < sk_X509_num(x); i++) { - X509* x5 = sk_X509_value(x, i); - if (!x5) continue; - sk_X509_push((STACK_OF(X509)*)_chain,d->kossl->X509_dup(x5)); - } - -#else -_chain = NULL; -#endif -} - - -void KSSLCertChain::setChain(TQStringList chain) { - setCertChain(chain); -} - -void KSSLCertChain::setCertChain(const TQStringList& chain) { - TQPtrList cl; - cl.setAutoDelete(true); - for (TQStringList::ConstIterator s = chain.begin(); s != chain.end(); ++s) { - KSSLCertificate *c = KSSLCertificate::fromString((*s).local8Bit()); - if (c) { - cl.append(c); - } - } - setChain(cl); -} - - -#ifdef KSSL_HAVE_SSL -#undef sk_new -#undef sk_push -#undef sk_free -#undef sk_value -#undef sk_num -#undef sk_dup -#undef sk_pop -#endif - diff --git a/kio/kssl/ksslcertchain.h b/kio/kssl/ksslcertchain.h deleted file mode 100644 index eb6c27d44..000000000 --- a/kio/kssl/ksslcertchain.h +++ /dev/null @@ -1,136 +0,0 @@ -/* This file is part of the KDE project - * - * Copyright (C) 2001-2003 George Staikos - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library 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 - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public License - * along with this library; see the file COPYING.LIB. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - */ - -#ifndef _KSSLCERTCHAIN_H -#define _KSSLCERTCHAIN_H - -#include -#include -#include - -class TQString; -class TQCString; -class KSSL; -class KSSLCertChainPrivate; -class TQStringList; - -#include - -/** - * KDE Certificate Chain Representation Class - * - * This class provides a representation for an X.509 certificate chain. - * - * @author George Staikos - * @see KSSL, KSSLCertificate, KSSLPeerInfo - * @short KDE X.509 Certificate Chain - */ -class TDEIO_EXPORT KSSLCertChain { -friend class KSSL; -friend class KSSLPeerInfo; - -public: - /** - * Construct a KSSLCertChain object - */ - KSSLCertChain(); - - /** - * Destroy this KSSLCertChain object - */ - ~KSSLCertChain(); - - /** - * Determine if this represents a valid certificate chain - * - * @return true if it is a valid certificate chain - */ - bool isValid(); - - /** - * Do a deep copy of the certificate chain. - * - * @return pointer to a new certificate chain object - * - * This is an expensive operation, and you are responsible for deleting - * the returned object yourself. - */ - KSSLCertChain *replicate(); - - /** - * Set the raw chain from OpenSSL - * @internal - */ - void setChain(void *stack_of_x509); - - /** - * Set the certificate chain as a pointer list of KSSL certificates. - * - * @param chain the certificate chain - * @see KSSLCertificate - */ - void setChain(TQPtrList& chain); - - /** - * Set the certificate chain as a list of base64 encoded X.509 - * certificates. - * - * @param chain the certificate chain - * @deprecated - */ - void setChain(TQStringList chain) KDE_DEPRECATED; - - /** - * Set the certificate chain as a list of base64 encoded X.509 - * certificates. - * - * @param chain the certificate chain - */ - void setCertChain(const TQStringList& chain); - - /** - * Obtain a copy of the certificate chain. - * - * @return a deep copy of the certificate chain. - * @see KSSLCertificate - */ - TQPtrList getChain(); - - /** - * Determine the number of entries (depth) of the chain. - * - * @return the number of entries in the certificate chain - */ - int depth(); - - /** - * Read the raw chain in OpenSSL format - * @internal - */ - void *rawChain() { return _chain; } - -private: - KSSLCertChainPrivate *d; - void *_chain; -}; - - -#endif - diff --git a/kio/kssl/ksslcertdlg.cc b/kio/kssl/ksslcertdlg.cc deleted file mode 100644 index 3d51c1e85..000000000 --- a/kio/kssl/ksslcertdlg.cc +++ /dev/null @@ -1,174 +0,0 @@ -/* This file is part of the KDE project - * - * Copyright (C) 2001-2003 George Staikos - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library 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 - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public License - * along with this library; see the file COPYING.LIB. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - */ - -#include "ksslcertdlg.h" - -#include - -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include - - -class KSSLCertDlg::KSSLCertDlgPrivate { -private: - friend class KSSLCertDlg; - TQLabel *p_message; - TQPushButton *p_pb_dontsend; - bool p_send_flag; -}; - -KSSLCertDlg::KSSLCertDlg(TQWidget *parent, const char *name, bool modal) - : KDialog(parent, name, modal), d(new KSSLCertDlgPrivate) { - - TQBoxLayout * grid = new TQVBoxLayout( this, KDialog::marginHint(), - KDialog::spacingHint() ); - - d->p_message = new TQLabel(TQString::null, this); - grid->addWidget(d->p_message); - setHost(_host); - - _certs = new TQListView(this); - _certs->addColumn(i18n("Certificate")); - _certs->setResizeMode(TQListView::LastColumn); - TQFontMetrics fm( TDEGlobalSettings::generalFont() ); - _certs->setMinimumHeight(4*fm.height()); - grid->addWidget(_certs); - - _save = new TQCheckBox(i18n("Save selection for this host."), this); - grid->addWidget(_save); - - grid->addWidget(new KSeparator(KSeparator::HLine, this)); - - TQBoxLayout * h = new TQHBoxLayout( grid ); - h->insertStretch(0); - - _ok = new KPushButton(i18n("Send certificate"), this); - h->addWidget(_ok); - connect(_ok, TQT_SIGNAL(clicked()), TQT_SLOT(slotSend())); - - d->p_pb_dontsend = new KPushButton(i18n("Do not send a certificate"), this); - h->addWidget(d->p_pb_dontsend); - connect(d->p_pb_dontsend, TQT_SIGNAL(clicked()), TQT_SLOT(slotDont())); - -#ifndef QT_NO_WIDGET_TOPEXTRA - setCaption(i18n("KDE SSL Certificate Dialog")); -#endif -} - - -KSSLCertDlg::~KSSLCertDlg() { - delete d; -} - - -void KSSLCertDlg::setup(TQStringList certs, bool saveChecked, bool sendChecked) { - setupDialog(certs, saveChecked, sendChecked); -} - -void KSSLCertDlg::setupDialog(const TQStringList& certs, bool saveChecked, bool sendChecked) { - _save->setChecked(saveChecked); - d->p_send_flag = sendChecked; - - if (sendChecked) - _ok->setDefault(true); // "do send" is the "default action". - else - d->p_pb_dontsend->setDefault(true); // "do not send" is the "default action". - - for (TQStringList::ConstIterator i = certs.begin(); i != certs.end(); ++i) { - if ((*i).isEmpty()) - continue; - - new TQListViewItem(_certs, *i); - } - - _certs->setSelected(_certs->firstChild(), true); -} - - -bool KSSLCertDlg::saveChoice() { - return _save->isChecked(); -} - - -bool KSSLCertDlg::wantsToSend() { - return d->p_send_flag; -} - - -TQString KSSLCertDlg::getChoice() { - TQListViewItem *selected = _certs->selectedItem(); - if (selected && d->p_send_flag) - return selected->text(0); - else - return TQString::null; -} - - -void KSSLCertDlg::setHost(const TQString& host) { - _host = host; - d->p_message->setText(i18n("The server %1 requests a certificate.

" - "Select a certificate to use from the list below:") - .arg(_host)); -} - - -void KSSLCertDlg::slotSend() { - d->p_send_flag = true; - accept(); -} - - -void KSSLCertDlg::slotDont() { - d->p_send_flag = false; - reject(); -} - - -TQDataStream& operator<<(TQDataStream& s, const KSSLCertDlgRet& r) { - s << TQ_INT8(r.ok?1:0) << r.choice << TQ_INT8(r.save?1:0) << TQ_INT8(r.send?1:0); - return s; -} - - -TQDataStream& operator>>(TQDataStream& s, KSSLCertDlgRet& r) { -TQ_INT8 tmp; - s >> tmp; r.ok = (tmp == 1); - s >> r.choice; - s >> tmp; r.save = (tmp == 1); - s >> tmp; r.send = (tmp == 1); - return s; -} - - -#include "ksslcertdlg.moc" - diff --git a/kio/kssl/ksslcertdlg.h b/kio/kssl/ksslcertdlg.h deleted file mode 100644 index 8d6f3d777..000000000 --- a/kio/kssl/ksslcertdlg.h +++ /dev/null @@ -1,138 +0,0 @@ -/* This file is part of the KDE project - * - * Copyright (C) 2001-2003 George Staikos - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library 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 - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public License - * along with this library; see the file COPYING.LIB. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - */ - -#ifndef _KSSLCERTDLG_H -#define _KSSLCERTDLG_H - -#include -#include - -class TQWidget; -class TQCheckBox; -class TQRadioButton; -class TQListView; -class TQPushButton; - -/** - * KDE X.509 Certificate Dialog - * - * This class is used to create and display a dialog which contains the user's - * X.509 certificates and allows the user to present it during SSL sessions. - * - * @author George Staikos - * @see KSSL - * @short KDE X.509 Certificate Dialog - */ -class TDEIO_EXPORT KSSLCertDlg : public KDialog { - Q_OBJECT -public: - /** - * Construct a KSSL certificate dialog - * - * @param parent the parent widget - * @param name the internal name of this instance - * @param modal create a modal dialog if set to true - */ - KSSLCertDlg(TQWidget *parent=0L, const char *name=0L, bool modal=false); - - /** - * Destroy this object and close the dialog - */ - virtual ~KSSLCertDlg(); - - /** - * Setup the dialog. Call this before you display the dialog. - * - * @param certs the list of possible certificates - * @param saveChecked save the checked item for the future - * @param sendChecked send the checked item to the remote host - * @deprecated - */ - void setup(TQStringList certs, bool saveChecked = false, bool sendChecked = true) KDE_DEPRECATED; - - /** - * Setup the dialog. Call this before you display the dialog. - * - * @param certs the list of possible certificates - * @param saveChecked save the checked item for the future - * @param sendChecked send the checked item to the remote host - */ - void setupDialog(const TQStringList& certs, bool saveChecked = false, bool sendChecked = true); - - /** - * Obtain the name of the certificate the user wants to send - * - * @return the name of the certificate - */ - TQString getChoice(); - - /** - * Determine if the user wants to send a certificate. - * - * @return true if the user wants to send a certificate - */ - bool wantsToSend(); - - /** - * Determine if the user wants to save the choice for the future. - * - * @return true if the user wants to save the choice. - */ - bool saveChoice(); - - /** - * Set the hostname that we are connecting to. - * - * @param host the hostname - */ - void setHost(const TQString& host); - -private slots: - void slotSend(); - void slotDont(); - -private: - class KSSLCertDlgPrivate; - KSSLCertDlgPrivate *d; - TQCheckBox *_save; - TQRadioButton *_send, *_dont; - TQListView *_certs; - TQPushButton *_ok; - TQString _host; -}; - - -class TDEIO_EXPORT KSSLCertDlgRet { -public: - bool ok; - TQString choice; - bool send; - bool save; - -protected: - class KSSLCertDlgRetPrivate; - KSSLCertDlgRetPrivate *d; -}; - -TDEIO_EXPORT TQDataStream& operator<<(TQDataStream& s, const KSSLCertDlgRet& r); -TDEIO_EXPORT TQDataStream& operator>>(TQDataStream& s, KSSLCertDlgRet& r); - -#endif - diff --git a/kio/kssl/ksslcertificate.cc b/kio/kssl/ksslcertificate.cc deleted file mode 100644 index 8e2192f7d..000000000 --- a/kio/kssl/ksslcertificate.cc +++ /dev/null @@ -1,1157 +0,0 @@ -/* This file is part of the KDE project - * - * Copyright (C) 2000-2003 George Staikos - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library 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 - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public License - * along with this library; see the file COPYING.LIB. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - */ - - -#ifdef HAVE_CONFIG_H -#include -#endif - - - -#include -#include -#include -#include - -#include "kssldefs.h" -#include "ksslcertificate.h" -#include "ksslcertchain.h" -#include "ksslutils.h" - -#include -#include -#include -#include -#include - -#include - -#ifdef HAVE_SYS_STAT_H -#include -#endif - -// this hack provided by Malte Starostik to avoid glibc/openssl bug -// on some systems -#ifdef KSSL_HAVE_SSL -#define crypt _openssl_crypt -#include -#include -#include -#include -#include -#undef crypt -#endif - -#include -#include -#include -#include "ksslx509v3.h" - - - -static char hv[] = {'0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F'}; - - -class KSSLCertificatePrivate { -public: - KSSLCertificatePrivate() { - kossl = KOSSL::self(); - _lastPurpose = KSSLCertificate::None; - } - - ~KSSLCertificatePrivate() { - } - - KSSLCertificate::KSSLValidation m_stateCache; - bool m_stateCached; - #ifdef KSSL_HAVE_SSL - X509 *m_cert; - #endif - KOSSL *kossl; - KSSLCertChain _chain; - KSSLX509V3 _extensions; - KSSLCertificate::KSSLPurpose _lastPurpose; -}; - -KSSLCertificate::KSSLCertificate() { - d = new KSSLCertificatePrivate; - d->m_stateCached = false; - TDEGlobal::dirs()->addResourceType("kssl", KStandardDirs::kde_default("data") + "kssl"); - #ifdef KSSL_HAVE_SSL - d->m_cert = NULL; - #endif -} - - -KSSLCertificate::KSSLCertificate(const KSSLCertificate& x) { - d = new KSSLCertificatePrivate; - d->m_stateCached = false; - TDEGlobal::dirs()->addResourceType("kssl", KStandardDirs::kde_default("data") + "kssl"); - #ifdef KSSL_HAVE_SSL - d->m_cert = NULL; - setCert(KOSSL::self()->X509_dup(const_cast(x).getCert())); - KSSLCertChain *c = x.d->_chain.replicate(); - setChain(c->rawChain()); - delete c; - #endif -} - - - -KSSLCertificate::~KSSLCertificate() { -#ifdef KSSL_HAVE_SSL - if (d->m_cert) - d->kossl->X509_free(d->m_cert); -#endif - delete d; -} - - -KSSLCertChain& KSSLCertificate::chain() { - return d->_chain; -} - - -KSSLCertificate *KSSLCertificate::fromX509(X509 *x5) { -KSSLCertificate *n = NULL; -#ifdef KSSL_HAVE_SSL - if (x5) { - n = new KSSLCertificate; - n->setCert(KOSSL::self()->X509_dup(x5)); - } -#endif -return n; -} - - -KSSLCertificate *KSSLCertificate::fromString(TQCString cert) { -KSSLCertificate *n = NULL; -#ifdef KSSL_HAVE_SSL - if (cert.length() == 0) - return NULL; - - TQByteArray qba, qbb = cert.copy(); - KCodecs::base64Decode(qbb, qba); - unsigned char *qbap = reinterpret_cast(qba.data()); - X509 *x5c = KOSSL::self()->d2i_X509(NULL, &qbap, qba.size()); - if (!x5c) { - return NULL; - } - - n = new KSSLCertificate; - n->setCert(x5c); -#endif -return n; -} - - - -TQString KSSLCertificate::getSubject() const { -TQString rc = ""; - -#ifdef KSSL_HAVE_SSL - char *t = d->kossl->X509_NAME_oneline(d->kossl->X509_get_subject_name(d->m_cert), 0, 0); - if (!t) - return rc; - rc = t; - d->kossl->OPENSSL_free(t); -#endif -return rc; -} - - -TQString KSSLCertificate::getSerialNumber() const { -TQString rc = ""; - -#ifdef KSSL_HAVE_SSL - ASN1_INTEGER *aint = d->kossl->X509_get_serialNumber(d->m_cert); - if (aint) { - rc = ASN1_INTEGER_QString(aint); - // d->kossl->ASN1_INTEGER_free(aint); this makes the sig test fail - } -#endif -return rc; -} - - -TQString KSSLCertificate::getSignatureText() const { -TQString rc = ""; - -#ifdef KSSL_HAVE_SSL -char *s; -int n, i; - - i = d->kossl->OBJ_obj2nid(d->m_cert->sig_alg->algorithm); - rc = i18n("Signature Algorithm: "); - rc += (i == NID_undef)?i18n("Unknown"):TQString(d->kossl->OBJ_nid2ln(i)); - - rc += "\n"; - rc += i18n("Signature Contents:"); - n = d->m_cert->signature->length; - s = (char *)d->m_cert->signature->data; - for (i = 0; i < n; i++) { - if (i%20 != 0) rc += ":"; - else rc += "\n"; - rc.append(hv[(s[i]&0xf0)>>4]); - rc.append(hv[s[i]&0x0f]); - } - -#endif - -return rc; -} - - -void KSSLCertificate::getEmails(TQStringList &to) const { - to.clear(); -#ifdef KSSL_HAVE_SSL - if (!d->m_cert) - return; - - STACK *s = d->kossl->X509_get1_email(d->m_cert); - if (s) { - for(int n=0; n < s->num; n++) { - to.append(d->kossl->sk_value(s,n)); - } - d->kossl->X509_email_free(s); - } -#endif -} - - -TQString KSSLCertificate::getKDEKey() const { - return getSubject() + " (" + getMD5DigestText() + ")"; -} - - -TQString KSSLCertificate::getMD5DigestFromKDEKey(const TQString &k) { - TQString rc; - int pos = k.findRev('('); - if (pos != -1) { - unsigned int len = k.length(); - if (k.at(len-1) == ')') { - rc = k.mid(pos+1, len-pos-2); - } - } - return rc; -} - - -TQString KSSLCertificate::getMD5DigestText() const { -TQString rc = ""; - -#ifdef KSSL_HAVE_SSL - unsigned int n; - unsigned char md[EVP_MAX_MD_SIZE]; - - if (!d->kossl->X509_digest(d->m_cert, d->kossl->EVP_md5(), md, &n)) { - return rc; - } - - for (unsigned int j = 0; j < n; j++) { - if (j > 0) - rc += ":"; - rc.append(hv[(md[j]&0xf0)>>4]); - rc.append(hv[md[j]&0x0f]); - } - -#endif - -return rc; -} - - - -TQString KSSLCertificate::getMD5Digest() const { -TQString rc = ""; - -#ifdef KSSL_HAVE_SSL - unsigned int n; - unsigned char md[EVP_MAX_MD_SIZE]; - - if (!d->kossl->X509_digest(d->m_cert, d->kossl->EVP_md5(), md, &n)) { - return rc; - } - - for (unsigned int j = 0; j < n; j++) { - rc.append(hv[(md[j]&0xf0)>>4]); - rc.append(hv[md[j]&0x0f]); - } - -#endif - -return rc; -} - - - -TQString KSSLCertificate::getKeyType() const { -TQString rc = ""; - -#ifdef KSSL_HAVE_SSL - EVP_PKEY *pkey = d->kossl->X509_get_pubkey(d->m_cert); - if (pkey) { - #ifndef NO_RSA - if (pkey->type == EVP_PKEY_RSA) - rc = "RSA"; - else - #endif - #ifndef NO_DSA - if (pkey->type == EVP_PKEY_DSA) - rc = "DSA"; - else - #endif - rc = "Unknown"; - d->kossl->EVP_PKEY_free(pkey); - } -#endif - -return rc; -} - - - -TQString KSSLCertificate::getPublicKeyText() const { -TQString rc = ""; -char *x = NULL; - -#ifdef KSSL_HAVE_SSL - EVP_PKEY *pkey = d->kossl->X509_get_pubkey(d->m_cert); - if (pkey) { - rc = i18n("Unknown", "Unknown key algorithm"); - #ifndef NO_RSA - if (pkey->type == EVP_PKEY_RSA) { - rc = i18n("Key type: RSA (%1 bit)") + "\n"; - - x = d->kossl->BN_bn2hex(pkey->pkey.rsa->n); - rc += i18n("Modulus: "); - rc = rc.arg(strlen(x)*4); - for (unsigned int i = 0; i < strlen(x); i++) { - if (i%40 != 0 && i%2 == 0) - rc += ":"; - else if (i%40 == 0) - rc += "\n"; - rc += x[i]; - } - rc += "\n"; - d->kossl->OPENSSL_free(x); - - x = d->kossl->BN_bn2hex(pkey->pkey.rsa->e); - rc += i18n("Exponent: 0x") + x + "\n"; - d->kossl->OPENSSL_free(x); - } - #endif - #ifndef NO_DSA - if (pkey->type == EVP_PKEY_DSA) { - rc = i18n("Key type: DSA (%1 bit)") + "\n"; - - x = d->kossl->BN_bn2hex(pkey->pkey.dsa->p); - rc += i18n("Prime: "); - // hack - this may not be always accurate - rc = rc.arg(strlen(x)*4) ; - for (unsigned int i = 0; i < strlen(x); i++) { - if (i%40 != 0 && i%2 == 0) - rc += ":"; - else if (i%40 == 0) - rc += "\n"; - rc += x[i]; - } - rc += "\n"; - d->kossl->OPENSSL_free(x); - - x = d->kossl->BN_bn2hex(pkey->pkey.dsa->q); - rc += i18n("160 bit prime factor: "); - for (unsigned int i = 0; i < strlen(x); i++) { - if (i%40 != 0 && i%2 == 0) - rc += ":"; - else if (i%40 == 0) - rc += "\n"; - rc += x[i]; - } - rc += "\n"; - d->kossl->OPENSSL_free(x); - - x = d->kossl->BN_bn2hex(pkey->pkey.dsa->g); - rc += TQString("g: "); - for (unsigned int i = 0; i < strlen(x); i++) { - if (i%40 != 0 && i%2 == 0) - rc += ":"; - else if (i%40 == 0) - rc += "\n"; - rc += x[i]; - } - rc += "\n"; - d->kossl->OPENSSL_free(x); - - x = d->kossl->BN_bn2hex(pkey->pkey.dsa->pub_key); - rc += i18n("Public key: "); - for (unsigned int i = 0; i < strlen(x); i++) { - if (i%40 != 0 && i%2 == 0) - rc += ":"; - else if (i%40 == 0) - rc += "\n"; - rc += x[i]; - } - rc += "\n"; - d->kossl->OPENSSL_free(x); - } - #endif - d->kossl->EVP_PKEY_free(pkey); - } -#endif - -return rc; -} - - - -TQString KSSLCertificate::getIssuer() const { -TQString rc = ""; - -#ifdef KSSL_HAVE_SSL - char *t = d->kossl->X509_NAME_oneline(d->kossl->X509_get_issuer_name(d->m_cert), 0, 0); - - if (!t) - return rc; - - rc = t; - d->kossl->OPENSSL_free(t); -#endif - -return rc; -} - -void KSSLCertificate::setChain(void *c) { -#ifdef KSSL_HAVE_SSL - d->_chain.setChain(c); -#endif - d->m_stateCached = false; - d->m_stateCache = KSSLCertificate::Unknown; -} - -void KSSLCertificate::setCert(X509 *c) { -#ifdef KSSL_HAVE_SSL -d->m_cert = c; -if (c) { - d->_extensions.flags = 0; - d->kossl->X509_check_purpose(c, -1, 0); // setup the fields (!!) - -#if 0 - kdDebug(7029) << "---------------- Certificate ------------------" - << endl; - kdDebug(7029) << getSubject() << endl; -#endif - - for (int j = 0; j < d->kossl->X509_PURPOSE_get_count(); j++) { - X509_PURPOSE *ptmp = d->kossl->X509_PURPOSE_get0(j); - int id = d->kossl->X509_PURPOSE_get_id(ptmp); - for (int ca = 0; ca < 2; ca++) { - int idret = d->kossl->X509_check_purpose(c, id, ca); - if (idret == 1 || idret == 2) { // have it -// kdDebug() << "PURPOSE: " << id << (ca?" CA":"") << endl; - if (!ca) - d->_extensions.flags |= (1L <<(id-1)); - else d->_extensions.flags |= (1L <<(16+id-1)); - } else { - if (!ca) - d->_extensions.flags &= ~(1L <<(id-1)); - else d->_extensions.flags &= ~(1L <<(16+id-1)); - } - } - } - -#if 0 - kdDebug(7029) << "flags: " << TQString::number(c->ex_flags, 2) - << "\nkeyusage: " << TQString::number(c->ex_kusage, 2) - << "\nxkeyusage: " << TQString::number(c->ex_xkusage, 2) - << "\nnscert: " << TQString::number(c->ex_nscert, 2) - << endl; - if (c->ex_flags & EXFLAG_KUSAGE) - kdDebug(7029) << " --- Key Usage extensions found" << endl; - else kdDebug(7029) << " --- Key Usage extensions NOT found" << endl; - - if (c->ex_flags & EXFLAG_XKUSAGE) - kdDebug(7029) << " --- Extended key usage extensions found" << endl; - else kdDebug(7029) << " --- Extended key usage extensions NOT found" << endl; - - if (c->ex_flags & EXFLAG_NSCERT) - kdDebug(7029) << " --- NS extensions found" << endl; - else kdDebug(7029) << " --- NS extensions NOT found" << endl; - - if (d->_extensions.certTypeSSLCA()) - kdDebug(7029) << "NOTE: this is an SSL CA file." << endl; - else kdDebug(7029) << "NOTE: this is NOT an SSL CA file." << endl; - - if (d->_extensions.certTypeEmailCA()) - kdDebug(7029) << "NOTE: this is an EMAIL CA file." << endl; - else kdDebug(7029) << "NOTE: this is NOT an EMAIL CA file." << endl; - - if (d->_extensions.certTypeCodeCA()) - kdDebug(7029) << "NOTE: this is a CODE CA file." << endl; - else kdDebug(7029) << "NOTE: this is NOT a CODE CA file." << endl; - - if (d->_extensions.certTypeSSLClient()) - kdDebug(7029) << "NOTE: this is an SSL client." << endl; - else kdDebug(7029) << "NOTE: this is NOT an SSL client." << endl; - - if (d->_extensions.certTypeSSLServer()) - kdDebug(7029) << "NOTE: this is an SSL server." << endl; - else kdDebug(7029) << "NOTE: this is NOT an SSL server." << endl; - - if (d->_extensions.certTypeNSSSLServer()) - kdDebug(7029) << "NOTE: this is a NETSCAPE SSL server." << endl; - else kdDebug(7029) << "NOTE: this is NOT a NETSCAPE SSL server." << endl; - - if (d->_extensions.certTypeSMIME()) - kdDebug(7029) << "NOTE: this is an SMIME certificate." << endl; - else kdDebug(7029) << "NOTE: this is NOT an SMIME certificate." << endl; - - if (d->_extensions.certTypeSMIMEEncrypt()) - kdDebug(7029) << "NOTE: this is an SMIME encrypt cert." << endl; - else kdDebug(7029) << "NOTE: this is NOT an SMIME encrypt cert." << endl; - - if (d->_extensions.certTypeSMIMESign()) - kdDebug(7029) << "NOTE: this is an SMIME sign cert." << endl; - else kdDebug(7029) << "NOTE: this is NOT an SMIME sign cert." << endl; - - if (d->_extensions.certTypeCRLSign()) - kdDebug(7029) << "NOTE: this is a CRL signer." << endl; - else kdDebug(7029) << "NOTE: this is NOT a CRL signer." << endl; - - kdDebug(7029) << "-----------------------------------------------" - << endl; -#endif -} -#endif -d->m_stateCached = false; -d->m_stateCache = KSSLCertificate::Unknown; -} - -X509 *KSSLCertificate::getCert() { -#ifdef KSSL_HAVE_SSL - return d->m_cert; -#endif -return 0; -} - -// pull in the callback. It's common across multiple files but we want -// it to be hidden. - -#include "ksslcallback.c" - - -bool KSSLCertificate::isValid(KSSLCertificate::KSSLPurpose p) { - return (validate(p) == KSSLCertificate::Ok); -} - - -bool KSSLCertificate::isValid() { - return isValid(KSSLCertificate::SSLServer); -} - - -int KSSLCertificate::purposeToOpenSSL(KSSLCertificate::KSSLPurpose p) const { -int rc = 0; -#ifdef KSSL_HAVE_SSL - if (p == KSSLCertificate::SSLServer) { - rc = X509_PURPOSE_SSL_SERVER; - } else if (p == KSSLCertificate::SSLClient) { - rc = X509_PURPOSE_SSL_CLIENT; - } else if (p == KSSLCertificate::SMIMEEncrypt) { - rc = X509_PURPOSE_SMIME_ENCRYPT; - } else if (p == KSSLCertificate::SMIMESign) { - rc = X509_PURPOSE_SMIME_SIGN; - } else if (p == KSSLCertificate::Any) { - rc = X509_PURPOSE_ANY; - } -#endif -return rc; -} - - -// For backward compatibility -KSSLCertificate::KSSLValidation KSSLCertificate::validate() { - return validate(KSSLCertificate::SSLServer); -} - -KSSLCertificate::KSSLValidation KSSLCertificate::validate(KSSLCertificate::KSSLPurpose purpose) -{ - KSSLValidationList result = validateVerbose(purpose); - if (result.isEmpty()) - return KSSLCertificate::Ok; - else - return result.first(); -} - -// -// See apps/verify.c in OpenSSL for the source of most of this logic. -// - -// CRL files? we don't do that yet -KSSLCertificate::KSSLValidationList KSSLCertificate::validateVerbose(KSSLCertificate::KSSLPurpose purpose) -{ - return validateVerbose(purpose, 0); -} - -KSSLCertificate::KSSLValidationList KSSLCertificate::validateVerbose(KSSLCertificate::KSSLPurpose purpose, KSSLCertificate *ca) -{ - KSSLValidationList errors; - if (ca || (d->_lastPurpose != purpose)) { - d->m_stateCached = false; - } - - if (!d->m_stateCached) - d->_lastPurpose = purpose; - -#ifdef KSSL_HAVE_SSL - X509_STORE *certStore; - X509_LOOKUP *certLookup; - X509_STORE_CTX *certStoreCTX; - int rc = 0; - - if (!d->m_cert) - { - errors << KSSLCertificate::Unknown; - return errors; - } - - if (d->m_stateCached) { - errors << d->m_stateCache; - return errors; - } - - TQStringList qsl = TDEGlobal::dirs()->resourceDirs("kssl"); - - if (qsl.isEmpty()) { - errors << KSSLCertificate::NoCARoot; - return errors; - } - - KSSLCertificate::KSSLValidation ksslv = Unknown; - - for (TQStringList::Iterator j = qsl.begin(); j != qsl.end(); ++j) { - struct stat sb; - TQString _j = (*j) + "ca-bundle.crt"; - if (-1 == stat(_j.ascii(), &sb)) { - continue; - } - - certStore = d->kossl->X509_STORE_new(); - if (!certStore) { - errors << KSSLCertificate::Unknown; - return errors; - } - - X509_STORE_set_verify_cb_func(certStore, X509Callback); - - certLookup = d->kossl->X509_STORE_add_lookup(certStore, d->kossl->X509_LOOKUP_file()); - if (!certLookup) { - ksslv = KSSLCertificate::Unknown; - d->kossl->X509_STORE_free(certStore); - continue; - } - - if (!d->kossl->X509_LOOKUP_load_file(certLookup, _j.ascii(), X509_FILETYPE_PEM)) { - // error accessing directory and loading pems - kdDebug(7029) << "KSSL couldn't read CA root: " - << _j << endl; - ksslv = KSSLCertificate::ErrorReadingRoot; - d->kossl->X509_STORE_free(certStore); - continue; - } - - // This is the checking code - certStoreCTX = d->kossl->X509_STORE_CTX_new(); - - // this is a bad error - could mean no free memory. - // This may be the wrong thing to do here - if (!certStoreCTX) { - kdDebug(7029) << "KSSL couldn't create an X509 store context." << endl; - d->kossl->X509_STORE_free(certStore); - continue; - } - - d->kossl->X509_STORE_CTX_init(certStoreCTX, certStore, d->m_cert, NULL); - if (d->_chain.isValid()) { - d->kossl->X509_STORE_CTX_set_chain(certStoreCTX, (STACK_OF(X509)*)d->_chain.rawChain()); - } - - //kdDebug(7029) << "KSSL setting CRL.............." << endl; - // int X509_STORE_add_crl(X509_STORE *ctx, X509_CRL *x); - - d->kossl->X509_STORE_CTX_set_purpose(certStoreCTX, purposeToOpenSSL(purpose)); - - KSSL_X509CallBack_ca = ca ? ca->d->m_cert : 0; - KSSL_X509CallBack_ca_found = false; - - certStoreCTX->error = X509_V_OK; - rc = d->kossl->X509_verify_cert(certStoreCTX); - int errcode = certStoreCTX->error; - if (ca && !KSSL_X509CallBack_ca_found) { - ksslv = KSSLCertificate::Irrelevant; - } else { - ksslv = processError(errcode); - } - // For servers, we can try NS_SSL_SERVER too - if ( (ksslv != KSSLCertificate::Ok) && - (ksslv != KSSLCertificate::Irrelevant) && - purpose == KSSLCertificate::SSLServer) { - d->kossl->X509_STORE_CTX_set_purpose(certStoreCTX, - X509_PURPOSE_NS_SSL_SERVER); - - certStoreCTX->error = X509_V_OK; - rc = d->kossl->X509_verify_cert(certStoreCTX); - errcode = certStoreCTX->error; - ksslv = processError(errcode); - } - d->kossl->X509_STORE_CTX_free(certStoreCTX); - d->kossl->X509_STORE_free(certStore); - // end of checking code - // - - //kdDebug(7029) << "KSSL Validation procedure RC: " - // << rc << endl; - //kdDebug(7029) << "KSSL Validation procedure errcode: " - // << errcode << endl; - //kdDebug(7029) << "KSSL Validation procedure RESULTS: " - // << ksslv << endl; - - if (ksslv != NoCARoot && ksslv != InvalidCA) { - d->m_stateCached = true; - d->m_stateCache = ksslv; - } - break; - } - - if (ksslv != KSSLCertificate::Ok) - errors << ksslv; -#else - errors << KSSLCertificate::NoSSL; -#endif - return errors; -} - - - -KSSLCertificate::KSSLValidation KSSLCertificate::revalidate() { - return revalidate(KSSLCertificate::SSLServer); -} - - -KSSLCertificate::KSSLValidation KSSLCertificate::revalidate(KSSLCertificate::KSSLPurpose p) { - d->m_stateCached = false; - return validate(p); -} - - -KSSLCertificate::KSSLValidation KSSLCertificate::processError(int ec) { -KSSLCertificate::KSSLValidation rc; - -rc = KSSLCertificate::Unknown; -#ifdef KSSL_HAVE_SSL - switch (ec) { - case X509_V_OK: // OK - rc = KSSLCertificate::Ok; - break; - - - case X509_V_ERR_CERT_REJECTED: - rc = KSSLCertificate::Rejected; - break; - - - case X509_V_ERR_CERT_UNTRUSTED: - rc = KSSLCertificate::Untrusted; - break; - - - case X509_V_ERR_UNABLE_TO_VERIFY_LEAF_SIGNATURE: - case X509_V_ERR_CERT_SIGNATURE_FAILURE: - case X509_V_ERR_CRL_SIGNATURE_FAILURE: - case X509_V_ERR_UNABLE_TO_DECRYPT_CERT_SIGNATURE: - case X509_V_ERR_UNABLE_TO_DECRYPT_CRL_SIGNATURE: - rc = KSSLCertificate::SignatureFailed; - break; - - case X509_V_ERR_INVALID_CA: - case X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT: - case X509_V_ERR_UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY: - case X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY: - rc = KSSLCertificate::InvalidCA; - break; - - - case X509_V_ERR_INVALID_PURPOSE: - rc = KSSLCertificate::InvalidPurpose; - break; - - - case X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT: - rc = KSSLCertificate::SelfSigned; - break; - - case X509_V_ERR_SELF_SIGNED_CERT_IN_CHAIN: - rc = KSSLCertificate::SelfSignedChain; - break; - - case X509_V_ERR_CERT_REVOKED: - rc = KSSLCertificate::Revoked; - break; - - case X509_V_ERR_PATH_LENGTH_EXCEEDED: - rc = KSSLCertificate::PathLengthExceeded; - break; - - case X509_V_ERR_CERT_NOT_YET_VALID: - case X509_V_ERR_CERT_HAS_EXPIRED: - case X509_V_ERR_CRL_NOT_YET_VALID: - case X509_V_ERR_CRL_HAS_EXPIRED: - case X509_V_ERR_ERROR_IN_CERT_NOT_BEFORE_FIELD: - case X509_V_ERR_ERROR_IN_CERT_NOT_AFTER_FIELD: - case X509_V_ERR_ERROR_IN_CRL_LAST_UPDATE_FIELD: - case X509_V_ERR_ERROR_IN_CRL_NEXT_UPDATE_FIELD: - rc = KSSLCertificate::Expired; - kdDebug(7029) << "KSSL apparently this is expired. Not after: " - << getNotAfter() << endl; - break; - - //case 1: - case X509_V_ERR_APPLICATION_VERIFICATION: - case X509_V_ERR_OUT_OF_MEM: - case X509_V_ERR_UNABLE_TO_GET_CRL: - case X509_V_ERR_CERT_CHAIN_TOO_LONG: - default: - rc = KSSLCertificate::Unknown; - break; -} - -d->m_stateCache = rc; -d->m_stateCached = true; -#endif -return rc; -} - - -TQString KSSLCertificate::getNotBefore() const { -#ifdef KSSL_HAVE_SSL -return ASN1_UTCTIME_QString(X509_get_notBefore(d->m_cert)); -#else -return TQString::null; -#endif -} - - -TQString KSSLCertificate::getNotAfter() const { -#ifdef KSSL_HAVE_SSL -return ASN1_UTCTIME_QString(X509_get_notAfter(d->m_cert)); -#else -return TQString::null; -#endif -} - - -TQDateTime KSSLCertificate::getQDTNotBefore() const { -#ifdef KSSL_HAVE_SSL -return ASN1_UTCTIME_QDateTime(X509_get_notBefore(d->m_cert), NULL); -#else -return TQDateTime::currentDateTime(); -#endif -} - - -TQDateTime KSSLCertificate::getQDTNotAfter() const { -#ifdef KSSL_HAVE_SSL -return ASN1_UTCTIME_QDateTime(X509_get_notAfter(d->m_cert), NULL); -#else -return TQDateTime::currentDateTime(); -#endif -} - - -int operator==(KSSLCertificate &x, KSSLCertificate &y) { -#ifndef KSSL_HAVE_SSL - return 1; -#else - if (!KOSSL::self()->X509_cmp(x.getCert(), y.getCert())) return 1; - return 0; -#endif -} - - -KSSLCertificate *KSSLCertificate::replicate() { -// The new certificate doesn't have the cached value. It's probably -// better this way. We can't anticipate every reason for doing this. -KSSLCertificate *newOne = new KSSLCertificate(); -#ifdef KSSL_HAVE_SSL - newOne->setCert(d->kossl->X509_dup(getCert())); - KSSLCertChain *c = d->_chain.replicate(); - newOne->setChain(c->rawChain()); - delete c; -#endif -return newOne; -} - - -TQString KSSLCertificate::toString() { -return KCodecs::base64Encode(toDer()); -} - - -TQString KSSLCertificate::verifyText(KSSLValidation x) { -switch (x) { -case KSSLCertificate::Ok: - return i18n("The certificate is valid."); -case KSSLCertificate::PathLengthExceeded: -case KSSLCertificate::ErrorReadingRoot: -case KSSLCertificate::NoCARoot: - return i18n("Certificate signing authority root files could not be found so the certificate is not verified."); -case KSSLCertificate::SelfSignedChain: -case KSSLCertificate::InvalidCA: - return i18n("Certificate signing authority is unknown or invalid."); -case KSSLCertificate::SelfSigned: - return i18n("Certificate is self-signed and thus may not be trustworthy."); -case KSSLCertificate::Expired: - return i18n("Certificate has expired."); -case KSSLCertificate::Revoked: - return i18n("Certificate has been revoked."); -case KSSLCertificate::NoSSL: - return i18n("SSL support was not found."); -case KSSLCertificate::Untrusted: - return i18n("Signature is untrusted."); -case KSSLCertificate::SignatureFailed: - return i18n("Signature test failed."); -case KSSLCertificate::Rejected: -case KSSLCertificate::InvalidPurpose: - return i18n("Rejected, possibly due to an invalid purpose."); -case KSSLCertificate::PrivateKeyFailed: - return i18n("Private key test failed."); -case KSSLCertificate::InvalidHost: - return i18n("The certificate has not been issued for this host."); -case KSSLCertificate::Irrelevant: - return i18n("This certificate is not relevant."); -default: -break; -} - -return i18n("The certificate is invalid."); -} - - -TQByteArray KSSLCertificate::toDer() { -TQByteArray qba; -#ifdef KSSL_HAVE_SSL -unsigned int certlen = d->kossl->i2d_X509(getCert(), NULL); -unsigned char *cert = new unsigned char[certlen]; -unsigned char *p = cert; - // FIXME: return code! - d->kossl->i2d_X509(getCert(), &p); - - // encode it into a QString - qba.duplicate((const char*)cert, certlen); - delete[] cert; -#endif -return qba; -} - - - -TQByteArray KSSLCertificate::toPem() { -TQByteArray qba; -TQString thecert = toString(); -const char *header = "-----BEGIN CERTIFICATE-----\n"; -const char *footer = "-----END CERTIFICATE-----\n"; - - // We just do base64 on the ASN1 - // 64 character lines (unpadded) - unsigned int xx = thecert.length() - 1; - for (unsigned int i = 0; i < xx/64; i++) { - thecert.insert(64*(i+1)+i, '\n'); - } - - thecert.prepend(header); - - if (thecert[thecert.length()-1] != '\n') - thecert += "\n"; - - thecert.append(footer); - - qba.duplicate(thecert.local8Bit(), thecert.length()); -return qba; -} - - -#define NETSCAPE_CERT_HDR "certificate" - -// what a piece of crap this is -TQByteArray KSSLCertificate::toNetscape() { -TQByteArray qba; -#ifdef KSSL_HAVE_SSL -#if OPENSSL_VERSION_NUMBER >= 0x10000000L - NETSCAPE_X509 nx; - ASN1_OCTET_STRING hdr; -#else - ASN1_HEADER ah; - ASN1_OCTET_STRING os; -#endif - KTempFile ktf; - -#if OPENSSL_VERSION_NUMBER >= 0x10000000L - hdr.data = (unsigned char *)NETSCAPE_CERT_HDR; - hdr.length = strlen(NETSCAPE_CERT_HDR); - nx.header = &hdr; - nx.cert = getCert(); - - d->kossl->ASN1_i2d_fp(ktf.fstream(),(unsigned char *)&nx); -#else - os.data = (unsigned char *)NETSCAPE_CERT_HDR; - os.length = strlen(NETSCAPE_CERT_HDR); - ah.header = &os; - ah.data = (char *)getCert(); - ah.meth = d->kossl->X509_asn1_meth(); - - d->kossl->ASN1_i2d_fp(ktf.fstream(),(unsigned char *)&ah); -#endif - - ktf.close(); - - TQFile qf(ktf.name()); - qf.open(IO_ReadOnly); - char *buf = new char[qf.size()]; - qf.readBlock(buf, qf.size()); - qba.duplicate(buf, qf.size()); - qf.close(); - delete[] buf; - - ktf.unlink(); - -#endif -return qba; -} - - - -TQString KSSLCertificate::toText() { -TQString text; -#ifdef KSSL_HAVE_SSL -KTempFile ktf; - - d->kossl->X509_print(ktf.fstream(), getCert()); - ktf.close(); - - TQFile qf(ktf.name()); - qf.open(IO_ReadOnly); - char *buf = new char[qf.size()+1]; - qf.readBlock(buf, qf.size()); - buf[qf.size()] = 0; - text = buf; - delete[] buf; - qf.close(); - ktf.unlink(); -#endif -return text; -} - -// KDE 4: Make it const TQString & -bool KSSLCertificate::setCert(TQString& cert) { -#ifdef KSSL_HAVE_SSL -TQByteArray qba, qbb = cert.local8Bit().copy(); - KCodecs::base64Decode(qbb, qba); - unsigned char *qbap = reinterpret_cast(qba.data()); - X509 *x5c = KOSSL::self()->d2i_X509(NULL, &qbap, qba.size()); - if (x5c) { - setCert(x5c); - return true; - } -#endif -return false; -} - - -KSSLX509V3& KSSLCertificate::x509V3Extensions() { -return d->_extensions; -} - - -bool KSSLCertificate::isSigner() { -return d->_extensions.certTypeCA(); -} - - -TQStringList KSSLCertificate::subjAltNames() const { - TQStringList rc; -#ifdef KSSL_HAVE_SSL - STACK_OF(GENERAL_NAME) *names; - names = (STACK_OF(GENERAL_NAME)*)d->kossl->X509_get_ext_d2i(d->m_cert, NID_subject_alt_name, 0, 0); - - if (!names) { - return rc; - } - - int cnt = d->kossl->sk_GENERAL_NAME_num(names); - - for (int i = 0; i < cnt; i++) { - const GENERAL_NAME *val = (const GENERAL_NAME *)d->kossl->sk_value(names, i); - if (val->type != GEN_DNS) { - continue; - } - - TQString s = (const char *)d->kossl->ASN1_STRING_data(val->d.ia5); - if (!s.isEmpty() && - /* skip subjectAltNames with embedded NULs */ - s.length() == d->kossl->ASN1_STRING_length(val->d.ia5)) { - rc += s; - } - } - d->kossl->sk_free(names); -#endif - return rc; -} - - -TQDataStream& operator<<(TQDataStream& s, const KSSLCertificate& r) { -TQStringList qsl; -TQPtrList cl = const_cast(r).chain().getChain(); - - for (KSSLCertificate *c = cl.first(); c != 0; c = cl.next()) { - qsl << c->toString(); - } - - cl.setAutoDelete(true); - - s << const_cast(r).toString() << qsl; - -return s; -} - - -TQDataStream& operator>>(TQDataStream& s, KSSLCertificate& r) { -TQStringList qsl; -TQString cert; - -s >> cert >> qsl; - - if (r.setCert(cert) && !qsl.isEmpty()) - r.chain().setCertChain(qsl); - -return s; -} - - - diff --git a/kio/kssl/ksslcertificate.h b/kio/kssl/ksslcertificate.h deleted file mode 100644 index 0c5f87323..000000000 --- a/kio/kssl/ksslcertificate.h +++ /dev/null @@ -1,376 +0,0 @@ -/* This file is part of the KDE project - * - * Copyright (C) 2000-2003 George Staikos - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library 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 - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public License - * along with this library; see the file COPYING.LIB. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - */ - -#ifndef _KSSLCERTIFICATE_H -#define _KSSLCERTIFICATE_H - - -// UPDATE: I like the structure of this class less and less every time I look -// at it. I think it needs to change. -// -// -// The biggest reason for making everything protected here is so that -// the class can have all it's methods available even if openssl is not -// available. Also, to create a new certificate you should use the -// KSSLCertificateFactory, and to manage the user's database of certificates, -// you should go through the KSSLCertificateHome. -// -// There should be no reason to touch the X509 stuff directly. -// - -#include -#include - -class TQString; -class TQStringList; -class TQCString; -class KSSL; -class KSSLCertificatePrivate; -class TQDateTime; -class KSSLCertChain; -class KSSLX509V3; - -#include - -#ifdef Q_WS_WIN -#include "ksslconfig_win.h" -#else -#include "ksslconfig.h" -#endif - -#ifdef KSSL_HAVE_SSL -typedef struct x509_st X509; -#else -class X509; -#endif - -/** - * KDE X.509 Certificate - * - * This class represents an X.509 (SSL) certificate. - * Note: this object is VERY HEAVY TO COPY. Please try to use reference - * or pointer whenever possible - * - * @author George Staikos - * @see KSSL - * @short KDE X.509 Certificate - */ -class TDEIO_EXPORT KSSLCertificate { -friend class KSSL; -friend class KSSLCertificateHome; -friend class KSSLCertificateFactory; -friend class KSSLCertificateCache; -friend class KSSLCertChain; -friend class KSSLPeerInfo; -friend class KSSLPKCS12; -friend class KSSLD; -friend class KSMIMECryptoPrivate; - - -public: - /** - * Destroy this X.509 certificate. - */ - ~KSSLCertificate(); - - /** - * Create an X.509 certificate from a base64 encoded string. - * @param cert the certificate in base64 form - * @return the X.509 certificate, or NULL - */ - static KSSLCertificate *fromString(TQCString cert); - - /** - * Create an X.509 certificate from the internal representation. - * This one duplicates the X509 object for itself. - * @param x5 the OpenSSL representation of the certificate - * @return the X.509 certificate, or NULL - * @internal - */ - static KSSLCertificate *fromX509(X509 *x5); - - /** - * A CA certificate can be validated as Irrelevant when it was - * not used to sign any other relevant certificate. - */ - enum KSSLValidation { Unknown, Ok, NoCARoot, InvalidPurpose, - PathLengthExceeded, InvalidCA, Expired, - SelfSigned, ErrorReadingRoot, NoSSL, - Revoked, Untrusted, SignatureFailed, - Rejected, PrivateKeyFailed, InvalidHost, - Irrelevant, SelfSignedChain - }; - - enum KSSLPurpose { None=0, SSLServer=1, SSLClient=2, - SMIMESign=3, SMIMEEncrypt=4, Any=5 }; - - typedef TQValueList KSSLValidationList; - - /** - * Convert this certificate to a string. - * @return the certificate in base64 format - */ - TQString toString(); - - /** - * Get the subject of the certificate (X.509 map). - * @return the subject - */ - TQString getSubject() const; - - /** - * Get the issuer of the certificate (X.509 map). - * @return the issuer - */ - TQString getIssuer() const; - - /** - * Get the date that the certificate becomes valid on. - * @return the date as a string, localised - */ - TQString getNotBefore() const; - - /** - * Get the date that the certificate is valid until. - * @return the date as a string, localised - */ - TQString getNotAfter() const; - - /** - * Get the date that the certificate becomes valid on. - * @return the date - */ - TQDateTime getQDTNotBefore() const; - - /** - * Get the date that the certificate is valid until. - * @return the date - */ - TQDateTime getQDTNotAfter() const; - - /** - * Convert the certificate to DER (ASN.1) format. - * @return the binary data of the DER encoding - */ - TQByteArray toDer(); - - /** - * Convert the certificate to PEM (base64) format. - * @return the binary data of the PEM encoding - */ - TQByteArray toPem(); - - /** - * Convert the certificate to Netscape format. - * @return the binary data of the Netscape encoding - */ - TQByteArray toNetscape(); - - /** - * Convert the certificate to OpenSSL plain text format. - * @return the OpenSSL text encoding - */ - TQString toText(); - - /** - * Get the serial number of the certificate. - * @return the serial number as a string - */ - TQString getSerialNumber() const; - - /** - * Get the key type (RSA, DSA, etc). - * @return the key type as a string - */ - TQString getKeyType() const; - - /** - * Get the public key. - * @return the public key as a hexidecimal string - */ - TQString getPublicKeyText() const; - - /** - * Get the MD5 digest of the certificate. - * Result is padded with : to separate bytes - it's a text version! - * @return the MD5 digest in a hexidecimal string - */ - TQString getMD5DigestText() const; - - /** - * Get the MD5 digest of the certificate. - * @return the MD5 digest in a hexidecimal string - */ - TQString getMD5Digest() const; - - /** - * Get the signature. - * @return the signature in text format - */ - TQString getSignatureText() const; - - /** - * Check if this is a valid certificate. Will use cached data. - * @return true if it is valid - */ - bool isValid(); - - /** - * Check if this is a valid certificate. Will use cached data. - * @param p the purpose to validate for - * @return true if it is valid - */ - bool isValid(KSSLPurpose p); - - /** - * The alternate subject name. - * @return string list with subjectAltName - */ - TQStringList subjAltNames() const; - - /** - * Check if this is a valid certificate. Will use cached data. - * @return the result of the validation - */ - KSSLValidation validate(); - - /** - * Check if this is a valid certificate. Will use cached data. - * @param p the purpose to validate for - * @return the result of the validation - */ - KSSLValidation validate(KSSLPurpose p); - - /** - * Check if this is a valid certificate. Will use cached data. - * @param p the purpose to validate for - * @return all problems encountered during validation - */ - KSSLValidationList validateVerbose(KSSLPurpose p); - - /** - * Check if the certificate ca is a proper CA for this - * certificate. - * @param p the purpose to validate for - * @param ca the certificate to check - * @return all problems encountered during validation - */ - KSSLValidationList validateVerbose(KSSLPurpose p, KSSLCertificate *ca); - - /** - * Check if this is a valid certificate. Will NOT use cached data. - * @return the result of the validation - */ - KSSLValidation revalidate(); - - /** - * Check if this is a valid certificate. Will NOT use cached data. - * @param p the purpose to validate for - * @return the result of the validation - */ - KSSLValidation revalidate(KSSLPurpose p); - - /** - * Get a reference to the certificate chain. - * @return reference to the chain - */ - KSSLCertChain& chain(); - - /** - * Obtain the localized message that corresponds to a validation result. - * @param x the code to look up - * @return the message text corresponding to the validation code - */ - static TQString verifyText(KSSLValidation x); - - /** - * Explicitly make a copy of this certificate. - * @return a copy of the certificate - */ - KSSLCertificate *replicate(); - - /** - * Copy constructor. Beware, this is very expensive. - * @param x the object to copy from - */ - KSSLCertificate(const KSSLCertificate& x); // copy constructor - - /** - * Re-set the certificate from a base64 string. - * @param cert the certificate to set to - * @return true on success - */ - bool setCert(TQString& cert); - - /** - * Access the X.509v3 parameters. - * @return reference to the extension object - * @see KSSLX509V3 - */ - KSSLX509V3& x509V3Extensions(); - - /** - * Check if this is a signer certificate. - * @return true if this is a signer certificate - */ - bool isSigner(); - - /** - * FIXME: document - */ - void getEmails(TQStringList& to) const; - - /** - * KDEKey is a concatenation "Subject (MD5)", mostly needed for SMIME. - * The result of getKDEKey might change and should not be used for - * persistant storage. - */ - TQString getKDEKey() const; - - /** - * Aegypten semantics force us to search by MD5Digest only. - */ - static TQString getMD5DigestFromKDEKey(const TQString& k); - -private: - TDEIO_EXPORT friend int operator!=(KSSLCertificate& x, KSSLCertificate& y); - TDEIO_EXPORT friend int operator==(KSSLCertificate& x, KSSLCertificate& y); - - KSSLCertificatePrivate *d; - int purposeToOpenSSL(KSSLPurpose p) const; - -protected: - KSSLCertificate(); - - void setCert(X509 *c); - void setChain(void *c); - X509 *getCert(); - KSSLValidation processError(int ec); -}; - -TDEIO_EXPORT TQDataStream& operator<<(TQDataStream& s, const KSSLCertificate& r); -TDEIO_EXPORT TQDataStream& operator>>(TQDataStream& s, KSSLCertificate& r); - -TDEIO_EXPORT int operator==(KSSLCertificate& x, KSSLCertificate& y); -TDEIO_EXPORT inline int operator!=(KSSLCertificate& x, KSSLCertificate& y) -{ return !(x == y); } - -#endif - diff --git a/kio/kssl/ksslcertificatecache.cc b/kio/kssl/ksslcertificatecache.cc deleted file mode 100644 index 2eecd66d6..000000000 --- a/kio/kssl/ksslcertificatecache.cc +++ /dev/null @@ -1,399 +0,0 @@ -/* This file is part of the KDE project - * - * Copyright (C) 2000, 2001 George Staikos - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library 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 - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public License - * along with this library; see the file COPYING.LIB. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - */ - - -#include "ksslcertificatecache.h" -#include "ksslcertchain.h" -#include "ksslcertificate.h" - -#include -#include -#include -#include - - -class KSSLCertificateCache::KSSLCertificateCachePrivate { - public: - DCOPClient *dcc; - - KSSLCertificateCachePrivate() { dcc = new DCOPClient; dcc->attach(); } - ~KSSLCertificateCachePrivate() { delete dcc;} - -}; - - - -KSSLCertificateCache::KSSLCertificateCache() { - d = new KSSLCertificateCachePrivate; -} - - -KSSLCertificateCache::~KSSLCertificateCache() { - delete d; -} - - -void KSSLCertificateCache::saveToDisk() { - kdDebug() << "Deprecated function KSSLCertificateCache::saveToDisk() called" << endl; -} - - -void KSSLCertificateCache::clearList() { - kdDebug() << "Deprecated function KSSLCertificateCache::clearList() called" << endl; -} - - -void KSSLCertificateCache::loadDefaultPolicies() { - kdDebug() << "Deprecated function KSSLCertificateCache::loadDefaultPolicies() called" << endl; -} - - -void KSSLCertificateCache::reload() { - TQByteArray data, retval; - TQCString rettype; - TQDataStream arg(data, IO_WriteOnly); - d->dcc->call("kded", "kssld", - "cacheReload()", - data, rettype, retval); -} - - -void KSSLCertificateCache::addCertificate(KSSLCertificate& cert, - KSSLCertificatePolicy policy, bool permanent) { - TQByteArray data, retval; - TQCString rettype; - TQDataStream arg(data, IO_WriteOnly); - arg << cert; - arg << policy; - arg << permanent; - d->dcc->call("kded", "kssld", - "cacheAddCertificate(KSSLCertificate,KSSLCertificateCache::KSSLCertificatePolicy,bool)", - data, rettype, retval); -} - - -// KDE 4: Make it const TQString & -KSSLCertificateCache::KSSLCertificatePolicy KSSLCertificateCache::getPolicyByCN(TQString& cn) { - TQByteArray data, retval; - TQCString rettype; - TQDataStream arg(data, IO_WriteOnly); - arg << cn; - bool rc = d->dcc->call("kded", "kssld", - "cacheGetPolicyByCN(TQString)", - data, rettype, retval); - - if (rc && rettype == "KSSLCertificateCache::KSSLCertificatePolicy") { - TQDataStream retStream(retval, IO_ReadOnly); - KSSLCertificateCache::KSSLCertificatePolicy drc; - retStream >> drc; - return drc; - } -return KSSLCertificateCache::Ambiguous; -} - - -KSSLCertificateCache::KSSLCertificatePolicy KSSLCertificateCache::getPolicyByCertificate(KSSLCertificate& cert) { - TQByteArray data, retval; - TQCString rettype; - TQDataStream arg(data, IO_WriteOnly); - arg << cert; - bool rc = d->dcc->call("kded", "kssld", - "cacheGetPolicyByCertificate(KSSLCertificate)", - data, rettype, retval); - - if (rc && rettype == "KSSLCertificateCache::KSSLCertificatePolicy") { - TQDataStream retStream(retval, IO_ReadOnly); - KSSLCertificateCache::KSSLCertificatePolicy drc; - retStream >> drc; - return drc; - } -return KSSLCertificateCache::Ambiguous; -} - - -// KDE 4: Make it const TQString & -bool KSSLCertificateCache::seenCN(TQString& cn) { - TQByteArray data, retval; - TQCString rettype; - TQDataStream arg(data, IO_WriteOnly); - arg << cn; - bool rc = d->dcc->call("kded", "kssld", - "cacheSeenCN(TQString)", - data, rettype, retval); - - if (rc && rettype == "bool") { - TQDataStream retStream(retval, IO_ReadOnly); - bool drc; - retStream >> drc; - return drc; - } - -return false; -} - - -bool KSSLCertificateCache::seenCertificate(KSSLCertificate& cert) { - TQByteArray data, retval; - TQCString rettype; - TQDataStream arg(data, IO_WriteOnly); - arg << cert; - bool rc = d->dcc->call("kded", "kssld", - "cacheSeenCertificate(KSSLCertificate)", - data, rettype, retval); - - if (rc && rettype == "bool") { - TQDataStream retStream(retval, IO_ReadOnly); - bool drc; - retStream >> drc; - return drc; - } - -return false; -} - - -bool KSSLCertificateCache::isPermanent(KSSLCertificate& cert) { - TQByteArray data, retval; - TQCString rettype; - TQDataStream arg(data, IO_WriteOnly); - arg << cert; - bool rc = d->dcc->call("kded", "kssld", - "cacheIsPermanent(KSSLCertificate)", - data, rettype, retval); - - if (rc && rettype == "bool") { - TQDataStream retStream(retval, IO_ReadOnly); - bool drc; - retStream >> drc; - return drc; - } - -return false; -} - - -// KDE 4: Make it const TQString & -bool KSSLCertificateCache::removeByCN(TQString& cn) { - TQByteArray data, retval; - TQCString rettype; - TQDataStream arg(data, IO_WriteOnly); - arg << cn; - bool rc = d->dcc->call("kded", "kssld", - "cacheRemoveByCN(TQString)", - data, rettype, retval); - - if (rc && rettype == "bool") { - TQDataStream retStream(retval, IO_ReadOnly); - bool drc; - retStream >> drc; - return drc; - } - -return false; -} - - -bool KSSLCertificateCache::removeByCertificate(KSSLCertificate& cert) { - TQByteArray data, retval; - TQCString rettype; - TQDataStream arg(data, IO_WriteOnly); - arg << cert; - bool rc = d->dcc->call("kded", "kssld", - "cacheRemoveByCertificate(KSSLCertificate)", - data, rettype, retval); - - if (rc && rettype == "bool") { - TQDataStream retStream(retval, IO_ReadOnly); - bool drc; - retStream >> drc; - return drc; - } - -return false; -} - - -// KDE 4: Make it const TQString & -bool KSSLCertificateCache::modifyByCN(TQString& cn, - KSSLCertificateCache::KSSLCertificatePolicy policy, - bool permanent, - TQDateTime& expires) { - TQByteArray data, retval; - TQCString rettype; - TQDataStream arg(data, IO_WriteOnly); - arg << cn << policy << permanent << expires; - bool rc = d->dcc->call("kded", "kssld", - "cacheModifyByCN(TQString,KSSLCertificateCache::KSSLCertificatePolicy,bool,TQDateTime)", - data, rettype, retval); - - if (rc && rettype == "bool") { - TQDataStream retStream(retval, IO_ReadOnly); - bool drc; - retStream >> drc; - return drc; - } - -return false; -} - - -bool KSSLCertificateCache::modifyByCertificate(KSSLCertificate& cert, - KSSLCertificateCache::KSSLCertificatePolicy policy, - bool permanent, - TQDateTime& expires) { - TQByteArray data, retval; - TQCString rettype; - TQDataStream arg(data, IO_WriteOnly); - arg << cert << policy << permanent << expires; - bool rc = d->dcc->call("kded", "kssld", - "cacheModifyByCertificate(KSSLCertificate,KSSLCertificateCache::KSSLCertificatePolicy,bool,TQDateTime)", - data, rettype, retval); - - if (rc && rettype == "bool") { - TQDataStream retStream(retval, IO_ReadOnly); - bool drc; - retStream >> drc; - return drc; - } - -return false; -} - - -TQStringList KSSLCertificateCache::getHostList(KSSLCertificate& cert) { - TQByteArray data, retval; - TQCString rettype; - TQDataStream arg(data, IO_WriteOnly); - arg << cert; - bool rc = d->dcc->call("kded", "kssld", - "cacheGetHostList(KSSLCertificate)", - data, rettype, retval); - - if (rc && rettype == TQSTRINGLIST_OBJECT_NAME_STRING) { - TQDataStream retStream(retval, IO_ReadOnly); - TQStringList drc; - retStream >> drc; - return drc; - } -return TQStringList(); -} - - -// KDE 4: Make it const TQString & -bool KSSLCertificateCache::addHost(KSSLCertificate& cert, TQString& host) { - TQByteArray data, retval; - TQCString rettype; - TQDataStream arg(data, IO_WriteOnly); - arg << cert << host; - bool rc = d->dcc->call("kded", "kssld", - "cacheAddHost(KSSLCertificate,TQString)", - data, rettype, retval); - - if (rc && rettype == "bool") { - TQDataStream retStream(retval, IO_ReadOnly); - bool drc; - retStream >> drc; - return drc; - } - -return false; -} - - -// KDE 4: Make it const TQString & -bool KSSLCertificateCache::removeHost(KSSLCertificate& cert, TQString& host) { - TQByteArray data, retval; - TQCString rettype; - TQDataStream arg(data, IO_WriteOnly); - arg << cert << host; - bool rc = d->dcc->call("kded", "kssld", - "cacheRemoveHost(KSSLCertificate,TQString)", - data, rettype, retval); - - if (rc && rettype == "bool") { - TQDataStream retStream(retval, IO_ReadOnly); - bool drc; - retStream >> drc; - return drc; - } - -return false; -} - - -TQStringList KSSLCertificateCache::getKDEKeyByEmail(const TQString &email) { - TQByteArray data, retval; - TQCString rettype; - TQDataStream arg(data, IO_WriteOnly); - arg << email; - bool rc = d->dcc->call("kded", "kssld", - "getKDEKeyByEmail(TQString)", - data, rettype, retval); - - if (rc && rettype == TQSTRINGLIST_OBJECT_NAME_STRING) { - TQDataStream retStream(retval, IO_ReadOnly); - TQStringList drc; - retStream >> drc; - return drc; - } - - return TQStringList(); -} - - -KSSLCertificate *KSSLCertificateCache::getCertByMD5Digest(const TQString &key) { - TQByteArray data, retval; - TQCString rettype; - TQDataStream arg(data, IO_WriteOnly); - arg << key; - bool rc = d->dcc->call("kded", "kssld", - "getCertByMD5Digest(TQString)", - data, rettype, retval); - - if (rc && rettype == "KSSLCertificate") { - TQDataStream retStream(retval, IO_ReadOnly); - KSSLCertificate *drc = new KSSLCertificate; - retStream >> *drc; - if (drc->getCert()) - return drc; - delete drc; // should not happen too often if used in conjunction with getKDEKeyByEmail - } - - return 0L; -} - - -TQDataStream& operator<<(TQDataStream& s, const KSSLCertificateCache::KSSLCertificatePolicy& p) { - s << (TQ_UINT32)p; -return s; -} - - -TQDataStream& operator>>(TQDataStream& s, KSSLCertificateCache::KSSLCertificatePolicy& p) { - TQ_UINT32 pd; - s >> pd; - p = (KSSLCertificateCache::KSSLCertificatePolicy) pd; - return s; -} - - - - - diff --git a/kio/kssl/ksslcertificatecache.h b/kio/kssl/ksslcertificatecache.h deleted file mode 100644 index 924cb0f54..000000000 --- a/kio/kssl/ksslcertificatecache.h +++ /dev/null @@ -1,107 +0,0 @@ -/* This file is part of the KDE project - * - * Copyright (C) 2000, 2001 George Staikos - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library 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 - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public License - * along with this library; see the file COPYING.LIB. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - */ - -#ifndef _INCLUDE_KSSLCCACHE_H -#define _INCLUDE_KSSLCCACHE_H - -class KSSLCertificate; -#include -#include -#include - -#include - -class TDEIO_EXPORT KSSLCertificateCache { -public: - -enum KSSLCertificatePolicy { Unknown, Reject, Accept, Prompt, Ambiguous }; -// Unknown: no policy has been set for this record -// Reject: user has requested to not accept data from this site -// Accept: user has requested to always accept data from this site -// Prompt: user wishes to be prompted before accepting this certificate -// You may need to set a [non-]permanent policy on this record after -// the user is prompted. -// Ambiguous: The state cannot be uniquely determined. Hopefully this -// doesn't happen. - - KSSLCertificateCache(); - ~KSSLCertificateCache(); - - void addCertificate(KSSLCertificate& cert, KSSLCertificatePolicy policy, - bool permanent = true); - - // WARNING! This is not a "secure" method. You need to actually - // do a getPolicyByCertificate to be cryptographically sure - // that this is an accepted certificate/site pair. - // (note that the site (CN) is encoded in the certificate - // so you should only accept certificates whose CN matches - // the exact FQDN of the site presenting it) - // If you're just doing an OpenSSL connection, I believe it - // tests this for you, but don't take my word for it. - KSSLCertificatePolicy getPolicyByCN(TQString& cn); - - KSSLCertificatePolicy getPolicyByCertificate(KSSLCertificate& cert); - - bool seenCN(TQString& cn); - bool seenCertificate(KSSLCertificate& cert); - - bool removeByCN(TQString& cn); - bool removeByCertificate(KSSLCertificate& cert); - - bool isPermanent(KSSLCertificate& cert); - - bool modifyByCN(TQString& cn, - KSSLCertificateCache::KSSLCertificatePolicy policy, - bool permanent, - TQDateTime& expires); - - bool modifyByCertificate(KSSLCertificate& cert, - KSSLCertificateCache::KSSLCertificatePolicy policy, - bool permanent, - TQDateTime& expires); - - TQStringList getHostList(KSSLCertificate& cert); - bool addHost(KSSLCertificate& cert, TQString& host); - bool removeHost(KSSLCertificate& cert, TQString& host); - - // SMIME - TQStringList getKDEKeyByEmail(const TQString &email); - KSSLCertificate *getCertByMD5Digest(const TQString &key); - - void reload(); - - // You shouldn't need to call this but in some weird circumstances - // it might be necessary. - void saveToDisk(); - -private: - class KSSLCertificateCachePrivate; - KSSLCertificateCachePrivate *d; - - void loadDefaultPolicies(); - void clearList(); - -}; - - -TDEIO_EXPORT TQDataStream& operator<<(TQDataStream& s, const KSSLCertificateCache::KSSLCertificatePolicy& p); -TDEIO_EXPORT TQDataStream& operator>>(TQDataStream& s, KSSLCertificateCache::KSSLCertificatePolicy& p); - -#endif diff --git a/kio/kssl/ksslcertificatefactory.cc b/kio/kssl/ksslcertificatefactory.cc deleted file mode 100644 index 66e272ced..000000000 --- a/kio/kssl/ksslcertificatefactory.cc +++ /dev/null @@ -1,122 +0,0 @@ -/* This file is part of the KDE project - * - * Copyright (C) 2000 George Staikos - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library 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 - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public License - * along with this library; see the file COPYING.LIB. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - */ - -#include -#include -#include - -//#include - -KSSLCertificate* -KSSLCertificateFactory::generateSelfSigned(KSSLKeyType /*keytype*/) { -#if 0 - //#ifdef KSSL_HAVE_SSL - X509_NAME *x509name = X509_NAME_new(); - X509 *x509; - ASN1_UTCTIME *beforeafter; - KSSLCertificate *newcert; - int rc; - - // FIXME: generate the private key - if (keytype == KEYTYPE_UNKNOWN || (key=EVP_PKEY_new()) == NULL) { - X509_NAME_free(x509name); - return NULL; - } - - switch(keytype) { - case KEYTYPE_RSA: - if (!EVP_PKEY_assign_RSA(key, RSA_generate_key(newkey,0x10001, - req_cb,bio_err))) { - - } - break; - case KEYTYPE_DSA: - if (!DSA_generate_key(dsa_params)) goto end; - if (!EVP_PKEY_assign_DSA(pkey,dsa_params)) goto end; - dsa_params=NULL; - if (pkey->type == EVP_PKEY_DSA) - digest=EVP_dss1(); - break; - } - - // FIXME: dn doesn't exist - // FIXME: allow the notAfter value to be parameterized - // FIXME: allow a password to lock the key with - - // Fill in the certificate - X509_NAME_add_entry_by_NID(x509name, OBJ_txt2nid("CN"), 0x1001, - (unsigned char *) dn, -1, -1, 0); - - x509 = X509_new(); - rc = X509_set_issuer_name(x509, x509name); - if (rc != 0) { - X509_free(x509); - X509_NAME_free(x509name); - return NULL; - } - rc = X509_set_subject_name(x509, x509name); - if (rc != 0) { - X509_free(x509); - X509_NAME_free(x509name); - return NULL; - } - ASN1_INTEGER_set(X509_get_serialNumber(*x509), 0); - - X509_NAME_free(x509name); - - // Make it a 1 year certificate - beforeafter = ASN1_UTCTIME_new(); - if (!X509_gmtime_adj(beforeafter, -60*60*24)) { // yesterday - X509_free(x509); - return NULL; - } - if (!X509_set_notBefore(x509, beforeafter)) { - X509_free(x509); - return NULL; - } - if (!X509_gmtime_adj(beforeafter, 60*60*24*364)) { // a year from yesterday - X509_free(x509); - return NULL; - } - if (!X509_set_notAfter(x509, beforeafter)) { - X509_free(x509); - return NULL; - } - ASN1_UTCTIME_free(beforeafter); - - if (!X509_set_pubkey(x509, key)) { - X509_free(x509); - return NULL; - } - - rc = X509_sign(x509, key, EVP_sha1()); - if (rc != 0) { - X509_free(x509); - return NULL; - } - - newCert = new KSSLCertificate; - newCert->setCert(x509); - return newCert; -#else - return NULL; -#endif -} - diff --git a/kio/kssl/ksslcertificatefactory.h b/kio/kssl/ksslcertificatefactory.h deleted file mode 100644 index 503c591a7..000000000 --- a/kio/kssl/ksslcertificatefactory.h +++ /dev/null @@ -1,50 +0,0 @@ -/* This file is part of the KDE project - * - * Copyright (C) 2000 George Staikos - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library 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 - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public License - * along with this library; see the file COPYING.LIB. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - */ - -// WARNING: THIS CODE IS INCOMPLETE AND MAY CHANGE WITHOUT NOTICE - -#ifndef _KSSLCERTIFICATEFACTORY_H -#define _KSSLCERTIFICATEFACTORY_H - -#include - -class KSSLCertificate; - -typedef enum {KEYTYPE_UNKNOWN, KEYTYPE_RSA, KEYTYPE_DSA} KSSLKeyType; - -class TDEIO_EXPORT KSSLCertificateFactory { - -public: - - static KSSLCertificate* generateSelfSigned(KSSLKeyType keytype); - // static KSSLCertificate* generateSigned(); - // static bool generateRequest(); - -private: - - class KSSLCertificateFactoryPrivate; - KSSLCertificateFactoryPrivate *d; - -protected: - -}; - -#endif - diff --git a/kio/kssl/ksslcertificatehome.cc b/kio/kssl/ksslcertificatehome.cc deleted file mode 100644 index 39470c5ab..000000000 --- a/kio/kssl/ksslcertificatehome.cc +++ /dev/null @@ -1,246 +0,0 @@ -/* This file is part of the KDE project - * - * Copyright (C) 2000-2005 George Staikos - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library 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 - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public License - * along with this library; see the file COPYING.LIB. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - */ - -#include -#include -#include - -#include -#include - -using namespace KNetwork; - -TQStringList KSSLCertificateHome::getCertificateList() { -KSimpleConfig cfg("ksslcertificates", false); -TQStringList list = cfg.groupList(); -TQString defaultstr(""); -TQString blankstr(""); - -list.remove(defaultstr); -list.remove(blankstr); - -return list; -} - - -// KDE 4: make it const TQString & -void KSSLCertificateHome::setDefaultCertificate(TQString name, TQString host, bool send, bool prompt) { -KSimpleConfig cfg("ksslauthmap", false); - -#ifdef Q_WS_WIN //temporary - cfg.setGroup(host); -#else - cfg.setGroup(KResolver::domainToAscii(host)); -#endif - cfg.writeEntry("certificate", name); - cfg.writeEntry("send", send); - cfg.writeEntry("prompt", prompt); - cfg.sync(); -} - - -// KDE 4: make it const TQString & -void KSSLCertificateHome::setDefaultCertificate(KSSLPKCS12 *cert, TQString host, bool send, bool prompt) { - if (cert) - KSSLCertificateHome::setDefaultCertificate(cert->name(), host, send, prompt); -} - - -// KDE 4: make it const TQString & -bool KSSLCertificateHome::addCertificate(TQString filename, TQString password, bool storePass) { -KSSLPKCS12 *pkcs = KSSLPKCS12::loadCertFile(filename, password); - - if (!pkcs) return false; - - KSSLCertificateHome::addCertificate(pkcs, storePass?password:TQString("")); - delete pkcs; - -return true; -} - - -// KDE 4: make it const TQString & -bool KSSLCertificateHome::addCertificate(KSSLPKCS12 *cert, TQString passToStore) { - if (!cert) return false; - -KSimpleConfig cfg("ksslcertificates", false); - - cfg.setGroup(cert->name()); - cfg.writeEntry("PKCS12Base64", cert->toString()); - cfg.writeEntry("Password", passToStore); - cfg.sync(); -return true; -} - -bool KSSLCertificateHome::deleteCertificate(const TQString &filename, const TQString &password) { -KSSLPKCS12 *pkcs = KSSLPKCS12::loadCertFile(filename, password); - - if (!pkcs) return false; - - bool ok = deleteCertificate(pkcs); - delete pkcs; - -return ok; -} - -bool KSSLCertificateHome::deleteCertificate(KSSLPKCS12 *cert) { - if (!cert) return false; - - return deleteCertificateByName(cert->name()); -} - -bool KSSLCertificateHome::deleteCertificateByName(const TQString &name) { - if (name.isEmpty()) return false; - -KSimpleConfig cfg("ksslcertificates", false); - - bool ok = cfg.deleteGroup(name); - cfg.sync(); - -return ok; -} - -// KDE 4: make it const TQString & -KSSLPKCS12* KSSLCertificateHome::getCertificateByName(TQString name, TQString password) { -KSimpleConfig cfg("ksslcertificates", false); - if (!cfg.hasGroup(name)) return NULL; - - cfg.setGroup(name); - - return KSSLPKCS12::fromString(cfg.readEntry("PKCS12Base64", ""), password); -} - - -// KDE 4: make it const TQString & -KSSLPKCS12* KSSLCertificateHome::getCertificateByName(TQString name) { -KSimpleConfig cfg("ksslcertificates", false); - if (!cfg.hasGroup(name)) return NULL; - - cfg.setGroup(name); - - return KSSLPKCS12::fromString(cfg.readEntry("PKCS12Base64", ""), cfg.readEntry("Password", "")); -} - - -// KDE 4: make it const TQString & -bool KSSLCertificateHome::hasCertificateByName(TQString name) { -KSimpleConfig cfg("ksslcertificates", false); - if (!cfg.hasGroup(name)) return false; - return true; -} - -// KDE 4: make it const TQString & -KSSLPKCS12* KSSLCertificateHome::getCertificateByHost(TQString host, TQString password, KSSLAuthAction *aa) { - return KSSLCertificateHome::getCertificateByName(KSSLCertificateHome::getDefaultCertificateName(host, aa), password); -} - - -// KDE 4: make it const TQString & -TQString KSSLCertificateHome::getDefaultCertificateName(TQString host, KSSLAuthAction *aa) { -KSimpleConfig cfg("ksslauthmap", false); - -#ifdef Q_WS_WIN //temporary - if (!cfg.hasGroup(host)) { -#else - if (!cfg.hasGroup(KResolver::domainToAscii(host))) { -#endif - if (aa) *aa = AuthNone; - return TQString::null; - } else { -#ifdef Q_WS_WIN //temporary - cfg.setGroup(host); -#else - cfg.setGroup(KResolver::domainToAscii(host)); -#endif - if (aa) { - bool tmp = cfg.readBoolEntry("send", false); - *aa = AuthSend; - if (!tmp) { - tmp = cfg.readBoolEntry("prompt", false); - *aa = AuthPrompt; - if (!tmp) { - *aa = AuthDont; - } - } - } - return cfg.readEntry("certificate", ""); - } -} - - -TQString KSSLCertificateHome::getDefaultCertificateName(KSSLAuthAction *aa) { -TDEConfig cfg("cryptodefaults", false); - - cfg.setGroup("Auth"); - if (aa) { - TQString am = cfg.readEntry("AuthMethod", ""); - if (am == "send") - *aa = AuthSend; - else if (am == "prompt") - *aa = AuthPrompt; - else - *aa = AuthDont; - } - -return cfg.readEntry("DefaultCert", ""); -} - - -// KDE 4: make it const TQString & -KSSLPKCS12* KSSLCertificateHome::getDefaultCertificate(TQString password, KSSLAuthAction *aa) { -TQString name = KSSLCertificateHome::getDefaultCertificateName(aa); -KSimpleConfig cfg("ksslcertificates", false); - - if (name.isEmpty()) return NULL; - - cfg.setGroup(name); - return KSSLPKCS12::fromString(cfg.readEntry("PKCS12Base64", ""), password); -} - - - -KSSLPKCS12* KSSLCertificateHome::getDefaultCertificate(KSSLAuthAction *aa) { -TQString name = KSSLCertificateHome::getDefaultCertificateName(aa); -KSimpleConfig cfg("ksslcertificates", false); - - if (name.isEmpty()) return NULL; - - cfg.setGroup(name); - return KSSLPKCS12::fromString(cfg.readEntry("PKCS12Base64", ""), - cfg.readEntry("Password", "")); -} - - -// KDE 4: make it const TQString & -void KSSLCertificateHome::setDefaultCertificate(TQString name, bool send, bool prompt) { -KSimpleConfig cfg("ksslauthmap", false); - - cfg.setGroup(""); - cfg.writeEntry("defaultCertificate", name); - cfg.writeEntry("send", send); - cfg.writeEntry("prompt", prompt); -} - - -void KSSLCertificateHome::setDefaultCertificate(KSSLPKCS12 *cert, bool send, bool prompt) { - if (cert) - KSSLCertificateHome::setDefaultCertificate(cert->name(), send, prompt); -} - diff --git a/kio/kssl/ksslcertificatehome.h b/kio/kssl/ksslcertificatehome.h deleted file mode 100644 index f8a18a423..000000000 --- a/kio/kssl/ksslcertificatehome.h +++ /dev/null @@ -1,90 +0,0 @@ -/* This file is part of the KDE project - * - * Copyright (C) 2000-2003 George Staikos - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library 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 - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public License - * along with this library; see the file COPYING.LIB. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - */ - -#ifndef _KSSLCERTIFICATEHOME_H -#define _KSSLCERTIFICATEHOME_H - -class KSSLCertificate; -class KSSLPKCS12; -#include -#include - -#include - -class TDEIO_EXPORT KSSLCertificateHome { - -public: - - // AuthNone means there is no policy. AuthDont means _don't_ _send_!! - enum KSSLAuthAction {AuthNone, AuthSend, AuthPrompt, AuthDont}; - /* - * These methods might dynamically allocate an object for you. Be sure - * to delete them when you are done. - */ - static KSSLPKCS12* getCertificateByHost(TQString host, TQString password, KSSLAuthAction* aa); - static KSSLPKCS12* getCertificateByName(TQString name, TQString password); - static KSSLPKCS12* getCertificateByName(TQString name); - static TQString getDefaultCertificateName(TQString host, KSSLAuthAction *aa = NULL); - static TQString getDefaultCertificateName(KSSLAuthAction *aa = NULL); - static KSSLPKCS12* getDefaultCertificate(TQString password, KSSLAuthAction *aa = NULL); - static KSSLPKCS12* getDefaultCertificate(KSSLAuthAction *aa = NULL); - static bool hasCertificateByName(TQString name); - - - /* - * These set the default certificate for hosts without a policy. - */ - static void setDefaultCertificate(TQString name, bool send = true, bool prompt = false); - static void setDefaultCertificate(KSSLPKCS12 *cert, bool send = true, bool prompt = false); - - - /* - * These set the default certificate for a host. - */ - static void setDefaultCertificate(TQString name, TQString host, bool send = true, bool prompt = false); - static void setDefaultCertificate(KSSLPKCS12 *cert, TQString host, bool send = true, bool prompt = false); - - /* - * These add a certificate to the repository. - * Returns: true on success, false error - */ - static bool addCertificate(TQString filename, TQString password, bool storePass = false); - static bool addCertificate(KSSLPKCS12 *cert, TQString passToStore = TQString::null); - - /* - * These deletes a certificate from the repository. - * Returns: true on success, false error - */ - static bool deleteCertificate(const TQString &filename, const TQString &password); - static bool deleteCertificate(KSSLPKCS12 *cert); - static bool deleteCertificateByName(const TQString &name); - - /* - * Returns the list of certificates available - */ - static TQStringList getCertificateList(); - -private: - class KSSLCertificateHomePrivate; - KSSLCertificateHomePrivate *d; -}; - -#endif - diff --git a/kio/kssl/ksslconfig.h.cmake b/kio/kssl/ksslconfig.h.cmake deleted file mode 100644 index 1be6bbba4..000000000 --- a/kio/kssl/ksslconfig.h.cmake +++ /dev/null @@ -1,26 +0,0 @@ -/* This file is part of the KDE project - * - * Copyright (C) 2002 George Staikos - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library 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 - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public License - * along with this library; see the file COPYING.LIB. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - */ - -#ifndef KSSLCONFIG_H -#define KSSLCONFIG_H - -#cmakedefine KSSL_HAVE_SSL 1 - -#endif diff --git a/kio/kssl/ksslconfig.h.in b/kio/kssl/ksslconfig.h.in deleted file mode 100644 index c078298ec..000000000 --- a/kio/kssl/ksslconfig.h.in +++ /dev/null @@ -1,26 +0,0 @@ -/* This file is part of the KDE project - * - * Copyright (C) 2002 George Staikos - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library 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 - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public License - * along with this library; see the file COPYING.LIB. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - */ - -#ifndef KSSLCONFIG_H -#define KSSLCONFIG_H - -#undef KSSL_HAVE_SSL - -#endif diff --git a/kio/kssl/ksslconfig_win.h b/kio/kssl/ksslconfig_win.h deleted file mode 100644 index c078298ec..000000000 --- a/kio/kssl/ksslconfig_win.h +++ /dev/null @@ -1,26 +0,0 @@ -/* This file is part of the KDE project - * - * Copyright (C) 2002 George Staikos - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library 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 - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public License - * along with this library; see the file COPYING.LIB. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - */ - -#ifndef KSSLCONFIG_H -#define KSSLCONFIG_H - -#undef KSSL_HAVE_SSL - -#endif diff --git a/kio/kssl/ksslconnectioninfo.cc b/kio/kssl/ksslconnectioninfo.cc deleted file mode 100644 index ccc7fc780..000000000 --- a/kio/kssl/ksslconnectioninfo.cc +++ /dev/null @@ -1,66 +0,0 @@ -/* This file is part of the KDE project - * - * Copyright (C) 2000 George Staikos - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library 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 - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public License - * along with this library; see the file COPYING.LIB. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - */ - -#include "ksslconnectioninfo.h" - - -KSSLConnectionInfo::KSSLConnectionInfo() { - clean(); -} - - -KSSLConnectionInfo::~KSSLConnectionInfo() { - -} - - -void KSSLConnectionInfo::clean() { - m_iCipherUsedBits = 0; - m_iCipherBits = 0; - m_cipherName = ""; -} - - -const TQString& KSSLConnectionInfo::getCipherVersion() const { - return m_cipherVersion; -} - - -const TQString& KSSLConnectionInfo::getCipherDescription() const { - return m_cipherDescription; -} - - -const TQString& KSSLConnectionInfo::getCipher() const { - return m_cipherName; -} - - -int KSSLConnectionInfo::getCipherUsedBits() const { - return m_iCipherUsedBits; -} - - -int KSSLConnectionInfo::getCipherBits() const { - return m_iCipherBits; -} - - - diff --git a/kio/kssl/ksslconnectioninfo.h b/kio/kssl/ksslconnectioninfo.h deleted file mode 100644 index 09fd5cdae..000000000 --- a/kio/kssl/ksslconnectioninfo.h +++ /dev/null @@ -1,95 +0,0 @@ -/* This file is part of the KDE project - * - * Copyright (C) 2000-2003 George Staikos - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library 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 - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public License - * along with this library; see the file COPYING.LIB. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - */ - -#ifndef _KSSLCONNECTIONINFO_H -#define _KSSLCONNECTIONINFO_H - -#include - -#include - -class KSSL; - -/** - * KDE SSL Connection Information - * - * This class contains the information about an SSL connection. It is - * generally referenced through KSSL. - * - * @author George Staikos - * @see KSSL - * @short KDE SSL Connection Information - */ -class TDEIO_EXPORT KSSLConnectionInfo { -friend class KSSL; -public: - /** - * Destroy this object. - */ - ~KSSLConnectionInfo(); - - /** - * Get the cipher in use. - * @return the cipher in use - */ - const TQString& getCipher() const; - - /** - * Describe the cipher in use. - * @return the cipher description (from OpenSSL) - */ - const TQString& getCipherDescription() const; - - /** - * Get the version of the cipher in use. - * @return the version of the cipher - */ - const TQString& getCipherVersion() const; - - /** - * Get the number of bits of the cipher that are actually used. - * @return the number of bits in use - */ - int getCipherUsedBits() const; - - /** - * Get bit-size of the cipher - * @return the number of bits - */ - int getCipherBits() const; - -protected: - KSSLConnectionInfo(); - void clean(); - - // These are here so KSSL can access them directly - // It's just as easy as making accessors - they're friends afterall! - int m_iCipherUsedBits, m_iCipherBits; - TQString m_cipherName; - TQString m_cipherDescription; - TQString m_cipherVersion; - -private: - class KSSLConnectionInfoPrivate; - KSSLConnectionInfoPrivate *d; -}; - -#endif - diff --git a/kio/kssl/ksslcsessioncache.cc b/kio/kssl/ksslcsessioncache.cc deleted file mode 100644 index d39638717..000000000 --- a/kio/kssl/ksslcsessioncache.cc +++ /dev/null @@ -1,120 +0,0 @@ -/* This file is part of the KDE project - * - * Copyright (C) 2003 Stefan Rompf - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library 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 - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public License - * along with this library; see the file COPYING.LIB. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - */ - -#include -#include -#include - -#include -#include -#include - -#ifdef Q_WS_WIN -#include "ksslconfig_win.h" -#else -#include "ksslconfig.h" -#endif - -#include "ksslcsessioncache.h" - -/* - * Operation: - * - * Sessions will be stored per running application, not KDE - * wide, to avoid security problems with hostile programs - * that negotiate sessions with weak cryptographic keys and store - * them for everybody to use - I really don't want that. - * - * Retrieval is organised similiar to George's thoughts in the KSSLD - * certificate cache: The cache is organised as a list, with the - * recently fetched (or stored) session first. - * - * The cache has an artificial limit of 32 sessions (should really - * be enough), and relies on the peer server for timeouts - * - */ -#define MAX_ENTRIES 32 - -#ifdef KSSL_HAVE_SSL - -typedef QPair KSSLCSession; -typedef TQPtrList KSSLCSessions; - -static KSSLCSessions *sessions = 0L; -static KStaticDeleter med; - - -static TQString URLtoKey(const KURL &kurl) { - return kurl.host() + ":" + kurl.protocol() + ":" + TQString::number(kurl.port()); -} - - -static void setup() { - KSSLCSessions *ses = new KSSLCSessions; - ses->setAutoDelete(true); - med.setObject(sessions, ses); -} - -#endif - -TQString KSSLCSessionCache::getSessionForURL(const KURL &kurl) { -#ifdef KSSL_HAVE_SSL - if (!sessions) return TQString::null; - TQString key = URLtoKey(kurl); - - for(KSSLCSession *it = sessions->first(); it; it=sessions->next()) { - if (it->first == key) { - sessions->take(); - sessions->prepend(it); - return it->second; - } - } - - // Negative caching disabled: cache pollution -#if 0 - kdDebug(7029) <<"Negative caching " <count() >= MAX_ENTRIES) sessions->removeLast(); - sessions->prepend(new KSSLCSession(key, TQString::null)); -#endif - -#endif - return TQString::null; -} - - -void KSSLCSessionCache::putSessionForURL(const KURL &kurl, const TQString &session) { -#ifdef KSSL_HAVE_SSL - if (!sessions) setup(); - TQString key = URLtoKey(kurl); - KSSLCSession *it; - - for(it = sessions->first(); it && it->first != key; it=sessions->next()); - - if (it) { - sessions->take(); - it->second = session; - } else { - it = new KSSLCSession(key, session); - if (sessions->count() >= MAX_ENTRIES) sessions->removeLast(); - } - - sessions->prepend(it); -#endif -} diff --git a/kio/kssl/ksslcsessioncache.h b/kio/kssl/ksslcsessioncache.h deleted file mode 100644 index 9badfe279..000000000 --- a/kio/kssl/ksslcsessioncache.h +++ /dev/null @@ -1,47 +0,0 @@ -/* This file is part of the KDE project - * - * Copyright (C) 2003 Stefan Rompf - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library 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 - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public License - * along with this library; see the file COPYING.LIB. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - */ - -#ifndef __KSSLCSESSIONCACHE_H -#define __KSSLCSESSIONCACHE_H - -#include - -class KURL; -class TQString; - -class TDEIO_EXPORT KSSLCSessionCache { - public: - - /** - * Store a SSL session (client side only) - * @param kurl URL the key belongs to. Method, host and port are used - * @param session TQString representing session to store - */ - static void putSessionForURL(const KURL &kurl, const TQString &session); - - /** - * Retrieve a SSL session (client side only) - * @param kurl URL the key belongs to - * @return if a key can be found, TQString::null otherwise - */ - static TQString getSessionForURL(const KURL &kurl); -}; - -#endif diff --git a/kio/kssl/kssldefs.h b/kio/kssl/kssldefs.h deleted file mode 100644 index c33664b14..000000000 --- a/kio/kssl/kssldefs.h +++ /dev/null @@ -1,37 +0,0 @@ -/* This file is part of the KDE project - * - * Copyright (C) 2000-2003 George Staikos - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library 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 - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public License - * along with this library; see the file COPYING.LIB. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - */ -#ifndef __kssldefs_h -#define __kssldefs_h - -#ifdef Q_WS_WIN -#include "ksslconfig_win.h" -#else -#include "ksslconfig.h" -#endif - -#ifdef HAVE_OLD_SSL_API -#define OPENSSL_malloc Malloc -#define OPENSSL_malloc_locked Malloc_locked -#define OPENSSL_realloc Realloc -#define OPENSSL_free Free -#endif - -#endif - diff --git a/kio/kssl/ksslinfodlg.cc b/kio/kssl/ksslinfodlg.cc deleted file mode 100644 index c6f76a190..000000000 --- a/kio/kssl/ksslinfodlg.cc +++ /dev/null @@ -1,463 +0,0 @@ -/* This file is part of the KDE project - * - * Copyright (C) 2000,2001 George Staikos - * Copyright (C) 2000 Malte Starostik - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library 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 - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public License - * along with this library; see the file COPYING.LIB. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - */ - -#include "ksslinfodlg.h" - -#include - -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -//#include -//#include -#include -#include "ksslcertificate.h" -#include "ksslcertchain.h" -#include "ksslsigners.h" - - -class KSSLInfoDlg::KSSLInfoDlgPrivate { - private: - friend class KSSLInfoDlg; - bool m_secCon; - TQGridLayout *m_layout; - KComboBox *_chain; - KSSLCertificate *_cert; - KSSLCertificate::KSSLValidationList _cert_ksvl; - - bool inQuestion; - - TQLabel *_serialNum; - TQLabel *_csl; - TQLabel *_validFrom; - TQLabel *_validUntil; - TQLabel *_digest; - - TQLabel *pixmap; - TQLabel *info; - - KSSLCertBox *_subject, *_issuer; -}; - - - -KSSLInfoDlg::KSSLInfoDlg(bool secureConnection, TQWidget *parent, const char *name, bool modal) - : KDialog(parent, name, modal, (WFlags)TQt::WDestructiveClose), d(new KSSLInfoDlgPrivate) { - TQVBoxLayout *topLayout = new TQVBoxLayout(this, KDialog::marginHint(), KDialog::spacingHint()); - d->m_secCon = secureConnection; - d->m_layout = new TQGridLayout(topLayout, 3, 3, KDialog::spacingHint()); - d->m_layout->setColStretch(1, 1); - d->m_layout->setColStretch(2, 1); - - d->pixmap = new TQLabel(this); - d->m_layout->addWidget(d->pixmap, 0, 0); - - d->info = new TQLabel(this); - d->m_layout->addWidget(d->info, 0, 1); - - if (KSSL::doesSSLWork()) { - if (d->m_secCon) { - d->pixmap->setPixmap(BarIcon("encrypted")); - d->info->setText(i18n("Current connection is secured with SSL.")); - } else { - d->pixmap->setPixmap(BarIcon("decrypted")); - d->info->setText(i18n("Current connection is not secured with SSL.")); - } - } else { - d->pixmap->setPixmap(BarIcon("decrypted")); - d->info->setText(i18n("SSL support is not available in this build of TDE.")); - } - d->m_layout->addRowSpacing( 0, 50 ); // give minimum height to look better - - TQHBoxLayout *buttonLayout = new TQHBoxLayout(topLayout, KDialog::spacingHint()); - buttonLayout->addStretch( 1 ); - - KPushButton *button; - - if (KSSL::doesSSLWork()) { - button = new KPushButton(KGuiItem(i18n("C&ryptography Configuration..."),"configure"), this); - connect(button, TQT_SIGNAL(clicked()), TQT_SLOT(launchConfig())); - buttonLayout->addWidget( button ); - } - - button = new KPushButton(KStdGuiItem::close(), this); - connect(button, TQT_SIGNAL(clicked()), TQT_SLOT(close())); - buttonLayout->addWidget( button ); - - button->setFocus(); - - setCaption(i18n("TDE SSL Information")); - d->inQuestion = false; - } - - -KSSLInfoDlg::~KSSLInfoDlg() { - delete d; -} - -void KSSLInfoDlg::launchConfig() { - TDEProcess p; - p << "kcmshell" << "crypto"; - p.start(TDEProcess::DontCare); -} - - -void KSSLInfoDlg::setSecurityInQuestion(bool isIt) { - d->inQuestion = isIt; - if (KSSL::doesSSLWork()) - if (isIt) { - d->pixmap->setPixmap(BarIcon("halfencrypted")); - if (d->m_secCon) { - d->info->setText(i18n("The main part of this document is secured with SSL, but some parts are not.")); - } else { - d->info->setText(i18n("Some of this document is secured with SSL, but the main part is not.")); - } - } else { - if (d->m_secCon) { - d->pixmap->setPixmap(BarIcon("encrypted")); - d->info->setText(i18n("Current connection is secured with SSL.")); - } else { - d->pixmap->setPixmap(BarIcon("decrypted")); - d->info->setText(i18n("Current connection is not secured with SSL.")); - } - } -} - - -void KSSLInfoDlg::setup( KSSL & ssl, const TQString & ip, const TQString & url ) -{ - setup( - &ssl.peerInfo().getPeerCertificate(), - ip, - url, - ssl.connectionInfo().getCipher(), - ssl.connectionInfo().getCipherDescription(), - ssl.connectionInfo().getCipherVersion(), - ssl.connectionInfo().getCipherUsedBits(), - ssl.connectionInfo().getCipherBits(), - ssl.peerInfo().getPeerCertificate().validate() - ); -} - -void KSSLInfoDlg::setup(KSSLCertificate *cert, - const TQString& ip, const TQString& url, - const TQString& cipher, const TQString& cipherdesc, - const TQString& sslversion, int usedbits, int bits, - KSSLCertificate::KSSLValidation /*certState*/) { - // Needed to put the GUI stuff here to get the layouting right - - d->_cert = cert; - - TQGridLayout *layout = new TQGridLayout(4, 2, KDialog::spacingHint()); - - layout->addWidget(new TQLabel(i18n("Chain:"), this), 0, 0); - d->_chain = new KComboBox(this); - layout->addMultiCellWidget(d->_chain, 1, 1, 0, 1); - connect(d->_chain, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotChain(int))); - - d->_chain->clear(); - - if (cert->chain().isValid() && cert->chain().depth() > 1) { - d->_chain->setEnabled(true); - d->_chain->insertItem(i18n("0 - Site Certificate")); - int cnt = 0; - TQPtrList cl = cert->chain().getChain(); - cl.setAutoDelete(true); - for (KSSLCertificate *c = cl.first(); c != 0; c = cl.next()) { - KSSLX509Map map(c->getSubject()); - TQString id; - id = map.getValue("CN"); - if (id.length() == 0) - id = map.getValue("O"); - if (id.length() == 0) - id = map.getValue("OU"); - d->_chain->insertItem(TQString::number(++cnt)+" - "+id); - } - d->_chain->setCurrentItem(0); - } else d->_chain->setEnabled(false); - - layout->addWidget(new TQLabel(i18n("Peer certificate:"), this), 2, 0); - layout->addWidget(d->_subject = static_cast(buildCertInfo(cert->getSubject())), 3, 0); - layout->addWidget(new TQLabel(i18n("Issuer:"), this), 2, 1); - layout->addWidget(d->_issuer = static_cast(buildCertInfo(cert->getIssuer())), 3, 1); - d->m_layout->addMultiCell(layout, 1, 1, 0, 2); - - layout = new TQGridLayout(11, 2, KDialog::spacingHint()); - layout->setColStretch(1, 1); - TQLabel *ipl = new TQLabel(i18n("IP address:"), this); - layout->addWidget(ipl, 0, 0); - if (ip.isEmpty()) { - ipl->hide(); - } - layout->addWidget(ipl = new TQLabel(ip, this), 0, 1); - if (ip.isEmpty()) { - ipl->hide(); - } - layout->addWidget(new TQLabel(i18n("URL:"), this), 1, 0); - KSqueezedTextLabel *urlLabel = new KSqueezedTextLabel(url, this); - layout->addWidget(urlLabel, 1, 1); - layout->addWidget(new TQLabel(i18n("Certificate state:"), this), 2, 0); - - layout->addWidget(d->_csl = new TQLabel("", this), 2, 1); - - update(); - - layout->addWidget(new TQLabel(i18n("Valid from:"), this), 3, 0); - layout->addWidget(d->_validFrom = new TQLabel("", this), 3, 1); - layout->addWidget(new TQLabel(i18n("Valid until:"), this), 4, 0); - layout->addWidget(d->_validUntil = new TQLabel("", this), 4, 1); - - layout->addWidget(new TQLabel(i18n("Serial number:"), this), 5, 0); - layout->addWidget(d->_serialNum = new TQLabel("", this), 5, 1); - layout->addWidget(new TQLabel(i18n("MD5 digest:"), this), 6, 0); - layout->addWidget(d->_digest = new TQLabel("", this), 6, 1); - - layout->addWidget(new TQLabel(i18n("Cipher in use:"), this), 7, 0); - layout->addWidget(new TQLabel(cipher, this), 7, 1); - layout->addWidget(new TQLabel(i18n("Details:"), this), 8, 0); - layout->addWidget(new TQLabel(cipherdesc.simplifyWhiteSpace(), this), 8, 1); - layout->addWidget(new TQLabel(i18n("SSL version:"), this), 9, 0); - layout->addWidget(new TQLabel(sslversion, this), 9, 1); - layout->addWidget(new TQLabel(i18n("Cipher strength:"), this), 10, 0); - layout->addWidget(new TQLabel(i18n("%1 bits used of a %2 bit cipher").arg(usedbits).arg(bits), this), 10, 1); - d->m_layout->addMultiCell(layout, 2, 2, 0, 2); - - displayCert(cert); -} - -void KSSLInfoDlg::setCertState(const TQString &errorNrs) -{ - d->_cert_ksvl.clear(); - TQStringList errors = TQStringList::split(':', errorNrs); - for(TQStringList::ConstIterator it = errors.begin(); - it != errors.end(); ++it) - { - d->_cert_ksvl << (KSSLCertificate::KSSLValidation) (*it).toInt(); - } -} - -void KSSLInfoDlg::displayCert(KSSLCertificate *x) { - TQPalette cspl; - - d->_serialNum->setText(x->getSerialNumber()); - - cspl = d->_validFrom->palette(); - if (x->getQDTNotBefore() > TQDateTime::currentDateTime(Qt::UTC)) - cspl.setColor(TQColorGroup::Foreground, TQColor(196,33,21)); - else cspl.setColor(TQColorGroup::Foreground, TQColor(42,153,59)); - d->_validFrom->setPalette(cspl); - d->_validFrom->setText(x->getNotBefore()); - - cspl = d->_validUntil->palette(); - if (x->getQDTNotAfter() < TQDateTime::currentDateTime(Qt::UTC)) - cspl.setColor(TQColorGroup::Foreground, TQColor(196,33,21)); - else cspl.setColor(TQColorGroup::Foreground, TQColor(42,153,59)); - d->_validUntil->setPalette(cspl); - d->_validUntil->setText(x->getNotAfter()); - - cspl = palette(); - - KSSLCertificate::KSSLValidation ksv; - KSSLCertificate::KSSLValidationList ksvl; - if ((x == d->_cert) && !d->_cert_ksvl.isEmpty()) { - ksvl = d->_cert_ksvl; - ksv = ksvl.first(); - } else { - if (x == d->_cert) - ksvl = d->_cert->validateVerbose(KSSLCertificate::SSLServer); - else - ksvl = d->_cert->validateVerbose(KSSLCertificate::SSLServer, x); - - if (ksvl.isEmpty()) - ksvl << KSSLCertificate::Ok; - - ksv = ksvl.first(); - - if (ksv == KSSLCertificate::SelfSigned) { - if (x->getQDTNotAfter() > TQDateTime::currentDateTime(Qt::UTC) && - x->getQDTNotBefore() < TQDateTime::currentDateTime(Qt::UTC)) { - if (KSSLSigners().useForSSL(*x)) - ksv = KSSLCertificate::Ok; - } else { - ksv = KSSLCertificate::Expired; - } - } - } - - if (ksv == KSSLCertificate::Ok) { - cspl.setColor(TQColorGroup::Foreground, TQColor(42,153,59)); - } else if (ksv != KSSLCertificate::Irrelevant) { - cspl.setColor(TQColorGroup::Foreground, TQColor(196,33,21)); - } - d->_csl->setPalette(cspl); - - TQString errorStr; - for(KSSLCertificate::KSSLValidationList::ConstIterator it = ksvl.begin(); - it != ksvl.end(); ++it) { - if (!errorStr.isEmpty()) - errorStr.append('\n'); - errorStr += KSSLCertificate::verifyText(*it); - } - - d->_csl->setText(errorStr); - d->_csl->setMinimumSize(d->_csl->sizeHint()); - - d->_subject->setValues(x->getSubject()); - d->_issuer->setValues(x->getIssuer()); - - d->_digest->setText(x->getMD5DigestText()); -} - - -void KSSLInfoDlg::slotChain(int x) { - if (x == 0) { - displayCert(d->_cert); - } else { - TQPtrList cl = d->_cert->chain().getChain(); - cl.setAutoDelete(true); - for (int i = 0; i < x-1; i++) - cl.remove((unsigned int)0); - KSSLCertificate thisCert = *(cl.at(0)); - cl.remove((unsigned int)0); - thisCert.chain().setChain(cl); - displayCert(&thisCert); - } -} - - -KSSLCertBox *KSSLInfoDlg::certInfoWidget(TQWidget *parent, const TQString &certName, TQWidget *mailCatcher) { - KSSLCertBox *result = new KSSLCertBox(parent); - if (!certName.isEmpty()) { - result->setValues(certName, mailCatcher); - } - return result; -} - - -KSSLCertBox::KSSLCertBox(TQWidget *parent, const char *name, WFlags f) -: TQScrollView(parent, name, f) -{ - _frame = 0L; - setBackgroundMode(TQWidget::PaletteButton); - setValues(TQString::null, 0L); -} - - -void KSSLCertBox::setValues(TQString certName, TQWidget *mailCatcher) { - if (_frame) { - removeChild(_frame); - delete _frame; - } - - if (certName.isEmpty()) { - _frame = new TQFrame(this); - addChild(_frame); - viewport()->setBackgroundMode(_frame->backgroundMode()); - _frame->show(); - updateScrollBars(); - show(); - return; - } - - KSSLX509Map cert(certName); - TQString tmp; - viewport()->setBackgroundMode(TQWidget::PaletteButton); - _frame = new TQFrame(this); - TQGridLayout *grid = new TQGridLayout(_frame, 1, 2, KDialog::marginHint(), KDialog::spacingHint()); - grid->setAutoAdd(true); - TQLabel *label = 0L; - if (!(tmp = cert.getValue("O")).isEmpty()) { - label = new TQLabel(i18n("Organization:"), _frame); - label->setAlignment(Qt::AlignLeft | Qt::AlignTop); - new TQLabel(tmp, _frame); - } - if (!(tmp = cert.getValue("OU")).isEmpty()) { - label = new TQLabel(i18n("Organizational unit:"), _frame); - label->setAlignment(Qt::AlignLeft | Qt::AlignTop); - new TQLabel(tmp, _frame); - } - if (!(tmp = cert.getValue("L")).isEmpty()) { - label = new TQLabel(i18n("Locality:"), _frame); - label->setAlignment(Qt::AlignLeft | Qt::AlignTop); - new TQLabel(tmp, _frame); - } - if (!(tmp = cert.getValue("ST")).isEmpty()) { - label = new TQLabel(i18n("Federal State","State:"), _frame); - label->setAlignment(Qt::AlignLeft | Qt::AlignTop); - new TQLabel(tmp, _frame); - } - if (!(tmp = cert.getValue("C")).isEmpty()) { - label = new TQLabel(i18n("Country:"), _frame); - label->setAlignment(Qt::AlignLeft | Qt::AlignTop); - new TQLabel(tmp, _frame); - } - if (!(tmp = cert.getValue("CN")).isEmpty()) { - label = new TQLabel(i18n("Common name:"), _frame); - label->setAlignment(Qt::AlignLeft | Qt::AlignTop); - new TQLabel(tmp, _frame); - } - if (!(tmp = cert.getValue("Email")).isEmpty()) { - label = new TQLabel(i18n("Email:"), _frame); - label->setAlignment(Qt::AlignLeft | Qt::AlignTop); - if (mailCatcher) { - KURLLabel *mail = new KURLLabel(tmp, tmp, _frame); - connect(mail, TQT_SIGNAL(leftClickedURL(const TQString &)), mailCatcher, TQT_SLOT(mailClicked(const TQString &))); - } else { - label = new TQLabel(tmp, _frame); - } - } - if (label && viewport()) { - viewport()->setBackgroundMode(label->backgroundMode()); - } - addChild(_frame); - updateScrollBars(); - _frame->show(); - show(); -} - - -TQScrollView *KSSLInfoDlg::buildCertInfo(const TQString &certName) { - return KSSLInfoDlg::certInfoWidget(this, certName, this); -} - -void KSSLInfoDlg::urlClicked(const TQString &url) { - kapp->invokeBrowser(url); -} - -void KSSLInfoDlg::mailClicked(const TQString &url) { - kapp->invokeMailer(url, TQString::null); -} - -#include "ksslinfodlg.moc" -// vim: ts=4 sw=4 et diff --git a/kio/kssl/ksslinfodlg.h b/kio/kssl/ksslinfodlg.h deleted file mode 100644 index c73afbba1..000000000 --- a/kio/kssl/ksslinfodlg.h +++ /dev/null @@ -1,173 +0,0 @@ -/* This file is part of the KDE project - * - * Copyright (C) 2000-2003 George Staikos - * Copyright (C) 2000 Malte Starostik - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library 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 - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public License - * along with this library; see the file COPYING.LIB. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - */ - -#ifndef _KSSLINFODLG_H -#define _KSSLINFODLG_H - -#include - -#include "ksslx509map.h" -#include "ksslcertificate.h" -#include "kssl.h" -#include - -class TQWidget; -class KSSLCertBox; -class KSSLCertChain; - - -/** - * KDE SSL Information Dialog - * - * This class creates a dialog that can be used to display information about - * an SSL session. - * - * There are NO GUARANTEES that KSSLInfoDlg will remain binary compatible/ - * Contact staikos@kde.org for details if needed. - * - * @author George Staikos - * @see KSSL - * @short KDE SSL Information Dialog - */ -class TDEIO_EXPORT KSSLInfoDlg : public KDialog { - Q_OBJECT -public: - /** - * Construct a KSSL Information Dialog - * - * @param secureConnection true if the connection is secured with SSL - * @param parent the parent widget - * @param name the internal name of this instance - * @param modal true if the dialog should be modal - */ - KSSLInfoDlg(bool secureConnection, TQWidget *parent=0L, const char *name=0L, bool modal=false); - - /** - * Destroy this dialog - */ - virtual ~KSSLInfoDlg(); - - /** - * Tell the dialog if the connection has portions that may not be - * secure (ie. a mixture of secure and insecure frames) - * - * @param isIt true if security is in question - */ - void setSecurityInQuestion(bool isIt); - - /** - * Setup the dialog before showing it. - * - * @param cert the certificate presented by the site - * @param ip the ip of the remote host - * @param url the url being accessed - * @param cipher the cipher in use - * @param cipherdesc text description of the cipher in use - * @param sslversion the version of SSL in use (SSLv2, SSLv3, TLSv1, etc) - * @param usedbits the number of bits in the cipher key being used - * @param bits the bit-size of the cipher in use - * @param certState the certificate state (valid, invalid, etc) - */ - void setup(KSSLCertificate *cert, - const TQString& ip, const TQString& url, - const TQString& cipher, const TQString& cipherdesc, - const TQString& sslversion, int usedbits, int bits, - KSSLCertificate::KSSLValidation certState); - - /** - * Setup the dialog before showing it. This is a convenience version - * of the above method, and obtains the same information using the - * @param ssl parameter instead. - * - * @param ssl the ssl connection - * @param ip the ip of the remote host - * @param url the url being accessed - */ - void setup( KSSL & ssl, const TQString & ip, const TQString & url ); - - /** - * Set the errors that were encountered while validating the site - * certificate. - */ - void setCertState(const TQString &errorNrs); - - /** - * Utility function to generate the widget which displays the detailed - * information about an X.509 certificate. - * - * @param parent the parent widget - * @param certName the name (subject) of the certificate - * @param mailCatcher the class which catches click events on e-mail - * addresses - */ - static KSSLCertBox *certInfoWidget(TQWidget *parent, const TQString &certName, TQWidget *mailCatcher=0); - -private: - TQScrollView *buildCertInfo(const TQString &certName); - void displayCert(KSSLCertificate *x); - - class KSSLInfoDlgPrivate; - KSSLInfoDlgPrivate *d; - -private slots: - void launchConfig(); - void urlClicked(const TQString &url); - void mailClicked(const TQString &url); - void slotChain(int x); -}; - - -/** - * KDE SSL Certificate Box - * - * This class creates a widget which formats and displays the contents of an - * SSL X.509 certificate. That is, it takes the "subject" of the certificate - * and displays everything contained therein. - * - * @author George Staikos - * @see KSSLInfoDlg - * @short KDE SSL Certificate Box - */ -class TDEIO_EXPORT KSSLCertBox : public TQScrollView { -public: - /** - * Construct a certificate box - * - * @param parent the parent widget - * @param name the internal name of this instance - * @param f widget flags for the object - */ - KSSLCertBox(TQWidget *parent=0L, const char *name=0L, WFlags f=0); - - /** - * Change the contents of the widget - * - * @param certName the name ("subject") of the certificate - * @param mailCatcher the widget which catches the url open events - */ - void setValues(TQString certName, TQWidget *mailCatcher=0L); - -private: - TQFrame *_frame; -}; - -#endif - diff --git a/kio/kssl/ksslkeygen.cc b/kio/kssl/ksslkeygen.cc deleted file mode 100644 index 403632b3a..000000000 --- a/kio/kssl/ksslkeygen.cc +++ /dev/null @@ -1,223 +0,0 @@ -/* This file is part of the KDE project - * - * Copyright (C) 2001 George Staikos - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library 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 - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public License - * along with this library; see the file COPYING.LIB. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - */ - - -#include "ksslkeygen.h" -#include "keygenwizard.h" -#include "keygenwizard2.h" - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include - -#include - - -KSSLKeyGen::KSSLKeyGen(TQWidget *parent, const char *name, bool modal) -:KWizard(parent,name,modal) { - _idx = -1; - -#ifdef KSSL_HAVE_SSL - page1 = new KGWizardPage1(this, "Wizard Page 1"); - addPage(page1, i18n("TDE Certificate Request")); - page2 = new KGWizardPage2(this, "Wizard Page 2"); - addPage(page2, i18n("TDE Certificate Request - Password")); - setHelpEnabled(page1, false); - setHelpEnabled(page2, false); - setFinishEnabled(page2, false); - connect(page2->_password1, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(slotPassChanged())); - connect(page2->_password2, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(slotPassChanged())); - connect(finishButton(), TQT_SIGNAL(clicked()), TQT_SLOT(slotGenerate())); -#else - // tell him he doesn't have SSL -#endif -} - - -KSSLKeyGen::~KSSLKeyGen() { - -} - - -void KSSLKeyGen::slotPassChanged() { - setFinishEnabled(page2, page2->_password1->text() == page2->_password2->text() && page2->_password1->text().length() >= 4); -} - - -void KSSLKeyGen::slotGenerate() { - assert(_idx >= 0 && _idx <= 3); // for now - - - // Generate the CSR - int bits; - switch (_idx) { - case 0: - bits = 2048; - break; - case 1: - bits = 1024; - break; - case 2: - bits = 768; - break; - case 3: - bits = 512; - break; - default: - KMessageBox::sorry(NULL, i18n("Unsupported key size."), i18n("TDE SSL Information")); - return; - } - - KProgressDialog *kpd = new KProgressDialog(this, "progress dialog", i18n("TDE"), i18n("Please wait while the encryption keys are generated...")); - kpd->progressBar()->setProgress(0); - kpd->show(); - // FIXME - progress dialog won't show this way - - int rc = generateCSR("This CSR" /*FIXME */, page2->_password1->text(), bits, 0x10001 /* This is the traditional exponent used */); - kpd->progressBar()->setProgress(100); - -#ifndef Q_OS_WIN //TODO: reenable for WIN32 - if (rc == 0 && KWallet::Wallet::isEnabled()) { - rc = KMessageBox::questionYesNo(this, i18n("Do you wish to store the passphrase in your wallet file?"), TQString::null, i18n("Store"), i18n("Do Not Store")); - if (rc == KMessageBox::Yes) { - KWallet::Wallet *w = KWallet::Wallet::openWallet(KWallet::Wallet::LocalWallet(), winId()); - if (w) { - // FIXME: store passphrase in wallet - delete w; - } - } - } -#endif - - kpd->deleteLater(); -} - - -int KSSLKeyGen::generateCSR(const TQString& name, const TQString& pass, int bits, int e) { -#ifdef KSSL_HAVE_SSL - KOSSL *kossl = KOSSL::self(); - int rc; - - X509_REQ *req = kossl->X509_REQ_new(); - if (!req) { - return -2; - } - - EVP_PKEY *pkey = kossl->EVP_PKEY_new(); - if (!pkey) { - kossl->X509_REQ_free(req); - return -4; - } - - RSA *rsakey = kossl->RSA_generate_key(bits, e, NULL, NULL); - if (!rsakey) { - kossl->X509_REQ_free(req); - kossl->EVP_PKEY_free(pkey); - return -3; - } - - rc = kossl->EVP_PKEY_assign(pkey, EVP_PKEY_RSA, (char *)rsakey); - - rc = kossl->X509_REQ_set_pubkey(req, pkey); - - // Set the subject - X509_NAME *n = kossl->X509_NAME_new(); - - kossl->X509_NAME_add_entry_by_txt(n, (char*)LN_countryName, MBSTRING_UTF8, (unsigned char*)name.local8Bit().data(), -1, -1, 0); - kossl->X509_NAME_add_entry_by_txt(n, (char*)LN_organizationName, MBSTRING_UTF8, (unsigned char*)name.local8Bit().data(), -1, -1, 0); - kossl->X509_NAME_add_entry_by_txt(n, (char*)LN_organizationalUnitName, MBSTRING_UTF8, (unsigned char*)name.local8Bit().data(), -1, -1, 0); - kossl->X509_NAME_add_entry_by_txt(n, (char*)LN_localityName, MBSTRING_UTF8, (unsigned char*)name.local8Bit().data(), -1, -1, 0); - kossl->X509_NAME_add_entry_by_txt(n, (char*)LN_stateOrProvinceName, MBSTRING_UTF8, (unsigned char*)name.local8Bit().data(), -1, -1, 0); - kossl->X509_NAME_add_entry_by_txt(n, (char*)LN_commonName, MBSTRING_UTF8, (unsigned char*)name.local8Bit().data(), -1, -1, 0); - kossl->X509_NAME_add_entry_by_txt(n, (char*)LN_pkcs9_emailAddress, MBSTRING_UTF8, (unsigned char*)name.local8Bit().data(), -1, -1, 0); - - rc = kossl->X509_REQ_set_subject_name(req, n); - - - rc = kossl->X509_REQ_sign(req, pkey, kossl->EVP_md5()); - - // We write it to the database and then the caller can obtain it - // back from there. Yes it's inefficient, but it doesn't happen - // often and this way things are uniform. - - TDEGlobal::dirs()->addResourceType("kssl", KStandardDirs::kde_default("data") + "kssl"); - - TQString path = TDEGlobal::dirs()->saveLocation("kssl"); - KTempFile csrFile(path + "csr_", ".der"); - - if (!csrFile.fstream()) { - kossl->X509_REQ_free(req); - kossl->EVP_PKEY_free(pkey); - return -5; - } - - KTempFile p8File(path + "pkey_", ".p8"); - - if (!p8File.fstream()) { - kossl->X509_REQ_free(req); - kossl->EVP_PKEY_free(pkey); - return -5; - } - - kossl->i2d_X509_REQ_fp(csrFile.fstream(), req); - - kossl->i2d_PKCS8PrivateKey_fp(p8File.fstream(), pkey, - kossl->EVP_bf_cbc(), pass.local8Bit().data(), - pass.length(), 0L, 0L); - - // FIXME Write kconfig entry to store the filenames under the md5 hash - - kossl->X509_REQ_free(req); - kossl->EVP_PKEY_free(pkey); - - return 0; -#else - return -1; -#endif -} - - -TQStringList KSSLKeyGen::supportedKeySizes() { - TQStringList x; - -#ifdef KSSL_HAVE_SSL - x << i18n("2048 (High Grade)") - << i18n("1024 (Medium Grade)") - << i18n("768 (Low Grade)") - << i18n("512 (Low Grade)"); -#else - x << i18n("No SSL support."); -#endif - - return x; -} - - -#include "ksslkeygen.moc" - diff --git a/kio/kssl/ksslkeygen.h b/kio/kssl/ksslkeygen.h deleted file mode 100644 index 5bb99a593..000000000 --- a/kio/kssl/ksslkeygen.h +++ /dev/null @@ -1,95 +0,0 @@ -/* This file is part of the KDE project - * - * Copyright (C) 2001 George Staikos - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library 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 - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public License - * along with this library; see the file COPYING.LIB. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - */ - - -#ifndef _KSSLKEYGEN_H -#define _KSSLKEYGEN_H - -#include -#include -#include - - -class KOpenSSLProxy; -class KGWizardPage1; -class KGWizardPage2; - -/** - * KDE Key Generation dialog - * - * This is used to display a key generation dialog for cases such as the - * html \ tag. It also does the certificate signing request generation. - * - * @author George Staikos - * @see KSSL, KSSLCertificate, KSSLPKCS12 - * @short KDE Key Generation Dialog - */ -class TDEIO_EXPORT KSSLKeyGen : public KWizard { - Q_OBJECT -public: - /** - * Construct a keygen dialog. - * @param parent the parent widget - * @param name the internal name of this instance - * @param modal true if the dialog should be modal - */ - KSSLKeyGen(TQWidget *parent=0L, const char *name=0L, bool modal=false); - - /** - * Destroy this dialog. - */ - virtual ~KSSLKeyGen(); - - /** - * List the supported key sizes. - * @return the supported key sizes - */ - static TQStringList supportedKeySizes(); - - /** - * Generate the certificate signing request. - * @param name the name for the certificate - * @param pass the password for the request - * @param bits the bitsize for the key - * @param e the value of the "e" parameter in RSA - * @return 0 on success, non-zero on error - */ - int generateCSR(const TQString& name, const TQString& pass, int bits, int e = 0x10001); - - /** - * Set the key size. - * @param idx an index into supportedKeySizes() - */ - void setKeySize(int idx) { _idx = idx; } - -private slots: - void slotPassChanged(); - void slotGenerate(); - -private: - class KSSLKeyGenPrivate; - KSSLKeyGenPrivate *d; - int _idx; - KGWizardPage1 *page1; - KGWizardPage2 *page2; -}; - -#endif - diff --git a/kio/kssl/ksslpeerinfo.cc b/kio/kssl/ksslpeerinfo.cc deleted file mode 100644 index d1c2d00fc..000000000 --- a/kio/kssl/ksslpeerinfo.cc +++ /dev/null @@ -1,171 +0,0 @@ -/* This file is part of the KDE project - * - * Copyright (C) 2000-2003 George Staikos - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library 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 - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public License - * along with this library; see the file COPYING.LIB. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - */ - -#ifdef HAVE_CONFIG_H -#include -#endif - -#include - -#include "ksslpeerinfo.h" -#include - -#include -#include -#include -#ifndef Q_WS_WIN //TODO kresolver not ported -#include "kresolver.h" -#endif - -#include "ksslx509map.h" - -class KSSLPeerInfoPrivate { -public: - KSSLPeerInfoPrivate() {} - ~KSSLPeerInfoPrivate() { } - TQString peerHost; -}; - - - -KSSLPeerInfo::KSSLPeerInfo() { - d = new KSSLPeerInfoPrivate; -} - -KSSLPeerInfo::~KSSLPeerInfo() { - delete d; -} - -KSSLCertificate& KSSLPeerInfo::getPeerCertificate() { - return m_cert; -} - -void KSSLPeerInfo::setPeerHost(TQString realHost) { - d->peerHost = realHost.stripWhiteSpace(); - while(d->peerHost.endsWith(".")) - d->peerHost.truncate(d->peerHost.length()-1); - -#ifdef Q_WS_WIN //TODO kresolver not ported - d->peerHost = d->peerHost.lower(); -#else - d->peerHost = TQString::fromLatin1(KNetwork::KResolver::domainToAscii(d->peerHost)); -#endif -} - -bool KSSLPeerInfo::certMatchesAddress() { -#ifdef KSSL_HAVE_SSL - KSSLX509Map certinfo(m_cert.getSubject()); - TQStringList cns = TQStringList::split(TQRegExp("[ \n\r]"), certinfo.getValue("CN")); - cns += m_cert.subjAltNames(); - - for (TQStringList::Iterator cn = cns.begin(); cn != cns.end(); ++cn) { - if (cnMatchesAddress((*cn).stripWhiteSpace().lower())) - return true; - } - -#endif - - return false; -} - - -bool KSSLPeerInfo::cnMatchesAddress(TQString cn) { -#ifdef KSSL_HAVE_SSL - TQRegExp rx; - - kdDebug(7029) << "Matching CN=[" << cn << "] to [" - << d->peerHost << "]" << endl; - - // Check for invalid characters - if (TQRegExp("[^a-zA-Z0-9\\.\\*\\-]").search(cn) >= 0) { - kdDebug(7029) << "CN contains invalid characters! Failing." << endl; - return false; - } - - // Domains can legally end with '.'s. We don't need them though. - while(cn.endsWith(".")) - cn.truncate(cn.length()-1); - - // Do not let empty CN's get by!! - if (cn.isEmpty()) - return false; - - // Check for IPv4 address - rx.setPattern("[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}"); - if (rx.exactMatch(d->peerHost)) - return d->peerHost == cn; - - // Check for IPv6 address here... - rx.setPattern("^\\[.*\\]$"); - if (rx.exactMatch(d->peerHost)) - return d->peerHost == cn; - - if (cn.contains('*')) { - // First make sure that there are at least two valid parts - // after the wildcard (*). - TQStringList parts = TQStringList::split('.', cn, false); - - while (parts.count() > 2) - parts.remove(parts.begin()); - - if (parts.count() != 2) { - return false; // we don't allow *.root - that's bad - } - - if (parts[0].contains('*') || parts[1].contains('*')) { - return false; - } - - // RFC2818 says that *.example.com should match against - // foo.example.com but not bar.foo.example.com - // (ie. they must have the same number of parts) - if (TQRegExp(cn, false, true).exactMatch(d->peerHost) && - TQStringList::split('.', cn, false).count() == - TQStringList::split('.', d->peerHost, false).count()) - return true; - - // *.example.com must match example.com also. Sigh.. - if (cn.startsWith("*.")) { - TQString chopped = cn.mid(2); - if (chopped == d->peerHost) { - return true; - } - } - return false; - } - - // We must have an exact match in this case (insensitive though) - // (note we already did .lower()) - if (cn == d->peerHost) - return true; -#endif - return false; -} - - -void KSSLPeerInfo::reset() { - d->peerHost = TQString::null; -} - - -const TQString& KSSLPeerInfo::peerHost() const { - return d->peerHost; -} - diff --git a/kio/kssl/ksslpeerinfo.h b/kio/kssl/ksslpeerinfo.h deleted file mode 100644 index a5cd017c9..000000000 --- a/kio/kssl/ksslpeerinfo.h +++ /dev/null @@ -1,108 +0,0 @@ -/* This file is part of the KDE project - * - * Copyright (C) 2000-2003 George Staikos - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library 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 - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public License - * along with this library; see the file COPYING.LIB. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - */ - -#ifndef _KSSLPEERINFO_H -#define _KSSLPEERINFO_H - -class KSSL; - -#include -#include -#include - -class KSSLPeerInfoPrivate; -class KInetSocketAddress; - -/** - * KDE SSL Peer Data - * - * This class contains data about the peer of an SSL connection. - * - * @author George Staikos - * @see KSSL - * @short KDE SSL Peer Data - */ -class TDEIO_EXPORT KSSLPeerInfo { -friend class KSSL; -public: - /** - * Destroy this instance - */ - ~KSSLPeerInfo(); - - /** - * Get a reference to the peer's certificate - * - * @return a reference to the peer's certificate - * @see KSSLCertificate - */ - KSSLCertificate& getPeerCertificate(); - - /** - * Determine if the peer's certificate matches the address set with - * setPeerHost(). Note that this is a match in the "https" - * sense, taking into account, for instance, wildcards. - * - * @return true if it matches - * @see setPeerHost - */ - bool certMatchesAddress(); - - /** - * Determine if the given "common name" matches the address set with - * setPeerHost(). Note that this is a match in the "https" - * sense, taking into account, for instance, wildcards. - * - * @return true if it matches - * @see setPeerHost - */ - bool cnMatchesAddress(TQString cn); - - /** - * Set the host that we are connected to. This is generally set by - * KSSL, and should be exactly what the user -thinks- he is connected - * to. (for instance, the host name in the url) - * - * @param host the hostname - */ - void setPeerHost(TQString host = TQString::null); - - /** - * Returns the host we are connected to. - */ - const TQString& peerHost() const; - - /** - * Clear out the host name. - */ - void reset(); - -protected: - KSSLPeerInfo(); - - KSSLCertificate m_cert; - -private: - KSSLPeerInfoPrivate *d; -}; - - -#endif - diff --git a/kio/kssl/ksslpemcallback.cc b/kio/kssl/ksslpemcallback.cc deleted file mode 100644 index 2dfbb9146..000000000 --- a/kio/kssl/ksslpemcallback.cc +++ /dev/null @@ -1,61 +0,0 @@ -/* This file is part of the KDE project - * - * Copyright (C) 2001 George Staikos - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library 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 - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public License - * along with this library; see the file COPYING.LIB. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - */ - -#ifdef HAVE_CONFIG_H -#include -#endif - -#include -#include -#include "ksslpemcallback.h" - -int KSSLPemCallback(char *buf, int size, int rwflag, void *userdata) { -#ifdef KSSL_HAVE_SSL - TQCString pass; - Q_UNUSED(userdata); - Q_UNUSED(rwflag); - - if (!buf) return -1; - int rc = KPasswordDialog::getPassword(pass, i18n("Certificate password")); - if (rc != KPasswordDialog::Accepted) return -1; - - const uint passlen = pass.length(); - if (passlen > (unsigned int)size-1) - pass.truncate((unsigned int)size-1); - - tqstrncpy(buf, pass.data(), size-1); - - for (unsigned int i = 0; i < passlen; i++) - pass[i] = 0; - // To be sure that it doesn't optimise the previous loop away - for (unsigned int i = 0; i < passlen; i++) - pass[i] = pass[i]; - buf[size-1] = 0; - return (int)passlen; -#else - Q_UNUSED(buf); - Q_UNUSED(size); - Q_UNUSED(rwflag); - Q_UNUSED(userdata); - return -1; -#endif -} - - diff --git a/kio/kssl/ksslpemcallback.h b/kio/kssl/ksslpemcallback.h deleted file mode 100644 index 265edd099..000000000 --- a/kio/kssl/ksslpemcallback.h +++ /dev/null @@ -1,29 +0,0 @@ -/* This file is part of the KDE project - * - * Copyright (C) 2001 George Staikos - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library 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 - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public License - * along with this library; see the file COPYING.LIB. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - */ - -#ifndef _kde_ksslpemcallback_h -#define _kde_ksslpemcallback_h - -#include - -int TDEIO_EXPORT KSSLPemCallback(char *buf, int size, int rwflag, void *userdata); - -#endif - diff --git a/kio/kssl/ksslpkcs12.cc b/kio/kssl/ksslpkcs12.cc deleted file mode 100644 index b8b23cf1c..000000000 --- a/kio/kssl/ksslpkcs12.cc +++ /dev/null @@ -1,295 +0,0 @@ -/* This file is part of the KDE project - * - * Copyright (C) 2001 George Staikos - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library 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 - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public License - * along with this library; see the file COPYING.LIB. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - */ - - -#ifdef HAVE_CONFIG_H -#include -#endif - -#include - -#include -#include -#include -#include -#include -#include - -#include - -#ifdef KSSL_HAVE_SSL -#define sk_new kossl->sk_new -#define sk_push kossl->sk_push -#define sk_free kossl->sk_free -#define sk_value kossl->sk_value -#define sk_num kossl->sk_num -#define sk_dup kossl->sk_dup -#define sk_pop kossl->sk_pop -#endif - - -KSSLPKCS12::KSSLPKCS12() { - _pkcs = NULL; - _pkey = NULL; - _cert = NULL; - _caStack = NULL; - kossl = KOSSL::self(); -} - - - -KSSLPKCS12::~KSSLPKCS12() { -#ifdef KSSL_HAVE_SSL - if (_pkey) kossl->EVP_PKEY_free(_pkey); - if (_caStack) { - for (;;) { - X509* x5 = sk_X509_pop(_caStack); - if (!x5) break; - kossl->X509_free(x5); - } - sk_X509_free(_caStack); - } - if (_pkcs) kossl->PKCS12_free(_pkcs); -#endif - if (_cert) delete _cert; -} - - -KSSLPKCS12* KSSLPKCS12::fromString(TQString base64, TQString password) { -#ifdef KSSL_HAVE_SSL -KTempFile ktf; - - if (base64.isEmpty()) return NULL; - TQByteArray qba, qbb = TQCString(base64.latin1()).copy(); - KCodecs::base64Decode(qbb, qba); - ktf.file()->writeBlock(qba); - ktf.close(); - KSSLPKCS12* rc = loadCertFile(ktf.name(), password); - ktf.unlink(); - return rc; -#endif -return NULL; -} - - - -KSSLPKCS12* KSSLPKCS12::loadCertFile(TQString filename, TQString password) { -#ifdef KSSL_HAVE_SSL -TQFile qf(filename); -PKCS12 *newpkcs = NULL; - - if (!qf.open(IO_ReadOnly)) - return NULL; - - FILE *fp = fdopen(qf.handle(), "r"); - if (!fp) return NULL; - - newpkcs = KOSSL::self()->d2i_PKCS12_fp(fp, &newpkcs); - - fclose(fp); - if (!newpkcs) { - KOSSL::self()->ERR_clear_error(); - return NULL; - } - - KSSLPKCS12 *c = new KSSLPKCS12; - c->setCert(newpkcs); - - // Now we parse it to see if we can decrypt it and interpret it - if (!c->parse(password)) { - delete c; c = NULL; - } - - return c; -#endif -return NULL; -} - - -void KSSLPKCS12::setCert(PKCS12 *c) { -#ifdef KSSL_HAVE_SSL - _pkcs = c; -#endif -} - - -bool KSSLPKCS12::changePassword(TQString pold, TQString pnew) { -#ifdef KSSL_HAVE_SSL - // OpenSSL makes me cast away the const here. argh - return (0 == kossl->PKCS12_newpass(_pkcs, - pold.isNull() ? (char *)"" : (char *)pold.latin1(), - pnew.isNull() ? (char *)"" : (char *)pnew.latin1())); -#endif -return false; -} - - -bool KSSLPKCS12::parse(TQString pass) { -#ifdef KSSL_HAVE_SSL -X509 *x = NULL; - - assert(_pkcs); // if you're calling this before pkcs gets set, it's a BUG! - - if (_cert) delete _cert; - if (_pkey) kossl->EVP_PKEY_free(_pkey); - if (_caStack) { - for (;;) { - X509* x5 = sk_X509_pop(_caStack); - if (!x5) break; - kossl->X509_free(x5); - } - sk_X509_free(_caStack); - } - _pkey = NULL; - _caStack = NULL; - _cert = NULL; - - int rc = kossl->PKCS12_parse(_pkcs, pass.latin1(), &_pkey, &x, &_caStack); - - if (rc == 1) { - // kdDebug(7029) << "PKCS12_parse success" << endl; - if (x) { - _cert = new KSSLCertificate; - _cert->setCert(x); - if (_caStack) { - _cert->setChain(_caStack); - } - return true; - } - } else { - _caStack = NULL; - _pkey = NULL; - kossl->ERR_clear_error(); - } -#endif -return false; -} - - -EVP_PKEY *KSSLPKCS12::getPrivateKey() { - return _pkey; -} - - -KSSLCertificate *KSSLPKCS12::getCertificate() { - return _cert; -} - - -TQString KSSLPKCS12::toString() { -TQString base64; -#ifdef KSSL_HAVE_SSL -unsigned char *p; -int len; - - len = kossl->i2d_PKCS12(_pkcs, NULL); - if (len >= 0) { - char *buf = new char[len]; - p = (unsigned char *)buf; - kossl->i2d_PKCS12(_pkcs, &p); - TQByteArray qba; - qba.setRawData(buf, len); - base64 = KCodecs::base64Encode(qba); - qba.resetRawData(buf, len); - delete[] buf; - } -#endif -return base64; -} - - - -bool KSSLPKCS12::toFile(TQString filename) { -#ifdef KSSL_HAVE_SSL -TQFile out(filename); - - if (!out.open(IO_WriteOnly)) return false; - - int fd = out.handle(); - FILE *fp = fdopen(fd, "w"); - - if (!fp) { - unlink(filename.latin1()); - return false; - } - - kossl->i2d_PKCS12_fp(fp, _pkcs); - - fclose(fp); - return true; -#endif -return false; -} - - -KSSLCertificate::KSSLValidation KSSLPKCS12::validate() { - return validate(KSSLCertificate::SSLServer); -} - - -KSSLCertificate::KSSLValidation KSSLPKCS12::validate(KSSLCertificate::KSSLPurpose p) { -#ifdef KSSL_HAVE_SSL -KSSLCertificate::KSSLValidation xx = _cert->validate(p); - if (1 != kossl->X509_check_private_key(_cert->getCert(), _pkey)) { - xx = KSSLCertificate::PrivateKeyFailed; - } - -return xx; -#else -return KSSLCertificate::NoSSL; -#endif -} - - -KSSLCertificate::KSSLValidation KSSLPKCS12::revalidate() { - return revalidate(KSSLCertificate::SSLServer); -} - - -KSSLCertificate::KSSLValidation KSSLPKCS12::revalidate(KSSLCertificate::KSSLPurpose p) { - return _cert->revalidate(p); -} - - -bool KSSLPKCS12::isValid() { -return isValid(KSSLCertificate::SSLServer); -} - - -bool KSSLPKCS12::isValid(KSSLCertificate::KSSLPurpose p) { -return (validate(p) == KSSLCertificate::Ok); -} - - -TQString KSSLPKCS12::name() { - return _cert->getSubject(); -} - - -#ifdef KSSL_HAVE_SSL -#undef sk_new -#undef sk_push -#undef sk_free -#undef sk_value -#undef sk_num -#undef sk_pop -#undef sk_dup -#endif - diff --git a/kio/kssl/ksslpkcs12.h b/kio/kssl/ksslpkcs12.h deleted file mode 100644 index c9dff0d82..000000000 --- a/kio/kssl/ksslpkcs12.h +++ /dev/null @@ -1,194 +0,0 @@ -/* This file is part of the KDE project - * - * Copyright (C) 2001 George Staikos - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library 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 - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public License - * along with this library; see the file COPYING.LIB. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - */ - -#ifndef _KSSLPKCS12_H -#define _KSSLPKCS12_H - -#ifdef Q_WS_WIN -#include "ksslconfig_win.h" -#else -#include "ksslconfig.h" -#endif - -#ifdef KSSL_HAVE_SSL -#define crypt _openssl_crypt -#include -#undef crypt -#else -class PKCS12; -class EVP_PKEY; -class X509; -#endif - -#include -#include - -#ifndef STACK_OF -#define STACK_OF(x) void -#endif - -class KSSL; -class KSSLPKCS12Private; -class KOpenSSLProxy; - -/** - * KDE PKCS#12 Certificate - * - * As of yet, this class is being defined. if you use it, let it be known - * that BC will break on you until this message is removed. - * - * @author George Staikos - * @see KSSL, KSSLCertificate - * @short KDE PKCS#12 Certificate - */ -class TDEIO_EXPORT KSSLPKCS12 { -friend class KSSL; - -public: - /** - * Destroy this PKCS#12 certificate - */ - virtual ~KSSLPKCS12(); - - /** - * The name of this certificate. This can be used to refer to the - * certificate instead of passing the object itself. - * @return the name of the certificate - */ - TQString name(); - - /** - * Create a KSSLPKCS12 object from a Base64 in a TQString. - * @param base64 the base64 encoded certificate - * @param password a password for the certificate if encrypted - * @return the PKCS#12 object, or NULL on failure. - */ - static KSSLPKCS12* fromString(TQString base64, TQString password = ""); - - /** - * Create a KSSLPKCS12 object by reading a PKCS#12 file. - * @param filename the filename of the certificate - * @param password a password for the certificate if encrypted - * @return the PKCS#12 object, or NULL on failure. - */ - static KSSLPKCS12* loadCertFile(TQString filename, TQString password = ""); - - /** - * Convert to a Base64 string. - * @return the certificate in base64 form - */ - TQString toString(); - - /** - * Raw set the PKCS12 object. - * @param c the openssl PKCS12 object - * @internal - */ - void setCert(PKCS12 *c); - - /** - * Change the password of the PKCS#12 in memory. - * @param pold the old password - * @param pnew the new password - * @return true on success - */ - bool changePassword(TQString pold, TQString pnew); - - /** - * Get the private key. - * @return the internal OpenSSL private key format - * @internal - */ - EVP_PKEY *getPrivateKey(); - - /** - * Get the X.509 certificate. - * @return the X.509 certificate for the PKCS#12 object, or NULL - */ - KSSLCertificate *getCertificate(); - - /** - * Write the PKCS#12 to a file in raw mode. - * @param filename the file to write to - * @return true on success - */ - bool toFile(TQString filename); - - /** - * Check the X.509 and private key to make sure they're valid. - * @return the result of the validation - * @see KSSLCertificate - */ - KSSLCertificate::KSSLValidation validate(); - - /** - * Check the X.509 and private key to make sure they're valid. - * @param p the purpose to validate for - * @return the result of the validation - * @see KSSLCertificate - */ - KSSLCertificate::KSSLValidation validate(KSSLCertificate::KSSLPurpose p); - - /** - * Check the X.509 and private key to make sure they're valid. - * Ignore any cached validation result. - * @return the result of the validation - * @see KSSLCertificate - */ - KSSLCertificate::KSSLValidation revalidate(); - - /** - * Check the X.509 and private key to make sure they're valid. - * Ignore any cached validation result. - * @param p the purpose to validate for - * @return the result of the validation - * @see KSSLCertificate - */ - KSSLCertificate::KSSLValidation revalidate(KSSLCertificate::KSSLPurpose p); - - /** - * Check if the X.509 and private key are valid. - * @return true if valid - */ - bool isValid(); - - /** - * Check if the X.509 and private key are valid. - * @param p the purpose to validate for - * @return true if valid - */ - bool isValid(KSSLCertificate::KSSLPurpose p); - -protected: - KSSLPKCS12(); - bool parse(TQString pass); - -private: - KSSLPKCS12Private *d; - PKCS12 *_pkcs; - KOpenSSLProxy *kossl; - EVP_PKEY *_pkey; - KSSLCertificate *_cert; - STACK_OF(X509) *_caStack; -}; - - -#endif - diff --git a/kio/kssl/ksslpkcs7.cc b/kio/kssl/ksslpkcs7.cc deleted file mode 100644 index 8db0000f0..000000000 --- a/kio/kssl/ksslpkcs7.cc +++ /dev/null @@ -1,208 +0,0 @@ -/* This file is part of the KDE project - * - * Copyright (C) 2001 George Staikos - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library 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 - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public License - * along with this library; see the file COPYING.LIB. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - */ - - -#ifdef HAVE_CONFIG_H -#include -#endif - -#include - -#include -#include -#include -#include -#include -#include - -#include - -#ifdef KSSL_HAVE_SSL -#define sk_new kossl->sk_new -#define sk_push kossl->sk_push -#define sk_free kossl->sk_free -#define sk_value kossl->sk_value -#define sk_num kossl->sk_num -#define sk_dup kossl->sk_dup -#endif - - -KSSLPKCS7::KSSLPKCS7() { - _pkcs = NULL; - _cert = NULL; - kossl = KOSSL::self(); -} - - - -KSSLPKCS7::~KSSLPKCS7() { -#ifdef KSSL_HAVE_SSL - if (_pkcs) kossl->PKCS7_free(_pkcs); -#endif - if (_cert) delete _cert; -} - - -KSSLPKCS7* KSSLPKCS7::fromString(TQString base64) { -#ifdef KSSL_HAVE_SSL -KTempFile ktf; - - if (base64.isEmpty()) return NULL; - TQByteArray qba, qbb = TQCString(base64.latin1()).copy(); - KCodecs::base64Decode(qbb, qba); - ktf.file()->writeBlock(qba); - ktf.close(); - KSSLPKCS7* rc = loadCertFile(ktf.name()); - ktf.unlink(); - return rc; -#endif -return NULL; -} - - - -KSSLPKCS7* KSSLPKCS7::loadCertFile(TQString filename) { -#ifdef KSSL_HAVE_SSL -TQFile qf(filename); -PKCS7 *newpkcs = NULL; - - if (!qf.open(IO_ReadOnly)) - return NULL; - - FILE *fp = fdopen(qf.handle(), "r"); - if (!fp) return NULL; - - newpkcs = KOSSL::self()->d2i_PKCS7_fp(fp, &newpkcs); - - if (!newpkcs) return NULL; - - KSSLPKCS7 *c = new KSSLPKCS7; - c->setCert(newpkcs); - - return c; -#endif -return NULL; -} - - -void KSSLPKCS7::setCert(PKCS7 *c) { -#ifdef KSSL_HAVE_SSL - _pkcs = c; - //STACK_OF(PKCS7_SIGNER_INFO) *PKCS7_get_signer_info(PKCS7 *p7); - //X509 *PKCS7_cert_from_signer_info(PKCS7 *p7, PKCS7_SIGNER_INFO *si); - // set _chain and _cert here. -#endif -} - - -KSSLCertificate *KSSLPKCS7::getCertificate() { - return _cert; -} - - -KSSLCertChain *KSSLPKCS7::getChain() { - return _chain; -} - - -TQString KSSLPKCS7::toString() { -TQString base64; -#ifdef KSSL_HAVE_SSL -unsigned char *p; -int len; - - len = kossl->i2d_PKCS7(_pkcs, NULL); - if (len >= 0) { - char *buf = new char[len]; - p = (unsigned char *)buf; - kossl->i2d_PKCS7(_pkcs, &p); - TQByteArray qba; - qba.setRawData(buf, len); - base64 = KCodecs::base64Encode(qba); - qba.resetRawData(buf, len); - delete[] buf; - } -#endif -return base64; -} - - - -bool KSSLPKCS7::toFile(TQString filename) { -#ifdef KSSL_HAVE_SSL -TQFile out(filename); - - if (!out.open(IO_WriteOnly)) return false; - - int fd = out.handle(); - FILE *fp = fdopen(fd, "w"); - - if (!fp) { - unlink(filename.latin1()); - return false; - } - - kossl->i2d_PKCS7_fp(fp, _pkcs); - - fclose(fp); - return true; -#endif -return false; -} - - -KSSLCertificate::KSSLValidation KSSLPKCS7::validate() { -#ifdef KSSL_HAVE_SSL -KSSLCertificate::KSSLValidation xx = _cert->validate(); -return xx; -#else -return KSSLCertificate::NoSSL; -#endif -} - - -KSSLCertificate::KSSLValidation KSSLPKCS7::revalidate() { - if (_cert) - return _cert->revalidate(); - return KSSLCertificate::Unknown; -} - - -bool KSSLPKCS7::isValid() { -return (validate() == KSSLCertificate::Ok); -} - - -TQString KSSLPKCS7::name() { - if (_cert) - return _cert->getSubject(); - return TQString(); -} - - -#ifdef KSSL_HAVE_SSL -#undef sk_new -#undef sk_push -#undef sk_free -#undef sk_value -#undef sk_num -#undef sk_dup -#endif - diff --git a/kio/kssl/ksslpkcs7.h b/kio/kssl/ksslpkcs7.h deleted file mode 100644 index c94b7bc7a..000000000 --- a/kio/kssl/ksslpkcs7.h +++ /dev/null @@ -1,156 +0,0 @@ -/* This file is part of the KDE project - * - * Copyright (C) 2001-2003 George Staikos - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library 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 - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public License - * along with this library; see the file COPYING.LIB. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - */ - -#ifndef _KSSLPKCS7_H -#define _KSSLPKCS7_H - -#ifdef Q_WS_WIN -#include "ksslconfig_win.h" -#else -#include "ksslconfig.h" -#endif - -#ifdef KSSL_HAVE_SSL -#define crypt _openssl_crypt -#include -#undef crypt -#else -class PKCS7; -class X509; -#endif - -//#include -#include -#include - -#ifndef STACK_OF -#define STACK_OF(x) void -#endif - -class KSSL; -class KSSLPKCS7Private; -class KOpenSSLProxy; - -/** - * KDE PKCS#7 Certificate - * - * This class represents a PKCS#7 certificate - * - * @author George Staikos - * @see KSSL - * @short KDE PKCS#7 Certificate - */ -class TDEIO_EXPORT KSSLPKCS7 { -friend class KSSL; - -public: - /** - * Destroy this PKCS#7 certificate - */ - virtual ~KSSLPKCS7(); - - /** - * The name of this certificate. This can be used to refer to the - * certificate instead of passing the object itself. - * @return the name of the certificate - */ - TQString name(); - - /** - * Create a KSSLPKCS7 object from a Base64 in a TQString. - * @param base64 the base64 representation of the certificate - * @return a PKCS#7 object, or NULL on failure - */ - static KSSLPKCS7* fromString(TQString base64); - - /** - * Create a KSSLPKCS7 object by reading a PKCS#7 file. - * @param filename the filename to read the certificate from - * @return a PKCS#7 object, or NULL on failure - */ - static KSSLPKCS7* loadCertFile(TQString filename); - - /** - * Convert to a Base64 string. - * @return the PKCS#7 object in base64 form - */ - TQString toString(); - - /** - * Raw set the PKCS7 object. - * @param c the PKCS7 object - * @internal - */ - void setCert(PKCS7 *c); - - /** - * Get the bottom level X.509 certificate. - * @return the certificate, or NULL on failure - * @see KSSLCertificate - */ - KSSLCertificate *getCertificate(); - - /** - * Get the certificate chain. - * @return the certificate chain - * @see KSSLCertChain - */ - KSSLCertChain *getChain(); - - /** - * Write the PKCS#7 to a file in raw mode. - * @param filename the filename to write - * @return true on success - */ - bool toFile(TQString filename); - - /** - * Check the chain to make sure it's valid. - * @return the result of the validation procedure - */ - KSSLCertificate::KSSLValidation validate(); - - /** - * Check the chain to make sure it's valid. - * Ignore any cached validation result. - * @return the result of the validation - * @see KSSLCertificate - */ - KSSLCertificate::KSSLValidation revalidate(); - - /** - * Return true if the chain is valid. - */ - bool isValid(); - -protected: - KSSLPKCS7(); - -private: - KSSLPKCS7Private *d; - PKCS7 *_pkcs; - KOpenSSLProxy *kossl; - KSSLCertificate *_cert; - KSSLCertChain *_chain; -}; - - -#endif - diff --git a/kio/kssl/ksslsession.cc b/kio/kssl/ksslsession.cc deleted file mode 100644 index 3c80233f1..000000000 --- a/kio/kssl/ksslsession.cc +++ /dev/null @@ -1,82 +0,0 @@ -/* This file is part of the KDE project - * - * Copyright (C) 2003 George Staikos - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library 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 - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public License - * along with this library; see the file COPYING.LIB. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - */ - -#include "ksslsession.h" - -#ifdef HAVE_CONFIG_H -#include -#endif - -#include -#include - -KSSLSession::KSSLSession() : _session(0L) { -} - - -KSSLSession::~KSSLSession() { -#ifdef KSSL_HAVE_SSL - if (_session) { - KOpenSSLProxy::self()->SSL_SESSION_free(static_cast(_session)); - _session = 0L; - } -#endif -} - - -TQString KSSLSession::toString() const { -TQString rc; -#ifdef KSSL_HAVE_SSL -TQByteArray qba; -SSL_SESSION *session = static_cast(_session); -unsigned int slen = KOpenSSLProxy::self()->i2d_SSL_SESSION(session, 0L); -unsigned char *csess = new unsigned char[slen]; -unsigned char *p = csess; - - if (!KOpenSSLProxy::self()->i2d_SSL_SESSION(session, &p)) { - delete[] csess; - return TQString::null; - } - - // encode it into a QString - qba.duplicate((const char*)csess, slen); - delete[] csess; - rc = KCodecs::base64Encode(qba); -#endif -return rc; -} - - -KSSLSession *KSSLSession::fromString(const TQString& s) { -KSSLSession *session = 0L; -#ifdef KSSL_HAVE_SSL -TQByteArray qba, qbb = s.local8Bit().copy(); - KCodecs::base64Decode(qbb, qba); - unsigned char *qbap = reinterpret_cast(qba.data()); - SSL_SESSION *ss = KOSSL::self()->d2i_SSL_SESSION(0L, &qbap, qba.size()); - if (ss) { - session = new KSSLSession; - session->_session = ss; - } -#endif -return session; -} - - diff --git a/kio/kssl/ksslsession.h b/kio/kssl/ksslsession.h deleted file mode 100644 index 394a4b91a..000000000 --- a/kio/kssl/ksslsession.h +++ /dev/null @@ -1,73 +0,0 @@ -/* This file is part of the KDE project - * - * Copyright (C) 2003 George Staikos - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library 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 - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public License - * along with this library; see the file COPYING.LIB. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - */ - -#ifndef _KSSLSESSION_H -#define _KSSLSESSION_H - -#include - -#include - -class KSSL; - -class KSSLSessionPrivate; - -/** - * KDE SSL Session Information - * - * This class contains data about an SSL session. - * It is just used as a container that is taken from or passed to KSSL objects. - * - * @author George Staikos - * @see KSSL - * @short KDE SSL Session Information - */ -class TDEIO_EXPORT KSSLSession { -friend class KSSL; -public: - /** - * Destroy this instance - */ - ~KSSLSession(); - - /** - * Convert to a base64 encoded string (so it can be copied safely) - */ - TQString toString() const; - - /** - * Create as session ID object from a base64 encoded string. - * @param s the session id in base64 encoded ASN.1 format - * @return a KSSLSession object, or 0L on error - */ - static KSSLSession* fromString(const TQString& s); - -protected: - KSSLSession(); - KSSLSession(const KSSLSession&); - void *_session; - -private: - KSSLSessionPrivate *d; -}; - - -#endif - diff --git a/kio/kssl/ksslsettings.cc b/kio/kssl/ksslsettings.cc deleted file mode 100644 index eb91ea9cb..000000000 --- a/kio/kssl/ksslsettings.cc +++ /dev/null @@ -1,356 +0,0 @@ -/* This file is part of the KDE project - * - * Copyright (C) 2000 George Staikos - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library 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 - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public License - * along with this library; see the file COPYING.LIB. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - */ - -#ifdef HAVE_CONFIG_H -#include -#endif - -#include -#include - -#include -#include -#include - -#include -#include - -#include "ksslsettings.h" -#include -#include -#include - -// this hack provided by Malte Starostik to avoid glibc/openssl bug -// on some systems -#ifdef KSSL_HAVE_SSL -#define crypt _openssl_crypt -#include -#undef crypt -#endif -#include - -#ifdef KSSL_HAVE_SSL -#define sk_new d->kossl->sk_new -#define sk_push d->kossl->sk_push -#define sk_free d->kossl->sk_free -#define sk_value d->kossl->sk_value -#define sk_num d->kossl->sk_num -#define sk_dup d->kossl->sk_dup -#define sk_pop d->kossl->sk_pop -#endif - - class CipherNode { - public: - CipherNode(const char *_name, int _keylen) : - name(_name), keylen(_keylen) {} - TQString name; - int keylen; - inline int operator==(CipherNode &x) - { return ((x.keylen == keylen) && (x.name == name)); } - inline int operator< (CipherNode &x) { return keylen < x.keylen; } - inline int operator<=(CipherNode &x) { return keylen <= x.keylen; } - inline int operator> (CipherNode &x) { return keylen > x.keylen; } - inline int operator>=(CipherNode &x) { return keylen >= x.keylen; } - }; - - -class KSSLSettingsPrivate { -public: - KSSLSettingsPrivate() { - kossl = NULL; // try to delay this as long as possible - } - ~KSSLSettingsPrivate() { - - } - - KOSSL *kossl; - bool m_bUseEGD; - bool m_bUseEFile; - TQString m_EGDPath; - bool m_bSendX509; - bool m_bPromptX509; -}; - -// -// FIXME -// Implementation note: for now, we only read cipher settings from disk, -// and do not store them in memory. This should change. -// - -KSSLSettings::KSSLSettings(bool readConfig) { - d = new KSSLSettingsPrivate; - m_cfg = new TDEConfig("cryptodefaults", false, false); - - if (!TDEGlobal::dirs()->addResourceType("kssl", KStandardDirs::kde_default("data") + "kssl")) { - //kdDebug(7029) << "Error adding (kssl, share/apps/kssl)" << endl; - } - - if (readConfig) load(); -} - - -// we don't save settings incase it was a temporary object -KSSLSettings::~KSSLSettings() { - delete m_cfg; - delete d; -} - - -bool KSSLSettings::sslv2() const { - return m_bUseSSLv2; -} - - -bool KSSLSettings::sslv3() const { - return m_bUseSSLv3; -} - - -bool KSSLSettings::tlsv1() const { - return m_bUseTLSv1; -} - - -// FIXME: we should make a default list available if this fails -// since OpenSSL seems to just choose any old thing if it's given an -// empty list. This behavior is not confirmed though. -TQString KSSLSettings::getCipherList() { - TQString clist; -#ifdef KSSL_HAVE_SSL - TQString tcipher; - bool firstcipher = true; - SSL_METHOD *meth = 0L; - TQPtrList cipherList; - - cipherList.setAutoDelete(true); - - if (!d->kossl) - d->kossl = KOSSL::self(); - - if (m_bUseSSLv3 && m_bUseSSLv2) - meth = d->kossl->SSLv23_client_method(); - else if(m_bUseSSLv3) - meth = d->kossl->SSLv3_client_method(); - else if (m_bUseSSLv2) - meth = d->kossl->SSLv2_client_method(); - - SSL_CTX *ctx = d->kossl->SSL_CTX_new(meth); - SSL* ssl = d->kossl->SSL_new(ctx); - STACK_OF(SSL_CIPHER)* sk = d->kossl->SSL_get_ciphers(ssl); - int cnt = sk_SSL_CIPHER_num(sk); - for (int i=0; i< cnt; i++) { - SSL_CIPHER *sc = sk_SSL_CIPHER_value(sk,i); - if (!sc) - break; - - if(!strcmp("SSLv2", d->kossl->SSL_CIPHER_get_version(sc))) - m_cfg->setGroup("SSLv2"); - else - m_cfg->setGroup("SSLv3"); - - tcipher.sprintf("cipher_%s", sc->name); - int bits = d->kossl->SSL_CIPHER_get_bits(sc, NULL); - if (m_cfg->readBoolEntry(tcipher, bits >= 56)) { - CipherNode *xx = new CipherNode(sc->name,bits); - if (!cipherList.contains(xx)) - cipherList.prepend(xx); - else - delete xx; - } - } - d->kossl->SSL_free(ssl); - d->kossl->SSL_CTX_free(ctx); - - // Remove any ADH ciphers as per RFC2246 - // Also remove NULL ciphers and 168bit ciphers - for (unsigned int i = 0; i < cipherList.count(); i++) { - CipherNode *j = 0L; - while ((j = cipherList.at(i)) != 0L) { - if (j->name.contains("ADH-") || j->name.contains("NULL-") || j->name.contains("DES-CBC3-SHA") || j->name.contains("FZA")) { - cipherList.remove(j); - } else { - break; - } - } - } - - // now assemble the list cipher1:cipher2:cipher3:...:ciphern - while (!cipherList.isEmpty()) { - if (firstcipher) - firstcipher = false; - else clist.append(":"); - clist.append(cipherList.getLast()->name); - cipherList.removeLast(); - } // while - - kdDebug(7029) << "Cipher list is: " << clist << endl; - -#endif - return clist; -} - -// FIXME - sync these up so that we can use them with the control module!! -void KSSLSettings::load() { - m_cfg->reparseConfiguration(); - - m_cfg->setGroup("TLS"); - m_bUseTLSv1 = m_cfg->readBoolEntry("Enabled", true); - - m_cfg->setGroup("SSLv2"); - m_bUseSSLv2 = m_cfg->readBoolEntry("Enabled", false); - - m_cfg->setGroup("SSLv3"); - m_bUseSSLv3 = m_cfg->readBoolEntry("Enabled", true); - - m_cfg->setGroup("Warnings"); - m_bWarnOnEnter = m_cfg->readBoolEntry("OnEnter", false); - m_bWarnOnLeave = m_cfg->readBoolEntry("OnLeave", true); - m_bWarnOnUnencrypted = m_cfg->readBoolEntry("OnUnencrypted", true); - m_bWarnOnMixed = m_cfg->readBoolEntry("OnMixed", true); - - m_cfg->setGroup("Validation"); - m_bWarnSelfSigned = m_cfg->readBoolEntry("WarnSelfSigned", true); - m_bWarnExpired = m_cfg->readBoolEntry("WarnExpired", true); - m_bWarnRevoked = m_cfg->readBoolEntry("WarnRevoked", true); - - m_cfg->setGroup("EGD"); - d->m_bUseEGD = m_cfg->readBoolEntry("UseEGD", false); - d->m_bUseEFile = m_cfg->readBoolEntry("UseEFile", false); - d->m_EGDPath = m_cfg->readPathEntry("EGDPath"); - - m_cfg->setGroup("Auth"); - d->m_bSendX509 = ("send" == m_cfg->readEntry("AuthMethod", "")); - d->m_bPromptX509 = ("prompt" == m_cfg->readEntry("AuthMethod", "")); - - #ifdef KSSL_HAVE_SSL - - - - #endif -} - - -void KSSLSettings::defaults() { - m_bUseTLSv1 = true; - m_bUseSSLv2 = false; - m_bUseSSLv3 = true; - m_bWarnOnEnter = false; - m_bWarnOnLeave = true; - m_bWarnOnUnencrypted = true; - m_bWarnOnMixed = true; - m_bWarnSelfSigned = true; - m_bWarnExpired = true; - m_bWarnRevoked = true; - d->m_bUseEGD = false; - d->m_bUseEFile = false; - d->m_EGDPath = ""; -} - - -void KSSLSettings::save() { - m_cfg->setGroup("TLS"); - m_cfg->writeEntry("Enabled", m_bUseTLSv1); - - m_cfg->setGroup("SSLv2"); - m_cfg->writeEntry("Enabled", m_bUseSSLv2); - - m_cfg->setGroup("SSLv3"); - m_cfg->writeEntry("Enabled", m_bUseSSLv3); - - m_cfg->setGroup("Warnings"); - m_cfg->writeEntry("OnEnter", m_bWarnOnEnter); - m_cfg->writeEntry("OnLeave", m_bWarnOnLeave); - m_cfg->writeEntry("OnUnencrypted", m_bWarnOnUnencrypted); - m_cfg->writeEntry("OnMixed", m_bWarnOnMixed); - - m_cfg->setGroup("Validation"); - m_cfg->writeEntry("WarnSelfSigned", m_bWarnSelfSigned); - m_cfg->writeEntry("WarnExpired", m_bWarnExpired); - m_cfg->writeEntry("WarnRevoked", m_bWarnRevoked); - - m_cfg->setGroup("EGD"); - m_cfg->writeEntry("UseEGD", d->m_bUseEGD); - m_cfg->writeEntry("UseEFile", d->m_bUseEFile); - m_cfg->writePathEntry("EGDPath", d->m_EGDPath); - - m_cfg->sync(); - // FIXME - ciphers -#if 0 -#ifdef KSSL_HAVE_SSL - m_cfg->setGroup("SSLv2"); - for (unsigned int i = 0; i < v2ciphers.count(); i++) { - TQString ciphername; - ciphername.sprintf("cipher_%s", v2ciphers[i].ascii()); - if (v2selectedciphers.contains(v2ciphers[i])) { - m_cfg->writeEntry(ciphername, true); - } else m_cfg->writeEntry(ciphername, false); - } - - m_cfg->setGroup("SSLv3"); - for (unsigned int i = 0; i < v3ciphers.count(); i++) { - TQString ciphername; - ciphername.sprintf("cipher_%s", v3ciphers[i].ascii()); - if (v3selectedciphers.contains(v3ciphers[i])) { - m_cfg->writeEntry(ciphername, true); - } else m_cfg->writeEntry(ciphername, false); - } -#endif - - m_cfg->sync(); - - // insure proper permissions -- contains sensitive data - TQString cfgName(TDEGlobal::dirs()->findResource("config", "cryptodefaults")); - if (!cfgName.isEmpty()) - ::chmod(TQFile::encodeName(cfgName), 0600); -#endif -} - - -bool KSSLSettings::warnOnEnter() const { return m_bWarnOnEnter; } -void KSSLSettings::setWarnOnEnter(bool x) { m_bWarnOnEnter = x; } -bool KSSLSettings::warnOnUnencrypted() const { return m_bWarnOnUnencrypted; } -void KSSLSettings::setWarnOnUnencrypted(bool x) { m_bWarnOnUnencrypted = x; } -bool KSSLSettings::warnOnLeave() const { return m_bWarnOnLeave; } -void KSSLSettings::setWarnOnLeave(bool x) { m_bWarnOnLeave = x; } -bool KSSLSettings::warnOnMixed() const { return m_bWarnOnMixed; } -bool KSSLSettings::warnOnSelfSigned() const { return m_bWarnSelfSigned; } -bool KSSLSettings::warnOnRevoked() const { return m_bWarnRevoked; } -bool KSSLSettings::warnOnExpired() const { return m_bWarnExpired; } -bool KSSLSettings::useEGD() const { return d->m_bUseEGD; } -bool KSSLSettings::useEFile() const { return d->m_bUseEFile; } -bool KSSLSettings::autoSendX509() const { return d->m_bSendX509; } -bool KSSLSettings::promptSendX509() const { return d->m_bPromptX509; } - -void KSSLSettings::setTLSv1(bool enabled) { m_bUseTLSv1 = enabled; } -void KSSLSettings::setSSLv2(bool enabled) { m_bUseSSLv2 = enabled; } -void KSSLSettings::setSSLv3(bool enabled) { m_bUseSSLv3 = enabled; } - -TQString& KSSLSettings::getEGDPath() { return d->m_EGDPath; } - -#ifdef KSSL_HAVE_SSL -#undef sk_new -#undef sk_push -#undef sk_free -#undef sk_value -#undef sk_num -#undef sk_pop -#undef sk_dup -#endif - diff --git a/kio/kssl/ksslsettings.h b/kio/kssl/ksslsettings.h deleted file mode 100644 index 18dd31249..000000000 --- a/kio/kssl/ksslsettings.h +++ /dev/null @@ -1,224 +0,0 @@ -/* This file is part of the KDE project - * - * Copyright (C) 2000-2003 George Staikos - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library 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 - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public License - * along with this library; see the file COPYING.LIB. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - */ - -#ifndef _KSSLSETTINGS_H -#define _KSSLSETTINGS_H - -#include -#include -#include - -class KSSLSettingsPrivate; - -/** - * KDE SSL Settings - * - * This class contains some of the SSL settings for easy use. - * - * @author George Staikos - * @see KSSL - * @short KDE SSL Settings - */ -class TDEIO_EXPORT KSSLSettings { -public: - /** - * Construct a KSSL Settings object - * - * @param readConfig read in the configuration immediately if true - */ - KSSLSettings(bool readConfig = true); - - /** - * Destroy this KSSL Settings object - */ - ~KSSLSettings(); - - /** - * Does the user allow SSLv2 - * @return true if the user allows SSLv2 - */ - bool sslv2() const; - - /** - * Does the user allow SSLv3 - * @return true if the user allows SSLv3 - */ - bool sslv3() const; - - /** - * Does the user allow TLSv1 - * @return true if the user allows TLSv1 - */ - bool tlsv1() const; - - /** - * Does the user want to be warned on entering SSL mode - * @return true if the user wants to be warned - */ - bool warnOnEnter() const; - - /** - * Change the user's warnOnEnter() setting - * @since 3.3 - * @param x true if the user is to be warned - * @see warnOnEnter - */ - void setWarnOnEnter(bool x); - - /** - * Does the user want to be warned on sending unencrypted data - * @return true if the user wants to be warned - * @see setWarnOnUnencrypted - */ - bool warnOnUnencrypted() const; - - /** - * Change the user's warnOnUnencrypted() setting - * @param x true if the user is to be warned - * @see warnOnUnencrypted - */ - void setWarnOnUnencrypted(bool x); - - /** - * Does the user want to be warned on leaving SSL mode - * @return true if the user wants to be warned - */ - bool warnOnLeave() const; - - /** - * Change the user's warnOnLeave() setting - * @since 3.3 - * @param x true if the user is to be warned - * @see warnOnLeave - */ - void setWarnOnLeave(bool x); - - /** - * Does the user want to be warned during mixed SSL/non-SSL mode - * @return true if the user wants to be warned - */ - bool warnOnMixed() const; - - /** - * Do not use this - * @deprecated - */ - bool warnOnSelfSigned() const KDE_DEPRECATED; - - /** - * Do not use this - * @deprecated - */ - bool warnOnRevoked() const KDE_DEPRECATED; - - /** - * Do not use this - * @deprecated - */ - bool warnOnExpired() const KDE_DEPRECATED; - - /** - * Does the user want to use the Entropy Gathering Daemon? - * @return true if the user wants to use EGD - */ - bool useEGD() const; - - /** - * Does the user want to use an entropy file? - * @return true if the user wants to use an entropy file - */ - bool useEFile() const; - - /** - * Change the user's TLSv1 preference - * @param enabled true if TLSv1 is enabled - */ - void setTLSv1(bool enabled); - - /** - * Change the user's SSLv2 preference - * @param enabled true if SSLv2 is enabled - */ - void setSSLv2(bool enabled); - - /** - * Change the user's SSLv3 preference - * @param enabled true if SSLv3 is enabled - */ - void setSSLv3(bool enabled); - - /** - * Does the user want X.509 client certificates to always be sent when - * possible? - * @return true if the user always wants a certificate sent - */ - bool autoSendX509() const; - - /** - * Does the user want to be prompted to send X.509 client certificates - * when possible? - * @return true if the user wants to be prompted - */ - bool promptSendX509() const; - - /** - * Get the OpenSSL cipher list for selecting the list of ciphers to - * use in a connection. - * @return the cipher list - */ - TQString getCipherList(); - - /** - * Get the configured path to the entropy gathering daemon or entropy - * file. - * @return the path - */ - TQString& getEGDPath(); - - /** - * Load the user's settings. - */ - void load(); - - /** - * Revert to default settings. - */ - void defaults(); - - /** - * Save the current settings. - */ - void save(); - -private: - TDEConfig *m_cfg; - bool m_bUseSSLv2, m_bUseSSLv3, m_bUseTLSv1; - bool m_bWarnOnEnter, m_bWarnOnUnencrypted, m_bWarnOnLeave, m_bWarnOnMixed; - bool m_bWarnSelfSigned, m_bWarnRevoked, m_bWarnExpired; - - TQValueList v2ciphers, v2selectedciphers, v3ciphers, v3selectedciphers; - TQValueList v2bits, v3bits; - - KSSLSettingsPrivate *d; -}; - - -#endif - diff --git a/kio/kssl/ksslsigners.cc b/kio/kssl/ksslsigners.cc deleted file mode 100644 index 028ddf555..000000000 --- a/kio/kssl/ksslsigners.cc +++ /dev/null @@ -1,251 +0,0 @@ -/* This file is part of the KDE project - * - * Copyright (C) 2001 George Staikos - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library 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 - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public License - * along with this library; see the file COPYING.LIB. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - */ - - -#include -#include -#include "ksslcertificate.h" -#include "ksslsigners.h" -#include -#include -#include -#include - - -KSSLSigners::KSSLSigners() { - dcc = new DCOPClient; - dcc->attach(); -} - - -KSSLSigners::~KSSLSigners() { - delete dcc; -} - -bool KSSLSigners::addCA(KSSLCertificate& cert, - bool ssl, - bool email, - bool code) { - return addCA(cert.toString(), ssl, email, code); -} - - -bool KSSLSigners::addCA(TQString cert, - bool ssl, - bool email, - bool code) { - TQByteArray data, retval; - TQCString rettype; - TQDataStream arg(data, IO_WriteOnly); - arg << cert; - arg << ssl << email << code; - bool rc = dcc->call("kded", "kssld", - "caAdd(TQString,bool,bool,bool)", - data, rettype, retval); - - if (rc && rettype == "bool") { - TQDataStream retStream(retval, IO_ReadOnly); - bool drc; - retStream >> drc; - return drc; - } - -return false; -} - - -bool KSSLSigners::regenerate() { - TQByteArray data, retval; - TQCString rettype; - TQDataStream arg(data, IO_WriteOnly); - bool rc = dcc->call("kded", "kssld", - "caRegenerate()", - data, rettype, retval); - - if (rc && rettype == "bool") { - TQDataStream retStream(retval, IO_ReadOnly); - bool drc; - retStream >> drc; - return drc; - } - -return false; -} - - -bool KSSLSigners::useForSSL(KSSLCertificate& cert) { - return useForSSL(cert.getSubject()); -} - - -bool KSSLSigners::useForSSL(TQString subject) { - TQByteArray data, retval; - TQCString rettype; - TQDataStream arg(data, IO_WriteOnly); - arg << subject; - bool rc = dcc->call("kded", "kssld", - "caUseForSSL(TQString)", - data, rettype, retval); - - if (rc && rettype == "bool") { - TQDataStream retStream(retval, IO_ReadOnly); - bool drc; - retStream >> drc; - return drc; - } - -return false; -} - - -bool KSSLSigners::useForEmail(KSSLCertificate& cert) { - return useForEmail(cert.getSubject()); -} - - -bool KSSLSigners::useForEmail(TQString subject) { - TQByteArray data, retval; - TQCString rettype; - TQDataStream arg(data, IO_WriteOnly); - arg << subject; - bool rc = dcc->call("kded", "kssld", - "caUseForEmail(TQString)", - data, rettype, retval); - - if (rc && rettype == "bool") { - TQDataStream retStream(retval, IO_ReadOnly); - bool drc; - retStream >> drc; - return drc; - } - -return false; -} - - -bool KSSLSigners::useForCode(KSSLCertificate& cert) { - return useForCode(cert.getSubject()); -} - - -bool KSSLSigners::useForCode(TQString subject) { - TQByteArray data, retval; - TQCString rettype; - TQDataStream arg(data, IO_WriteOnly); - arg << subject; - bool rc = dcc->call("kded", "kssld", - "caUseForCode(TQString)", - data, rettype, retval); - - if (rc && rettype == "bool") { - TQDataStream retStream(retval, IO_ReadOnly); - bool drc; - retStream >> drc; - return drc; - } - -return false; -} - - -bool KSSLSigners::remove(KSSLCertificate& cert) { - return remove(cert.getSubject()); -} - - -bool KSSLSigners::remove(TQString subject) { - TQByteArray data, retval; - TQCString rettype; - TQDataStream arg(data, IO_WriteOnly); - arg << subject; - bool rc = dcc->call("kded", "kssld", - "caRemove(TQString)", - data, rettype, retval); - - if (rc && rettype == "bool") { - TQDataStream retStream(retval, IO_ReadOnly); - bool drc; - retStream >> drc; - return drc; - } - -return false; -} - - -TQStringList KSSLSigners::list() { - TQStringList drc; - TQByteArray data, retval; - TQCString rettype; - TQDataStream arg(data, IO_WriteOnly); - bool rc = dcc->call("kded", "kssld", - "caList()", - data, rettype, retval); - - if (rc && rettype == TQSTRINGLIST_OBJECT_NAME_STRING) { - TQDataStream retStream(retval, IO_ReadOnly); - retStream >> drc; - } - -return drc; -} - - -TQString KSSLSigners::getCert(TQString subject) { - TQString drc; - TQByteArray data, retval; - TQCString rettype; - TQDataStream arg(data, IO_WriteOnly); - arg << subject; - bool rc = dcc->call("kded", "kssld", - "caGetCert(TQString)", - data, rettype, retval); - - if (rc && rettype == TQSTRING_OBJECT_NAME_STRING) { - TQDataStream retStream(retval, IO_ReadOnly); - retStream >> drc; - } - -return drc; -} - - -bool KSSLSigners::setUse(TQString subject, bool ssl, bool email, bool code) { - TQByteArray data, retval; - TQCString rettype; - TQDataStream arg(data, IO_WriteOnly); - arg << subject << ssl << email << code; - bool rc = dcc->call("kded", "kssld", - "caSetUse(TQString,bool,bool,bool)", - data, rettype, retval); - - if (rc && rettype == "bool") { - TQDataStream retStream(retval, IO_ReadOnly); - bool drc; - retStream >> drc; - return drc; - } - -return false; -} - - - - diff --git a/kio/kssl/ksslsigners.h b/kio/kssl/ksslsigners.h deleted file mode 100644 index 3149e852a..000000000 --- a/kio/kssl/ksslsigners.h +++ /dev/null @@ -1,172 +0,0 @@ -/* This file is part of the KDE project - * - * Copyright (C) 2001-2003 George Staikos - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library 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 - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public License - * along with this library; see the file COPYING.LIB. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - */ - - -#ifndef _INCLUDE_KSSLSIGNERS_H -#define _INCLUDE_KSSLSIGNERS_H - -class KSSLCertificate; -class DCOPClient; - -#include - -#include - -// ### KDE4 - Fix constness -/** - * KDE SSL Signer Database - * - * This class is used to manipulate the KDE SSL signer database. It - * communicates to the KDE SSL daemon via dcop for backend integration. - * - * @author George Staikos - * @see KSSL, KSSLCertificate - * @short KDE SSL Signer Database - */ -class TDEIO_EXPORT KSSLSigners { -public: - /** - * Construct a KSSLSigner object. - */ - KSSLSigners(); - - /** - * Destroy this KSSLSigner object. - */ - ~KSSLSigners(); - - /** - * Add a signer to the database. - * - * @param cert the signer's certificate - * @param ssl allow it to sign for SSL - * @param email allow it to sign for S/MIME - * @param code allow it to sign for code signing - * @return true on success - */ - bool addCA(KSSLCertificate& cert, bool ssl, bool email, bool code); - - /** - * Add a signer to the database. - * - * @param cert the signer's certificate in base64 form - * @param ssl allow it to sign for SSL - * @param email allow it to sign for S/MIME - * @param code allow it to sign for code signing - * @return true on success - */ - bool addCA(TQString cert, bool ssl, bool email, bool code); - - /** - * Regenerate the signer-root file from the user's settings. - * @return true on success - */ - bool regenerate(); - - /** - * Determine if a certificate can be used for SSL certificate signing - * @param cert the certificate - * @return true if it can be used for SSL - */ - bool useForSSL(KSSLCertificate& cert); - - /** - * Determine if a certificate can be used for SSL certificate signing - * @param subject the certificate subject - * @return true if it can be used for SSL - */ - bool useForSSL(TQString subject); - - /** - * Determine if a certificate can be used for S/MIME certificate signing - * @param cert the certificate - * @return true if it can be used for S/MIME - */ - bool useForEmail(KSSLCertificate& cert); - - /** - * Determine if a certificate can be used for S/MIME certificate signing - * @param subject the certificate subject - * @return true if it can be used for S/MIME - */ - bool useForEmail(TQString subject); - - /** - * Determine if a certificate can be used for code certificate signing - * @param cert the certificate - * @return true if it can be used for code - */ - bool useForCode(KSSLCertificate& cert); - - /** - * Determine if a certificate can be used for code certificate signing - * @param subject the certificate subject - * @return true if it can be used for code - */ - bool useForCode(TQString subject); - - /** - * Remove a certificate signer from the database - * @param cert the certificate to remove - * @return true on success - */ - bool remove(KSSLCertificate& cert); - - /** - * Remove a certificate signer from the database - * @param subject the subject of the certificate to remove - * @return true on success - */ - bool remove(TQString subject); - - /** - * List the signers in the database. - * @return the list of subjects in the database - * @see getCert - */ - TQStringList list(); - - /** - * Get a signer certificate from the database. - * - * @param subject the subject of the certificate desired - * @return the base64 encoded certificate - */ - TQString getCert(TQString subject); - - /** - * Set the use of a particular entry in the certificate signer database. - * @param subject the subject of the certificate in question - * @param ssl allow this for SSL certificate signing - * @param email allow this for S/MIME certificate signing - * @param code allow this for code certificate signing - * @return true on success - */ - bool setUse(TQString subject, bool ssl, bool email, bool code); - -private: - class KSSLSignersPrivate; - KSSLSignersPrivate *d; - - DCOPClient *dcc; -}; - - -#endif diff --git a/kio/kssl/ksslutils.cc b/kio/kssl/ksslutils.cc deleted file mode 100644 index 80651757f..000000000 --- a/kio/kssl/ksslutils.cc +++ /dev/null @@ -1,94 +0,0 @@ -/* This file is part of the KDE project - * - * Copyright (C) 2000,2001 George Staikos - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library 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 - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public License - * along with this library; see the file COPYING.LIB. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - */ - - -#include "ksslutils.h" - -#include -#include -#include -#include - -#include "kopenssl.h" - -#ifdef KSSL_HAVE_SSL -// This code is mostly taken from OpenSSL v0.9.5a -// by Eric Young -TQDateTime ASN1_UTCTIME_QDateTime(ASN1_UTCTIME *tm, int *isGmt) { -TQDateTime qdt; -char *v; -int gmt=0; -int i; -int y=0,M=0,d=0,h=0,m=0,s=0; -TQDate qdate; -TQTime qtime; - - i = tm->length; - v = (char *)tm->data; - - if (i < 10) goto auq_err; - if (v[i-1] == 'Z') gmt=1; - for (i=0; i<10; i++) - if ((v[i] > '9') || (v[i] < '0')) goto auq_err; - y = (v[0]-'0')*10+(v[1]-'0'); - if (y < 50) y+=100; - M = (v[2]-'0')*10+(v[3]-'0'); - if ((M > 12) || (M < 1)) goto auq_err; - d = (v[4]-'0')*10+(v[5]-'0'); - h = (v[6]-'0')*10+(v[7]-'0'); - m = (v[8]-'0')*10+(v[9]-'0'); - if ( (v[10] >= '0') && (v[10] <= '9') && - (v[11] >= '0') && (v[11] <= '9')) - s = (v[10]-'0')*10+(v[11]-'0'); - - // localize the date and display it. - qdate.setYMD(y+1900, M, d); - qtime.setHMS(h,m,s); - qdt.setDate(qdate); qdt.setTime(qtime); - auq_err: - if (isGmt) *isGmt = gmt; -return qdt; -} - - -TQString ASN1_UTCTIME_QString(ASN1_UTCTIME *tm) { - TQString qstr; - int gmt; - TQDateTime qdt = ASN1_UTCTIME_QDateTime(tm, &gmt); - - qstr = TDEGlobal::locale()->formatDateTime(qdt, false, true); - if (gmt) { - qstr += " "; - qstr += i18n("GMT"); - } - return qstr; -} - - -TQString ASN1_INTEGER_QString(ASN1_INTEGER *aint) { -char *rep = KOSSL::self()->i2s_ASN1_INTEGER(NULL, aint); -TQString yy = rep; -KOSSL::self()->OPENSSL_free(rep); -return yy; -} - - -#endif - diff --git a/kio/kssl/ksslutils.h b/kio/kssl/ksslutils.h deleted file mode 100644 index 4c087374f..000000000 --- a/kio/kssl/ksslutils.h +++ /dev/null @@ -1,77 +0,0 @@ -/* This file is part of the KDE project - * - * Copyright (C) 2000-2003 George Staikos - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library 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 - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public License - * along with this library; see the file COPYING.LIB. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - */ -#ifndef _INCLUDE_KSSLUTILS_H -#define _INCLUDE_KSSLUTILS_H - -#include - -#ifdef Q_WS_WIN -#include "ksslconfig_win.h" -#else -#include "ksslconfig.h" -#endif - -#include -#ifdef KSSL_HAVE_SSL -#define crypt _openssl_crypt -#include -#undef crypt -#endif -class TQString; -class TQDateTime; - - -#ifdef KSSL_HAVE_SSL -// This functionality is missing in OpenSSL -/** - * Convert an ASN1 UTCTIME value to a string. Uses KLocale settings. - * - * @param tm the OpenSSL ASN1_UTCTIME pointer - * - * @return the date formatted in a QString - * @see ASN1_UTCTIME_QDateTime - */ -KDE_EXPORT TQString ASN1_UTCTIME_QString(ASN1_UTCTIME *tm); - -/** - * Convert an ASN1 UTCTIME value to a TQDateTime. Uses KLocale settings. - * - * @param tm the OpenSSL ASN1_UTCTIME pointer - * @param isGmt set to 1 if the date is set to GMT - * - * @return the date formatted in a QDateTime - */ -KDE_EXPORT TQDateTime ASN1_UTCTIME_QDateTime(ASN1_UTCTIME *tm, int *isGmt); - - -/** - * Convert an ASN1 INTEGER value to a string. - * - * @param aint the OpenSSL ASN1_INTEGER pointer - * - * @return the number formatted in a QString - */ -KDE_EXPORT TQString ASN1_INTEGER_QString(ASN1_INTEGER *aint); -#endif - - - - -#endif diff --git a/kio/kssl/ksslx509map.cc b/kio/kssl/ksslx509map.cc deleted file mode 100644 index 7896fdfcf..000000000 --- a/kio/kssl/ksslx509map.cc +++ /dev/null @@ -1,103 +0,0 @@ -/* This file is part of the KDE project - * - * Copyright (C) 2000 George Staikos - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library 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 - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public License - * along with this library; see the file COPYING.LIB. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - */ - -#include "ksslx509map.h" -#include -#include - -KSSLX509Map::KSSLX509Map(const TQString& name) { - parse(name); -} - - -KSSLX509Map::~KSSLX509Map() { - -} - - -void KSSLX509Map::setValue(const TQString& key, const TQString& value) { - m_pairs.replace(key, value); -} - - -TQString KSSLX509Map::getValue(const TQString& key) const { - if (!m_pairs.contains(key)) { - return TQString::null; - } - - return m_pairs[key]; -} - -static TQStringList tokenizeBy(const TQString& str, const TQRegExp& tok, bool keepEmpties = false) { -TQStringList tokens; -unsigned int head, tail; -const char *chstr = str.ascii(); -unsigned int length = str.length(); - - if (length < 1) { - return tokens; - } - - if (length == 1) { - tokens.append(str); - return tokens; - } - - for(head = 0, tail = 0; tail < length-1; head = tail+1) { - TQString thisline; - - tail = str.find(tok, head); - - if (tail > length) // last token - none at end - tail = length; - - if (tail-head > 0 || keepEmpties) { // it has to be at least 1 long! - thisline = &(chstr[head]); - thisline.truncate(tail-head); - tokens.append(thisline); - } - } - return tokens; -} - - -void KSSLX509Map::parse(const TQString& name) { -TQStringList vl = tokenizeBy(name, TQRegExp("/[A-Za-z]+="), false); - - m_pairs.clear(); - - for (TQStringList::Iterator j = vl.begin(); j != vl.end(); ++j) { - TQStringList apair = tokenizeBy(*j, TQRegExp("="), false); - if (m_pairs.contains(apair[0])) { - TQString oldValue = m_pairs[apair[0]]; - oldValue += "\n"; - oldValue += apair[1]; - m_pairs.replace(apair[0], oldValue); - } else { - m_pairs.insert(apair[0], apair[1]); - } - } -} - - -void KSSLX509Map::reset(const TQString& name) { - parse(name); -} - diff --git a/kio/kssl/ksslx509map.h b/kio/kssl/ksslx509map.h deleted file mode 100644 index f76413100..000000000 --- a/kio/kssl/ksslx509map.h +++ /dev/null @@ -1,86 +0,0 @@ -/* This file is part of the KDE project - * - * Copyright (C) 2000-2003 George Staikos - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library 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 - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public License - * along with this library; see the file COPYING.LIB. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - */ - -#ifndef _KSSLX509MAP_H -#define _KSSLX509MAP_H - -#include -#include - -#include - -/** - * X.509 Map Parsing Class - * - * This class is used to parse and store a map as used in X.509 certificates. - * It is of the form /name=value/name=value/name=value - * - * @author George Staikos - * @see KSSL, KSSLCertificate - * @short X.509 Map Parser - */ -class TDEIO_EXPORT KSSLX509Map { -public: - /** - * Construct an X.509 Map - * - * @param name the map to parse - */ - KSSLX509Map(const TQString& name); - - /** - * Destroy this map - */ - ~KSSLX509Map(); - - /** - * Set a value in the map - * - * @param key the key - * @param value the value - */ - void setValue(const TQString& key, const TQString& value); - - /** - * Get the value of an entry in the map - * - * @param key the key - * - * @return the value - */ - TQString getValue(const TQString& key) const; - - /** - * Reset (clear) the internal storage. - * - * @param name if this is not empty, it will be parsed and used as - * the new map internally - */ - void reset(const TQString& name = ""); - -private: - class KSSLX509MapPrivate; - KSSLX509MapPrivate *d; - TQMap m_pairs; - - void parse(const TQString& name); -}; - -#endif diff --git a/kio/kssl/ksslx509v3.cc b/kio/kssl/ksslx509v3.cc deleted file mode 100644 index a3310b9db..000000000 --- a/kio/kssl/ksslx509v3.cc +++ /dev/null @@ -1,143 +0,0 @@ -/* This file is part of the KDE project - * - * Copyright (C) 2001 George Staikos - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library 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 - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public License - * along with this library; see the file COPYING.LIB. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - */ - -#ifdef HAVE_CONFIG_H -#include -#endif - -#include "ksslx509v3.h" -#include -#include - - -KSSLX509V3::KSSLX509V3() { - flags = 0; -} - - -KSSLX509V3::~KSSLX509V3() { -} - - -/* When reading this, please remember that - * !A || B is logically equivalent to A => B - */ - -bool KSSLX509V3::certTypeCA() { -#ifdef KSSL_HAVE_SSL - // First try CA without X509_PURPOSE_ANY CA, then just try SSLCA - return (flags & (65471L << 16)) ? true : certTypeSSLCA(); -#endif - return false; -} - - -bool KSSLX509V3::certTypeSSLCA() { -#ifdef KSSL_HAVE_SSL - return (flags & ((1 << (16+X509_PURPOSE_NS_SSL_SERVER-1))| - (1 << (16+X509_PURPOSE_SSL_SERVER-1))| - (1 << (16+X509_PURPOSE_SSL_CLIENT-1)))) ? true : - (false || ((1 << (16+X509_PURPOSE_ANY-1)) && - (certTypeSSLServer() || - certTypeSSLClient() || - certTypeNSSSLServer()))); -#endif - return false; -} - - -bool KSSLX509V3::certTypeEmailCA() { -#ifdef KSSL_HAVE_SSL - return (flags & ((1 << (16+X509_PURPOSE_SMIME_ENCRYPT-1))| - (1 << (16+X509_PURPOSE_SMIME_SIGN-1)))) ? true : - (false || ((1 << (16+X509_PURPOSE_ANY-1)) && - certTypeSMIME())); -#endif - return false; -} - - -bool KSSLX509V3::certTypeCodeCA() { -#ifdef KSSL_HAVE_SSL - return (flags & (1 << (16+X509_PURPOSE_ANY-1))) ? true : false; -#endif - return false; -} - - -bool KSSLX509V3::certTypeSSLClient() { -#ifdef KSSL_HAVE_SSL - return (flags & (1 << (X509_PURPOSE_SSL_CLIENT-1))) ? true : false; -#endif - return false; -} - - -bool KSSLX509V3::certTypeSSLServer() { -#ifdef KSSL_HAVE_SSL - return (flags & (1 << (X509_PURPOSE_SSL_SERVER-1))) ? true : false; -#endif - return false; -} - - -bool KSSLX509V3::certTypeNSSSLServer() { -#ifdef KSSL_HAVE_SSL - return (flags & (1 << (X509_PURPOSE_NS_SSL_SERVER-1))) ? true : false; -#endif - return false; -} - - -bool KSSLX509V3::certTypeSMIME() { -#ifdef KSSL_HAVE_SSL - return certTypeSMIMEEncrypt()||certTypeSMIMESign(); -#endif - return false; -} - - -bool KSSLX509V3::certTypeSMIMEEncrypt() { -#ifdef KSSL_HAVE_SSL - return (flags & (1 << (X509_PURPOSE_SMIME_ENCRYPT-1))) ? true : false; -#endif - return false; -} - - -bool KSSLX509V3::certTypeSMIMESign() { -#ifdef KSSL_HAVE_SSL - return (flags & (1 << (X509_PURPOSE_SMIME_SIGN-1))) ? true : false; -#endif - return false; -} - - -bool KSSLX509V3::certTypeCRLSign() { -#ifdef KSSL_HAVE_SSL - return (flags & (1 << (X509_PURPOSE_CRL_SIGN-1))) ? true : false; -#endif - return false; -} - - - - - diff --git a/kio/kssl/ksslx509v3.h b/kio/kssl/ksslx509v3.h deleted file mode 100644 index c521f3e25..000000000 --- a/kio/kssl/ksslx509v3.h +++ /dev/null @@ -1,122 +0,0 @@ -/* This file is part of the KDE project - * - * Copyright (C) 2001-2003 George Staikos - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library 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 - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public License - * along with this library; see the file COPYING.LIB. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - */ - -#ifndef _KSSLX509V3_H -#define _KSSLX509V3_H - -#include - -#include - -// ### KDE4: fix constness of methods -/** - * KDE X509v3 Flag Class - * - * This class is used to track X509v3 flags for - * - * @author George Staikos - * @see KExtendedSocket, TCPSlaveBase - * @short KDE SSL Class - */ -class TDEIO_EXPORT KSSLX509V3 { -friend class KSSLCertificate; -friend class KSSLCertificatePrivate; -public: - /** - * Destroy this object - */ - ~KSSLX509V3(); - - /** - * Determine if this certificate can be used by a certificate authority - * @return true if it can be used by a certificate authority - */ - bool certTypeCA(); - - /** - * Determine if this certificate can be used by an SSL signer - * @return true if it can be used by an SSL signer - */ - bool certTypeSSLCA(); - - /** - * Determine if this certificate can be used by an S/MIME signer - * @return true if it can be used by an S/MIME signer - */ - bool certTypeEmailCA(); - - /** - * Determine if this certificate can be used by a code certificate signer - * @return true if it can be used by a code certificate signer - */ - bool certTypeCodeCA(); - - /** - * Determine if this certificate can be used by an SSL client - * @return true if it can be used by an SSL client - */ - bool certTypeSSLClient(); - - /** - * Determine if this certificate can be used by an SSL server - * @return true if it can be used by an SSL server - */ - bool certTypeSSLServer(); - - /** - * Determine if this certificate can be used by a Netscape SSL server - * @return true if it can be used by a Netscape SSL server - */ - bool certTypeNSSSLServer(); - - /** - * Determine if this certificate can be used for S/MIME - * @return true if it can be used for S/MIME - */ - bool certTypeSMIME(); - - /** - * Determine if this certificate can be used for S/MIME encryption - * @return true if it can be used for S/MIME encryption - */ - bool certTypeSMIMEEncrypt(); - - /** - * Determine if this certificate can be used for S/MIME signing - * @return true if it can be used for S/MIME signing - */ - bool certTypeSMIMESign(); - - /** - * Determine if this certificate can be used for revocation signing - * @return true if it can be used for revocation signing - */ - bool certTypeCRLSign(); - -private: - class KSSLX509V3Private; - KSSLX509V3Private *d; - -protected: - KSSLX509V3(); - long flags; // warning: this is only valid for up to 16 flags + 16 CA. -}; - -#endif diff --git a/kio/kurifilterplugin.desktop b/kio/kurifilterplugin.desktop deleted file mode 100644 index 5882b35ca..000000000 --- a/kio/kurifilterplugin.desktop +++ /dev/null @@ -1,84 +0,0 @@ -[Desktop Entry] -Type=ServiceType -X-TDE-ServiceType=KURIFilter/Plugin -Name=Enhanced Browsing Plugin -Name[af]=Verbeterde Blaaiïng Inprop module -Name[ar]=ملحقات التصفح المحسن -Name[az]=Təkmilləşmiş Səyyah Əlavəsi -Name[bg]=Разширена приставка за преглед -Name[bn]=উন্নত ব্রাউজিং প্লাগ-ইন -Name[br]=Lugant Furchal Gwellaet -Name[bs]=Dodatak za napredno pretraživanje -Name[ca]=Connector de navegació millorada -Name[cs]=Modul rozšířeného procházení -Name[csb]=Mòduł do rozszérzónégò przezeraniô -Name[cy]=Ategyn Pori Hwylusach -Name[da]=Udvidet netsøgnings-plugin -Name[de]=Erweitertes Browser-Modul -Name[el]=Πρόσθετο βελτιωμένης εξερεύνησης -Name[eo]=progresinta TTTum-kromaĵo -Name[es]=Plugin de Navegación Mejorada -Name[et]=Täiustatud brausimise plugin -Name[eu]=Arakatze plugin hobetua -Name[fa]=وصلۀ مرور افزوده -Name[fi]=Laajennettu selauslisäosa -Name[fr]=Module externe de navigation avancée -Name[fy]=Plugin foar effisjinter browsen -Name[ga]=Breiseán le haghaidh Brabhsála Feabhsaithe -Name[gl]=Plugin de Navegación Mellorada -Name[he]=תוסף לגלישה משופרת -Name[hi]=एनहैंस्ड ब्राउसिंग प्लगइन -Name[hr]=Napredni dodatak za pretraživanje -Name[hu]=Továbbfejlesztett böngészés bővítőmodul -Name[id]=Plugin Browsing yang disempurnakan -Name[is]=Íforrit fyrir vafrara-endurbætur -Name[it]=Plugin di navigazione avanzata -Name[ja]=拡張ブラウズプラグイン -Name[ka]=დეტალური ჩვენების მოდული -Name[kk]=Жетілдірген шарлау модулі -Name[km]=កម្មវិធី​ជំនួយ​រុករក​ដែល​បាន​ធ្វើ​ឲ្យ​ប្រសើរ -Name[ko]=더 나은 찾아가기 플러그인 -Name[lb]=Erweiderte Browser-Plugin -Name[lt]=Išplėstinio naršymo priedas -Name[lv]=Uzlabotas Pārlūkošanas spraudnis -Name[mk]=Приклучок за напредно разгледување -Name[mn]=Өргөтгөсөн Хөтлөгчийн Plugin -Name[ms]=Plug masuk Pelayar Ekstra -Name[mt]=Plagin għal browsing estiż -Name[nb]=Programtillegg for utvidet nettlesing -Name[nds]=Nettkiekverwiedern-Plugin -Name[ne]=विस्तारित ब्राउजिङ प्लगइन -Name[nl]=Verbeterd Browsen Plugin -Name[nn]=Programtillegg for forbetring av nettlesaren -Name[nso]=Tsenyo yeo e Hlohleleditswego ya Boinyakisi -Name[oc]=Branquament de navegacion amilhorada -Name[pa]=ਵਾਧੂ ਝਲਕਾਰਾ ਪਲੱਗਿੰਨ -Name[pl]=Moduł do rozszerzonego przeglądania -Name[pt]=Navegação Melhorada -Name[pt_BR]=Plug-in de navegação melhorada -Name[ro]=Modul de navigare avansată -Name[ru]=Модуль расширенного просмотра -Name[rw]=Icomeka ry'Ishakisha Ritunganyijwe -Name[se]=Njuovžilut fierbmádatlogadeami lassemoduvla -Name[sk]=Modul rozšíreného prehliadača -Name[sl]=Vstavek za izboljšano brskanje -Name[sq]=Shtojcë e Përmirësuar për Shfletim -Name[sr]=Прикључак за побољшано претраживање -Name[sr@Latn]=Priključak za poboljšano pretraživanje -Name[sv]=Utökad webbläsning -Name[ta]=மேம்படுத்திய உலாவும் சொருகுப்பொருள் -Name[te]=అభివ్రుద్దిపరచిన బ్రౌజింగ్ ప్లగిన్ -Name[tg]=Баланд Кардан -Name[th]=ปลั๊กอินการเรียกดูที่เสริมความสามารถ -Name[tr]=Gelişmiş Tarayıcı Eklentisi -Name[tt]=Kiñäytelgän Küsätü Östämäse -Name[uk]=Втулок розширеної навігації -Name[uz]=Tezlashtirilgan veb-koʻrish plagini -Name[uz@cyrillic]=Тезлаштирилган веб-кўриш плагини -Name[ven]=Pulagini ya burausu yo engedzhwaho -Name[vi]=Bộ cầm phít duyệt tăng cường -Name[xh]=Iplagi yangaphakathi Ekhangela iincwadi Enyusiweyo -Name[zh_CN]=增强的浏览插件 -Name[zh_HK]=增強功能的瀏覽外掛程式 -Name[zh_TW]=增強的瀏覽外掛程式 -Name[zu]=I-plugin Yomcingi Weqophela eliphezulu diff --git a/kio/magic b/kio/magic deleted file mode 100644 index c12cec4ba..000000000 --- a/kio/magic +++ /dev/null @@ -1,1065 +0,0 @@ -# Magic data for KMimeMagic (originally for file(1) command) -# -# The format is 4-5 columns: -# Column #1: byte number to begin checking from, ">" indicates continuation -# Column #2: type of data to match -# Column #3: contents of data to match -# Column #4: MIME type of result - -#------------------------------------------------------------------------------ -# Localstuff: file(1) magic for locally observed files -# Add any locally observed files here. - -#------------------------------------------------------------------------------ -# end local stuff -#------------------------------------------------------------------------------ - -#------------------------------------------------------------------------------ -# audio: file(1) magic for sound formats (see also "iff") -# -# Jan Nicolai Langfeldt (janl@ifi.uio.no), Dan Quinlan (quinlan@yggdrasil.com), -# and others -# - -# Sun/NeXT audio data -0 string .snd ->12 belong 1 audio/basic ->12 belong 2 audio/basic ->12 belong 3 audio/basic ->12 belong 4 audio/basic ->12 belong 5 audio/basic ->12 belong 6 audio/basic ->12 belong 7 audio/basic - ->12 belong 23 audio/x-adpcm ->12 belong 24 audio/x-adpcm ->12 belong 25 audio/x-adpcm ->12 belong 26 audio/x-adpcm ->12 belong 27 audio/x-adpcm - -# DEC systems (e.g. DECstation 5000) use a variant of the Sun/NeXT format -# that uses little-endian encoding and has a different magic number -0 lelong 0x0064732E ->12 lelong 1 audio/x-adpcm ->12 lelong 2 audio/x-adpcm ->12 lelong 3 audio/x-adpcm ->12 lelong 4 audio/x-adpcm ->12 lelong 5 audio/x-adpcm ->12 lelong 6 audio/x-adpcm ->12 lelong 7 audio/x-adpcm -# compressed (G.721 ADPCM) ->12 lelong 23 audio/x-adpcm - -# Creative Labs AUDIO stuff -0 string MThd audio/x-midi -#0 string CTMF Creative Music (CMF) data -#0 string SBI SoundBlaster instrument data -#0 string Creative\ Voice\ File Creative Labs voice data - -# Real Audio (Magic .ra\0375) -0 belong 0x2e7261fd audio/vnd.rn-realaudio -0 string .RMF application/vnd.rn-realmedia - -# OGG files -# For theora at position 87, see bug #109598 -0 string OggS application/ogg ->28 string \x01vorbis audio/vorbis ->28 string fLaC audio/x-oggflac ->28 string \x80theora video/x-theora ->87 string \x80theora video/x-theora ->28 string Speex\ \ audio/x-speex ->29 string video video/x-ogm ->29 string FLAC audio/x-oggflac - -# FLAC files -0 string fLaC audio/x-flac - -# Musepack files -0 string MP+ audio/x-musepack - -# C64 PSID sound files -0 string PSID audio/prs.sid - - -#------------------------------------------------------------------------------ -# riff: file(1) magic for RIFF format -# See -# -# http://www.seanet.com/users/matts/riffmci/riffmci.htm -# - -# RIFF (little-endian) data -0 string RIFF -# RIFF MIDI format -#>8 string RMID audio/x-midi? -# Microsoft WAVE format (*.wav) ->8 string WAVE audio/x-wav ->>20 leshort 80 audio/mpeg ->>20 leshort 85 audio/x-mp3 -# Corel Draw Picture -#>8 string CDRA Corel Draw Picture -# AVI == Audio Video Interleave ->8 string AVI\040 video/x-msvideo - -# RIFF (big-endian) data -0 string RIFX -# RIFF MIDI format -#>8 string RMID \b, MIDI -# Microsoft WAVE format (*.wav) ->8 string WAVE audio/x-wav -# Corel Draw Picture -#>8 string CDRA \b, Corel Draw Picture -# AVI == Audio Video Interleave ->8 string AVI\040 video/x-msvideo - - -#------------------------------------------------------------------------------ -# iff: file(1) magic for Interchange File Format (see also "audio" & "images") -# -# Daniel Quinlan (quinlan@yggdrasil.com) -- IFF was designed by Electronic -# Arts for file interchange. It has also been used by Apple, SGI, and -# especially Commodore-Amiga. -# -# IFF files begin with an 8 byte FORM header, followed by a 4 character -# FORM type, which is followed by the first chunk in the FORM. - -0 string FORM ->8 string AIFF audio/x-aiff -# AIFF-C audio data ->8 string AIFC audio/x-aiff -# IFF/8SVX audio data ->8 string 8SVX audio/x-aiff -#>8 string SAMP \b, SAMP sampled audio -#>8 string DTYP \b, DTYP datatype description -#>8 string PTCH \b, PTCH binary patch -# image formats -#>8 string ILBMBMHD \b, ILBM interleaved image -# other formats -#>8 string FTXT \b, FTXT formatted text - -#------------------------------------------------------------------------------ -# KSysV stuff: logfiles and packages belonging to KSysV -# - -# KSysV logfiles -0 string KDE\ System\ V\ Init\ Editor text/x-ksysv-log - -# KSysV init packages -4 string KSysV ->15 byte >0x01 application/x-ksysv-package - -#------------------------------------------------------------------------------ -# c-lang: file(1) magic for C programs or various scripts -# - -# XPM icons (Greg Roelofs, newt@uchicago.edu) -# ideally should go into "images", but entries below would tag XPM as C source -0 string /*\ XPM image/x-xpm - -# this first will upset you if you're a PL/1 shop... (are there any left?) -# in which case rm it; ascmagic will catch real C programs -# C or REXX program text -#0 string /* text/x-c -# C++ program text -#0 string // text/x-c++ - -#------------------------------------------------------------------------------ -# commands: file(1) magic for various shells and interpreters -# -#0 string :\ shell archive or commands for antique kernel text -0 string #!/bin/sh application/x-shellscript -0 string #!\ /bin/sh application/x-shellscript -0 string #!/bin/csh application/x-shellscript -0 string #!\ /bin/csh application/x-shellscript -# korn shell magic, sent by George Wu, gwu@clyde.att.com -0 string #!/bin/ksh application/x-shellscript -0 string #!\ /bin/ksh application/x-shellscript -0 string #!/bin/zsh application/x-shellscript -0 string #!\ /bin/zsh application/x-shellscript -0 string #!/bin/tcsh application/x-shellscript -0 string #!\ /bin/tcsh application/x-shellscript -0 string #!/usr/local/tcsh application/x-shellscript -0 string #!\ /usr/local/tcsh application/x-shellscript -0 string #!/usr/local/bin/tcsh application/x-shellscript -0 string #!\ /usr/local/bin/tcsh application/x-shellscript -# /usr/bin paths for ksh, zsh and tcsh -0 string #!/usr/bin/ksh application/x-shellscript -0 string #!\ /usr/bin/ksh application/x-shellscript -0 string #!/usr/bin/zsh application/x-shellscript -0 string #!\ /usr/bin/zsh application/x-shellscript -0 string #!/usr/bin/tcsh application/x-shellscript -0 string #!\ /usr/bin/tcsh application/x-shellscript -# bash shell magic, from Peter Tobias (tobias@server.et-inf.fho-emden.de) -0 string #!/bin/bash application/x-shellscript -0 string #!\ /bin/bash application/x-shellscript -0 string #!/usr/local/bin/bash application/x-shellscript -0 string #!\ /usr/local/bin/bash application/x-shellscript - -0 string #!\ /bin/env\ bash application/x-shellscript -0 string #!/bin/env\ bash application/x-shellscript -0 string #!\ /usr/bin/env\ bash application/x-shellscript -0 string #!/usr/bin/env\ bash application/x-shellscript - -# -0 string #!/bin/ash application/x-shellscript -0 string #!\ /bin/ash application/x-shellscript -# zsh/ash/ae/nawk/gawk magic from cameron@cs.unsw.oz.au (Cameron Simpson) -0 string #!/usr/local/bin/zsh application/x-shellscript -0 string #!\ /usr/local/bin/zsh application/x-shellscript -0 string #!/usr/local/bin/ash application/x-shellscript -0 string #!\ /usr/local/bin/ash application/x-shellscript -#0 string #!/usr/local/bin/ae Neil Brown's ae -#0 string #!\ /usr/local/bin/ae Neil Brown's ae -0 string #!/bin/nawk application/x-nawk -0 string #!\ /bin/nawk application/x-nawk -0 string #!/usr/bin/nawk application/x-nawk -0 string #!\ /usr/bin/nawk application/x-nawk -0 string #!/usr/local/bin/nawk application/x-nawk -0 string #!\ /usr/local/bin/nawk application/x-nawk -0 string #!/bin/gawk application/x-gawk -0 string #!\ /bin/gawk application/x-gawk -0 string #!/usr/bin/gawk application/x-gawk -0 string #!\ /usr/bin/gawk application/x-gawk -0 string #!/usr/local/bin/gawk application/x-gawk -0 string #!\ /usr/local/bin/gawk application/x-gawk -# -0 string #!/bin/awk application/x-awk -0 string #!\ /bin/awk application/x-awk -0 string #!/usr/bin/awk application/x-awk -0 string #!\ /usr/bin/awk application/x-awk -#0 string BEGIN application/x-awk - -# For Larry Wall's perl language. The ``eval'' line recognizes an -# outrageously clever hack for USG systems. -# Keith Waclena -0 string #!/bin/perl application/x-perl -0 string #!\ /bin/perl application/x-perl -0 string eval\ "exec\ /bin/perl application/x-perl -0 string #!/usr/bin/perl application/x-perl -0 string #!\ /usr/bin/perl application/x-perl -0 string eval\ "exec\ /usr/bin/perl application/x-perl -0 string #!/usr/local/bin/perl application/x-perl -0 string #!\ /usr/local/bin/perl application/x-perl -0 string eval\ "exec\ /usr/local/bin/perl application/x-perl -0 string #!/bin/env\ perl application/x-perl -0 string #!\ /bin/env\ perl application/x-perl -0 string #!/usr/bin/env\ perl application/x-perl -0 string #!\ /usr/bin/env\ perl application/x-perl - -# python. -# -0 string #!/bin/python application/x-python -0 string #!\ /bin/python application/x-python -0 string eval\ "exec\ /bin/python application/x-python -0 string #!/usr/bin/python application/x-python -0 string #!\ /usr/bin/python application/x-python -0 string eval\ "exec\ /usr/bin/python application/x-python -0 string #!/usr/local/bin/python application/x-python -0 string #!\ /usr/local/bin/python application/x-python -0 string eval\ "exec\ /usr/local/bin/python application/x-python -0 string #!/bin/env\ python application/x-python -0 string #!\ /bin/env\ python application/x-python -0 string #!/usr/bin/env\ python application/x-python -0 string #!\ /usr/bin/env\ python application/x-python - -# MAGIC as specified in Python/import.c (1.5 to 2.3.0a) -# 20121 ( YEAR - 1995 ) + MONTH + DAY (little endian followed by "\r\n" -# python 1.5/1.6 byte-compiled -0 belong 0x994e0d0a application/x-python-bytecode -# python 2.0 byte-compiled -0 belong 0x87c60d0a application/x-python-bytecode -# python 2.1 byte-compiled -0 belong 0x2aeb0d0a application/x-python-bytecode -# python 2.2 byte-compiled -0 belong 0x2ded0d0a application/x-python-bytecode -# python 2.3 byte-compiled -0 belong 0x3bf20d0a application/x-python-bytecode - -# ruby -0 string #!/bin/env\ ruby application/x-ruby -0 string #!\ /bin/env\ ruby application/x-ruby -0 string #!/usr/bin/env\ ruby application/x-ruby -0 string #!\ /usr/bin/env\ ruby application/x-ruby - -#------------------------------------------------------------------------------ -# compress: file(1) magic for pure-compression formats (no archives) -# -# compress, gzip, pack, compact, huf, squeeze, crunch, freeze, yabba, whap, etc. -# -# Formats for various forms of compressed data -# Formats for "compress" proper have been moved into "compress.c", -# because it tries to uncompress it to figure out what's inside. - -# standard unix compress -0 string \037\235 application/x-compress - -# gzip (GNU zip, not to be confused with [Info-ZIP/PKWARE] zip archiver) -0 string \037\213 application/x-gzip - -# KOffice documents (gzipped, with an idenfication string in the 'orig filename' header) ->10 string KOffice ->>18 string application/x-kchart\004\006 application/x-kchart ->>18 string application/x-kformula\004\006 application/x-kformula ->>18 string application/x-killustrator\004\006 application/x-killustrator ->>18 string application/x-kontour\004\006 application/x-kontour ->>18 string application/x-kpresenter\004\006 application/x-kpresenter ->>18 string application/x-kspread\004\006 application/x-kspread ->>18 string application/x-kword\004\006 application/x-kword ->>18 string application/x-krita\004\006 application/x-krita ->>18 string application/x-kivio\004\006 application/x-kivio ->>18 string application/x-karbon\004\006 application/x-karbon - -# Rosegarden documents (like old KOffice documents, gzipped with id string in header) ->10 string audio/x-rosegarden\000 audio/x-rosegarden ->10 string audio/x-rosegarden-device\000 audio/x-rosegarden-device - -#KOffice documents v1.2 and later (may 1 2002) using zip as a wrapper -0 string PK\003\004 application/x-zip ->30 string mimetype ->>38 string application/x-kchart application/x-kchart ->>38 string application/x-kformula application/x-kformula ->>38 string application/x-kontour application/x-kontour ->>38 string application/x-kpresenter application/x-kpresenter ->>38 string application/x-kspread application/x-kspread ->>38 string application/x-krita application/x-krita ->>38 string application/x-kword application/x-kword ->>38 string application/x-kivio application/x-kivio ->>38 string application/x-karbon application/x-karbon - -#KOffice documents writen using the kzip rewrite used 'unx' based -#zips; dislocating the mimetype. This was (temporarily) for koffice 1.3 (okt 2003). -0 string PK\003\004 ->30 string mimetype ->>55 string application/x-kchart application/x-kchart ->>55 string application/x-kformula application/x-kformula ->>55 string application/x-kontour application/x-kontour ->>55 string application/x-kpresenter application/x-kpresenter ->>55 string application/x-kspread application/x-kspread ->>55 string application/x-krita application/x-krita ->>55 string application/x-kword application/x-kword ->>55 string application/x-kivio application/x-kivio ->>55 string application/x-karbon application/x-karbon - -# OpenOffice.org 1.1 puts the mimetype into the header too -0 string PK\003\004 ->30 string mimetype ->>38 string application/vnd.sun.xml.calc application/vnd.sun.xml.calc ->>38 string application/vnd.sun.xml.calc.template application/vnd.sun.xml.calc.template ->>38 string application/vnd.sun.xml.draw application/vnd.sun.xml.draw ->>38 string application/vnd.sun.xml.draw.template application/vnd.sun.xml.draw.template ->>38 string application/vnd.sun.xml.impress application/vnd.sun.xml.impress ->>38 string application/vnd.sun.xml.impress.template application/vnd.sun.xml.impress.template ->>38 string application/vnd.sun.xml.writer application/vnd.sun.xml.writer ->>38 string application/vnd.sun.xml.writer.master application/vnd.sun.xml.writer.master ->>38 string application/vnd.sun.xml.writer.template application/vnd.sun.xml.writer.template ->>38 string application/vnd.sun.xml.base application/vnd.sun.xml.base - -# OASIS OpenDocument (KOffice >= 1.4 and OpenOffice >= 2.0) -0 string PK\003\004 ->30 string mimetype ->>38 string application/vnd.oasis.opendocument.chart application/vnd.oasis.opendocument.chart ->>38 string application/vnd.oasis.opendocument.formula application/vnd.oasis.opendocument.formula ->>38 string application/vnd.oasis.opendocument.graphics application/vnd.oasis.opendocument.graphics ->>38 string application/vnd.oasis.opendocument.graphics-template application/vnd.oasis.opendocument.graphics-template ->>38 string application/vnd.oasis.opendocument.image application/vnd.oasis.opendocument.image ->>38 string application/vnd.oasis.opendocument.presentation application/vnd.oasis.opendocument.presentation ->>38 string application/vnd.oasis.opendocument.presentation-template application/vnd.oasis.opendocument.presentation-template ->>38 string application/vnd.oasis.opendocument.spreadsheet application/vnd.oasis.opendocument.spreadsheet ->>38 string application/vnd.oasis.opendocument.spreadsheet-template application/vnd.oasis.opendocument.spreadsheet-template ->>38 string application/vnd.oasis.opendocument.text application/vnd.oasis.opendocument.text ->>38 string application/vnd.oasis.opendocument.text-template application/vnd.oasis.opendocument.text-template - -# BZIP2 -0 string BZh application/x-bzip2 - -# BZIP -0 string BZ application/x-bzip - -# According to gzip.h, this is the correct byte order for packed data. -0 string \037\036 application/octet-stream -# -# This magic number is byte-order-independent. -# -0 short 017437 application/octet-stream - - -# ID Software's pak data archive -0 string PACK application/x-pak - -# XXX - why *two* entries for "compacted data", one of which is -# byte-order independent, and one of which is byte-order dependent? -# -# compacted data -0 short 0x1fff application/octet-stream -0 string \377\037 application/octet-stream -# huf output -0 short 0145405 application/octet-stream - -# Squeeze and Crunch... -# These numbers were gleaned from the Unix versions of the programs to -# handle these formats. Note that I can only uncrunch, not crunch, and -# I didn't have a crunched file handy, so the crunch number is untested. -# Keith Waclena -#0 leshort 0x76FF squeezed data (CP/M, DOS) -#0 leshort 0x76FE crunched data (CP/M, DOS) - -# Freeze -#0 string \037\237 Frozen file 2.1 -#0 string \037\236 Frozen file 1.0 (or gzip 0.5) - -# lzh? -#0 string \037\240 LZH compressed data - -#POSIX tar archive -257 string ustar\0 application/x-tar -#GNU tar archive -257 string ustar\040\040\0 application/x-tar - -# The SVR4 "cpio(4)" hints that there are additional formats, but they -# are defined as "short"s; I think all the new formats are -# character-header formats and thus are strings, not numbers. -0 short 070707 application/x-cpio -0 short 0143561 application/x-cpio -0 string 070707 application/x-cpio -0 string 070701 application/x-cpio -0 string 070702 application/x-cpio - -0 string !\ndebian application/x-debian-package -0 string = application/x-archive -0 string ! application/x-archive - -#------------------------------------------------------------------------------ -# -# RPM: file(1) magic for Red Hat Packages Erik Troan (ewt@redhat.com) -# -0 beshort 0xedab ->2 beshort 0xeedb application/x-rpm - -# lzw -0 lelong&0x8080ffff 0x0000081a application/x-arc -# squashed -0 lelong&0x8080ffff 0x0000091a application/x-arc -# uncompressed -0 lelong&0x8080ffff 0x0000021a application/x-arc -# packed -0 lelong&0x8080ffff 0x0000031a application/x-arc -# squeezed -0 lelong&0x8080ffff 0x0000041a application/x-arc -# crunched -0 lelong&0x8080ffff 0x0000061a application/x-arc - -# LHARC/LHA archiver (Greg Roelofs, newt@uchicago.edu) -2 string -lh0- application/x-lha -2 string -lh1- application/x-lha -2 string -lz4- application/x-lha -2 string -lz5- application/x-lha -# [never seen any but the last; -lh4- reported in comp.compression:] -2 string -lzs- application/x-lha -2 string -lh\40- application/x-lha -2 string -lhd- application/x-lha -2 string -lh2- application/x-lha -2 string -lh3- application/x-lha -2 string -lh4- application/x-lha -2 string -lh5- application/x-lha -2 string -lh6- application/x-lha -2 string -lh7- application/x-lha - -# ARJ archiver (jason@jarthur.Claremont.EDU) -0 leshort 0xea60 application/x-arj - -# RAR archiver (Greg Roelofs, newt@uchicago.edu) -0 string Rar! application/x-rar - -# ZIP archives (Greg Roelofs, c/o zip-bugs@wkuvx1.wku.edu) -0 string PK\003\004 application/x-zip -# Alternate ZIP string (amc@arwen.cs.berkeley.edu) -0 string PK00PK\003\004 application/x-zip - -# Zoo archiver -20 lelong 0xfdc4a7dc application/x-zoo - -# Shell archives -10 string #\ This\ is\ a\ shell\ archive application/x-shellscript - -# ACE archive -7 string **ACE** application/x-ace - - -#------------------------------------------------------------------------------ -# frame: file(1) magic for FrameMaker files -# -# This stuff came on a FrameMaker demo tape, most of which is -# copyright, but this file is "published" as witness the following: -# -0 string \ -# -0 string \23 string \23 string \23 string \23 string \8 string CR\x02 image/x-raw - -# Phase One RAW image, big-endian -32 string MMMMRawT image/x-raw -# Phase One RAW image, little-endian -32 string IIIITwaR image/x-raw -# Canon RAW image -6 string HEAPCCDR image/x-raw -# Canon CR2 image (20D, 1Dmk2, ...) -0 string II*\000\020\000\000\000CR image/x-raw -# Minolta RAW image -0 string \x00MRM image/x-raw -# Fuji RAW image -0 string FUJIFILM image/x-raw -# Rollei RAW image -0 string DSC-Image image/x-raw -# Foveon RAW image -0 string FOVb image/x-raw - -# TIFF and friends -# TIFF file, big-endian -0 string MM\x00\x2a image/tiff -# TIFF file, little-endian -0 string II\x2a\x00 image/tiff - -# GIF -0 string GIF image/gif - -# JPEG images -0 beshort 0xffd8 image/jpeg - -# JPEG2000 images -0 beshort 0x0101010C6A50 image/jp2 - -# PNG images -0 string \x89PNG image/png - -# PC bitmaps (OS/2, Windoze BMP files) (Greg Roelofs, newt@uchicago.edu) -0 string BM -#(OS/2 1.x format) ->14 byte 12 image/x-bmp -#(OS/2 2.x format) ->14 byte 64 image/x-bmp -# (Windows 3.x format) ->14 byte 40 image/x-bmp - -# PCX images (Nadeem Hasan) -0 byte 10 -# Version 2.5 ->1 byte 0 image/x-pcx -# Version 2.8 w/ palette ->1 byte 2 image/x-pcx -# Version 2.8 w/o pallete ->1 byte 3 image/x-pcx -# Version 3.0 ->1 byte 5 image/x-pcx - -#0 string IC icon -#0 string PI pointer -#0 string CI color icon -#0 string CP color pointer -#0 string BA bitmap array - -# Gimp's XCF -0 string gimp\ xcf image/x-xcf-gimp - -# X11 cursor files -0 string Xcur image/x-xcursor - -# EXR images -0 lelong 0x762f3101 image/x-exr - -# SGI images (*.rgb, *.rgba, *.bw, *.sgi) -0 beshort 474 image/x-rgb - -#------------------------------------------------------------------------------ -# lisp: file(1) magic for lisp programs -# -# various lisp types, from Daniel Quinlan (quinlan@yggdrasil.com) -#0 string ;; text/plain -# Emacs 18 - this is always correct, but not very magical. -0 string \012( application/x-elc -# Emacs 19 -0 string ;ELC\023\000\000\000 application/x-elc - -#------------------------------------------------------------------------------ -# mail.news: file(1) magic for mail and news -# -# There are tests to ascmagic.c to cope with mail and news. - -0 string Relay-Version: message/rfc822 -0 string #!\ rnews message/rfc822 -0 string N#!\ rnews message/rfc822 -0 string Forward\ to message/rfc822 -0 string Pipe\ to message/rfc822 -0 string Return-Path: message/rfc822 -0 string Return-Path: message/rfc822 -0 string Path: message/news -0 string Xref: message/news -0 string From: message/rfc822 -0 string From\x20 application/mbox -0 string Article message/news -#0 string BABYL message/x-gnu-rmail -0 string Received: message/rfc822 - - - -# TNEF files... -0 lelong 0x223E9F78 application/ms-tnef - - -#------------------------------------------------------------------------------ -# mswrite - -0 lelong 0xBE31 application/x-mswrite -# with OLE objects -0 lelong 0xBE32 application/x-mswrite - -#------------------------------------------------------------------------------ -# msword: file(1) magic for MS Word files -# -# Contributor claims: -# Reversed-engineered MS Word magic numbers -# Except that they are generic MSOffice magic numbers ! (DF) - -0 string \376\067\0\043 application/msword -0 string \320\317\021\340\241\261 application/msword -0 string \333\245-\0\0\0 application/msword -2080 string Microsoft\ Word\ 6.0\ Document application/msword -2112 string Microsoft\ Word\ document\ data application/msword - -# excel -2080 string Microsoft\ Excel\ 5.0\ Worksheet application/msexcel - -#------------------------------------------------------------------------------ -# word perfect - -0 belong 0xff575053c405 application/wordperfect -1 string WPC application/wordperfect - -#------------------------------------------------------------------------------ -# printer: file(1) magic for printer-formatted files -# - -# PostScript -0 string %! application/postscript ->15 string EPS image/x-eps -0 string \004%! application/postscript ->16 string EPS image/x-eps - -# Acrobat -0 string %PDF- application/pdf -0 string \n%PDF- application/pdf - -#------------------------------------------------------------------------------ -# sc: file(1) magic for "sc" spreadsheet -# -38 string Spreadsheet application/x-sc - -#------------------------------------------------------------------------------ -# tex: file(1) magic for TeX files -# -# XXX - needs byte-endian stuff (big-endian and little-endian DVI?) -# -# From - -# Although we may know the offset of certain text fields in TeX DVI -# and font files, we can't use them reliably because they are not -# zero terminated. [but we do anyway, christos] -0 string \367\002 application/x-dvi -#0 string \367\203 TeX generic font data -#0 string \367\131 TeX packed font data -#0 string \367\312 TeX virtual font data -# Maybe we should have a mimetype like x-tex-log, but in any case -# text/plain is better than nothing. (David Faure) -0 string This\ is\ TeX, text/plain -0 string This\ is\ METAFONT, text/plain - -# XXX promoted from tex so that *.tfm is not mis-identified as mc68k file. -# There is no way to detect TeX Font Metric (*.tfm) files without -# breaking them apart and reading the data. The following patterns -# match most *.tfm files generated by METAFONT or afm2tfm. -2 string \000\021 application/x-tex-tfm ->33 string >\0 application/x-tex-tfm -2 string \000\022 application/x-tex-tfm ->33 string >\0 application/x-tex-tfm - -# Texinfo and GNU Info, from Daniel Quinlan (quinlan@yggdrasil.com) -#0 string \\input\ texinfo Texinfo source text -#0 string This\ is\ Info\ file GNU Info text - -# correct TeX magic for Linux (and maybe more) -# from Peter Tobias (tobias@server.et-inf.fho-emden.de) -# -0 leshort 0x02f7 application/x-dvi - -# RTF - Rich Text Format -0 string {\\rtf text/rtf - -# UTF16 (UTF16 docs are not MP3s - see the next audio/x-mp3 check :)) -0 beshort 0xfffe text/plain - -#------------------------------------------------------------------------------ -# animation: file(1) magic for animation/movie formats -# -# animation formats -# MPEG, FLI, DL originally from vax@ccwf.cc.utexas.edu (VaX#n8) -# FLC, SGI, Apple originally from Daniel Quinlan (quinlan@yggdrasil.com) - -# MPEG animation format -0 belong 0x000001b3 video/mpeg -0 belong 0x000001ba video/mpeg - -# MPEG 1.0 audio (layer III,II,I) -0 beshort&0xfff8 0xfff8 ->0 beshort&0x0006 0x0002 audio/x-mp3 ->0 beshort&0x0006 0x0004 audio/x-mp2 ->0 beshort&0x0006 0x0006 audio/mpeg - -# MPEG 2.0 audio (layer III,II,I) -0 beshort&0xfff8 0xfff0 ->0 beshort&0x0006 0x0002 audio/x-mp3 ->0 beshort&0x0006 0x0004 audio/x-mp2 ->0 beshort&0x0006 0x0006 audio/mpeg - -# MPEG 2.5 audio (layer III,II,I) -0 beshort&0xfff8 0xff80 ->0 beshort&0x0006 0x0002 audio/x-mp3 ->0 beshort&0x0006 0x0004 audio/x-mp2 ->0 beshort&0x0006 0x0006 audio/mpeg - -# MPEG-4 audio -16 string M4A audio/mp4 - - -# FLI animation format -0 leshort 0xAF11 video/x-flic -# FLC animation format -0 leshort 0xAF12 video/x-flic - -# SGI and Apple formats -0 string MOVI video/sgi -4 string moov video/quicktime -4 string mdat video/quicktime -4 string wide video/quicktime -4 string free video/quicktime - -# DIF digital video file format -#0 belong&0xffffff00 0x1f070000 DIF - -# Microsoft Advanced Streaming Format (ASF) -0 belong 0x3026b275 video/x-ms-asf - -# MNG Video Format, -0 string \x8aMNG video/x-mng - -# JNG Video Format, -#0 string \x8bJNG JNG video data, - -# Vivo video (Wolfram Kleff) -#3 string \x0D\x0AVersion:Vivo Vivo video data - -# VRML (Virtual Reality Modelling Language) -#0 string/b #VRML\ V1.0\ ascii VRML 1 file -#0 string/b #VRML\ V2.0\ utf8 ISO/IEC 14772 VRML 97 file - -#------------------------------------------------------------------------------ -# Databases -# -# GDBM magic numbers -# Will be maintained as part of the GDBM distribution in the future. -# -0 belong 0x13579ace application/x-gdbm -0 lelong 0x13579ace application/x-gdbm -0 string GDBM application/x-gdbm -# -0 belong 0x061561 application/x-dbm -# -# Executables -# -0 string \177ELF ->4 byte 0 ->4 byte 1 ->4 byte 2 ->5 byte 0 ->5 byte 1 ->>16 leshort 0 ->>16 leshort 1 application/x-object ->>16 leshort 2 application/x-executable ->>16 leshort 3 application/x-sharedlib ->>16 leshort 4 application/x-core ->5 byte 2 ->>16 beshort 0 ->>16 beshort 1 application/x-object ->>16 beshort 2 application/x-executable ->>16 beshort 3 application/x-sharedlib ->>16 beshort 4 application/x-core - -# MS Access database (95 or newer, i.e. MS Jet 3.0 or newer) -4 string Standard\ Jet\ DB application/x-msaccess - -# -# DOS -0 string MZ application/x-msdos-program -# -# KDE desktop file -0 string [Desktop\ Entry] application/x-desktop -0 string [Desktop\ Action application/x-desktop -0 string [KDE\ Desktop\ Entry] application/x-desktop -0 string \#\ Config\ File application/x-desktop -0 string \#\ KDE\ Config\ File application/x-desktop -# xmcd database file for kscd -0 string \#\ xmcd text/xmcd -# SQLite database files -0 string **\ This\ file\ contains\ an\ SQLite application/x-sqlite2 -0 string SQLite\ format\ 3 application/x-sqlite3 - -#------------------------------------------------------------------------------ -# Java - -0 short 0xcafe ->2 short 0xbabe application/x-java - -# vcard / vcalendar -0 string BEGIN:VCALENDAR text/x-vcalendar -0 string begin:vcalendar text/x-vcalendar -0 string BEGIN:VCARD text/x-vcard -0 string begin:vcard text/x-vcard - -# LDIF / LDAP interchange format -0 string dn:\ cn= text/x-ldif - -# applix -#------------------------------------------------------------------------------ -# applix: file(1) magic for Applixware -# From: Peter Soos -# -0 string *BEGIN ->7 string WORDS application/x-applixword ->7 string GRAPHICS application/x-applixgraphics -#>7 string RASTER application/x-applix ->7 string SPREADSHEETS application/x-applixspread -#>7 string MACRO application/x-applix -#>7 string BUILDER application/x-applix - -#------------------------------------------------------------------------------ -# diff: file(1) magic for diff(1) output -# -0 string diff\ text/x-diff -0 string ***\ text/x-diff -0 string Only\ in\ text/x-diff -0 string Common\ subdirectories:\ text/x-diff - - -#------------------------------------------------------------------------------ -# flash: file(1) magic for Macromedia Flash file format -# -# See -# -# http://www.macromedia.com/software/flash/open/ -# -0 string FWS application/x-shockwave-flash - -#------------------------------------------------------------------------------ -# DjVu (Leon Bottou ): -# -4 string FORM ->12 string DJVU image/x-djvu ->12 string DJVM image/x-djvu ->12 string BM44 image/x-djvu ->12 string PM44 image/x-djvu - -#------------------------------------------------------------------------------ -# adi: file(1) magic for ADi's objects -# From Gregory McGarry -# -0 leshort 0x521c application/x-executable # COFF DSP21k ->18 lelong &02 application/x-executable # executable, ->18 lelong ^02 ->>18 lelong &01 application/x-executable # static object, ->>18 lelong ^01 application/x-executable # relocatable object, ->18 lelong &010 application/x-executable # stripped ->18 lelong ^010 application/x-executable # not stripped - -#------------------------------------------------------------------------------ -# alliant: file(1) magic for Alliant FX series a.out files -# -# If the FX series is the one that had a processor with a 68K-derived -# instruction set, the "short" should probably become "beshort" and the -# "long" should probably become "belong". -# If it's the i860-based one, they should probably become either the -# big-endian or little-endian versions, depending on the mode they ran -# the 860 in.... -# -0 short 0420 application/x-executable # 0420 Alliant virtual executable ->2 short &0x0020 application/x-sharedlib # common library ->16 long >0 application/x-sharedlib # not stripped -0 short 0421 application/x-executable # 0421 Alliant compact executable ->2 short &0x0020 application/x-sharedlib # common library ->16 long >0 application/x-sharedlib # not stripped -#----------------------------------------------------------- - -# alpha architecture description -# - -0 leshort 0603 application/x-executable # COFF format alpha ->22 leshort&030000 !020000 application/x-executable # executable ->24 leshort 0410 application/x-executable # pure ->24 leshort 0413 application/x-executable # paged ->22 leshort&020000 !0 application/x-executable # dynamically linked ->16 lelong !0 application/x-executable # not stripped ->16 lelong 0 application/x-executable # stripped ->22 leshort&030000 020000 application/x-sharedlib # shared library ->24 leshort 0407 application/x-executable # object - -# Basic recognition of Digital UNIX core dumps - Mike Bremford -# -# The actual magic number is just "Core", followed by a 2-byte version -# number; however, treating any file that begins with "Core" as a Digital -# UNIX core dump file may produce too many false hits, so we include one -# byte of the version number as well; DU 5.0 appears only to be up to -# version 2. -# -0 string Core\001 application/x-core # Alpha COFF format core dump (Digital UNIX) -0 string Core\002 application/x-core # Alpha COFF format core dump (Digital UNIX) - -#------------------------------------------------------------------------------ -# Win95 InternetShortcut (URL): (Helge Deller ): -# -1 string InternetShortcut application/x-mswinurl - -#------------------------------------------------------------------------------ -# amigaos: file(1) magic for AmigaOS binary formats: - -# -# From ignatios@cs.uni-bonn.de (Ignatios Souvatzis) -# Some formats are still missing: AmigaOS special IFF's, e.g.: FORM....CTLG -# (the others should be separate, anyway) -# -0 belong 0x000003f3 application/x-executable # AmigaOS loadseg()ble executable/binary -0 belong 0x000003e7 application/x-sharedlib # AmigaOS object/library data - -0 string %TGIF application/x-tgif - -0 string #FIG application/x-xfig -0 string #LyX\ 1 application/x-lyx - -#------------------------------------------------------------------------------ -# VRML -0 string #VRML model/vrml - -#------------------------------------------------------------------------------ -# KWallet file -0 string KWALLET\012\015\000\015\012 application/x-kde-wallet - -#------------------------------------------------------------------------------ -# ICA Client configuration files -0 string [WFClient] application/x-ica -1 string [WFClient] application/x-ica -0 string [ApplicationServers] application/x-ica -1 string [ApplicationServers] application/x-ica -0 string [ICA application/x-ica -1 string [ICA application/x-ica -0 string [Program\ Neighborhood application/x-ica -1 string [Program\ Neighborhood application/x-ica - -#------------------------------------------------------------------------------ -# CD image files (ISO is imported from file 4.07) -32769 string CD001 application/x-iso -32633 string CD001 application/x-iso - -# CDR-wins bin-with-cue files -#0 belong 0x00FFFFFF application/x-cuebin - -# FITS (see RFC 4047) -# The SIMPLE keyword is always on the first line, NAXIS on the third. -# Lines are supposed to be exactly 80 characters long. -# FITS files can be different but then they are not application/fits anymore. -0 string SIMPLE\ \ =\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ T application/fits ->160 string NAXIS\ \ \ =\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ 2 image/fits ->160 string NAXIS\ \ \ =\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ 3 image/fits - -# kate: space-indent off; replace-tabs off; diff --git a/kio/misc/CMakeLists.txt b/kio/misc/CMakeLists.txt deleted file mode 100644 index 5212444a2..000000000 --- a/kio/misc/CMakeLists.txt +++ /dev/null @@ -1,100 +0,0 @@ -################################################# -# -# (C) 2010 Serghei Amelian -# serghei (DOT) amelian (AT) gmail.com -# -# Improvements and feedback are welcome -# -# This file is released under GPL >= 2 -# -################################################# - -add_subdirectory( ksendbugmail ) -add_subdirectory( kpac ) -add_subdirectory( tdesasl ) -add_subdirectory( kssld ) -add_subdirectory( kfile ) -add_subdirectory( tdewalletd ) -add_subdirectory( tdentlm ) - -add_definitions( - -D_LARGEFILE64_SOURCE -) - -include_directories( - ${TQT_INCLUDE_DIRS} - ${CMAKE_CURRENT_BINARY_DIR} - ${CMAKE_BINARY_DIR}/tdecore - ${CMAKE_BINARY_DIR}/kio - ${CMAKE_BINARY_DIR}/kio/kio - ${CMAKE_BINARY_DIR}/kio/kssl - ${CMAKE_SOURCE_DIR} - ${CMAKE_SOURCE_DIR}/dcop - ${CMAKE_SOURCE_DIR}/tdefx - ${CMAKE_SOURCE_DIR}/tdecore - ${CMAKE_SOURCE_DIR}/tdeui - ${CMAKE_SOURCE_DIR}/kio - ${CMAKE_SOURCE_DIR}/kio/kio - ${CMAKE_SOURCE_DIR}/kio/kssl -) - -link_directories( - ${TQT_LIBRARY_DIRS} -) - - -##### headers ################################### - -install( FILES uiserver.h DESTINATION ${INCLUDE_INSTALL_DIR}/kio ) - - -##### other data ################################ - -install(FILES - kio_uiserver.desktop kmailservice.protocol - telnet.protocol rlogin.protocol rtsp.protocol - ssh.protocol mms.protocol mmst.protocol mmsu.protocol - pnm.protocol rtspt.protocol rtspu.protocol - DESTINATION ${SERVICES_INSTALL_DIR} ) - -install( FILES fileshareset DESTINATION ${BIN_INSTALL_DIR} - PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_EXECUTE WORLD_EXECUTE SETUID ) - - -#### kio_uiserver ############################### - -set( target kio_uiserver ) - -set( ${target}_SRCS - uiserver.cpp uiserver.skel -) - -tde_add_tdeinit_executable( ${target} AUTOMOC - SOURCES ${${target}_SRCS} - LINK kio-shared - DEPENDENCIES dcopidl -) - - -##### kmailservice ############################## - -set( target kmailservice ) - -tde_add_executable( ${target} - SOURCES ${target}.cpp - LINK tdecore-shared - DESTINATION ${BIN_INSTALL_DIR} -) - - -##### ktelnetservice ############################ - -set( target ktelnetservice ) - -tde_add_executable( ${target} - SOURCES ${target}.cpp - LINK tdeui-shared - DESTINATION ${BIN_INSTALL_DIR} -) - -tde_install_symlink( ${target} ${BIN_INSTALL_DIR}/filesharelist ) diff --git a/kio/misc/Makefile.am b/kio/misc/Makefile.am deleted file mode 100644 index 0bafce0f5..000000000 --- a/kio/misc/Makefile.am +++ /dev/null @@ -1,60 +0,0 @@ -# This file is part of the KDE libraries -# Copyright (C) 1997 Torben Weis (weis@kde.org) - -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Library General Public -# License as published by the Free Software Foundation; either -# version 2 of the License, or (at your option) any later version. - -# This library 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 -# Library General Public License for more details. - -# You should have received a copy of the GNU Library General Public License -# along with this library; see the file COPYING.LIB. If not, write to -# the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -# Boston, MA 02110-1301, USA. - -AM_CPPFLAGS = -D_LARGEFILE64_SOURCE - -INCLUDES= -I$(srcdir)/.. -I$(top_srcdir) -I$(srcdir)/../kssl -I../kssl $(all_includes) $(SSL_INCLUDES) - -SUBDIRS = . ksendbugmail kpac tdesasl kssld kfile tdewalletd tdentlm - -lib_LTLIBRARIES = -tdeinit_LTLIBRARIES = kio_uiserver.la -bin_PROGRAMS = kmailservice ktelnetservice - -observer_DIR = $(top_srcdir)/kio/kio - -kio_uiserver_la_SOURCES = uiserver.cpp uiserver.skel observer.stub -kio_uiserver_la_LIBADD = $(LIB_KIO) $(LIB_TDEUI) $(LIB_QT) $(top_builddir)/dcop/libDCOP.la $(LIB_TDECORE) -kio_uiserver_la_LDFLAGS = $(all_libraries) -module -avoid-version - -METASOURCES = AUTO - -kde_services_DATA = kio_uiserver.desktop - -kmailservice_SOURCES = kmailservice.cpp -kmailservice_LDADD = $(LIB_TDECORE) -kmailservice_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor - -ktelnetservice_SOURCES = ktelnetservice.cpp -ktelnetservice_LDADD = $(LIB_TDEUI) -ktelnetservice_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor - -protocol_DATA = kmailservice.protocol telnet.protocol rlogin.protocol rtsp.protocol ssh.protocol \ - mms.protocol mmst.protocol mmsu.protocol pnm.protocol rtspt.protocol rtspu.protocol -protocoldir = $(kde_servicesdir) - -kiomiscdir = $(includedir)/kio -kiomisc_HEADERS = uiserver.h - - -bin_SCRIPTS = fileshareset -install-exec-local: - @-rm -f $(DESTDIR)$(bindir)/filesharelist - @$(LN_S) fileshareset $(DESTDIR)$(bindir)/filesharelist - @(chown root $(DESTDIR)$(bindir)/fileshareset && chmod 4755 $(DESTDIR)$(bindir)/fileshareset) || echo "Was not able to make fileshareset setuid root" - diff --git a/kio/misc/fileshareset b/kio/misc/fileshareset deleted file mode 100755 index 4c921ba38..000000000 --- a/kio/misc/fileshareset +++ /dev/null @@ -1,430 +0,0 @@ -#!/usr/bin/perl -T -use strict; - -######################################## -# config files -$nfs_exports::default_options = '*(ro,all_squash)'; -$nfs_exports::conf_file = '/etc/exports'; -$smb_exports::conf_file = '/etc/samba/smb.conf'; -my $authorisation_file = '/etc/security/fileshare.conf'; -my $authorisation_group = 'fileshare'; - - -######################################## -# Copyright (C) 2001-2002 MandrakeSoft (pixel@mandrakesoft.com) -# -# 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, 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. - - -######################################## -my $uid = $<; -my $username = getpwuid($uid); - -######################################## -# errors -my $usage = -"usage: fileshareset --add

- fileshareset --remove "; -my $not_enabled = -qq(File sharing is not enabled. -To enable file sharing put -"FILESHARING=yes" in $authorisation_file); - -my $not_simple_enabled = -qq(Simple file sharing is not enabled. -To enable simple file sharing put -"SHARINGMODE=simple" in $authorisation_file); - -my $non_authorised = -qq(You are not authorised to use file sharing -To grant you the rights: -- put "RESTRICT=no" in $authorisation_file -- or put user "$username" in group "$authorisation_group"); - -my $no_export_method = "can't export anything: no nfs, no smb"; - -my %exit_codes = reverse ( - 1 => $non_authorised, - 2 => $usage, - -# when adding - 3 => "already exported", - 4 => "invalid mount point", - -# when removing - 5 => "not exported", - - 6 => $no_export_method, - - 7 => $not_enabled, - - 8 => $not_simple_enabled, - - 255 => "various", -); - -################################################################################ -# correct PATH needed to call /etc/init.d/... ? seems not, but... -%ENV = ();#(PATH => '/bin:/sbin:/usr/bin:/usr/sbin'); - -my $modify = $0 =~ /fileshareset/; - -authorisation::check($modify); - -my @exports = ( - -e $nfs_exports::conf_file ? nfs_exports::read() : (), - -e $smb_exports::conf_file ? smb_exports::read() : (), - ); -@exports or error($no_export_method); - -if ($modify) { - my ($cmd, $dir) = @ARGV; - $< = $>; - @ARGV == 2 && ($cmd eq '--add' || $cmd eq '--remove') or error($usage); - - verify_mntpoint($dir); - - if ($cmd eq '--add') { - my @errs = map { eval { $_->add($dir) }; $@ } @exports; - grep { !$_ } @errs or error("already exported"); - } else { - my @errs = map { eval { $_->remove($dir) }; $@ } @exports; - grep { !$_ } @errs or error("not exported"); - } - foreach my $export (@exports) { - $export->write; - $export->update_server; - } -} -my @mntpoints = grep {$_} uniq(map { map { $_->{mntpoint} } @$_ } @exports); -print "$_\n" foreach grep { own($_) } @mntpoints; - - -sub own { $uid == 0 || (stat($_[0]))[4] == $uid } - -sub verify_mntpoint { - local ($_) = @_; - my $ok = 1; - $ok &&= m|^/|; - $ok &&= !m|/\.\./|; - $ok &&= !m|[\0\n\r]|; - $ok &&= -d $_; - $ok &&= own($_); - $ok or error("invalid mount point"); -} - -sub error { - my ($string) = @_; - print STDERR "$string\n"; - exit($exit_codes{$string} || 255); -} -sub member { my $e = shift; foreach (@_) { $e eq $_ and return 1 } 0 } -sub uniq { my %l; $l{$_} = 1 foreach @_; grep { delete $l{$_} } @_ } - - -################################################################################ -package authorisation; - -sub read_conf { - my ($exclusive_lock) = @_; - open F_lock, $authorisation_file; # don't care if it's missing - flock(F_lock, $exclusive_lock ? 2 : 1) or die "can't lock"; - my %conf; - foreach () { - s/#.*//; # remove comments - s/^\s+//; - s/\s+$//; - /^$/ and next; - my ($cmd, $value) = split('=', $_, 2); - $conf{$cmd} = $value || warn qq(suspicious line "$_" in $authorisation_file\n); - } - # no close F_lock, keep it locked - \%conf -} - -sub check { - my ($exclusive_lock) = @_; - my $conf = read_conf($exclusive_lock); - if (lc($conf->{FILESHARING}) eq 'no') { - ::error($not_enabled); - } - - if (lc($conf->{SHARINGMODE}) eq 'advanced') { - ::error($not_simple_enabled); - } - - if (lc($conf->{FILESHAREGROUP} ne '')) { - $authorisation_group = lc($conf->{FILESHAREGROUP}); - } - - if (lc($conf->{RESTRICT}) eq 'no') { - # ok, access granted for everybody - } else { - my @l; - while (@l = getgrent) { - last if $l[0] eq $authorisation_group; - } - ::member($username, split(' ', $l[3])) or ::error($non_authorised); - } -} - -################################################################################ -package exports; - -sub find { - my ($exports, $mntpoint) = @_; - foreach (@$exports) { - $_->{mntpoint} eq $mntpoint and return $_; - } - undef; -} - -sub add { - my ($exports, $mntpoint) = @_; - foreach (@$exports) { - $_->{mntpoint} eq $mntpoint and die 'add'; - } - push @$exports, my $e = { mntpoint => $mntpoint }; - $e; -} - -sub remove { - my ($exports, $mntpoint) = @_; - my @l = grep { $_->{mntpoint} ne $mntpoint } @$exports; - @l < @$exports or die 'remove'; - @$exports = @l; -} - - -################################################################################ -package nfs_exports; - -use vars qw(@ISA $conf_file $default_options); -BEGIN { @ISA = 'exports' } - -sub read { - my $file = $conf_file; - local *F; - open F, $file or return []; - - my ($prev_raw, $prev_line, %e, @l); - my $line_nb = 0; - foreach my $raw () { - $line_nb++; - local $_ = $raw; - $raw .= "\n" if !/\n/; - - s/#.*//; # remove comments - - s/^\s+//; - s/\s+$//; # remove unuseful spaces to help regexps - - if (/^$/) { - # blank lines ignored - $prev_raw .= $raw; - next; - } - - if (/\\$/) { - # line continue across lines - chop; # remove the backslash - $prev_line .= "$_ "; - $prev_raw .= $raw; - next; - } - my $line = $prev_line . $_; - my $raw_line = $prev_raw . $raw; - ($prev_line, $prev_raw) = ('', ''); - - my ($mntpoint, $options) = $line =~ /("[^"]*"|\S+)\s+(.*)/ or die "$file:$line_nb: bad line $line\n"; - - # You can also specify spaces or any other unusual characters in the - # export path name using a backslash followed by the character code as - # 3 octal digits. - $mntpoint =~ s/\\(\d{3})/chr(oct $1)/ge; - - # not accepting weird characters that would break the output - $mntpoint =~ m/[\0\n\r]/ and die "i won't handle this"; - push @l, { mntpoint => $mntpoint, option => $options, raw => $raw_line }; - } - bless \@l, 'nfs_exports'; -} - -sub write { - my ($nfs_exports) = @_; - foreach (@$nfs_exports) { - if (!exists $_->{options}) { - $_->{options} = $default_options; - } - if (!exists $_->{raw}) { - my $mntpoint = $_->{mntpoint} =~ /\s/ ? qq("$_->{mntpoint}") : $_->{mntpoint}; - $_->{raw} = sprintf("%s %s\n", $mntpoint, $_->{options}); - } - } - local *F; - open F, ">$conf_file" or die "can't write $conf_file"; - print F $_->{raw} foreach @$nfs_exports; -} - -sub update_server { - if (fork) { - system('/usr/sbin/exportfs', '-r'); - if (system('PATH=/bin:/sbin pidof rpc.mountd >/dev/null') != 0 || - system('PATH=/bin:/sbin pidof nfsd >/dev/null') != 0) { - # trying to start the server... - system('/etc/init.d/portmap start') if system('/etc/init.d/portmap status') != 0; - if ( -f '/etc/init.d/nfs' ) { - system('/etc/init.d/nfs', $_) foreach 'stop', 'start'; - } - elsif ( -f '/etc/init.d/nfs-kernel-server' ) { - system('/etc/init.d/nfs-kernel-server', $_) foreach 'stop', 'start'; - } - } - exit 0; - } -} - -################################################################################ -package smb_exports; - -use vars qw(@ISA $conf_file); -BEGIN { @ISA = 'exports' } - -sub read { - my ($s, @l); - local *F; - open F, $conf_file; - local $_; - while () { - if (/^\s*\[.*\]/ || eof F) { - #- first line in the category - my ($label) = $s =~ /^\s*\[(.*)\]/; - my ($mntpoint) = $s =~ /^\s*path\s*=\s*(.*)/m; - push @l, { mntpoint => $mntpoint, raw => $s, label => $label }; - $s = ''; - } - $s .= $_; - } - bless \@l, 'smb_exports'; -} - -sub write { - my ($smb_exports) = @_; - foreach (@$smb_exports) { - if (!exists $_->{raw}) { - $_->{raw} = <{label}] - path = $_->{mntpoint} - comment = $_->{mntpoint} - public = yes - guest ok = yes - writable = no - wide links = no -EOF - } - } - local *F; - open F, ">$conf_file" or die "can't write $conf_file"; - print F $_->{raw} foreach @$smb_exports; -} - -sub add { - my ($exports, $mntpoint) = @_; - my $e = $exports->exports::add($mntpoint); - $e->{label} = name_mangle($mntpoint, map { $_->{label} } @$exports); -} - -sub name_mangle { - my ($input, @others) = @_; - - local $_ = $input; - - # 1. first only keep legal characters. "/" is also kept for the moment - tr|a-z|A-Z|; - s|[^A-Z0-9#\-_!/]|_|g; # "$" is allowed except at the end, remove it in any case - - # 2. removing non-interesting parts - s|^/||; - s|^home/||; - s|_*/_*|/|g; - s|_+|_|g; - - # 3. if size is too small (!), make it bigger - $_ .= "_" while length($_) < 3; - - # 4. if size is too big, shorten it - while (length > 12) { - my ($s) = m|.*?/(.*)|; - if (length($s) > 8 && !grep { /\Q$s/ } @others) { - # dropping leading directories when the resulting is still long and meaningful - $_ = $s; - next; - } - s|(.*)[0-9#\-_!/]|$1| and next; - - # inspired by "Christian Brolin" "Long names are doom" on comp.lang.functional - s|(.+)[AEIOU]|$1| and next; # allButFirstVowels - s|(.*)(.)\2|$1$2| and next; # adjacentDuplicates - - s|(.*).|$1|; # booh, :'-( - } - - # 5. remove "/"s still there - s|/|_|g; - - # 6. resolving conflicts - my $l = join("|", map { quotemeta } @others); - my $conflicts = qr|^($l)$|; - if (/$conflicts/) { - A: while (1) { - for (my $nb = 1; length("$_$nb") <= 12; $nb++) { - if ("$_$nb" !~ /$conflicts/) { - $_ = "$_$nb"; - last A; - } - } - $_ or die "can't find a unique name"; - # can't find a unique name, dropping the last letter - s|(.*).|$1|; - } - } - - # 7. done - $_; -} - -sub update_server { - if (fork) { - system('/usr/bin/killall -HUP smbd 2>/dev/null'); - if (system('PATH=/bin:/sbin pidof smbd >/dev/null') != 0 || - system('PATH=/bin:/sbin pidof nmbd >/dev/null') != 0) { -# trying to start the server... - if ( -f '/etc/init.d/smb' ) { - system('/etc/init.d/smb', $_) foreach 'stop', 'start'; - } - elsif ( -f '/etc/init.d/samba' ) { - system('/etc/init.d/samba', $_) foreach 'stop', 'start'; - } - elsif ( -f '/etc/rc.d/rc.samba' ) { - system('/etc/rc.d/rc.samba', $_) foreach 'stop', 'start'; - } - else { - print STDERR "Error: Can't find the samba init script \n"; - } - } - exit 0; - } -} diff --git a/kio/misc/kfile/CMakeLists.txt b/kio/misc/kfile/CMakeLists.txt deleted file mode 100644 index 07c2725b2..000000000 --- a/kio/misc/kfile/CMakeLists.txt +++ /dev/null @@ -1,39 +0,0 @@ -################################################# -# -# (C) 2010 Serghei Amelian -# serghei (DOT) amelian (AT) gmail.com -# -# Improvements and feedback are welcome -# -# This file is released under GPL >= 2 -# -################################################# - -include_directories( - ${TQT_INCLUDE_DIRS} - ${CMAKE_BINARY_DIR}/tdecore - ${CMAKE_SOURCE_DIR}/tdecore - ${CMAKE_SOURCE_DIR}/tdeui - ${CMAKE_SOURCE_DIR}/kio - ${CMAKE_SOURCE_DIR}/kio/kio - ${CMAKE_SOURCE_DIR}/kio/kfile -) - -link_directories( - ${TQT_LIBRARY_DIRS} -) - - -##### kfile ##################################### - -set( target kfile ) - -set( ${target}_SRCS - fileprops.cpp -) - -tde_add_executable( ${target} - SOURCES ${${target}_SRCS} - LINK kio-shared - DESTINATION ${BIN_INSTALL_DIR} -) \ No newline at end of file diff --git a/kio/misc/kfile/Makefile.am b/kio/misc/kfile/Makefile.am deleted file mode 100644 index 605fef7d3..000000000 --- a/kio/misc/kfile/Makefile.am +++ /dev/null @@ -1,10 +0,0 @@ -METASOURCES = AUTO - -noinst_HEADERS = fileprops.h -INCLUDES= -I$(top_srcdir) -I$(top_srcdir)/kio/kio $(all_includes) - -bin_PROGRAMS = kfile -kfile_SOURCES = fileprops.cpp -kfile_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor -kfile_LDADD = $(LIB_KIO) - diff --git a/kio/misc/kfile/README b/kio/misc/kfile/README deleted file mode 100644 index d063b6d58..000000000 --- a/kio/misc/kfile/README +++ /dev/null @@ -1,4 +0,0 @@ -This is a commandline frontend to KFileMetaInfo. It allows -to read and write meta information of files. - -Carsten Pfeiffer diff --git a/kio/misc/kfile/fileprops.cpp b/kio/misc/kfile/fileprops.cpp deleted file mode 100644 index bbd34a2a4..000000000 --- a/kio/misc/kfile/fileprops.cpp +++ /dev/null @@ -1,480 +0,0 @@ -/* This file is part of the KDE libraries - Copyright (C) 2002,2003 Carsten Pfeiffer - - library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation, version 2. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include - -#include -#include - -#include -#include -#include -#include -#include -#include - -#include "fileprops.h" - -#define KFILEVERSION "0.2" -#define INDENT "\t" - -using namespace std; - -static TQString beatifyValue( const TQString& value ) -{ - if ( value.isNull() ) - return TQString("(no value for key available)"); - else if ( value.isEmpty() ) - return TQString("(empty)"); - - return value; -} - -FileProps::FileProps( const TQString& path, const TQStringList& suppliedGroups ) - : m_dirty( false ) -{ - m_info = new KFileMetaInfo(path, TQString::null, KFileMetaInfo::Everything); - m_userSuppliedGroups = !suppliedGroups.isEmpty(); - m_groupsToUse = m_userSuppliedGroups ? suppliedGroups : m_info->groups(); -} - -FileProps::~FileProps() -{ - sync(); - delete m_info; -} - -bool FileProps::sync() -{ - if ( !m_dirty ) - return true; - - return m_info->applyChanges(); -} - -bool FileProps::isValid() const -{ - return m_info->isValid(); -} - -TQStringList FileProps::supportedGroups() const -{ - return m_info->supportedGroups(); -} - -TQStringList FileProps::availableGroups() const -{ - return m_info->groups(); -} - -TQStringList FileProps::supportedKeys( const TQString& group ) const -{ - KFileMetaInfoGroup g = m_info->group( group ); - return g.supportedKeys(); -} - -TQStringList FileProps::availableKeys( const TQString& group ) const -{ - KFileMetaInfoGroup g = m_info->group( group ); - TQStringList allKeys = g.keys(); - TQStringList ret; - TQStringList::ConstIterator it = allKeys.begin(); - for ( ; it != allKeys.end(); ++it ) - { - if ( g.item( *it ).isValid() ) - ret.append( *it ); - } - - return ret; -} - -TQStringList FileProps::preferredKeys( const TQString& group ) const -{ - KFileMetaInfoGroup g = m_info->group( group ); - return g.preferredKeys(); -} - -TQString FileProps::getValue( const TQString& group, - const TQString& key ) const -{ - KFileMetaInfoGroup g = m_info->group( group ); - return FileProps::createKeyValue( g, key ); -} - -bool FileProps::setValue( const TQString& group, - const TQString& key, const TQString &value ) -{ - KFileMetaInfoGroup g = m_info->group( group ); - bool wasAdded = false; - if ( !g.isValid() ) - { - if ( m_info->addGroup( group ) ) - { - wasAdded = true; - g = m_info->group( group ); - } - else - return false; - } - - bool ok = g[key].setValue( value ); - - if ( !ok && wasAdded ) // remove the created group again - (void) m_info->removeGroup( group ); - - m_dirty |= ok; - return ok; -} - -TQStringList FileProps::allValues( const TQString& group ) const -{ - KFileMetaInfoGroup g = m_info->group( group ); - return FileProps::createKeyValueList( g, g.keys() ); -} - -TQStringList FileProps::preferredValues( const TQString& group ) const -{ - KFileMetaInfoGroup g = m_info->group( group ); - return FileProps::createKeyValueList( g, g.preferredKeys() ); -} - -// static helper: -// creates strings like -// "group: translatedKey: value" -TQString FileProps::createKeyValue( const KFileMetaInfoGroup& g, - const TQString& key ) -{ - static const int MAX_SPACE = 25; - KFileMetaInfoItem item = g.item( key ); - - TQString result("%1"); - result = result.arg( (item.isValid() ? item.translatedKey() : key) + ":", - -MAX_SPACE ); - result.append( beatifyValue( item.string() ) ); - - TQString group("%1"); - group = group.arg( g.translatedName() + ":", -MAX_SPACE ); - result.prepend( group ); - - return result; -} - -// static -TQStringList FileProps::createKeyValueList( const KFileMetaInfoGroup& g, - const TQStringList& keys ) -{ - TQStringList result; - TQStringList::ConstIterator it = keys.begin(); - - for ( ; it != keys.end(); ++it ) - result.append( FileProps::createKeyValue( g, *it ) ); - - return result; -} - -/////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////// - - - -// kfile --mimetype --listsupported --listavailable --listpreferred --listwritable --getValue "key" --setValue "key=value" --allValues --preferredValues --dialog --quiet file [file...] -// "key" may be a list of keys, separated by commas -static KCmdLineOptions options[] = -{ - { "m", 0, 0 }, // short option for --mimetype - { "nomimetype", I18N_NOOP("Do not print the mimetype of the given file(s)"), 0 }, - - { "ls", 0, 0 }, // short option for --listsupported - { "listsupported ", - I18N_NOOP("List all supported metadata keys of the given file(s). " - "If mimetype is not specified, the mimetype of the given " - "files is used." ), "file" }, - - { "lp", 0, 0 }, // short option for --listpreferred - { "listpreferred ", - I18N_NOOP("List all preferred metadata keys of the given file(s). " - "If mimetype is not specified, the mimetype of the given " - "files is used." ), "file" }, - - { "la", 0, 0 }, // short option for --listavailable - { "listavailable", - I18N_NOOP("List all metadata keys which have a value in the given " - "file(s)."), 0 }, - - { "sm", 0, 0 }, // short option for --supportedMimetypes - { "supportedMimetypes", - I18N_NOOP("Prints all mimetypes for which metadata support is " - "available."), 0 }, - - { "q", 0, 0 }, // short option for --quiet - { "quiet", - I18N_NOOP("Do not print a warning when more than one file was given " - "and they do not all have the same mimetype."), 0 }, - - { "av", 0, 0 }, // short option for --allValues - { "allValues", - I18N_NOOP("Prints all metadata values, available in the given " - "file(s)."), 0 }, - - { "pv", 0, 0 }, // short option for --preferredValues - { "preferredValues", - I18N_NOOP("Prints the preferred metadata values, available in the " - "given file(s)."), 0 }, - - { "dialog", - I18N_NOOP("Opens a TDE properties dialog to allow viewing and " - "modifying of metadata of the given file(s)"), 0 }, - - { "getValue ", - I18N_NOOP("Prints the value for 'key' of the given file(s). 'key' " - "may also be a comma-separated list of keys"), 0 }, - - { "setValue ", - I18N_NOOP("Attempts to set the value 'value' for the metadata key " - "'key' for the given file(s)"), 0 }, - - { "!groups ", I18N_NOOP("The group to get values from or set values to"), - 0 }, - - { "+[files]", - I18N_NOOP("The file (or a number of files) to operate on."), 0 }, - KCmdLineLastOption -}; - - -// -// helper functions -// - -static void printSupportedMimeTypes() -{ - TQStringList allMimeTypes = KFileMetaInfoProvider::self()->supportedMimeTypes(); - if ( allMimeTypes.isEmpty() ) - { - cout << - i18n("No support for metadata extraction found.").local8Bit().data() - << endl; - return; - } - - cout << i18n("Supported MimeTypes:").local8Bit().data() << endl; - - TQStringList::ConstIterator it = allMimeTypes.begin(); - for ( ; it != allMimeTypes.end(); it++ ) - cout << (*it).local8Bit().data() << endl; -} - -// caller needs to delete the returned list! -static KFileItemList * fileItemList( const TDECmdLineArgs *args ) -{ - KFileItemList * items = new KFileItemList(); - items->setAutoDelete( true ); - for ( int i = 0; i < args->count(); i++ ) - items->append( new KFileItem( KFileItem::Unknown, - KFileItem::Unknown, - args->url( i ) )); - return items; -} - -static void showPropertiesDialog( const TDECmdLineArgs *args ) -{ - KFileItemList *items = fileItemList( args ); - new KPropertiesDialog( *items, 0L, "props dialog", true ); - delete items; -} - -static void printMimeTypes( const TDECmdLineArgs *args ) -{ - for ( int i = 0; i < args->count(); i++ ) - { - KURL url = args->url( i ); - KMimeType::Ptr mt = KMimeType::findByURL( url ); - cout << args->arg(i) << ": " << mt->comment().local8Bit().data() << " (" - << mt->name().local8Bit().data() << ")" << endl; - } -} - -static void printList( const TQStringList& list ) -{ - TQStringList::ConstIterator it = list.begin(); - for ( ; it != list.end(); ++it ) - cout << (*it).local8Bit().data() << endl; - cout << endl; -} - -static void processMetaDataOptions( const TQPtrList propList, - TDECmdLineArgs *args ) -{ -// kfile --mimetype --supportedMimetypes --listsupported --listavailable --listpreferred --listwritable --getValue "key" --setValue "key=value" --allValues --preferredValues --dialog --quiet file [file...] -// "key" may be a list of keys, separated by commas - - TQString line("-- -------------------------------------------------------"); - FileProps *props; - TQPtrListIterator it( propList ); - for ( ; (props = it.current()); ++it ) - { - TQString file = props->fileName() + " "; - TQString fileString = line.replace( 3, file.length(), file ); - cout << TQFile::encodeName( fileString ).data() << endl; - - if ( args->isSet( "listsupported" ) ) - { - cout << "=Supported Keys=" << endl; - printList( props->supportedKeys() ); - } - if ( args->isSet( "listpreferred" ) ) - { - cout << "=Preferred Keys=" << endl; - printList( props->preferredKeys() ); - } - if ( args->isSet( "listavailable" ) ) - { - cout << "=Available Keys=" << endl; - TQStringList groups = props->availableGroups(); - TQStringList::ConstIterator git = groups.begin(); - for ( ; git != groups.end(); ++git ) - { - cout << "Group: " << (*git).local8Bit().data() << endl; - printList( props->availableKeys( *git ) ); - } - } -// if ( args->isSet( "listwritable" ) ) -// { -// cout << "TODO :)" << endl; -// } - if ( args->isSet( "getValue" ) ) - { - cout << "=Value=" << endl; - TQString key = TQString::fromLocal8Bit( args->getOption("getValue")); - TQStringList::ConstIterator git = props->groupsToUse().begin(); - for ( ; git != props->groupsToUse().end(); ++git ) - cout << props->getValue( *git, key ).local8Bit().data() << endl; - } - - if ( args->isSet( "setValue" ) ) - { - // separate key and value from the line "key=value" - TQString cmd = TQString::fromLocal8Bit( args->getOption("setValue")); - TQString key = cmd.section( '=', 0, 0 ); - TQString value = cmd.section( '=', 1 ); - - // either use supplied groups or all supported groups - // (not only the available!) - TQStringList groups = props->userSuppliedGroups() ? - props->groupsToUse() : - props->supportedGroups(); - - TQStringList::ConstIterator git = groups.begin(); - for ( ; git != groups.end(); ++git ) - props->setValue( *git, key, value ); - } - - if ( args->isSet( "allValues" ) ) - { - cout << "=All Values=" << endl; - TQStringList groups = props->availableGroups(); - TQStringList::ConstIterator group = groups.begin(); - for ( ; group != groups.end(); ++group ) - printList( props->allValues( *group ) ); - } - if ( args->isSet( "preferredValues" ) && !args->isSet("allValues") ) - { - cout << "=Preferred Values=" << endl; - TQStringList groups = props->availableGroups(); - TQStringList::ConstIterator group = groups.begin(); - for ( ; group != groups.end(); ++group ) - printList( props->preferredValues( *group ) ); - } - } - -} - -int main( int argc, char **argv ) -{ - TDEAboutData about( - "kfile", I18N_NOOP( "kfile" ), KFILEVERSION, - I18N_NOOP("A commandline tool to read and modify metadata of files." ), - TDEAboutData::License_LGPL, "(c) 2002, Carsten Pfeiffer", - 0 /*text*/, "http://devel-home.kde.org/~pfeiffer/", - "pfeiffer@kde.org" ); - - about.addAuthor( "Carsten Pfeiffer", 0, "pfeiffer@kde.org", - "http://devel-home.kde.org/~pfeiffer/" ); - - TDECmdLineArgs::init( argc, argv, &about ); - - TDECmdLineArgs::addCmdLineOptions( options ); - - TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs(); - bool useGUI = args->isSet( "dialog" ); - - TDEApplication app( useGUI, useGUI ); - - TQPtrList m_props; - m_props.setAutoDelete( true ); - - bool quiet = args->isSet( "quiet" ); - - if ( args->isSet( "supportedMimetypes" ) ) - printSupportedMimeTypes(); - - int files = args->count(); - if ( files == 0 ) - TDECmdLineArgs::usage( i18n("No files specified") ); // exit()s - - if ( args->isSet( "dialog" ) ) - { - showPropertiesDialog( args ); - return true; - } - - TQStringList groupsToUse; - QCStringList suppliedGroups = args->getOptionList( "groups" ); - QCStringList::ConstIterator it = suppliedGroups.begin(); - for ( ; it != suppliedGroups.end(); ++it ) - groupsToUse.append( TQString::fromLocal8Bit( (*it) ) ); - - TQString mimeType; - - for ( int i = 0; i < files; i++ ) - { - if ( args->isSet( "mimetype" ) ) - printMimeTypes( args ); - - FileProps *props = new FileProps( args->url(i).path(), groupsToUse ); - if ( props->isValid() ) - m_props.append( props ); - else - { - if ( !quiet ) - { - cerr << args->arg(i) << ": " << - i18n("Cannot determine metadata").local8Bit().data() << endl; - } - delete props; - } - } - - - processMetaDataOptions( m_props, args ); - - m_props.clear(); // force destruction/sync of props - cout.flush(); - - return 0; -} diff --git a/kio/misc/kfile/fileprops.h b/kio/misc/kfile/fileprops.h deleted file mode 100644 index 41d4f7c86..000000000 --- a/kio/misc/kfile/fileprops.h +++ /dev/null @@ -1,74 +0,0 @@ -/* This file is part of the KDE libraries - Copyright (C) 2002 Carsten Pfeiffer - - library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation, version 2. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef KFILEPROPS_H -#define KFILEPROPS_H - -#include - -#include - -class FileProps -{ -public: - FileProps( const TQString& path, const TQStringList& suppliedGroups ); - virtual ~FileProps(); - - bool isValid() const; - - TQString fileName() const { return m_info->path(); } - - TQStringList supportedGroups() const; - TQStringList availableGroups() const; - TQStringList translatedGroups(); - - const TQStringList& groupsToUse() const { return m_groupsToUse; } - bool userSuppliedGroups() const { return m_userSuppliedGroups; } - - TQStringList supportedKeys( const TQString& group ) const; - TQStringList availableKeys( const TQString& group ) const; - TQStringList preferredKeys( const TQString& group ) const; - - TQStringList supportedKeys() const { return m_info->supportedKeys(); } - TQStringList preferredKeys() const { return m_info->preferredKeys(); } - - TQString getValue( const TQString& group, const TQString& key ) const; - bool setValue( const TQString& group, - const TQString& key, const TQString &value ); - - TQStringList allValues( const TQString& group ) const; - TQStringList preferredValues( const TQString& group ) const; - - bool isReadOnly( const TQString& group, const TQString& key ); - -private: - static TQString createKeyValue( const KFileMetaInfoGroup& g, - const TQString& key ); - static TQStringList createKeyValueList( const KFileMetaInfoGroup&, - const TQStringList& ); - bool sync(); - - KFileMetaInfo *m_info; - bool m_dirty; - bool m_userSuppliedGroups; - - TQStringList m_groupsToUse; - -}; - -#endif // KFILEPROPS_H diff --git a/kio/misc/kio_uiserver.desktop b/kio/misc/kio_uiserver.desktop deleted file mode 100644 index fd37cd2bd..000000000 --- a/kio/misc/kio_uiserver.desktop +++ /dev/null @@ -1,100 +0,0 @@ -[Desktop Entry] -Type=Service -Name=kio_uiserver -Name[de]=Server der graphischen Oberfläche -Name[fy]=Kio_uiserver -Name[ja]=kio_uiサーバ -Name[mn]=График гадаргуугийн сервер -Name[nds]=kio_uiserver, Server för de graafsche Böversiet -Name[nl]=Kio_uiserver -Name[nso]=kio_uiseabi -Name[ro]=Kio_uiserver -Name[sv]=Kio-gränssnittsserver -Name[ta]=kio_uiசேவையகம் -Name[te]=కేఐఓ_యుఐసెర్వర్ -Exec=kio_uiserver -Comment=TDE's Progress Info UI server -Comment[af]=TDE se vordering inligting UI bediener -Comment[ar]=خادم معلومات تقدم واجهة كيدي -Comment[az]=TDE'nin İrəliləmə Bilgisi İstifadaçi Ara Üz Vericisi -Comment[be]=Сервер паведамленняў аб выкананні дзеянняў -Comment[bg]=Сървър за отчитане на прогреса (TDE's Progress Info UI server) -Comment[bn]=কে.ডি.ই. অগ্রগতি তথ্য UI সার্ভার -Comment[br]=Servijer stlenn EA Progress TDE -Comment[bs]=TDEov Progess Info UI server -Comment[ca]=Servidor d'informació de progrés del TDE -Comment[cs]=UI server zobrazující informace o průběhu -Comment[csb]=Serwer wëdowiédzë ò pòkròkù procesë -Comment[cy]=Gweinydd UI TDE i Ddangos Cynnydd -Comment[da]=TDE's fremgangsinfo-UI-server -Comment[de]=Ein UI-Server, der Fortschrittsinformationen darstellt -Comment[el]=Εξυπηρετητής πληροφοριών προόδου περιβάλλοντος χρήσης του TDE -Comment[eo]=Progresinforma servo -Comment[es]=Servidor UI de información de progreso de TDE -Comment[et]=TDE edenemise info UI server -Comment[eu]=TDEren aurrerapen-informazioen UI zerbitzaria -Comment[fa]=اطلاعات پیشرفت کارساز UI TDE -Comment[fi]=TDE:n edistymispalkin käyttöliittymäpalvelin -Comment[fr]=Serveur graphique d'infos de progression de TDE -Comment[fy]=TDE's tsjinner foar ynformaasje oer de fuortgong -Comment[gl]=Servidor UI de Información de Progreso de TDE -Comment[he]=שרת ממשק מידע ההתקדמות של TDE -Comment[hi]=केडीई का प्रोग्रेस जानकारी UI सर्वर -Comment[hr]=TDEov Progess Info UI poslužitelj -Comment[hu]=TDE folyamatinformációs kiszolgáló -Comment[id]=Perkembangan TDE mengenai info server UI -Comment[is]=Þjónn sem sýnir framvindu ferla -Comment[it]=Server informazioni avanzamento di TDE -Comment[ja]=TDE 進捗情報 UI サーバ -Comment[ka]=TDE-ს მონაცემთა გადაცემის სერვერი -Comment[kk]=TDE деректерді алу-беруді бақылау сервері -Comment[km]=ម៉ាស៊ីន​បម្រើ UI នៃ​ព័ត៌មាន​វឌ្ឍនភាព​របស់ TDE -Comment[ko]=TDE에서 보다 발전된 정보 UI 서버 -Comment[lb]=UI-Server vu TDE, dee Fortschrëttsinformatiounen uweist -Comment[lt]=TDE eigos informacijos UI serveris -Comment[lv]=TDE Progresa Info UI serveris -Comment[mk]=TDE сервер за информации за прогресот -Comment[mn]=Прогресс мэдээллээр дүрслэгдсэн хэрэглэгчийн харьцах хэсгийн сервер -Comment[ms]=Pelayan Info UI TDE -Comment[mt]=Server tal-progress tal-UI TDE -Comment[nb]=TDE UI-tjener for framgangsinfo -Comment[nds]=Server för graafsche Vörankamen-Informatschonen -Comment[ne]=TDE को प्रगति सूचना UI सर्भर -Comment[nl]=TDE's server voor informatie over de voortgang. -Comment[nn]=TDE UI-tenar for framgangsinfo -Comment[nso]=Seabi sa UI ya Tshedimoso ya Tswelopele ya TDE -Comment[oc]=Servor d'informacion de progress TDE -Comment[pa]=TDE ਦੀ ਤਰੱਕੀ ਜਾਣਕਾਰੀ UI ਸਰਵਰ -Comment[pl]=Serwer informacji o postępie procesu -Comment[pt]=Servidor de informações sobre o progresso das operações -Comment[pt_BR]=Servidor de informação de progresso do TDE -Comment[ro]=Server informaţii de progres TDE -Comment[ru]=Сервер монитора передачи данных TDE -Comment[rw]=Amakuru y'Aho bigeze ya TDE Seriveri UI -Comment[se]=TDE:a ovdánandieđuid UI-bálvá -Comment[sk]=TDE Progres Info UI server -Comment[sl]=Strežnik TDE's Progress Info UI -Comment[sq]=UI Shërbyesi për Informimin e Progresit të TDEs -Comment[sr]=TDE-ов UI сервер информација о напретку -Comment[sr@Latn]=TDE-ov UI server informacija o napretku -Comment[sv]=TDE:s server för förloppsinformation -Comment[ta]=கேடிஇயின் முன்னேற்ற தகவல் முகப்புப் சேவையகம் -Comment[te]=కెడిఈ యొక్క ప్రగతి సమాచార యూఐ సెర్వర్ -Comment[tg]=Инкишофи TDE's Info UI Сервер -Comment[th]=เซิร์ฟเวอร์แสดงข้อมูลความคืบหน้าของ TDE -Comment[tr]=TDE'nin İlerleme Bilgisi arayüz sunucusu -Comment[tt]=TDE'nıñ Alğakiteşne Küzätü servere -Comment[uk]=Сервер графічного інтерфейсу інформації про розвиток TDE -Comment[uz]=TDE'ning maʼlumot uzatishni nazorat qilish serveri -Comment[uz@cyrillic]=TDE'нинг маълумот узатишни назорат қилиш сервери -Comment[ven]=UI siva ya mafhungo a mwelaphanda a TDE -Comment[vi]=Trình phục vụ giao diện người dùng cho thông tin tiến hành của TDE. -Comment[xh]=Umcedisi we UI Wenqubela Yenkcukacha we TDE -Comment[zh_CN]=TDE 的进度信息用户界面服务器 -Comment[zh_HK]=TDE 的進度資訊介面伺服程式 -Comment[zh_TW]=TDE 的進度資訊使用者介面伺服器 -Comment[zu]=Umlekeleli we-UI Yolwazi Lwenqubo lwe-TDE -ServiceTypes= -# It is a server -X-DCOP-ServiceType=Unique -X-TDE-StartupNotify=false diff --git a/kio/misc/kmailservice.cpp b/kio/misc/kmailservice.cpp deleted file mode 100644 index 3b2eb8cf7..000000000 --- a/kio/misc/kmailservice.cpp +++ /dev/null @@ -1,45 +0,0 @@ -/* This file is part of the KDE libraries - Copyright (C) 2000 Simon Hausmann - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License version 2 as published by the Free Software Foundation. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include -#include -#include - -static const KCmdLineOptions options[] = -{ - { "+url", 0, 0 }, - KCmdLineLastOption -}; - -int main( int argc, char **argv ) -{ - KLocale::setMainCatalogue("tdelibs"); - TDECmdLineArgs::init( argc, argv, "kmailservice", I18N_NOOP("KMailService"), I18N_NOOP("Mail service"), "unknown" ); - TDECmdLineArgs::addCmdLineOptions( options ); - - TDEApplication a( false, false ); - - TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs(); - - if ( args->count() != 1 ) - return 1; - - a.invokeMailer(KURL(args->arg(0)), a.startupId(), true); - - return 0; -} diff --git a/kio/misc/kmailservice.protocol b/kio/misc/kmailservice.protocol deleted file mode 100644 index 46a3054a6..000000000 --- a/kio/misc/kmailservice.protocol +++ /dev/null @@ -1,15 +0,0 @@ -[Protocol] -exec=kmailservice %u -protocol=mailto -input=none -output=none -helper=true -listing= -reading=false -writing=false -makedir=false -deleting=false -DocPath=kioslave/mailto.html -Icon=mail_new -Class=:internet -URIMode=mailto diff --git a/kio/misc/kpac/CMakeLists.txt b/kio/misc/kpac/CMakeLists.txt deleted file mode 100644 index 00ce2d357..000000000 --- a/kio/misc/kpac/CMakeLists.txt +++ /dev/null @@ -1,66 +0,0 @@ -################################################# -# -# (C) 2010 Serghei Amelian -# serghei (DOT) amelian (AT) gmail.com -# -# Improvements and feedback are welcome -# -# This file is released under GPL >= 2 -# -################################################# - -include_directories( - ${TQT_INCLUDE_DIRS} - ${CMAKE_CURRENT_BINARY_DIR} - ${CMAKE_BINARY_DIR} - ${CMAKE_BINARY_DIR}/tdecore - ${CMAKE_BINARY_DIR}/kjs - ${CMAKE_SOURCE_DIR} - ${CMAKE_SOURCE_DIR}/dcop - ${CMAKE_SOURCE_DIR}/tdecore - ${CMAKE_SOURCE_DIR}/tdecore/network - ${CMAKE_SOURCE_DIR}/kio - ${CMAKE_SOURCE_DIR}/kio/kio - ${CMAKE_SOURCE_DIR}/kded -) - -link_directories( - ${TQT_LIBRARY_DIRS} -) - -##### other data ################################ - -install(FILES proxyscout.desktop DESTINATION ${SERVICES_INSTALL_DIR}/kded ) -install(FILES eventsrc DESTINATION ${DATA_INSTALL_DIR}/proxyscout ) - - -##### kded_proxyscout ########################### - -set( target kded_proxyscout ) - -set( ${target}_SRCS - proxyscout.cpp proxyscout.skel script.cpp - downloader.cpp discovery.cpp -) - -set( ${target}_SKELS - proxyscout.h -) - -tde_add_kpart( ${target} AUTOMOC - SOURCES ${${target}_SRCS} - LINK tdeinit_kded-shared kjs-shared ${RESOLV_LIBRARIES} - DEPENDENCIES dcopidl - DESTINATION ${PLUGIN_INSTALL_DIR} -) - - -##### kpac_dhcp_helper ########################## - -set( target kpac_dhcp_helper ) - -# FIXME on Gentoo this binary is not suided -tde_add_executable( ${target} SETUID - SOURCES kpac_dhcp_helper.c - DESTINATION ${BIN_INSTALL_DIR} -) diff --git a/kio/misc/kpac/Makefile.am b/kio/misc/kpac/Makefile.am deleted file mode 100644 index beb6a4b86..000000000 --- a/kio/misc/kpac/Makefile.am +++ /dev/null @@ -1,30 +0,0 @@ - -kde_module_LTLIBRARIES = kded_proxyscout.la -bin_PROGRAMS = kpac_dhcp_helper - -INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/libltdl -I$(top_srcdir)/kded -I$(top_builddir)/kjs \ - -I$(top_srcdir)/tdecore/network $(all_includes) -METASOURCES = AUTO -KDE_CXXFLAGS = $(USE_EXCEPTIONS) - -kded_proxyscout_la_SOURCES = proxyscout.skel proxyscout.cpp script.cpp \ - downloader.cpp discovery.cpp -kded_proxyscout_la_LDFLAGS = $(all_libraries) -module -avoid-version -kded_proxyscout_la_LIBADD = $(LIB_KIO) $(top_builddir)/kjs/libkjs.la $(LIB_KDED) $(LIB_QT) \ - $(top_builddir)/dcop/libDCOP.la $(LIB_TDECORE) $(LIBRESOLV) - -kpac_dhcp_helper_SOURCES = kpac_dhcp_helper.c -kpac_dhcp_helper_CFLAGS = $(KDE_USE_FPIE) -kpac_dhcp_helper_LDFLAGS = $(KDE_USE_PIE) -kpac_dhcp_helper_LDADD = $(LIBSOCKET) - -noinst_HEADERS = proxyscout.h script.h downloader.h discovery.h - -servicesdir = $(kde_servicesdir)/kded -services_DATA = proxyscout.desktop - -proxyscoutdatadir = $(kde_datadir)/proxyscout -proxyscoutdata_DATA = eventsrc - -install-exec-local: - @(chown root $(DESTDIR)$(bindir)/kpac_dhcp_helper && chmod 4755 $(DESTDIR)$(bindir)/kpac_dhcp_helper) || echo "Please make kpac_dhcp_helper setuid root" diff --git a/kio/misc/kpac/README b/kio/misc/kpac/README deleted file mode 100644 index d211ae07b..000000000 --- a/kio/misc/kpac/README +++ /dev/null @@ -1,9 +0,0 @@ -Proxy Auto Configuration is a means to use a JavaScript function to -determine the proxy to use based on the requested URL. -It is described in detail here: -http://home.netscape.com/eng/mozilla/2.0/relnotes/demo/proxy-live.html - -Also implemented by this library are parts of the now expired Internet Draft -at http://www.wrec.org/Drafts/draft-cooper-webi-wpad-00.txt about WPAD -(Web Proxy Automatic Discovery). The discovery implemented discovery methods -are DHCP and DNS "Well known Aliases". diff --git a/kio/misc/kpac/README.wpad b/kio/misc/kpac/README.wpad deleted file mode 100644 index f63d25764..000000000 --- a/kio/misc/kpac/README.wpad +++ /dev/null @@ -1,73 +0,0 @@ -Web Proxy Auto Discovery (WPAD) -=============================== - -This README is intended for network administrators who want to enable the -users on their network to fully automatically find the proxy settings. - -Automatic proxy discovery works in two steps: -1) Find a configuration script -2) Determine a proxy to use by running that script - -The configuration script is a "PAC" (JavaScript) file just as in plain Proxy -Auto Configuration as described here: -http://home.netscape.com/eng/mozilla/2.0/relnotes/demo/proxy-live.html - -The WPAD part of the process (#1 above) described here is about how to find -this script without having the users enter its URL into the proxy settings. -(All they have to do in a WPAD-enabled network is to select "Automatically -detected script file" in KDE's proxy setup. - -There are two alternative ways to discover the PAC script's URL implemented -in KDE: - -1. DHCP based autodiscovery - - If you are running a DHCP server on your network anyway, you might - want to use this approach; all you have to do is to add the WPAD - option (numeric 252 or hex fc) as a string containing the URL to the - PAC script. - - To do so with older versions of ISC dhcpd, add this to - /etc/dhcpd.conf, either globally or just for the subnets you want to - enable WPAD for: - - option option-252 "http://example.com/path/to/proxyconfig.pac"; - - Or, for newer ISC dhcpd versions, add this globally: - - option wpad code 252 = text; - - and this either globally or for the WPAD subnets: - - option wpad "http://example.com/path/to/proxyconfig.pac"; - - For other DHCP servers, please consult the reference manual on how - to add an option by number if WPAD support is not built-in. - -2. DNS based autodiscovery - - If you don't run a DHCP server or prefer DNS based discovery, you - need to configure one of your hosts to have the name - wpad.example.com and make sure the PAC script is available as - http://wpad.example.com/wpad.dat If your network consists of several - subdomains, like a.example.com and b.example.com you can either - provide both http://a.example.com/wpad.dat and - http://b.example.com/wpad.dat or just http://example.com/wpad.dat - When a client searches for that script, it will search for a host - named "wpad" in its own domain, then in the next higher level domain - until success or if only the TLD is left (i.e. wpad.com will never - be tried) - -Note that DHCP is the preferred approach since it's more flexible than DNS -as it doesn't require a well known host name nor a fixed location -(/wpad.dat) for the PAC script. It is also the first method tried before -resorting to DNS, so if you use DNS there will be a noticeable delay of 5 -seconds while waiting for a DHCP reply. - -However, DHCP requires a helper program, kpac_dhcp_helper to be installed -suid root. If you consider this a security problem, just delete that program -or remove its suid permissions and use DNS instead. If the helper cannot -execute as root, the 5 seconds delay will also go away. - -If you have further questions or comments, please contact me: Malte -Starostik diff --git a/kio/misc/kpac/TODO b/kio/misc/kpac/TODO deleted file mode 100644 index ce5cd6a11..000000000 --- a/kio/misc/kpac/TODO +++ /dev/null @@ -1 +0,0 @@ -* Make use of badProxy() in KProtocolManager to enable fallbacks diff --git a/kio/misc/kpac/configure.in.in b/kio/misc/kpac/configure.in.in deleted file mode 100644 index a65b9a1c8..000000000 --- a/kio/misc/kpac/configure.in.in +++ /dev/null @@ -1,26 +0,0 @@ -dnl some setgroups() implementations seem to have short* instead of gid_t* -dnl and use some flags in the fiels that follows the gids -AC_MSG_CHECKING([for setgroups with short argument]) -AC_CACHE_VAL([kde_cv_shortsetgroups],[ - AC_TRY_RUN([ - int main() - { - short x[4]; - x[0] = x[1] = 1; - if (getgroups(1, x) == 0) if (setgroups(1, x) == -1) exit(1); - - if (getgroups(1, x) == -1) exit(1); - if (x[1] != 1) exit(1); - x[1] = 2; - if (getgroups(1, x) == -1) exit(1); - if (x[1] != 2) exit(1); - exit(0); - } - ],[kde_cv_shortsetgroups="yes"],[kde_cv_shortsetgroups="no"]) -]) -AC_MSG_RESULT($kde_cv_shortsetgroups) -if test "$kde_cv_shortsetgroups" = "yes"; then - AC_DEFINE(HAVE_SHORTSETGROUPS,1,[if setgroups() takes short *as second arg]) -fi - -AC_CHECK_HEADERS(arpa/nameser8_compat.h sys/param.h) diff --git a/kio/misc/kpac/dhcp.h b/kio/misc/kpac/dhcp.h deleted file mode 100644 index 41643ae3a..000000000 --- a/kio/misc/kpac/dhcp.h +++ /dev/null @@ -1,78 +0,0 @@ -/* This file is part of the KDE Libraries - Copyright (c) 2001 Malte Starostik - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License version 2 as published by the Free Software Foundation. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. - */ - - -/* See RFC 2131 for details */ - -#ifndef __dhcp_h__ -#define __dhcp_h__ - -#ifdef HAVE_STDINT_H -# include -#endif - -#define DHCP_OPT_LEN 312 - -struct dhcp_msg -{ -#define DHCP_BOOTREQUEST 1 -#define DHCP_BOOTREPLY 2 - uint8_t op; /* operation */ - uint8_t htype; /* hwaddr type */ - uint8_t hlen; /* hwaddr len */ - uint8_t hops; - uint32_t xid; /* transaction id */ - uint16_t secs; /* seconds since protocol start */ -#define DHCP_BROADCAST 1 - uint16_t flags; - uint32_t ciaddr; /* client IP */ - uint32_t yiaddr; /* "your" IP */ - uint32_t siaddr; /* server IP */ - uint32_t giaddr; /* gateway IP */ - uint8_t chaddr[16]; /* client hwaddr */ - uint8_t sname[64]; /* server name */ - uint8_t file[128]; /* bootstrap file */ - uint8_t options[DHCP_OPT_LEN]; -}; - -/* first four bytes in options */ -#define DHCP_MAGIC1 0x63 -#define DHCP_MAGIC2 0x82 -#define DHCP_MAGIC3 0x53 -#define DHCP_MAGIC4 0x63 - -/* DHCP message types */ -#define DHCP_DISCOVER 1 -#define DHCP_OFFER 2 -#define DHCP_REQUEST 3 -#define DHCP_DECLINE 4 -#define DHCP_ACK 5 -#define DHCP_NAK 6 -#define DHCP_RELEASE 7 -#define DHCP_INFORM 8 - -/* option types */ -#define DHCP_OPT_MSGTYPE 0x35 -#define DHCP_OPT_PARAMREQ 0x37 -#define DHCP_OPT_WPAD 0xfc -#define DHCP_OPT_END 0xff - -#endif - -/* vim: ts=4 sw=4 noet - */ diff --git a/kio/misc/kpac/discovery.cpp b/kio/misc/kpac/discovery.cpp deleted file mode 100644 index 4f33d1389..000000000 --- a/kio/misc/kpac/discovery.cpp +++ /dev/null @@ -1,147 +0,0 @@ -/* - Copyright (c) 2003 Malte Starostik - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - - -#include "config.h" - -#include - -#ifdef HAVE_SYS_TYPES_H -#include -#endif -#ifdef HAVE_NETINET_IN_H -#include -#endif -#include -#ifdef HAVE_ARPA_NAMESER8_COMPAT_H -#include -#endif -#ifdef HAVE_SYS_PARAM_H -// Basically, the BSDs need this before resolv.h -#include -#endif -#include -#include - -#include - -#include -#include -#include - -#include "discovery.moc" - -namespace KPAC -{ - Discovery::Discovery( TQObject* parent ) - : Downloader( parent ), - m_helper( new KProcIO ) - { - connect( m_helper, TQT_SIGNAL( readReady( KProcIO* ) ), TQT_SLOT( helperOutput() ) ); - connect( m_helper, TQT_SIGNAL( processExited( TDEProcess* ) ), TQT_SLOT( failed() ) ); - *m_helper << "kpac_dhcp_helper"; - - if ( !m_helper->start() ) - TQTimer::singleShot( 0, this, TQT_SLOT( failed() ) ); - } - - bool Discovery::initHostName() - { - struct utsname uts; - - if (uname (&uts) > -1) - { - struct hostent *hent = gethostbyname (uts.nodename); - if (hent != 0) - m_hostname = TQString::fromLocal8Bit( hent->h_name ); - } - - // If no hostname, try gethostname as a last resort. - if (m_hostname.isEmpty()) - { - char buf [256]; - if (gethostname (buf, sizeof(buf)) == 0) - { - buf[255] = '\0'; - m_hostname = TQString::fromLocal8Bit( buf ); - } - } - return !m_hostname.isEmpty(); - } - - bool Discovery::checkDomain() const - { - // If a domain has a SOA record, don't traverse any higher. - // Returns true if no SOA can be found (domain is "ok" to use) - // Stick to old resolver interface for portability reasons. - union - { - HEADER header; - unsigned char buf[ PACKETSZ ]; - } response; - int len = res_query( m_hostname.local8Bit(), C_IN, T_SOA, - response.buf, sizeof( response.buf ) ); - if ( len <= int( sizeof( response.header ) ) || - ntohs( response.header.ancount ) != 1 ) return true; - unsigned char* pos = response.buf + sizeof( response.header ); - unsigned char* end = response.buf + len; - // skip query section - pos += dn_skipname( pos, end ) + QFIXEDSZ; - if ( pos >= end ) return true; - // skip answer domain - pos += dn_skipname( pos, end ); - short type; - GETSHORT( type, pos ); - return type != T_SOA; - } - - void Discovery::failed() - { - setError( i18n( "Could not find a usable proxy configuration script" ) ); - - // If this is the first DNS query, initialize our host name or abort - // on failure. Otherwise abort if the current domain (which was already - // queried for a host called "wpad" contains a SOA record) - bool firstQuery = m_hostname.isEmpty(); - if ( ( firstQuery && !initHostName() ) || - ( !firstQuery && !checkDomain() ) ) - { - emit result( false ); - return; - } - - int dot = m_hostname.find( '.' ); - if ( dot >= 0 ) - { - m_hostname.remove( 0, dot + 1 ); // remove one domain level - download( KURL( "http://wpad." + m_hostname + "./wpad.dat" ) ); - } - else emit result( false ); - } - - void Discovery::helperOutput() - { - m_helper->disconnect( this ); - TQString line; - m_helper->readln( line ); - download( KURL( line.stripWhiteSpace() ) ); - } -} - -// vim: ts=4 sw=4 et diff --git a/kio/misc/kpac/discovery.h b/kio/misc/kpac/discovery.h deleted file mode 100644 index a1443ad8c..000000000 --- a/kio/misc/kpac/discovery.h +++ /dev/null @@ -1,55 +0,0 @@ -/* - Copyright (c) 2003 Malte Starostik - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - - -#ifndef KPAC_DISCOVERY_H -#define KPAC_DISCOVERY_H - -#include - -#include "downloader.h" - -class KProcIO; - -namespace KPAC -{ - class Discovery : public Downloader - { - Q_OBJECT - public: - Discovery( TQObject* ); - - protected slots: - virtual void failed(); - - private slots: - void helperOutput(); - - private: - bool initHostName(); - bool checkDomain() const; - - KProcIO* m_helper; - TQString m_hostname; - }; -} - -#endif // KPAC_DISCOVERY_H - -// vim: ts=4 sw=4 et diff --git a/kio/misc/kpac/downloader.cpp b/kio/misc/kpac/downloader.cpp deleted file mode 100644 index c150a732c..000000000 --- a/kio/misc/kpac/downloader.cpp +++ /dev/null @@ -1,89 +0,0 @@ -/* - Copyright (c) 2003 Malte Starostik - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - - -#include -#include - -#include - -#include -#include -#include -#include - -#include "downloader.moc" - -namespace KPAC -{ - Downloader::Downloader( TQObject* parent ) - : TQObject( parent ) - { - } - - void Downloader::download( const KURL& url ) - { - m_data.resize( 0 ); - m_script = TQString::null; - m_scriptURL = url; - - TDEIO::TransferJob* job = TDEIO::get( url, false, false ); - connect( job, TQT_SIGNAL( data( TDEIO::Job*, const TQByteArray& ) ), - TQT_SLOT( data( TDEIO::Job*, const TQByteArray& ) ) ); - connect( job, TQT_SIGNAL( result( TDEIO::Job* ) ), TQT_SLOT( result( TDEIO::Job* ) ) ); - } - - void Downloader::failed() - { - emit result( false ); - } - - void Downloader::setError( const TQString& error ) - { - m_error = error; - } - - void Downloader::data( TDEIO::Job*, const TQByteArray& data ) - { - unsigned offset = m_data.size(); - m_data.resize( offset + data.size() ); - std::memcpy( m_data.data() + offset, data.data(), data.size() ); - } - - void Downloader::result( TDEIO::Job* job ) - { - if ( !job->error() && !static_cast< TDEIO::TransferJob* >( job )->isErrorPage() ) - { - bool dummy; - m_script = TDEGlobal::charsets()->codecForName( - job->queryMetaData( "charset" ), dummy )->toUnicode( m_data ); - emit result( true ); - } - else - { - if ( job->error() ) - setError( i18n( "Could not download the proxy configuration script:\n%1" ) - .arg( job->errorString() ) ); - else setError( i18n( "Could not download the proxy configuration script" ) ); // error page - failed(); - } - } -} - -// vim: ts=4 sw=4 et diff --git a/kio/misc/kpac/downloader.h b/kio/misc/kpac/downloader.h deleted file mode 100644 index 808e09378..000000000 --- a/kio/misc/kpac/downloader.h +++ /dev/null @@ -1,64 +0,0 @@ -/* - Copyright (c) 2003 Malte Starostik - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - - -#ifndef KPAC_DOWNLOADER_H -#define KPAC_DOWNLOADER_H - -#include - -#include - -namespace TDEIO { class Job; } - -namespace KPAC -{ - class Downloader : public TQObject - { - Q_OBJECT - public: - Downloader( TQObject* ); - - void download( const KURL& ); - const KURL& scriptURL() { return m_scriptURL; } - const TQString& script() { return m_script; } - const TQString& error() { return m_error; } - - signals: - void result( bool ); - - protected: - virtual void failed(); - void setError( const TQString& ); - - private slots: - void data( TDEIO::Job*, const TQByteArray& ); - void result( TDEIO::Job* ); - - private: - TQByteArray m_data; - KURL m_scriptURL; - TQString m_script; - TQString m_error; - }; -} - -#endif // KPAC_DOWNLOADER_H - -// vim: ts=4 sw=4 et diff --git a/kio/misc/kpac/eventsrc b/kio/misc/kpac/eventsrc deleted file mode 100644 index c44443a03..000000000 --- a/kio/misc/kpac/eventsrc +++ /dev/null @@ -1,530 +0,0 @@ -[!Global!] -IconName=proxy -Comment=Automatic Proxy Configuration -Comment[af]=Outomatiese Proksie Opstelling -Comment[ar]=تهيئة آلية للخادم الوكيل -Comment[az]=Avtomatik Vəkil Quraşdırılması -Comment[bg]=Автоматично настройване на прокси сървъра -Comment[bn]=স্বয়ংক্রিয় প্রক্সি কনফিগারেশন -Comment[br]=Kefluniadur emgefreekh ar proksi -Comment[bs]=Automatsko podešavanje proxy-ja -Comment[ca]=Configuració automàtica del servidor d'intercanvi -Comment[cs]=Automatické nastavení proxy -Comment[csb]=Aùtokònfigùracëjô pòstrzédnika -Comment[cy]=Ffurweddiad Awtomatig o'r Dirprwy -Comment[da]=Automatisk proxy-indstilling -Comment[de]=Autom. Proxy-Einrichtung -Comment[el]=Αυτόματη ρύθμιση διαμεσολαβητή -Comment[eo]=Aŭtomata Prokuragordo -Comment[es]=Configuración automática del Proxy -Comment[et]=Automaatne proxy konfigureerimine -Comment[eu]=Proxy-aren konfigurazio automatikoa -Comment[fa]=پیکربندی خودکار پیشکار -Comment[fi]=Automaattiset proxy-asetukset -Comment[fr]=Configuration automatique du serveur mandataire -Comment[fy]=Automatyske proxy ynstelling -Comment[ga]=Uathchumraíocht an tSeachfhreastalaí -Comment[gl]=Configuración Automática do Proxy -Comment[he]=הגדרות פרוקסי אוטומטיות -Comment[hi]=स्वचलित प्रॉक्सी कॉन्फ़िगरेटर -Comment[hr]=Automatsko podešavanje proxyja -Comment[hu]=Automatikus proxybeállítás -Comment[id]=Konfigurasi Proxi Otomatis -Comment[is]=Sjálfvirkar stillingar milliþjóns -Comment[it]=Configurazione automatica proxy -Comment[ja]=自動プロキシ設定 -Comment[ka]=პროქსის თვითგამართვა -Comment[kk]=Автоматты түрде проксиді баптау -Comment[km]=ការ​កំណត់​រចនាសម្ព័ន្ធ​ប្រូកស៊ី​ដោយ​ស្វ័យ​ប្រវត្តិ -Comment[ko]=스스로 프록시 설정 -Comment[lb]=Automatesch Proxy-Configuratioun -Comment[lt]=Automatinis proxy derinimas -Comment[mk]=Автоматска конфигурација на прокси -Comment[mn]=Автомат итгэмжилэгчийн тохиргоо -Comment[ms]=Penyelarasan Proksi Automatik -Comment[nb]=Automatisk mellomtjenerinnstilling -Comment[nds]=Proxy automaatsch instellen -Comment[ne]=स्वचालित प्रोक्सी कन्फिगरेसन -Comment[nl]=Automatische proxyconfiguratie -Comment[nn]=Automatisk mellomtenaroppsett -Comment[pa]=ਸਵੈ-ਚਾਲਤ ਪਰਾਕਸੀ ਸੰਰਚਨਾ -Comment[pl]=Autokonfiguracja pośrednika -Comment[pt]=Configuração Automática do 'Proxy' -Comment[pt_BR]=Configuração Automática do Proxy -Comment[ro]=Configurare automată "proxy" -Comment[ru]=Автонастройка прокси -Comment[rw]=Iboneza rya Nyabubasha Ryikoresha -Comment[se]=Automáhtalaš gaskabálváheiveheapmi -Comment[sk]=Automatická konfigurácia proxy -Comment[sl]=Samodejne nastavitve posrednika -Comment[sq]=Kofigurimi Automatik i Proxy-t -Comment[sr]=Аутоматско подешавање проксија -Comment[sr@Latn]=Automatsko podešavanje proksija -Comment[sv]=Automatisk proxyinställning -Comment[ta]=தானியக்க பதிலாள் வடிவமைப்பு -Comment[te]=స్వయంచాలిత ప్రాక్సీ రూపకరణం -Comment[tg]=Шакли Автоматӣ Вакил Кардашуда -Comment[th]=ปรับแต่งพร็อกซีอัตโนมัติ -Comment[tr]=Otomatik Vekil Sunucu Yapılandırması -Comment[tt]=Proxy'nı Aqıllı Caylaw -Comment[uk]=Автоматичне визначення проксі сервера -Comment[uz]=Proksini avtomatik ravishda moslash -Comment[uz@cyrillic]=Проксини автоматик равишда мослаш -Comment[vi]=Cấu hình ủy nhiệm tự động. -Comment[wa]=Apontiaedje otomatike do procsi -Comment[zh_CN]=自动代理配置 -Comment[zh_HK]=自動代理組態 -Comment[zh_TW]=自動代理組態 - -[script-error] -Name=Invalid proxy script -Name[af]=Ongeldige proksie skrip -Name[ar]=نص برمجي غير صالح -Name[az]=Hökmsüz vəkil skripti -Name[bg]=Невалиден скрипт за прокси сървъра -Name[bn]=অবৈধ প্রক্সি স্ক্রিপ্ট -Name[br]=N'eo ket mat an urzhiaoug proksi -Name[bs]=Neispravna proxy skripta -Name[ca]=Script del servidor intermedi no vàlid -Name[cs]=Neplatný proxy skript -Name[csb]=Falszëwi skript pòstrzédnika -Name[cy]=Sgript dirprwy annilys -Name[da]=Ugyldigt proxy-script -Name[de]=Ungültiges Proxy-Skript -Name[el]=Μη έγκυρο σενάριο διαμεσολαβητή -Name[eo]=Nevalida prokurila skripto -Name[es]=Procedimiento inválido del proxy -Name[et]=Vigane proxy skript -Name[eu]=Proxy-aren script baliogabea -Name[fa]=دست‌نوشتۀ پیشکار نامعتبر -Name[fi]=Virheellinen proxy-skripti -Name[fr]=Script de serveur mandataire non valable -Name[fy]=Unjildich proxy skript -Name[ga]=Script neamhbhailí seachfhreastalaí -Name[gl]=Guión de proxy inválido -Name[he]=תסריט Proxy לא תקין -Name[hi]=अवैध प्रॉक्सी स्क्रिप्ट -Name[hr]=Neispravna proxy skripta -Name[hu]=Érvénytelen proxy-szkript -Name[id]=Skrip proxi tidak sah -Name[is]=Ógild milliþjónsskrifta -Name[it]=Script proxy non valido -Name[ja]=無効なプロキシスクリプト -Name[ka]=პროქსის მცდარი სკრიპტი -Name[kk]=Жарамсыз прокси скрипті -Name[km]=ស្គ្រីប​ប្រូកស៊ី​មិន​ត្រឹមត្រូវ -Name[ko]=올바르지 않은 프록시 스크립트 -Name[lb]=Ongültegt Proxy-Skript -Name[lt]=Blogas proxy scenarijas -Name[mk]=Невалидна прокси скрипта -Name[mn]=Хүчингүй итгэмжилэгч скрипт -Name[ms]=Skrip proksi tidak sah -Name[nb]=Ugyldig mellomtjenerskript -Name[nds]=Proxyskript gellt nich -Name[ne]=अवैद्य प्रोक्सी स्क्रिप्ट -Name[nl]=Ongeldig proxyscript -Name[nn]=Ugyldig mellomtenarskript -Name[pa]=ਗਲਤ ਪਰਾਕਸੀ ਸਕ੍ਰਿਪਟ -Name[pl]=Niepoprawny skrypt pośrednika -Name[pt]=Configuração de 'proxy' inválida -Name[pt_BR]=Script de proxy inválido -Name[ro]=Script "proxy" eronat -Name[ru]=Неверный скрипт прокси -Name[rw]=Inyandikoporogaramu ya Nyabubasha ntiyemewe -Name[se]=Gustohis gaskabálváskripta -Name[sk]=Zlý proxy skript -Name[sl]=Neveljaven posredniški skript -Name[sq]=Proxy Skripta është e gabuar -Name[sr]=Неисправна прокси скрипта -Name[sr@Latn]=Neispravna proksi skripta -Name[sv]=Ogiltigt proxyskript -Name[ta]=செல்லாத பதிலாள் எழுத்தாக்கம் -Name[te]=చెల్లని ప్రాక్సీ స్క్రిప్ట్ -Name[tg]=Дастнависи вакил кардашуда ношоям -Name[th]=สคริปต์ของพร็อกซี ไม่ถูกต้อง -Name[tr]=Geçersiz vekil sunucu betiği -Name[tt]=Proxy ämerlege bozıq -Name[uk]=Неправильний скрипт для проксі -Name[uz]=Proksi skripti haqiqiy emas -Name[uz@cyrillic]=Прокси скрипти ҳақиқий эмас -Name[vi]=Tập lệnh ủy nhiệm không hợp lệ -Name[zh_CN]=无效的代理脚本 -Name[zh_HK]=不合法的代理伺服器 script -Name[zh_TW]=不合法 proxy 命令稿檔案 -Comment=The downloaded proxy configuration script is invalid -Comment[af]=Die proksie skipt wat afgelaai was is ongeldig -Comment[ar]=النص البرمجي الذي تم تنزيله غير صالح -Comment[az]=Endirilən vəkil quraşdırma skripti kökmsüzdür -Comment[bg]=Изтегленият скрипт за настройване на прокси сървъра е невалиден -Comment[bn]=ডাউনলোড করা প্রক্সি কনফিগারেশন স্ক্রিপ্টটি অবৈধ -Comment[br]=N'eo ket mat urzhiaoug kefluniadur ar proksi -Comment[bs]=Downloadovana skripta za podešavanje proxy-ja je neispravna -Comment[ca]=L'script de configuració del servidor intermedi descarregat no és vàlid -Comment[cs]=Stažený konfigurační skript pro proxy je neplatný -Comment[csb]=Zladowóny skript kònfigùracëji pòstrzédnika je falszëwi -Comment[cy]=Mae'r sgript ffurfweddu'r dirprwy a chafodd ei lawrlwytho yn annilys -Comment[da]=Det hentede proxy-indstillingsscript er ugyldigt -Comment[de]=Das heruntergeladene Proxy-Einrichtungsskript ist nicht verwendbar -Comment[el]=Το σενάριο ρύθμισης διαμεσολαβητή που λήφθηκε δεν είναι έγκυρο -Comment[eo]=La ŝarĝita prokuragordoskript estas nevalida -Comment[es]=El procedimiento descargado para la configuración del proxy es inválido -Comment[et]=Allalaaditud proxy seadistuse skript on vigane -Comment[eu]=Deskargatutako proxy-aren konfigurazioko script-a baliogabea da -Comment[fa]=دست‌نوشتۀ پیکربندی پیشکار بارگیری‌شده، نامعتبر است -Comment[fi]=Ladattu proxy-asetusskripti on virheellinen -Comment[fr]=Le script téléchargé de configuration du serveur mandataire n'est pas valable -Comment[fy]=It ynladen proxy ynstellings skript is ûnjildich -Comment[ga]=Is neamhbhailí í script chumraíocht an tseachfhreastalaí a íosluchtaíodh -Comment[gl]=O guión de configuración descarregado do proxy non é válido -Comment[he]=תסריט הגדרת הפרוקסי שהורד לא תקין -Comment[hi]=ङाउनलोडेड प्रॉक्सी कॉन्फ़िगरेटर स्क्रिप्ट अवैध है। -Comment[hr]=Preuzeta skripta konfiguriranja proxyja je neispravna -Comment[hu]=A letöltött proxybeállító szkript érvénytelen -Comment[id]=Skrip konfigurasi proxy yang diunduh tidak valid -Comment[is]=Sótt milliþjónsskrifta er ógild -Comment[it]=Lo script di configurazione proxy scaricato non è valido -Comment[ja]=ダウンロードされたプロキシ設定スクリプトは無効です。 -Comment[ka]=პროქსის გამართვის ჩამოტვირთული სკრიპტი მცდარია -Comment[kk]=Жүктеп алынған прокси баптау скрипті жарамсыз -Comment[km]=ស្គ្រីប​កំណត់​រចនាសម្ព័ន្ធប្រូកស៊ី​ដែល​បាន​ទាញយក មិន​ត្រឹមត្រូវ​ឡើយ -Comment[ko]=내려받은 프록시 설정 스크립트가 올바르지 않습니다. -Comment[lb]=D'Proxy-Configuratiounsskript, dat erofgelude gouf, ass ongülteg -Comment[lt]=Atsisiųstas proxy derinimo scenarijus yra blogas -Comment[mk]=Симнатата скрипта за конфигурација на прокси е навалидна -Comment[mn]=Татагдсан итгэмжилэгч тохируулгын скрипт хүчингүй -Comment[ms]=Skrip penyelarasan proksi yang dimuat turun tidak sah -Comment[nb]=Det nedlastede skriptet for mellomtjener-innstillinger er ugyldig -Comment[nds]=Dat Skript för't Instellen vun den Proxy gellt nich -Comment[ne]=डाउनलोड गरिएको प्रोक्सी कन्फिगरेसन स्क्रिप्ट अवैद्य छ -Comment[nl]=Het opgehaalde proxyconfiguratiescript is ongeldig -Comment[nn]=Det nedlasta skriptet for mellomtenaroppsett er ugyldig -Comment[pa]=ਡਾਊਨਲੋਡ ਪਰਾਕਸੀ ਸੰਰਚਨਾ ਸਕ੍ਰਿਪਟ ਜਾਇਜ਼ ਨਹੀਂ ਹੈ -Comment[pl]=Pobrany skrypt konfiguracji pośrednika jest nieprawidłowy -Comment[pt]=A configuração do 'proxy' transferida é inválida -Comment[pt_BR]=O script de configuração do proxy baixado é inválido -Comment[ro]=Scriptul de configurare "proxy" este eronat -Comment[ru]=Загруженный скрипт настройки прокси содержит ошибки -Comment[rw]=inyandikoporogaramu y'iboneza rya Nyabubasha yakuruwe ntiyemewe -Comment[se]=Viežžojuvvon gaskabálváskripta lea gustomeahttun -Comment[sk]=Stiahnutý konfiguračný skript proxy nie je správny -Comment[sl]=Naložen nastavitveni skript posrednika je neveljaven -Comment[sq]=Skripta për Konfigurimin e Proxy-t ishte e gabuar -Comment[sr]=Преузета скрипта за подешавање проксија је неисправна -Comment[sr@Latn]=Preuzeta skripta za podešavanje proksija je neispravna -Comment[sv]=Det nerladdade proxyinställningsskriptet är ogiltigt -Comment[ta]=இறக்கப்பட்ட பதிலாள் வடிவமைப்பு எழுத்தாக்கம் செல்லாது -Comment[te]=డౌన్ లోడ్ చేయబడిన్ ప్రాక్సీ రూపకరణపు స్క్రిప్ట్ చెల్లదు -Comment[tg]=Шакли дастнависи вакил кардашуда ношоям фаровир -Comment[th]=สคริปต์สำหรับการปรับแต่งพร็อกซีที่ดาวน์โหลดมาไม่ถูกต้อง -Comment[tr]=Vekil sunucu yapılandırma dosyası geçersiz -Comment[tt]=Proxy caylaw öçen iñderelgän ämerlek bozıq bulğan -Comment[uk]=Звантажений скрипт для визначення проксі сервера неправильний -Comment[uz]=Proksini moslash uchun yozib olingan skript haqiqiy emas -Comment[uz@cyrillic]=Проксини мослаш учун ёзиб олинган скрипт ҳақиқий эмас -Comment[vi]=Tập lệnh cấu hình ủy nhiệm đã được tải xuống không phải là hợp lệ. -Comment[zh_CN]=下载的代理配置脚本是无效的 -Comment[zh_HK]=剛下載的代理伺服器組態 script 語法有誤 -Comment[zh_TW]=代理組態的 script 檔案語法有誤 -default_presentation=16 - -[download-error] -Name=Script download error -Name[af]=Skrip aflaai fout -Name[ar]=خطأ أثناء تنزيل النص البرمجي -Name[az]=Skript endirmə xətası -Name[be]=Памылка сцягвання сцэнара -Name[bg]=Грешка при изтегляне на скрипта -Name[bn]=স্ক্রিপ্ট ডাউনলোডে সমস্যা -Name[br]=Fazi en ur enkargañ an urzhiaoug -Name[bs]=Greška pri downloadu skripte -Name[ca]=Error descàrrega de l'script -Name[cs]=Chyba ve stažení skriptu -Name[csb]=Fela zladënkù skriptu -Name[cy]=Gwall wrth lawrlwytho'r sgript -Name[da]=Script download-fejl -Name[de]=Fehler beim Herunterladen des Skripts -Name[el]=Σφάλμα λήψης σεναρίου -Name[eo]=Skripta ŝarĝeraro -Name[es]=Error de descarga del procedimiento -Name[et]=Viga skripti allalaadimisel -Name[eu]=Errorea script-a deskargatzean -Name[fa]=خطای بارگیری دست‌نوشته -Name[fi]=Skriptin latausvirhe -Name[fr]=Erreur de téléchargement du script -Name[fy]=Skript ynlaad flater -Name[ga]=Earráid íoslódála scripte -Name[gl]=Erro de descarga do guión -Name[he]=שגיאה בהורדת התסריט -Name[hi]=स्क्रिप्ट डाउनलोड त्रुटि -Name[hr]=Pogreška pri preuzimanju skripte -Name[hu]=Szkriptletöltési hiba -Name[id]=Kesalahan mengambil skrip -Name[is]=Villa við hleðslu skriftu -Name[it]=Errore di scaricamento script -Name[ja]=スクリプトのダウンロードエラー -Name[ka]=სკრიპტის ჩამოტვირთვის შეცდოამ -Name[kk]=Скриптті жүктеп алу қатесі -Name[km]=កំហុស​ទាញយក​ស្គ្រីប -Name[ko]=스크립트 내려받기 오류 -Name[lb]=Feeler beim Erofluede vum Skript -Name[lt]=scenarijaus atsisiuntimo klaida -Name[lv]=Skripta lejuplādes kļūda -Name[mk]=Грешка при симнување на скрипта -Name[mn]=Скрипт татахад алдаа -Name[ms]=Ralat muat turun skrip -Name[nb]=Skript nedlastingsfeil -Name[nds]=Skript-Daallaadfehler -Name[ne]=स्क्रिप्ट डाउनलोड त्रुटि -Name[nl]=Fout bij downloaden van script -Name[nn]=Feil ved skriptnedlasting -Name[pa]=ਸਕ੍ਰਿਪਟ ਡਾਊਨਲੋਡ ਗਲਤੀ -Name[pl]=Błąd pobierania skryptu -Name[pt]=Erro de transferência da configuração -Name[pt_BR]=Erro de download de script -Name[ro]=Eroare de transfer a scriptului -Name[ru]=Ошибка загрузки скрипта -Name[rw]=Ikosa ry'ikurura inyandikoporogaramu -Name[se]=Meattáhus skripta vieččadettiin -Name[sk]=Chyba počas sťahovania skriptu -Name[sl]=Napaka nalaganju skripta -Name[sq]=Skripta nuk pat sukses të Ngarkohet -Name[sr]=Грешка приликом преузимања скрипте -Name[sr@Latn]=Greška prilikom preuzimanja skripte -Name[sv]=Nerladdningsfel för skript -Name[ta]=எழுத்தாக்கத்தை இறக்கும்போது பிழை -Name[te]=స్క్రిప్ట్ డౌన్ లోడ్ దోషం -Name[tg]=Хатои дастнавис фаровир -Name[th]=ข้อผิดพลาดในการดาวน์โหลดสคริปต์ -Name[tr]=Betik indirme hatası -Name[tt]=Ämerlek iñderü xatarı -Name[uk]=Помилка звантаження скрипту -Name[uz]=Skriptni yozib olishda xato roʻy berdi -Name[uz@cyrillic]=Скриптни ёзиб олишда хато рўй берди -Name[vi]=Lỗi tải xuống tập lệnh -Name[zh_CN]=脚本下载错误 -Name[zh_HK]=Script 下載錯誤 -Name[zh_TW]=Script 下載錯誤 -Comment=The proxy configuration script could not be downloaded -Comment[af]=Die proksie opstelling skrip kon nie afgelaai word nie -Comment[ar]=تعذر تنزيل النص البرمجي لإعداد الخادم الوكيل -Comment[az]=VƏkil qurğuları skripti endirilə bilmədi -Comment[bg]=Скриптът за настройване на прокси сървъра не може да бъде изтеглен -Comment[bn]=প্রক্সি কনফিগারেশন স্ক্রিপ্ট ডাউনলোড করা যায়নি -Comment[br]=Ne m'eus ket enkargañ urzhiaoug kefluniadur ar proksi -Comment[bs]=Nisam mogao downloadovati skriptu za podešavanje proxy-ja -Comment[ca]=L'script de configuració del servidor intermedi no es pot descarregar -Comment[cs]=Nelze stáhnout konfigurační skript pro proxy -Comment[csb]=Nie je mòżno zladowac skriptu kònfiguracëji pòstrzédnika -Comment[cy]=Y sgript ffurfweddu'r dirprwy -Comment[da]=Proxy-indstillingsscriptet kunne ikke hentes -Comment[de]=Das Proxy-Einrichtungsskript lässt sich nicht herunterladen -Comment[el]=Το σενάριο ρύθμισης διαμεσολαβητή ήταν αδύνατο να ανακτηθεί -Comment[eo]=Ne eblas ŝarĝi la prokuragordoskripton -Comment[es]=El procedimiento de configuración del proxy no se pudo descargar -Comment[et]=Proxy seadistuse skripti ei õnnestu alla laadida -Comment[eu]=Proxy-aren konfigurazioko script-a ezin izan da deskargatu -Comment[fa]=دست‌نوشتۀ پیکربندی پیشکار بارگیری نشد -Comment[fi]=Proxyn asetusskriptiä ei voitu ladata -Comment[fr]=Le script de configuration du serveur mandataire n'a pas pu être téléchargé -Comment[fy]=It ynladen fan de proxy ynstellings skript is net slagge -Comment[ga]=Níorbh fhéidir script chumraíochta an tseachfhreastalaí a íoslódáil -Comment[gl]=Non se pudo descarregar o guión de configuración do proxy -Comment[he]=לא יכול להוריד את תסריט הגדרות הפרוקסי -Comment[hi]=प्रॉक्सी कॉन्फ़िगरेशन स्क्रिप्ट डाउनलोड नही की जा सकी। -Comment[hr]=Skripta konfiguriranja proxyja nije mogla biti preuzetom s Interneta -Comment[hu]=A proxybeállító szkript letöltése nem sikerült -Comment[id]= Skrip konfigurasi proxy tidak dapat diunduh -Comment[is]=Gat ekki sótt stillingaskriftu milliþjóns -Comment[it]=Impossibile scaricare lo script di configurazione proxy -Comment[ja]=プロキシ設定スクリプトをダウンロードできませんでした -Comment[ka]=პროქსის გამართვის სკრიპტის ჩამოტვირთვა ვერ ხერხდება -Comment[kk]=Бұл прокси скрипт жүктеп алынбайды -Comment[km]=មិន​អាច​ទាញយក​ស្គ្រីប​កំណត់​រចនាសម្ព័ន្ធ​ប្រូកស៊ី -Comment[ko]=프록시 설정 스크립트를 내려받지 못합니다 -Comment[lb]=D'Proxy-Konfiguratiounsskript konnt net erofgeluede ginn -Comment[lt]=Proxy derinimo scenarijus negali būti atsisiųstas -Comment[mk]=Скриптата за конфигурација на прокси не можеше да се симне -Comment[mn]=Итгэмжилэгч тохиргооны скрипт татагдахгүй байна -Comment[ms]=Skrip penyelarasan proksi tidak boleh dimuat turun -Comment[nb]=Klarte ikke å laste ned skiptet for mellomtjener-innstillinger -Comment[nds]=Dat Skript för't Instellen vun den Proxy lett sik nich daalladen -Comment[ne]=प्रोक्सी कन्फिगरेसन स्क्रिप्ट डाउनलोड हुन सक्ने छैन -Comment[nl]=Het proxyconfiguratiescript kon niet worden opgehaald -Comment[nn]=Klarte ikkje lasta ned skript for mellomtenaroppsett -Comment[pa]=ਪਰਾਕਸੀ ਸੰਰਚਨਾ ਸਕ੍ਰਿਪਟ ਨੂੰ ਲੋਡ ਨਹੀਂ ਕੀਤਾ ਜਾ ਸਕਦਾ ਹੈ -Comment[pl]=Nie można pobrać skryptu konfiguracji pośrednika -Comment[pt]=A configuração do 'proxy' não pôde ser transferida -Comment[pt_BR]=O script de configuração do proxy não pode ser carregado -Comment[ro]=Nu am putut transfera scriptul de configurare "proxy" -Comment[ru]=Не удаётся загрузить скрипт настройки прокси -Comment[rw]=Inyandikoporogaramu y'iboneza rya Nyabubasha ntiyashoboye gukururwa -Comment[se]=Ii sáhttán gaskbálváheivehanskripta viežžat -Comment[sk]=Nebolo možné stiahnúť konfiguračný skript pre proxy -Comment[sl]=Nastavitveni skript posrednika ni mogel biti naložen -Comment[sq]=Skripta për Konfigurimin e Proxy-t nuk pat sukses të ngarkohet -Comment[sr]=Скрипта за подешавање проксија не може бити преузета -Comment[sr@Latn]=Skripta za podešavanje proksija ne može biti preuzeta -Comment[sv]=Proxyinställningsskriptet kunde inte laddas ner -Comment[ta]=பதிலாள் வடிவமைப்பு எழுத்தாக்கத்தை இறக்க முடியவில்லை -Comment[te]=ప్రాక్సీ రూపకరణపు స్క్రిప్ట్ ని డౌన్ లోడ్ చేయలేకపోయాం -Comment[tg]=Шакли дастнависи вакил кардашуда фаровир наметавонад -Comment[th]=ไม่สามารถดาวน์โหลดสคริปต์สำหรับปรับแต่งพร็อกซีได้ -Comment[tr]=Vekil sunucu yapılandırma dosyası indirilemedi -Comment[tt]=Bu proxy caylaw ämerlegen iñderep bulmadı -Comment[uk]=Не вдається звантажити скрипт для визначення проксі сервера -Comment[uz]=Proksini moslash uchun skriptni yozib olib boʻlmadi -Comment[uz@cyrillic]=Проксини мослаш учун скриптни ёзиб олиб бўлмади -Comment[vi]=Không thể tải xuống tập lệnh cấu hình ủy nhiệm. -Comment[zh_CN]=代理配置脚本无法下载 -Comment[zh_HK]=無法取得代理伺服器組態 script 檔案 -Comment[zh_TW]=無法取得代理組態 script 檔案 -default_presentation=16 - -[evaluation-error] -Name=Script evaluation error -Name[af]=Skrip evaluasie fout -Name[ar]=خطأ في تقييم النص البرمجي -Name[az]=Skript icra xətası -Name[bg]=Грешка при обработка на скрипта -Name[bn]=স্ক্রিপ্ট চালানোয় সমস্যা -Name[bs]=Greška pri procjeni skripte -Name[ca]=Error en l'avaluació de l'script -Name[cs]=Chyba v analýze skriptu -Name[csb]=Fela zrëszëniô skriptu -Name[cy]=Gwall wrth werthuso'r sgript -Name[da]=Script evalueringsfejl -Name[de]=Skript-Überprüfungsfehler -Name[el]=Σφάλμα επικύρωσης σεναρίου -Name[eo]=Skripta ruleraro -Name[es]=Error de evaluación del procedimiento -Name[et]=Viga skripti käivitamisel -Name[eu]=Script-aren ebaluazioko errorea -Name[fa]=خطای ارزیابی دست‌نوشته -Name[fi]=Skriptin määritysvirhe -Name[fr]=Erreur d'évaluation du script -Name[fy]=Beoardiele skript flater -Name[ga]=Earráid agus an script á luacháil -Name[gl]=Erro de evaluación do guión -Name[he]=שגיאת הרצה בתסריט -Name[hi]=स्क्रिप्ट इवेल्यूएशन त्रुटि -Name[hr]=Pogreška pri procjenjivanju skripte -Name[hu]=Szkriptkiértékelési hiba -Name[id]=Kesalahan menjalankan skrip -Name[is]=Túlkunarvilla skriftu -Name[it]=Errore di valutazione script -Name[ja]=スクリプト評価エラー -Name[ka]=სკრიპტის დამუშავების შეცდომა -Name[kk]=Скрипт талдау қатесі -Name[km]=កំហុស​វាយតម្លៃរបស់ស្គ្រីប -Name[ko]=스크립트 평가 오류 -Name[lb]=Feeler beim Evaluéieren vum Skript -Name[lt]=Scenarijaus analizės klaida -Name[mk]=Грешка при евалуација на скрипта -Name[mn]=Скрипт үнэлэхэд алдаа -Name[ms]=Ralat penilaian skrip -Name[nb]=Skript evalueringsfeil -Name[nds]=Skript-Pröövfehler -Name[ne]=स्क्रिप्ट मूल्यांकन त्रुटि -Name[nl]=Fout bij evalueren van script -Name[nn]=Feil ved skriptevaluering -Name[pa]=ਸਕ੍ਰਿਪਟ ਏਵੂਲੇਸ਼ਨ ਗਲਤੀ -Name[pl]=Błąd wykonywania skryptu -Name[pt]=Erro de avaliação da configuração -Name[pt_BR]=Erro de avaliação de script -Name[ro]=Eroare de analiză a scriptului -Name[ru]=Ошибка разбора скрипта -Name[rw]=Ikosa ry'isuzuma ry'inyandikoporogaramu -Name[sk]=Chyba kontroly skriptu -Name[sl]=Napaka pri ocenjevanju skripta -Name[sq]=Gabim i vlerësimit të skriptës -Name[sr]=Грешка приликом израчунавања у скрипти -Name[sr@Latn]=Greška prilikom izračunavanja u skripti -Name[sv]=Utvärderingsfel för skript -Name[ta]=எழுத்தாக்க மதிப்பீட்டுப் பிழை -Name[te]=స్క్రిప్ట్ నిర్వహణ దోషం -Name[tg]=Фикри хатои дастнавис -Name[th]=ข้อผิดพลาดในการประเมินสคริปต์ -Name[tr]=Betik çalıştırma hatası -Name[tt]=Ämerlek eçtälegen uqığanda xata çıqtı -Name[uk]=Помилка виконання скрипту -Name[uz]=Skriptni tekshirishda xato roʻy berdi -Name[uz@cyrillic]=Скриптни текширишда хато рўй берди -Name[vi]=Lỗi định lượng tập lệnh -Name[zh_CN]=脚本求值错误 -Name[zh_HK]=Script 執行錯誤 -Name[zh_TW]=Script 執行錯誤 -Comment=There was an error executing the proxy configuration script -Comment[af]=Daar was 'n fout met die uitvoer van die proksie opstell skrip -Comment[ar]=لقد حصل خطأ كبير أدى الى خروج البرنامج -Comment[az]=Vəkil qurğuları skripti işə salınırkən xəta baş verdi -Comment[bg]=Грешка по време на изпълнение на скрипта за настройване на прокси сървъра -Comment[bn]=প্রক্সি কনফিগারেশন স্ক্রিপ্ট চালাতে সমস্যা দেখা দিয়েছে -Comment[br]=Degouezhet ez eus ur fazi en ur seveniñ urzhiaoug kefluniadur ar proksi -Comment[bs]=Došlo je do greške pri izvršavanju skripte za podešavanje proxy-ja -Comment[ca]=Hi ha hagut un error executant l'script de configuració del servidor intermedi -Comment[cs]=Nastala chyba při spouštění konfiguračního skriptu proxy -Comment[csb]=Pòkôza sã fela, òb czas zrëszëniô skriptu kònfigùracëji pòstrzédnika -Comment[cy]=Digwyddodd gwall wrth weithredu'r sgript ffurfweddu'r dirprwy -Comment[da]=Der opstod en fejl ved kørslen af proxy-indstillingsscriptet -Comment[de]=Fehler beim Ausführen des Proxy-Einrichtungsskripts -Comment[el]=Συνέβη ένα σφάλμα στην εκτέλεση του σεναρίου ρύθμισης διαμεσολαβητή -Comment[eo]=Okazis eraro dum rulo de la prokuragordoskripto -Comment[es]=Se produjo un error al ejecutarse el procedimiento de configuración del proxy -Comment[et]=Ilmnes tõsine viga proxy seadistuse skripti käivitamisel -Comment[eu]=Errorea gertatu da proxy-a konfiguratzeko script-ean -Comment[fa]=هنگام اجرای دست‌نوشتۀ پیکربندی پیشکار، خطایی وجود داشت -Comment[fi]=Proxy-skriptin suorittamisessa tapahtui virhe -Comment[fr]=Une erreur s'est produite lors de l'exécution du script de configuration du serveur mandataire -Comment[fy]=Der wie in flater by it útfoeren fan de proxy ynstellings skript -Comment[ga]=Tharla earráid agus script chumraíocht an tseachfhreastalaí á rith -Comment[gl]=Houbo un erro executando o guión de configuración do proxi -Comment[he]=אירעה שגיאה בעת הרצת תסריט הגדרות בפרוקסי -Comment[hi]=प्रॉक्सी कॉन्फ़िगरेशन स्क्रिप्ट चलाने में त्रुटि हुई -Comment[hr]=Došlo je do pogreške pri izvršavanju konfiguracijske skripte proxyja -Comment[hu]=Hiba történt a proxybeállító szkript végrehajtása közben -Comment[id]=Kesalahan sewaktu menjalankan skrip konfigurasi proxy -Comment[is]=Það kom upp villa við keyrslu stillingaskriftu milliþjóns -Comment[it]=Si è verificato un errore durante l'esecuzione dello script di configurazione proxy -Comment[ja]=プロキシ設定スクリプトの実行中にエラーが発生しました -Comment[ka]=პროქსის გამართვის სკრიპტის გამოყენების შეცდომა -Comment[kk]=Прокси баптау скриптті орындау кезінде қате пайда болды -Comment[km]=មាន​កំហុស​មួយ​ក្នុងការប្រតិបត្តិ​ស្គ្រីបកំណត់​រចនាសម្ព័ន្ធ​ប្រូកស៊ី -Comment[ko]=프록시 설정 스크리트를 실행하는데 문제가 있습니다 -Comment[lb]=Et gouf e Feeler beim Ausféiere vum Proxy-Konfiguratiounsskript -Comment[lt]=Paleidžiant proxy derinimo scenarijų įvyko klaida -Comment[mk]=Имаше грешка при извршувањето на скриптата за конфигурација на прокси -Comment[mn]=итгэмжилэгч тохируулгын скрипт ажиллуулж байхад алдаа -Comment[ms]=Terdapat ralat melaksanakan skrip penyelarasan proksi -Comment[nb]=Det oppsto en alvorlig feil under kjøringen av skriptet for mellomtjener-innstillinger -Comment[nds]=Bi't Utföhren vun dat Proxy-Instellenskript hett dat en Fehler geven -Comment[ne]=प्रोक्सी कन्फिगरेसन स्क्रिप्ट कार्यान्वयन गर्दा त्रुटि थियो -Comment[nl]=Er deed zich een fout voor tijdens het uitvoeren van het proxyconfiguratiescript -Comment[nn]=Feil ved køyring av skript for mellomtenaroppsett -Comment[pa]=ਪਰਾਕਸੀ ਸੰਰਚਨਾ ਸਕ੍ਰਿਪਟ ਚਲਾਉਣ ਵਿੱਚ ਗਲਤੀ ਆਈ ਹੈ -Comment[pl]=Wystąpił błąd w czasie wykonywania skryptu konfiguracji pośrednika -Comment[pt]=Ocorreu um erro ao efectuar a configuração do 'proxy' -Comment[pt_BR]=Ocorreu um erro ao executar o script de configuração do proxy. -Comment[ro]=A apărut o eroare la execuţia scriptului de configurare "proxy" -Comment[ru]=Ошибка при выполнении скрипта настройки прокси -Comment[rw]=Habaye ikosa mu gutangiza inyandikoporogaramu y'iboneza rya Nyabubasha -Comment[se]=Meattáhus vuojedettiin gaskabálváheivehanskripta -Comment[sk]=Vyskytla sa chyba počas spustenia konfiguračného skriptu proxy -Comment[sl]=Prišlo je do napake pri izvajanju nastavitvenega skripta posrednika -Comment[sq]=Është paraqitur një gabim gjatë ekzekutimit të skriptës për konfigurimin e proxy-t -Comment[sr]=Десила се грешка приликом извршавања скрипте за подешавање проксија -Comment[sr@Latn]=Desila se greška prilikom izvršavanja skripte za podešavanje proksija -Comment[sv]=Fel uppstod vid körning av proxyinställningsskriptet -Comment[ta]=பதிலாள் வடிவமைப்பு எழுத்தாக்கத்தை செயல்படுத்தும்போது ஒரு பிழை நேர்ந்தது -Comment[te]=ప్రాక్సీ రూపకరణపు స్క్రిప్ట్ నిర్వహణలొ దోషం వున్నది -Comment[tg]=Хато фаразани дар шакли дастнависи вакил кардашуда -Comment[th]=เกิดข้อผิดพลาดในการสั่งให้สคริปต์ปรับแต่งพร็อกซีทำงาน -Comment[tr]=Vekil sunucu yapılandırma dosyası çalıştırılamadı -Comment[tt]=Proxy caylaw ämerelegen eşlätkändä xata çıqtı -Comment[uk]=Виникла помилка при спробі виконати скрипт для визначення проксі сервера -Comment[uz]=Proksini moslash uchun skriptni ishga tushirishda xato roʻy berdi -Comment[uz@cyrillic]=Проксини мослаш учун скриптни ишга туширишда хато рўй берди -Comment[vi]=Gặp lỗi khi thực hiện tập lệnh cấu hình ủy nhiệm. -Comment[zh_CN]=执行代理配置脚本出现错误 -Comment[zh_HK]=代理伺服器組態檔案執行錯誤 -Comment[zh_TW]=proxy 代理組態檔案執行錯誤 -default_presentation=0 diff --git a/kio/misc/kpac/kpac_dhcp_helper.c b/kio/misc/kpac/kpac_dhcp_helper.c deleted file mode 100644 index 906e89dfa..000000000 --- a/kio/misc/kpac/kpac_dhcp_helper.c +++ /dev/null @@ -1,229 +0,0 @@ -/* This file is part of the KDE Libraries - Copyright (c) 2001 Malte Starostik - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License version 2 as published by the Free Software Foundation. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - - -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "dhcp.h" - -#ifndef INADDR_NONE /* some OSes don't define this */ -#define INADDR_NONE -1 -#endif - -int set_gid(gid_t); -int set_uid(uid_t); -int get_port(const char *); -int init_socket(void); -uint32_t send_request(int); -void get_reply(int, uint32_t); - -int set_gid(gid_t gid) -{ -#ifdef HAVE_SHORTSETGROUPS - short x[2]; - x[0] = gid; - x[1] = 73; /* catch errors */ - if (setgroups(1, x) == -1) - return -1; -#else - if (setgroups(1, &gid) == -1) - return -1; -#endif - return setgid(gid); /* _should_ be redundant, but on some systems it isn't */ -} - -int set_uid(uid_t uid) -{ - return setuid(uid); -} - -/* All functions below do an exit(1) on the slightest error */ - -/* Returns the UDP port number for the given service name */ -int get_port(const char *service) -{ - struct servent *serv = getservbyname(service, "udp"); - if (serv == NULL) - exit(1); - - return serv->s_port; -} - -/* Opens the UDP socket, binds to the bootpc port and drops root privileges */ -int init_socket() -{ - struct sockaddr_in addr; - struct protoent *proto; - int sock; - int bcast = 1; - - memset(&addr, 0, sizeof(addr)); - addr.sin_family = AF_INET; - addr.sin_addr.s_addr = INADDR_ANY; - addr.sin_port = get_port("bootpc"); - - if ((proto = getprotobyname("udp")) == NULL || - (sock = socket(AF_INET, SOCK_DGRAM, proto->p_proto)) == -1) - exit(1); - - if (setsockopt(sock, SOL_SOCKET, SO_BROADCAST, &bcast, sizeof(bcast)) == -1 || - setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, &bcast, sizeof(bcast)) == -1 || - bind(sock, (struct sockaddr *)&addr, sizeof(addr)) == -1) - exit(1); - - if (set_gid(getgid()) != 0 || /* we don't need it anymore */ - set_uid(getuid()) != 0) - exit(1); - return sock; -} - -/* Fills the DHCPINFORM request packet, returns the transaction id */ -uint32_t send_request(int sock) -{ - char hostname[256]; - struct hostent *hent; - struct sockaddr_in addr; - struct dhcp_msg request; - uint8_t *offs = request.options; - - hostname[0] = '\0'; - hostname[255] = '\0'; - if (gethostname(hostname, 255) == -1 || - strlen(hostname) == 0 || - (hent = gethostbyname(hostname)) == NULL) - exit(1); - - memset(&addr, 0, sizeof(addr)); - addr.sin_family = AF_INET; - addr.sin_addr.s_addr = INADDR_NONE; - addr.sin_port = get_port("bootps"); - - memset(&request, 0, sizeof(request)); - request.op = DHCP_BOOTREQUEST; - srand(time(NULL)); - request.xid = rand(); - request.ciaddr = *(uint32_t*)*hent->h_addr_list; - - *offs++ = DHCP_MAGIC1; - *offs++ = DHCP_MAGIC2; - *offs++ = DHCP_MAGIC3; - *offs++ = DHCP_MAGIC4; - - *offs++ = DHCP_OPT_MSGTYPE; - *offs++ = 1; /* length */ - *offs++ = DHCP_INFORM; - - *offs++ = DHCP_OPT_PARAMREQ; - *offs++ = 1; /* length */ - *offs++ = DHCP_OPT_WPAD; - - *offs++ = DHCP_OPT_END; - - if (sendto(sock, &request, sizeof(request), 0, - (struct sockaddr *)&addr, sizeof(addr)) != sizeof(request)) - exit(1); - - return request.xid; -} - -/* Reads the reply from the socket, checks it and outputs the URL to STDOUT */ -void get_reply(int sock, uint32_t xid) -{ - struct dhcp_msg reply; - int len; - char wpad[DHCP_OPT_LEN + 1]; - uint8_t wpad_len; - uint8_t *offs = reply.options; - uint8_t *end; - - if ((len = recvfrom(sock, &reply, sizeof(reply), 0, NULL, NULL)) <= 0) - exit(1); - - end = (uint8_t *)&reply + len; - if (end < offs + 4 || - end > &reply.options[DHCP_OPT_LEN] || - reply.op != DHCP_BOOTREPLY || - reply.xid != xid || - *offs++ != DHCP_MAGIC1 || - *offs++ != DHCP_MAGIC2 || - *offs++ != DHCP_MAGIC3 || - *offs++ != DHCP_MAGIC4) - exit(1); - - for ( ; offs < end - 1; offs += *offs+1) - { - switch (*offs++) - { - case DHCP_OPT_END: - exit(1); - case DHCP_OPT_MSGTYPE: - if (*offs != 1 || (offs >= end - 1) || *(offs + 1) != DHCP_ACK) - exit(1); - break; - case DHCP_OPT_WPAD: - memset(wpad, 0, sizeof(wpad)); - wpad_len = *offs++; - if (offs >= end) - exit(1); - if (wpad_len > end - offs) - wpad_len = end - offs; - strncpy(wpad, (char *)offs, wpad_len); - wpad[wpad_len] = 0; - printf("%s\n", wpad); - close(sock); - exit(0); - } - } - exit(1); -} - -int main() -{ - fd_set rfds; - struct timeval tv; - int sock; - uint32_t xid; - - sock = init_socket(); - xid = send_request(sock); - - FD_ZERO(&rfds); - FD_SET(sock, &rfds); - tv.tv_sec = 5; - tv.tv_usec = 0; - if (select(sock + 1, &rfds, NULL, NULL, &tv) == 1 && FD_ISSET(sock, &rfds)) - get_reply(sock, xid); - - close(sock); - exit(1); -} - -/* vim: ts=4 sw=4 noet - */ diff --git a/kio/misc/kpac/kpactest.pac b/kio/misc/kpac/kpactest.pac deleted file mode 100644 index 69e5aaad7..000000000 --- a/kio/misc/kpac/kpactest.pac +++ /dev/null @@ -1,169 +0,0 @@ -// This is a script to test KPAC. -// To use it: set this script as proxy config file and run -// dcop kded proxyscout proxyForURL http://blah (URL doesn't matter) -// The answer must be http:/// -// If you see "failed" in the output, lookup the test name in the comments -// below and let me now at or try to fix it yourself - -function FindProxyForURL( url, host ) -{ - var result = "PROXY http://" + myIPAddress(); - - // plainhost1 - if ( !isPlainHostName( "foo" ) ) - result += "/plainhost1=failed" - // plainhost2 - if ( isPlainHostName( "foo.bar" ) ) - result += "/plainhost2=failed"; - - // dnsdomain1 - if ( !dnsDomainIs( "foo.bar", "bar" ) ) - result += "/dnsdomain1=failed"; - // dnsdomain2 - if ( dnsDomainIs( "foo.baz", "bar" ) ) - result += "/dnsdomain2=failed"; - - // localordomain1 - if ( !localHostOrDomainIs( "foo", "bar" ) ) - result += "/localordomain1=failed"; - // localordomain2 - if ( !localHostOrDomainIs( "foo.bar", "foo.bar" ) ) - result += "/localordomain2=failed"; - // localordomain3 - if ( !localHostOrDomainIs( "foo", "foo.baz" ) ) - result += "/localordomain3=failed"; - // localordomain4 - if ( localHostOrDomainIs( "foo.bar", "foo.baz" ) ) - result += "/localordomain4=failed"; - - // isresolvable1 - // on failure make sure you can resolve www.kde.org correctly :-) - if ( !isResolvable( "www.kde.org" ) ) result += "/isresolvable1=failed"; - // isresolvable2 - // on failure make sure dummy.invalid doesn't resolve :-) - if ( isResolvable( "dummy.invalid" ) ) result += "/isresolvable2=failed"; - - // isinnet1 - // on failure check if localhost resolves to 127.0.0.1 as it should - if ( isInNet( "localhost", "1.2.3.4", "255.0.0.0" ) ) - result += "/isinnet1=failed"; - // isinnet2 - if ( isInNet( "1.2.3.4", "1.2.3.5", "255.255.255.255" ) ) - result += "/isinnet2=failed"; - // isinnet3 - if ( !isInNet( "1.2.3.4", "1.2.3.5", "255.255.255.0" ) ) - result += "/isinnet3=failed"; - - // dnsresolve1 - // on failure check if localhost resolves to 127.0.0.1 as it should - if ( dnsResolve( "localhost" ) != "127.0.0.1" ) - result += "/dnsresolve1=failed"; - - // dnslevels1 - if ( dnsDomainLevels( "foo" ) != 0 ) - result += "/dnslevels1=failed"; - // dnslevels2 - if ( dnsDomainLevels( "foo.bar" ) != 1 ) - result += "/dnslevels2=failed"; - // dnslevels3 - if ( dnsDomainLevels( "foo.bar.baz" ) != 2 ) - result += "/dnslevels3=failed"; - - // shexp1 - if ( !shExpMatch( "foobar", "foobar" ) ) - result += "/shexp1=failed"; - // shexp2 - if ( shExpMatch( "FoObAr", "foobar" ) ) - result += "/shexp2=failed"; - // shexp3 - if ( !shExpMatch( "Foobar", "?oobar" ) ) - result += "/shexp3=failed"; - // shexp4 - if ( !shExpMatch( "FoObAr", "*b*" ) ) - result += "/shexp4=failed"; - // shexp5 - if ( shExpMatch( "FoObAr", "*x*" ) ) - result += "/shexp5=failed"; - // shexp6 - if ( shExpMatch( "www.kde.org", "*.kde" ) ) - result += "/shexp6=failed"; - - var now = new Date; - var days = new Array( "sun", "mon", "tue", "wed", "thu", "fri", "sat" ); - var months = new Array( "jan", "feb", "mar", "apr", "may", "jun", "jul", "aug", "sep", "oct", "nov", "dec" ); - - // weekday1 - if ( !weekdayRange( "sun", "sat" ) ) - result += "/weekday1=failed"; - // weekday2 - if ( !weekdayRange( "sat", "sun" ) ) - result += "/weekday2=failed"; - // weekday3 - if ( !weekdayRange( days[ now.getDay() ] ) ) - result += "/weekday3=failed"; - // weekday4 - if ( weekdayRange( now.getDay() ? "sun" : "mon" ) ) - result += "/weekday4=failed"; - - // date1 - if ( !dateRange( now.getDate() ) ) - result += "/date1=failed"; - // date2 - if ( !dateRange( now.getDate(), 31 ) ) - result += "/date2=failed"; - // date3 - if ( !dateRange( 1, now.getDate() ) ) - result += "/date3=failed"; - // date4 - if ( dateRange( now.getDay() > 5 ? 1 : 6, now.getDay() > 5 ? 3 : 8 ) ) - result += "/date4=failed"; - // date5 - if ( !dateRange( months[ now.getMonth() ] ) ) - result += "/date5=failed"; - // date6 - if ( !dateRange( months[ now.getMonth() ], "dec" ) ) - result += "/date6=failed"; - // date7 - if ( !dateRange( "dec", months[ now.getMonth() ] ) ) - result += "/date7=failed"; - // date8 - if ( !dateRange( now.getFullYear() ) ) - result += "/date8=failed"; - // date9 - if ( dateRange( now.getFullYear() - 1 ) ) - result += "/date9=failed"; - // date10 - // if this fails, check your clock first :-) - if ( dateRange( 1, "jan", 1990, 31, "dec", 2000 ) ) - result += "/date10=failed"; - // date11 - // if this fails, check your clock first :-) - if ( !dateRange( 1, "jan", 2000, 31, "dec", 3000 ) ) - result += "/date11=failed"; - - // time1 - if ( !timeRange( now.getHours() ) ) - result += "/time1=failed"; - // time2 - if ( !timeRange( now.getHours(), now.getMinutes(), 0, 0 ) ) - result += "/time2=failed"; - // time3 - if ( !timeRange( now.getHours(), now.getMinutes(), now.getSeconds(), 0, 0, 0 ) ) - result += "/time3=failed"; - // time4 - if ( timeRange( now.getHours() > 5 ? 1 : 6, now.getHours() > 5 ? 3 : 8 ) ) - result += "/time4=failed"; - // time5 - if ( now.getHours() == now.getUTCHours() ) - result += "/time5=skipped"; - else if ( timeRange( now.getUTCHours() ) ) - result += "/time5=failed"; - // time6 - if ( now.getHours() == now.getUTCHours() ) - result += "/time6=skipped"; - else if ( !timeRange( now.getUTCHours(), "GMT" ) ) - result += "/time6=failed"; - - return result; -} - diff --git a/kio/misc/kpac/proxyscout.cpp b/kio/misc/kpac/proxyscout.cpp deleted file mode 100644 index b651e2313..000000000 --- a/kio/misc/kpac/proxyscout.cpp +++ /dev/null @@ -1,196 +0,0 @@ -/* - Copyright (c) 2003 Malte Starostik - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - - -#include -#include - -#include -#include -#include -#include -#include - -#include "proxyscout.moc" -#include "discovery.h" -#include "script.h" - -namespace KPAC -{ - ProxyScout::QueuedRequest::QueuedRequest( const KURL& u ) - : transaction( kapp->dcopClient()->beginTransaction() ), - url( u ) - { - } - - ProxyScout::ProxyScout( const TQCString& name ) - : KDEDModule( name ), - m_instance( new TDEInstance( "proxyscout" ) ), - m_downloader( 0 ), - m_script( 0 ), - m_suspendTime( 0 ) - { - } - - ProxyScout::~ProxyScout() - { - delete m_script; - delete m_instance; - } - - TQString ProxyScout::proxyForURL( const KURL& url ) - { - if ( m_suspendTime ) - { - if ( std::time( 0 ) - m_suspendTime < 300 ) return "DIRECT"; - m_suspendTime = 0; - } - - // Never use a proxy for the script itself - if ( m_downloader && url.equals( m_downloader->scriptURL(), true ) ) return "DIRECT"; - - if ( m_script ) return handleRequest( url ); - - if ( m_downloader || startDownload() ) - { - m_requestQueue.append( url ); - return TQString::null; - } - else return "DIRECT"; - } - - ASYNC ProxyScout::blackListProxy( const TQString& proxy ) - { - m_blackList[ proxy ] = std::time( 0 ); - } - - ASYNC ProxyScout::reset() - { - delete m_script; - m_script = 0; - delete m_downloader; - m_downloader = 0; - m_blackList.clear(); - m_suspendTime = 0; - KProtocolManager::reparseConfiguration(); - } - - bool ProxyScout::startDownload() - { - switch ( KProtocolManager::proxyType() ) - { - case KProtocolManager::WPADProxy: - m_downloader = new Discovery( this ); - break; - case KProtocolManager::PACProxy: - m_downloader = new Downloader( this ); - m_downloader->download( KURL( KProtocolManager::proxyConfigScript() ) ); - break; - default: - return false; - } - connect( m_downloader, TQT_SIGNAL( result( bool ) ), - TQT_SLOT( downloadResult( bool ) ) ); - return true; - } - - void ProxyScout::downloadResult( bool success ) - { - KNotifyClient::Instance notifyInstance( m_instance ); - if ( success ) - try - { - m_script = new Script( m_downloader->script() ); - } - catch ( const Script::Error& e ) - { - KNotifyClient::event( "script-error", i18n( - "The proxy configuration script is invalid:\n%1" ) - .arg( e.message() ) ); - success = false; - } - else KNotifyClient::event( "download-error", m_downloader->error() ); - - for ( RequestQueue::ConstIterator it = m_requestQueue.begin(); - it != m_requestQueue.end(); ++it ) - { - TQCString type = TQSTRING_OBJECT_NAME_STRING; - TQByteArray data; - TQDataStream ds( data, IO_WriteOnly ); - if ( success ) ds << handleRequest( ( *it ).url ); - else ds << TQString( "DIRECT" ); - kapp->dcopClient()->endTransaction( ( *it ).transaction, type, data ); - } - m_requestQueue.clear(); - m_downloader->deleteLater(); - m_downloader = 0; - // Suppress further attempts for 5 minutes - if ( !success ) m_suspendTime = std::time( 0 ); - } - - TQString ProxyScout::handleRequest( const KURL& url ) - { - try - { - TQString result = m_script->evaluate( url ); - TQStringList proxies = TQStringList::split( ';', result ); - for ( TQStringList::ConstIterator it = proxies.begin(); - it != proxies.end(); ++it ) - { - TQString proxy = ( *it ).stripWhiteSpace(); - if ( proxy.left( 5 ) == "PROXY" ) - { - KURL proxyURL( proxy = proxy.mid( 5 ).stripWhiteSpace() ); - // If the URL is invalid or the URL is valid but in opaque - // format which indicates a port number being present in - // this particular case, simply calling setProtocol() on - // it trashes the whole URL. - int len = proxyURL.protocol().length(); - if ( !proxyURL.isValid() || proxy.find( ":/", len ) != len ) - proxy.prepend("http://"); - BlackList::Iterator it = m_blackList.find( proxy ); - if ( it == m_blackList.end() ) return proxy; - else if ( std::time( 0 ) - *it > 1800 ) // 30 minutes - { - // black listing expired - m_blackList.remove( it ); - return proxy; - } - } - else return "DIRECT"; - } - // FIXME: blacklist - } - catch ( const Script::Error& e ) - { - KNotifyClient::Instance notifyInstance( m_instance ); - KNotifyClient::event( "evaluation-error", i18n( - "The proxy configuration script returned an error:\n%1" ) - .arg( e.message() ) ); - } - return "DIRECT"; - } - - extern "C" KDE_EXPORT KDEDModule* create_proxyscout( const TQCString& name ) - { - return new ProxyScout( name ); - } -} - -// vim: ts=4 sw=4 et diff --git a/kio/misc/kpac/proxyscout.desktop b/kio/misc/kpac/proxyscout.desktop deleted file mode 100644 index 02e402b50..000000000 --- a/kio/misc/kpac/proxyscout.desktop +++ /dev/null @@ -1,131 +0,0 @@ -[Desktop Entry] -Type=Service -Name=Proxy Scout -Name[af]=Proksie Verkenner -Name[az]=Vəkil Skout -Name[bg]=Проучване на прокси сървъри -Name[bn]=প্রক্সি স্কাউট -Name[ca]=Explorador del servidor intermedi -Name[cs]=Proxy vyhledávač -Name[csb]=Pòstrzédnik (proxy) -Name[cy]=Arweinydd Dirprwy -Name[de]=Automatische Proxy-Einrichtung -Name[el]=Διαμεσολαβητής Scout -Name[eo]=Prokurilo -Name[es]=Explorador del proxy -Name[fa]=پیشکار Scout -Name[fi]=Proxy-tiedustelija -Name[fy]=Proxy ferkenner -Name[gl]=Proxy Explorador -Name[he]=מחפש שרתי Proxy -Name[hi]= प्रॉक्सी स्काउट -Name[hr]=Proxy izvidnik -Name[is]=Milliþjóns leitari -Name[it]=Esploratore proxy -Name[ja]=プロキシを探す -Name[ka]=პროქსის თვითგამართვა -Name[kk]=Проксиді автобапату -Name[ko]=프록시 찾기 -Name[lb]=Proxy-Scout -Name[lt]=Proxy paieška -Name[mk]=Прокси скаут -Name[mn]=Итгэмжилэгчийн зам хайгч -Name[ms]=Scout Proksi -Name[nb]=Mellomtjenerspeiding -Name[ne]=प्रोक्सी स्काउट -Name[nn]=Mellomtenarspeiding -Name[pa]=ਪਰਾਕਸੀ ਸਕਾਊਟ -Name[pl]=Pośrednik (proxy) -Name[pt]=Escuteiro do 'Proxy' -Name[pt_BR]=Saída do Proxy -Name[ru]=Автонастройка прокси -Name[rw]=Igifasha Nyabubasha -Name[se]=Gaskabálvaohci -Name[sk]=Prieskumník proxy -Name[sr]=Прокси извиђач -Name[sr@Latn]=Proksi izviđač -Name[sv]=Proxy-scout -Name[ta]=பதிலாள் தேடு -Name[te]=ప్రాక్సీ వేగు -Name[tg]=Разведкачӣ Вакил Кардашуда -Name[tr]=Vekil Sunucu -Name[tt]=Proxy Saqçısı -Name[uk]=Розвідник проксі сервера -Name[uz]=Proksi skaut -Name[uz@cyrillic]=Прокси скаут -Name[zh_CN]=代理搜索 -Comment=Automatic proxy configuration -Comment[af]=Outomatiese proksie opstelling -Comment[bg]=Автоматично настройване на прокси сървъра -Comment[bn]=স্বয়ংক্রিয় প্রক্সি কনফিগারেশন -Comment[br]=Kefluniadur emgefreekh ar proksi -Comment[bs]=Automatsko podešavanje proxy-ja -Comment[ca]=Configuració automàtica de l'intermediari -Comment[cs]=Automatické nastavení proxy -Comment[csb]=Aòtokònfigùracëjô pòstrzédnika -Comment[cy]=Ffurweddiad Awtomatig o'r Dirprwy -Comment[da]=Automatisk proxy-indstilling -Comment[de]=Sucht nach einem Proxy-Server und richtet ihn ein -Comment[el]=Αυτόματη ρύθμιση διαμεσολαβητή -Comment[eo]=Aŭtomata Prokuragordo -Comment[es]=Configuración automática del Proxy -Comment[et]=Automaatne proxy konfigureerimine -Comment[eu]=Proxy-aren konfigurazio automatikoa -Comment[fa]=پیکربندی خودکار پیشکار -Comment[fi]=Automaattiset proxy-asetukset -Comment[fr]=Configuration automatique du serveur mandataire -Comment[fy]=Automatyske proxy ynstelling -Comment[ga]=Uathchumraíocht an tseachfhreastalaí -Comment[gl]=Configuración Automática do Proxi -Comment[he]=הגדרות מתווך אוטומטיות -Comment[hi]=स्वचालित प्रॉक्सी कॉन्फ़िगरेशन -Comment[hr]=Automatsko konfiguriranje proxyja -Comment[hu]=Automatikus proxybeállítás -Comment[id]=Konfigurasi proxi otomatis -Comment[is]=Sjálfvirkar stillingar milliþjóns -Comment[it]=Configurazione automatica proxy -Comment[ja]=自動プロキシ設定 -Comment[ka]=პროქსის თვითგამართვა -Comment[kk]=Проксиді автоматты түрде бапату -Comment[km]=ការ​កំណត់​រចនាសម្ព័ន្ធ​ប្រូកស៊ី​ដោយ​ស្វ័យប្រវត្តិ -Comment[lb]=Automatesch Proxy-Configuratioun -Comment[lt]=Automatinis proxy derinimas -Comment[mk]=Автоматска конфигурација на прокси -Comment[ms]=Penyelarasan Proksi Automatik -Comment[nb]=Automatisk mellomtjeneroppsett -Comment[nds]=Proxy automaatsch instellen -Comment[ne]=स्वचालित प्रोक्सी कन्फिगरेसन -Comment[nl]=Automatische proxyconfiguratie -Comment[nn]=Automatisk mellomtenaroppsett -Comment[pa]=ਸਵੈ-ਚਾਲਿਤ ਪਰਾਕਸੀ ਸੰਰਚਨਾ -Comment[pl]=Autokonfiguracja pośrednika -Comment[pt]=Configuração automática de 'proxy' -Comment[pt_BR]=Configuração automática do proxy -Comment[ro]=Configurare automată pentru proxy -Comment[ru]=Автонастройка прокси-сервера -Comment[rw]=Iboneza rya Nyabubasha Yikoresha -Comment[se]=Automáhtalaš gaskabálváheiveheapmi -Comment[sk]=Automatická konfigurácia proxy -Comment[sl]=Samodejne nastavitve posrednika -Comment[sr]=Аутоматско подешавање проксија -Comment[sr@Latn]=Automatsko podešavanje proksija -Comment[sv]=Automatisk proxyinställning -Comment[ta]=தானியக்க பதிலாள் வடிவமைப்பு -Comment[te]=స్వయంచాలక ప్రాక్సీ రూపకరణం -Comment[tg]=Танзими прокси бо автоматикӣ -Comment[th]=การปรับแต่งพร็อกซีอัตโนมัติ -Comment[tr]=Otomatik vekil sunucu yapılandırması -Comment[tt]=Proxy'nıñ üzzihenle caylanu -Comment[uk]=Автоматичне визначення проксі сервера -Comment[uz]=Proksini avtomatik ravishda moslash -Comment[uz@cyrillic]=Проксини автоматик равишда мослаш -Comment[vi]=Cấu hình ủy nhiệm tự động. -Comment[zh_CN]=自动代理配置 -Comment[zh_HK]=自動代理伺服器組態 -Comment[zh_TW]=自動代理組態 -ServiceTypes=KDEDModule -X-TDE-ModuleType=Library -X-TDE-Library=proxyscout -X-TDE-FactoryName=proxyscout -X-TDE-Kded-autoload=false -X-TDE-Kded-load-on-demand=true diff --git a/kio/misc/kpac/proxyscout.h b/kio/misc/kpac/proxyscout.h deleted file mode 100644 index 78c8fc237..000000000 --- a/kio/misc/kpac/proxyscout.h +++ /dev/null @@ -1,82 +0,0 @@ -/* - Copyright (c) 2003 Malte Starostik - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - - -#ifndef KPAC_PROXYSCOUT_H -#define KPAC_PROXYSCOUT_H - -#include - -#include -#include - -#include - -class DCOPClientTransaction; -class TDEInstance; - -namespace KPAC -{ - class Downloader; - class Script; - - class ProxyScout : public KDEDModule - { - Q_OBJECT - K_DCOP - public: - ProxyScout( const TQCString& ); - virtual ~ProxyScout(); - - k_dcop: - TQString proxyForURL( const KURL& url ); - ASYNC blackListProxy( const TQString& proxy ); - ASYNC reset(); - - private slots: - void downloadResult( bool ); - - private: - bool startDownload(); - TQString handleRequest( const KURL& url ); - - TDEInstance* m_instance; - Downloader* m_downloader; - Script* m_script; - - struct QueuedRequest - { - QueuedRequest() : transaction( 0 ) {} - QueuedRequest( const KURL& ); - - DCOPClientTransaction* transaction; - KURL url; - }; - typedef TQValueList< QueuedRequest > RequestQueue; - RequestQueue m_requestQueue; - - typedef TQMap< TQString, time_t > BlackList; - BlackList m_blackList; - time_t m_suspendTime; - }; -} - -#endif // KPAC_PROXYSCOUT_H - -// vim: ts=4 sw=4 et diff --git a/kio/misc/kpac/script.cpp b/kio/misc/kpac/script.cpp deleted file mode 100644 index 55faef8a1..000000000 --- a/kio/misc/kpac/script.cpp +++ /dev/null @@ -1,465 +0,0 @@ -/* - Copyright (c) 2003 Malte Starostik - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - - -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -#include -#include - -#include -#include -#include - -#include "script.h" - -using namespace KJS; - -TQString UString::qstring() const -{ - return TQString( reinterpret_cast< const TQChar* >( data() ), size() ); -} - -UString::UString( const TQString &s ) -{ - UChar* data = new UChar[ s.length() ]; - std::memcpy( data, s.unicode(), s.length() * sizeof( UChar ) ); - rep = Rep::create( data, s.length() ); -} - -namespace -{ - class Address - { - public: - struct Error {}; - static Address resolve( const UString& host ) - { return Address( host.qstring(), false ); } - static Address parse( const UString& ip ) - { return Address( ip.qstring(), true ); } - - operator in_addr_t() const { - const sockaddr_in* sin = m_address; - return sin->sin_addr.s_addr; - } - - operator String() const { return String( m_address.ipAddress().toString() ); } - - private: - Address( const TQString& host, bool numeric ) - { - int flags = 0; - - if ( numeric ) - flags = KNetwork::KResolver::NoResolve; - - KNetwork::KResolverResults addresses = - KNetwork::KResolver::resolve( host, TQString::null, flags, - KNetwork::KResolver::IPv4Family ); - - if ( addresses.isEmpty() ) - throw Error(); - - m_address = addresses.first().address().asInet(); - } - - KNetwork::KInetSocketAddress m_address; - }; - - struct Function : public ObjectImp - { - struct ResolveError {}; - - virtual bool implementsCall() const { return true; } - - static int findString( const UString& s, const char* const* values ) - { - int index = 0; - UString lower = s.toLower(); - for ( const char* const* p = values; *p; ++p, ++index ) - if ( lower == *p ) return index; - return -1; - } - - static const tm* getTime( ExecState* exec, const List& args ) - { - time_t now = std::time( 0 ); - if ( args[ args.size() - 1 ].toString( exec ).toLower() == "gmt" ) - return std::gmtime( &now ); - else return std::localtime( &now ); - } - - Boolean checkRange( int value, int min, int max ) - { - return ( min <= max && value >= min && value <= max ) || - ( min > max && ( value <= min || value >= max ) ); - } - }; - - // isPlainHostName( host ) - // @returns true if @p host doesn't contains a domain part - struct IsPlainHostName : public Function - { - virtual Value call( ExecState* exec, Object&, const List& args ) - { - if ( args.size() != 1 ) return Undefined(); - return Boolean( args[ 0 ].toString( exec ).find( "." ) == -1 ); - } - }; - - // dnsDomainIs( host, domain ) - // @returns true if the domain part of @p host matches @p domain - struct DNSDomainIs : public Function - { - virtual Value call( ExecState* exec, Object&, const List& args ) - { - if ( args.size() != 2 ) return Undefined(); - TQString host = args[ 0 ].toString( exec ).qstring().lower(); - TQString domain = args[ 1 ].toString( exec ).qstring().lower(); - return Boolean( host.endsWith( domain ) ); - } - }; - - // localHostOrDomainIs( host, fqdn ) - // @returns true if @p host is unqualified or equals @p fqdn - struct LocalHostOrDomainIs : public Function - { - virtual Value call( ExecState* exec, Object&, const List& args ) - { - if ( args.size() != 2 ) return Undefined(); - UString host = args[ 0 ].toString( exec ).toLower(); - if ( host.find( "." ) == -1 ) return Boolean( true ); - UString fqdn = args[ 1 ].toString( exec ).toLower(); - return Boolean( host == fqdn ); - } - }; - - // isResolvable( host ) - // @returns true if host can be resolved via DNS - struct IsResolvable : public Function - { - virtual Value call( ExecState* exec, Object&, const List& args ) - { - if ( args.size() != 1 ) return Undefined(); - try { ::Address::resolve( args[ 0 ].toString( exec ) ); } - catch ( const Address::Error& ) { return Boolean( false ); } - return Boolean( true ); - } - }; - - // isInNet( host, subnet, mask ) - // @returns true if @p host is within the IP subnet - // specified via @p subnet and @p mask - struct IsInNet : public Function - { - virtual Value call( ExecState* exec, Object&, const List& args ) - { - if ( args.size() != 3 ) return Undefined(); - try - { - in_addr_t host = Address::resolve( args[ 0 ].toString( exec ) ); - in_addr_t subnet = Address::parse( args[ 1 ].toString( exec ) ); - in_addr_t mask = Address::parse( args[ 2 ].toString( exec ) ); - return Boolean( ( host & mask ) == ( subnet & mask ) ); - } - catch ( const Address::Error& ) - { - return Undefined(); - } - } - }; - - // dnsResolve( host ) - // @returns the IP address of @p host in dotted quad notation - struct DNSResolve : public Function - { - virtual Value call( ExecState* exec, Object&, const List& args ) - { - if ( args.size() != 1 ) return Undefined(); - try { return String(Address::resolve( args[ 0 ].toString( exec ))); } - catch ( const Address::Error& ) { return Undefined(); } - } - }; - - // myIpAddress() - // @returns the local machine's IP address in dotted quad notation - struct MyIpAddress : public Function - { - virtual Value call( ExecState*, Object&, const List& args ) - { - if ( args.size() ) return Undefined(); - char hostname[ 256 ]; - gethostname( hostname, 255 ); - hostname[ 255 ] = 0; - try { return String(Address::resolve( hostname )); } - catch ( const Address::Error& ) { return Undefined(); } - } - }; - - // dnsDomainLevels( host ) - // @returns the number of dots ('.') in @p host - struct DNSDomainLevels : public Function - { - virtual Value call( ExecState* exec, Object&, const List& args ) - { - if ( args.size() != 1 ) return Undefined(); - UString host = args[ 0 ].toString( exec ); - if ( host.isNull() ) return Number( 0 ); - return Number( std::count( - host.data(), host.data() + host.size(), '.' ) ); - } - }; - - // shExpMatch( str, pattern ) - // @returns true if @p str matches the shell @p pattern - struct ShExpMatch : public Function - { - virtual Value call( ExecState* exec, Object&, const List& args ) - { - if ( args.size() != 2 ) return Undefined(); - TQRegExp pattern( args[ 1 ].toString( exec ).qstring(), true, true ); - return Boolean( pattern.exactMatch(args[ 0 ].toString( exec ).qstring()) ); - } - }; - - // weekdayRange( day [, "GMT" ] ) - // weekdayRange( day1, day2 [, "GMT" ] ) - // @returns true if the current day equals day or between day1 and day2 resp. - // If the last argument is "GMT", GMT timezone is used, otherwise local time - struct WeekdayRange : public Function - { - virtual Value call( ExecState* exec, Object&, const List& args ) - { - if ( args.size() < 1 || args.size() > 3 ) return Undefined(); - static const char* const days[] = - { "sun", "mon", "tue", "wed", "thu", "fri", "sat", 0 }; - int d1 = findString( args[ 0 ].toString( exec ), days ); - if ( d1 == -1 ) return Undefined(); - - int d2 = findString( args[ 1 ].toString( exec ), days ); - if ( d2 == -1 ) d2 = d1; - return checkRange( getTime( exec, args )->tm_wday, d1, d2 ); - } - }; - - // dateRange( day [, "GMT" ] ) - // dateRange( day1, day2 [, "GMT" ] ) - // dateRange( month [, "GMT" ] ) - // dateRange( month1, month2 [, "GMT" ] ) - // dateRange( year [, "GMT" ] ) - // dateRange( year1, year2 [, "GMT" ] ) - // dateRange( day1, month1, day2, month2 [, "GMT" ] ) - // dateRange( month1, year1, month2, year2 [, "GMT" ] ) - // dateRange( day1, month1, year1, day2, month2, year2 [, "GMT" ] ) - // @returns true if the current date (GMT or local time according to - // presence of "GMT" as last argument) is within the given range - struct DateRange : public Function - { - virtual Value call( ExecState* exec, Object&, const List& args ) - { - if ( args.size() < 1 || args.size() > 7 ) return Undefined(); - static const char* const months[] = - { "jan", "feb", "mar", "apr", "may", "jun", "jul", "aug", "nov", "dec", 0 }; - - std::vector< int > values; - for ( int i = 0; i < args.size(); ++i ) - { - int value = -1; - if ( args[ i ].isA( NumberType ) ) - value = args[ i ].toInteger( exec ); - else value = findString( args[ i ].toString( exec ), months ); - if ( value >= 0 ) values.push_back( value ); - else break; - } - - const tm* now = getTime( exec, args ); - - // day1, month1, year1, day2, month2, year2 - if ( values.size() == 6 ) - return checkRange( ( now->tm_year + 1900 ) * 372 + now->tm_mon * 31 + now->tm_mday, - values[ 2 ] * 372 + values[ 1 ] * 31 + values[ 0 ], - values[ 5 ] * 372 + values[ 4 ] * 31 + values[ 3 ] ); - - // day1, month1, day2, month2 - else if ( values.size() == 4 && - values[ 1 ] < 12 && - values[ 3 ] < 12 ) - return checkRange( now->tm_mon * 31 + now->tm_mday, - values[ 1 ] * 31 + values[ 0 ], - values[ 3 ] * 31 + values[ 2 ] ); - - // month1, year1, month2, year2 - else if ( values.size() == 4 ) - return checkRange( ( now->tm_year + 1900 ) * 12 + now->tm_mon, - values[ 1 ] * 12 + values[ 0 ], - values[ 3 ] * 12 + values[ 2 ] ); - - // year1, year2 - else if ( values.size() == 2 && - values[ 0 ] >= 1000 && - values[ 1 ] >= 1000 ) - return checkRange( now->tm_year + 1900, values[ 0 ], values[ 1 ] ); - - // day1, day2 - else if ( values.size() == 2 && - args[ 0 ].isA( NumberType ) && - args[ 1 ].isA( NumberType ) ) - return checkRange( now->tm_mday, values[ 0 ], values[ 1 ] ); - - // month1, month2 - else if ( values.size() == 2 ) - return checkRange( now->tm_mon, values[ 0 ], values[ 1 ] ); - - // year - else if ( values.size() == 1 && values[ 0 ] >= 1000 ) - return checkRange( now->tm_year + 1900, values[ 0 ], values[ 0 ] ); - - // day - else if ( values.size() == 1 && args[ 0 ].isA( NumberType ) ) - return checkRange( now->tm_mday, values[ 0 ], values[ 0 ] ); - - // month - else if ( values.size() == 1 ) - return checkRange( now->tm_mon, values[ 0 ], values[ 0 ] ); - - else return Undefined(); - } - }; - - // timeRange( hour [, "GMT" ] ) - // timeRange( hour1, hour2 [, "GMT" ] ) - // timeRange( hour1, min1, hour2, min2 [, "GMT" ] ) - // timeRange( hour1, min1, sec1, hour2, min2, sec2 [, "GMT" ] ) - // @returns true if the current time (GMT or local based on presence - // of "GMT" argument) is within the given range - struct TimeRange : public Function - { - virtual Value call( ExecState* exec, Object&, const List& args ) - { - if ( args.size() < 1 || args.size() > 7 ) return Undefined(); - - std::vector< int > values; - for ( int i = 0; i < args.size(); ++i ) - if ( args[ i ].isA( NumberType ) ) - values.push_back( args[ i ].toInteger( exec ) ); - else break; - - const tm* now = getTime( exec, args ); - - // hour1, min1, sec1, hour2, min2, sec2 - if ( values.size() == 6 ) - return checkRange( now->tm_hour * 3600 + now->tm_min * 60 + now->tm_sec, - values[ 0 ] * 3600 + values[ 1 ] * 60 + values[ 2 ], - values[ 3 ] * 3600 + values[ 4 ] * 60 + values[ 5 ] ); - - // hour1, min1, hour2, min2 - else if ( values.size() == 4 ) - return checkRange( now->tm_hour * 60 + now->tm_min, - values[ 0 ] * 60 + values[ 1 ], - values[ 2 ] * 60 + values[ 3 ] ); - - // hour1, hour2 - else if ( values.size() == 2 ) - return checkRange( now->tm_hour, values[ 0 ], values[ 1 ] ); - - // hour - else if ( values.size() == 1 ) - return checkRange( now->tm_hour, values[ 0 ], values[ 0 ] ); - - else return Undefined(); - } - }; - - void registerFunctions( ExecState* exec, Object& global ) - { - global.put( exec, "isPlainHostName", - Object( new IsPlainHostName ) ); - global.put( exec, "dnsDomainIs", - Object( new DNSDomainIs ) ); - global.put( exec, "localHostOrDomainIs", - Object( new LocalHostOrDomainIs ) ); - global.put( exec, "isResolvable", - Object( new IsResolvable ) ); - global.put( exec, "isInNet", - Object( new IsInNet ) ); - global.put( exec, "dnsResolve", - Object( new DNSResolve ) ); - global.put( exec, "myIpAddress", - Object( new MyIpAddress ) ); - global.put( exec, "dnsDomainLevels", - Object( new DNSDomainLevels ) ); - global.put( exec, "shExpMatch", - Object( new ShExpMatch ) ); - global.put( exec, "weekdayRange", - Object( new WeekdayRange ) ); - global.put( exec, "dateRange", - Object( new DateRange ) ); - global.put( exec, "timeRange", - Object( new TimeRange ) ); - } -} - -namespace KPAC -{ - Script::Script( const TQString& code ) - { - ExecState* exec = m_interpreter.globalExec(); - Object global = m_interpreter.globalObject(); - registerFunctions( exec, global ); - - Completion result = m_interpreter.evaluate( code ); - if ( result.complType() == Throw ) - throw Error( result.value().toString( exec ).qstring() ); - } - - TQString Script::evaluate( const KURL& url ) - { - ExecState *exec = m_interpreter.globalExec(); - Value findFunc = m_interpreter.globalObject().get( exec, "FindProxyForURL" ); - Object findObj = Object::dynamicCast( findFunc ); - if (!findObj.isValid() || !findObj.implementsCall()) - throw Error( "No such function FindProxyForURL" ); - - Object thisObj; - List args; - args.append(String(url.url())); - args.append(String(url.host())); - Value retval = findObj.call( exec, thisObj, args ); - - if ( exec->hadException() ) { - Value ex = exec->exception(); - exec->clearException(); - throw Error( ex.toString( exec ).qstring() ); - } - - return retval.toString( exec ).qstring(); - } -} - -// vim: ts=4 sw=4 et diff --git a/kio/misc/kpac/script.h b/kio/misc/kpac/script.h deleted file mode 100644 index 49ba0b6a3..000000000 --- a/kio/misc/kpac/script.h +++ /dev/null @@ -1,56 +0,0 @@ -/* - Copyright (c) 2003 Malte Starostik - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - - -#ifndef KPAC_SCRIPT_H -#define KPAC_SCRIPT_H - -#include - -#include - -class KURL; - -namespace KPAC -{ - class Script - { - public: - class Error - { - public: - Error( const TQString& message ) - : m_message( message ) {} - const TQString& message() const { return m_message; } - - private: - TQString m_message; - }; - - Script( const TQString& code ); - TQString evaluate( const KURL& ); - - private: - KJS::Interpreter m_interpreter; - }; -} - -#endif // KPAC_SCRIPT_H - -// vim: ts=4 sw=4 et diff --git a/kio/misc/ksendbugmail/CMakeLists.txt b/kio/misc/ksendbugmail/CMakeLists.txt deleted file mode 100644 index f0e1b99b0..000000000 --- a/kio/misc/ksendbugmail/CMakeLists.txt +++ /dev/null @@ -1,37 +0,0 @@ -################################################# -# -# (C) 2010 Serghei Amelian -# serghei (DOT) amelian (AT) gmail.com -# -# Improvements and feedback are welcome -# -# This file is released under GPL >= 2 -# -################################################# - -include_directories( - ${TQT_INCLUDE_DIRS} - ${CMAKE_CURRENT_BINARY_DIR} - ${CMAKE_BINARY_DIR}/tdecore - ${CMAKE_SOURCE_DIR}/tdecore - ${CMAKE_SOURCE_DIR}/kio/kio -) - -link_directories( - ${TQT_LIBRARY_DIRS} -) - - -##### ksendbugmail ############################## - -set( target ksendbugmail ) - -set( ${target}_SRCS - main.cpp smtp.cpp -) - -tde_add_executable( ${target} AUTOMOC - SOURCES ${${target}_SRCS} - LINK kio-shared - DESTINATION ${BIN_INSTALL_DIR} -) diff --git a/kio/misc/ksendbugmail/Makefile.am b/kio/misc/ksendbugmail/Makefile.am deleted file mode 100644 index b24e36a26..000000000 --- a/kio/misc/ksendbugmail/Makefile.am +++ /dev/null @@ -1,26 +0,0 @@ -# This file is part of the KDE libraries -# Copyright (C) 2000 Stephan Kulow - -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Library General Public -# License as published by the Free Software Foundation; either -# version 2 of the License, or (at your option) any later version. - -# This library 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 -# Library General Public License for more details. - -# You should have received a copy of the GNU Library General Public License -# along with this library; see the file COPYING.LIB. If not, write to -# the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -# Boston, MA 02110-1301, USA. - -bin_PROGRAMS = ksendbugmail -INCLUDES= -I$(srcdir)/.. $(all_includes) - -ksendbugmail_SOURCES = main.cpp smtp.cpp -ksendbugmail_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor -ksendbugmail_LDADD = ../../libkio.la - -METASOURCES = AUTO diff --git a/kio/misc/ksendbugmail/main.cpp b/kio/misc/ksendbugmail/main.cpp deleted file mode 100644 index be1eb8b96..000000000 --- a/kio/misc/ksendbugmail/main.cpp +++ /dev/null @@ -1,142 +0,0 @@ -// $Id$ - -#include -#include "main.h" -#include -#include -#include - -#include - -#include -#include -#include -#include -#include -#include -#include - -#include "smtp.h" - -static KCmdLineOptions options[] = { - { "subject ", I18N_NOOP("Subject line"), 0 }, - { "recipient ", I18N_NOOP("Recipient"), "submit@bugs.kde.org" }, - KCmdLineLastOption -}; - -void BugMailer::slotError(int errornum) { - kdDebug() << "slotError\n"; - TQString str, lstr; - - switch(errornum) { - case SMTP::CONNECTERROR: - lstr = i18n("Error connecting to server."); - break; - case SMTP::NOTCONNECTED: - lstr = i18n("Not connected."); - break; - case SMTP::CONNECTTIMEOUT: - lstr = i18n("Connection timed out."); - break; - case SMTP::INTERACTTIMEOUT: - lstr = i18n("Time out waiting for server interaction."); - break; - default: - lstr = sm->getLastLine().stripWhiteSpace(); - lstr = i18n("Server said: \"%1\"").arg(lstr); - } - fputs(lstr.utf8().data(), stdout); - fflush(stdout); - - ::exit(1); -} - -void BugMailer::slotSend() { - kdDebug() << "slotSend\n"; - ::exit(0); -} - -int main(int argc, char **argv) { - - KLocale::setMainCatalogue("tdelibs"); - TDEAboutData d("ksendbugmail", I18N_NOOP("KSendBugMail"), "1.0", - I18N_NOOP("Sends a short bug report to submit@bugs.kde.org"), - TDEAboutData::License_GPL, "(c) 2000 Stephan Kulow"); - d.addAuthor("Stephan Kulow", I18N_NOOP("Author"), "coolo@kde.org"); - - TDECmdLineArgs::init(argc, argv, &d); - TDECmdLineArgs::addCmdLineOptions(options); - TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs(); - - TDEApplication a(false, false); - - TQCString recipient = args->getOption("recipient"); - if (recipient.isEmpty()) - recipient = "submit@bugs.kde.org"; - else { - if (recipient.at(0) == '\'') { - recipient = recipient.mid(1).left(recipient.length() - 2); - } - } - kdDebug() << "recp \"" << recipient << "\"\n"; - - TQCString subject = args->getOption("subject"); - if (subject.isEmpty()) - subject = "(no subject)"; - else { - if (subject.at(0) == '\'') - subject = subject.mid(1).left(subject.length() - 2); - } - TQTextIStream input(stdin); - TQString text, line; - while (!input.eof()) { - line = input.readLine(); - text += line + "\r\n"; - } - kdDebug() << text << endl; - - KEMailSettings emailConfig; - emailConfig.setProfile(emailConfig.defaultProfileName()); - TQString fromaddr = emailConfig.getSetting(KEMailSettings::EmailAddress); - if (!fromaddr.isEmpty()) { - TQString name = emailConfig.getSetting(KEMailSettings::RealName); - if (!name.isEmpty()) - fromaddr = name + TQString::fromLatin1(" <") + fromaddr + TQString::fromLatin1(">"); - } else { - struct passwd *p; - p = getpwuid(getuid()); - fromaddr = TQString::fromLatin1(p->pw_name); - fromaddr += "@"; - char buffer[256]; - buffer[0] = '\0'; - if(!gethostname(buffer, sizeof(buffer))) - buffer[sizeof(buffer)-1] = '\0'; - fromaddr += buffer; - } - kdDebug() << "fromaddr \"" << fromaddr << "\"" << endl; - - TQString server = emailConfig.getSetting(KEMailSettings::OutServer); - if (server.isEmpty()) - server=TQString::fromLatin1("bugs.kde.org"); - - SMTP *sm = new SMTP; - BugMailer bm(sm); - - TQObject::connect(sm, TQT_SIGNAL(messageSent()), &bm, TQT_SLOT(slotSend())); - TQObject::connect(sm, TQT_SIGNAL(error(int)), &bm, TQT_SLOT(slotError(int))); - sm->setServerHost(server); - sm->setPort(25); - sm->setSenderAddress(fromaddr); - sm->setRecipientAddress(recipient); - sm->setMessageSubject(subject); - sm->setMessageHeader(TQString::fromLatin1("From: %1\r\nTo: %2\r\n").arg(fromaddr).arg(recipient.data())); - sm->setMessageBody(text); - sm->sendMessage(); - - int r = a.exec(); - kdDebug() << "execing " << r << endl; - delete sm; - return r; -} - -#include "main.moc" diff --git a/kio/misc/ksendbugmail/main.h b/kio/misc/ksendbugmail/main.h deleted file mode 100644 index 39d424bef..000000000 --- a/kio/misc/ksendbugmail/main.h +++ /dev/null @@ -1,20 +0,0 @@ -#ifndef BUG_MAILER_H -#define BUG_MAILER_H "$Id$" - -#include - -class SMTP; - -class BugMailer : public TQObject { - Q_OBJECT -public: - BugMailer(SMTP* s) : TQObject(0, "mailer"), sm(s) {} - -public slots: - void slotError(int); - void slotSend(); -private: - SMTP *sm; -}; - -#endif diff --git a/kio/misc/ksendbugmail/smtp.cpp b/kio/misc/ksendbugmail/smtp.cpp deleted file mode 100644 index d282782fc..000000000 --- a/kio/misc/ksendbugmail/smtp.cpp +++ /dev/null @@ -1,336 +0,0 @@ -/* $Id$ */ - -#include -#include -#include - -#include - -#include "smtp.h" - -SMTP::SMTP(char *serverhost, unsigned short int port, int timeout) -{ - struct utsname uts; - - serverHost = serverhost; - hostPort = port; - timeOut = timeout * 1000; - - senderAddress = "user@example.net"; - recipientAddress = "user@example.net"; - messageSubject = "(no subject)"; - messageBody = "empty"; - messageHeader = ""; - - connected = false; - finished = false; - - sock = 0L; - state = INIT; - serverState = NONE; - - uname(&uts); - domainName = uts.nodename; - - - if(domainName.isEmpty()) - domainName = "somemachine.example.net"; - - kdDebug() << "SMTP object created" << endl; - - connect(&connectTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(connectTimerTick())); - connect(&timeOutTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(connectTimedOut())); - connect(&interactTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(interactTimedOut())); - - // some sendmail will give 'duplicate helo' error, quick fix for now - connect(this, TQT_SIGNAL(messageSent()), TQT_SLOT(closeConnection())); -} - -SMTP::~SMTP() -{ - if(sock){ - delete sock; - sock = 0L; - } - connectTimer.stop(); - timeOutTimer.stop(); -} - -void SMTP::setServerHost(const TQString& serverhost) -{ - serverHost = serverhost; -} - -void SMTP::setPort(unsigned short int port) -{ - hostPort = port; -} - -void SMTP::setTimeOut(int timeout) -{ - timeOut = timeout; -} - -void SMTP::setSenderAddress(const TQString& sender) -{ - senderAddress = sender; - int index = senderAddress.find('<'); - if (index == -1) - return; - senderAddress = senderAddress.mid(index + 1); - index = senderAddress.find('>'); - if (index != -1) - senderAddress = senderAddress.left(index); - senderAddress = senderAddress.simplifyWhiteSpace(); - while (1) { - index = senderAddress.find(' '); - if (index != -1) - senderAddress = senderAddress.mid(index + 1); // take one side - else - break; - } - index = senderAddress.find('@'); - if (index == -1) - senderAddress.append("@localhost"); // won't go through without a local mail system - -} - -void SMTP::setRecipientAddress(const TQString& recipient) -{ - recipientAddress = recipient; -} - -void SMTP::setMessageSubject(const TQString& subject) -{ - messageSubject = subject; -} - -void SMTP::setMessageBody(const TQString& message) -{ - messageBody = message; -} - -void SMTP::setMessageHeader(const TQString &header) -{ - messageHeader = header; -} - -void SMTP::openConnection(void) -{ - kdDebug() << "started connect timer" << endl; - connectTimer.start(100, true); -} - -void SMTP::closeConnection(void) -{ - socketClose(sock); -} - -void SMTP::sendMessage(void) -{ - if(!connected) - connectTimerTick(); - if(state == FINISHED && connected){ - kdDebug() << "state was == FINISHED\n" << endl; - finished = false; - state = IN; - writeString = TQString::fromLatin1("helo %1\r\n").arg(domainName); - write(sock->socket(), writeString.ascii(), writeString.length()); - } - if(connected){ - kdDebug() << "enabling read on sock...\n" << endl; - interactTimer.start(timeOut, true); - sock->enableRead(true); - } -} -#include - -void SMTP::connectTimerTick(void) -{ - connectTimer.stop(); -// timeOutTimer.start(timeOut, true); - - kdDebug() << "connectTimerTick called..." << endl; - - if(sock){ - delete sock; - sock = 0L; - } - - kdDebug() << "connecting to " << serverHost << ":" << hostPort << " ..... " << endl; - sock = new TDESocket(serverHost.ascii(), hostPort); - - if(sock == 0L || sock->socket() < 0) { - timeOutTimer.stop(); - kdDebug() << "connection failed!" << endl; - socketClose(sock); - emit error(CONNECTERROR); - connected = false; - return; - } - connected = true; - finished = false; - state = INIT; - serverState = NONE; - - connect(sock, TQT_SIGNAL(readEvent(TDESocket *)), this, TQT_SLOT(socketRead(TDESocket *))); - connect(sock, TQT_SIGNAL(closeEvent(TDESocket *)), this, TQT_SLOT(socketClose(TDESocket *))); - // sock->enableRead(true); - timeOutTimer.stop(); - kdDebug() << "connected" << endl; -} - -void SMTP::connectTimedOut(void) -{ - timeOutTimer.stop(); - - if(sock) - sock->enableRead(false); - kdDebug() << "socket connection timed out" << endl; - socketClose(sock); - emit error(CONNECTTIMEOUT); -} - -void SMTP::interactTimedOut(void) -{ - interactTimer.stop(); - - if(sock) - sock->enableRead(false); - kdDebug() << "time out waiting for server interaction" << endl; - socketClose(sock); - emit error(INTERACTTIMEOUT); -} - -void SMTP::socketRead(TDESocket *socket) -{ - int n, nl; - - kdDebug() << "socketRead() called..." << endl; - interactTimer.stop(); - - if(socket == 0L || socket->socket() < 0) - return; - n = read(socket->socket(), readBuffer, SMTP_READ_BUFFER_SIZE-1 ); - - if(n < 0) - return; - - readBuffer[n] = '\0'; - lineBuffer += readBuffer; - nl = lineBuffer.find('\n'); - if(nl == -1) - return; - lastLine = lineBuffer.left(nl); - lineBuffer = lineBuffer.right(lineBuffer.length() - nl - 1); - processLine(&lastLine); - if(connected) - interactTimer.start(timeOut, true); -} - -void SMTP::socketClose(TDESocket *socket) -{ - timeOutTimer.stop(); - disconnect(sock, TQT_SIGNAL(readEvent(TDESocket *)), this, TQT_SLOT(socketRead(TDESocket *))); - disconnect(sock, TQT_SIGNAL(closeEvent(TDESocket *)), this, TQT_SLOT(socketClose(TDESocket *))); - socket->enableRead(false); - kdDebug() << "connection terminated" << endl; - connected = false; - if(socket){ - delete socket; - socket = 0L; - sock = 0L; - } - emit connectionClosed(); -} - -void SMTP::processLine(TQString *line) -{ - int i, stat; - TQString tmpstr; - - i = line->find(' '); - tmpstr = line->left(i); - if(i > 3) - kdDebug() << "warning: SMTP status code longer then 3 digits: " << tmpstr << endl; - stat = tmpstr.toInt(); - serverState = (SMTPServerStatus)stat; - lastState = state; - - kdDebug() << "smtp state: [" << stat << "][" << *line << "]" << endl; - - switch(stat){ - case GREET: //220 - state = IN; - writeString = TQString::fromLatin1("helo %1\r\n").arg(domainName); - kdDebug() << "out: " << writeString << endl; - write(sock->socket(), writeString.ascii(), writeString.length()); - break; - case GOODBYE: //221 - state = QUIT; - break; - case SUCCESSFUL://250 - switch(state){ - case IN: - state = READY; - writeString = TQString::fromLatin1("mail from: %1\r\n").arg(senderAddress); - kdDebug() << "out: " << writeString << endl; - write(sock->socket(), writeString.ascii(), writeString.length()); - break; - case READY: - state = SENTFROM; - writeString = TQString::fromLatin1("rcpt to: %1\r\n").arg(recipientAddress); - kdDebug() << "out: " << writeString << endl; - write(sock->socket(), writeString.ascii(), writeString.length()); - break; - case SENTFROM: - state = SENTTO; - writeString = TQString::fromLatin1("data\r\n"); - kdDebug() << "out: " << writeString << endl; - write(sock->socket(), writeString.ascii(), writeString.length()); - break; - case DATA: - state = FINISHED; - finished = true; - sock->enableRead(false); - emit messageSent(); - break; - default: - state = CERROR; - kdDebug() << "smtp error (state error): [" << lastState << "]:[" << stat << "][" << *line << "]" << endl; - socketClose(sock); - emit error(COMMAND); - break; - } - break; - case READYDATA: //354 - state = DATA; - writeString = TQString::fromLatin1("Subject: %1\r\n").arg(messageSubject); - writeString += messageHeader; - writeString += "\r\n"; - writeString += messageBody; - writeString += TQString::fromLatin1(".\r\n"); - kdDebug() << "out: " << writeString; - write(sock->socket(), writeString.ascii(), writeString.length()); - break; - case ERROR: //501 - state = CERROR; - kdDebug() << "smtp error (command error): [" << lastState << "]:[" << stat << "][" << *line << "]\n" << endl; - socketClose(sock); - emit error(COMMAND); - break; - case UNKNOWN: //550 - state = CERROR; - kdDebug() << "smtp error (unknown user): [" << lastState << "]:[" << stat << "][" << *line << "]" << endl; - socketClose(sock); - emit error(UNKNOWNUSER); - break; - default: - state = CERROR; - kdDebug() << "unknown response: [" << lastState << "]:[" << stat << "][" << *line << "]" << endl; - socketClose(sock); - emit error(UNKNOWNRESPONSE); - } -} - -#include "smtp.moc" diff --git a/kio/misc/ksendbugmail/smtp.h b/kio/misc/ksendbugmail/smtp.h deleted file mode 100644 index acdb4a3c3..000000000 --- a/kio/misc/ksendbugmail/smtp.h +++ /dev/null @@ -1,144 +0,0 @@ -/* $Id$ */ - -#ifndef SMTP_H -#define SMTP_H - -#include -#include -#include - -/*int SMTPServerStatus[] = { - 220, // greeting from server - 221, // server acknolages goodbye - 250, // command successful - 354, // ready to receive data - 501, // error - 550, // user unknown - 0 // null -}; - -int SMTPClientStatus[] = { - 50, // not logged in yet. - 100, // logged in, got 220 - 150, // sent helo, got 250 - 200, // sent mail from, got 250 - 250, // sent rctp to, got 250 - 300, // data sent, got 354 - 350, // sent data/., got 250 - 400, // send quit, got 221 - 450, // finished, logged out - 0 // null -}; -*/ - -#define DEFAULT_SMTP_PORT 25 -#define DEFAULT_SMTP_SERVER localhost -#define DEFAULT_SMTP_TIMEOUT 60 - -#define SMTP_READ_BUFFER_SIZE 256 - -class SMTP:public QObject -{ - Q_OBJECT -public: - SMTP(char *serverhost = 0, unsigned short int port = 0, int timeout = DEFAULT_SMTP_TIMEOUT); - ~SMTP(); - - void setServerHost(const TQString& serverhost); - void setPort(unsigned short int port); - void setTimeOut(int timeout); - - bool isConnected(){return connected;}; - bool isFinished(){return finished;}; - TQString getLastLine(){return lastLine;}; - - void setSenderAddress(const TQString& sender); - void setRecipientAddress(const TQString& recipient); - void setMessageSubject(const TQString& subject); - void setMessageBody(const TQString& message); - void setMessageHeader(const TQString &header); - - typedef enum { - NONE = 0, // null - GREET = 220, // greeting from server - GOODBYE = 221, // server acknolages quit - SUCCESSFUL = 250, // command successful - READYDATA = 354, // server ready to receive data - ERROR = 501, // error - UNKNOWN = 550 // user unknown - }SMTPServerStatus; - - typedef enum { - INIT = 50, // not logged in yet - IN = 100, // logged in, got 220 - READY = 150, // sent HELO, got 250 - SENTFROM = 200, // sent MAIL FROM:, got 250 - SENTTO = 250, // sent RCTP TO:, got 250 - DATA = 300, // DATA sent, got 354 - FINISHED = 350, // finished sending data, got 250 - QUIT = 400, // sent QUIT, got 221 - OUT = 450, // finished, logged out - CERROR = 500 // didn't finish, had error or connection drop - }SMTPClientStatus; - - typedef enum { - NOERROR = 0, - CONNECTERROR = 10, - NOTCONNECTED = 11, - CONNECTTIMEOUT = 15, - INTERACTTIMEOUT = 16, - UNKNOWNRESPONSE = 20, - UNKNOWNUSER = 30, - COMMAND = 40 - }SMTPError; - -protected: - void processLine(TQString *line); - -public slots: - void openConnection(); - void sendMessage(); - void closeConnection(); - - void connectTimerTick(); - void connectTimedOut(); - void interactTimedOut(); - - void socketRead(TDESocket *); - void socketClose(TDESocket *); - -signals: - void connectionClosed(); - void messageSent(); - void error(int); - -private: - TQString serverHost; - unsigned short int hostPort; - int timeOut; - - bool connected; - bool finished; - - TQString senderAddress; - TQString recipientAddress; - TQString messageSubject; - TQString messageBody, messageHeader; - - SMTPClientStatus state; - SMTPClientStatus lastState; - SMTPServerStatus serverState; - - TQString domainName; - - TDESocket *sock; - TQTimer connectTimer; - TQTimer timeOutTimer; - TQTimer interactTimer; - - char readBuffer[SMTP_READ_BUFFER_SIZE]; - TQString lineBuffer; - TQString lastLine; - TQString writeString; -}; -#endif diff --git a/kio/misc/kssld/CMakeLists.txt b/kio/misc/kssld/CMakeLists.txt deleted file mode 100644 index 14d2de1ac..000000000 --- a/kio/misc/kssld/CMakeLists.txt +++ /dev/null @@ -1,47 +0,0 @@ -################################################# -# -# (C) 2010 Serghei Amelian -# serghei (DOT) amelian (AT) gmail.com -# -# Improvements and feedback are welcome -# -# This file is released under GPL >= 2 -# -################################################# - -include_directories( - ${TQT_INCLUDE_DIRS} - ${CMAKE_CURRENT_BINARY_DIR} - ${CMAKE_BINARY_DIR} - ${CMAKE_BINARY_DIR}/kio/kssl - ${CMAKE_BINARY_DIR}/tdecore - ${CMAKE_SOURCE_DIR} - ${CMAKE_SOURCE_DIR}/dcop - ${CMAKE_SOURCE_DIR}/tdecore - ${CMAKE_SOURCE_DIR}/kio/kssl -) - -link_directories( - ${TQT_LIBRARY_DIRS} -) - - -##### other data ################################ - -install(FILES kssld.desktop DESTINATION ${SERVICES_INSTALL_DIR}/kded ) - - -##### kded_kssld ########################### - -set( target kded_kssld ) - -set( ${target}_SRCS - kssld.cpp kssld.skel -) - -tde_add_kpart( ${target} AUTOMOC - SOURCES ${${target}_SRCS} - LINK tdeinit_kded-shared - DEPENDENCIES dcopidl - DESTINATION ${PLUGIN_INSTALL_DIR} -) diff --git a/kio/misc/kssld/Makefile.am b/kio/misc/kssld/Makefile.am deleted file mode 100644 index 18193018e..000000000 --- a/kio/misc/kssld/Makefile.am +++ /dev/null @@ -1,33 +0,0 @@ -# This file is part of the KDE libraries -# Copyright (C) 2001 George Staikos - -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Library General Public -# License as published by the Free Software Foundation; either -# version 2 of the License, or (at your option) any later version. - -# This library 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 -# Library General Public License for more details. - -# You should have received a copy of the GNU Library General Public License -# along with this library; see the file COPYING.LIB. If not, write to -# the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -# Boston, MA 02110-1301, USA. - -INCLUDES= -I$(srcdir)/.. -I$(top_srcdir) $(SSL_INCLUDES) -I$(top_srcdir)/kio/kssl -I$(top_builddir)/kio/kssl $(all_includes) - -kde_module_LTLIBRARIES = kded_kssld.la - -kded_kssld_la_LDFLAGS = $(all_libraries) -module -avoid-version -kded_kssld_la_LIBADD = $(LIB_KIO) $(LIB_KDED) $(LIB_QT) $(top_builddir)/dcop/libDCOP.la $(LIB_TDECORE) -kded_kssld_la_SOURCES = kssld.cpp kssld.skel - -METASOURCES = AUTO - -noinst_HEADERS = kssld.h - -services_DATA = kssld.desktop -servicesdir = $(kde_servicesdir)/kded - diff --git a/kio/misc/kssld/kssld.cpp b/kio/misc/kssld/kssld.cpp deleted file mode 100644 index 22bf6ab84..000000000 --- a/kio/misc/kssld/kssld.cpp +++ /dev/null @@ -1,1027 +0,0 @@ -/* - This file is part of the KDE libraries - - Copyright (c) 2001-2005 George Staikos - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. - -*/ - -#ifdef HAVE_CONFIG_H -#include -#endif - -#include - -#include "kssld.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include - -// See design notes at end - -extern "C" { - KDE_EXPORT KDEDModule *create_kssld(const TQCString &name) { - return new KSSLD(name); - } - - KDE_EXPORT void *__kde_do_unload; -} - - -static void updatePoliciesConfig(TDEConfig *cfg) { - TQStringList groups = cfg->groupList(); - - for (TQStringList::Iterator i = groups.begin(); i != groups.end(); ++i) { - if ((*i).isEmpty() || *i == "General") { - continue; - } - - cfg->setGroup(*i); - - // remove it if it has expired - if (!cfg->readBoolEntry("Permanent") && cfg->readDateTimeEntry("Expires") < TQDateTime::currentDateTime()) { - cfg->deleteGroup(*i); - continue; - } - - TQString encodedCertStr = cfg->readEntry("Certificate"); - TQCString encodedCert = encodedCertStr.local8Bit(); - KSSLCertificate *newCert = KSSLCertificate::fromString(encodedCert); - if (!newCert) { - cfg->deleteGroup(*i); - continue; - } - - KSSLCertificateCache::KSSLCertificatePolicy policy = (KSSLCertificateCache::KSSLCertificatePolicy) cfg->readNumEntry("Policy"); - bool permanent = cfg->readBoolEntry("Permanent"); - TQDateTime expires = cfg->readDateTimeEntry("Expires"); - TQStringList hosts = cfg->readListEntry("Hosts"); - TQStringList chain = cfg->readListEntry("Chain"); - cfg->deleteGroup(*i); - - cfg->setGroup(newCert->getMD5Digest()); - cfg->writeEntry("Certificate", encodedCertStr); - cfg->writeEntry("Policy", policy); - cfg->writeEntry("Permanent", permanent); - cfg->writeEntry("Expires", expires); - cfg->writeEntry("Hosts", hosts); - cfg->writeEntry("Chain", chain); - delete newCert; - } - - cfg->setGroup("General"); - cfg->writeEntry("policies version", 2); - - cfg->sync(); -} - - -KSSLD::KSSLD(const TQCString &name) : KDEDModule(name) -{ -// ----------------------- FOR THE CACHE ------------------------------------ - cfg = new KSimpleConfig("ksslpolicies", false); - cfg->setGroup("General"); - if (2 != cfg->readNumEntry("policies version", 0)) { - ::updatePoliciesConfig(cfg); - } - TDEGlobal::dirs()->addResourceType("kssl", KStandardDirs::kde_default("data") + "kssl"); - caVerifyUpdate(); - cacheLoadDefaultPolicies(); - certList.setAutoDelete(false); - kossl = KOSSL::self(); - -// ----------------------- FOR THE HOME ------------------------------------- -} - - -KSSLD::~KSSLD() -{ -// ----------------------- FOR THE CACHE ------------------------------------ - cacheClearList(); - delete cfg; - -// ----------------------- FOR THE HOME ------------------------------------- -} - - - - -// A node in the cache -class KSSLCNode { - public: - KSSLCertificate *cert; - KSSLCertificateCache::KSSLCertificatePolicy policy; - bool permanent; - TQDateTime expires; - TQStringList hosts; - KSSLCNode() { cert = 0L; - policy = KSSLCertificateCache::Unknown; - permanent = true; - } - ~KSSLCNode() { delete cert; } -}; - - - -void KSSLD::cacheSaveToDisk() { -KSSLCNode *node; - - cfg->setGroup("General"); - cfg->writeEntry("policies version", 2); - - for (node = certList.first(); node; node = certList.next()) { - if (node->permanent || - node->expires > TQDateTime::currentDateTime()) { - // First convert to a binary format and then write the - // kconfig entry write the (CN, policy, cert) to - // KSimpleConfig - cfg->setGroup(node->cert->getMD5Digest()); - cfg->writeEntry("Certificate", node->cert->toString()); - cfg->writeEntry("Policy", node->policy); - cfg->writeEntry("Expires", node->expires); - cfg->writeEntry("Permanent", node->permanent); - cfg->writeEntry("Hosts", node->hosts); - - // Also write the chain - TQStringList qsl; - TQPtrList cl = - node->cert->chain().getChain(); - for (KSSLCertificate *c = cl.first(); - c != 0; - c = cl.next()) { - //kdDebug() << "Certificate in chain: " - // << c->toString() << endl; - qsl << c->toString(); - } - - cl.setAutoDelete(true); - cfg->writeEntry("Chain", qsl); - } - } - - cfg->sync(); - - // insure proper permissions -- contains sensitive data - TQString cfgName(TDEGlobal::dirs()->findResource("config", "ksslpolicies")); - - if (!cfgName.isEmpty()) { - ::chmod(TQFile::encodeName(cfgName), 0600); - } -} - - -void KSSLD::cacheReload() { - cacheClearList(); - delete cfg; - cfg = new KSimpleConfig("ksslpolicies", false); - cacheLoadDefaultPolicies(); -} - - -void KSSLD::cacheClearList() { -KSSLCNode *node; - - for (node = certList.first(); node; node = certList.next()) { - certList.remove(node); - delete node; - } - - skEmail.clear(); - skMD5Digest.clear(); -} - - -void KSSLD::cacheLoadDefaultPolicies() { -TQStringList groups = cfg->groupList(); - - for (TQStringList::Iterator i = groups.begin(); - i != groups.end(); - ++i) { - if ((*i).isEmpty() || *i == "General") { - continue; - } - - cfg->setGroup(*i); - - // remove it if it has expired - if (!cfg->readBoolEntry("Permanent") && - cfg->readDateTimeEntry("Expires") < - TQDateTime::currentDateTime()) { - cfg->deleteGroup(*i); - continue; - } - - TQCString encodedCert; - KSSLCertificate *newCert; - - encodedCert = cfg->readEntry("Certificate").local8Bit(); - newCert = KSSLCertificate::fromString(encodedCert); - - if (!newCert) { - continue; - } - - KSSLCNode *n = new KSSLCNode; - n->cert = newCert; - n->policy = (KSSLCertificateCache::KSSLCertificatePolicy) cfg->readNumEntry("Policy"); - n->permanent = cfg->readBoolEntry("Permanent"); - n->expires = cfg->readDateTimeEntry("Expires"); - n->hosts = cfg->readListEntry("Hosts"); - newCert->chain().setCertChain(cfg->readListEntry("Chain")); - certList.append(n); - searchAddCert(newCert); - } -} - - -void KSSLD::cacheAddCertificate(KSSLCertificate cert, - KSSLCertificateCache::KSSLCertificatePolicy policy, - bool permanent) { -KSSLCNode *node; - - for (node = certList.first(); node; node = certList.next()) { - if (cert == *(node->cert)) { - node->policy = policy; - node->permanent = permanent; - - if (!permanent) { - node->expires = TQDateTime::currentDateTime(); - // FIXME: make this configurable - node->expires = TQT_TQDATETIME_OBJECT(node->expires.addSecs(3600)); - } - - cacheSaveToDisk(); - return; - } - } - - KSSLCNode *n = new KSSLCNode; - n->cert = cert.replicate(); - n->policy = policy; - n->permanent = permanent; - // remove the old one - cacheRemoveByCertificate(*(n->cert)); - certList.prepend(n); - - if (!permanent) { - n->expires = TQDateTime::currentDateTime(); - n->expires = TQT_TQDATETIME_OBJECT(n->expires.addSecs(3600)); - } - - searchAddCert(n->cert); - cacheSaveToDisk(); -} - - -KSSLCertificateCache::KSSLCertificatePolicy KSSLD::cacheGetPolicyByCN(TQString cn) { -KSSLCNode *node; - - for (node = certList.first(); node; node = certList.next()) { - if (KSSLX509Map(node->cert->getSubject()).getValue("CN") == cn) { - if (!node->permanent && - node->expires < TQDateTime::currentDateTime()) { - certList.remove(node); - cfg->deleteGroup(node->cert->getMD5Digest()); - delete node; - continue; - } - - certList.remove(node); - certList.prepend(node); - cacheSaveToDisk(); - return node->policy; - } - } - - cacheSaveToDisk(); - -return KSSLCertificateCache::Unknown; -} - - -KSSLCertificateCache::KSSLCertificatePolicy KSSLD::cacheGetPolicyByCertificate(KSSLCertificate cert) { -KSSLCNode *node; - - for (node = certList.first(); node; node = certList.next()) { - if (cert == *(node->cert)) { - if (!node->permanent && - node->expires < TQDateTime::currentDateTime()) { - certList.remove(node); - cfg->deleteGroup(node->cert->getMD5Digest()); - delete node; - cacheSaveToDisk(); - return KSSLCertificateCache::Unknown; - } - - certList.remove(node); - certList.prepend(node); - return node->policy; - } - } - -return KSSLCertificateCache::Unknown; -} - - -bool KSSLD::cacheSeenCN(TQString cn) { -KSSLCNode *node; - - for (node = certList.first(); node; node = certList.next()) { - if (KSSLX509Map(node->cert->getSubject()).getValue("CN") == cn) { - if (!node->permanent && - node->expires < TQDateTime::currentDateTime()) { - certList.remove(node); - cfg->deleteGroup(node->cert->getMD5Digest()); - delete node; - cacheSaveToDisk(); - continue; - } - - certList.remove(node); - certList.prepend(node); - return true; - } - } - -return false; -} - - -bool KSSLD::cacheSeenCertificate(KSSLCertificate cert) { -KSSLCNode *node; - - for (node = certList.first(); node; node = certList.next()) { - if (cert == *(node->cert)) { - if (!node->permanent && - node->expires < TQDateTime::currentDateTime()) { - certList.remove(node); - cfg->deleteGroup(node->cert->getMD5Digest()); - delete node; - cacheSaveToDisk(); - return false; - } - - certList.remove(node); - certList.prepend(node); - return true; - } - } - -return false; -} - - -bool KSSLD::cacheIsPermanent(KSSLCertificate cert) { -KSSLCNode *node; - - for (node = certList.first(); node; node = certList.next()) { - if (cert == *(node->cert)) { - if (!node->permanent && node->expires < - TQDateTime::currentDateTime()) { - certList.remove(node); - cfg->deleteGroup(node->cert->getMD5Digest()); - delete node; - cacheSaveToDisk(); - return false; - } - - certList.remove(node); - certList.prepend(node); - return node->permanent; - } - } - -return false; -} - - -bool KSSLD::cacheRemoveBySubject(TQString subject) { -KSSLCNode *node; -bool gotOne = false; - - for (node = certList.first(); node; node = certList.next()) { - if (node->cert->getSubject() == subject) { - certList.remove(node); - cfg->deleteGroup(node->cert->getMD5Digest()); - searchRemoveCert(node->cert); - delete node; - gotOne = true; - } - } - - cacheSaveToDisk(); - -return gotOne; -} - - -bool KSSLD::cacheRemoveByCN(TQString cn) { -KSSLCNode *node; -bool gotOne = false; - - for (node = certList.first(); node; node = certList.next()) { - if (KSSLX509Map(node->cert->getSubject()).getValue("CN") == cn) { - certList.remove(node); - cfg->deleteGroup(node->cert->getMD5Digest()); - searchRemoveCert(node->cert); - delete node; - gotOne = true; - } - } - - cacheSaveToDisk(); - -return gotOne; -} - - -bool KSSLD::cacheRemoveByCertificate(KSSLCertificate cert) { -KSSLCNode *node; - - for (node = certList.first(); node; node = certList.next()) { - if (cert == *(node->cert)) { - certList.remove(node); - cfg->deleteGroup(node->cert->getMD5Digest()); - searchRemoveCert(node->cert); - delete node; - cacheSaveToDisk(); - return true; - } - } - -return false; -} - - -bool KSSLD::cacheModifyByCN(TQString cn, - KSSLCertificateCache::KSSLCertificatePolicy policy, bool permanent, - TQDateTime expires) { -KSSLCNode *node; - - for (node = certList.first(); node; node = certList.next()) { - if (KSSLX509Map(node->cert->getSubject()).getValue("CN") == cn) { - node->permanent = permanent; - node->expires = expires; - node->policy = policy; - certList.remove(node); - certList.prepend(node); - cacheSaveToDisk(); - return true; - } - } - -return false; -} - - -bool KSSLD::cacheModifyByCertificate(KSSLCertificate cert, - KSSLCertificateCache::KSSLCertificatePolicy policy, - bool permanent, - TQDateTime expires) { -KSSLCNode *node; - - for (node = certList.first(); node; node = certList.next()) { - if (cert == *(node->cert)) { - node->permanent = permanent; - node->expires = expires; - node->policy = policy; - certList.remove(node); - certList.prepend(node); - cacheSaveToDisk(); - return true; - } - } - -return false; -} - - -TQStringList KSSLD::cacheGetHostList(KSSLCertificate cert) { -KSSLCNode *node; - - for (node = certList.first(); node; node = certList.next()) { - if (cert == *(node->cert)) { - if (!node->permanent && node->expires < - TQDateTime::currentDateTime()) { - certList.remove(node); - cfg->deleteGroup(node->cert->getMD5Digest()); - searchRemoveCert(node->cert); - delete node; - cacheSaveToDisk(); - return TQStringList(); - } - - certList.remove(node); - certList.prepend(node); - return node->hosts; - } - } - -return TQStringList(); -} - - -bool KSSLD::cacheAddHost(KSSLCertificate cert, TQString host) { -KSSLCNode *node; - - if (host.isEmpty()) - return true; - - for (node = certList.first(); node; node = certList.next()) { - if (cert == *(node->cert)) { - if (!node->permanent && node->expires < - TQDateTime::currentDateTime()) { - certList.remove(node); - cfg->deleteGroup(node->cert->getMD5Digest()); - searchRemoveCert(node->cert); - delete node; - cacheSaveToDisk(); - return false; - } - - if (!node->hosts.contains(host)) { - node->hosts << host; - } - - certList.remove(node); - certList.prepend(node); - cacheSaveToDisk(); - return true; - } - } - -return false; -} - - -bool KSSLD::cacheRemoveHost(KSSLCertificate cert, TQString host) { -KSSLCNode *node; - - for (node = certList.first(); node; node = certList.next()) { - if (cert == *(node->cert)) { - if (!node->permanent && node->expires < - TQDateTime::currentDateTime()) { - certList.remove(node); - cfg->deleteGroup(node->cert->getMD5Digest()); - searchRemoveCert(node->cert); - delete node; - cacheSaveToDisk(); - return false; - } - node->hosts.remove(host); - certList.remove(node); - certList.prepend(node); - cacheSaveToDisk(); - return true; - } - } - -return false; -} - - - - -/////////////////////////////////////////////////////////////////////////// - -void KSSLD::caVerifyUpdate() { - TQString path = TDEGlobal::dirs()->saveLocation("kssl") + "/ca-bundle.crt"; - if (!TQFile::exists(path)) - return; - - cfg->setGroup(TQString::null); - TQ_UINT32 newStamp = TDEGlobal::dirs()->calcResourceHash("config", "ksslcalist", true); - TQ_UINT32 oldStamp = cfg->readUnsignedNumEntry("ksslcalistStamp"); - if (oldStamp != newStamp) - { - caRegenerate(); - cfg->writeEntry("ksslcalistStamp", newStamp); - cfg->sync(); - } -} - -bool KSSLD::caRegenerate() { -TQString path = TDEGlobal::dirs()->saveLocation("kssl") + "/ca-bundle.crt"; - -TQFile out(path); - - if (!out.open(IO_WriteOnly)) - return false; - -TDEConfig cfg("ksslcalist", true, false); - -TQStringList x = cfg.groupList(); - - for (TQStringList::Iterator i = x.begin(); - i != x.end(); - ++i) { - if ((*i).isEmpty() || *i == "") continue; - - cfg.setGroup(*i); - - if (!cfg.readBoolEntry("site", false)) continue; - - TQString cert = cfg.readEntry("x509", ""); - if (cert.length() <= 0) continue; - - unsigned int xx = cert.length() - 1; - for (unsigned int j = 0; j < xx/64; j++) { - cert.insert(64*(j+1)+j, '\n'); - } - out.writeBlock("-----BEGIN CERTIFICATE-----\n", 28); - out.writeBlock(cert.latin1(), cert.length()); - out.writeBlock("\n-----END CERTIFICATE-----\n\n", 28); - out.flush(); - } - -return true; -} - - - -bool KSSLD::caAdd(TQString certificate, bool ssl, bool email, bool code) { -KSSLCertificate *x = KSSLCertificate::fromString(certificate.local8Bit()); - - if (!x) return false; - -TDEConfig cfg("ksslcalist", false, false); - - cfg.setGroup(x->getSubject()); - cfg.writeEntry("x509", certificate); - cfg.writeEntry("site", ssl); - cfg.writeEntry("email", email); - cfg.writeEntry("code", code); - - cfg.sync(); - delete x; - -return true; -} - - -/** - * @internal - * Returns a list of certificates as QStrings read from the given file - */ -static TQStringList caReadCerticatesFromFile(TQString filename) { - - TQStringList certificates; - TQString certificate, temp; - TQFile file(filename); - - if (!file.open(IO_ReadOnly)) - return certificates; - - while (!file.atEnd()) { - file.readLine(temp, 999); - if (temp.startsWith("-----BEGIN CERTIFICATE-----")) { - certificate = TQString::null; - continue; - } - - if (temp.startsWith("-----END CERTIFICATE-----")) { - certificates.append(certificate); - certificate = TQString::null; - continue; - } - - certificate += temp.stripWhiteSpace(); - } - - file.close(); - - return certificates; -} - -bool KSSLD::caAddFromFile(TQString filename, bool ssl, bool email, bool code) { - - TQStringList certificates; - certificates = caReadCerticatesFromFile(filename); - if (certificates.isEmpty()) - return false; - - bool ok = true; - - for (TQStringList::Iterator it = certificates.begin(); - it != certificates.end(); ++it ) { - ok &= caAdd(*it, ssl, email, code); - } - - return ok; -} - -bool KSSLD::caRemoveFromFile(TQString filename) { - - TQStringList certificates; - certificates = caReadCerticatesFromFile(filename); - if (certificates.isEmpty()) - return false; - - bool ok = true; - - for (TQStringList::Iterator it = certificates.begin(); - it != certificates.end(); ++it ) { - TQString certificate = *it; - KSSLCertificate *x = KSSLCertificate::fromString(certificate.local8Bit()); - ok &= x && caRemove(x->getSubject()); - delete x; - } - - return ok; -} - - -TQStringList KSSLD::caList() { -TQStringList x; -TDEConfig cfg("ksslcalist", true, false); - - x = cfg.groupList(); - x.remove(""); - -return x; -} - - -bool KSSLD::caUseForSSL(TQString subject) { -TDEConfig cfg("ksslcalist", true, false); - - if (!cfg.hasGroup(subject)) - return false; - - cfg.setGroup(subject); -return cfg.readBoolEntry("site", false); -} - - - -bool KSSLD::caUseForEmail(TQString subject) { -TDEConfig cfg("ksslcalist", true, false); - - if (!cfg.hasGroup(subject)) - return false; - - cfg.setGroup(subject); -return cfg.readBoolEntry("email", false); -} - - - -bool KSSLD::caUseForCode(TQString subject) { -TDEConfig cfg("ksslcalist", true, false); - - if (!cfg.hasGroup(subject)) - return false; - - cfg.setGroup(subject); -return cfg.readBoolEntry("code", false); -} - - -bool KSSLD::caRemove(TQString subject) { -TDEConfig cfg("ksslcalist", false, false); - if (!cfg.hasGroup(subject)) - return false; - - cfg.deleteGroup(subject); - cfg.sync(); - -return true; -} - - -TQString KSSLD::caGetCert(TQString subject) { -TDEConfig cfg("ksslcalist", true, false); - if (!cfg.hasGroup(subject)) - return TQString::null; - - cfg.setGroup(subject); - -return cfg.readEntry("x509", TQString::null); -} - - -bool KSSLD::caSetUse(TQString subject, bool ssl, bool email, bool code) { -TDEConfig cfg("ksslcalist", false, false); - if (!cfg.hasGroup(subject)) - return false; - - cfg.setGroup(subject); - - cfg.writeEntry("site", ssl); - cfg.writeEntry("email", email); - cfg.writeEntry("code", code); - cfg.sync(); - -return true; -} - -/////////////////////////////////////////////////////////////////////////// - -void KSSLD::searchAddCert(KSSLCertificate *cert) { - skMD5Digest.insert(cert->getMD5Digest(), cert, true); - - TQStringList mails; - cert->getEmails(mails); - for(TQStringList::const_iterator iter = mails.begin(); iter != mails.end(); ++iter) { - TQString email = static_cast(*iter).lower(); - TQMap >::iterator it = skEmail.find(email); - - if (it == skEmail.end()) - it = skEmail.insert(email, TQPtrVector()); - - TQPtrVector &elem = *it; - - if (elem.findRef(cert) == -1) { - unsigned int n = 0; - for(; n < elem.size(); n++) { - if (!elem.at(n)) { - elem.insert(n, cert); - break; - } - } - if (n == elem.size()) { - elem.resize(n+1); - elem.insert(n, cert); - } - } - } -} - - -void KSSLD::searchRemoveCert(KSSLCertificate *cert) { - skMD5Digest.remove(cert->getMD5Digest()); - - TQStringList mails; - cert->getEmails(mails); - for(TQStringList::const_iterator iter = mails.begin(); iter != mails.end(); ++iter) { - TQMap >::iterator it = skEmail.find(static_cast(*iter).lower()); - - if (it == skEmail.end()) - break; - - TQPtrVector &elem = *it; - - int n = elem.findRef(cert); - if (n != -1) - elem.remove(n); - } -} - - -TQStringList KSSLD::getKDEKeyByEmail(const TQString &email) { - TQStringList rc; - TQMap >::iterator it = skEmail.find(email.lower()); - - kdDebug() << "GETKDEKey " << email.latin1() << endl; - - if (it == skEmail.end()) - return rc; - - TQPtrVector &elem = *it; - for (unsigned int n = 0; n < elem.size(); n++) { - KSSLCertificate *cert = elem.at(n); - if (cert) { - rc.append(cert->getKDEKey()); - } - } - - kdDebug() << "ergebnisse: " << rc.size() << " " << elem.size() << endl; - return rc; -} - - -KSSLCertificate KSSLD::getCertByMD5Digest(const TQString &key) { - TQMap::iterator iter = skMD5Digest.find(key); - - kdDebug() << "Searching cert for " << key.latin1() << endl; - - if (iter != skMD5Digest.end()) - return **iter; - - KSSLCertificate rc; // FIXME: Better way to return a not found condition? - kdDebug() << "Not found: " << rc.toString().latin1() << endl; - return rc; -} - - -/////////////////////////////////////////////////////////////////////////// - -// -// Certificate Home methods -// - -TQStringList KSSLD::getHomeCertificateList() { - return KSSLCertificateHome::getCertificateList(); -} - -bool KSSLD::addHomeCertificateFile(TQString filename, TQString password, bool storePass) { - return KSSLCertificateHome::addCertificate(filename, password, storePass); -} - -bool KSSLD::addHomeCertificatePKCS12(TQString base64cert, TQString passToStore) { - bool ok; - KSSLPKCS12 *pkcs12 = KSSLPKCS12::fromString(base64cert, passToStore); - ok = KSSLCertificateHome::addCertificate(pkcs12, passToStore); - delete pkcs12; - return ok; -} - -bool KSSLD::deleteHomeCertificateByFile(TQString filename, TQString password) { - return KSSLCertificateHome::deleteCertificate(filename, password); -} - -bool KSSLD::deleteHomeCertificateByPKCS12(TQString base64cert, TQString password) { - bool ok; - KSSLPKCS12 *pkcs12 = KSSLPKCS12::fromString(base64cert, password); - ok = KSSLCertificateHome::deleteCertificate(pkcs12); - delete pkcs12; - return ok; -} - -bool KSSLD::deleteHomeCertificateByName(TQString name) { - return KSSLCertificateHome::deleteCertificateByName(name); -} - - - -/////////////////////////////////////////////////////////////////////////// - -#include "kssld.moc" - - -/* - - DESIGN - KSSLCertificateCache - ------ - - This is the first implementation and I think this cache actually needs - experimentation to determine which implementation works best. My current - options are: - - (1) Store copies of the X509 certificates in a TQPtrList using a self - organizing heuristic as described by Munro and Suwanda. - (2) Store copies of the X509 certificates in a tree structure, perhaps - a redblack tree, avl tree, or even just a simple binary tree. - (3) Store the CN's in a tree or list and use them as a hash to retrieve - the X509 certificates. - (4) Create "nodes" containing the X509 certificate and place them in - two structures concurrently, one organized by CN, the other by - X509 serial number. - - This implementation uses (1). (4) is definitely attractive, but I don't - think it will be necessary to go so crazy with performance, and perhaps - end up performing poorly in situations where there are very few entries in - the cache (which is most likely the case most of the time). The style of - heuristic is move-to-front, not swap-forward. This seems to make more - sense because the typical user will hit a site at least a few times in a - row before moving to a new one. - - What I worry about most with respect to performance is that cryptographic - routines are expensive and if we have to perform them on each X509 - certificate until the right one is found, we will perform poorly. - - All in all, this code is actually quite crucial for performance on SSL - website, especially those with many image files loaded via SSL. If a - site loads 15 images, we will have to run through this code 15 times. - A heuristic for self organization will make each successive lookup faster. - Sounds good, doesn't it? - - DO NOT ATTEMPT TO GUESS WHICH CERTIFICATES ARE ACCEPTIBLE IN YOUR CODE!! - ALWAYS USE THE CACHE. IT MAY CHECK THINGS THAT YOU DON'T THINK OF, AND - ALSO IF THERE IS A BUG IN THE CHECKING CODE, IF IT IS ALL CONTAINED IN - THIS LIBRARY, A MINOR FIX WILL FIX ALL APPLICATIONS. - */ - diff --git a/kio/misc/kssld/kssld.desktop b/kio/misc/kssld/kssld.desktop deleted file mode 100644 index 7054f8bad..000000000 --- a/kio/misc/kssld/kssld.desktop +++ /dev/null @@ -1,156 +0,0 @@ -[Desktop Entry] -Type=Service -ServiceTypes=KDEDModule -X-TDE-ModuleType=Library -X-TDE-Library=kssld -X-TDE-FactoryName=kssld -X-TDE-Kded-autoload=false -X-TDE-Kded-load-on-demand=true -Name=KSSL Daemon Module -Name[af]=Kssl Bediener Module -Name[ar]=وحدة مراقب KSSL -Name[az]=KSSL Demon Modulu -Name[be]=Модуль сервіса KSSL -Name[bg]=Демон KSSL -Name[bn]=KSSL ডিমন মডিউল -Name[br]=Mollad an diaoul KSSL -Name[ca]=Mòdul del dimoni KSSL -Name[cs]=Modul démona KSSL -Name[csb]=KSSL -Name[cy]=Modiwl Daemon KSSL -Name[da]=KSSL Dæmonmodul -Name[de]=SSL-Dienst -Name[el]=Άρθρωμα δαίμονα KSSL -Name[eo]=SSL-demono-modulo -Name[es]=Módulo de demonio KSSL -Name[et]=KSSL deemoni moodul -Name[eu]=KSSL daemon modulua -Name[fa]=پیمانۀ شبح KSSL -Name[fi]=KSSL-palvelinmoduuli -Name[fr]=Module démon KSSL -Name[ga]=Modúl Deamhain KSSL -Name[gl]=Módulo do Demo KSSL -Name[he]=מודול תהליך הרקע של SSL -Name[hi]=KSSL ङेमन घटक -Name[hr]=Modul KSSL demona -Name[hu]=KSSL szolgáltatásmodul -Name[id]=Modul Daemon KSSL -Name[is]=KSSL þjónseining -Name[it]=Modulo demone KSSL -Name[ja]=KSSL デーモンモジュール -Name[ka]=KSSL გუშაგის მოდული -Name[kk]=KSSL қызметтің модулі -Name[km]=ម៉ូឌុល Daemon KSSL -Name[ko]=KSSL 데몬 모듈 -Name[lb]=KSSL-Dämonmodul -Name[lt]=KSSL tarnybos modulis -Name[lv]=KSSL Dēmona Modulis -Name[mn]=KSSL Daemon Modul -Name[ms]=Modul Daemon KSSL -Name[mt]=Modulu daemon KSSL -Name[nb]=KSSL nisse-modul -Name[nds]=KSSL-Dämoon -Name[ne]=KSSL डेइमन मोड्युल -Name[nl]=KSSL daemon-module -Name[nn]=KSSL-nissemodul -Name[nso]=Seripa sa Daemon ya KSSL -Name[pa]=KSSL ਡਾਇਮੋਨ ਮੈਡੀਊਲ -Name[pl]=KSSL -Name[pt]=Módulo do Servidor de KSSL -Name[pt_BR]=Módulo do Serviço do KSSL -Name[ro]=Modul demon KSSL -Name[ru]=Служба KSSL -Name[rw]=Igice Dayimoni KSSL -Name[se]=KSSL-bálvámoduvla -Name[sk]=Modul démona KSSL -Name[sl]=Strežniški modul KSSL -Name[sq]=Demoni për Modulin KSSL -Name[sr]=KSSL демон модул -Name[sr@Latn]=KSSL demon modul -Name[sv]=KSSL-demonmodul -Name[ta]=KSSL டெமான் பகுதி -Name[te]=కెఎస్ ఎస్ ఎల్ సూత్రధారి మాడ్యూల్ -Name[tg]=Модули Демон KSSL -Name[th]=โมดูลเดมอน KSSL -Name[tr]=KSSL Program Modülü -Name[tt]=KSSL Xezmäteneñ Modulı -Name[uk]=Модуль демону KSSL -Name[uz]=KSSL xizmatining moduli -Name[uz@cyrillic]=KSSL хизматининг модули -Name[ven]=Modulu wa Daemon wa KSSL -Name[vi]=Mô-đun trình nền KSSL -Name[xh]=Isicatshulwa se KSSL Daemon -Name[zh_CN]=KSSL 守护进程模块 -Name[zh_HK]=KSSL 伺服程式模組 -Name[zh_TW]=KSSL 伺服程式模組 -Name[zu]=Ingxenye ye-daemon ye-KSSL -Comment=KSSL daemon module for KDED -Comment[af]=KSSL bediener module vir KDED -Comment[be]=Модуль сервіса KSSL для KDED -Comment[bg]=Модул демон за KSSL за KDED -Comment[bn]=KDED-র জন্য KSSL ডিমন মডিউল -Comment[br]=Mollad an diaoul KSSL evit KDED -Comment[bs]=KSSL Daemon Module za KDED -Comment[ca]=Mòdul del dimoni KSSL per a KDED -Comment[cs]=Modul démona KSSL pro KDED -Comment[csb]=Ùsłëżnota SSL w KDED -Comment[da]=KSSL Dæmonmodul for KDED -Comment[de]=Unterstützung für SSL-Verschlüsselung in KDED -Comment[el]=Άρθρωμα δαίμονα KSSL για το KDED -Comment[eo]=SSL-demono-modulo por KDED -Comment[es]=Módulo de demonio KSSL para KDED -Comment[et]=KDED KSSL deemoni moodul -Comment[eu]=KSSL daemon modulua KDEDrako -Comment[fa]=پیمانۀ شبح KSSL برای KDED -Comment[fi]=KSSL-palvelinmoduuli KDED:lle -Comment[fr]=Module démon KSSL pour KDED -Comment[fy]=KSSL daemon module foar KDED -Comment[ga]=Modúl deamhain KSSL le haghaidh KDED -Comment[gl]=Módulo do Demo KSSL para KDED -Comment[he]=מודול תהליך רקע של SSL עבור KDED -Comment[hi]=केडीईडी के लिए केएसएसएल डेमन मॉड्यूल -Comment[hr]=KSSL demon modul za KDED -Comment[hu]=KSSL szolgáltatásmodul a KDED-hez -Comment[id]=Modul daemon KSSL untuk KDED -Comment[is]=KSSL þjónseining fyrir KDED -Comment[it]=Modulo demone KSSL per KDED -Comment[ja]=KDED 用 の KSSL デーモンモジュール -Comment[ka]=KSSL გუშაგის მოდული KDED-სთვის -Comment[kk]=KDED KSSL куәліктерді басқару қызметтің модулі -Comment[km]=ម៉ូឌុល daemon KSSL សម្រាប់ KDED -Comment[lb]=KSSL-Dämonmodul fir KDED -Comment[lt]=KSSL tarnybos modulis, skirtas KDED -Comment[lv]=KSSL Dēmona Modulis priekš KDED -Comment[mk]=KSSL даемон модул за KDED -Comment[ms]=Modul Daemon KSSL untuk KDED -Comment[nb]=KSSL nissemodul for KDED -Comment[nds]=KSSL-Dämoonmoduul för KDED -Comment[ne]=KDED का लागि डेइमन मोड्युल KSSL -Comment[nl]=KSSL daemon-module voor KDED -Comment[nn]=KSSL-nissemodul for KDED -Comment[pa]=KDED ਲਈ KSSL ਪੇਸ਼ਕਾਰੀ -Comment[pl]=Obsługa SSL w KDED -Comment[pt]=Módulo servidor de KSSL para o KDED -Comment[pt_BR]=Módulo de serviço KSSL para o KDED -Comment[ro]=Modul demon KSSL pentru KDED -Comment[ru]=Управление сертификатами SSL -Comment[rw]=Igice cya dayimoni KSSL cya KDED -Comment[se]=KDED:a KSSL-bálvámoduvla -Comment[sk]=Modul démona KSSL pre KDED -Comment[sl]=Strežniški modul KSSL za KDED -Comment[sr]=KSSL демон модул за KDED -Comment[sr@Latn]=KSSL demon modul za KDED -Comment[sv]=KSSL-demonmodul för KDED -Comment[ta]=KDEDக்கான KSSL டெமான் பகுதி -Comment[te]=కెడిఈడి కొరకు కెఎస్ ఎస్ ఎల్ సూత్రధారి మాడ్యూల్ -Comment[tg]=Модули Демон KSSL брои KDED -Comment[th]=โมดูลเดมอน KSSL สำหรับ KDED -Comment[tr]=KDED için KSSL program biirmi -Comment[tt]=KDED öçen KSSL xezmät -Comment[uk]=Модуль демону KSSL для KDED -Comment[uz]=KDED uchun KSSL xizmatining moduli -Comment[uz@cyrillic]=KDED учун KSSL хизматининг модули -Comment[vi]=Mô-đun trình nền KSSL cho KDED. -Comment[zh_CN]=KDED 的 KSSL 守护进程模块 -Comment[zh_HK]=KDED 使用的 SSL 伺服程式模組 -Comment[zh_TW]=KDED 使用的 KSSL 伺服程式模組 diff --git a/kio/misc/kssld/kssld.h b/kio/misc/kssld/kssld.h deleted file mode 100644 index 028a30809..000000000 --- a/kio/misc/kssld/kssld.h +++ /dev/null @@ -1,154 +0,0 @@ -/* - This file is part of the KDE libraries - - Copyright (c) 2001-2005 George Staikos - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. - -*/ -#ifndef __KSSLD_H__ -#define __KSSLD_H__ - -#include -#include -#include -#include -#include -#include -#include -#include - - -class KSimpleConfig; -class KSSLCNode; -class KOpenSSLProxy; - -class KSSLD : public KDEDModule -{ - Q_OBJECT - K_DCOP - -public: - - KSSLD(const TQCString &name); - - virtual ~KSSLD(); - -k_dcop: - // - // Certificate Cache methods - // - void cacheAddCertificate(KSSLCertificate cert, - KSSLCertificateCache::KSSLCertificatePolicy policy, - bool permanent = true); - KSSLCertificateCache::KSSLCertificatePolicy cacheGetPolicyByCN(TQString cn); - - KSSLCertificateCache::KSSLCertificatePolicy cacheGetPolicyByCertificate(KSSLCertificate cert); - - bool cacheSeenCN(TQString cn); - bool cacheSeenCertificate(KSSLCertificate cert); - - bool cacheRemoveByCN(TQString cn); - bool cacheRemoveBySubject(TQString subject); - bool cacheRemoveByCertificate(KSSLCertificate cert); - - bool cacheIsPermanent(KSSLCertificate cert); - - void cacheReload(); - - bool cacheModifyByCN(TQString cn, - KSSLCertificateCache::KSSLCertificatePolicy policy, - bool permanent, - TQDateTime expires); - - bool cacheModifyByCertificate(KSSLCertificate cert, - KSSLCertificateCache::KSSLCertificatePolicy policy, - bool permanent, - TQDateTime expires); - - TQStringList cacheGetHostList(KSSLCertificate cert); - - bool cacheAddHost(KSSLCertificate cert, TQString host); - - bool cacheRemoveHost(KSSLCertificate cert, TQString host); - - /* Certificate Authorities */ - void caVerifyUpdate(); - bool caRegenerate(); - - TQStringList caList(); - - bool caUseForSSL(TQString subject); - - bool caUseForEmail(TQString subject); - - bool caUseForCode(TQString subject); - - bool caAdd(TQString certificate, bool ssl, bool email, bool code); - - bool caAddFromFile(TQString filename, bool ssl, bool email, bool code); - - bool caRemove(TQString subject); - - bool caRemoveFromFile(TQString filename); - - TQString caGetCert(TQString subject); - - bool caSetUse(TQString subject, bool ssl, bool email, bool code); - - TQStringList getKDEKeyByEmail(const TQString &email); - - KSSLCertificate getCertByMD5Digest(const TQString &key); - - // - // Certificate Home methods - // - - TQStringList getHomeCertificateList(); - - bool addHomeCertificateFile(TQString filename, TQString password, bool storePass /*=false*/); - - bool addHomeCertificatePKCS12(TQString base64cert, TQString passToStore); - - bool deleteHomeCertificateByFile(TQString filename, TQString password); - - bool deleteHomeCertificateByPKCS12(TQString base64cert, TQString password); - - bool deleteHomeCertificateByName(TQString name); - -private: - - void cacheClearList(); - void cacheSaveToDisk(); - void cacheLoadDefaultPolicies(); - - // for the cache portion: - KSimpleConfig *cfg; - TQPtrList certList; - - // Our pointer to OpenSSL - KOpenSSLProxy *kossl; - - // - void searchAddCert(KSSLCertificate *cert); - void searchRemoveCert(KSSLCertificate *cert); - - TQMap > skEmail; - TQMap skMD5Digest; -}; - - -#endif diff --git a/kio/misc/ktelnetservice.cpp b/kio/misc/ktelnetservice.cpp deleted file mode 100644 index cf1b5694c..000000000 --- a/kio/misc/ktelnetservice.cpp +++ /dev/null @@ -1,112 +0,0 @@ -/* - Copyright (c) 2001 Malte Starostik - based on kmailservice.cpp, - Copyright (c) 2000 Simon Hausmann - - 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; see the file COPYING. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -// $Id$ - -#include -#include -#include -#include -#include -#include -#include - -static const KCmdLineOptions options[] = -{ - {"+url", 0, 0}, - KCmdLineLastOption -}; - -int main(int argc, char **argv) -{ - KLocale::setMainCatalogue("tdelibs"); - TDECmdLineArgs::init(argc, argv, "ktelnetservice", I18N_NOOP("telnet service"), - I18N_NOOP("telnet protocol handler"), "unknown"); - TDECmdLineArgs::addCmdLineOptions(options); - - TDEApplication app; - - TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs(); - - if (args->count() != 1) - return 1; - - TDEConfig *config = new TDEConfig("kdeglobals", true); - config->setGroup("General"); - TQString terminal = config->readPathEntry("TerminalApplication", "konsole"); - - KURL url(args->arg(0)); - TQStringList cmd; - if (terminal == "konsole") - cmd << "--noclose"; - - cmd << "-e"; - if ( url.protocol() == "telnet" ) - cmd << "telnet"; - else if ( url.protocol() == "ssh" ) - cmd << "ssh"; - else if ( url.protocol() == "rlogin" ) - cmd << "rlogin"; - else { - kdError() << "Invalid protocol " << url.protocol() << endl; - return 2; - } - - if (!app.authorize("shell_access")) - { - KMessageBox::sorry(0, - i18n("You do not have permission to access the %1 protocol.").arg(url.protocol())); - return 3; - } - - if (!url.user().isEmpty()) - { - cmd << "-l"; - cmd << url.user(); - } - - TQString host; - if (!url.host().isEmpty()) - host = url.host(); // telnet://host - else if (!url.path().isEmpty()) - host = url.path(); // telnet:host - - if (host.isEmpty() || host.startsWith("-")) - { - kdError() << "Invalid hostname " << host << endl; - return 2; - } - - cmd << host; - - if (url.port()){ - if ( url.protocol() == "ssh" ) - cmd << "-p" << TQString::number(url.port()); - else - cmd << TQString::number(url.port()); - } - - app.tdeinitExec(terminal, cmd); - - return 0; -} - -// vim: ts=4 sw=4 noet diff --git a/kio/misc/mms.protocol b/kio/misc/mms.protocol deleted file mode 100644 index 8fde7c000..000000000 --- a/kio/misc/mms.protocol +++ /dev/null @@ -1,73 +0,0 @@ -[Protocol] -helper=true -exec= -defaultMimetype=uri/mms -protocol=mms -input=none -output=none -reading=false -Icon=www -Class=:internet -Description=Microsoft Media Server Protocol -Description[af]=Microsoft Media Bediener Protokol -Description[be]=Пратакол Microsoft Media Server -Description[bn]=মাইক্রোসফ্‌ট মিডিয়া সার্ভার প্রোটোকল -Description[bs]=Microsoft Media Server protokol -Description[ca]=Protocol Microsoft Media Server -Description[cs]=Microsoft Media Server protokol -Description[csb]=Protokól Microsoft Media Server -Description[da]=Microsoft Medieserver-protokol -Description[de]=Microsoft Media Server Protokoll -Description[el]=Πρωτόκολλο Microsoft Media Server -Description[es]=Protocolo Microsoft Media Server -Description[et]=Microsoft Media Server protokoll -Description[eu]=Microsoft Media Server protokoloa -Description[fa]=قرارداد کارساز رسانۀ میکروسافت -Description[fi]=Microsoft Media -palvelinprotokolla -Description[fr]=Protocole Microsoft Media Server -Description[gl]=Protocolo Microsoft Media Server -Description[he]=שרת פרוטוקול של מדייה של מיקרוספט -Description[hi]=माइक्रोसॉफ़्ट मीडिया सर्वर प्रोटोकॉल -Description[hr]=Protokol Microsoft Media poslužitelja -Description[hu]=MMS protokoll -Description[id]=Protokol Server Microsoft Media -Description[is]=Microsoft Media Server samskiptaregla -Description[it]=Protocollo Microsoft Media Server -Description[ja]=Microsoft メディアサーバプロトコル -Description[ka]=Microsoft Media Server პროტოკოლი -Description[kk]=Microsoft Media Server протоколы -Description[km]=ពិធីការ​ម៉ាស៊ីន​បម្រី Microsoft Media -Description[lb]=Microsoft-Media Server-Protokoll -Description[lt]=Microsoft media serverio protokolas -Description[lv]=Microsoft Media Server protokols -Description[mk]=Microsoft Media Server-протокол -Description[ms]=Protokol Pelayan Media Microsoft -Description[nds]=Microsoft-Medienserverprotokoll -Description[ne]=माइक्रोसफ्ट मिडिया सर्भर प्रोटोकल -Description[nl]=Microsoft Media Server-protocol -Description[nn]=Microsoft Media Server-protokoll -Description[pa]=Microsoft Media ਸਰਵਰ ਪ੍ਰੋਟੋਕਾਲ -Description[pl]=Protokół Microsoft Media Server -Description[pt]=Protocolo Microsoft Media Server -Description[pt_BR]=Protocolo do Microsoft Media Server -Description[ro]=Protocol Microsoft Media Server -Description[ru]=Протокол Microsoft Media Server -Description[rw]=Porotokole Igihuza Seriveri ya Microsoft -Description[se]=Microsoft Media Server-protokolla -Description[sk]=Protokol pre Microsoft Media Server -Description[sl]=Protokol Microsoft Media Server -Description[sr]=Microsoft Media Server протокол -Description[sr@Latn]=Microsoft Media Server protokol -Description[sv]=Microsoft mediaserver-protokoll -Description[ta]=மைக்ரோசாப்ட் ஊடக சேவக நெறிமுறை -Description[te]=మైక్రొసాఫ్ట్ మీడియా సెర్వర్ ప్రొటొకాల్ -Description[tg]=Протоколи медиа сервер барои Microsoft -Description[th]=โปรโตคอลสำหรับเซิรฟเวอร์จัดการสื่อของไมโครซอฟต์ (MMS) -Description[tr]=Microsoft Media Server Protokolü -Description[tt]=Microsoft Media Server Protokolı -Description[uk]=Протокол медіа сервера Microsoft -Description[vi]=Giao thức trình phục vụ phương tiện Microsoft™. -Description[zh_CN]=Microsoft 媒体服务器协议 -Description[zh_HK]=Microsoft Media Server 協定 -Description[zh_TW]=Microsoft Media Server 協定 -URIMode=url diff --git a/kio/misc/mmst.protocol b/kio/misc/mmst.protocol deleted file mode 100644 index 1f0f7636b..000000000 --- a/kio/misc/mmst.protocol +++ /dev/null @@ -1,15 +0,0 @@ -[Protocol] -defaultMimetype=uri/mmst -exec= -protocol=mmst -input=none -output=none -helper=true -listing= -reading=false -writing=false -makedir=false -deleting=false -Icon=www -Class=:internet -URIMode=url diff --git a/kio/misc/mmsu.protocol b/kio/misc/mmsu.protocol deleted file mode 100644 index deda935fc..000000000 --- a/kio/misc/mmsu.protocol +++ /dev/null @@ -1,15 +0,0 @@ -[Protocol] -defaultMimetype=uri/mmsu -exec= -protocol=mmsu -input=none -output=none -helper=true -listing= -reading=false -writing=false -makedir=false -deleting=false -Icon=www -Class=:internet -URIMode=url diff --git a/kio/misc/pnm.protocol b/kio/misc/pnm.protocol deleted file mode 100644 index 3ca3a7d23..000000000 --- a/kio/misc/pnm.protocol +++ /dev/null @@ -1,15 +0,0 @@ -[Protocol] -defaultMimetype=uri/pnm -exec= -protocol=pnm -input=none -output=none -helper=true -listing= -reading=false -writing=false -makedir=false -deleting=false -Icon=www -Class=:internet -URIMode=url diff --git a/kio/misc/rlogin.protocol b/kio/misc/rlogin.protocol deleted file mode 100644 index 0757e88ab..000000000 --- a/kio/misc/rlogin.protocol +++ /dev/null @@ -1,13 +0,0 @@ -[Protocol] -exec=ktelnetservice %u -protocol=rlogin -input=none -output=none -helper=true -listing= -reading=false -writing=false -makedir=false -deleting=false -DocPath=kioslave/rlogin.html -Icon=konsole diff --git a/kio/misc/rtsp.protocol b/kio/misc/rtsp.protocol deleted file mode 100644 index 301312260..000000000 --- a/kio/misc/rtsp.protocol +++ /dev/null @@ -1,15 +0,0 @@ -[Protocol] -defaultMimetype=audio/x-pn-realaudio -exec= -protocol=rtsp -input=none -output=none -helper=true -listing= -reading=false -writing=false -makedir=false -deleting=false -Icon=www -Class=:internet -URIMode=url diff --git a/kio/misc/rtspt.protocol b/kio/misc/rtspt.protocol deleted file mode 100644 index 9e4fe9626..000000000 --- a/kio/misc/rtspt.protocol +++ /dev/null @@ -1,15 +0,0 @@ -[Protocol] -defaultMimetype=uri/rtspt -exec= -protocol=rtspt -input=none -output=none -helper=true -listing= -reading=false -writing=false -makedir=false -deleting=false -Icon=www -Class=:internet -URIMode=url diff --git a/kio/misc/rtspu.protocol b/kio/misc/rtspu.protocol deleted file mode 100644 index 9cc9299f6..000000000 --- a/kio/misc/rtspu.protocol +++ /dev/null @@ -1,15 +0,0 @@ -[Protocol] -defaultMimetype=uri/rtspu -exec= -protocol=rtspu -input=none -output=none -helper=true -listing= -reading=false -writing=false -makedir=false -deleting=false -Icon=www -Class=:internet -URIMode=url diff --git a/kio/misc/ssh.protocol b/kio/misc/ssh.protocol deleted file mode 100644 index f31a6f4a2..000000000 --- a/kio/misc/ssh.protocol +++ /dev/null @@ -1,13 +0,0 @@ -[Protocol] -exec=ktelnetservice %u -protocol=ssh -input=none -output=none -helper=true -listing=false -reading=false -writing=false -makedir=false -deleting=false -Icon=konsole - diff --git a/kio/misc/tdentlm/CMakeLists.txt b/kio/misc/tdentlm/CMakeLists.txt deleted file mode 100644 index a846d1dcc..000000000 --- a/kio/misc/tdentlm/CMakeLists.txt +++ /dev/null @@ -1,43 +0,0 @@ -################################################# -# -# (C) 2010 Serghei Amelian -# serghei (DOT) amelian (AT) gmail.com -# -# Improvements and feedback are welcome -# -# This file is released under GPL >= 2 -# -################################################# - -include_directories( - ${TQT_INCLUDE_DIRS} - ${CMAKE_BINARY_DIR} - ${CMAKE_BINARY_DIR}/tdecore - ${CMAKE_CURRENT_SOURCE_DIR} - ${CMAKE_SOURCE_DIR}/tdecore -) - -link_directories( - ${TQT_LIBRARY_DIRS} -) - - -##### headers ################################### - -install(FILES tdentlm.h DESTINATION ${INCLUDE_INSTALL_DIR}/kio ) - - -##### tdentlm ################################### - -set( target tdentlm ) - -set( ${target}_SRCS - tdentlm.cpp des.cpp -) - -tde_add_library( ${target} SHARED - SOURCES ${${target}_SRCS} - VERSION 0.0.0 - LINK tdecore-shared - DESTINATION ${LIB_INSTALL_DIR} -) diff --git a/kio/misc/tdentlm/Makefile.am b/kio/misc/tdentlm/Makefile.am deleted file mode 100644 index 689d0921d..000000000 --- a/kio/misc/tdentlm/Makefile.am +++ /dev/null @@ -1,12 +0,0 @@ -INCLUDES=$(all_includes) - -lib_LTLIBRARIES = libtdentlm.la -METASOURCES = AUTO - -tdentlmincludedir = $(includedir)/kio -tdentlminclude_HEADERS = tdentlm.h - -libtdentlm_la_SOURCES = tdentlm.cpp des.cpp -libtdentlm_la_LDFLAGS = $(all_libraries) -version-info 0:0:0 -no-undefined -libtdentlm_la_LIBADD = $(LIB_TDECORE) $(LIB_QT) - diff --git a/kio/misc/tdentlm/des.cpp b/kio/misc/tdentlm/des.cpp deleted file mode 100644 index bb4fab88b..000000000 --- a/kio/misc/tdentlm/des.cpp +++ /dev/null @@ -1,513 +0,0 @@ - -/* Sofware DES functions - * written 12 Dec 1986 by Phil Karn, KA9Q; large sections adapted from - * the 1977 public-domain program by Jim Gillogly - * Modified for additional speed - 6 December 1988 Phil Karn - * Modified for parameterized key schedules - Jan 1991 Phil Karn - * Callers now allocate a key schedule as follows: - * kn = (char (*)[8])malloc(sizeof(char) * 8 * 16); - * or - * char kn[16][8]; - */ - -/* modified in order to use the libmcrypt API by Nikos Mavroyanopoulos - * All modifications are placed under the license of libmcrypt. - */ - -/* $Id$ */ - -#include -#include -#include "des.h" - -static void permute_ip (unsigned char *inblock, DES_KEY * key, unsigned char *outblock); -static void permute_fp (unsigned char *inblock, DES_KEY * key, unsigned char *outblock); -static void perminit_ip (DES_KEY * key); -static void spinit (DES_KEY * key); -static void perminit_fp (DES_KEY * key); -static TQ_UINT32 f (DES_KEY * key, TQ_UINT32 r, char *subkey); - - -/* Tables defined in the Data Encryption Standard documents */ - -/* initial permutation IP */ -static const char ip[] = { - 58, 50, 42, 34, 26, 18, 10, 2, - 60, 52, 44, 36, 28, 20, 12, 4, - 62, 54, 46, 38, 30, 22, 14, 6, - 64, 56, 48, 40, 32, 24, 16, 8, - 57, 49, 41, 33, 25, 17, 9, 1, - 59, 51, 43, 35, 27, 19, 11, 3, - 61, 53, 45, 37, 29, 21, 13, 5, - 63, 55, 47, 39, 31, 23, 15, 7 -}; - -/* final permutation IP^-1 */ -static const char fp[] = { - 40, 8, 48, 16, 56, 24, 64, 32, - 39, 7, 47, 15, 55, 23, 63, 31, - 38, 6, 46, 14, 54, 22, 62, 30, - 37, 5, 45, 13, 53, 21, 61, 29, - 36, 4, 44, 12, 52, 20, 60, 28, - 35, 3, 43, 11, 51, 19, 59, 27, - 34, 2, 42, 10, 50, 18, 58, 26, - 33, 1, 41, 9, 49, 17, 57, 25 -}; - -/* expansion operation matrix - * This is for reference only; it is unused in the code - * as the f() function performs it implicitly for speed - */ -#ifdef notdef -static const char ei[] = { - 32, 1, 2, 3, 4, 5, - 4, 5, 6, 7, 8, 9, - 8, 9, 10, 11, 12, 13, - 12, 13, 14, 15, 16, 17, - 16, 17, 18, 19, 20, 21, - 20, 21, 22, 23, 24, 25, - 24, 25, 26, 27, 28, 29, - 28, 29, 30, 31, 32, 1 -}; -#endif - -/* permuted choice table (key) */ -static const char pc1[] = { - 57, 49, 41, 33, 25, 17, 9, - 1, 58, 50, 42, 34, 26, 18, - 10, 2, 59, 51, 43, 35, 27, - 19, 11, 3, 60, 52, 44, 36, - - 63, 55, 47, 39, 31, 23, 15, - 7, 62, 54, 46, 38, 30, 22, - 14, 6, 61, 53, 45, 37, 29, - 21, 13, 5, 28, 20, 12, 4 -}; - -/* number left rotations of pc1 */ -static const char totrot[] = { - 1, 2, 4, 6, 8, 10, 12, 14, 15, 17, 19, 21, 23, 25, 27, 28 -}; - -/* permuted choice key (table) */ -static const char pc2[] = { - 14, 17, 11, 24, 1, 5, - 3, 28, 15, 6, 21, 10, - 23, 19, 12, 4, 26, 8, - 16, 7, 27, 20, 13, 2, - 41, 52, 31, 37, 47, 55, - 30, 40, 51, 45, 33, 48, - 44, 49, 39, 56, 34, 53, - 46, 42, 50, 36, 29, 32 -}; - -/* The (in)famous S-boxes */ -static const char si[8][64] = { - /* S1 */ - {14, 4, 13, 1, 2, 15, 11, 8, 3, 10, 6, 12, 5, 9, 0, 7, - 0, 15, 7, 4, 14, 2, 13, 1, 10, 6, 12, 11, 9, 5, 3, 8, - 4, 1, 14, 8, 13, 6, 2, 11, 15, 12, 9, 7, 3, 10, 5, 0, - 15, 12, 8, 2, 4, 9, 1, 7, 5, 11, 3, 14, 10, 0, 6, 13}, - - /* S2 */ - {15, 1, 8, 14, 6, 11, 3, 4, 9, 7, 2, 13, 12, 0, 5, 10, - 3, 13, 4, 7, 15, 2, 8, 14, 12, 0, 1, 10, 6, 9, 11, 5, - 0, 14, 7, 11, 10, 4, 13, 1, 5, 8, 12, 6, 9, 3, 2, 15, - 13, 8, 10, 1, 3, 15, 4, 2, 11, 6, 7, 12, 0, 5, 14, 9}, - - /* S3 */ - {10, 0, 9, 14, 6, 3, 15, 5, 1, 13, 12, 7, 11, 4, 2, 8, - 13, 7, 0, 9, 3, 4, 6, 10, 2, 8, 5, 14, 12, 11, 15, 1, - 13, 6, 4, 9, 8, 15, 3, 0, 11, 1, 2, 12, 5, 10, 14, 7, - 1, 10, 13, 0, 6, 9, 8, 7, 4, 15, 14, 3, 11, 5, 2, 12}, - - /* S4 */ - {7, 13, 14, 3, 0, 6, 9, 10, 1, 2, 8, 5, 11, 12, 4, 15, - 13, 8, 11, 5, 6, 15, 0, 3, 4, 7, 2, 12, 1, 10, 14, 9, - 10, 6, 9, 0, 12, 11, 7, 13, 15, 1, 3, 14, 5, 2, 8, 4, - 3, 15, 0, 6, 10, 1, 13, 8, 9, 4, 5, 11, 12, 7, 2, 14}, - - /* S5 */ - {2, 12, 4, 1, 7, 10, 11, 6, 8, 5, 3, 15, 13, 0, 14, 9, - 14, 11, 2, 12, 4, 7, 13, 1, 5, 0, 15, 10, 3, 9, 8, 6, - 4, 2, 1, 11, 10, 13, 7, 8, 15, 9, 12, 5, 6, 3, 0, 14, - 11, 8, 12, 7, 1, 14, 2, 13, 6, 15, 0, 9, 10, 4, 5, 3}, - - /* S6 */ - {12, 1, 10, 15, 9, 2, 6, 8, 0, 13, 3, 4, 14, 7, 5, 11, - 10, 15, 4, 2, 7, 12, 9, 5, 6, 1, 13, 14, 0, 11, 3, 8, - 9, 14, 15, 5, 2, 8, 12, 3, 7, 0, 4, 10, 1, 13, 11, 6, - 4, 3, 2, 12, 9, 5, 15, 10, 11, 14, 1, 7, 6, 0, 8, 13}, - - /* S7 */ - {4, 11, 2, 14, 15, 0, 8, 13, 3, 12, 9, 7, 5, 10, 6, 1, - 13, 0, 11, 7, 4, 9, 1, 10, 14, 3, 5, 12, 2, 15, 8, 6, - 1, 4, 11, 13, 12, 3, 7, 14, 10, 15, 6, 8, 0, 5, 9, 2, - 6, 11, 13, 8, 1, 4, 10, 7, 9, 5, 0, 15, 14, 2, 3, 12}, - - /* S8 */ - {13, 2, 8, 4, 6, 15, 11, 1, 10, 9, 3, 14, 5, 0, 12, 7, - 1, 15, 13, 8, 10, 3, 7, 4, 12, 5, 6, 11, 0, 14, 9, 2, - 7, 11, 4, 1, 9, 12, 14, 2, 0, 6, 10, 13, 15, 3, 5, 8, - 2, 1, 14, 7, 4, 10, 8, 13, 15, 12, 9, 0, 3, 5, 6, 11}, - -}; - -/* 32-bit permutation function P used on the output of the S-boxes */ -static const char p32i[] = { - 16, 7, 20, 21, - 29, 12, 28, 17, - 1, 15, 23, 26, - 5, 18, 31, 10, - 2, 8, 24, 14, - 32, 27, 3, 9, - 19, 13, 30, 6, - 22, 11, 4, 25 -}; - -/* End of DES-defined tables */ - -/* Lookup tables initialized once only at startup by desinit() */ - -/* bit 0 is left-most in byte */ -static const int bytebit[] = { - 0200, 0100, 040, 020, 010, 04, 02, 01 -}; - -static const int nibblebit[] = { - 010, 04, 02, 01 -}; - -/* Allocate space and initialize DES lookup arrays - * mode == 0: standard Data Encryption Algorithm - */ -static int -desinit (DES_KEY * key) -{ - - spinit (key); - perminit_ip (key); - perminit_fp (key); - - return 0; -} - - -/* Set key (initialize key schedule array) */ -int -ntlm_des_set_key (DES_KEY * dkey, char *user_key, int /*len*/) -{ - char pc1m[56]; /* place to modify pc1 into */ - char pcr[56]; /* place to rotate pc1 into */ - int i, j, l; - int m; - - memset(dkey, 0, sizeof (DES_KEY)); - desinit (dkey); - - /* Clear key schedule */ - - - for (j = 0; j < 56; j++) - { /* convert pc1 to bits of key */ - l = pc1[j] - 1; /* integer bit location */ - m = l & 07; /* find bit */ - pc1m[j] = (user_key[l >> 3] & /* find which key byte l is in */ - bytebit[m]) /* and which bit of that byte */ - ? 1 : 0; /* and store 1-bit result */ - - } - for (i = 0; i < 16; i++) - { /* key chunk for each iteration */ - for (j = 0; j < 56; j++) /* rotate pc1 the right amount */ - pcr[j] = pc1m[(l = j + totrot[i]) < (j < 28 ? 28 : 56) ? l : l - 28]; - /* rotate left and right halves independently */ - for (j = 0; j < 48; j++) - { /* select bits individually */ - /* check bit that goes to kn[j] */ - if (pcr[pc2[j] - 1]) - { - /* mask it in if it's there */ - l = j % 6; - dkey->kn[i][j / 6] |= bytebit[l] >> 2; - } - } - } - return 0; -} - -/* In-place encryption of 64-bit block */ -static void -ntlm_des_encrypt (DES_KEY * key, unsigned char *block) -{ - TQ_UINT32 left, right; - char *knp; - TQ_UINT32 work[2]; /* Working data storage */ - - permute_ip (block, key, (unsigned char *) work); /* Initial Permutation */ - left = KFromToBigEndian(work[0]); - right = KFromToBigEndian(work[1]); - - /* Do the 16 rounds. - * The rounds are numbered from 0 to 15. On even rounds - * the right half is fed to f() and the result exclusive-ORs - * the left half; on odd rounds the reverse is done. - */ - knp = &key->kn[0][0]; - left ^= f (key, right, knp); - knp += 8; - right ^= f (key, left, knp); - knp += 8; - left ^= f (key, right, knp); - knp += 8; - right ^= f (key, left, knp); - knp += 8; - left ^= f (key, right, knp); - knp += 8; - right ^= f (key, left, knp); - knp += 8; - left ^= f (key, right, knp); - knp += 8; - right ^= f (key, left, knp); - knp += 8; - left ^= f (key, right, knp); - knp += 8; - right ^= f (key, left, knp); - knp += 8; - left ^= f (key, right, knp); - knp += 8; - right ^= f (key, left, knp); - knp += 8; - left ^= f (key, right, knp); - knp += 8; - right ^= f (key, left, knp); - knp += 8; - left ^= f (key, right, knp); - knp += 8; - right ^= f (key, left, knp); - - /* Left/right half swap, plus byte swap if little-endian */ - work[1] = KFromToBigEndian( left ); - work[0] = KFromToBigEndian( right ); - - permute_fp ((unsigned char *) work, key, block); /* Inverse initial permutation */ -} - -/* Permute inblock with perm */ -static void -permute_ip (unsigned char *inblock, DES_KEY * key, unsigned char *outblock) -{ - unsigned char *ib, *ob; /* ptr to input or output block */ - char *p, *q; - int j; - - /* Clear output block */ - memset(outblock, 0, 8); - - ib = inblock; - for (j = 0; j < 16; j += 2, ib++) - { /* for each input nibble */ - ob = outblock; - p = key->iperm[j][(*ib >> 4) & 0xf]; - q = key->iperm[j + 1][*ib & 0xf]; - /* and each output byte, OR the masks together */ - *ob++ |= *p++ | *q++; - *ob++ |= *p++ | *q++; - *ob++ |= *p++ | *q++; - *ob++ |= *p++ | *q++; - *ob++ |= *p++ | *q++; - *ob++ |= *p++ | *q++; - *ob++ |= *p++ | *q++; - *ob++ |= *p++ | *q++; - } -} - -/* Permute inblock with perm */ -static void -permute_fp (unsigned char *inblock, DES_KEY * key, unsigned char *outblock) -{ - unsigned char *ib, *ob; /* ptr to input or output block */ - char *p, *q; - int j; - - /* Clear output block */ - memset(outblock, 0, 8); - - ib = inblock; - for (j = 0; j < 16; j += 2, ib++) - { /* for each input nibble */ - ob = outblock; - p = key->fperm[j][(*ib >> 4) & 0xf]; - q = key->fperm[j + 1][*ib & 0xf]; - /* and each output byte, OR the masks together */ - *ob++ |= *p++ | *q++; - *ob++ |= *p++ | *q++; - *ob++ |= *p++ | *q++; - *ob++ |= *p++ | *q++; - *ob++ |= *p++ | *q++; - *ob++ |= *p++ | *q++; - *ob++ |= *p++ | *q++; - *ob++ |= *p++ | *q++; - } -} - -/* The nonlinear function f(r,k), the heart of DES */ -static TQ_UINT32 -f (DES_KEY * key, TQ_UINT32 r, char *subkey) -{ - TQ_UINT32 *spp; - TQ_UINT32 rval, rt; - int er; - -#ifdef TRACE - printf ("f(%08lx, %02x %02x %02x %02x %02x %02x %02x %02x) = ", - r, - subkey[0], subkey[1], subkey[2], - subkey[3], subkey[4], subkey[5], subkey[6], subkey[7]); -#endif - /* Run E(R) ^ K through the combined S & P boxes. - * This code takes advantage of a convenient regularity in - * E, namely that each group of 6 bits in E(R) feeding - * a single S-box is a contiguous segment of R. - */ - subkey += 7; - - /* Compute E(R) for each block of 6 bits, and run thru boxes */ - er = ((int) r << 1) | ((r & 0x80000000) ? 1 : 0); - spp = &key->sp[7][0]; - rval = spp[(er ^ *subkey--) & 0x3f]; - spp -= 64; - rt = (TQ_UINT32) r >> 3; - rval |= spp[((int) rt ^ *subkey--) & 0x3f]; - spp -= 64; - rt >>= 4; - rval |= spp[((int) rt ^ *subkey--) & 0x3f]; - spp -= 64; - rt >>= 4; - rval |= spp[((int) rt ^ *subkey--) & 0x3f]; - spp -= 64; - rt >>= 4; - rval |= spp[((int) rt ^ *subkey--) & 0x3f]; - spp -= 64; - rt >>= 4; - rval |= spp[((int) rt ^ *subkey--) & 0x3f]; - spp -= 64; - rt >>= 4; - rval |= spp[((int) rt ^ *subkey--) & 0x3f]; - spp -= 64; - rt >>= 4; - rt |= (r & 1) << 5; - rval |= spp[((int) rt ^ *subkey) & 0x3f]; -#ifdef TRACE - printf (" %08lx\n", rval); -#endif - return rval; -} - -/* initialize a perm array */ -static void -perminit_ip (DES_KEY * key) -{ - int l, j, k; - int i, m; - - /* Clear the permutation array */ - memset(key->iperm, 0, 16 * 16 * 8); - - for (i = 0; i < 16; i++) /* each input nibble position */ - for (j = 0; j < 16; j++) /* each possible input nibble */ - for (k = 0; k < 64; k++) - { /* each output bit position */ - l = ip[k] - 1; /* where does this bit come from */ - if ((l >> 2) != i) /* does it come from input posn? */ - continue; /* if not, bit k is 0 */ - if (!(j & nibblebit[l & 3])) - continue; /* any such bit in input? */ - m = k & 07; /* which bit is this in the byte */ - key->iperm[i][j][k >> 3] |= bytebit[m]; - } -} - -static void -perminit_fp (DES_KEY * key) -{ - int l, j, k; - int i, m; - - /* Clear the permutation array */ - memset(key->fperm, 0, 16 * 16 * 8); - - for (i = 0; i < 16; i++) /* each input nibble position */ - for (j = 0; j < 16; j++) /* each possible input nibble */ - for (k = 0; k < 64; k++) - { /* each output bit position */ - l = fp[k] - 1; /* where does this bit come from */ - if ((l >> 2) != i) /* does it come from input posn? */ - continue; /* if not, bit k is 0 */ - if (!(j & nibblebit[l & 3])) - continue; /* any such bit in input? */ - m = k & 07; /* which bit is this in the byte */ - key->fperm[i][j][k >> 3] |= bytebit[m]; - } -} - -/* Initialize the lookup table for the combined S and P boxes */ -static void -spinit (DES_KEY * key) -{ - char pbox[32]; - int p, i, s, j, rowcol; - TQ_UINT32 val; - - /* Compute pbox, the inverse of p32i. - * This is easier to work with - */ - for (p = 0; p < 32; p++) - { - for (i = 0; i < 32; i++) - { - if (p32i[i] - 1 == p) - { - pbox[p] = i; - break; - } - } - } - for (s = 0; s < 8; s++) - { /* For each S-box */ - for (i = 0; i < 64; i++) - { /* For each possible input */ - val = 0; - /* The row number is formed from the first and last - * bits; the column number is from the middle 4 - */ - rowcol = (i & 32) | ((i & 1) ? 16 : 0) | ((i >> 1) & 0xf); - for (j = 0; j < 4; j++) - { /* For each output bit */ - if (si[s][rowcol] & (8 >> j)) - { - val |= 1L << (31 - pbox[4 * s + j]); - } - } - key->sp[s][i] = val; - } - } -} - -int -ntlm_des_ecb_encrypt (const void *plaintext, int len, DES_KEY * akey, - unsigned char output[8]) -{ - int j; - const unsigned char *plain = (const unsigned char *) plaintext; - - for (j = 0; j < len / 8; j++) - { - memcpy (&output[j * 8], &plain[j * 8], 8); - ntlm_des_encrypt (akey, &output[j * 8]); - } - - if (j == 0 && len != 0) - return -1; /* no blocks were encrypted */ - return 0; -} diff --git a/kio/misc/tdentlm/des.h b/kio/misc/tdentlm/des.h deleted file mode 100644 index 0f6f59dc9..000000000 --- a/kio/misc/tdentlm/des.h +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef KNTLM_DES_H -#define KNTLM_DES_H - -#include - -typedef struct des_key -{ - char kn[16][8]; - TQ_UINT32 sp[8][64]; - char iperm[16][16][8]; - char fperm[16][16][8]; -} DES_KEY; - -int -ntlm_des_ecb_encrypt (const void *plaintext, int len, DES_KEY * akey, unsigned char output[8]); -int -ntlm_des_set_key (DES_KEY * dkey, char *user_key, int len); - -#endif /* KNTLM_DES_H */ diff --git a/kio/misc/tdentlm/kswap.h b/kio/misc/tdentlm/kswap.h deleted file mode 100644 index 9eca243de..000000000 --- a/kio/misc/tdentlm/kswap.h +++ /dev/null @@ -1,428 +0,0 @@ -/* - This file is part of the KDE libraries. - Copyright (c) 2004 Szombathelyi Gyrgy - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License version 2 as published by the Free Software Foundation. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef KSWAP_H -#define KSWAP_H - -#ifdef HAVE_CONFIG_H -#include -#endif - -#include - -/** - * \defgroup KSWAP Byte-swapping functions - * kswap.h contains functions that will help converting - * 16, 32 and 64 bit length data between little-endian and - * big-endian representations. - * - * The KSWAP_16, KSWAP_32 and KSWAP_64 functions are always - * swaps the byte order of the supplied argument (which should be - * 16, 32 or 64 bit wide). These functions are inline, and tries to - * use the most optimized function of the underlying system - * (bswap_xx functions from byteswap.h in GLIBC, or ntohs and ntohl - * on little-endian machines, and if neither are applicable, some fast - * custom code). - * - * The KFromTo{Little|Big}Endian functions are for converting big-endian and - * little-endian data to and from the machine endianness. - */ - -#ifdef HAVE_BYTESWAP_H -#include - - inline TQ_UINT16 KSWAP_16( TQ_UINT16 b ) { return bswap_16( b ); } - inline TQ_INT16 KSWAP_16( TQ_INT16 b ) { return bswap_16( (TQ_UINT16)b ); } - inline TQ_UINT32 KSWAP_32( TQ_UINT32 b ) { return bswap_32( b ); } - inline TQ_INT32 KSWAP_32( TQ_INT32 b ) { return bswap_32( (TQ_UINT32)b ); } - inline TQ_UINT64 KSWAP_64( TQ_UINT64 b ) { return bswap_64( b ); } - inline TQ_INT64 KSWAP_64( TQ_INT64 b ) { return bswap_64( (TQ_UINT64)b ); } - -#else /* HAVE_BYTESWAP_H */ -#ifdef WORDS_BIGENDIAN - inline TQ_UINT16 KSWAP_16( TQ_UINT16 b ) - { - return (((b) & 0x00ff) << 8 | ((b) & 0xff00) >> 8); - } - - inline TQ_INT16 KSWAP_16( TQ_INT16 b ) - { - return ((((TQ_UINT16)b) & 0x00ff) << 8 | (((TQ_UINT16)b) & 0xff00) >> 8); - } - - inline TQ_UINT32 KSWAP_32( TQ_UINT32 b ) - { - return - ((((b) & 0xff000000) >> 24) | (((b) & 0x00ff0000) >> 8) | \ - (((b) & 0x0000ff00) << 8) | (((b) & 0x000000ff) << 24)); - } - - inline TQ_INT32 KSWAP_32( TQ_INT32 b ) - { - return - (((((TQ_UINT32)b) & 0xff000000) >> 24) | ((((TQ_UINT32)b) & 0x00ff0000) >> 8) | \ - ((((TQ_UINT32)b) & 0x0000ff00) << 8) | ((((TQ_UINT32)b) & 0x000000ff) << 24)); - } -#else /* WORDS_BIGENDIAN */ -#include -#include - - inline TQ_UINT16 KSWAP_16( TQ_UINT16 b ) { return htons(b); } - inline TQ_INT16 KSWAP_16( TQ_INT16 b ) { return htons((TQ_UINT16)b); } - inline TQ_UINT32 KSWAP_32( TQ_UINT32 b ) { return htonl(b); } - inline TQ_INT32 KSWAP_32( TQ_INT32 b ) { return htonl((TQ_UINT32)b); } -#endif - inline TQ_UINT64 KSWAP_64( TQ_UINT64 b ) - { - union { - TQ_UINT64 ll; - TQ_UINT32 l[2]; - } w, r; - w.ll = b; - r.l[0] = KSWAP_32( w.l[1] ); - r.l[1] = KSWAP_32( w.l[0] ); - return r.ll; - } - - inline TQ_INT64 KSWAP_64( TQ_INT64 b ) - { - union { - TQ_UINT64 ll; - TQ_UINT32 l[2]; - } w, r; - w.ll = (TQ_UINT64) b; - r.l[0] = KSWAP_32( w.l[1] ); - r.l[1] = KSWAP_32( w.l[0] ); - return r.ll; - } -#endif /* !HAVE_BYTESWAP_H */ - -/** - * \ingroup KSWAP - * Converts a 16 bit unsigned value from/to big-endian byte order to/from the machine order. - */ -inline TQ_UINT16 KFromToBigEndian( TQ_UINT16 b ) -{ -#ifdef WORDS_BIGENDIAN - return b; -#else - return KSWAP_16(b); -#endif -} - -/** - * \ingroup KSWAP - * Converts a 16 bit unsigned array from/to big-endian byte order to/from the machine order. - */ -inline void KFromToBigEndian( TQ_UINT16 *out, TQ_UINT16 *in, uint len ) -{ -#ifdef WORDS_BIGENDIAN - if ( out != in ) memcpy( out, in, len<<1 ) ; -#else - while ( len>0 ) { *out = KSWAP_16( *in ); out++; in++; len--; } -#endif -} - -/** - * \ingroup KSWAP - * Converts a 32 bit unsigned value from/to big-endian byte order to/from the machine order. - */ -inline TQ_UINT32 KFromToBigEndian( TQ_UINT32 b ) -{ -#ifdef WORDS_BIGENDIAN - return b; -#else - return KSWAP_32(b); -#endif -} - -/** - * \ingroup KSWAP - * Converts a 32 bit unsigned array from/to big-endian byte order to/from the machine order. - */ -inline void KFromToBigEndian( TQ_UINT32 *out, TQ_UINT32 *in, uint len ) -{ -#ifdef WORDS_BIGENDIAN - if ( out != in ) memcpy( out, in, len<<2 ) ; -#else - while ( len>0 ) { *out = KSWAP_32( *in ); out++; in++; len--; } -#endif -} - -/** - * \ingroup KSWAP - * Converts a 64 bit unsigned value from/to big-endian byte order to/from the machine order. - */ -inline TQ_UINT64 KFromToBigEndian( TQ_UINT64 b ) -{ -#ifdef WORDS_BIGENDIAN - return b; -#else - return KSWAP_64(b); -#endif -} - -/** - * \ingroup KSWAP - * Converts a 64 bit unsigned array from/to big-endian byte order to/from the machine order. - */ -inline void KFromToBigEndian( TQ_UINT64 *out, TQ_UINT64 *in, uint len ) -{ -#ifdef WORDS_BIGENDIAN - if ( out != in ) memcpy( out, in, len<<3 ) ; -#else - while ( len>0 ) { *out = KSWAP_64( *in ); out++; in++; len--; } -#endif -} - -/** - * \ingroup KSWAP - * Converts a 16 bit signed value from/to big-endian byte order to/from the machine order. - */ -inline TQ_INT16 KFromToBigEndian( TQ_INT16 b ) -{ -#ifdef WORDS_BIGENDIAN - return b; -#else - return KSWAP_16(b); -#endif -} - -/** - * \ingroup KSWAP - * Converts a 16 bit signed array from/to big-endian byte order to/from the machine order. - */ -inline void KFromToBigEndian( TQ_INT16 *out, TQ_INT16 *in, uint len ) -{ -#ifdef WORDS_BIGENDIAN - if ( out != in ) memcpy( out, in, len<<1 ) ; -#else - while ( len>0 ) { *out = KSWAP_16( *in ); out++; in++; len--; } -#endif -} - -/** - * \ingroup KSWAP - * Converts a 32 bit signed value from/to big-endian byte order to/from the machine order. - */ -inline TQ_INT32 KFromToBigEndian( TQ_INT32 b ) -{ -#ifdef WORDS_BIGENDIAN - return b; -#else - return KSWAP_32(b); -#endif -} - -/** - * \ingroup KSWAP - * Converts a 32 bit signed array from/to big-endian byte order to/from the machine order. - */ -inline void KFromToBigEndian( TQ_INT32 *out, TQ_INT32 *in, uint len ) -{ -#ifdef WORDS_BIGENDIAN - if ( out != in ) memcpy( out, in, len<<2 ) ; -#else - while ( len>0 ) { *out = KSWAP_32( *in ); out++; in++; len--; } -#endif -} - -/** - * \ingroup KSWAP - * Converts a 64 bit signed value from/to big-endian byte order to/from the machine order. - */ -inline TQ_INT64 KFromToBigEndian( TQ_INT64 b ) -{ -#ifdef WORDS_BIGENDIAN - return b; -#else - return KSWAP_64(b); -#endif -} - -/** - * \ingroup KSWAP - * Converts a 64 bit signed array from/to big-endian byte order to/from the machine order. - */ -inline void KFromToBigEndian( TQ_INT64 *out, TQ_INT64 *in, uint len ) -{ -#ifdef WORDS_BIGENDIAN - if ( out != in ) memcpy( out, in, len<<3 ) ; -#else - while ( len>0 ) { *out = KSWAP_64( *in ); out++; in++; len--; } -#endif -} - -/** - * \ingroup KSWAP - * Converts a 16 bit unsigned value from/to little-endian byte order to/from the machine order. - */ -inline TQ_UINT16 KFromToLittleEndian( TQ_UINT16 b ) -{ -#ifndef WORDS_BIGENDIAN - return b; -#else - return KSWAP_16(b); -#endif -} - -/** - * \ingroup KSWAP - * Converts a 16 bit unsigned array from/to little-endian byte order to/from the machine order. - */ -inline void KFromToLittleEndian( TQ_UINT16 *out, TQ_UINT16 *in, uint len ) -{ -#ifndef WORDS_BIGENDIAN - if ( out != in ) memcpy( out, in, len<<1 ) ; -#else - while ( len>0 ) { *out = KSWAP_16( *in ); out++; in++; len--; } -#endif -} - -/** - * \ingroup KSWAP - * Converts a 32 bit unsigned value from/to little-endian byte order to/from the machine order. - */ -inline TQ_UINT32 KFromToLittleEndian( TQ_UINT32 b ) -{ -#ifndef WORDS_BIGENDIAN - return b; -#else - return KSWAP_32(b); -#endif -} - -/** - * \ingroup KSWAP - * Converts a 32 bit unsigned array from/to little-endian byte order to/from the machine order. - */ -inline void KFromToLittleEndian( TQ_UINT32 *out, TQ_UINT32 *in, uint len ) -{ -#ifndef WORDS_BIGENDIAN - if ( out != in ) memcpy( out, in, len<<2 ) ; -#else - while ( len>0 ) { *out = KSWAP_32( *in ); out++; in++; len--; } -#endif -} - -/** - * \ingroup KSWAP - * Converts a 64 bit unsigned value from/to little-endian byte order to/from the machine order. - */ -inline TQ_UINT64 KFromToLittleEndian( TQ_UINT64 b ) -{ -#ifndef WORDS_BIGENDIAN - return b; -#else - return KSWAP_64(b); -#endif -} - -/** - * \ingroup KSWAP - * Converts a 64 bit unsigned array from/to little-endian byte order to/from the machine order. - */ -inline void KFromToLittleEndian( TQ_UINT64 *out, TQ_UINT64 *in, uint len ) -{ -#ifndef WORDS_BIGENDIAN - if ( out != in ) memcpy( out, in, len<<3 ) ; -#else - while ( len>0 ) { *out = KSWAP_64( *in ); out++; in++; len--; } -#endif -} - -/** - * \ingroup KSWAP - * Converts a 16 bit signed value from/to little-endian byte order to/from the machine order. - */ -inline TQ_INT16 KFromToLittleEndian( TQ_INT16 b ) -{ -#ifndef WORDS_BIGENDIAN - return b; -#else - return KSWAP_16(b); -#endif -} - -/** - * \ingroup KSWAP - * Converts a 16 bit signed array from/to little-endian byte order to/from the machine order. - */ -inline void KFromToLittleEndian( TQ_INT16 *out, TQ_INT16 *in, uint len ) -{ -#ifndef WORDS_BIGENDIAN - if ( out != in ) memcpy( out, in, len<<1 ) ; -#else - while ( len>0 ) { *out = KSWAP_16( *in ); out++; in++; len--; } -#endif -} - -/** - * \ingroup KSWAP - * Converts a 32 bit signed value from/to little-endian byte order to/from the machine order. - */ -inline TQ_INT32 KFromToLittleEndian( TQ_INT32 b ) -{ -#ifndef WORDS_BIGENDIAN - return b; -#else - return KSWAP_32(b); -#endif -} - -/** - * \ingroup KSWAP - * Converts a 32 bit signed array from/to little-endian byte order to/from the machine order. - */ -inline void KFromToLittleEndian( TQ_INT32 *out, TQ_INT32 *in, uint len ) -{ -#ifndef WORDS_BIGENDIAN - if ( out != in ) memcpy( out, in, len<<2 ) ; -#else - while ( len>0 ) { *out = KSWAP_32( *in ); out++; in++; len--; } -#endif -} - -/** - * \ingroup KSWAP - * Converts a 64 bit signed value from/to little-endian byte order to/from the machine order. - */ -inline TQ_INT64 KFromToLittleEndian( TQ_INT64 b ) -{ -#ifndef WORDS_BIGENDIAN - return b; -#else - return KSWAP_64(b); -#endif -} - -/** - * \ingroup KSWAP - * Converts a 64 bit signed array from/to little-endian byte order to/from the machine order. - */ -inline void KFromToLittleEndian( TQ_INT64 *out, TQ_INT64 *in, uint len ) -{ -#ifndef WORDS_BIGENDIAN - if ( out != in ) memcpy( out, in, len<<3 ) ; -#else - while ( len>0 ) { *out = KSWAP_64( *in ); out++; in++; len--; } -#endif -} - -#endif /* KSWAP_H */ diff --git a/kio/misc/tdentlm/tdentlm.cpp b/kio/misc/tdentlm/tdentlm.cpp deleted file mode 100644 index 2ef5d1cb6..000000000 --- a/kio/misc/tdentlm/tdentlm.cpp +++ /dev/null @@ -1,389 +0,0 @@ -/* This file is part of the KDE libraries - Copyright (c) 2004 Szombathelyi Gy�gy - - The implementation is based on the documentation and sample code - at http://davenport.sourceforge.net/ntlm.html - The DES encryption functions are from libntlm - at http://josefsson.org/libntlm/ - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License version 2 as published by the Free Software Foundation. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include - -#include -#include -#include -#include -#include - -#include "des.h" -#include "tdentlm.h" - -TQString KNTLM::getString( const TQByteArray &buf, const SecBuf &secbuf, bool unicode ) -{ - //watch for buffer overflows - TQ_UINT32 offset; - TQ_UINT16 len; - offset = KFromToLittleEndian((TQ_UINT32)secbuf.offset); - len = KFromToLittleEndian(secbuf.len); - if ( offset > buf.size() || - offset + len > buf.size() ) return TQString::null; - - TQString str; - const char *c = buf.data() + offset; - - if ( unicode ) { - str = UnicodeLE2TQString( (TQChar*) c, len >> 1 ); - } else { - str = TQString::fromLatin1( c, len ); - } - return str; -} - -TQByteArray KNTLM::getBuf( const TQByteArray &buf, const SecBuf &secbuf ) -{ - TQByteArray ret; - TQ_UINT32 offset; - TQ_UINT16 len; - offset = KFromToLittleEndian((TQ_UINT32)secbuf.offset); - len = KFromToLittleEndian(secbuf.len); - //watch for buffer overflows - if ( offset > buf.size() || - offset + len > buf.size() ) return ret; - ret.duplicate( buf.data() + offset, buf.size() ); - return ret; -} - -void KNTLM::addString( TQByteArray &buf, SecBuf &secbuf, const TQString &str, bool unicode ) -{ - TQByteArray tmp; - - if ( unicode ) { - tmp = QString2UnicodeLE( str ); - addBuf( buf, secbuf, tmp ); - } else { - const char *c; - c = str.latin1(); - tmp.setRawData( c, str.length() ); - addBuf( buf, secbuf, tmp ); - tmp.resetRawData( c, str.length() ); - } -} - -void KNTLM::addBuf( TQByteArray &buf, SecBuf &secbuf, TQByteArray &data ) -{ - TQ_UINT32 offset; - TQ_UINT16 len, maxlen; - offset = (buf.size() + 1) & 0xfffffffe; - len = data.size(); - maxlen = data.size(); - - secbuf.offset = KFromToLittleEndian((TQ_UINT32)offset); - secbuf.len = KFromToLittleEndian(len); - secbuf.maxlen = KFromToLittleEndian(maxlen); - buf.resize( offset + len ); - memcpy( buf.data() + offset, data.data(), data.size() ); -} - -bool KNTLM::getNegotiate( TQByteArray &negotiate, const TQString &domain, const TQString &workstation, TQ_UINT32 flags ) -{ - TQByteArray rbuf( sizeof(Negotiate) ); - - rbuf.fill( 0 ); - memcpy( rbuf.data(), "NTLMSSP", 8 ); - ((Negotiate*) rbuf.data())->msgType = KFromToLittleEndian( (TQ_UINT32)1 ); - if ( !domain.isEmpty() ) { - flags |= Negotiate_Domain_Supplied; - addString( rbuf, ((Negotiate*) rbuf.data())->domain, domain ); - } - if ( !workstation.isEmpty() ) { - flags |= Negotiate_WS_Supplied; - addString( rbuf, ((Negotiate*) rbuf.data())->domain, workstation ); - } - ((Negotiate*) rbuf.data())->flags = KFromToLittleEndian( flags ); - negotiate = rbuf; - return true; -} - -bool KNTLM::getAuth( TQByteArray &auth, const TQByteArray &challenge, const TQString &user, - const TQString &password, const TQString &domain, const TQString &workstation, - bool forceNTLM, bool forceNTLMv2 ) -{ - TQByteArray rbuf( sizeof(Auth) ); - Challenge *ch = (Challenge *) challenge.data(); - TQByteArray response; - uint chsize = challenge.size(); - bool unicode = false; - TQString dom; - - //challenge structure too small - if ( chsize < 32 ) return false; - - unicode = KFromToLittleEndian(ch->flags) & Negotiate_Unicode; - if ( domain.isEmpty() ) - dom = getString( challenge, ch->targetName, unicode ); - else - dom = domain; - - rbuf.fill( 0 ); - memcpy( rbuf.data(), "NTLMSSP", 8 ); - ((Auth*) rbuf.data())->msgType = KFromToLittleEndian( (TQ_UINT32)3 ); - ((Auth*) rbuf.data())->flags = ch->flags; - TQByteArray targetInfo = getBuf( challenge, ch->targetInfo ); - -// if ( forceNTLMv2 || (!targetInfo.isEmpty() && (KFromToLittleEndian(ch->flags) & Negotiate_Target_Info)) /* may support NTLMv2 */ ) { -// if ( KFromToLittleEndian(ch->flags) & Negotiate_NTLM ) { -// if ( targetInfo.isEmpty() ) return false; -// response = getNTLMv2Response( dom, user, password, targetInfo, ch->challengeData ); -// addBuf( rbuf, ((Auth*) rbuf.data())->ntResponse, response ); -// } else { -// if ( !forceNTLM ) { -// response = getLMv2Response( dom, user, password, ch->challengeData ); -// addBuf( rbuf, ((Auth*) rbuf.data())->lmResponse, response ); -// } else -// return false; -// } -// } else { //if no targetinfo structure and NTLMv2 or LMv2 not forced, try the older methods - - response = getNTLMResponse( password, ch->challengeData ); - addBuf( rbuf, ((Auth*) rbuf.data())->ntResponse, response ); - response = getLMResponse( password, ch->challengeData ); - addBuf( rbuf, ((Auth*) rbuf.data())->lmResponse, response ); -// } - if ( !dom.isEmpty() ) - addString( rbuf, ((Auth*) rbuf.data())->domain, dom, unicode ); - addString( rbuf, ((Auth*) rbuf.data())->user, user, unicode ); - if ( !workstation.isEmpty() ) - addString( rbuf, ((Auth*) rbuf.data())->workstation, workstation, unicode ); - - auth = rbuf; - - return true; -} - -TQByteArray KNTLM::getLMResponse( const TQString &password, const unsigned char *challenge ) -{ - TQByteArray hash, answer; - - hash = lmHash( password ); - hash.resize( 21 ); - memset( hash.data() + 16, 0, 5 ); - answer = lmResponse( hash, challenge ); - hash.fill( 0 ); - return answer; -} - -TQByteArray KNTLM::lmHash( const TQString &password ) -{ - TQByteArray keyBytes( 14 ); - TQByteArray hash( 16 ); - DES_KEY ks; - const char *magic = "KGS!@#$%"; - - keyBytes.fill( 0 ); - strncpy( keyBytes.data(), password.upper().latin1(), 14 ); - - convertKey( (unsigned char*) keyBytes.data(), &ks ); - ntlm_des_ecb_encrypt( magic, 8, &ks, (unsigned char*) hash.data() ); - - convertKey( (unsigned char*) keyBytes.data() + 7, &ks ); - ntlm_des_ecb_encrypt( magic, 8, &ks, (unsigned char*) hash.data() + 8 ); - - keyBytes.fill( 0 ); - memset( &ks, 0, sizeof (ks) ); - - return hash; -} - -TQByteArray KNTLM::lmResponse( const TQByteArray &hash, const unsigned char *challenge ) -{ - DES_KEY ks; - TQByteArray answer( 24 ); - - convertKey( (unsigned char*) hash.data(), &ks ); - ntlm_des_ecb_encrypt( challenge, 8, &ks, (unsigned char*) answer.data() ); - - convertKey( (unsigned char*) hash.data() + 7, &ks ); - ntlm_des_ecb_encrypt( challenge, 8, &ks, (unsigned char*) answer.data() + 8 ); - - convertKey( (unsigned char*) hash.data() + 14, &ks ); - ntlm_des_ecb_encrypt( challenge, 8, &ks, (unsigned char*) answer.data() + 16 ); - - memset( &ks, 0, sizeof (ks) ); - return answer; -} - -TQByteArray KNTLM::getNTLMResponse( const TQString &password, const unsigned char *challenge ) -{ - TQByteArray hash, answer; - - hash = ntlmHash( password ); - hash.resize( 21 ); - memset( hash.data() + 16, 0, 5 ); - answer = lmResponse( hash, challenge ); - hash.fill( 0 ); - return answer; -} - -TQByteArray KNTLM::ntlmHash( const TQString &password ) -{ - KMD4::Digest digest; - TQByteArray ret, unicode; - unicode = QString2UnicodeLE( password ); - - KMD4 md4( unicode ); - md4.rawDigest( digest ); - ret.duplicate( (const char*) digest, sizeof( digest ) ); - return ret; -} - -TQByteArray KNTLM::getNTLMv2Response( const TQString &target, const TQString &user, - const TQString &password, const TQByteArray &targetInformation, - const unsigned char *challenge ) -{ - TQByteArray hash = ntlmv2Hash( target, user, password ); - TQByteArray blob = createBlob( targetInformation ); - return lmv2Response( hash, blob, challenge ); -} - -TQByteArray KNTLM::getLMv2Response( const TQString &target, const TQString &user, - const TQString &password, const unsigned char *challenge ) -{ - TQByteArray hash = ntlmv2Hash( target, user, password ); - TQByteArray clientChallenge( 8 ); - for ( uint i = 0; i<8; i++ ) { - clientChallenge.data()[i] = TDEApplication::random() % 0xff; - } - return lmv2Response( hash, clientChallenge, challenge ); -} - -TQByteArray KNTLM::ntlmv2Hash( const TQString &target, const TQString &user, const TQString &password ) -{ - TQByteArray hash1 = ntlmHash( password ); - TQByteArray key, ret; - TQString id = user.upper() + target.upper(); - key = QString2UnicodeLE( id ); - ret = hmacMD5( key, hash1 ); - return ret; -} - -TQByteArray KNTLM::lmv2Response( const TQByteArray &hash, - const TQByteArray &clientData, const unsigned char *challenge ) -{ - TQByteArray data( 8 + clientData.size() ); - memcpy( data.data(), challenge, 8 ); - memcpy( data.data() + 8, clientData.data(), clientData.size() ); - TQByteArray mac = hmacMD5( data, hash ); - mac.resize( 16 + clientData.size() ); - memcpy( mac.data() + 16, clientData.data(), clientData.size() ); - return mac; -} - -TQByteArray KNTLM::createBlob( const TQByteArray &targetinfo ) -{ - TQByteArray blob( sizeof(Blob) + 4 + targetinfo.size() ); - blob.fill( 0 ); - - Blob *bl = (Blob *) blob.data(); - bl->signature = KFromToBigEndian( (TQ_UINT32) 0x01010000 ); - TQ_UINT64 now = TQDateTime::currentDateTime().toTime_t(); - now += (TQ_UINT64)3600*(TQ_UINT64)24*(TQ_UINT64)134774; - now *= (TQ_UINT64)10000000; - bl->timestamp = KFromToLittleEndian( now ); - for ( uint i = 0; i<8; i++ ) { - bl->challenge[i] = TDEApplication::random() % 0xff; - } - memcpy( blob.data() + sizeof(Blob), targetinfo.data(), targetinfo.size() ); - return blob; -} - -TQByteArray KNTLM::hmacMD5( const TQByteArray &data, const TQByteArray &key ) -{ - TQ_UINT8 ipad[64], opad[64]; - KMD5::Digest digest; - TQByteArray ret; - - memset( ipad, 0x36, sizeof(ipad) ); - memset( opad, 0x5c, sizeof(opad) ); - for ( int i = key.size()-1; i >= 0; i-- ) { - ipad[i] ^= key[i]; - opad[i] ^= key[i]; - } - - TQByteArray content( data.size()+64 ); - memcpy( content.data(), ipad, 64 ); - memcpy( content.data() + 64, data.data(), data.size() ); - KMD5 md5( content ); - md5.rawDigest( digest ); - content.resize( sizeof(digest) + 64 ); - memcpy( content.data(), opad, 64 ); - memcpy( content.data() + 64, digest, sizeof(digest) ); - md5.reset(); - md5.update( content ); - md5.rawDigest( digest ); - - ret.duplicate( (const char*) digest, sizeof( digest ) ); - return ret; -} - -/* -* turns a 56 bit key into the 64 bit, odd parity key and sets the key. -* The key schedule ks is also set. -*/ -void KNTLM::convertKey( unsigned char *key_56, void* ks ) -{ - unsigned char key[8]; - - key[0] = key_56[0]; - key[1] = ((key_56[0] << 7) & 0xFF) | (key_56[1] >> 1); - key[2] = ((key_56[1] << 6) & 0xFF) | (key_56[2] >> 2); - key[3] = ((key_56[2] << 5) & 0xFF) | (key_56[3] >> 3); - key[4] = ((key_56[3] << 4) & 0xFF) | (key_56[4] >> 4); - key[5] = ((key_56[4] << 3) & 0xFF) | (key_56[5] >> 5); - key[6] = ((key_56[5] << 2) & 0xFF) | (key_56[6] >> 6); - key[7] = (key_56[6] << 1) & 0xFF; - - for ( uint i=0; i<8; i++ ) { - unsigned char b = key[i]; - bool needsParity = (((b>>7) ^ (b>>6) ^ (b>>5) ^ (b>>4) ^ (b>>3) ^ (b>>2) ^ (b>>1)) & 0x01) == 0; - if ( needsParity ) - key[i] |= 0x01; - else - key[i] &= 0xfe; - } - - ntlm_des_set_key ( (DES_KEY*) ks, (char*) &key, sizeof (key)); - - memset (&key, 0, sizeof (key)); -} - -TQByteArray KNTLM::QString2UnicodeLE( const TQString &target ) -{ - TQByteArray unicode( target.length() * 2 ); - for ( uint i = 0; i < target.length(); i++ ) { - ((TQ_UINT16*)unicode.data())[ i ] = KFromToLittleEndian( target[i].unicode() ); - } - return unicode; -} - -TQString KNTLM::UnicodeLE2TQString( const TQChar* data, uint len ) -{ - TQString ret; - for ( uint i = 0; i < len; i++ ) { - ret += KFromToLittleEndian( data[ i ].unicode() ); - } - return ret; -} diff --git a/kio/misc/tdentlm/tdentlm.h b/kio/misc/tdentlm/tdentlm.h deleted file mode 100644 index 06b8febab..000000000 --- a/kio/misc/tdentlm/tdentlm.h +++ /dev/null @@ -1,233 +0,0 @@ -/* - This file is part of the KDE libraries. - Copyright (c) 2004 Szombathelyi Gyrgy - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License version 2 as published by the Free Software Foundation. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. - */ - -#ifndef KNTLM_H -#define KNTLM_H - -#include -#include -#include - -#include - -/** - * @short KNTLM class implements the NTLM authentication protocol. - * - * The KNTLM class is useful for creating the authentication structures which - * can be used for various servers which implements NTLM type authentication. - * A comprehensive description of the NTLM authentication protocol can be found - * at http://davenport.sourceforge.net/ntlm.html - * The class also contains methods to create the LanManager and NT (MD4) hashes - * of a password. - * This class doesn't maintain any state information, so all methods are static. - */ - -class TDEIO_EXPORT KNTLM { -public: - - enum Flags { - Negotiate_Unicode = 0x00000001, - Negotiate_OEM = 0x00000002, - Request_Target = 0x00000004, - Negotiate_Sign = 0x00000010, - Negotiate_Seal = 0x00000020, - Negotiate_Datagram_Style = 0x00000040, - Negotiate_LM_Key = 0x00000080, - Negotiate_Netware = 0x00000100, - Negotiate_NTLM = 0x00000200, - Negotiate_Domain_Supplied = 0x00001000, - Negotiate_WS_Supplied = 0x00002000, - Negotiate_Local_Call = 0x00004000, - Negotiate_Always_Sign = 0x00008000, - Target_Type_Domain = 0x00010000, - Target_Type_Server = 0x00020000, - Target_Type_Share = 0x00040000, - Negotiate_NTLM2_Key = 0x00080000, - Request_Init_Response = 0x00100000, - Request_Accept_Response = 0x00200000, - Request_NonNT_Key = 0x00400000, - Negotiate_Target_Info = 0x00800000, - Negotiate_128 = 0x20000000, - Negotiate_Key_Exchange = 0x40000000, - Negotiate_56 = 0x80000000 - }; - - typedef struct - { - TQ_UINT16 len; - TQ_UINT16 maxlen; - TQ_UINT32 offset; - } SecBuf; - - /** - * The NTLM Type 1 structure - */ - typedef struct - { - char signature[8]; /* "NTLMSSP\0" */ - TQ_UINT32 msgType; /* 1 */ - TQ_UINT32 flags; - SecBuf domain; - SecBuf workstation; - } Negotiate; - - /** - * The NTLM Type 2 structure - */ - typedef struct - { - char signature[8]; - TQ_UINT32 msgType; /* 2 */ - SecBuf targetName; - TQ_UINT32 flags; - TQ_UINT8 challengeData[8]; - TQ_UINT32 context[2]; - SecBuf targetInfo; - } Challenge; - - /** - * The NTLM Type 3 structure - */ - typedef struct - { - char signature[8]; - TQ_UINT32 msgType; /* 3 */ - SecBuf lmResponse; - SecBuf ntResponse; - SecBuf domain; - SecBuf user; - SecBuf workstation; - SecBuf sessionKey; - TQ_UINT32 flags; - } Auth; - - typedef struct - { - TQ_UINT32 signature; - TQ_UINT32 reserved; - TQ_UINT64 timestamp; - TQ_UINT8 challenge[8]; - TQ_UINT8 unknown[4]; - //Target info block - variable length - } Blob; - - /** - * Creates the initial message (type 1) which should be sent to the server. - * - * @param negotiate - a buffer where the Type 1 message will returned. - * @param domain - the domain name which should be send with the message. - * @param workstation - the workstation name which should be send with the message. - * @param flags - various flags, in most cases the defaults will good. - * - * @return true if creating the structure succeeds, false otherwise. - */ - static bool getNegotiate( TQByteArray &negotiate, const TQString &domain = TQString::null, - const TQString &workstation = TQString::null, - TQ_UINT32 flags = Negotiate_Unicode | Request_Target | Negotiate_NTLM ); - /** - * Creates the type 3 message which should be sent to the server after - * the challenge (type 2) received. - * - * @param auth - a buffer where the Type 3 message will returned. - * @param challenge - the Type 2 message returned by the server. - * @param user - user's name. - * @param password - user's password. - * @param domain - the target domain. If left empty, it will be extracted - * from the challenge. - * @param workstation - the user's workstation. - * @param forceNTLM - force the use of NTLM authentication (either v1 or v2). - * @param forceNTLMv2 - force the use of NTLMv2 or LMv2 authentication. If false, NTLMv2 - * support is autodetected from the challenge. - * - * @return true if auth filled with the Type 3 message, false if an error occured - * (challenge data invalid, or NTLM authentication forced, but the challenge data says - * no NTLM supported). - */ - static bool getAuth( TQByteArray &auth, const TQByteArray &challenge, const TQString &user, - const TQString &password, const TQString &domain = TQString::null, - const TQString &workstation = TQString::null, bool forceNTLM = false, bool forceNTLMv2 = false ); - - /** - * Returns the LanManager response from the password and the server challenge. - */ - static TQByteArray getLMResponse( const TQString &password, const unsigned char *challenge ); - /** - * Calculates the LanManager hash of the specified password. - */ - static TQByteArray lmHash( const TQString &password ); - /** - * Calculates the LanManager response from the LanManager hash and the server challenge. - */ - static TQByteArray lmResponse( const TQByteArray &hash, const unsigned char *challenge ); - - /** - * Returns the NTLM response from the password and the server challenge. - */ - static TQByteArray getNTLMResponse( const TQString &password, const unsigned char *challenge ); - /** - * Returns the NTLM hash (MD4) from the password. - */ - static TQByteArray ntlmHash( const TQString &password ); - - /** - * Calculates the NTLMv2 response. - */ - static TQByteArray getNTLMv2Response( const TQString &target, const TQString &user, - const TQString &password, const TQByteArray &targetInformation, - const unsigned char *challenge ); - - /** - * Calculates the LMv2 response. - */ - static TQByteArray getLMv2Response( const TQString &target, const TQString &user, - const TQString &password, const unsigned char *challenge ); - - /** - * Returns the NTLMv2 hash. - */ - static TQByteArray ntlmv2Hash( const TQString &target, const TQString &user, const TQString &password ); - - /** - * Calculates the LMv2 response. - */ - static TQByteArray lmv2Response( const TQByteArray &hash, - const TQByteArray &clientData, const unsigned char *challenge ); - - /** - * Extracts a string field from an NTLM structure. - */ - static TQString getString( const TQByteArray &buf, const SecBuf &secbuf, bool unicode ); - /** - * Extracts a byte array from an NTLM structure. - */ - static TQByteArray getBuf( const TQByteArray &buf, const SecBuf &secbuf ); - - static TQByteArray createBlob( const TQByteArray &targetinfo ); - - static TQByteArray hmacMD5( const TQByteArray &data, const TQByteArray &key ); -private: - static TQByteArray QString2UnicodeLE( const TQString &target ); - static TQString UnicodeLE2TQString( const TQChar* data, uint len ); - - static void addBuf( TQByteArray &buf, SecBuf &secbuf, TQByteArray &data ); - static void addString( TQByteArray &buf, SecBuf &secbuf, const TQString &str, bool unicode = false ); - static void convertKey( unsigned char *key_56, void* ks ); -}; - -#endif /* KNTLM_H */ diff --git a/kio/misc/tdesasl/CMakeLists.txt b/kio/misc/tdesasl/CMakeLists.txt deleted file mode 100644 index 27cacfbb9..000000000 --- a/kio/misc/tdesasl/CMakeLists.txt +++ /dev/null @@ -1,42 +0,0 @@ -################################################# -# -# (C) 2010 Serghei Amelian -# serghei (DOT) amelian (AT) gmail.com -# -# Improvements and feedback are welcome -# -# This file is released under GPL >= 2 -# -################################################# - -include_directories( - ${TQT_INCLUDE_DIRS} - ${CMAKE_CURRENT_BINARY_DIR} - ${CMAKE_BINARY_DIR}/tdecore - ${CMAKE_SOURCE_DIR}/tdecore -) - -link_directories( - ${TQT_LIBRARY_DIRS} -) - - -##### headers ################################### - -install(FILES tdesasl.h DESTINATION ${INCLUDE_INSTALL_DIR}/kio ) - - -##### tdesasl ################################### - -set( target tdesasl ) - -set( ${target}_SRCS - tdesasl.cpp -) - -tde_add_library( ${target} SHARED - SOURCES ${${target}_SRCS} - VERSION 1.2.0 - LINK tdecore-shared - DESTINATION ${LIB_INSTALL_DIR} -) diff --git a/kio/misc/tdesasl/Makefile.am b/kio/misc/tdesasl/Makefile.am deleted file mode 100644 index 4dd36a6d7..000000000 --- a/kio/misc/tdesasl/Makefile.am +++ /dev/null @@ -1,12 +0,0 @@ -INCLUDES=$(all_includes) - -lib_LTLIBRARIES = libtdesasl.la -METASOURCES = AUTO - -tdesaslincludedir = $(includedir)/kio -tdesaslinclude_HEADERS = tdesasl.h - -libtdesasl_la_SOURCES = tdesasl.cpp -libtdesasl_la_LDFLAGS = $(all_libraries) -version-info 3:0:2 -no-undefined -libtdesasl_la_LIBADD = $(LIB_TDECORE) $(LIB_QT) - diff --git a/kio/misc/tdesasl/tdesasl.cpp b/kio/misc/tdesasl/tdesasl.cpp deleted file mode 100644 index ef0768f98..000000000 --- a/kio/misc/tdesasl/tdesasl.cpp +++ /dev/null @@ -1,285 +0,0 @@ -/* This file is part of the KDE libraries - Copyright (C) 2001-2002 Michael Hckel - $Id$ - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License version 2 as published by the Free Software Foundation. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include "tdesasl.h" - -#include -#include - -#include - -#include -#include - -KDESasl::KDESasl(const KURL &aUrl) -{ - mProtocol = aUrl.protocol(); - mUser = aUrl.user(); - mPass = aUrl.pass(); - mFirst = true; -} - -KDESasl::KDESasl(const TQString &aUser, const TQString &aPass, - const TQString &aProtocol) -{ - mProtocol = aProtocol; - mUser = aUser; - mPass = aPass; - mFirst = true; -} - -KDESasl::~KDESasl() { -} - -TQCString KDESasl::chooseMethod(const TQStrIList aMethods) -{ - if (aMethods.contains("DIGEST-MD5")) mMethod = "DIGEST-MD5"; - else if (aMethods.contains("CRAM-MD5")) mMethod = "CRAM-MD5"; - else if (aMethods.contains("PLAIN")) mMethod = "PLAIN"; - else if (aMethods.contains("LOGIN")) mMethod = "LOGIN"; - else mMethod = TQCString(); - return mMethod; -} - -void KDESasl::setMethod(const TQCString &aMethod) -{ - mMethod = aMethod.upper(); -} - -TQByteArray KDESasl::getPlainResponse() -{ - TQCString user = mUser.utf8(); - TQCString pass = mPass.utf8(); - int userlen = user.length(); - int passlen = pass.length(); - // result = $user\0$user\0$pass (no trailing \0) - TQByteArray result(2 * userlen + passlen + 2); - if ( userlen ) { - memcpy( result.data(), user.data(), userlen ); - memcpy( result.data() + userlen + 1, user.data(), userlen ); - } - if ( passlen ) - memcpy( result.data() + 2 * userlen + 2, pass.data(), passlen ); - result[userlen] = result[2*userlen+1] = '\0'; - return result; -} - -TQByteArray KDESasl::getLoginResponse() -{ - TQByteArray result = (mFirst) ? mUser.utf8() : mPass.utf8(); - mFirst = !mFirst; - if (result.size()) result.resize(result.size() - 1); - return result; -} - -TQByteArray KDESasl::getCramMd5Response(const TQByteArray &aChallenge) -{ - uint i; - TQByteArray secret = mPass.utf8(); - int len = mPass.utf8().length(); - secret.resize(len); - if (secret.size() > 64) - { - KMD5 md5(secret); - secret.duplicate((const char*)(&(md5.rawDigest()[0])), 16); - len = 16; - } - secret.resize(64); - for (i = len; i < 64; i++) secret[i] = 0; - TQByteArray XorOpad(64); - for (i = 0; i < 64; i++) XorOpad[i] = secret[i] ^ 0x5C; - TQByteArray XorIpad(64); - for (i = 0; i < 64; i++) XorIpad[i] = secret[i] ^ 0x36; - KMD5 md5; - md5.update(XorIpad); - md5.update(aChallenge); - KMD5 md5a; - md5a.update(XorOpad); - md5a.update(md5.rawDigest(), 16); - TQByteArray result = mUser.utf8(); - len = mUser.utf8().length(); - result.resize(len + 33); - result[len] = ' '; - TQCString ch = md5a.hexDigest(); - for (i = 0; i < 32; i++) result[i+len+1] = *(ch.data() + i); - return result; -} - -TQByteArray KDESasl::getDigestMd5Response(const TQByteArray &aChallenge) -{ - mFirst = !mFirst; - if (mFirst) return TQByteArray(); - TQCString str, realm, nonce, qop, algorithm, charset; - TQCString nc = "00000001"; - unsigned int a, b, c, d; - a = 0; - while (a < aChallenge.size()) - { - b = a; - while (b < aChallenge.size() && aChallenge[b] != '=') b++; - c = b + 1; - if (aChallenge[c] == '"') - { - d = c + 1; - while (d < aChallenge.size() && aChallenge[d] != '"') d++; - c++; - } else { - d = c; - while (d < aChallenge.size() && aChallenge[d] != ',') d++; - } - str = TQCString(aChallenge.data() + c, d - c + 1); - if (tqstrnicmp(aChallenge.data() + a, "realm=", 6) == 0) realm = str; - else if (tqstrnicmp(aChallenge.data() + a, "nonce=", 6) == 0) nonce = str; - else if (tqstrnicmp(aChallenge.data() + a, "qop=", 4) == 0) qop = str; - else if (tqstrnicmp(aChallenge.data() + a, "algorithm=", 10) == 0) - algorithm = str; - else if (tqstrnicmp(aChallenge.data() + a, "charset=", 8) == 0) - charset = str; - a = (d < aChallenge.size() && aChallenge[d] == '"') ? d + 2 : d + 1; - } - if (qop.isEmpty()) qop = "auth"; - qop = "auth"; - bool utf8 = tqstricmp(charset, "utf-8") == 0; - TQCString digestUri = TQCString(mProtocol.latin1()) + "/" + realm; - - /* Calculate the response */ - /* Code based on code from the http io-slave - Copyright (C) 2000,2001 Dawit Alemayehu - Copyright (C) 2000,2001 Waldo Bastian - Copyright (C) 2000,2001 George Staikos */ - KMD5 md, md2; - TQCString HA1, HA2; - TQCString cnonce; - cnonce.setNum((1 + static_cast(100000.0*rand()/(RAND_MAX+1.0)))); - cnonce = KCodecs::base64Encode( cnonce ); - - // Calculate H(A1) - TQCString authStr = (utf8) ? mUser.utf8() : TQCString(mUser.latin1()); - authStr += ':'; - authStr += realm; - authStr += ':'; - authStr += (utf8) ? mPass.utf8() : TQCString(mPass.latin1()); - - md.update( authStr ); - authStr = ""; - if ( algorithm == "md5-sess" ) - { - authStr += ':'; - authStr += nonce; - authStr += ':'; - authStr += cnonce; - } - md2.reset(); - /* SASL authentication uses rawDigest here, whereas HTTP authentication uses - hexDigest() */ - md2.update(md.rawDigest(), 16); - md2.update( authStr ); - md2.hexDigest( HA1 ); - - // Calcualte H(A2) - authStr = "AUTHENTICATE:"; - authStr += digestUri; - if ( qop == "auth-int" || qop == "auth-conf" ) - { - authStr += ":00000000000000000000000000000000"; - } - md.reset(); - md.update( authStr ); - md.hexDigest( HA2 ); - - // Calcualte the response. - authStr = HA1; - authStr += ':'; - authStr += nonce; - authStr += ':'; - if ( !qop.isEmpty() ) - { - authStr += nc; - authStr += ':'; - authStr += cnonce; - authStr += ':'; - authStr += qop; - authStr += ':'; - } - authStr += HA2; - md.reset(); - md.update( authStr ); - TQCString response = md.hexDigest(); - /* End of response calculation */ - - TQCString result; - if (utf8) - { - result = "charset=utf-8,username=\"" + mUser.utf8(); - } else { - result = "charset=iso-8859-1,username=\"" + TQCString(mUser.latin1()); - } - result += "\",realm=\"" + realm + "\",nonce=\"" + nonce; - result += "\",nc=" + nc + ",cnonce=\"" + cnonce; - result += "\",digest-uri=\"" + digestUri; - result += "\",response=" + response + ",qop=" + qop; - TQByteArray ba; - ba.duplicate(result.data(), result.length()); - return ba; -} - -TQByteArray KDESasl::getBinaryResponse(const TQByteArray &aChallenge, bool aBase64) -{ - if (aBase64) - { - TQByteArray ba; - KCodecs::base64Decode(aChallenge, ba); - KCodecs::base64Encode(getBinaryResponse(ba, false), ba); - return ba; - } - if (tqstricmp(mMethod, "PLAIN") == 0) return getPlainResponse(); - if (tqstricmp(mMethod, "LOGIN") == 0) return getLoginResponse(); - if (tqstricmp(mMethod, "CRAM-MD5") == 0) - return getCramMd5Response(aChallenge); - if (tqstricmp(mMethod, "DIGEST-MD5") == 0) - return getDigestMd5Response(aChallenge); -// return getDigestMd5Response(TQCString("realm=\"elwood.innosoft.com\",nonce=\"OA6MG9tEQGm2hh\",qop=\"auth\",algorithm=md5-sess,charset=utf-8")); - return TQByteArray(); -} - -TQCString KDESasl::getResponse(const TQByteArray &aChallenge, bool aBase64) -{ - TQByteArray ba = getBinaryResponse(aChallenge, aBase64); - return TQCString(ba.data(), ba.size() + 1); -} - -TQCString KDESasl::method() const { - return mMethod; -} - -bool KDESasl::clientStarts() const { - return method() == "PLAIN"; -} - -bool KDESasl::dialogComplete( int n ) const { - if ( method() == "PLAIN" || method() == "CRAM-MD5" ) - return n >= 1; - if ( method() == "LOGIN" || method() == "DIGEST-MD5" ) - return n >= 2; - return true; -} - -bool KDESasl::isClearTextMethod() const { - return method() == "PLAIN" || method() == "LOGIN" ; -} diff --git a/kio/misc/tdesasl/tdesasl.h b/kio/misc/tdesasl/tdesasl.h deleted file mode 100644 index 0c57096a8..000000000 --- a/kio/misc/tdesasl/tdesasl.h +++ /dev/null @@ -1,169 +0,0 @@ -/* This file is part of the KDE libraries - Copyright (C) 2001-2002 Michael Hckel - $Id$ - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License version 2 as published by the Free Software Foundation. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef TDESASL_H -#define TDESASL_H - -#include - -#include - -class KURL; -class TQStrIList; - -/** - * This library can create responses for SASL authentication for a given - * challenge and a given secret. This way of authentication is common for - * SMTP, POP3, IMAP and LDAP. - * - * SASL is one way strong encryption and therefore useful for authentication, - * but not for secret information transfer. - * It is possibly to prove with SASL to know a shared secret like a password. - * It is not possible with SASL to transfer any other information in an - * encrypted way. For that purpose OpenPGP or SSL are useful. - * - * Currently PLAIN (RFC 2595), LOGIN (not really a SASL mechanism, but - * used like that in IMAP and SMTP), CRAM-MD5 (RFC 2195) and - * DIGEST-MD5 (RFC 2831) authentication are supported. PLAIN and - * LOGIN transmit the credentials in the clear (apart from a possible - * base64 encoding). - * - * For KDE 3.2, the API has been extended to allow transparent use of - * all currently supported SASL mechanisms. Example: - * \code - * KDESasl sasl( myUser, myPass, myProtocol ); - * if ( !sasl.chooseMethod( myMechanismsSupportedByServer ) ) - * return false; // couldn't agree on a method - * - * int numResponses = 0; - * if ( sasl.clientStarts() ) { // check whether we're supposed to start the dialog - * ++numResponses; - * mySendAuthCommand( sasl.method(), sasl.getResponse() ); - * } else { - * mySendAuthCommand( sasl.method() ); - * } - * for ( ; !sasl.dialogComplete( numResponses ) ; ++numResponses ) { - * TQByteArray challenge = myRecvChallenge(); - * mySendResponse( sasl.getResponse( challenge ) ); - * } - * return myCheckSuccess(); - * \endcode - * - * @author Michael Hckel - * @version $Id$ - */ - -class TDEIO_EXPORT KDESasl -{ - -public: - /** - * Construct a sasl object and initialize it with the username and password - * passed via the url. - */ - KDESasl(const KURL &aUrl); - /** - * This is a conveniece function and differs from the above function only by - * what arguments it accepts. - */ - KDESasl(const TQString &aUser, const TQString &aPass, const TQString &aProtocol); - /* - * You need to have a virtual destructor! - */ - virtual ~KDESasl(); - /** - * @returns the most secure method from the given methods and use it for - * further operations. - */ - virtual TQCString chooseMethod(const TQStrIList aMethods); - /** - * Explicitely set the SASL method used. - */ - virtual void setMethod(const TQCString &aMethod); - /** - * @return the SASL method used. - * @since 3.2 - */ - TQCString method() const; - /** - * @param numCalls number of times getResponse() has been called. - * @return whether the challenge/response dialog has completed - * - * @since 3.2 - */ - bool dialogComplete( int numCalls ) const; - /** - * @return whether the currently selected mechanism results in - * cleartext passwords being sent over the network and thus should - * be used only under TLS/SSL cover or for legacy servers. - * - * @since 3.2 - */ - bool isClearTextMethod() const; - /** - * Creates a response using the formerly chosen SASL method. - * For LOGIN authentication you have to call this function twice. KDESasl - * realizes on its own, if you are calling it for the first or for the - * second time. - * @param aChallenge is the challenge sent to create a response for - * @param aBase64 specifies, whether the authentication protocol uses base64 - * encoding. The challenge is decoded from base64 and the response is - * encoded base64 if set to true. - */ - TQCString getResponse(const TQByteArray &aChallenge=TQByteArray(), bool aBase64 = true); - /** - * Create a response as above but place it in a QByteArray - */ - TQByteArray getBinaryResponse(const TQByteArray &aChallenge=TQByteArray(), bool aBase64=true); - /** - * Returns true if the client is supposed to initiate the - * challenge-respinse dialog with an initial response (which most - * protocols can transfer alongside the authentication command as an - * optional second parameter). This method relieves the sasl user - * from knowing details about the mechanism. If true, use - * #getResponse() with a null challenge. - * - * @since 3.2 - */ - bool clientStarts() const; -protected: - /** - * PLAIN authentication as described in RFC 2595 - */ - virtual TQByteArray getPlainResponse(); - /** - * LOGIN authentication - */ - virtual TQByteArray getLoginResponse(); - /** - * CRAM-MD5 authentication as described in RFC 2195 - */ - virtual TQByteArray getCramMd5Response(const TQByteArray &aChallenge); - /** - * DIGEST-MD5 authentication as described in RFC 2831 - */ - virtual TQByteArray getDigestMd5Response(const TQByteArray &aChallenge); - -private: - TQString mProtocol, mUser, mPass; - TQCString mMethod; - bool mFirst; -}; - -#endif diff --git a/kio/misc/tdewalletd/CMakeLists.txt b/kio/misc/tdewalletd/CMakeLists.txt deleted file mode 100644 index 4aaa332aa..000000000 --- a/kio/misc/tdewalletd/CMakeLists.txt +++ /dev/null @@ -1,49 +0,0 @@ -################################################# -# -# (C) 2010 Serghei Amelian -# serghei (DOT) amelian (AT) gmail.com -# -# Improvements and feedback are welcome -# -# This file is released under GPL >= 2 -# -################################################# - -include_directories( - ${TQT_INCLUDE_DIRS} - ${CMAKE_CURRENT_BINARY_DIR} - ${CMAKE_BINARY_DIR}/tdecore - ${CMAKE_SOURCE_DIR} - ${CMAKE_SOURCE_DIR}/dcop - ${CMAKE_SOURCE_DIR}/tdecore - ${CMAKE_SOURCE_DIR}/tdeui - ${CMAKE_SOURCE_DIR}/tdewallet/client - ${CMAKE_SOURCE_DIR}/tdewallet/backend - ${CMAKE_SOURCE_DIR}/kio/kio -) - -link_directories( - ${TQT_LIBRARY_DIRS} -) - - -##### other data ################################ - -install(FILES tdewalletd.desktop DESTINATION ${SERVICES_INSTALL_DIR}/kded ) - - -#### kded_tdewalletd ############################## - -set( target kded_tdewalletd ) - -set( ${target}_SRCS - tdewalletd.cpp tdewalletd.skel ktimeout.cpp tdewalletwizard.ui - kbetterthankdialogbase.ui -) - -tde_add_kpart( ${target} AUTOMOC - SOURCES ${${target}_SRCS} - LINK tdeinit_kded-shared tdewalletbackend-shared - DEPENDENCIES dcopidl - DESTINATION ${PLUGIN_INSTALL_DIR} -) diff --git a/kio/misc/tdewalletd/Makefile.am b/kio/misc/tdewalletd/Makefile.am deleted file mode 100644 index 5d52fa810..000000000 --- a/kio/misc/tdewalletd/Makefile.am +++ /dev/null @@ -1,35 +0,0 @@ -# This file is part of the KDE libraries -# Copyright (C) 2002 George Staikos - -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Library General Public -# License as published by the Free Software Foundation; either -# version 2 of the License, or (at your option) any later version. - -# This library 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 -# Library General Public License for more details. - -# You should have received a copy of the GNU Library General Public License -# along with this library; see the file COPYING.LIB. If not, write to -# the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -# Boston, MA 02110-1301, USA. - -INCLUDES= -I$(srcdir)/.. -I$(top_srcdir) -I$(top_srcdir)/tdewallet/backend -I$(top_builddir)/tdewallet/backend -I$(top_srcdir)/tdewallet/client -I$(top_builddir)/tdewallet/client $(all_includes) - -kde_module_LTLIBRARIES = kded_tdewalletd.la - -kded_tdewalletd_la_LDFLAGS = $(all_libraries) -module -avoid-version -kded_tdewalletd_la_LIBADD = $(LIB_KIO) ../../../tdewallet/backend/libtdewalletbackend.la ../../../tdewallet/client/libtdewalletclient.la $(LIB_KDED) $(LIB_QT) $(top_builddir)/dcop/libDCOP.la $(LIB_TDECORE) $(LIB_TDEUI) -kded_tdewalletd_la_SOURCES = tdewalletd.cpp tdewalletd.skel ktimeout.cpp tdewalletwizard.ui kbetterthankdialogbase.ui - -METASOURCES = AUTO - -noinst_HEADERS = tdewalletd.h ktimeout.h tdewalletwizard.ui.h - -services_DATA = tdewalletd.desktop -servicesdir = $(kde_servicesdir)/kded - -tdewalletwizard.lo: tdewalletwizard.ui tdewalletwizard.ui.h -kbetterthankdialogbase.lo: kbetterthankdialogbase.ui kbetterthankdialogbase.ui.h diff --git a/kio/misc/tdewalletd/kbetterthankdialogbase.ui b/kio/misc/tdewalletd/kbetterthankdialogbase.ui deleted file mode 100644 index a02d5def7..000000000 --- a/kio/misc/tdewalletd/kbetterthankdialogbase.ui +++ /dev/null @@ -1,154 +0,0 @@ - -KBetterThanKDialogBase - - - KBetterThanKDialogBase - - - - 0 - 0 - 479 - 109 - - - - - - - - unnamed - - - Fixed - - - - _label - - - - - spacer1 - - - Horizontal - - - Expanding - - - - 41 - 21 - - - - - - layout1 - - - - unnamed - - - - _allowOnce - - - Allow &Once - - - true - - - - - _allowAlways - - - Allow &Always - - - - - _deny - - - &Deny - - - - - _denyForever - - - Deny &Forever - - - - - - - spacer2 - - - Horizontal - - - Expanding - - - - 61 - 21 - - - - - - - - - - _allowOnce - clicked() - KBetterThanKDialogBase - clicked() - - - _allowAlways - clicked() - KBetterThanKDialogBase - clicked() - - - _deny - clicked() - KBetterThanKDialogBase - clicked() - - - _denyForever - clicked() - KBetterThanKDialogBase - clicked() - - - - kactivelabel.h - kbetterthankdialogbase.ui.h - - - clicked() - setLabel( const TQString & label ) - init() - accept() - reject() - - - - kactivelabel.h - - diff --git a/kio/misc/tdewalletd/kbetterthankdialogbase.ui.h b/kio/misc/tdewalletd/kbetterthankdialogbase.ui.h deleted file mode 100644 index 2b3e16b0d..000000000 --- a/kio/misc/tdewalletd/kbetterthankdialogbase.ui.h +++ /dev/null @@ -1,50 +0,0 @@ -/**************************************************************************** -** ui.h extension file, included from the uic-generated form implementation. -** -** If you want to add, delete, or rename functions or slots, use -** Qt Designer to update this file, preserving your code. -** -** You should not define a constructor or destructor in this file. -** Instead, write your code in functions called init() and destroy(). -** These will automatically be called by the form's constructor and -** destructor. -*****************************************************************************/ - - -void KBetterThanKDialogBase::clicked() -{ - if (sender() == _allowOnce) { - done(0); - } else if (sender() == _allowAlways) { - done(1); - } else if (sender() == _deny) { - done(2); - } else if (sender() == _denyForever) { - done(3); - } -} - - -void KBetterThanKDialogBase::setLabel( const TQString & label ) -{ - _label->setText(label); -} - - -void KBetterThanKDialogBase::init() -{ - _allowOnce->setFocus(); -} - - -void KBetterThanKDialogBase::accept() -{ - setResult(0); -} - - -void KBetterThanKDialogBase::reject() -{ - TQDialog::reject(); - setResult(2); -} diff --git a/kio/misc/tdewalletd/ktimeout.cpp b/kio/misc/tdewalletd/ktimeout.cpp deleted file mode 100644 index c431ecf69..000000000 --- a/kio/misc/tdewalletd/ktimeout.cpp +++ /dev/null @@ -1,84 +0,0 @@ -/* - This file is part of the KDE libraries - - Copyright (c) 2003 George Staikos - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. - -*/ - -#include "ktimeout.h" - -KTimeout::KTimeout(int size) -: TQObject(), _timers(size) { - _timers.setAutoDelete(true); -} - - -KTimeout::~KTimeout() { - clear(); -} - - -void KTimeout::clear() { - _timers.clear(); -} - - -void KTimeout::removeTimer(int id) { - TQTimer *t = _timers.find(id); - if (t != 0L) { - _timers.remove(id); // autodeletes - } -} - - -void KTimeout::addTimer(int id, int timeout) { - if (_timers.find(id) != 0L) { - return; - } - - TQTimer *t = new TQTimer; - connect(t, TQT_SIGNAL(timeout()), this, TQT_SLOT(timeout())); - t->start(timeout); - _timers.insert(id, t); -} - - -void KTimeout::resetTimer(int id, int timeout) { - TQTimer *t = _timers.find(id); - if (t) { - t->changeInterval(timeout); - } -} - - -void KTimeout::timeout() { - const TQTimer *t = static_cast(sender()); - if (t) { - TQIntDictIterator it(_timers); - for (; it.current(); ++it) { - if (it.current() == t) { - emit timedOut(it.currentKey()); - return; - } - } - } -} - - -#include "ktimeout.moc" - diff --git a/kio/misc/tdewalletd/ktimeout.h b/kio/misc/tdewalletd/ktimeout.h deleted file mode 100644 index 441e4ed77..000000000 --- a/kio/misc/tdewalletd/ktimeout.h +++ /dev/null @@ -1,52 +0,0 @@ -/* - This file is part of the KDE libraries - - Copyright (c) 2003 George Staikos - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. - -*/ -#ifndef _KTIMEOUT_H_ -#define _KTIMEOUT_H_ - -#include -#include -#include - -// @internal -class KTimeout : public TQObject { - Q_OBJECT - public: - KTimeout(int size = 29); - virtual ~KTimeout(); - - signals: - void timedOut(int id); - - public slots: - void resetTimer(int id, int timeout); - void addTimer(int id, int timeout); - void removeTimer(int id); - void clear(); - - private slots: - void timeout(); - - private: - TQIntDict _timers; -}; - -#endif diff --git a/kio/misc/tdewalletd/tdewalletd.cpp b/kio/misc/tdewalletd/tdewalletd.cpp deleted file mode 100644 index 3f59f4e91..000000000 --- a/kio/misc/tdewalletd/tdewalletd.cpp +++ /dev/null @@ -1,1514 +0,0 @@ -/* - This file is part of the KDE libraries - - Copyright (c) 2002-2004 George Staikos - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. - -*/ - -#include "kbetterthankdialogbase.h" -#include "tdewalletwizard.h" -#include "tdewalletd.h" -#include "ktimeout.h" - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -#include - -extern "C" { - KDE_EXPORT KDEDModule *create_tdewalletd(const TQCString &name) { - return new KWalletD(name); - } -} - - -class KWalletTransaction { - public: - KWalletTransaction() { - tType = Unknown; - transaction = 0L; - client = 0L; - modal = false; - } - - ~KWalletTransaction() { - // Don't delete these! - transaction = 0L; - client = 0L; - } - - enum Type { Unknown, Open, ChangePassword, OpenFail }; - DCOPClient *client; - DCOPClientTransaction *transaction; - Type tType; - TQCString rawappid, returnObject; - TQCString appid; - uint wId; - TQString wallet; - bool modal; -}; - - -KWalletD::KWalletD(const TQCString &name) -: KDEDModule(name), _failed(0) { - srand(time(0)); - _showingFailureNotify = false; - _transactions.setAutoDelete(true); - _timeouts = new KTimeout(17); - _closeIdle = false; - _idleTime = 0; - connect(_timeouts, TQT_SIGNAL(timedOut(int)), this, TQT_SLOT(timedOut(int))); - reconfigure(); - TDEGlobal::dirs()->addResourceType("tdewallet", "share/apps/tdewallet"); - connect(TDEApplication::dcopClient(), - TQT_SIGNAL(applicationRemoved(const TQCString&)), - this, - TQT_SLOT(slotAppUnregistered(const TQCString&))); - _dw = new KDirWatch(this, "KWallet Directory Watcher"); - _dw->addDir(TDEGlobal::dirs()->saveLocation("tdewallet")); - _dw->startScan(true); - connect(_dw, TQT_SIGNAL(dirty(const TQString&)), this, TQT_SLOT(emitWalletListDirty())); -} - - -KWalletD::~KWalletD() { - delete _timeouts; - _timeouts = 0; - - closeAllWallets(); - _transactions.clear(); -} - - -int KWalletD::generateHandle() { - int rc; - - // ASSUMPTION: RAND_MAX is fairly large. - do { - rc = rand(); - } while (_wallets.find(rc) || rc == 0); - - return rc; -} - - -void KWalletD::processTransactions() { - static bool processing = false; - - if (processing) { - return; - } - - processing = true; - - // Process remaining transactions - KWalletTransaction *xact; - while (!_transactions.isEmpty()) { - xact = _transactions.first(); - TQCString replyType; - int res; - - assert(xact->tType != KWalletTransaction::Unknown); - - switch (xact->tType) { - case KWalletTransaction::Open: - res = doTransactionOpen(xact->appid, xact->wallet, xact->wId, xact->modal); - replyType = "int"; - if (!xact->returnObject.isEmpty()) { - DCOPRef(xact->rawappid, xact->returnObject).send("walletOpenResult", res); - } - - // multiple requests from the same client - // should not produce multiple password - // dialogs on a failure - if (res < 0) { - TQPtrListIterator it(_transactions); - KWalletTransaction *x; - while ((x = it.current()) && x != xact) { - ++it; - } - if (x) { - ++it; - } - while ((x = it.current())) { - if (xact->appid == x->appid && x->tType == KWalletTransaction::Open && x->wallet == xact->wallet && x->wId == xact->wId) { - x->tType = KWalletTransaction::OpenFail; - } - ++it; - } - } - break; - case KWalletTransaction::OpenFail: - res = -1; - replyType = "int"; - if (!xact->returnObject.isEmpty()) { - DCOPRef(xact->rawappid, xact->returnObject).send("walletOpenResult", res); - } - break; - case KWalletTransaction::ChangePassword: - doTransactionChangePassword(xact->appid, xact->wallet, xact->wId); - // fall through - no return - default: - _transactions.removeRef(xact); - continue; - } - - if (xact->returnObject.isEmpty() && xact->tType != KWalletTransaction::ChangePassword) { - TQByteArray replyData; - TQDataStream stream(replyData, IO_WriteOnly); - stream << res; - xact->client->endTransaction(xact->transaction, replyType, replyData); - } - _transactions.removeRef(xact); - } - - processing = false; -} - - -void KWalletD::openAsynchronous(const TQString& wallet, const TQCString& returnObject, uint wId) { - DCOPClient *dc = callingDcopClient(); - if (!dc) { - return; - } - - TQCString appid = dc->senderId(); - if (!_enabled || - !TQRegExp("^[A-Za-z0-9]+[A-Za-z0-9\\s\\-_]*$").exactMatch(wallet)) { - DCOPRef(appid, returnObject).send("walletOpenResult", -1); - return; - } - - TQCString peerName = friendlyDCOPPeerName(); - - KWalletTransaction *xact = new KWalletTransaction; - - xact->appid = peerName; - xact->rawappid = appid; - xact->client = callingDcopClient(); - xact->wallet = wallet; - xact->wId = wId; - xact->tType = KWalletTransaction::Open; - xact->returnObject = returnObject; - _transactions.append(xact); - - DCOPRef(appid, returnObject).send("walletOpenResult", 0); - - TQTimer::singleShot(0, this, TQT_SLOT(processTransactions())); - checkActiveDialog(); -} - - -int KWalletD::openPath(const TQString& path, uint wId) { - if (!_enabled) { // guard - return -1; - } - - // FIXME: setup transaction - int rc = internalOpen(friendlyDCOPPeerName(), path, true, wId); - return rc; -} - - -int KWalletD::open(const TQString& wallet, uint wId) { - if (!_enabled) { // guard - return -1; - } - - if (!TQRegExp("^[A-Za-z0-9]+[A-Za-z0-9\\s\\-_]*$").exactMatch(wallet)) { - return -1; - } - - TQCString appid = friendlyDCOPPeerName(); - - KWalletTransaction *xact = new KWalletTransaction; - _transactions.append(xact); - - xact->appid = appid; - xact->client = callingDcopClient(); - xact->transaction = xact->client->beginTransaction(); - xact->wallet = wallet; - xact->wId = wId; - xact->tType = KWalletTransaction::Open; - xact->modal = true; // mark dialogs as modal, the app has blocking wait - TQTimer::singleShot(0, this, TQT_SLOT(processTransactions())); - checkActiveDialog(); - return 0; // process later -} - - -// Sets up a dialog that will be shown by tdewallet. -void KWalletD::setupDialog( TQWidget* dialog, WId wId, const TQCString& appid, bool modal ) { - if( wId != 0 ) - KWin::setMainWindow( dialog, wId ); // correct, set dialog parent - else { - if( appid.isEmpty()) - kdWarning() << "Using tdewallet without parent window!" << endl; - else - kdWarning() << "Application '" << appid << "' using tdewallet without parent window!" << endl; - // allow dialog activation even if it interrupts, better than trying hacks - // with keeping the dialog on top or on all desktops - kapp->updateUserTimestamp(); - } - if( modal ) - KWin::setState( dialog->winId(), NET::Modal ); - else - KWin::clearState( dialog->winId(), NET::Modal ); - activeDialog = dialog; -} - -// If there's a dialog already open and another application tries some operation that'd lead to -// opening a dialog, that application will be blocked by this dialog. A proper solution would -// be to set the second application's window also as a parent for the active dialog, so that -// KWin properly handles focus changes and so on, but there's currently no support for multiple -// dialog parents. Hopefully to be done in KDE4, for now just use all kinds of bad hacks to make -// sure the user doesn't overlook the active dialog. -void KWalletD::checkActiveDialog() { - if( !activeDialog || !activeDialog->isShown()) - return; - kapp->updateUserTimestamp(); - KWin::setState( activeDialog->winId(), NET::KeepAbove ); - KWin::setOnAllDesktops( activeDialog->winId(), true ); - KWin::forceActiveWindow( activeDialog->winId()); -} - -int KWalletD::doTransactionOpen(const TQCString& appid, const TQString& wallet, uint wId, bool modal) { - if (_firstUse && !wallets().contains(KWallet::Wallet::LocalWallet())) { - // First use wizard - KWalletWizard *wiz = new KWalletWizard(0); - setupDialog( wiz, wId, appid, modal ); - int rc = wiz->exec(); - if (rc == TQDialog::Accepted) { - TDEConfig cfg("tdewalletrc"); - cfg.setGroup("Wallet"); - cfg.writeEntry("First Use", false); - cfg.writeEntry("Enabled", wiz->_useWallet->isChecked()); - cfg.writeEntry("Close When Idle", wiz->_closeIdle->isChecked()); - cfg.writeEntry("Use One Wallet", !wiz->_networkWallet->isChecked()); - cfg.sync(); - reconfigure(); - - if (!wiz->_useWallet->isChecked()) { - delete wiz; - return -1; - } - - // Create the wallet - KWallet::Backend *b = new KWallet::Backend(KWallet::Wallet::LocalWallet()); - TQByteArray p; - p.duplicate(wiz->_pass1->text().utf8(), wiz->_pass1->text().length()); - b->open(p); - b->createFolder(KWallet::Wallet::PasswordFolder()); - b->createFolder(KWallet::Wallet::FormDataFolder()); - b->close(p); - p.fill(0); - delete b; - delete wiz; - } else { - delete wiz; - return -1; - } - } else if (_firstUse) { - TDEConfig cfg("tdewalletrc"); - _firstUse = false; - cfg.setGroup("Wallet"); - cfg.writeEntry("First Use", false); - cfg.sync(); - } - - int rc = internalOpen(appid, wallet, false, wId, modal); - return rc; -} - -int KWalletD::tryOpen(const TQString& wallet, const TQCString& password) -{ - if (isOpen(wallet)) - return 0; - - if (_tryOpenBlocked.isActive()) { - kdDebug() << "tryOpen is active.." << endl; - return -1; - } - - if (!KWallet::Backend::exists(wallet)) - return -2; - - KWallet::Backend *b = new KWallet::Backend(wallet, false /*isPath*/); - int rc = b->open(TQByteArray().duplicate(password, strlen(password))); - if (rc == 0) { - _wallets.insert(rc = generateHandle(), b); - _passwords[wallet] = password; - b->ref(); - _tryOpenBlocked.stop(); - TQByteArray data; - TQDataStream ds(data, IO_WriteOnly); - ds << wallet; - emitDCOPSignal("walletOpened(TQString)", data); - } - else { - delete b; - // make sure that we're not bombed with a dictionary attack - _tryOpenBlocked.start (30 * 1000, true /*single shot*/); - if (++_failed > 5) { - _failed = 0; - TQTimer::singleShot(0, this, TQT_SLOT(notifyFailures())); - } - - rc = -1; - } - return rc; -} - -int KWalletD::internalOpen(const TQCString& appid, const TQString& wallet, bool isPath, WId w, bool modal) { - int rc = -1; - bool brandNew = false; - - TQCString thisApp; - if (appid.isEmpty()) { - thisApp = "TDE System"; - } else { - thisApp = appid; - } - - if (implicitDeny(wallet, thisApp)) { - return -1; - } - - for (TQIntDictIterator i(_wallets); i.current(); ++i) { - if (i.current()->walletName() == wallet) { - rc = i.currentKey(); - break; - } - } - - if (rc == -1) { - if (_wallets.count() > 20) { - kdDebug() << "Too many wallets open." << endl; - return -1; - } - - KWallet::Backend *b = new KWallet::Backend(wallet, isPath); - KPasswordDialog *kpd = 0L; - bool emptyPass = false; - if ((isPath && TQFile::exists(wallet)) || (!isPath && KWallet::Backend::exists(wallet))) { - int pwless = b->open(TQByteArray()); - if (0 != pwless || !b->isOpen()) { - if (pwless == 0) { - // release, start anew - delete b; - b = new KWallet::Backend(wallet, isPath); - } - kpd = new KPasswordDialog(KPasswordDialog::Password, false, 0); - if (appid.isEmpty()) { - kpd->setPrompt(i18n("TDE has requested to open the wallet '%1'. Please enter the password for this wallet below.").arg(TQStyleSheet::escape(wallet))); - } else { - kpd->setPrompt(i18n("The application '%1' has requested to open the wallet '%2'. Please enter the password for this wallet below.").arg(TQStyleSheet::escape(appid)).arg(TQStyleSheet::escape(wallet))); - } - brandNew = false; - kpd->setButtonOK(KGuiItem(i18n("&Open"),"fileopen")); - } else { - emptyPass = true; - } - } else if (wallet == KWallet::Wallet::LocalWallet() || - wallet == KWallet::Wallet::NetworkWallet()) { - // Auto create these wallets. - kpd = new KPasswordDialog(KPasswordDialog::NewPassword, false, 0); - if (appid.isEmpty()) { - kpd->setPrompt(i18n("TDE has requested to open the wallet. This is used to store sensitive data in a secure fashion. Please enter a password to use with this wallet or click cancel to deny the application's request.")); - } else { - kpd->setPrompt(i18n("The application '%1' has requested to open the TDE wallet. This is used to store sensitive data in a secure fashion. Please enter a password to use with this wallet or click cancel to deny the application's request.").arg(TQStyleSheet::escape(appid))); - } - brandNew = true; - kpd->setButtonOK(KGuiItem(i18n("&Open"),"fileopen")); - } else { - kpd = new KPasswordDialog(KPasswordDialog::NewPassword, false, 0); - if (appid.length() == 0) { - kpd->setPrompt(i18n("TDE has requested to create a new wallet named '%1'. Please choose a password for this wallet, or cancel to deny the application's request.").arg(TQStyleSheet::escape(wallet))); - } else { - kpd->setPrompt(i18n("The application '%1' has requested to create a new wallet named '%2'. Please choose a password for this wallet, or cancel to deny the application's request.").arg(TQStyleSheet::escape(appid)).arg(TQStyleSheet::escape(wallet))); - } - brandNew = true; - kpd->setButtonOK(KGuiItem(i18n("C&reate"),"filenew")); - } - - if (kpd) { - kpd->setCaption(i18n("TDE Wallet Service")); - kpd->setAllowEmptyPasswords(true); - } - - const char *p = 0L; - while (!b->isOpen()) { - assert(kpd); // kpd can't be null if isOpen() is false - setupDialog( kpd, w, appid, modal ); - if (kpd->exec() == KDialog::Accepted) { - p = kpd->password(); - int rc = b->open(TQByteArray().duplicate(p, strlen(p))); - if (!b->isOpen()) { - kpd->setPrompt(i18n("Error opening the wallet '%1'. Please try again.
(Error code %2: %3)").arg(TQStyleSheet::escape(wallet)).arg(rc).arg(KWallet::Backend::openRCToString(rc))); - kpd->clearPassword(); - } - } else { - break; - } - } - - if (!emptyPass && (!p || !b->isOpen())) { - delete b; - delete kpd; - return -1; - } - - if (emptyPass && _openPrompt && !isAuthorizedApp(appid, wallet, w)) { - delete b; - delete kpd; - return -1; - } - - _wallets.insert(rc = generateHandle(), b); - if (emptyPass) { - _passwords[wallet] = ""; - } else { - _passwords[wallet] = p; - } - _handles[appid].append(rc); - - delete kpd; // don't refactor this!! Argh I hate KPassDlg - - if (brandNew) { - createFolder(rc, KWallet::Wallet::PasswordFolder()); - createFolder(rc, KWallet::Wallet::FormDataFolder()); - } - - b->ref(); - if (_closeIdle && _timeouts) { - _timeouts->addTimer(rc, _idleTime); - } - TQByteArray data; - TQDataStream ds(data, IO_WriteOnly); - ds << wallet; - if (brandNew) { - emitDCOPSignal("walletCreated(TQString)", data); - } - emitDCOPSignal("walletOpened(TQString)", data); - if (_wallets.count() == 1 && _launchManager) { - TDEApplication::startServiceByDesktopName("tdewalletmanager-tdewalletd"); - } - } else { - if (!_handles[appid].contains(rc) && _openPrompt && !isAuthorizedApp(appid, wallet, w)) { - return -1; - } - _handles[appid].append(rc); - _wallets.find(rc)->ref(); - } - - return rc; -} - - -bool KWalletD::isAuthorizedApp(const TQCString& appid, const TQString& wallet, WId w) { - int response = 0; - - TQCString thisApp; - if (appid.isEmpty()) { - thisApp = "TDE System"; - } else { - thisApp = appid; - } - - if (!implicitAllow(wallet, thisApp)) { - KBetterThanKDialogBase *dialog = new KBetterThanKDialogBase; - if (appid.isEmpty()) { - dialog->setLabel(i18n("TDE has requested access to the open wallet '%1'.").arg(TQStyleSheet::escape(wallet))); - } else { - dialog->setLabel(i18n("The application '%1' has requested access to the open wallet '%2'.").arg(TQStyleSheet::escape(TQString(appid))).arg(TQStyleSheet::escape(wallet))); - } - setupDialog( dialog, w, appid, false ); - response = dialog->exec(); - delete dialog; - } - - if (response == 0 || response == 1) { - if (response == 1) { - TDEConfig cfg("tdewalletrc"); - cfg.setGroup("Auto Allow"); - TQStringList apps = cfg.readListEntry(wallet); - if (!apps.contains(thisApp)) { - apps += thisApp; - _implicitAllowMap[wallet] += thisApp; - cfg.writeEntry(wallet, apps); - cfg.sync(); - } - } - } else if (response == 3) { - TDEConfig cfg("tdewalletrc"); - cfg.setGroup("Auto Deny"); - TQStringList apps = cfg.readListEntry(wallet); - if (!apps.contains(thisApp)) { - apps += thisApp; - _implicitDenyMap[wallet] += thisApp; - cfg.writeEntry(wallet, apps); - cfg.sync(); - } - return false; - } else { - return false; - } - return true; -} - - -int KWalletD::deleteWallet(const TQString& wallet) { - TQString path = TDEGlobal::dirs()->saveLocation("tdewallet") + TQDir::separator() + wallet + ".kwl"; - - if (TQFile::exists(path)) { - close(wallet, true); - TQFile::remove(path); - TQByteArray data; - TQDataStream ds(data, IO_WriteOnly); - ds << wallet; - emitDCOPSignal("walletDeleted(TQString)", data); - return 0; - } - - return -1; -} - - -void KWalletD::changePassword(const TQString& wallet, uint wId) { - TQCString appid = friendlyDCOPPeerName(); - - KWalletTransaction *xact = new KWalletTransaction; - - xact->appid = appid; - xact->client = callingDcopClient(); - xact->wallet = wallet; - xact->wId = wId; - xact->tType = KWalletTransaction::ChangePassword; - - _transactions.append(xact); - - TQTimer::singleShot(0, this, TQT_SLOT(processTransactions())); - checkActiveDialog(); -} - - -void KWalletD::doTransactionChangePassword(const TQCString& appid, const TQString& wallet, uint wId) { - TQIntDictIterator it(_wallets); - KWallet::Backend *w = 0L; - int handle = -1; - bool reclose = false; - - for (; it.current(); ++it) { - if (it.current()->walletName() == wallet) { - break; - } - } - - if (!it.current()) { - handle = doTransactionOpen(appid, wallet, wId,false); - if (-1 == handle) { - KMessageBox::sorryWId(wId, i18n("Unable to open wallet. The wallet must be opened in order to change the password."), i18n("TDE Wallet Service")); - return; - } - - w = _wallets.find(handle); - reclose = true; - } else { - handle = it.currentKey(); - w = it.current(); - } - - assert(w); - - KPasswordDialog *kpd; - kpd = new KPasswordDialog(KPasswordDialog::NewPassword, false, 0); - kpd->setPrompt(i18n("Please choose a new password for the wallet '%1'.").arg(TQStyleSheet::escape(wallet))); - kpd->setCaption(i18n("TDE Wallet Service")); - kpd->setAllowEmptyPasswords(true); - setupDialog( kpd, wId, appid, false ); - if (kpd->exec() == KDialog::Accepted) { - const char *p = kpd->password(); - if (p) { - _passwords[wallet] = p; - TQByteArray pa; - pa.duplicate(p, strlen(p)); - int rc = w->close(pa); - if (rc < 0) { - KMessageBox::sorryWId(wId, i18n("Error re-encrypting the wallet. Password was not changed."), i18n("TDE Wallet Service")); - reclose = true; - } else { - rc = w->open(pa); - if (rc < 0) { - KMessageBox::sorryWId(wId, i18n("Error reopening the wallet. Data may be lost."), i18n("TDE Wallet Service")); - reclose = true; - } - } - } - } - - delete kpd; - - if (reclose) { - close(handle, true); - } -} - - -int KWalletD::close(const TQString& wallet, bool force) { - int handle = -1; - KWallet::Backend *w = 0L; - - for (TQIntDictIterator it(_wallets); - it.current(); - ++it) { - if (it.current()->walletName() == wallet) { - handle = it.currentKey(); - w = it.current(); - break; - } - } - - return closeWallet(w, handle, force); -} - - -int KWalletD::closeWallet(KWallet::Backend *w, int handle, bool force) { - if (w) { - const TQString& wallet = w->walletName(); - assert(_passwords.contains(wallet)); - if (w->refCount() == 0 || force) { - invalidateHandle(handle); - if (_closeIdle && _timeouts) { - _timeouts->removeTimer(handle); - } - _wallets.remove(handle); - if (_passwords.contains(wallet)) { - w->close(TQByteArray().duplicate(_passwords[wallet].data(), _passwords[wallet].length())); - _passwords[wallet].fill(0); - _passwords.remove(wallet); - } - doCloseSignals(handle, wallet); - delete w; - return 0; - } - return 1; - } - - return -1; -} - - -int KWalletD::close(int handle, bool force) { - TQCString appid = friendlyDCOPPeerName(); - KWallet::Backend *w = _wallets.find(handle); - bool contains = false; - - if (w) { // the handle is valid - if (_handles.contains(appid)) { // we know this app - if (_handles[appid].contains(handle)) { - // the app owns this handle - _handles[appid].remove(_handles[appid].find(handle)); - contains = true; - if (_handles[appid].isEmpty()) { - _handles.remove(appid); - } - } - } - - // watch the side effect of the deref() - if ((contains && w->deref() == 0 && !_leaveOpen) || force) { - if (_closeIdle && _timeouts) { - _timeouts->removeTimer(handle); - } - _wallets.remove(handle); - if (force) { - invalidateHandle(handle); - } - if (_passwords.contains(w->walletName())) { - w->close(TQByteArray().duplicate(_passwords[w->walletName()].data(), _passwords[w->walletName()].length())); - _passwords[w->walletName()].fill(0); - _passwords.remove(w->walletName()); - } - doCloseSignals(handle, w->walletName()); - delete w; - return 0; - } - return 1; // not closed - } - - return -1; // not open to begin with, or other error -} - - -bool KWalletD::isOpen(const TQString& wallet) const { - for (TQIntDictIterator it(_wallets); - it.current(); - ++it) { - if (it.current()->walletName() == wallet) { - return true; - } - } - return false; -} - - -bool KWalletD::isOpen(int handle) { - if (handle == 0) { - return false; - } - - KWallet::Backend *rc = _wallets.find(handle); - - if (rc == 0 && ++_failed > 5) { - _failed = 0; - TQTimer::singleShot(0, this, TQT_SLOT(notifyFailures())); - } else if (rc != 0) { - _failed = 0; - } - - return rc != 0; -} - - -TQStringList KWalletD::wallets() const { - TQString path = TDEGlobal::dirs()->saveLocation("tdewallet"); - TQDir dir(path, "*.kwl"); - TQStringList rc; - - dir.setFilter(TQDir::Files | TQDir::NoSymLinks); - - const TQFileInfoList *list = dir.entryInfoList(); - TQFileInfoListIterator it(*list); - TQFileInfo *fi; - while ((fi = it.current()) != 0L) { - TQString fn = fi->fileName(); - if (fn.endsWith(".kwl")) { - fn.truncate(fn.length()-4); - } - rc += fn; - ++it; - } - return rc; -} - - -void KWalletD::sync(int handle) { - KWallet::Backend *b; - - if ((b = getWallet(friendlyDCOPPeerName(), handle))) { - TQByteArray p; - TQString wallet = b->walletName(); - p.duplicate(_passwords[wallet].data(), _passwords[wallet].length()); - b->sync(p); - p.fill(0); - } -} - - -TQStringList KWalletD::folderList(int handle) { - KWallet::Backend *b; - - if ((b = getWallet(friendlyDCOPPeerName(), handle))) { - return b->folderList(); - } - - return TQStringList(); -} - - -bool KWalletD::hasFolder(int handle, const TQString& f) { - KWallet::Backend *b; - - if ((b = getWallet(friendlyDCOPPeerName(), handle))) { - return b->hasFolder(f); - } - - return false; -} - - -bool KWalletD::removeFolder(int handle, const TQString& f) { - KWallet::Backend *b; - - if ((b = getWallet(friendlyDCOPPeerName(), handle))) { - bool rc = b->removeFolder(f); - // write changes to disk immediately - TQByteArray p; - TQString wallet = b->walletName(); - p.duplicate(_passwords[wallet].data(), _passwords[wallet].length()); - b->sync(p); - p.fill(0); - TQByteArray data; - TQDataStream ds(data, IO_WriteOnly); - ds << b->walletName(); - emitDCOPSignal("folderListUpdated(TQString)", data); - return rc; - } - - return false; -} - - -bool KWalletD::createFolder(int handle, const TQString& f) { - KWallet::Backend *b; - - if ((b = getWallet(friendlyDCOPPeerName(), handle))) { - bool rc = b->createFolder(f); - // write changes to disk immediately - TQByteArray p; - TQString wallet = b->walletName(); - p.duplicate(_passwords[wallet].data(), _passwords[wallet].length()); - b->sync(p); - p.fill(0); - TQByteArray data; - TQDataStream ds(data, IO_WriteOnly); - ds << b->walletName(); - emitDCOPSignal("folderListUpdated(TQString)", data); - return rc; - } - - return false; -} - - -TQByteArray KWalletD::readMap(int handle, const TQString& folder, const TQString& key) { - KWallet::Backend *b; - - if ((b = getWallet(friendlyDCOPPeerName(), handle))) { - b->setFolder(folder); - KWallet::Entry *e = b->readEntry(key); - if (e && e->type() == KWallet::Wallet::Map) { - return e->map(); - } - } - - return TQByteArray(); -} - - -TQMap KWalletD::readMapList(int handle, const TQString& folder, const TQString& key) { - KWallet::Backend *b; - - if ((b = getWallet(friendlyDCOPPeerName(), handle))) { - b->setFolder(folder); - TQPtrList e = b->readEntryList(key); - TQMap rc; - TQPtrListIterator it(e); - KWallet::Entry *entry; - while ((entry = it.current())) { - if (entry->type() == KWallet::Wallet::Map) { - rc.insert(entry->key(), entry->map()); - } - ++it; - } - return rc; - } - - return TQMap(); -} - - -TQByteArray KWalletD::readEntry(int handle, const TQString& folder, const TQString& key) { - KWallet::Backend *b; - - if ((b = getWallet(friendlyDCOPPeerName(), handle))) { - b->setFolder(folder); - KWallet::Entry *e = b->readEntry(key); - if (e) { - return e->value(); - } - } - - return TQByteArray(); -} - - -TQMap KWalletD::readEntryList(int handle, const TQString& folder, const TQString& key) { - KWallet::Backend *b; - - if ((b = getWallet(friendlyDCOPPeerName(), handle))) { - b->setFolder(folder); - TQPtrList e = b->readEntryList(key); - TQMap rc; - TQPtrListIterator it(e); - KWallet::Entry *entry; - while ((entry = it.current())) { - rc.insert(entry->key(), entry->value()); - ++it; - } - return rc; - } - - return TQMap(); -} - - -TQStringList KWalletD::entryList(int handle, const TQString& folder) { - KWallet::Backend *b; - - if ((b = getWallet(friendlyDCOPPeerName(), handle))) { - b->setFolder(folder); - return b->entryList(); - } - - return TQStringList(); -} - - -TQString KWalletD::readPassword(int handle, const TQString& folder, const TQString& key) { - KWallet::Backend *b; - - if ((b = getWallet(friendlyDCOPPeerName(), handle))) { - b->setFolder(folder); - KWallet::Entry *e = b->readEntry(key); - if (e && e->type() == KWallet::Wallet::Password) { - return e->password(); - } - } - - return TQString::null; -} - - -TQMap KWalletD::readPasswordList(int handle, const TQString& folder, const TQString& key) { - KWallet::Backend *b; - - if ((b = getWallet(friendlyDCOPPeerName(), handle))) { - b->setFolder(folder); - TQPtrList e = b->readEntryList(key); - TQMap rc; - TQPtrListIterator it(e); - KWallet::Entry *entry; - while ((entry = it.current())) { - if (entry->type() == KWallet::Wallet::Password) { - rc.insert(entry->key(), entry->password()); - } - ++it; - } - return rc; - } - - return TQMap(); -} - - -int KWalletD::writeMap(int handle, const TQString& folder, const TQString& key, const TQByteArray& value) { - KWallet::Backend *b; - - if ((b = getWallet(friendlyDCOPPeerName(), handle))) { - b->setFolder(folder); - KWallet::Entry e; - e.setKey(key); - e.setValue(value); - e.setType(KWallet::Wallet::Map); - b->writeEntry(&e); - // write changes to disk immediately - TQByteArray p; - TQString wallet = b->walletName(); - p.duplicate(_passwords[wallet].data(), _passwords[wallet].length()); - b->sync(p); - p.fill(0); - emitFolderUpdated(b->walletName(), folder); - return 0; - } - - return -1; -} - - -int KWalletD::writeEntry(int handle, const TQString& folder, const TQString& key, const TQByteArray& value, int entryType) { - KWallet::Backend *b; - - if ((b = getWallet(friendlyDCOPPeerName(), handle))) { - b->setFolder(folder); - KWallet::Entry e; - e.setKey(key); - e.setValue(value); - e.setType(KWallet::Wallet::EntryType(entryType)); - b->writeEntry(&e); - // write changes to disk immediately - TQByteArray p; - TQString wallet = b->walletName(); - p.duplicate(_passwords[wallet].data(), _passwords[wallet].length()); - b->sync(p); - p.fill(0); - emitFolderUpdated(b->walletName(), folder); - return 0; - } - - return -1; -} - - -int KWalletD::writeEntry(int handle, const TQString& folder, const TQString& key, const TQByteArray& value) { - KWallet::Backend *b; - - if ((b = getWallet(friendlyDCOPPeerName(), handle))) { - b->setFolder(folder); - KWallet::Entry e; - e.setKey(key); - e.setValue(value); - e.setType(KWallet::Wallet::Stream); - b->writeEntry(&e); - // write changes to disk immediately - TQByteArray p; - TQString wallet = b->walletName(); - p.duplicate(_passwords[wallet].data(), _passwords[wallet].length()); - b->sync(p); - p.fill(0); - emitFolderUpdated(b->walletName(), folder); - return 0; - } - - return -1; -} - - -int KWalletD::writePassword(int handle, const TQString& folder, const TQString& key, const TQString& value) { - KWallet::Backend *b; - - if ((b = getWallet(friendlyDCOPPeerName(), handle))) { - b->setFolder(folder); - KWallet::Entry e; - e.setKey(key); - e.setValue(value); - e.setType(KWallet::Wallet::Password); - b->writeEntry(&e); - // write changes to disk immediately - TQByteArray p; - TQString wallet = b->walletName(); - p.duplicate(_passwords[wallet].data(), _passwords[wallet].length()); - b->sync(p); - p.fill(0); - emitFolderUpdated(b->walletName(), folder); - return 0; - } - - return -1; -} - - -int KWalletD::entryType(int handle, const TQString& folder, const TQString& key) { - KWallet::Backend *b; - - if ((b = getWallet(friendlyDCOPPeerName(), handle))) { - if (!b->hasFolder(folder)) { - return KWallet::Wallet::Unknown; - } - b->setFolder(folder); - if (b->hasEntry(key)) { - return b->readEntry(key)->type(); - } - } - - return KWallet::Wallet::Unknown; -} - - -bool KWalletD::hasEntry(int handle, const TQString& folder, const TQString& key) { - KWallet::Backend *b; - - if ((b = getWallet(friendlyDCOPPeerName(), handle))) { - if (!b->hasFolder(folder)) { - return false; - } - b->setFolder(folder); - return b->hasEntry(key); - } - - return false; -} - - -int KWalletD::removeEntry(int handle, const TQString& folder, const TQString& key) { - KWallet::Backend *b; - - if ((b = getWallet(friendlyDCOPPeerName(), handle))) { - if (!b->hasFolder(folder)) { - return 0; - } - b->setFolder(folder); - bool rc = b->removeEntry(key); - // write changes to disk immediately - TQByteArray p; - TQString wallet = b->walletName(); - p.duplicate(_passwords[wallet].data(), _passwords[wallet].length()); - b->sync(p); - p.fill(0); - emitFolderUpdated(b->walletName(), folder); - return rc ? 0 : -3; - } - - return -1; -} - - -void KWalletD::slotAppUnregistered(const TQCString& app) { - if (_handles.contains(app)) { - TQValueList l = _handles[app]; - for (TQValueList::Iterator i = l.begin(); i != l.end(); ++i) { - _handles[app].remove(*i); - KWallet::Backend *w = _wallets.find(*i); - if (w && !_leaveOpen && 0 == w->deref()) { - close(w->walletName(), true); - } - } - _handles.remove(app); - } -} - - -void KWalletD::invalidateHandle(int handle) { - for (TQMap >::Iterator i = _handles.begin(); - i != _handles.end(); - ++i) { - i.data().remove(handle); - } -} - - -KWallet::Backend *KWalletD::getWallet(const TQCString& appid, int handle) { - if (handle == 0) { - return 0L; - } - - KWallet::Backend *w = _wallets.find(handle); - - if (w) { // the handle is valid - if (_handles.contains(appid)) { // we know this app - if (_handles[appid].contains(handle)) { - // the app owns this handle - _failed = 0; - if (_closeIdle && _timeouts) { - _timeouts->resetTimer(handle, _idleTime); - } - return w; - } - } - } - - if (++_failed > 5) { - _failed = 0; - TQTimer::singleShot(0, this, TQT_SLOT(notifyFailures())); - } - - return 0L; -} - - -void KWalletD::notifyFailures() { - if (!_showingFailureNotify) { - _showingFailureNotify = true; - KMessageBox::information(0, i18n("There have been repeated failed attempts to gain access to a wallet. An application may be misbehaving."), i18n("TDE Wallet Service")); - _showingFailureNotify = false; - } -} - - -void KWalletD::doCloseSignals(int handle, const TQString& wallet) { - TQByteArray data; - TQDataStream ds(data, IO_WriteOnly); - ds << handle; - emitDCOPSignal("walletClosed(int)", data); - - TQByteArray data2; - TQDataStream ds2(data2, IO_WriteOnly); - ds2 << wallet; - emitDCOPSignal("walletClosed(TQString)", data2); - - if (_wallets.isEmpty()) { - emitDCOPSignal("allWalletsClosed()", TQByteArray()); - } -} - - -int KWalletD::renameEntry(int handle, const TQString& folder, const TQString& oldName, const TQString& newName) { - KWallet::Backend *b; - - if ((b = getWallet(friendlyDCOPPeerName(), handle))) { - b->setFolder(folder); - int rc = b->renameEntry(oldName, newName); - // write changes to disk immediately - TQByteArray p; - TQString wallet = b->walletName(); - p.duplicate(_passwords[wallet].data(), _passwords[wallet].length()); - b->sync(p); - p.fill(0); - emitFolderUpdated(b->walletName(), folder); - return rc; - } - - return -1; -} - - -TQStringList KWalletD::users(const TQString& wallet) const { - TQStringList rc; - - for (TQIntDictIterator it(_wallets); - it.current(); - ++it) { - if (it.current()->walletName() == wallet) { - for (TQMap >::ConstIterator hit = _handles.begin(); hit != _handles.end(); ++hit) { - if (hit.data().contains(it.currentKey())) { - rc += hit.key(); - } - } - break; - } - } - - return rc; -} - - -bool KWalletD::disconnectApplication(const TQString& wallet, const TQCString& application) { - for (TQIntDictIterator it(_wallets); - it.current(); - ++it) { - if (it.current()->walletName() == wallet) { - if (_handles[application].contains(it.currentKey())) { - _handles[application].remove(it.currentKey()); - - if (_handles[application].isEmpty()) { - _handles.remove(application); - } - - if (it.current()->deref() == 0) { - close(it.current()->walletName(), true); - } - - TQByteArray data; - TQDataStream ds(data, IO_WriteOnly); - ds << wallet; - ds << application; - emitDCOPSignal("applicationDisconnected(TQString,TQCString)", data); - - return true; - } - } - } - - return false; -} - - -void KWalletD::emitFolderUpdated(const TQString& wallet, const TQString& folder) { - TQByteArray data; - TQDataStream ds(data, IO_WriteOnly); - ds << wallet; - ds << folder; - emitDCOPSignal("folderUpdated(TQString,TQString)", data); -} - - -void KWalletD::emitWalletListDirty() { - emitDCOPSignal("walletListDirty()", TQByteArray()); -} - - -void KWalletD::reconfigure() { - TDEConfig cfg("tdewalletrc"); - cfg.setGroup("Wallet"); - _firstUse = cfg.readBoolEntry("First Use", true); - _enabled = cfg.readBoolEntry("Enabled", true); - _launchManager = cfg.readBoolEntry("Launch Manager", true); - _leaveOpen = cfg.readBoolEntry("Leave Open", false); - bool idleSave = _closeIdle; - _closeIdle = cfg.readBoolEntry("Close When Idle", false); - _openPrompt = cfg.readBoolEntry("Prompt on Open", true); - int timeSave = _idleTime; - // in minutes! - _idleTime = cfg.readNumEntry("Idle Timeout", 10) * 60 * 1000; - - if (cfg.readBoolEntry("Close on Screensaver", false)) { - connectDCOPSignal("kdesktop", "KScreensaverIface", "KDE_start_screensaver()", "closeAllWallets()", false); - } else { - disconnectDCOPSignal("kdesktop", "KScreensaverIface", "KDE_start_screensaver()", "closeAllWallets()"); - } - - // Handle idle changes - if (_closeIdle) { - if (_idleTime != timeSave) { // Timer length changed - TQIntDictIterator it(_wallets); - for (; it.current(); ++it) { - _timeouts->resetTimer(it.currentKey(), _idleTime); - } - } - - if (!idleSave) { // add timers for all the wallets - TQIntDictIterator it(_wallets); - for (; it.current(); ++it) { - _timeouts->addTimer(it.currentKey(), _idleTime); - } - } - } else { - _timeouts->clear(); - } - - // Update the implicit allow stuff - _implicitAllowMap.clear(); - cfg.setGroup("Auto Allow"); - TQStringList entries = cfg.entryMap("Auto Allow").keys(); - for (TQStringList::Iterator i = entries.begin(); i != entries.end(); ++i) { - _implicitAllowMap[*i] = cfg.readListEntry(*i); - } - - // Update the implicit allow stuff - _implicitDenyMap.clear(); - cfg.setGroup("Auto Deny"); - entries = cfg.entryMap("Auto Deny").keys(); - for (TQStringList::Iterator i = entries.begin(); i != entries.end(); ++i) { - _implicitDenyMap[*i] = cfg.readListEntry(*i); - } - - // Update if wallet was enabled/disabled - if (!_enabled) { // close all wallets - while (!_wallets.isEmpty()) { - TQIntDictIterator it(_wallets); - if (!it.current()) { // necessary? - break; - } - closeWallet(it.current(), it.currentKey(), true); - } - } -} - - -bool KWalletD::isEnabled() const { - return _enabled; -} - - -bool KWalletD::folderDoesNotExist(const TQString& wallet, const TQString& folder) { - if (!wallets().contains(wallet)) { - return true; - } - - for (TQIntDictIterator it(_wallets); it.current(); ++it) { - if (it.current()->walletName() == wallet) { - return it.current()->folderDoesNotExist(folder); - } - } - - KWallet::Backend *b = new KWallet::Backend(wallet); - b->open(TQByteArray()); - bool rc = b->folderDoesNotExist(folder); - delete b; - return rc; -} - - -bool KWalletD::keyDoesNotExist(const TQString& wallet, const TQString& folder, const TQString& key) { - if (!wallets().contains(wallet)) { - return true; - } - - for (TQIntDictIterator it(_wallets); it.current(); ++it) { - if (it.current()->walletName() == wallet) { - return it.current()->entryDoesNotExist(folder, key); - } - } - - KWallet::Backend *b = new KWallet::Backend(wallet); - b->open(TQByteArray()); - bool rc = b->entryDoesNotExist(folder, key); - delete b; - return rc; -} - - -bool KWalletD::implicitAllow(const TQString& wallet, const TQCString& app) { - return _implicitAllowMap[wallet].contains(TQString::fromLocal8Bit(app)); -} - - -bool KWalletD::implicitDeny(const TQString& wallet, const TQCString& app) { - return _implicitDenyMap[wallet].contains(TQString::fromLocal8Bit(app)); -} - - -TQCString KWalletD::friendlyDCOPPeerName() { - DCOPClient *dc = callingDcopClient(); - if (!dc) { - return ""; - } - return dc->senderId().replace(TQRegExp("-[0-9]+$"), ""); -} - - -void KWalletD::timedOut(int id) { - KWallet::Backend *w = _wallets.find(id); - if (w) { - closeWallet(w, id, true); - } -} - - -void KWalletD::closeAllWallets() { - TQIntDict tw = _wallets; - - for (TQIntDictIterator it(tw); it.current(); ++it) { - closeWallet(it.current(), it.currentKey(), true); - } - - tw.clear(); - - // All of this should be basically noop. Let's just be safe. - _wallets.clear(); - - for (TQMap::Iterator it = _passwords.begin(); - it != _passwords.end(); - ++it) { - it.data().fill(0); - } - _passwords.clear(); -} - - -TQString KWalletD::networkWallet() { - return KWallet::Wallet::NetworkWallet(); -} - - -TQString KWalletD::localWallet() { - return KWallet::Wallet::LocalWallet(); -} - - -#include "tdewalletd.moc" diff --git a/kio/misc/tdewalletd/tdewalletd.desktop b/kio/misc/tdewalletd/tdewalletd.desktop deleted file mode 100644 index 1e65fe0df..000000000 --- a/kio/misc/tdewalletd/tdewalletd.desktop +++ /dev/null @@ -1,151 +0,0 @@ -[Desktop Entry] -Type=Service -ServiceTypes=KDEDModule -X-TDE-ModuleType=Library -X-TDE-Library=tdewalletd -X-TDE-FactoryName=tdewalletd -X-TDE-Kded-autoload=false -X-TDE-Kded-load-on-demand=true -Name=KWallet Daemon Module -Name[af]=KBeursie Bediener Module -Name[ar]=مراقب وحدة KWallet -Name[az]=KWallet Demon Modulu -Name[be]=Модуль сервіса KWallet -Name[bg]=Демон Портфейл -Name[bn]=কে-ওয়ালেট ডিমন মডিউল -Name[br]=Mollad an diaoul KWallet -Name[ca]=Mòdul del dimoni KWallet -Name[cs]=Modul démona KWallet -Name[csb]=Pòrtfel -Name[cy]=Modiwl Daemon KWaled -Name[da]=KWallet Dæmonmodul -Name[de]=Digitale Brieftasche -Name[el]=Άρθρωμα δαίμονα KWallet -Name[eo]=Sekreteja demono-modulo -Name[es]=Módulo de demonio KWallet -Name[et]=KWalleti deemoni moodul -Name[eu]=KWallet daemon modulua -Name[fa]=پیمانه شبح KWallet -Name[fi]=KWallet-palvelinmoduuli -Name[fr]=Module démon KWallet -Name[ga]=Modúl Deamhain KWallet -Name[gl]=Módulo do Demo KWallet -Name[he]=מודול תהליך הרקע של KWallet -Name[hi]=केवैलट डेमन मॉड्यूल -Name[hr]=Modul KWallet demona -Name[hu]=KWallet szolgáltatás -Name[id]=Modul Daemon KWallet -Name[is]=KWallet þjónseining -Name[it]=Modulo demone KWallet -Name[ja]=KWallet デーモンモジュール -Name[ka]=KWallet გუშაგის მოდული -Name[kk]=KWallet әмиян қызметтің модулі -Name[km]=ម៉ូឌុល Daemon KWallet -Name[ko]=K지갑 데몬 모듈 -Name[lb]=KWallet-Dämonmodul -Name[lt]=TDE slaptažodinių tarnybos modulis -Name[lv]=KWallet Dēmona Modulis -Name[mn]=KWallet Daemon Модул -Name[ms]=Modul Daemon KWallet -Name[nb]=KWallet nisseprogramtillegg -Name[nds]=KWallet-Dämoon -Name[ne]=KWallet डेइमन मोड्युल -Name[nl]=KWallet daemon-module -Name[nn]=KWallet-nissemodul -Name[pa]=KWallet ਪੇਸ਼ਕਾਰੀ ਮੈਡੀਊਲ -Name[pl]=Portfel -Name[pt]=Módulo do Servidor do KWallet -Name[pt_BR]=Módulo do Serviço do KWallet -Name[ro]=Modul demon KWallet -Name[ru]=Служба бумажника -Name[rw]=Igice Dayimoni KUruhago -Name[se]=KWallet-bálvámoduvla -Name[sk]=Modul démona KWallet -Name[sl]=Modul demona KListnica -Name[sq]=Demoni për Modulin KWallet -Name[sr]=KWallet демон модул -Name[sr@Latn]=KWallet demon modul -Name[sv]=Kwallet-demonmodul -Name[ta]=KWallet டெமான் பகுதி -Name[te]=కెవాలెట్ సూత్రధారి మాడ్యూల్ -Name[tg]=Модули Демон KWallet -Name[th]=โมดูลเดมอน KWallet -Name[tr]=KWallet Program Modülü -Name[tt]=KWallet Xezmäteneñ Modulı -Name[uk]=Модуль демону KWallet -Name[uz]=KWallet xizmatining moduli -Name[uz@cyrillic]=KWallet хизматининг модули -Name[vi]=Mô-đun trình nền KWallet -Name[zh_CN]=KWallet 守护进程模块 -Name[zh_HK]=KWAllet 伺服程式模組 -Name[zh_TW]=KWAllet 服務程式模組 -Comment=KWallet daemon module for KDED -Comment[af]=KBeursie bediener module vir KDED -Comment[be]=Модуль сервіса KWallet для KDED -Comment[bg]=Модул демон за системата Портфейл за KDED -Comment[bn]=KDED-র জন্য কে-ওয়ালেট ডিমন মডিউল -Comment[br]=Mollad an diaoul KWallet evit KDED -Comment[bs]=KWallet daemon modul za KDED -Comment[ca]=Mòdul del dimoni KWallet per a KDED -Comment[cs]=Modul démona KWallet pro KDED -Comment[csb]=Mòduł KWallet w KDED -Comment[da]=KWallet Dæmonmodul for KDED -Comment[de]=Unterstützung für die digitale Brieftasche "KWallet" -Comment[el]=Άρθρωμα δαίμονα KWallet για το KDED -Comment[eo]=Sekreteja demono-modulo por KDED -Comment[es]=Módulo de demonio KWallet para KDED -Comment[et]=KDED KWalleti deemoni moodul -Comment[eu]=KWallet daemon modulua KDEDrako -Comment[fa]=پیمانۀ شبح KWallet برای KDED -Comment[fi]=KWallet palvelinmoduuli KDED:lle -Comment[fr]=Module démon KWallet pour KDED -Comment[fy]=KWallet daemon module foar KDED -Comment[ga]=Modúl deamhain KWallet le haghaidh KDED -Comment[gl]=Demo de KWallet para KDED -Comment[he]=מודול תהליך רקע של KWallet עבור KDED -Comment[hi]=केडीईडी के लिए के-वॉलेट डेमन मॉड्यूल -Comment[hr]=KWallet demon modul za KDED -Comment[hu]=KWallet szolgáltatásmodul a KDED-hez -Comment[id]=Modul daemon KWallet untuk KDED -Comment[is]=KWallet þjónseining fyrir KDED -Comment[it]=Modulo demone KWallet per KDED -Comment[ja]=KDED 用の KWallet デーモンモジュール -Comment[ka]=KSSL მოდული TDE-სთვის -Comment[kk]=TDE KWallet әмиянін басқару қызметтің модулі -Comment[km]=ម៉ូឌុល daemon KWallet សម្រាប់ KDED -Comment[lb]=KWallet-Dämonmodul fir KDED -Comment[lt]=TDE slaptažodinių tarnybos modulis skirtas KDED -Comment[lv]=KWallet Dēmona Modulis priekš KDED -Comment[mk]=KWallet даемон модул за KDED -Comment[ms]=Modul Daemon KWallet untuk KDED -Comment[nb]=KWallet nissemodul for KDED -Comment[nds]=KWallet-Dämoonmoduul för KDED -Comment[ne]=KDED का लागि डेइमन मोड्युल KWallet -Comment[nl]=KWallet daemon-module voor KDED -Comment[nn]=KWallet-nissemodul for KDED -Comment[pa]=KDED ਲਈ KWallet ਪੇਸ਼ਕਾਰੀ ਮੈਡੀਊਲ -Comment[pl]=Moduł KWallet w KDED -Comment[pt]=Módulo servidor do KWallet para o KDED -Comment[pt_BR]=Módulo do serviço de carteira para o TDE -Comment[ro]=Modul demon KWallet pentru KDED -Comment[ru]=Управление бумажником TDE -Comment[rw]=Igice cya dayimoni KUruhago cya KDED -Comment[se]=KDED:a KWallet-bálvámoduvla -Comment[sk]=Modul démona KWallet pre KDED -Comment[sl]=Modul demona KListnica za KDED -Comment[sr]=KWallet демон модул за KDED -Comment[sr@Latn]=KWallet demon modul za KDED -Comment[sv]=Kwallet-demonmodul för KDED -Comment[ta]=KDEDக்கான KWallet Daemon தொகுதி -Comment[te]=కెడిఈడి కొరకు కెవాలెట్ సూత్రధారి మాడ్యూల్ -Comment[tg]=Модули Демон KWallet барои KDED -Comment[th]=โมดูลเดมอน KWallet สำหรับ KDED -Comment[tr]=KDED için KWallet program modülü -Comment[tt]=KDED öçen KWallet xezmäteneñ modulı -Comment[uk]=Модуль демону торбинок KWallet для KDED -Comment[uz]=KDED uchun KWallet xizmatining moduli -Comment[uz@cyrillic]=KDED учун KWallet хизматининг модули -Comment[vi]=Mô-đun trình nền KWallet cho KDED. -Comment[zh_CN]=KDED 的 KWallet 守护进程模块 -Comment[zh_HK]=KDED 的 KWallet 伺服程式模組 -Comment[zh_TW]=KDED 的 KWallet 服務程式模組 diff --git a/kio/misc/tdewalletd/tdewalletd.h b/kio/misc/tdewalletd/tdewalletd.h deleted file mode 100644 index b3a315413..000000000 --- a/kio/misc/tdewalletd/tdewalletd.h +++ /dev/null @@ -1,199 +0,0 @@ -/* - This file is part of the KDE libraries - - Copyright (c) 2002-2004 George Staikos - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. - -*/ -#ifndef _KWALLETD_H_ -#define _KWALLETD_H_ - -#include -#include -#include -#include -#include -#include -#include "tdewalletbackend.h" - -#include -#include - -class KDirWatch; -class KTimeout; - -// @Private -class KWalletTransaction; - -class KWalletD : public KDEDModule { - Q_OBJECT - K_DCOP - public: - KWalletD(const TQCString &name); - virtual ~KWalletD(); - - k_dcop: - // Is the wallet enabled? If not, all open() calls fail. - virtual bool isEnabled() const; - - // Open and unlock the wallet - virtual int open(const TQString& wallet, uint wId); - // Open and unlock the wallet - virtual int tryOpen(const TQString& wallet, const TQCString& passwd); - // Open and unlock the wallet with this path - - virtual int openPath(const TQString& path, uint wId); - - // Asynchronous open - must give the object to return the handle - // to. - virtual void openAsynchronous(const TQString& wallet, const TQCString& returnObject, uint wId); - - // Close and lock the wallet - // If force = true, will close it for all users. Behave. This - // can break applications, and is generally intended for use by - // the wallet manager app only. - virtual int close(const TQString& wallet, bool force); - virtual int close(int handle, bool force); - - // Save to disk but leave open - virtual ASYNC sync(int handle); - - // Physically deletes the wallet from disk. - virtual int deleteWallet(const TQString& wallet); - - // Returns true if the wallet is open - virtual bool isOpen(const TQString& wallet) const; - virtual bool isOpen(int handle); - - // List the users of this wallet - virtual TQStringList users(const TQString& wallet) const; - - // Change the password of this wallet - virtual void changePassword(const TQString& wallet, uint wId); - - // A list of all wallets - virtual TQStringList wallets() const; - - // A list of all folders in this wallet - virtual TQStringList folderList(int handle); - - // Does this wallet have this folder? - virtual bool hasFolder(int handle, const TQString& folder); - - // Create this folder - virtual bool createFolder(int handle, const TQString& folder); - - // Remove this folder - virtual bool removeFolder(int handle, const TQString& folder); - - // List of entries in this folder - virtual TQStringList entryList(int handle, const TQString& folder); - - // Read an entry. If the entry does not exist, it just - // returns an empty result. It is your responsibility to check - // hasEntry() first. - virtual TQByteArray readEntry(int handle, const TQString& folder, const TQString& key); - virtual TQByteArray readMap(int handle, const TQString& folder, const TQString& key); - virtual TQString readPassword(int handle, const TQString& folder, const TQString& key); - virtual TQMap readEntryList(int handle, const TQString& folder, const TQString& key); - virtual TQMap readMapList(int handle, const TQString& folder, const TQString& key); - virtual TQMap readPasswordList(int handle, const TQString& folder, const TQString& key); - - // Rename an entry. rc=0 on success. - virtual int renameEntry(int handle, const TQString& folder, const TQString& oldName, const TQString& newName); - - // Write an entry. rc=0 on success. - virtual int writeEntry(int handle, const TQString& folder, const TQString& key, const TQByteArray& value, int entryType); - virtual int writeEntry(int handle, const TQString& folder, const TQString& key, const TQByteArray& value); - virtual int writeMap(int handle, const TQString& folder, const TQString& key, const TQByteArray& value); - virtual int writePassword(int handle, const TQString& folder, const TQString& key, const TQString& value); - - // Does the entry exist? - virtual bool hasEntry(int handle, const TQString& folder, const TQString& key); - - // What type is the entry? - virtual int entryType(int handle, const TQString& folder, const TQString& key); - - // Remove an entry. rc=0 on success. - virtual int removeEntry(int handle, const TQString& folder, const TQString& key); - - // Disconnect an app from a wallet - virtual bool disconnectApplication(const TQString& wallet, const TQCString& application); - - virtual void reconfigure(); - - // Determine - virtual bool folderDoesNotExist(const TQString& wallet, const TQString& folder); - virtual bool keyDoesNotExist(const TQString& wallet, const TQString& folder, const TQString& key); - - virtual void closeAllWallets(); - - virtual TQString networkWallet(); - - virtual TQString localWallet(); - - private slots: - void slotAppUnregistered(const TQCString& app); - void emitWalletListDirty(); - void timedOut(int); - void notifyFailures(); - void processTransactions(); - - private: - int internalOpen(const TQCString& appid, const TQString& wallet, bool isPath = false, WId w = 0, bool modal = false); - bool isAuthorizedApp(const TQCString& appid, const TQString& wallet, WId w); - // This also validates the handle. May return NULL. - KWallet::Backend* getWallet(const TQCString& appid, int handle); - // Generate a new unique handle. - int generateHandle(); - // Invalidate a handle (remove it from the TQMap) - void invalidateHandle(int handle); - // Emit signals about closing wallets - void doCloseSignals(int,const TQString&); - void emitFolderUpdated(const TQString&, const TQString&); - // Internal - close this wallet. - int closeWallet(KWallet::Backend *w, int handle, bool force); - // Implicitly allow access for this application - bool implicitAllow(const TQString& wallet, const TQCString& app); - bool implicitDeny(const TQString& wallet, const TQCString& app); - TQCString friendlyDCOPPeerName(); - - void doTransactionChangePassword(const TQCString& appid, const TQString& wallet, uint wId); - int doTransactionOpen(const TQCString& appid, const TQString& wallet, uint wId, bool modal); - - void setupDialog( TQWidget* dialog, WId wId, const TQCString& appid, bool modal ); - void checkActiveDialog(); - - TQIntDict _wallets; - TQMap > _handles; - TQMap _passwords; - KDirWatch *_dw; - int _failed; - - bool _leaveOpen, _closeIdle, _launchManager, _enabled; - bool _openPrompt, _firstUse, _showingFailureNotify; - int _idleTime; - TQMap _implicitAllowMap, _implicitDenyMap; - KTimeout *_timeouts; - TQTimer _tryOpenBlocked; - - TQPtrList _transactions; - TQGuardedPtr< TQWidget > activeDialog; -}; - - -#endif diff --git a/kio/misc/tdewalletd/tdewalletwizard.ui b/kio/misc/tdewalletd/tdewalletwizard.ui deleted file mode 100644 index aa3a1c09d..000000000 --- a/kio/misc/tdewalletd/tdewalletwizard.ui +++ /dev/null @@ -1,545 +0,0 @@ - -KWalletWizard - - - KWalletWizard - - - - 0 - 0 - 556 - 385 - - - - KDE Wallet Wizard - - - - page1 - - - Introduction - - - - unnamed - - - - spacer3 - - - Vertical - - - Expanding - - - - 21 - 21 - - - - - - textLabel1 - - - - 20 - - - - <u>KWallet</u> - The KDE Wallet System - - - RichText - - - WordBreak|AlignCenter - - - - - textLabel2 - - - - 5 - 5 - 0 - 2 - - - - 26 - - - Welcome to KWallet, the KDE Wallet System. KWallet allows you to store your passwords and other personal information on disk in an encrypted file, preventing others from viewing the information. This wizard will tell you about KWallet and help you configure it for the first time. - - - RichText - - - WordBreak|AlignVCenter - - - - - buttonGroup1 - - - NoFrame - - - - - - - unnamed - - - 0 - - - - _basic - - - &Basic setup (recommended) - - - true - - - - - _advanced - - - &Advanced setup - - - - - - - spacer2 - - - Horizontal - - - Expanding - - - - 140 - 21 - - - - - - spacer1 - - - Horizontal - - - Expanding - - - - 140 - 31 - - - - - - - - page4 - - - Information - - - - unnamed - - - - textLabel2_3 - - - The KDE Wallet system stores your data in a <i>wallet</i> file on your local hard disk. The data is only written in encrypted form, presently using the blowfish algorithm with your password as the key. When a wallet is opened, the wallet manager application will launch and display an icon in the system tray. You can use this application to manage your wallets. It even permits you to drag wallets and wallet contents, allowing you to easily copy a wallet to a remote system. - - - RichText - - - - - - - page2 - - - Password Selection - - - - unnamed - - - - textLabel3 - - - Various applications may attempt to use the KDE wallet to store passwords or other information such as web form data and cookies. If you would like these applications to use the wallet, you must enable it now and choose a password. The password you choose <i>cannot</i> be recovered if it is lost, and will allow anyone who knows it to obtain all the information contained in the wallet. - - - RichText - - - - - layout7 - - - - unnamed - - - - layout5 - - - - unnamed - - - - textLabel1_2 - - - false - - - Enter a new password: - - - AlignVCenter|AlignRight - - - _pass1 - - - - - textLabel2_2 - - - false - - - Verify password: - - - AlignVCenter|AlignRight - - - _pass2 - - - - - - - layout4 - - - - unnamed - - - - _pass1 - - - false - - - Password - - - - - _pass2 - - - false - - - Password - - - - - - - - - _useWallet - - - Yes, I wish to use the KDE wallet to store my personal information. - - - - - spacer5 - - - Vertical - - - Expanding - - - - 21 - 51 - - - - - - spacer6 - - - Horizontal - - - Expanding - - - - 101 - 21 - - - - - - spacer7 - - - Horizontal - - - Expanding - - - - 111 - 31 - - - - - - spacer4 - - - Vertical - - - Expanding - - - - 21 - 70 - - - - - - _matchLabel - - - - - - WordBreak|AlignVCenter|AlignRight - - - - - - - page3 - - - Security Level - - - - unnamed - - - - textLabel1_3 - - - The KDE Wallet system allows you to control the level of security of your personal data. Some of these settings do impact usability. While the default settings are generally acceptable for most users, you may wish to change some of them. You may further tune these settings from the KWallet control module. - - - RichText - - - WordBreak|AlignVCenter - - - - - spacer8 - - - Vertical - - - Expanding - - - - 21 - 121 - - - - - - _networkWallet - - - Store network passwords and local passwords in separate wallet files - - - - - _closeIdle - - - Automatically close idle wallets - - - - - spacer9 - - - Vertical - - - Expanding - - - - 21 - 51 - - - - - - - - - _useWallet - toggled(bool) - textLabel1_2 - setEnabled(bool) - - - _useWallet - toggled(bool) - textLabel2_2 - setEnabled(bool) - - - _useWallet - toggled(bool) - _pass1 - setEnabled(bool) - - - _useWallet - toggled(bool) - _pass2 - setEnabled(bool) - - - _useWallet - clicked() - _pass1 - setFocus() - - - _useWallet - clicked() - KWalletWizard - passwordPageUpdate() - - - _pass1 - textChanged(const TQString&) - KWalletWizard - passwordPageUpdate() - - - _pass2 - textChanged(const TQString&) - KWalletWizard - passwordPageUpdate() - - - _advanced - clicked() - KWalletWizard - setAdvanced() - - - _basic - clicked() - KWalletWizard - setBasic() - - - - _basic - _advanced - _useWallet - _pass1 - _pass2 - - - tqcheckbox.h - klocale.h - tdewalletwizard.ui.h - - - passwordPageUpdate() - init() - setAdvanced() - setBasic() - destroy() - - - diff --git a/kio/misc/tdewalletd/tdewalletwizard.ui.h b/kio/misc/tdewalletd/tdewalletwizard.ui.h deleted file mode 100644 index a42635e9b..000000000 --- a/kio/misc/tdewalletd/tdewalletwizard.ui.h +++ /dev/null @@ -1,74 +0,0 @@ -/**************************************************************************** -** ui.h extension file, included from the uic-generated form implementation. -** -** If you wish to add, delete or rename functions or slots use -** Qt Designer which will update this file, preserving your code. Create an -** init() function in place of a constructor, and a destroy() function in -** place of a destructor. -*****************************************************************************/ - -void KWalletWizard::passwordPageUpdate() -{ - bool fe = !_useWallet->isChecked() || _pass1->text() == _pass2->text(); - if (_basic->isChecked()) { - setFinishEnabled(page2, fe); - } else { - setNextEnabled(page2, fe); - setFinishEnabled(page3, fe); - } - - if (_useWallet->isChecked()) { - if (_pass1->text() == _pass2->text()) { - if (_pass1->text().isEmpty()) { - _matchLabel->setText(i18n("Password is empty. (WARNING: Insecure)")); - } else { - _matchLabel->setText(i18n("Passwords match.")); - } - } else { - _matchLabel->setText(i18n("Passwords do not match.")); - } - } else { - _matchLabel->setText(TQString::null); - } - -} - - -void KWalletWizard::init() -{ - setHelpEnabled(page1, false); - setHelpEnabled(page2, false); - setHelpEnabled(page3, false); - setHelpEnabled(page4, false); - setAppropriate(page3, false); - setAppropriate(page4, false); - setFinishEnabled(page2, true); -} - - -void KWalletWizard::setAdvanced() -{ - setAppropriate(page3, true); - setAppropriate(page4, true); - bool fe = !_useWallet->isChecked() || _pass1->text() == _pass2->text(); - setFinishEnabled(page2, false); - setNextEnabled(page2, fe); - setFinishEnabled(page3, fe); -} - - -void KWalletWizard::setBasic() -{ - setAppropriate(page3, false); - setAppropriate(page4, false); - bool fe = !_useWallet->isChecked() || _pass1->text() == _pass2->text(); - setFinishEnabled(page3, false); - setFinishEnabled(page2, fe); -} - - -void KWalletWizard::destroy() -{ - _pass1->clear(); - _pass2->clear(); -} diff --git a/kio/misc/telnet.protocol b/kio/misc/telnet.protocol deleted file mode 100644 index 810011594..000000000 --- a/kio/misc/telnet.protocol +++ /dev/null @@ -1,13 +0,0 @@ -[Protocol] -exec=ktelnetservice %u -protocol=telnet -input=none -output=none -helper=true -listing= -reading=false -writing=false -makedir=false -deleting=false -DocPath=kioslave/telnet.html -Icon=konsole diff --git a/kio/misc/uiserver.cpp b/kio/misc/uiserver.cpp deleted file mode 100644 index e898e5a50..000000000 --- a/kio/misc/uiserver.cpp +++ /dev/null @@ -1,1413 +0,0 @@ -/* This file is part of the KDE libraries - Copyright (C) 2000 Matej Koss - David Faure - 2001 George Staikos - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License version 2 as published by the Free Software Foundation. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ -// -*- mode: c++; c-basic-offset: 4 -*- - -#include - -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -#include "observer_stub.h" -#include "observer.h" // for static methods only -#include "kio/defaultprogress.h" -#include "kio/jobclasses.h" -#include "uiserver.h" -#include "passdlg.h" -#include "kio/renamedlg.h" -#include "kio/skipdlg.h" -#include "slavebase.h" // for QuestionYesNo etc. -#include -#include -#include -#include - - -// pointer for main instance of UIServer -UIServer* uiserver; - -// ToolBar field IDs -enum { TOOL_CANCEL, TOOL_CONFIGURE }; - -// StatusBar field IDs -enum { ID_TOTAL_FILES = 1, ID_TOTAL_SIZE, ID_TOTAL_TIME, ID_TOTAL_SPEED }; - -//static -int UIServer::s_jobId = 0; - -static const int defaultColumnWidth[] = { 70, // SIZE_OPERATION - 160, // LOCAL_FILENAME - 40, // RESUME - 60, // COUNT - 30, // PROGRESS - 65, // TOTAL - 70, // SPEED - 70, // REMAINING_TIME - 450 // URL -}; - -class UIServerSystemTray:public KSystemTray -{ - public: - UIServerSystemTray(UIServer* uis) - :KSystemTray(uis) - { - KPopupMenu* pop= contextMenu(); - pop->insertItem(i18n("Settings..."), uis, TQT_SLOT(slotConfigure())); - pop->insertItem(i18n("Remove"), uis, TQT_SLOT(slotRemoveSystemTrayIcon())); - setPixmap(loadIcon("filesave")); - //actionCollection()->action("file_quit")->setEnabled(true); - KStdAction::quit(TQT_TQOBJECT(uis), TQT_SLOT(slotQuit()), actionCollection()); - } -}; - -class ProgressConfigDialog:public KDialogBase -{ - public: - ProgressConfigDialog(TQWidget* parent); - ~ProgressConfigDialog() {} - void setChecked(int i, bool on); - bool isChecked(int i) const; - friend class UIServer; - private: - TQCheckBox *m_showSystemTrayCb; - TQCheckBox *m_keepOpenCb; - TQCheckBox *m_toolBarCb; - TQCheckBox *m_statusBarCb; - TQCheckBox *m_headerCb; - TQCheckBox *m_fixedWidthCb; - KListView *m_columns; - TQCheckListItem *(m_items[ListProgress::TB_MAX]); -}; - -ProgressConfigDialog::ProgressConfigDialog(TQWidget *parent) -:KDialogBase(KDialogBase::Plain,i18n("Configure Network Operation Window"),KDialogBase::Ok|KDialogBase::Apply|KDialogBase::Cancel, - KDialogBase::Ok, parent, "configprog", false) -{ - TQVBoxLayout *layout=new TQVBoxLayout(plainPage(),spacingHint()); - m_showSystemTrayCb=new TQCheckBox(i18n("Show system tray icon"), plainPage()); - m_keepOpenCb=new TQCheckBox(i18n("Keep network operation window always open"), plainPage()); - m_headerCb=new TQCheckBox(i18n("Show column headers"), plainPage()); - m_toolBarCb=new TQCheckBox(i18n("Show toolbar"), plainPage()); - m_statusBarCb=new TQCheckBox(i18n("Show statusbar"), plainPage()); - m_fixedWidthCb=new TQCheckBox(i18n("Column widths are user adjustable"), plainPage()); - TQLabel *label=new TQLabel(i18n("Show information:"), plainPage()); - m_columns=new KListView(plainPage()); - - m_columns->addColumn("info"); - m_columns->setSorting(-1); - m_columns->header()->hide(); - - m_items[ListProgress::TB_ADDRESS] =new TQCheckListItem(m_columns, i18n("URL"), TQCheckListItem::CheckBox); - m_items[ListProgress::TB_REMAINING_TIME] =new TQCheckListItem(m_columns, i18n("Remaining Time", "Rem. Time"), TQCheckListItem::CheckBox); - m_items[ListProgress::TB_SPEED] =new TQCheckListItem(m_columns, i18n("Speed"), TQCheckListItem::CheckBox); - m_items[ListProgress::TB_TOTAL] =new TQCheckListItem(m_columns, i18n("Size"), TQCheckListItem::CheckBox); - m_items[ListProgress::TB_PROGRESS] =new TQCheckListItem(m_columns, i18n("%"), TQCheckListItem::CheckBox); - m_items[ListProgress::TB_COUNT] =new TQCheckListItem(m_columns, i18n("Count"), TQCheckListItem::CheckBox); - m_items[ListProgress::TB_RESUME] =new TQCheckListItem(m_columns, i18n("Resume", "Res."), TQCheckListItem::CheckBox); - m_items[ListProgress::TB_LOCAL_FILENAME] =new TQCheckListItem(m_columns, i18n("Local Filename"), TQCheckListItem::CheckBox); - m_items[ListProgress::TB_OPERATION] =new TQCheckListItem(m_columns, i18n("Operation"), TQCheckListItem::CheckBox); - - layout->addWidget(m_showSystemTrayCb); - layout->addWidget(m_keepOpenCb); - layout->addWidget(m_headerCb); - layout->addWidget(m_toolBarCb); - layout->addWidget(m_statusBarCb); - layout->addWidget(m_fixedWidthCb); - layout->addWidget(label); - layout->addWidget(m_columns); -} - -void ProgressConfigDialog::setChecked(int i, bool on) -{ - if (i>=ListProgress::TB_MAX) - return; - m_items[i]->setOn(on); -} - -bool ProgressConfigDialog::isChecked(int i) const -{ - if (i>=ListProgress::TB_MAX) - return false; - return m_items[i]->isOn(); -} - -ProgressItem::ProgressItem( ListProgress* view, TQListViewItem *after, TQCString app_id, int job_id, - bool showDefault ) - : TQListViewItem( view, after ) { - - listProgress = view; - - m_iTotalSize = 0; - m_iTotalFiles = 0; - m_iProcessedSize = 0; - m_iProcessedFiles = 0; - m_iSpeed = 0; - - m_sAppId = app_id; - m_iJobId = job_id; - m_visible = true; - m_defaultProgressVisible = showDefault; - - // create dialog, but don't show it - defaultProgress = new TDEIO::DefaultProgress( false ); - defaultProgress->setOnlyClean( true ); - connect ( defaultProgress, TQT_SIGNAL( stopped() ), this, TQT_SLOT( slotCanceled() ) ); - connect ( &m_showTimer, TQT_SIGNAL( timeout() ), this, TQT_SLOT(slotShowDefaultProgress()) ); - - if ( showDefault ) { - m_showTimer.start( 500, true ); - } -} - -bool ProgressItem::keepOpen() const -{ - return defaultProgress->keepOpen(); -} - -void ProgressItem::finished() -{ - defaultProgress->finished(); -} - -ProgressItem::~ProgressItem() { - delete defaultProgress; -} - - -void ProgressItem::setTotalSize( TDEIO::filesize_t size ) { - m_iTotalSize = size; - - // It's already in the % column... - //setText( listProgress->lv_total, TDEIO::convertSize( m_iTotalSize ) ); - - defaultProgress->slotTotalSize( 0, m_iTotalSize ); -} - - -void ProgressItem::setTotalFiles( unsigned long files ) { - m_iTotalFiles = files; - - defaultProgress->slotTotalFiles( 0, m_iTotalFiles ); -} - - -void ProgressItem::setTotalDirs( unsigned long dirs ) { - defaultProgress->slotTotalDirs( 0, dirs ); -} - - -void ProgressItem::setProcessedSize( TDEIO::filesize_t size ) { - m_iProcessedSize = size; - - setText( ListProgress::TB_TOTAL, TDEIO::convertSize( size ) ); - - defaultProgress->slotProcessedSize( 0, size ); -} - - -void ProgressItem::setProcessedFiles( unsigned long files ) { - m_iProcessedFiles = files; - - TQString tmps = i18n("%1 / %2").arg( m_iProcessedFiles ).arg( m_iTotalFiles ); - setText( ListProgress::TB_COUNT, tmps ); - - defaultProgress->slotProcessedFiles( 0, m_iProcessedFiles ); -} - - -void ProgressItem::setProcessedDirs( unsigned long dirs ) { - defaultProgress->slotProcessedDirs( 0, dirs ); -} - - -void ProgressItem::setPercent( unsigned long percent ) { - const TQString tmps = TDEIO::DefaultProgress::makePercentString( percent, m_iTotalSize, m_iTotalFiles ); - setText( ListProgress::TB_PROGRESS, tmps ); - - defaultProgress->slotPercent( 0, percent ); -} - -void ProgressItem::setInfoMessage( const TQString & msg ) { - TQString plainTextMsg(msg); - plainTextMsg.replace( TQRegExp( "" ), TQString() ); - plainTextMsg.replace( TQRegExp( "" ), TQString() ); - setText( ListProgress::TB_PROGRESS, plainTextMsg ); - - defaultProgress->slotInfoMessage( 0, msg ); -} - -void ProgressItem::setSpeed( unsigned long bytes_per_second ) { - m_iSpeed = bytes_per_second; - m_remainingSeconds = TDEIO::calculateRemainingSeconds( m_iTotalSize, m_iProcessedSize, m_iSpeed ); - - TQString tmps, tmps2; - if ( m_iSpeed == 0 ) { - tmps = i18n( "Stalled"); - tmps2 = tmps; - } else { - tmps = i18n( "%1/s").arg( TDEIO::convertSize( m_iSpeed )); - tmps2 = TDEIO::convertSeconds( m_remainingSeconds ); - } - setText( ListProgress::TB_SPEED, tmps ); - setText( ListProgress::TB_REMAINING_TIME, tmps2 ); - - defaultProgress->slotSpeed( 0, m_iSpeed ); -} - - -void ProgressItem::setCopying( const KURL& from, const KURL& to ) { - setText( ListProgress::TB_OPERATION, i18n("Copying") ); - setText( ListProgress::TB_ADDRESS, from.url() ); - setText( ListProgress::TB_LOCAL_FILENAME, to.fileName() ); - - defaultProgress->slotCopying( 0, from, to ); -} - - -void ProgressItem::setMoving( const KURL& from, const KURL& to ) { - setText( ListProgress::TB_OPERATION, i18n("Moving") ); - setText( ListProgress::TB_ADDRESS, from.url() ); - setText( ListProgress::TB_LOCAL_FILENAME, to.fileName() ); - - defaultProgress->slotMoving( 0, from, to ); -} - - -void ProgressItem::setCreatingDir( const KURL& dir ) { - setText( ListProgress::TB_OPERATION, i18n("Creating") ); - setText( ListProgress::TB_ADDRESS, dir.url() ); - setText( ListProgress::TB_LOCAL_FILENAME, dir.fileName() ); - - defaultProgress->slotCreatingDir( 0, dir ); -} - - -void ProgressItem::setDeleting( const KURL& url ) { - setText( ListProgress::TB_OPERATION, i18n("Deleting") ); - setText( ListProgress::TB_ADDRESS, url.url() ); - setText( ListProgress::TB_LOCAL_FILENAME, url.fileName() ); - - defaultProgress->slotDeleting( 0, url ); -} - -void ProgressItem::setTransferring( const KURL& url ) { - setText( ListProgress::TB_OPERATION, i18n("Loading") ); - setText( ListProgress::TB_ADDRESS, url.url() ); - setText( ListProgress::TB_LOCAL_FILENAME, url.fileName() ); - - defaultProgress->slotTransferring( 0, url ); -} - -void ProgressItem::setText(ListProgress::ListProgressFields field, const TQString& text) -{ - if (listProgress->m_lpcc[field].enabled) - { - TQString t=text; - if ((field==ListProgress::TB_ADDRESS) && (listProgress->m_fixedColumnWidths)) -// if (((field==ListProgress::TB_LOCAL_FILENAME) || (field==ListProgress::TB_ADDRESS)) && (listProgress->m_fixedColumnWidths)) - { - m_fullLengthAddress=text; - listProgress->m_squeezer->resize(listProgress->columnWidth(listProgress->m_lpcc[field].index),50); - listProgress->m_squeezer->setText(t); - t=listProgress->m_squeezer->text(); - } - TQListViewItem::setText(listProgress->m_lpcc[field].index,t); - } -} - -void ProgressItem::setStating( const KURL& url ) { - setText( ListProgress::TB_OPERATION, i18n("Examining") ); - setText( ListProgress::TB_ADDRESS, url.url() ); - setText( ListProgress::TB_LOCAL_FILENAME, url.fileName() ); - - defaultProgress->slotStating( 0, url ); -} - -void ProgressItem::setMounting( const TQString& dev, const TQString & point ) { - setText( ListProgress::TB_OPERATION, i18n("Mounting") ); - setText( ListProgress::TB_ADDRESS, point ); // ? - setText( ListProgress::TB_LOCAL_FILENAME, dev ); // ? - - defaultProgress->slotMounting( 0, dev, point ); -} - -void ProgressItem::setUnmounting( const TQString & point ) { - setText( ListProgress::TB_OPERATION, i18n("Unmounting") ); - setText( ListProgress::TB_ADDRESS, point ); // ? - setText( ListProgress::TB_LOCAL_FILENAME, "" ); // ? - - defaultProgress->slotUnmounting( 0, point ); -} - -void ProgressItem::setCanResume( TDEIO::filesize_t offset ) { - /* - TQString tmps; - // set canResume - if ( _resume ) { - tmps = i18n("Yes"); - } else { - tmps = i18n("No"); - } - setText( listProgress->lv_resume, tmps ); - */ - defaultProgress->slotCanResume( 0, offset ); -} - - -void ProgressItem::slotCanceled() { - emit jobCanceled( this ); -} - -// Called 0.5s after the job has been started -void ProgressItem::slotShowDefaultProgress() { - if (defaultProgress) - { - if ( m_visible && m_defaultProgressVisible ) - defaultProgress->show(); - else - defaultProgress->hide(); - } -} - -void ProgressItem::slotToggleDefaultProgress() { - setDefaultProgressVisible( !m_defaultProgressVisible ); -} - -// Called when a rename or skip dialog pops up -// We want to prevent someone from killing the job in the uiserver then -void ProgressItem::setVisible( bool visible ) { - if ( m_visible != visible ) - { - m_visible = visible; - updateVisibility(); - } -} - -// Can be toggled by the user -void ProgressItem::setDefaultProgressVisible( bool visible ) { - if ( m_defaultProgressVisible != visible ) - { - m_defaultProgressVisible = visible; - updateVisibility(); - } -} - -// Update according to state -void ProgressItem::updateVisibility() -{ - if (defaultProgress) - { - if ( m_visible && m_defaultProgressVisible ) - { - m_showTimer.start(250, true); // Show delayed - } - else - { - m_showTimer.stop(); - defaultProgress->hide(); - } - } -} - - -//----------------------------------------------------------------------------- -ListProgress::ListProgress (TQWidget *parent, const char *name) -: KListView (parent, name) -{ - - // enable selection of more than one item - setMultiSelection( true ); - - setAllColumnsShowFocus( true ); - - m_lpcc[TB_OPERATION].title=i18n("Operation"); - m_lpcc[TB_LOCAL_FILENAME].title=i18n("Local Filename"); - m_lpcc[TB_RESUME].title=i18n("Resume", "Res."); - m_lpcc[TB_COUNT].title=i18n("Count"); - m_lpcc[TB_PROGRESS].title=i18n("%"); - m_lpcc[TB_TOTAL].title=i18n("Size"); - m_lpcc[TB_SPEED].title=i18n("Speed"); - m_lpcc[TB_REMAINING_TIME].title=i18n("Remaining Time", "Rem. Time"); - m_lpcc[TB_ADDRESS].title=i18n("URL"); - readSettings(); - - applySettings(); - - //used for squeezing the text in local file name and url - m_squeezer=new KSqueezedTextLabel(this); - m_squeezer->hide(); - connect(header(),TQT_SIGNAL(sizeChange(int,int,int)),this,TQT_SLOT(columnWidthChanged(int))); -} - - -ListProgress::~ListProgress() { -} - -void ListProgress::applySettings() -{ - int iEnabledCols=0; - - // Update listcolumns to show - for (int i=0; i columns() ) - m_lpcc[i].index=addColumn(m_lpcc[i].title, m_fixedColumnWidths?m_lpcc[i].width:-1); - else - { - m_lpcc[i].index = iEnabledCols - 1; - setColumnText(m_lpcc[i].index, m_lpcc[i].title); - } - - setColumnWidth(m_lpcc[i].index, m_lpcc[i].width); //yes, this is required here, alexxx - if (m_fixedColumnWidths) - setColumnWidthMode(m_lpcc[i].index, Manual); - } - - // Remove unused columns. However we must keep one column left - // Otherwise the listview will be emptied - while( iEnabledCols < columns() && columns() > 1 ) - removeColumn( columns() - 1 ); - - if ( columns() == 0 ) - addColumn( "" ); - - if ( !m_showHeader || iEnabledCols == 0 ) - header()->hide(); - else - header()->show(); -} - -void ListProgress::readSettings() { - TDEConfig config("uiserverrc"); - - // read listview geometry properties - config.setGroup( "ProgressList" ); - for ( int i = 0; i < TB_MAX; i++ ) { - TQString tmps="Col"+TQString::number(i); - m_lpcc[i].width=config.readNumEntry( tmps, 0); - if (m_lpcc[i].width==0) m_lpcc[i].width=defaultColumnWidth[i]; - - tmps="Enabled"+TQString::number(i); - m_lpcc[i].enabled=config.readBoolEntry(tmps,true); - } - m_showHeader=config.readBoolEntry("ShowListHeader",true); - m_fixedColumnWidths=config.readBoolEntry("FixedColumnWidths",false); - - m_lpcc[TB_RESUME].enabled=false; -} - -void ListProgress::columnWidthChanged(int column) -{ - //resqueeze if necessary - if ((m_lpcc[TB_ADDRESS].enabled) && (column==m_lpcc[TB_ADDRESS].index)) - { - for (TQListViewItem* lvi=firstChild(); lvi!=0; lvi=lvi->nextSibling()) - { - ProgressItem *pi=(ProgressItem*)lvi; - pi->setText(TB_ADDRESS,pi->fullLengthAddress()); - } - } - writeSettings(); -} - -void ListProgress::writeSettings() { - TDEConfig config("uiserverrc"); - - // write listview geometry properties - config.setGroup( "ProgressList" ); - for ( int i = 0; i < TB_MAX; i++ ) { - if (!m_lpcc[i].enabled) { - TQString tmps= "Enabled" + TQString::number(i); - config.writeEntry( tmps, false ); - continue; - } - m_lpcc[i].width=columnWidth(m_lpcc[i].index); - TQString tmps="Col"+TQString::number(i); - config.writeEntry( tmps, m_lpcc[i].width); - } - config.writeEntry("ShowListHeader", m_showHeader); - config.writeEntry("FixedColumnWidths", m_fixedColumnWidths); - config.sync(); -} - - -//------------------------------------------------------------ - - -UIServer::UIServer() -:KMainWindow(0, "") -,DCOPObject("UIServer") -,m_shuttingDown(false) -,m_configDialog(0) -,m_contextMenu(0) -,m_systemTray(0) -{ - - readSettings(); - - // setup toolbar - toolBar()->insertButton("editdelete", TOOL_CANCEL, - TQT_SIGNAL(clicked()), TQT_TQOBJECT(this), - TQT_SLOT(slotCancelCurrent()), FALSE, i18n("Cancel")); - toolBar()->insertButton("configure", TOOL_CONFIGURE, - TQT_SIGNAL(clicked()), TQT_TQOBJECT(this), - TQT_SLOT(slotConfigure()), true, i18n("Settings...")); - - toolBar()->setBarPos( KToolBar::Left ); - - // setup statusbar - statusBar()->insertItem( i18n(" Files: %1 ").arg( 0 ), ID_TOTAL_FILES); - statusBar()->insertItem( i18n("Remaining Size", " Rem. Size: %1 kB ").arg( "0" ), ID_TOTAL_SIZE); - statusBar()->insertItem( i18n("Remaining Time", " Rem. Time: 00:00:00 "), ID_TOTAL_TIME); - statusBar()->insertItem( i18n(" %1 kB/s ").arg("0"), ID_TOTAL_SPEED); - - // setup listview - listProgress = new ListProgress( this, "progresslist" ); - - setCentralWidget( listProgress ); - - connect( listProgress, TQT_SIGNAL( selectionChanged() ), - TQT_SLOT( slotSelection() ) ); - connect( listProgress, TQT_SIGNAL( executed( TQListViewItem* ) ), - TQT_SLOT( slotToggleDefaultProgress( TQListViewItem* ) ) ); - connect( listProgress, TQT_SIGNAL( contextMenu( KListView*, TQListViewItem *, const TQPoint &)), - TQT_SLOT(slotShowContextMenu(KListView*, TQListViewItem *, const TQPoint&))); - - - // setup animation timer - updateTimer = new TQTimer( this ); - connect( updateTimer, TQT_SIGNAL( timeout() ), - TQT_SLOT( slotUpdate() ) ); - m_bUpdateNewJob=false; - - setCaption(i18n("Progress Dialog")); - setMinimumSize( 150, 50 ); - resize( m_initWidth, m_initHeight); - - applySettings(); - -/* if ((m_bShowList) && (m_keepListOpen)) - { - cerr<<"show() !"<stop(); -} - -void UIServer::applySettings() -{ - if ((m_showSystemTray) && (m_systemTray==0)) - { - m_systemTray=new UIServerSystemTray(this); - m_systemTray->show(); - } - else if ((m_showSystemTray==false) && (m_systemTray!=0)) - { - delete m_systemTray; - m_systemTray=0; - } - - if (m_showStatusBar==false) - statusBar()->hide(); - else - statusBar()->show(); - if (m_showToolBar==false) - toolBar()->hide(); - else - toolBar()->show(); -} - -void UIServer::slotShowContextMenu(KListView*, TQListViewItem* item, const TQPoint& pos) -{ - if (m_contextMenu==0) - { - m_contextMenu=new TQPopupMenu(this); - m_idCancelItem = m_contextMenu->insertItem(i18n("Cancel Job"), this, TQT_SLOT(slotCancelCurrent())); -// m_contextMenu->insertItem(i18n("Toggle Progress"), this, TQT_SLOT(slotToggleDefaultProgress())); - m_contextMenu->insertSeparator(); - m_contextMenu->insertItem(i18n("Settings..."), this, TQT_SLOT(slotConfigure())); - } - if ( item ) - item->setSelected( true ); - bool enabled = false; - TQListViewItemIterator it( listProgress ); - for ( ; it.current(); ++it ) { - if ( it.current()->isSelected() ) { - enabled = true; - break; - } - } - m_contextMenu->setItemEnabled( m_idCancelItem, enabled); - - m_contextMenu->popup(pos); -} - -void UIServer::slotRemoveSystemTrayIcon() -{ - m_showSystemTray=false; - applySettings(); - writeSettings(); -} - -void UIServer::slotConfigure() -{ - if (m_configDialog==0) - { - m_configDialog=new ProgressConfigDialog(0); -// connect(m_configDialog,TQT_SIGNAL(cancelClicked()), this, TQT_SLOT(slotCancelConfig())); - connect(m_configDialog,TQT_SIGNAL(okClicked()), this, TQT_SLOT(slotApplyConfig())); - connect(m_configDialog,TQT_SIGNAL(applyClicked()), this, TQT_SLOT(slotApplyConfig())); - } - m_configDialog->m_showSystemTrayCb->setChecked(m_showSystemTray); - m_configDialog->m_keepOpenCb->setChecked(m_keepListOpen); - m_configDialog->m_toolBarCb->setChecked(m_showToolBar); - m_configDialog->m_statusBarCb->setChecked(m_showStatusBar); - m_configDialog->m_headerCb->setChecked(listProgress->m_showHeader); - m_configDialog->m_fixedWidthCb->setChecked(listProgress->m_fixedColumnWidths); - for (int i=0; isetChecked(i, listProgress->m_lpcc[i].enabled); - } - m_configDialog->show(); -} - -void UIServer::slotApplyConfig() -{ - m_showSystemTray=m_configDialog->m_showSystemTrayCb->isChecked(); - m_keepListOpen=m_configDialog->m_keepOpenCb->isChecked(); - m_showToolBar=m_configDialog->m_toolBarCb->isChecked(); - m_showStatusBar=m_configDialog->m_statusBarCb->isChecked(); - listProgress->m_showHeader=m_configDialog->m_headerCb->isChecked(); - listProgress->m_fixedColumnWidths=m_configDialog->m_fixedWidthCb->isChecked(); - for (int i=0; im_lpcc[i].enabled=m_configDialog->isChecked(i); - - - applySettings(); - listProgress->applySettings(); - writeSettings(); - listProgress->writeSettings(); -} - -int UIServer::newJob( TQCString observerAppId, bool showProgress ) -{ - kdDebug(7024) << "UIServer::newJob observerAppId=" << observerAppId << ". " - << "Giving id=" << s_jobId+1 << endl; - - TQListViewItemIterator it( listProgress ); - for ( ; it.current(); ++it ) { - if ( it.current()->itemBelow() == 0L ) { // this will find the end of list - break; - } - } - - // increment counter - s_jobId++; - - bool show = !m_bShowList && showProgress; - - ProgressItem *item = new ProgressItem( listProgress, it.current(), observerAppId, s_jobId, show ); - connect( item, TQT_SIGNAL( jobCanceled( ProgressItem* ) ), - TQT_SLOT( slotJobCanceled( ProgressItem* ) ) ); - - if ( m_bShowList && !updateTimer->isActive() ) - updateTimer->start( 1000 ); - - m_bUpdateNewJob=true; - - return s_jobId; -} - - -ProgressItem* UIServer::findItem( int id ) -{ - TQListViewItemIterator it( listProgress ); - - ProgressItem *item; - - for ( ; it.current(); ++it ) { - item = (ProgressItem*) it.current(); - if ( item->jobId() == id ) { - return item; - } - } - - return 0L; -} - - -void UIServer::setItemVisible( ProgressItem * item, bool visible ) -{ - item->setVisible( visible ); - // Check if we were the last one to be visible - // or the first one -> hide/show the list in that case - // (Note that the user could have hidden the listview by hand yet, no time) - if ( m_bShowList ) { - m_bUpdateNewJob = true; - slotUpdate(); - } -} - -// Called by Observer when opening a skip or rename dialog -void UIServer::setJobVisible( int id, bool visible ) -{ - kdDebug(7024) << "UIServer::setJobVisible id=" << id << " visible=" << visible << endl; - ProgressItem *item = findItem( id ); - Q_ASSERT( item ); - if ( item ) - setItemVisible( item, visible ); -} - -void UIServer::jobFinished( int id ) -{ - kdDebug(7024) << "UIServer::jobFinished id=" << id << endl; - ProgressItem *item = findItem( id ); - - // remove item from the list and delete the corresponding defaultprogress - if ( item ) { - if ( item->keepOpen() ) - item->finished(); - else - delete item; - } -} - - -void UIServer::totalSize( int id, unsigned long size ) -{ totalSize64(id, size); } - -void UIServer::totalSize64( int id, TDEIO::filesize_t size ) -{ -// kdDebug(7024) << "UIServer::totalSize " << id << " " << TDEIO::number(size) << endl; - - ProgressItem *item = findItem( id ); - if ( item ) { - item->setTotalSize( size ); - } -} - -void UIServer::totalFiles( int id, unsigned long files ) -{ - kdDebug(7024) << "UIServer::totalFiles " << id << " " << (unsigned int) files << endl; - - ProgressItem *item = findItem( id ); - if ( item ) { - item->setTotalFiles( files ); - } -} - -void UIServer::totalDirs( int id, unsigned long dirs ) -{ - kdDebug(7024) << "UIServer::totalDirs " << id << " " << (unsigned int) dirs << endl; - - ProgressItem *item = findItem( id ); - if ( item ) { - item->setTotalDirs( dirs ); - } -} - -void UIServer::processedSize( int id, unsigned long size ) -{ processedSize64(id, size); } - -void UIServer::processedSize64( int id, TDEIO::filesize_t size ) -{ - //kdDebug(7024) << "UIServer::processedSize " << id << " " << TDEIO::number(size) << endl; - - ProgressItem *item = findItem( id ); - if ( item ) { - item->setProcessedSize( size ); - } -} - -void UIServer::processedFiles( int id, unsigned long files ) -{ - //kdDebug(7024) << "UIServer::processedFiles " << id << " " << (unsigned int) files << endl; - - ProgressItem *item = findItem( id ); - if ( item ) { - item->setProcessedFiles( files ); - } -} - -void UIServer::processedDirs( int id, unsigned long dirs ) -{ - kdDebug(7024) << "UIServer::processedDirs " << id << " " << (unsigned int) dirs << endl; - - ProgressItem *item = findItem( id ); - if ( item ) { - item->setProcessedDirs( dirs ); - } -} - -void UIServer::percent( int id, unsigned long ipercent ) -{ - //kdDebug(7024) << "UIServer::percent " << id << " " << (unsigned int) ipercent << endl; - - ProgressItem *item = findItem( id ); - if ( item ) { - item->setPercent( ipercent ); - } -} - -void UIServer::speed( int id, unsigned long bytes_per_second ) -{ - //kdDebug(7024) << "UIServer::speed " << id << " " << (unsigned int) bytes_per_second << endl; - - ProgressItem *item = findItem( id ); - if ( item ) { - item->setSpeed( bytes_per_second ); - } -} - -void UIServer::infoMessage( int id, const TQString & msg ) -{ - //kdDebug(7024) << "UIServer::infoMessage " << id << " " << msg << endl; - - ProgressItem *item = findItem( id ); - if ( item ) { - item->setInfoMessage( msg ); - } -} - -void UIServer::canResume( int id, unsigned long offset ) -{ canResume64(id, offset); } - -void UIServer::canResume64( int id, TDEIO::filesize_t offset ) -{ - //kdDebug(7024) << "UIServer::canResume " << id << " " << offset << endl; - - ProgressItem *item = findItem( id ); - if ( item ) { - item->setCanResume( offset ); - } -} - -void UIServer::copying( int id, KURL from, KURL to ) -{ - //kdDebug(7024) << "UIServer::copying " << id << " " << from.url() << " " << to.url() << endl; - - ProgressItem *item = findItem( id ); - if ( item ) { - item->setCopying( from, to ); - } -} - -void UIServer::moving( int id, KURL from, KURL to ) -{ - //kdDebug(7024) << "UIServer::moving " << id << " " << from.url() << " " << to.url() << endl; - - ProgressItem *item = findItem( id ); - if ( item ) { - item->setMoving( from, to ); - } -} - -void UIServer::deleting( int id, KURL url ) -{ - //kdDebug(7024) << "UIServer::deleting " << id << " " << url.url() << endl; - - ProgressItem *item = findItem( id ); - if ( item ) { - item->setDeleting( url ); - } -} - -void UIServer::transferring( int id, KURL url ) -{ - //kdDebug(7024) << "UIServer::transferring " << id << " " << url.url() << endl; - - ProgressItem *item = findItem( id ); - if ( item ) { - item->setTransferring( url ); - } -} - -void UIServer::creatingDir( int id, KURL dir ) -{ - kdDebug(7024) << "UIServer::creatingDir " << id << " " << dir.url() << endl; - - ProgressItem *item = findItem( id ); - if ( item ) { - item->setCreatingDir( dir ); - } -} - -void UIServer::stating( int id, KURL url ) -{ - kdDebug(7024) << "UIServer::stating " << id << " " << url.url() << endl; - - ProgressItem *item = findItem( id ); - if ( item ) { - item->setStating( url ); - } -} - -void UIServer::mounting( int id, TQString dev, TQString point ) -{ - kdDebug(7024) << "UIServer::mounting " << id << " " << dev << " " << point << endl; - - ProgressItem *item = findItem( id ); - if ( item ) { - item->setMounting( dev, point ); - } -} - -void UIServer::unmounting( int id, TQString point ) -{ - kdDebug(7024) << "UIServer::unmounting " << id << " " << point << endl; - - ProgressItem *item = findItem( id ); - if ( item ) { - item->setUnmounting( point ); - } -} - -void UIServer::killJob( TQCString observerAppId, int progressId ) -{ - // Contact the object "TDEIO::Observer" in the application - Observer_stub observer( observerAppId, "TDEIO::Observer" ); - // Tell it to kill the job - observer.killJob( progressId ); -} - -void UIServer::slotJobCanceled( ProgressItem *item ) { - kdDebug(7024) << "UIServer::slotJobCanceled appid=" << item->appId() << " jobid=" << item->jobId() << endl; - // kill the corresponding job - killJob( item->appId(), item->jobId() ); - - // TDEIO::Job, when killed, should call back jobFinished(), but we can't - // really rely on that - the app may have crashed - delete item; -} - - -void UIServer::slotQuit() -{ - m_shuttingDown = true; - kapp->quit(); -} - -void UIServer::slotUpdate() { - // don't do anything if we don't have any inserted progress item - // or if they're all hidden - TQListViewItemIterator lvit( listProgress ); - bool visible = false; - for ( ; lvit.current(); ++lvit ) - if ( ((ProgressItem*)lvit.current())->isVisible() ) { - visible = true; - break; - } - - if ( !visible || !m_bShowList ) { - if (!m_keepListOpen) hide(); - updateTimer->stop(); - return; - } - - // Calling show() is conditional, so that users can close the window - // and it only pops up back when a new job is started - if (m_bUpdateNewJob) - { - m_bUpdateNewJob=false; - show(); - - // Make sure we'll be called back - if ( m_bShowList && !updateTimer->isActive() ) - updateTimer->start( 1000 ); - } - - int iTotalFiles = 0; - TDEIO::filesize_t iTotalSize = 0; - int iTotalSpeed = 0; - unsigned int totalRemTime = 0; // in seconds - - ProgressItem *item; - - // count totals for statusbar - TQListViewItemIterator it( listProgress ); - - for ( ; it.current(); ++it ) { - item = (ProgressItem*) it.current(); - if ( item->totalSize() != 0 ) { - iTotalSize += ( item->totalSize() - item->processedSize() ); - } - iTotalFiles += ( item->totalFiles() - item->processedFiles() ); - iTotalSpeed += item->speed(); - - if ( item->remainingSeconds() > totalRemTime ) { - totalRemTime = item->remainingSeconds(); - } - } - - // update statusbar - statusBar()->changeItem( i18n( " Files: %1 ").arg( iTotalFiles ), ID_TOTAL_FILES); - statusBar()->changeItem( i18n( "Remaining Size", " Rem. Size: %1 ").arg( TDEIO::convertSize( iTotalSize ) ), - ID_TOTAL_SIZE); - statusBar()->changeItem( i18n( "Remaining Time", " Rem. Time: %1 ").arg( TDEIO::convertSeconds( totalRemTime ) ), - ID_TOTAL_TIME); - statusBar()->changeItem( i18n( " %1/s ").arg( TDEIO::convertSize( iTotalSpeed ) ), - ID_TOTAL_SPEED); - -} - -void UIServer::setListMode( bool list ) -{ - m_bShowList = list; - TQListViewItemIterator it( listProgress ); - for ( ; it.current(); ++it ) { - // When going to list mode -> hide all progress dialogs - // When going back to separate dialogs -> show them all - ((ProgressItem*) it.current())->setDefaultProgressVisible( !list ); - } - - if (m_bShowList) - { - show(); - updateTimer->start( 1000 ); - } - else - { - hide(); - updateTimer->stop(); - } -} - -void UIServer::slotToggleDefaultProgress( TQListViewItem *item ) { - ((ProgressItem*) item )->slotToggleDefaultProgress(); -} - - -void UIServer::slotSelection() { - TQListViewItemIterator it( listProgress ); - - for ( ; it.current(); ++it ) { - if ( it.current()->isSelected() ) { - toolBar()->setItemEnabled( TOOL_CANCEL, TRUE); - return; - } - } - toolBar()->setItemEnabled( TOOL_CANCEL, FALSE); -} - -// This code is deprecated, slaves go to Observer::openPassDlg now, -// but this is kept for compat (DCOP calls to kio_uiserver). -TQByteArray UIServer::openPassDlg( const TDEIO::AuthInfo &info ) -{ - kdDebug(7024) << "UIServer::openPassDlg: User= " << info.username - << ", Msg= " << info.prompt << endl; - TDEIO::AuthInfo inf(info); - int result = TDEIO::PasswordDialog::getNameAndPassword( inf.username, inf.password, - &inf.keepPassword, inf.prompt, - inf.readOnly, inf.caption, - inf.comment, inf.commentLabel ); - TQByteArray data; - TQDataStream stream( data, IO_WriteOnly ); - if ( result == TQDialog::Accepted ) - inf.setModified( true ); - else - inf.setModified( false ); - stream << inf; - return data; -} - -int UIServer::messageBox( int progressId, int type, const TQString &text, const TQString &caption, const TQString &buttonYes, const TQString &buttonNo ) -{ - return Observer::messageBox( progressId, type, text, caption, buttonYes, buttonNo ); -} - -void UIServer::showSSLInfoDialog(const TQString &url, const TDEIO::MetaData &meta) -{ - return showSSLInfoDialog(url,meta,0); -} - -void UIServer::showSSLInfoDialog(const TQString &url, const TDEIO::MetaData &meta, int mainwindow) -{ - KSSLInfoDlg *kid = new KSSLInfoDlg(meta["ssl_in_use"].upper()=="TRUE", 0L /*parent?*/, 0L, true); - KSSLCertificate *x = KSSLCertificate::fromString(meta["ssl_peer_certificate"].local8Bit()); - if (x) { - // Set the chain back onto the certificate - TQStringList cl = - TQStringList::split(TQString("\n"), meta["ssl_peer_chain"]); - TQPtrList ncl; - - ncl.setAutoDelete(true); - for (TQStringList::Iterator it = cl.begin(); it != cl.end(); ++it) { - KSSLCertificate *y = KSSLCertificate::fromString((*it).local8Bit()); - if (y) ncl.append(y); - } - - if (ncl.count() > 0) - x->chain().setChain(ncl); - - kdDebug(7024) << "ssl_cert_errors=" << meta["ssl_cert_errors"] << endl; - kid->setCertState(meta["ssl_cert_errors"]); - TQString ip = meta.contains("ssl_proxied") ? "" : meta["ssl_peer_ip"]; - kid->setup( x, - ip, - url, // the URL - meta["ssl_cipher"], - meta["ssl_cipher_desc"], - meta["ssl_cipher_version"], - meta["ssl_cipher_used_bits"].toInt(), - meta["ssl_cipher_bits"].toInt(), - KSSLCertificate::KSSLValidation(meta["ssl_cert_state"].toInt())); - kdDebug(7024) << "Showing SSL Info dialog" << endl; -#ifndef Q_WS_WIN - if( mainwindow != 0 ) - KWin::setMainWindow( kid, mainwindow ); -#endif - kid->exec(); - delete x; - kdDebug(7024) << "SSL Info dialog closed" << endl; - } else { - KMessageBox::information( 0L, // parent ? - i18n("The peer SSL certificate appears to be corrupt."), i18n("SSL") ); - } - // Don't delete kid!! -} - -KSSLCertDlgRet UIServer::showSSLCertDialog(const TQString& host, const TQStringList& certList) -{ - return showSSLCertDialog( host, certList, 0 ); -} - -KSSLCertDlgRet UIServer::showSSLCertDialog(const TQString& host, const TQStringList& certList, int mainwindow) -{ - KSSLCertDlgRet rc; - rc.ok = false; - if (!certList.isEmpty()) { - KSSLCertDlg *kcd = new KSSLCertDlg(0L, 0L, true); - kcd->setupDialog(certList); - kcd->setHost(host); - kdDebug(7024) << "Showing SSL certificate dialog" << endl; -#ifndef Q_WS_WIN - if( mainwindow != 0 ) - KWin::setMainWindow( kcd, mainwindow ); -#endif - kcd->exec(); - rc.ok = true; - rc.choice = kcd->getChoice(); - rc.save = kcd->saveChoice(); - rc.send = kcd->wantsToSend(); - kdDebug(7024) << "SSL certificate dialog closed" << endl; - delete kcd; - } - return rc; -} - - -TQByteArray UIServer::open_RenameDlg( int id, - const TQString & caption, - const TQString& src, const TQString & dest, - int mode, - unsigned long sizeSrc, - unsigned long sizeDest, - unsigned long ctimeSrc, - unsigned long ctimeDest, - unsigned long mtimeSrc, - unsigned long mtimeDest - ) -{ return open_RenameDlg64(id, caption, src, dest, mode, sizeSrc, sizeDest, - ctimeSrc, ctimeDest, mtimeSrc, mtimeDest); } - - -TQByteArray UIServer::open_RenameDlg64( int id, - const TQString & caption, - const TQString& src, const TQString & dest, - int mode, - TDEIO::filesize_t sizeSrc, - TDEIO::filesize_t sizeDest, - unsigned long ctimeSrc, - unsigned long ctimeDest, - unsigned long mtimeSrc, - unsigned long mtimeDest - ) -{ - // Hide existing dialog box if any - ProgressItem *item = findItem( id ); - if ( item ) - setItemVisible( item, false ); - TQString newDest; - kdDebug(7024) << "Calling TDEIO::open_RenameDlg" << endl; - TDEIO::RenameDlg_Result result = TDEIO::open_RenameDlg( caption, src, dest, - (TDEIO::RenameDlg_Mode) mode, newDest, - sizeSrc, sizeDest, - (time_t)ctimeSrc, (time_t)ctimeDest, - (time_t)mtimeSrc, (time_t)mtimeDest ); - kdDebug(7024) << "TDEIO::open_RenameDlg done" << endl; - TQByteArray data; - TQDataStream stream( data, IO_WriteOnly ); - stream << TQ_UINT8(result) << newDest; - if ( item && result != TDEIO::R_CANCEL ) - setItemVisible( item, true ); - return data; -} - -int UIServer::open_SkipDlg( int id, - int /*bool*/ multi, - const TQString & error_text ) -{ - // Hide existing dialog box if any - ProgressItem *item = findItem( id ); - if ( item ) - setItemVisible( item, false ); - kdDebug(7024) << "Calling TDEIO::open_SkipDlg" << endl; - TDEIO::SkipDlg_Result result = TDEIO::open_SkipDlg( (bool)multi, error_text ); - if ( item && result != TDEIO::S_CANCEL ) - setItemVisible( item, true ); - return (TDEIO::SkipDlg_Result) result; -} - - -void UIServer::readSettings() { - TDEConfig config("uiserverrc"); - config.setGroup( "UIServer" ); - m_showStatusBar=config.readBoolEntry("ShowStatusBar",false); - m_showToolBar=config.readBoolEntry("ShowToolBar",true); - m_keepListOpen=config.readBoolEntry("KeepListOpen",false); - m_initWidth=config.readNumEntry("InitialWidth",460); - m_initHeight=config.readNumEntry("InitialHeight",150); - m_bShowList = config.readBoolEntry( "ShowList", false ); - m_showSystemTray=config.readBoolEntry("ShowSystemTray", false); -} - -void UIServer::writeSettings() { - TDEConfig config("uiserverrc"); - config.setGroup( "UIServer" ); - config.writeEntry("InitialWidth",width()); - config.writeEntry("InitialHeight",height()); - config.writeEntry("ShowStatusBar", m_showStatusBar); - config.writeEntry("ShowToolBar", m_showToolBar); - config.writeEntry("KeepListOpen", m_keepListOpen); - config.writeEntry("ShowList", m_bShowList); - config.writeEntry("ShowSystemTray", m_showSystemTray); -} - - -void UIServer::slotCancelCurrent() { - TQListViewItemIterator it( listProgress ); - ProgressItem *item; - - // kill selected jobs - for ( ; it.current() ; ++it ) - { - if ( it.current()->isSelected() ) { - item = (ProgressItem*) it.current(); - killJob( item->appId(), item->jobId() ); - return; - } - } -} - -void UIServer::resizeEvent(TQResizeEvent* e) -{ - KMainWindow::resizeEvent(e); - writeSettings(); -} - -bool UIServer::queryClose() -{ - if (( !m_shuttingDown ) && !kapp->sessionSaving()) { - hide(); - return false; - } - return true; -} - -UIServer* UIServer::createInstance() -{ - return new UIServer; -} - -//------------------------------------------------------------ - -extern "C" KDE_EXPORT int kdemain(int argc, char **argv) -{ - KLocale::setMainCatalogue("tdelibs"); - // GS 5/2001 - I changed the name to "TDE" to make it look better - // in the titles of dialogs which are displayed. - TDEAboutData aboutdata("kio_uiserver", I18N_NOOP("TDE"), - "0.8", I18N_NOOP("TDE Progress Information UI Server"), - TDEAboutData::License_GPL, "(C) 2000, David Faure & Matt Koss"); - // Who's the maintainer ? :) - aboutdata.addAuthor("David Faure",I18N_NOOP("Developer"),"faure@kde.org"); - aboutdata.addAuthor("Matej Koss",I18N_NOOP("Developer"),"koss@miesto.sk"); - - TDECmdLineArgs::init( argc, argv, &aboutdata ); - // TDECmdLineArgs::addCmdLineOptions( options ); - KUniqueApplication::addCmdLineOptions(); - - if (!KUniqueApplication::start()) - { - kdDebug(7024) << "kio_uiserver is already running!" << endl; - return (0); - } - - KUniqueApplication app; - - // This app is started automatically, no need for session management - app.disableSessionManagement(); - app.dcopClient()->setDaemonMode( true ); - - uiserver = UIServer::createInstance(); - -// app.setMainWidget( uiserver ); - - return app.exec(); -} - -#include "uiserver.moc" diff --git a/kio/misc/uiserver.h b/kio/misc/uiserver.h deleted file mode 100644 index abe935ad5..000000000 --- a/kio/misc/uiserver.h +++ /dev/null @@ -1,430 +0,0 @@ -/* This file is part of the KDE libraries - Copyright (C) 2000 Matej Koss - David Faure - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License version 2 as published by the Free Software Foundation. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ -#ifndef __kio_uiserver_h__ -#define __kio_uiserver_h__ - -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -class ListProgress; -class KSqueezedTextLabel; -class ProgressItem; -class UIServer; - -namespace TDEIO { - class Job; - class DefaultProgress; -} - - -struct ListProgressColumnConfig -{ - TQString title; - int index; - int width; - bool enabled; -}; - -/** -* List view in the UIServer. -* @internal -*/ -class TDEIO_EXPORT ListProgress : public KListView { - - Q_OBJECT - -public: - - ListProgress (TQWidget *parent = 0, const char *name = 0 ); - - virtual ~ListProgress(); - - /** - * Field constants - */ - enum ListProgressFields { - TB_OPERATION = 0, - TB_LOCAL_FILENAME = 1, - TB_RESUME = 2, - TB_COUNT = 3, //lv_count - TB_PROGRESS = 4, // lv_progress - TB_TOTAL = 5, - TB_SPEED = 6, - TB_REMAINING_TIME = 7, - TB_ADDRESS = 8, - TB_MAX = 9 - }; - - friend class ProgressItem; - friend class UIServer; -protected slots: - void columnWidthChanged(int column); -protected: - - void writeSettings(); - void readSettings(); - void applySettings(); - void createColumns(); - - bool m_showHeader; - bool m_fixedColumnWidths; - ListProgressColumnConfig m_lpcc[TB_MAX]; - //hack, alexxx - KSqueezedTextLabel *m_squeezer; -}; - -/** -* One item in the ListProgress -* @internal -*/ -class TDEIO_EXPORT ProgressItem : public TQObject, public TQListViewItem { - - Q_OBJECT - -public: - ProgressItem( ListProgress* view, TQListViewItem *after, TQCString app_id, int job_id, - bool showDefault = true ); - ~ProgressItem(); - - TQCString appId() { return m_sAppId; } - int jobId() { return m_iJobId; } - - bool keepOpen() const; - void finished(); - - void setVisible( bool visible ); - void setDefaultProgressVisible( bool visible ); - bool isVisible() const { return m_visible; } - - void setTotalSize( TDEIO::filesize_t bytes ); - void setTotalFiles( unsigned long files ); - void setTotalDirs( unsigned long dirs ); - - void setProcessedSize( TDEIO::filesize_t size ); - void setProcessedFiles( unsigned long files ); - void setProcessedDirs( unsigned long dirs ); - - void setPercent( unsigned long percent ); - void setSpeed( unsigned long bytes_per_second ); - void setInfoMessage( const TQString & msg ); - - void setCopying( const KURL& from, const KURL& to ); - void setMoving( const KURL& from, const KURL& to ); - void setDeleting( const KURL& url ); - void setTransferring( const KURL& url ); - void setCreatingDir( const KURL& dir ); - void setStating( const KURL& url ); - void setMounting( const TQString & dev, const TQString & point ); - void setUnmounting( const TQString & point ); - - void setCanResume( TDEIO::filesize_t offset ); - - TDEIO::filesize_t totalSize() { return m_iTotalSize; } - unsigned long totalFiles() { return m_iTotalFiles; } - TDEIO::filesize_t processedSize() { return m_iProcessedSize; } - unsigned long processedFiles() { return m_iProcessedFiles; } - unsigned long speed() { return m_iSpeed; } - unsigned int remainingSeconds() { return m_remainingSeconds; } - - const TQString& fullLengthAddress() const {return m_fullLengthAddress;} - void setText(ListProgress::ListProgressFields field, const TQString& text); -public slots: - void slotShowDefaultProgress(); - void slotToggleDefaultProgress(); - -protected slots: - void slotCanceled(); - -signals: - void jobCanceled( ProgressItem* ); - -protected: - void updateVisibility(); - - // ids that uniquely identify this progress item - TQCString m_sAppId; - int m_iJobId; - - // whether shown or not (it is hidden if a rename dialog pops up for the same job) - bool m_visible; - bool m_defaultProgressVisible; - - // parent listview - ListProgress *listProgress; - - // associated default progress dialog - TDEIO::DefaultProgress *defaultProgress; - - // we store these values for calculation of totals ( for statusbar ) - TDEIO::filesize_t m_iTotalSize; - unsigned long m_iTotalFiles; - TDEIO::filesize_t m_iProcessedSize; - unsigned long m_iProcessedFiles; - unsigned long m_iSpeed; - int m_remainingSeconds; - TQTimer m_showTimer; - TQString m_fullLengthAddress; -}; - -class TQResizeEvent; -class TQHideEvent; -class TQShowEvent; -class ProgressConfigDialog; -class TQPopupMenu; -class UIServerSystemTray; - -/** - * It's purpose is to show progress of IO operations. - * There is only one instance of this window for all jobs. - * - * All IO operations ( jobs ) are displayed in this window, one line per operation. - * User can cancel operations with Cancel button on toolbar. - * - * Double clicking an item in the list opens a small download window ( DefaultProgress ). - * - * @short Graphical server for progress information with an optional all-in-one progress window. - * @author David Faure - * @author Matej Koss - * - * @internal - */ -class TDEIO_EXPORT UIServer : public KMainWindow, public DCOPObject { - - K_DCOP - Q_OBJECT - - UIServer(); - virtual ~UIServer(); - -public: - static UIServer* createInstance(); - -k_dcop: - - /** - * Signal a new job - * @param appId the DCOP application id of the job's parent application - * @see TDEIO::Observer::newJob - * @param showProgress whether to popup the progress for the job. - * Usually true, but may be false when we use kio_uiserver for - * other things, like SSL dialogs. - * @return the job id - */ - int newJob( TQCString appId, bool showProgress ); - - ASYNC jobFinished( int id ); - - ASYNC totalSize( int id, unsigned long size ); - ASYNC totalSize64( int id, TDEIO::filesize_t size ); - ASYNC totalFiles( int id, unsigned long files ); - ASYNC totalDirs( int id, unsigned long dirs ); - - ASYNC processedSize( int id, unsigned long bytes ); - ASYNC processedSize64( int id, TDEIO::filesize_t bytes ); - ASYNC processedFiles( int id, unsigned long files ); - ASYNC processedDirs( int id, unsigned long dirs ); - - ASYNC percent( int id, unsigned long ipercent ); - ASYNC speed( int id, unsigned long bytes_per_second ); - ASYNC infoMessage( int id, const TQString & msg ); - - ASYNC copying( int id, KURL from, KURL to ); - ASYNC moving( int id, KURL from, KURL to ); - ASYNC deleting( int id, KURL url ); - ASYNC transferring( int id, KURL url ); - ASYNC creatingDir( int id, KURL dir ); - ASYNC stating( int id, KURL url ); - - ASYNC mounting( int id, TQString dev, TQString point ); - ASYNC unmounting( int id, TQString point ); - - ASYNC canResume( int id, unsigned long offset ); - ASYNC canResume64( int id, TDEIO::filesize_t offset ); - - /** - * @deprecated (it blocks other apps). - * Use TDEIO::PasswordDialog::getNameAndPassword instead. - * To be removed in KDE 4.0. - */ - TQByteArray openPassDlg( const TDEIO::AuthInfo &info ); - - /** - * Popup a message box. - * @param id The message identifier. - * @param type type of message box: QuestionYesNo, WarningYesNo, WarningContinueCancel... - * This enum is defined in slavebase.h, it currently is: - * QuestionYesNo = 1, WarningYesNo = 2, WarningContinueCancel = 3, - * WarningYesNoCancel = 4, Information = 5, SSLMessageBox = 6 - * @param text Message string. May contain newlines. - * @param caption Message box title. - * @param buttonYes The text for the first button. - * The default is i18n("&Yes"). - * @param buttonNo The text for the second button. - * The default is i18n("&No"). - * Note: for ContinueCancel, buttonYes is the continue button and buttonNo is unused. - * and for Information, none is used. - * @return a button code, as defined in KMessageBox, or 0 on communication error. - */ - int messageBox( int id, int type, const TQString &text, const TQString &caption, - const TQString &buttonYes, const TQString &buttonNo ); - - /** - * @deprecated (it blocks other apps). - * Use TDEIO::open_RenameDlg instead. - * To be removed in KDE 4.0. - */ - TQByteArray open_RenameDlg64( int id, - const TQString & caption, - const TQString& src, const TQString & dest, - int /* TDEIO::RenameDlg_Mode */ mode, - TDEIO::filesize_t sizeSrc, - TDEIO::filesize_t sizeDest, - unsigned long /* time_t */ ctimeSrc, - unsigned long /* time_t */ ctimeDest, - unsigned long /* time_t */ mtimeSrc, - unsigned long /* time_t */ mtimeDest - ); - /** - * @deprecated (it blocks other apps). - * Use TDEIO::open_RenameDlg instead. - * To be removed in KDE 4.0. - */ - TQByteArray open_RenameDlg( int id, - const TQString & caption, - const TQString& src, const TQString & dest, - int /* TDEIO::RenameDlg_Mode */ mode, - unsigned long sizeSrc, - unsigned long sizeDest, - unsigned long /* time_t */ ctimeSrc, - unsigned long /* time_t */ ctimeDest, - unsigned long /* time_t */ mtimeSrc, - unsigned long /* time_t */ mtimeDest - ); - - /** - * @deprecated (it blocks other apps). - * Use TDEIO::open_SkipDlg instead. - * To be removed in KDE 4.0. - */ - int open_SkipDlg( int id, - int /*bool*/ multi, - const TQString & error_text ); - - /** - * Switch to or from list mode - called by the kcontrol module - */ - void setListMode( bool list ); - - /** - * Hide or show a job. Typically, we hide a job while a "skip" or "rename" dialog - * is being shown for this job. This prevents killing it from the uiserver. - */ - void setJobVisible( int id, bool visible ); - - /** - * Show a SSL Information Dialog - */ - void showSSLInfoDialog(const TQString &url, const TDEIO::MetaData &data, int mainwindow); - - /** - * @deprecated - */ - void showSSLInfoDialog(const TQString &url, const TDEIO::MetaData &data); - - /* - * Show an SSL Certificate Selection Dialog - */ - KSSLCertDlgRet showSSLCertDialog(const TQString& host, const TQStringList& certList, int mainwindow); - - /* - * @deprecated - */ - KSSLCertDlgRet showSSLCertDialog(const TQString& host, const TQStringList& certList); - -public slots: - void slotConfigure(); - void slotRemoveSystemTrayIcon(); -protected slots: - - void slotUpdate(); - void slotQuit(); - - void slotCancelCurrent(); - - void slotToggleDefaultProgress( TQListViewItem * ); - void slotSelection(); - - void slotJobCanceled( ProgressItem * ); - void slotApplyConfig(); - void slotShowContextMenu(KListView*, TQListViewItem *item, const TQPoint& pos); - -protected: - - ProgressItem* findItem( int id ); - - virtual void resizeEvent(TQResizeEvent* e); - virtual bool queryClose(); - - void setItemVisible( ProgressItem * item, bool visible ); - - TQTimer* updateTimer; - ListProgress* listProgress; - - KToolBar::BarPosition toolbarPos; - TQString properties; - - void applySettings(); - void readSettings(); - void writeSettings(); -private: - - void killJob( TQCString observerAppId, int progressId ); - - int m_initWidth; - int m_initHeight; - int m_idCancelItem; - bool m_bShowList; - bool m_showStatusBar; - bool m_showToolBar; - bool m_keepListOpen; - bool m_showSystemTray; - bool m_shuttingDown; - - // true if there's a new job that hasn't been shown yet. - bool m_bUpdateNewJob; - ProgressConfigDialog *m_configDialog; - TQPopupMenu* m_contextMenu; - UIServerSystemTray *m_systemTray; - - static int s_jobId; - friend class no_bogus_warning_from_gcc; -}; - -// -*- mode: c++; c-basic-offset: 2 -*- -#endif diff --git a/kio/pics/CMakeLists.txt b/kio/pics/CMakeLists.txt deleted file mode 100644 index 1830674b4..000000000 --- a/kio/pics/CMakeLists.txt +++ /dev/null @@ -1,14 +0,0 @@ -################################################# -# -# (C) 2010 Serghei Amelian -# serghei (DOT) amelian (AT) gmail.com -# -# Improvements and feedback are welcome -# -# This file is released under GPL >= 2 -# -################################################# - -##### other data ################################ - -tde_install_icons( DESTINATION ${DATA_INSTALL_DIR}/kio_uiserver/icons ) diff --git a/kio/pics/Makefile.am b/kio/pics/Makefile.am deleted file mode 100644 index db5ddb1cc..000000000 --- a/kio/pics/Makefile.am +++ /dev/null @@ -1,3 +0,0 @@ -kiouiservericonsdir = $(kde_datadir)/kio_uiserver/icons -kiouiservericons_ICON = AUTO - diff --git a/kio/pics/cr16-app-kio_uiserver.png b/kio/pics/cr16-app-kio_uiserver.png deleted file mode 100644 index 41b3f4367..000000000 Binary files a/kio/pics/cr16-app-kio_uiserver.png and /dev/null differ diff --git a/kio/proxytype.pl b/kio/proxytype.pl deleted file mode 100755 index 553db53f7..000000000 --- a/kio/proxytype.pl +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/perl -# the script is called with interpreter, so don't worry about the path - -while(<>) -{ - $useproxy = 1 if /UseProxy=true/; - $usepac = 1 if /Proxy Config Script=.*\S/; -} -printf ("# DELETE UseProxy\n"); -$proxytype = $useproxy ? ($usepac ? 2 : 1) : 0; -print "ProxyType=$proxytype\n" if $proxytype; diff --git a/kio/renamedlgplugin.desktop b/kio/renamedlgplugin.desktop deleted file mode 100644 index d6a9f8f1f..000000000 --- a/kio/renamedlgplugin.desktop +++ /dev/null @@ -1,84 +0,0 @@ -[Desktop Entry] -Type=ServiceType -X-TDE-ServiceType=RenameDlg/Plugin -Comment=Plugin for the Rename Dialog -Comment[af]=Inplak vir die Herbenaam Dialoog -Comment[ar]=ملحق لمربع حوار إعادة التسمية -Comment[az]=Yenidən Adlandırma Dialoqu Üçün Əlavə -Comment[bg]=Приставка за диалога за преименуване -Comment[bn]=পরিবর্তন -Comment[bs]=Dodatak za Rename dijalog -Comment[ca]=Connector per al diàleg de reanomenar -Comment[cs]=Modul pro přejmenovávací dialog -Comment[csb]=Pligins dialogòwegò òkna Zmianë miona -Comment[cy]=Ategyn am yr Ymgom Ail-enwi -Comment[da]=Plugin til omdøbningsdialog -Comment[de]=Erweiterung für den Umbenennen-Dialog -Comment[el]=Πρόσθετο για το διάλογο μετονομασίας -Comment[en_GB]=Plugin for the Rename Dialogue -Comment[eo]=Kromaĵo por la alinoma dialogo -Comment[es]=Plugin para el diálogo de renombrado -Comment[et]=Ümbernimetamise dialoogi plugin -Comment[eu]=Berrizendatze elkarrizketa-koadroen plugin-a -Comment[fa]=وصله برای محاورۀ تغییر نام -Comment[fi]=Lisäosa uudelleennimeämisikkunalle -Comment[fr]=Module externe pour la boîte de dialogue de renommage -Comment[fy]=Plugin foar it 'Omneame'-dialooch -Comment[ga]=Breiseán le haghaidh na dialóige athainmnithe -Comment[gl]=Plugin para o Diálogo de Renomeamento -Comment[he]=תוסף לדו־שיח שינוי השם -Comment[hi]=रीनेम डायलॉग के लिए प्लगइन -Comment[hr]=Dodatak dijaloga za preimenovanja -Comment[hu]=Bővítőmodul az átnevezési párbeszédablakhoz -Comment[id]=Plugin untuk Dialog Ubah Nama -Comment[is]=Íforrit fyrir 'endurnefna' gluggann -Comment[it]=Plugin per la finestra di dialogo "rinomina" -Comment[ja]=名前変更ダイアログ用プラグイン -Comment[ka]=გადარქმევის დიალოგის მოდული -Comment[kk]=Атауын өзгерту диалогтың модулі -Comment[km]=កម្មវិធីជំនួយ​ខាងក្នុង​សម្រាប់​ប្រអប់ ប្តូរឈ្មោះ -Comment[ko]=이름 바꾸기 대화창용 플러그인 -Comment[lb]=Plugin fir den Ëmbenennen-Dialog -Comment[lt]=Priedas pervadinimo dialogui -Comment[lv]=Spraudnis Pārsaukšanas Dialogam -Comment[mk]=Приклучок за дијалогот за преименување -Comment[mn]=Нэр өөрчилөх-Диалогийн Plugin -Comment[ms]=Plug masuk untuk namakan semula Dialog -Comment[mt]=Plugin għad-djalogu biex tbiddel l-isem -Comment[nb]=Programtillegg for omnavningsdialogen -Comment[nds]=Plugin för den Ümnömen-Dialoog -Comment[ne]=पुन: नामकरण संवादका लागि प्लगइन -Comment[nl]=Plugin voor de 'Hernoemen'-dialoog -Comment[nn]=Tillegg til dialogen for namnebyte -Comment[nso]=Tsenyo ya Poledisano ya Theoleswa -Comment[pa]=ਨਾਂ-ਤਬਦੀਲੀ ਪੁੱਛਗਿੱਛ ਤਾਕੀ ਲਈ ਪਲੱਗਿੰਨ -Comment[pl]=Wtyczka do okna dialogowego Zmiana nazwy -Comment[pt]='Plugin' para a Janela de Mudança do Nome -Comment[pt_BR]=Plug-in para o Diálogo Renomear -Comment[ro]=Modul pentru dialogul de redenumire -Comment[ru]=Модуль для диалога переименования -Comment[rw]=Icomeka ry'Ikiganiro cyo guhindura izina -Comment[se]=Lassemoduvla nammarievdadanláseža várás -Comment[sk]=Modul pre premenovací dialóg -Comment[sl]=Vstavek za pogovorno okno za preimenovanje -Comment[sq]=Shtojca për Dialogun Riemrim -Comment[sr]=Прикључак за дијалог за преименовање -Comment[sr@Latn]=Priključak za dijalog za preimenovanje -Comment[sv]=Insticksprogram för Byt namn-dialogrutan -Comment[ta]=மறுபெயரிடல் உரையாடலுக்கான சொருகுப்பொருள் -Comment[te]=పేరు మార్చు సంభాషణ కొరకు ప్లగిన్ -Comment[tg]=Барои Тирезаи Диалогӣ Номи Нав Гузоштани Пайвастан -Comment[th]=ปลั๊กอินสำหรับกล่องเปลี่ยนชื่อ -Comment[tr]=Yeniden İsimlendir İletişim Kutusu İçin Eklenti -Comment[tt]=İsem Quşu Dialogı öçen Östämä -Comment[uk]=Втулок для діалогу перейменування -Comment[uz]=Nomini oʻzgartirish dialogi uchun plagin -Comment[uz@cyrillic]=Номини ўзгартириш диалоги учун плагин -Comment[ven]=Pulagini uitela u rinulula nyambedzano -Comment[vi]=Bộ cầm phít cho hộp thoại thay đổi tên. -Comment[wa]=Tchôke-divins pol purnea di rlomaedje -Comment[xh]=Iplagi yangaphakathi Yencoko yababini Yokunika igama elitsha -Comment[zh_CN]=重命名对话的插件 -Comment[zh_HK]=更名對話盒的外掛程式 -Comment[zh_TW]=更名對話盒的外掛程式 -Comment[zu]=I-plugin Yengxoxo Yokuqamba kabusha diff --git a/kio/tdecmodule.desktop b/kio/tdecmodule.desktop deleted file mode 100644 index 5cbe9b786..000000000 --- a/kio/tdecmodule.desktop +++ /dev/null @@ -1,109 +0,0 @@ -[Desktop Entry] -Type=ServiceType -X-TDE-ServiceType=TDECModule -Name=TDE Control Module -Name[af]=TDE Beheer Module -Name[ar]=وحدة تحكم كيدي -Name[az]=TDE İdarə Modulu -Name[be]=Модуль кіравання TDE -Name[bg]=Контролен модул на TDE -Name[bn]=কে.ডি.ই. নিয়ন্ত্রণ মডিউল -Name[br]=Mollad kreizenn ren TDE -Name[bs]=TDE kontrolni modul -Name[ca]=Mòdul de control del TDE -Name[cs]=Ovládací modul TDE -Name[csb]=Kòntrolny mòduł pùltu TDE -Name[cy]=Modiwl Rheolaeth TDE -Name[da]=TDE-kontrolmodul -Name[de]=TDE-Kontrollmodul -Name[el]=Άρθρωμα ελέγχου του TDE -Name[eo]=TDE Agordmodulo -Name[es]=Módulo de control de TDE -Name[et]=TDE juhtimismoodul -Name[eu]=TDEren kontrol-modulua -Name[fa]=پیمانۀ کنترل TDE -Name[fi]=TDE:n ohjausmoduuli -Name[fr]=Module de configuration de TDE -Name[fy]=TDE konfiguraasjemodule -Name[ga]=Modúl Rialaithe TDE -Name[gl]=Módulo de Controlo de TDE -Name[he]=מודול תצורה של TDE -Name[hi]=केडीई नियंत्रण घटक -Name[hr]=TDE kontrolni modul -Name[hu]=TDE beállítómodul -Name[id]=Modul Kontrol TDE -Name[is]=TDE stjórneining -Name[it]=Modulo di controllo TDE -Name[ja]=TDE コントロールモジュール -Name[ka]=TDE-ს კონტროლის პულტი -Name[kk]=TDE басқару модулі -Name[km]=ម៉ូឌុល​ត្រួត​ពិនិត្យ​របស់ TDE -Name[ko]=TDE 제어 모듈 -Name[lb]=TDE-Kontrollmodul -Name[lt]=TDE valdymo modulis -Name[lv]=TDE kontroles modulis -Name[mk]=TDE Контролен Модул -Name[mn]=TDED-Хяналтын Модул -Name[ms]=Modul Kawalan TDE -Name[nb]=TDE kontrollpanel-modul -Name[nds]=TDE-Kuntrullmoduul -Name[ne]=TDE नियन्त्रण मोड्युल -Name[nl]=TDE Configuratiemodule -Name[nn]=TDE-kontrollmodul -Name[nso]=Seripa sa Taolo ya TDE -Name[pa]=TDE ਕੰਟਰੋਲ ਮੈਡੀਊਲ -Name[pl]=Moduł centrum sterowania TDE -Name[pt]=Módulo de Controlo do TDE -Name[pt_BR]=Módulo de Controle do TDE -Name[ro]=Modul de control TDE -Name[ru]=Модуль управления TDE -Name[rw]=Igice cy'Igenzura TDE -Name[se]=TDE stivrrenmoduvla -Name[sk]=Ovládací modul TDE -Name[sl]=Nadzorni modul TDE -Name[sq]=Modula Kontrolues - TDE -Name[sr]=TDE-ов контролни модул -Name[sr@Latn]=TDE-ov kontrolni modul -Name[ss]=Sahluko sekulawula se TDE -Name[sv]=TDE-inställningsmodul -Name[ta]=கேடிஇ கட்டுப்பாட்டு கூறு -Name[te]=కెడిఈ నియంత్రణ మాడ్యూల్ -Name[tg]=Модулӣ TDE Control -Name[th]=โมดูลควบคุมของ TDE -Name[tr]=TDE Kontrol Modülü -Name[tt]=TDE İdärä Modulı -Name[uk]=Модуль центра керування TDE -Name[uz]=TDE boshqaruv moduli -Name[uz@cyrillic]=TDE бошқарув модули -Name[ven]=Phanele ndangula ya phirinthara -Name[vi]=Mô-đun điều khiển TDE -Name[wa]=Module di contrôle TDE -Name[xh]=Ulawulo Lwesicatshulwa we TDE -Name[zh_CN]=TDE 控制模块 -Name[zh_HK]=TDE 控制模組 -Name[zh_TW]=TDE 控制模組 -Name[zu]=Ingxenye ye-TDE Control - -[PropertyDef::X-TDE-FactoryName] -Type=TQString - -[PropertyDef::X-TDE-RootOnly] -Type=bool - -# a list of all components this KCM belongs to -[PropertyDef::X-TDE-ParentComponents] -Type=TQStringList - -# the id of the parent in the TreeList -[PropertyDef::X-TDE-CfgDlgHierarchy] -Type=TQString - -# sets the order of the modules in the TreeList/IconList -[PropertyDef::X-TDE-Weight] -Type=int - -[PropertyDef::X-TDE-RootOnly] -Type=bool - -[PropertyDef::X-TDE-IsHiddenByDefault] -Type=bool diff --git a/kio/tests/CMakeLists.txt b/kio/tests/CMakeLists.txt deleted file mode 100644 index 54378f5c8..000000000 --- a/kio/tests/CMakeLists.txt +++ /dev/null @@ -1,36 +0,0 @@ -################################################# -# -# (C) 2010 Serghei Amelian -# serghei (DOT) amelian (AT) gmail.com -# -# Improvements and feedback are welcome -# -# This file is released under GPL >= 2 -# -################################################# - -include_directories( - ${TQT_INCLUDE_DIRS} - ${CMAKE_BINARY_DIR}/tdecore - ${CMAKE_SOURCE_DIR}/tdecore - ${CMAKE_SOURCE_DIR}/kio/kio -) - -link_directories( - ${TQT_LIBRARY_DIRS} -) - - -##### ktradertest ############################### - -set( target ktradertest ) - -set( ${target}_SRCS - ktradertest.cpp -) - -tde_add_executable( ${target} - SOURCES ${${target}_SRCS} - LINK kio-shared - DESTINATION ${BIN_INSTALL_DIR} -) diff --git a/kio/tests/Makefile.am b/kio/tests/Makefile.am deleted file mode 100644 index 3a81dfc57..000000000 --- a/kio/tests/Makefile.am +++ /dev/null @@ -1,91 +0,0 @@ -# This file is part of the KDE libraries -# Copyright (C) 1997 David Faure - -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Library General Public -# License as published by the Free Software Foundation; either -# version 2 of the License, or (at your option) any later version. - -# This library 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 -# Library General Public License for more details. - -# You should have received a copy of the GNU Library General Public License -# along with this library; see the file COPYING.LIB. If not, write to -# the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -# Boston, MA 02110-1301, USA. - -INCLUDES= -I$(top_srcdir) -I$(top_srcdir)/kio $(all_includes) -LDADD = $(LIB_KIO) -AM_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor - -check_PROGRAMS = tdesycocatest getalltest kruntest ktartest kziptest\ - kioslavetest kdirwatchtest kshredtest speed kurifiltertest \ - kdefaultprogresstest kmimemagictest \ - kfiltertest kiopassdlgtest kscantest kdirlistertest \ - previewtest kionetrctest kdcopcheck metatest \ - kmimefromext kpropsdlgtest kmfitest dataprotocoltest \ - kprotocolinfotest tdesycocaupdatetest netaccesstest jobtest \ - kurlcompletiontest kmimetypetest kacltest - -# Unfortunately some tests depend on the network settings, it seems -#check: kurifiltertest -# ./kurifiltertest -check-local: kziptest - ./kziptest list $(srcdir)/wronglocalsizes.zip - -TESTS = kmimetypetest - -bin_PROGRAMS = ktradertest - -METASOURCES = AUTO - -speed_SOURCES = speed.cpp -kioslavetest_SOURCES = kioslavetest.cpp -kshredtest_SOURCES = kshredtest.cpp -kdefaultprogresstest_SOURCES = kdefaultprogresstest.cpp -kionetrctest_SOURCES = kionetrctest.cpp -kiopassdlgtest_SOURCES = kiopassdlgtest.cpp -kurifiltertest_SOURCES = kurifiltertest.cpp -tdesycocatest_SOURCES = tdesycocatest.cpp -kdcopcheck_SOURCES = kdcopcheck.cpp -getalltest_SOURCES = getalltest.cpp -kruntest_SOURCES = kruntest.cpp -kdirwatchtest_SOURCES = kdirwatchtest.cpp -ktradertest_SOURCES = ktradertest.cpp -kmimemagictest_SOURCES = kmimemagictest.cpp -kfiltertest_SOURCES = kfiltertest.cpp -kscantest_SOURCES = kscantest.cpp -kdirlistertest_SOURCES = kdirlistertest.cpp -previewtest_SOURCES = previewtest.cpp -ktartest_SOURCES = ktartest.cpp -kziptest_SOURCES = kziptest.cpp -metatest_SOURCES = metatest.cpp -kmimefromext_SOURCES = kmimefromext.cpp -kpropsdlgtest_SOURCES = kpropsdlgtest.cpp -kmfitest_SOURCES = kmfitest.cpp -dataprotocoltest_SOURCES = dataprotocoltest.cpp -kprotocolinfotest_SOURCES = kprotocolinfotest.cpp -tdesycocaupdatetest_SOURCES = tdesycocaupdatetest.cpp -netaccesstest_SOURCES = netaccesstest.cpp -jobtest_SOURCES = jobtest.cpp -kurlcompletiontest_SOURCES = kurlcompletiontest.cpp -kmimetypetest_SOURCES = kmimetypetest.cpp -kacltest_SOURCES = kacltest.cpp - - -check_LTLIBRARIES = tdeunittest_kdirwatch.la -tdeunittest_kdirwatch_la_SOURCES = kdirwatchunittest.cpp -tdeunittest_kdirwatch_la_LIBADD = $(LIB_KUNITTEST) $(LIB_KIO) -tdeunittest_kdirwatch_la_LDFLAGS = -module $(KDE_CHECK_PLUGIN) - -# kfile meta stuff. Comment this in, if you want a small -# metadata plugin test and "make install". -#kde_module_LTLIBRARIES = dummymeta.la -#dummymeta_la_SOURCES = dummymeta.cpp -#dummymeta_la_LIBADD = $(LIB_KIO) -#dummymeta_la_LDFLAGS = $(all_libraries) -module $(KDE_PLUGIN) - -#services_DATA = dummymeta.desktop -#servicesdir = $(kde_servicesdir) diff --git a/kio/tests/dataprotocoltest.cpp b/kio/tests/dataprotocoltest.cpp deleted file mode 100644 index dfacd92e4..000000000 --- a/kio/tests/dataprotocoltest.cpp +++ /dev/null @@ -1,287 +0,0 @@ -// testing the data kioslave -// (C) 2002, 2003 Leo Savernik -// -// invoke "make dataprotocoltest" to generate the binary inside KDE CVS -// invoke "make test" to generate the binary outside KDE CVS - -// fix the symptoms, not the illness ;-) -#ifdef QT_NO_ASCII_CAST -# undef QT_NO_ASCII_CAST -#endif - -#ifdef DATAKIOSLAVE -# undef DATAKIOSLAVE -#endif -#ifndef TESTKIO -# define TESTKIO -#endif - -#include - -#include -#include - -#include - -class KURL; - -class TestSlave { -public: - TestSlave() { - } - virtual ~TestSlave() { - } - - virtual void get(const KURL &) = 0; - virtual void mimetype(const KURL &) = 0; - - void mimeType(const TQString &type) { - testStrings("MIME Type: ",mime_type_expected,type); - } - - void totalSize(TDEIO::filesize_t bytes) { -// cout << "content size: " << bytes << " bytes" << endl; - } - - void setMetaData(const TQString &key, const TQString &value) { -// meta_data[key] = value; -// cout << " " << key << " = " << value << endl; - TQString prefix = "Metadata[\""+key+"\"]: "; - TDEIO::MetaData::Iterator it = attributes_expected.find(key); - if (it != attributes_expected.end()) { - testStrings(prefix,it.data(),value); - // remove key from map - attributes_expected.remove(it); - } else { - cout << endl << prefix << " no such key expected"; - total++; - } - } - - void sendMetaData() { - // check here if attributes_expected contains any excess keys - TDEIO::MetaData::ConstIterator it = attributes_expected.begin(); - TDEIO::MetaData::ConstIterator end = attributes_expected.end(); - for (; it != end; ++it) { - cout << endl << "Metadata[\"" << it.key() - << "\"] was expected but not defined"; - total++; - } - } - - void data(const TQByteArray &a) { - if (a.isEmpty()) -/* cout << "" << endl*/; - else { - testStrings("Content: ",content_expected,a); - }/*end if*/ - } - - void finished() { - } - - void dispatchLoop() { - // dummy to make kde_main happy - } - - // == stuff for regression testing -private: - int testcaseno; // number of testcase - bool failure; // true if any testcase failed - TQMap failed_testcases; - - // -- testcase related members - TQString mime_type_expected; // expected mime type - /** contains all attributes and values the testcase has to set */ - TDEIO::MetaData attributes_expected; - /** contains the content as it is expected to be returned */ - TQByteArray content_expected; - int passed; // # of passed tests - int total; // # of total tests - - /** - * compares two strings, printing an error message if they don't match. - * @param prefix prefix string for output in case of mismatch - * @param templat template string - * @param s string to compare to template - * @param casesensitive true if case sensitive compare (currently not used) - */ - void testStrings(const TQString &prefix, const TQString &templat, - const TQString &s, bool /*casesensitive*/ = true) { - if (templat == s) - passed++; - else { - cout << endl << prefix << "expected \"" << templat << "\", found \"" - << s << "\""; - failure = true; - }/*end if*/ - total++; - } - -public: - /** begins a testrun over all testcases */ - void initTestrun() { - testcaseno = 0; - failure = false; - } - - /** reuturns true if any testcase failed - */ - bool hasFailedTestcases() const { return failure; } - - /** - * sets up a new testcase - * @param name screen name for testcase - */ - void beginTestcase(const char *name) { - passed = 0; - total = 0; - testcaseno++; - cout << "Testcase " << testcaseno << ": [" << name << "] "; - } - - /** - * sets the mime type that this testcase is expected to return - */ - void setExpectedMimeType(const TQString &mime_type) { - mime_type_expected = mime_type; - } - - /** - * sets all attribute-value pairs the testcase must deliver. - */ - void setExpectedAttributes(const TDEIO::MetaData &attres) { - attributes_expected = attres; - } - - /** - * sets content as expected to be delivered by the testcase. - */ - void setExpectedContent(const TQByteArray &content) { - content_expected = content; - } - - /** - * closes testcase, printing out stats - */ - void endTestcase() { - bool failed = passed < total; - if (failed) { - failure = true; - failed_testcases[testcaseno] = true; - cout << endl; - } - cout << "(" << passed << " of " << total << ") " << (failed ? "failed" - : "passed") << endl; - } - - void endTestrun() { - if (failure) { - TQMap::ConstIterator it = failed_testcases.begin(); - for (; it != failed_testcases.end(); ++it) { - cout << "Testcase " << it.key() << " failed" << endl; - } - } - } -}; - -#include "dataprotocol.cpp" // we need access to static data & functions - -// == general functionality -const struct { -const char * const name; -const char * const exp_mime_type; // 0 means "text/plain" -const struct { - const char * const key; - const char * const value; -} exp_attrs[10]; // ended with a key==0, value==0 pair -const char * const exp_content; -const char * const url; -} testcases[] = { - // ----------------------------------------------------------------- - { "escape resolving", 0, {}, "blah blah", "data:,blah%20blah" }, - // -------------------- - { "mime type, escape resolving", "text/html", {}, - "
Rich text
", - "data:text/html,Rich%20text" - "" }, - // -------------------- whitespace test I - { "whitespace test I", "text/css", { - { "charset", "iso-8859-15" }, { 0,0 } }, - " body { color: yellow; background:darkblue; font-weight:bold }", - "data:text/css ; charset = iso-8859-15 , body { color: yellow; " - "background:darkblue; font-weight:bold }" }, - // -------------------- out of spec argument order, base64 decoding, - // whitespace test II - { "out of spec argument order, base64 decoding, whitespace test II", - 0, { - { "charset", "iso-8859-1" }, { 0,0 } }, - "paaaaaaaasd!!\n", - "data: ; base64 ; charset = \"iso-8859-1\" ,cGFhYWFhYWFhc2QhIQo=" }, - // -------------------- arbitrary keys, reserved names as keys, - // whitespace test III - { "arbitrary keys, reserved names as keys, whitespace test III", 0, { - { "base64", "nospace" }, { "key", "onespaceinner" }, - { "key2", "onespaceouter" }, { "charset", "utf8" }, - { "<>", "" }, { 0,0 } }, - "Die, Allied Schweinehund (C) 1990 Wolfenstein 3D", - "data: ;base64=nospace;key = onespaceinner; key2=onespaceouter ;" - " charset = utf8 ; <>= ,Die, Allied Schweinehund " - "(C) 1990 Wolfenstein 3D" }, - // -------------------- string literal with escaped chars, testing - // delimiters within string - { "string literal with escaped chars, testing delimiters within " - "string", 0, { - { "fortune-cookie", "Master Leep say: \"Rabbit is humble, " - "Rabbit is gentle; follow the Rabbit\"" }, { 0,0 } }, - "(C) 1997 Shadow Warrior ;-)", - "data:;fortune-cookie=\"Master Leep say: \\\"Rabbit is humble, " - "Rabbit is gentle; follow the Rabbit\\\"\",(C) 1997 Shadow Warrior " - ";-)" }, -}; - -#if 0 -// == charset tests - // -------------------- string -const QChar -const TQChar * const charset_urls[] = { -#endif - -int main(int /*argc*/,char* /*argv*/[]) { - DataProtocol kio_data; - - kio_data.initTestrun(); - for (uint i = 0; i < sizeof testcases/sizeof testcases[0]; i++) { - kio_data.beginTestcase(testcases[i].name); - kio_data.setExpectedMimeType(testcases[i].exp_mime_type != 0 - ? testcases[i].exp_mime_type : "text/plain"); - - bool has_charset = false; - MetaData exp_attrs; - if (testcases[i].exp_attrs != 0) { - for (uint j = 0; testcases[i].exp_attrs[j].key != 0; j++) { - exp_attrs[testcases[i].exp_attrs[j].key] = testcases[i].exp_attrs[j].value; - if (strcmp(testcases[i].exp_attrs[j].key,"charset") == 0) - has_charset = true; - }/*next j*/ - } - if (!has_charset) exp_attrs["charset"] = "us-ascii"; - kio_data.setExpectedAttributes(exp_attrs); - - TQByteArray exp_content; - uint exp_content_len = strlen(testcases[i].exp_content); - exp_content.setRawData(testcases[i].exp_content,exp_content_len); - kio_data.setExpectedContent(exp_content); - - kio_data.get(testcases[i].url); - - kio_data.endTestcase(); - exp_content.resetRawData(testcases[i].exp_content,exp_content_len); - }/*next i*/ - kio_data.endTestrun(); - - return kio_data.hasFailedTestcases() ? 1 : 0; -} - diff --git a/kio/tests/dummymeta.cpp b/kio/tests/dummymeta.cpp deleted file mode 100644 index 938b4d00b..000000000 --- a/kio/tests/dummymeta.cpp +++ /dev/null @@ -1,20 +0,0 @@ -#include - -#include "dummymeta.h" - -K_EXPORT_COMPONENT_FACTORY( dummymeta, KGenericFactory ) - -DummyMeta::DummyMeta( TQObject *parent, const char *name, - const TQStringList &preferredItems ) - : KFilePlugin( parent, name, preferredItems ) -{ - tqDebug("---- DummyMeta::DummyMeta: got %i preferred items.", preferredItems.count()); -} - -bool DummyMeta::readInfo( KFileMetaInfo::Internal & info ) -{ - tqDebug("#### DummyMeta:: readInfo: %s", info.path().latin1() ); - return 0L; -} - -#include "dummymeta.moc" diff --git a/kio/tests/dummymeta.desktop b/kio/tests/dummymeta.desktop deleted file mode 100644 index 6d2748c82..000000000 --- a/kio/tests/dummymeta.desktop +++ /dev/null @@ -1,54 +0,0 @@ -[Desktop Entry] -Type=Service -Name=Dummy Meta -Name[af]=Fop Meta -Name[az]=İşə Yaramayan Meta -Name[be]=Парожнія звесткі -Name[bn]=ডামি মেটা -Name[cs]=Prázdné meta -Name[csb]=Testowé pòdôwczi -Name[cy]=Meta Dymi -Name[da]=Dummy-meta -Name[el]=Εικονικό Meta -Name[eo]=Stulta Meto -Name[et]=Dummy meta -Name[fa]=فراساختگی -Name[fi]=Tyhjä meta -Name[fr]=Données factices -Name[ga]=Meitea Caoch -Name[hi]=डमी मेटा -Name[hr]=Ogledni meta podatak -Name[hu]=Üres (dummy) metaadat -Name[it]=Informazioni aggiuntive posticce -Name[ko]=가짜 메타 -Name[lb]=Dummy-Meta -Name[lt]=Netikras Meta -Name[ms]=Meta Olok-olok -Name[mt]=Meta fittizju -Name[ne]=डमी मेटा -Name[nso]=Meta wa Dummy -Name[pa]=ਫ਼ਰਜੀ ਮੈਟਾ -Name[pl]=Dane testowe -Name[ro]=Test Meta -Name[rw]=Ikiragi Kidasanzwe -Name[sk]=Prázdne meta -Name[sl]=Slepi Meta -Name[sr]=Лажни мета -Name[sr@Latn]=Lažni meta -Name[sv]=Testmeta -Name[ta]=வெற்று மீட்டா -Name[te]=డమ్మి మెటా -Name[tg]=Meta-и Ғайрикорӣ -Name[tr]=Kukla Meta -Name[uk]=Макет метаданих -Name[uz]=Maʼnosiz meta -Name[uz@cyrillic]=Маъносиз мета -Name[ven]=Meta isa tshili -Name[vi]=Siêu giả -Name[zh_CN]=哑元 -Name[zh_HK]=空的資料定義 -Name[zh_TW]=空的資料定義 -ServiceTypes=KFilePlugin -X-TDE-Library=dummymeta -MimeType=text/plain -PreferredItems=Author,Title,Date diff --git a/kio/tests/dummymeta.h b/kio/tests/dummymeta.h deleted file mode 100644 index 053c48ecb..000000000 --- a/kio/tests/dummymeta.h +++ /dev/null @@ -1,20 +0,0 @@ -#ifndef DUMMYMETA_H -#define DUMMYMETA_H - -#include - -class KFileMetaInfo; - -class DummyMeta : public KFilePlugin -{ - Q_OBJECT - -public: - DummyMeta( TQObject *parent, const char *name, const TQStringList &args ); - ~DummyMeta() {} - - virtual bool readInfo( KFileMetaInfo::Internal& info ); - -}; - -#endif diff --git a/kio/tests/getalltest.cpp b/kio/tests/getalltest.cpp deleted file mode 100644 index 07d8723ed..000000000 --- a/kio/tests/getalltest.cpp +++ /dev/null @@ -1,44 +0,0 @@ -#include -#include -#include - -#include -#include - -int main(int argc, char *argv[]) -{ - TDEApplication k(argc,argv,"getalltest",false/*noGUI*/); // KMessageBox needs KApp for makeStdCaption - -//for (int i = 0 ; i < 2 ; ++i ) { // test twice to see if they got deleted - kdDebug() << "All services" << endl; - KService::List services = KService::allServices(); - kdDebug() << "got " << services.count() << " services" << endl; - TQValueListIterator s = services.begin(); - for ( ; s != services.end() ; ++s ) - { - kdDebug() << (*s)->name() << " " << (*s)->desktopEntryPath() << endl; - } -//} - - kdDebug() << "All mimeTypes" << endl; - KMimeType::List mimeTypes = KMimeType::allMimeTypes(); - kdDebug() << "got " << mimeTypes.count() << " mimeTypes" << endl; - TQValueListIterator m = mimeTypes.begin(); - for ( ; m != mimeTypes.end() ; ++m ) - { - kdDebug() << (*m)->name() << endl; - } - - kdDebug() << "All service types" << endl; - KServiceType::List list = KServiceType::allServiceTypes(); - kdDebug() << "got " << list.count() << " service types" << endl; - TQValueListIterator st = list.begin(); - for ( ; st != list.end() ; ++st ) - { - kdDebug() << (*st)->name() << endl; - } - - kdDebug() << "done" << endl; - - return 0; -} diff --git a/kio/tests/jobtest.cpp b/kio/tests/jobtest.cpp deleted file mode 100644 index e811aaec4..000000000 --- a/kio/tests/jobtest.cpp +++ /dev/null @@ -1,613 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 2004-2006 David Faure - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include "jobtest.h" - -#include - -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -// The code comes partly from tdebase/kioslave/trash/testtrash.cpp - -static bool check(const TQString& txt, TQString a, TQString b) -{ - if (a.isEmpty()) - a = TQString::null; - if (b.isEmpty()) - b = TQString::null; - if (a == b) { - kdDebug() << txt << " : checking '" << a << "' against expected value '" << b << "'... " << "ok" << endl; - } - else { - kdDebug() << txt << " : checking '" << a << "' against expected value '" << b << "'... " << "KO !" << endl; - exit(1); - } - return true; -} - -int main(int argc, char *argv[]) -{ - TDEApplication::disableAutoDcopRegistration(); - TDECmdLineArgs::init(argc,argv,"jobtest", 0, 0, 0, 0); - TDEApplication app; - - JobTest test; - test.setup(); - test.runAll(); - test.cleanup(); - kdDebug() << "All tests OK." << endl; - return 0; // success. The exit(1) in check() is what happens in case of failure. -} - -TQString JobTest::homeTmpDir() const -{ - return TQDir::homeDirPath() + "/.trinity/jobtest/"; -} - -TQString JobTest::otherTmpDir() const -{ - // This one needs to be on another partition - return "/tmp/jobtest/"; -} - -KURL JobTest::systemTmpDir() const -{ - return "system:/home/.trinity/jobtest-system/"; -} - -TQString JobTest::realSystemPath() const -{ - return TQDir::homeDirPath() + "/.trinity/jobtest-system/"; -} - -void JobTest::setup() -{ - // Start with a clean base dir - cleanup(); - TQDir dir; // TT: why not a static method? - bool ok = dir.mkdir( homeTmpDir() ); - if ( !ok ) - kdFatal() << "Couldn't create " << homeTmpDir() << endl; - ok = dir.mkdir( otherTmpDir() ); - if ( !ok ) - kdFatal() << "Couldn't create " << otherTmpDir() << endl; - ok = dir.mkdir( realSystemPath() ); - if ( !ok ) - kdFatal() << "Couldn't create " << realSystemPath() << endl; -} - -void JobTest::runAll() -{ - get(); - copyFileToSamePartition(); - copyDirectoryToSamePartition(); - copyDirectoryToExistingDirectory(); - copyFileToOtherPartition(); - copyDirectoryToOtherPartition(); - listRecursive(); - moveFileToSamePartition(); - moveDirectoryToSamePartition(); - moveFileToOtherPartition(); - moveSymlinkToOtherPartition(); - moveDirectoryToOtherPartition(); - moveFileNoPermissions(); - moveDirectoryNoPermissions(); - - copyFileToSystem(); -} - -void JobTest::cleanup() -{ - TDEIO::NetAccess::del( homeTmpDir(), 0 ); - TDEIO::NetAccess::del( otherTmpDir(), 0 ); - TDEIO::NetAccess::del( systemTmpDir(), 0 ); -} - -static void setTimeStamp( const TQString& path ) -{ -#ifdef Q_OS_UNIX - // Put timestamp in the past so that we can check that the - // copy actually preserves it. - struct timeval tp; - gettimeofday( &tp, 0 ); - struct utimbuf utbuf; - utbuf.actime = tp.tv_sec - 30; // 30 seconds ago - utbuf.modtime = tp.tv_sec - 60; // 60 second ago - utime( TQFile::encodeName( path ), &utbuf ); - tqDebug( "Time changed for %s", path.latin1() ); -#endif -} - -static void createTestFile( const TQString& path ) -{ - TQFile f( path ); - if ( !f.open( IO_WriteOnly ) ) - kdFatal() << "Can't create " << path << endl; - f.tqwriteBlock( "Hello world", 11 ); - f.close(); - setTimeStamp( path ); -} - -static void createTestSymlink( const TQString& path ) -{ - // Create symlink if it doesn't exist yet - KDE_struct_stat buf; - if ( KDE_lstat( TQFile::encodeName( path ), &buf ) != 0 ) { - bool ok = symlink( "/IDontExist", TQFile::encodeName( path ) ) == 0; // broken symlink - if ( !ok ) - kdFatal() << "couldn't create symlink: " << strerror( errno ) << endl; - } -} - -static void createTestDirectory( const TQString& path ) -{ - TQDir dir; - bool ok = dir.mkdir( path ); - if ( !ok && !dir.exists() ) - kdFatal() << "couldn't create " << path << endl; - createTestFile( path + "/testfile" ); - createTestSymlink( path + "/testlink" ); - setTimeStamp( path ); -} - -void JobTest::get() -{ - kdDebug() << k_funcinfo << endl; - const TQString filePath = homeTmpDir() + "fileFromHome"; - createTestFile( filePath ); - KURL u; u.setPath( filePath ); - m_result = -1; - TDEIO::StoredTransferJob* job = TDEIO::storedGet( u ); - connect( job, TQT_SIGNAL( result( TDEIO::Job* ) ), - this, TQT_SLOT( slotGetResult( TDEIO::Job* ) ) ); - kapp->eventLoop()->enterLoop(); - assert( m_result == 0 ); // no error - assert( m_data.size() == 11 ); - assert( TQCString( m_data ) == "Hello world" ); -} - -void JobTest::slotGetResult( TDEIO::Job* job ) -{ - m_result = job->error(); - m_data = static_cast(job)->data(); - kapp->eventLoop()->exitLoop(); -} - -//// - -void JobTest::copyLocalFile( const TQString& src, const TQString& dest ) -{ - KURL u; - u.setPath( src ); - KURL d; - d.setPath( dest ); - - // copy the file with file_copy - bool ok = TDEIO::NetAccess::file_copy( u, d ); - assert( ok ); - assert( TQFile::exists( dest ) ); - assert( TQFile::exists( src ) ); // still there - - { - // check that the timestamp is the same (#24443) - // Note: this only works because of copy() in kio_file. - // The datapump solution ignores mtime, the app has to call FileCopyJob::setModificationTime() - TQFileInfo srcInfo( src ); - TQFileInfo destInfo( dest ); - assert( srcInfo.lastModified() == destInfo.lastModified() ); - } - - // cleanup and retry with TDEIO::copy() - TQFile::remove( dest ); - ok = TDEIO::NetAccess::dircopy( u, d, 0 ); - assert( ok ); - assert( TQFile::exists( dest ) ); - assert( TQFile::exists( src ) ); // still there - { - // check that the timestamp is the same (#24443) - TQFileInfo srcInfo( src ); - TQFileInfo destInfo( dest ); - assert( srcInfo.lastModified() == destInfo.lastModified() ); - } -} - -void JobTest::copyLocalDirectory( const TQString& src, const TQString& _dest, int flags ) -{ - assert( TQFileInfo( src ).isDir() ); - assert( TQFileInfo( src + "/testfile" ).isFile() ); - KURL u; - u.setPath( src ); - TQString dest( _dest ); - KURL d; - d.setPath( dest ); - if ( flags & AlreadyExists ) - assert( TQFile::exists( dest ) ); - else - assert( !TQFile::exists( dest ) ); - - bool ok = TDEIO::NetAccess::dircopy( u, d, 0 ); - assert( ok ); - - if ( flags & AlreadyExists ) { - dest += "/" + u.fileName(); - //kdDebug() << "Expecting dest=" << dest << endl; - } - - assert( TQFile::exists( dest ) ); - assert( TQFileInfo( dest ).isDir() ); - assert( TQFileInfo( dest + "/testfile" ).isFile() ); - assert( TQFile::exists( src ) ); // still there - { - // check that the timestamp is the same (#24443) - TQFileInfo srcInfo( src ); - TQFileInfo destInfo( dest ); - assert( srcInfo.lastModified() == destInfo.lastModified() ); - } -} - -void JobTest::copyFileToSamePartition() -{ - kdDebug() << k_funcinfo << endl; - const TQString filePath = homeTmpDir() + "fileFromHome"; - const TQString dest = homeTmpDir() + "fileFromHome_copied"; - createTestFile( filePath ); - copyLocalFile( filePath, dest ); -} - -void JobTest::copyDirectoryToSamePartition() -{ - kdDebug() << k_funcinfo << endl; - const TQString src = homeTmpDir() + "dirFromHome"; - const TQString dest = homeTmpDir() + "dirFromHome_copied"; - createTestDirectory( src ); - copyLocalDirectory( src, dest ); -} - -void JobTest::copyDirectoryToExistingDirectory() -{ - kdDebug() << k_funcinfo << endl; - // just the same as copyDirectoryToSamePartition, but it means that - // this time dest exists. - const TQString src = homeTmpDir() + "dirFromHome"; - const TQString dest = homeTmpDir() + "dirFromHome_copied"; - createTestDirectory( src ); - copyLocalDirectory( src, dest, AlreadyExists ); -} - -void JobTest::copyFileToOtherPartition() -{ - kdDebug() << k_funcinfo << endl; - const TQString filePath = homeTmpDir() + "fileFromHome"; - const TQString dest = otherTmpDir() + "fileFromHome_copied"; - createTestFile( filePath ); - copyLocalFile( filePath, dest ); -} - -void JobTest::copyDirectoryToOtherPartition() -{ - kdDebug() << k_funcinfo << endl; - const TQString src = homeTmpDir() + "dirFromHome"; - const TQString dest = otherTmpDir() + "dirFromHome_copied"; - // src is already created by copyDirectoryToSamePartition() - // so this is just in case someone calls this method only - if ( !TQFile::exists( src ) ) - createTestDirectory( src ); - copyLocalDirectory( src, dest ); -} - -void JobTest::moveLocalFile( const TQString& src, const TQString& dest ) -{ - assert( TQFile::exists( src ) ); - KURL u; - u.setPath( src ); - KURL d; - d.setPath( dest ); - - // move the file with file_move - bool ok = TDEIO::NetAccess::file_move( u, d ); - assert( ok ); - assert( TQFile::exists( dest ) ); - assert( !TQFile::exists( src ) ); // not there anymore - - // move it back with TDEIO::move() - ok = TDEIO::NetAccess::move( d, u, 0 ); - assert( ok ); - assert( !TQFile::exists( dest ) ); - assert( TQFile::exists( src ) ); // it's back -} - -static void moveLocalSymlink( const TQString& src, const TQString& dest ) -{ - KDE_struct_stat buf; - assert ( KDE_lstat( TQFile::encodeName( src ), &buf ) == 0 ); - KURL u; - u.setPath( src ); - KURL d; - d.setPath( dest ); - - // move the symlink with move, NOT with file_move - bool ok = TDEIO::NetAccess::move( u, d ); - if ( !ok ) - kdWarning() << TDEIO::NetAccess::lastError() << endl; - assert( ok ); - assert ( KDE_lstat( TQFile::encodeName( dest ), &buf ) == 0 ); - assert( !TQFile::exists( src ) ); // not there anymore - - // move it back with TDEIO::move() - ok = TDEIO::NetAccess::move( d, u, 0 ); - assert( ok ); - assert ( KDE_lstat( TQFile::encodeName( dest ), &buf ) != 0 ); // doesn't exist anymore - assert ( KDE_lstat( TQFile::encodeName( src ), &buf ) == 0 ); // it's back -} - -void JobTest::moveLocalDirectory( const TQString& src, const TQString& dest ) -{ - assert( TQFile::exists( src ) ); - assert( TQFileInfo( src ).isDir() ); - assert( TQFileInfo( src + "/testfile" ).isFile() ); - assert( TQFileInfo( src + "/testlink" ).isSymLink() ); - KURL u; - u.setPath( src ); - KURL d; - d.setPath( dest ); - - bool ok = TDEIO::NetAccess::move( u, d, 0 ); - assert( ok ); - assert( TQFile::exists( dest ) ); - assert( TQFileInfo( dest ).isDir() ); - assert( TQFileInfo( dest + "/testfile" ).isFile() ); - assert( !TQFile::exists( src ) ); // not there anymore - - assert( TQFileInfo( dest + "/testlink" ).isSymLink() ); -} - -void JobTest::moveFileToSamePartition() -{ - kdDebug() << k_funcinfo << endl; - const TQString filePath = homeTmpDir() + "fileFromHome"; - const TQString dest = homeTmpDir() + "fileFromHome_moved"; - createTestFile( filePath ); - moveLocalFile( filePath, dest ); -} - -void JobTest::moveDirectoryToSamePartition() -{ - kdDebug() << k_funcinfo << endl; - const TQString src = homeTmpDir() + "dirFromHome"; - const TQString dest = homeTmpDir() + "dirFromHome_moved"; - createTestDirectory( src ); - moveLocalDirectory( src, dest ); -} - -void JobTest::moveFileToOtherPartition() -{ - kdDebug() << k_funcinfo << endl; - const TQString filePath = homeTmpDir() + "fileFromHome"; - const TQString dest = otherTmpDir() + "fileFromHome_moved"; - createTestFile( filePath ); - moveLocalFile( filePath, dest ); -} - -void JobTest::moveSymlinkToOtherPartition() -{ - kdDebug() << k_funcinfo << endl; - const TQString filePath = homeTmpDir() + "testlink"; - const TQString dest = otherTmpDir() + "testlink_moved"; - createTestSymlink( filePath ); - moveLocalSymlink( filePath, dest ); -} - -void JobTest::moveDirectoryToOtherPartition() -{ - kdDebug() << k_funcinfo << endl; - const TQString src = homeTmpDir() + "dirFromHome"; - const TQString dest = otherTmpDir() + "dirFromHome_moved"; - createTestDirectory( src ); - moveLocalDirectory( src, dest ); -} - -void JobTest::moveFileNoPermissions() -{ - kdDebug() << k_funcinfo << endl; - const TQString src = "/etc/passwd"; - const TQString dest = homeTmpDir() + "passwd"; - assert( TQFile::exists( src ) ); - assert( TQFileInfo( src ).isFile() ); - KURL u; - u.setPath( src ); - KURL d; - d.setPath( dest ); - - TDEIO::CopyJob* job = TDEIO::move( u, d, 0 ); - job->setInteractive( false ); // no skip dialog, thanks - TQMap metaData; - bool ok = TDEIO::NetAccess::synchronousRun( job, 0, 0, 0, &metaData ); - assert( !ok ); - assert( TDEIO::NetAccess::lastError() == TDEIO::ERR_ACCESS_DENIED ); - // OK this is fishy. Just like mv(1), KIO's behavior depends on whether - // a direct rename(2) was used, or a full copy+del. In the first case - // there is no destination file created, but in the second case the - // destination file remains. - // In fact we assume /home is a separate partition, in this test, so: - assert( TQFile::exists( dest ) ); - assert( TQFile::exists( src ) ); -} - -void JobTest::moveDirectoryNoPermissions() -{ - kdDebug() << k_funcinfo << endl; - const TQString src = "/etc/init.d"; - const TQString dest = homeTmpDir() + "init.d"; - assert( TQFile::exists( src ) ); - assert( TQFileInfo( src ).isDir() ); - KURL u; - u.setPath( src ); - KURL d; - d.setPath( dest ); - - TDEIO::CopyJob* job = TDEIO::move( u, d, 0 ); - job->setInteractive( false ); // no skip dialog, thanks - TQMap metaData; - bool ok = TDEIO::NetAccess::synchronousRun( job, 0, 0, 0, &metaData ); - assert( !ok ); - assert( TDEIO::NetAccess::lastError() == TDEIO::ERR_ACCESS_DENIED ); - assert( TQFile::exists( dest ) ); // see moveFileNoPermissions - assert( TQFile::exists( src ) ); -} - -void JobTest::listRecursive() -{ - const TQString src = homeTmpDir(); - KURL u; - u.setPath( src ); - TDEIO::ListJob* job = TDEIO::listRecursive( u ); - connect( job, TQT_SIGNAL( entries( TDEIO::Job*, const TDEIO::UDSEntryList& ) ), - TQT_SLOT( slotEntries( TDEIO::Job*, const TDEIO::UDSEntryList& ) ) ); - bool ok = TDEIO::NetAccess::synchronousRun( job, 0 ); - assert( ok ); - m_names.sort(); - check( "listRecursive", m_names.join( "," ), ".,..," - "dirFromHome,dirFromHome/testfile,dirFromHome/testlink,dirFromHome_copied," - "dirFromHome_copied/dirFromHome,dirFromHome_copied/dirFromHome/testfile,dirFromHome_copied/dirFromHome/testlink," - "dirFromHome_copied/testfile,dirFromHome_copied/testlink," - "fileFromHome,fileFromHome_copied" ); -} - -void JobTest::slotEntries( TDEIO::Job*, const TDEIO::UDSEntryList& lst ) -{ - for( TDEIO::UDSEntryList::ConstIterator it = lst.begin(); it != lst.end(); ++it ) { - TDEIO::UDSEntry::ConstIterator it2 = (*it).begin(); - TQString displayName; - KURL url; - for( ; it2 != (*it).end(); it2++ ) { - switch ((*it2).m_uds) { - case TDEIO::UDS_NAME: - displayName = (*it2).m_str; - break; - case TDEIO::UDS_URL: - url = (*it2).m_str; - break; - } - } - m_names.append( displayName ); - } -} - -void JobTest::copyFileToSystem() -{ - if ( !KProtocolInfo::isKnownProtocol( TQString::fromLatin1( "system" ) ) ) { - kdDebug() << k_funcinfo << "no kio_system, skipping test" << endl; - return; - } - - // First test with support for UDS_LOCAL_PATH - copyFileToSystem( true ); - - TQString dest = realSystemPath() + "fileFromHome_copied"; - TQFile::remove( dest ); - - // Then disable support for UDS_LOCAL_PATH, i.e. test what would - // happen for ftp, smb, http etc. - copyFileToSystem( false ); -} - -void JobTest::copyFileToSystem( bool resolve_local_urls ) -{ - kdDebug() << k_funcinfo << resolve_local_urls << endl; - extern TDEIO_EXPORT bool kio_resolve_local_urls; - kio_resolve_local_urls = resolve_local_urls; - - const TQString src = homeTmpDir() + "fileFromHome"; - createTestFile( src ); - KURL u; - u.setPath( src ); - KURL d = systemTmpDir(); - d.addPath( "fileFromHome_copied" ); - - kdDebug() << "copying " << u << " to " << d << endl; - - // copy the file with file_copy - TDEIO::FileCopyJob* job = TDEIO::file_copy( u, d ); - connect( job, TQT_SIGNAL(mimetype(TDEIO::Job*,const TQString&)), - this, TQT_SLOT(slotMimetype(TDEIO::Job*,const TQString&)) ); - bool ok = TDEIO::NetAccess::synchronousRun( job, 0 ); - assert( ok ); - - TQString dest = realSystemPath() + "fileFromHome_copied"; - - assert( TQFile::exists( dest ) ); - assert( TQFile::exists( src ) ); // still there - - { - // do NOT check that the timestamp is the same. - // It can't work with file_copy when it uses the datapump, - // unless we use setModificationTime in the app code. - } - - // Check mimetype - kdDebug() << m_mimetype << endl; - // There's no mimemagic determination in kio_file in trinity. Fixing this for kde4... - assert( m_mimetype == "application/octet-stream" ); - //assert( m_mimetype == "text/plain" ); - - // cleanup and retry with TDEIO::copy() - TQFile::remove( dest ); - ok = TDEIO::NetAccess::dircopy( u, d, 0 ); - assert( ok ); - assert( TQFile::exists( dest ) ); - assert( TQFile::exists( src ) ); // still there - { - // check that the timestamp is the same (#79937) - TQFileInfo srcInfo( src ); - TQFileInfo destInfo( dest ); - assert( srcInfo.lastModified() == destInfo.lastModified() ); - } - - // restore normal behavior - kio_resolve_local_urls = true; -} - -void JobTest::slotMimetype(TDEIO::Job* job, const TQString& type) -{ - assert( job ); - m_mimetype = type; -} - -#include "jobtest.moc" diff --git a/kio/tests/jobtest.h b/kio/tests/jobtest.h deleted file mode 100644 index 61051fbaf..000000000 --- a/kio/tests/jobtest.h +++ /dev/null @@ -1,79 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 2004 David Faure - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef JOBTEST_H -#define JOBTEST_H - -#include -#include -#include - -class JobTest : public TQObject -{ - Q_OBJECT - -public: - JobTest() {} - void setup(); - void runAll(); - void cleanup(); - - // Local tests (kio_file only) - void get(); - void copyFileToSamePartition(); - void copyDirectoryToSamePartition(); - void copyDirectoryToExistingDirectory(); - void copyFileToOtherPartition(); - void copyDirectoryToOtherPartition(); - void listRecursive(); - void moveFileToSamePartition(); - void moveDirectoryToSamePartition(); - void moveFileToOtherPartition(); - void moveSymlinkToOtherPartition(); - void moveDirectoryToOtherPartition(); - void moveFileNoPermissions(); - void moveDirectoryNoPermissions(); - - // Remote tests - void copyFileToSystem(); - -private slots: - void slotEntries( TDEIO::Job*, const TDEIO::UDSEntryList& lst ); - void slotGetResult( TDEIO::Job* ); - void slotMimetype(TDEIO::Job*,const TQString&); - -private: - TQString homeTmpDir() const; - TQString otherTmpDir() const; - TQString realSystemPath() const; - KURL systemTmpDir() const; - enum { AlreadyExists = 1 }; - void copyLocalFile( const TQString& src, const TQString& dest ); - void copyLocalDirectory( const TQString& src, const TQString& dest, int flags = 0 ); - void moveLocalFile( const TQString& src, const TQString& dest ); - void moveLocalDirectory( const TQString& src, const TQString& dest ); - void copyFileToSystem( bool resolve_local_urls ); - - int m_result; - TQByteArray m_data; - TQStringList m_names; - TQString m_mimetype; -}; - -#endif diff --git a/kio/tests/kacltest.cpp b/kio/tests/kacltest.cpp deleted file mode 100644 index 45ace585f..000000000 --- a/kio/tests/kacltest.cpp +++ /dev/null @@ -1,309 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 2005 Till Adam - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include "kacltest.h" - -#include - -#include -#include -#include -#include - -#include -#include - -#include -#include -#include -#include - -// The code comes partly from tdebase/kioslave/trash/testtrash.cpp - -static bool check(const TQString& txt, TQString a, TQString b) -{ - if (a.isEmpty()) - a = TQString::null; - if (b.isEmpty()) - b = TQString::null; - if (a == b) { - kdDebug() << txt << " : checking '" << a << "' against expected value '" << b << "'... " << "ok" << endl; - } - else { - kdDebug() << txt << " : checking '" << a << "' against expected value '" << b << "'... " << "KO !" << endl; - exit(1); - } - return true; -} - -template -static bool check(const TQString& txt, T a, T b) -{ - if (a == b) { - kdDebug() << txt << " : checking '" << a << "' against expected value '" << b << "'... " << "ok" << endl; - } - else { - kdDebug() << txt << " : checking '" << a << "' against expected value '" << b << "'... " << "KO !" << endl; - exit(1); - } - return true; -} - -int main(int argc, char *argv[]) -{ - TDEApplication::disableAutoDcopRegistration(); - TDECmdLineArgs::init(argc,argv,"kacltest", 0, 0, 0, 0); - TDEApplication app; - - KACLTest test; - test.setup(); - test.runAll(); - test.cleanup(); - kdDebug() << "All tests OK." << endl; - return 0; // success. The exit(1) in check() is what happens in case of failure. -} - -#ifdef Q_OS_FREEBSD -static const TQString s_group1 = TQString::fromLatin1("staff"); -static const TQString s_group2 = TQString::fromLatin1("guest"); -#else -static const TQString s_group1 = TQString::fromLatin1("audio"); -static const TQString s_group2 = TQString::fromLatin1("users"); -#endif - -static const TQString s_testACL = TQString::fromLatin1( "user::rw-\nuser:bin:rwx\ngroup::rw-\nmask::rwx\nother::r--\n" ); -static const TQString s_testACL2 = TQString::fromLatin1( "user::rwx\nuser:bin:rwx\ngroup::rw-\n") + - TQString::fromLatin1( "group:" ) + s_group1 + TQString::fromLatin1( ":--x\n" ) + - TQString::fromLatin1( "group:" ) + s_group2 + TQString::fromLatin1( ":r--\n" ) + - TQString::fromLatin1( "mask::r-x\nother::r--\n" ); -static const TQString s_testACLEffective = TQString::fromLatin1( "user::rwx\nuser:bin:rwx #effective:r-x\ngroup::rw- #effective:r--\n" ) + - TQString::fromLatin1( "group:" ) + s_group1 + TQString::fromLatin1( ":--x\n" ) + - TQString::fromLatin1( "group:" ) + s_group2 + TQString::fromLatin1( ":r--\n" ) + - TQString::fromLatin1( "mask::r-x\nother::r--\n" ); - -KACLTest::KACLTest() -:m_acl( s_testACL ) -{ -} - -void KACLTest::setup() -{ -} - -void KACLTest::runAll() -{ - testAsString(); - testGetOwnerPermissions(); - testGetOwningGroupPermissions(); - testGetOthersPermissions(); - - testGetMaskPermissions(); - testGetAllUserPermissions(); - - testIsExtended(); - - // from here on we operate with the second test string - testSetACL(); - testGetAllGroupsPermissions(); - - testOperators(); - testSettingBasic(); - testSettingExtended(); - testSettingErrorHandling(); - - testNewMask(); -} - -void KACLTest::cleanup() -{ -} - -void KACLTest::testAsString() -{ - check( "asString: ", m_acl.asString(), s_testACL ); -} - -void KACLTest::testSetACL() -{ - m_acl.setACL( s_testACL2 ); - check( "setACL: ", m_acl.asString().simplifyWhiteSpace().remove(" "), s_testACLEffective.simplifyWhiteSpace().remove(" ") ); -} - -void KACLTest::testGetOwnerPermissions() -{ - check( "Owner permissions: ", TQString::number( m_acl.ownerPermissions() ), "6" ); -} - -void KACLTest::testGetOwningGroupPermissions() -{ - check( "Owning group permissions: ", TQString::number( m_acl.owningGroupPermissions() ), "6" ); -} - -void KACLTest::testGetOthersPermissions() -{ - check( "Others permissions: ", TQString::number( m_acl.othersPermissions() ), "4" ); -} - -void KACLTest::testGetMaskPermissions() -{ - bool exists = false; - unsigned short mask = m_acl.maskPermissions( exists ); - check( "Mask permissions: ", TQString::number( mask ), "7" ); - check( "Mask permissions: ", exists, true ); -} - -void KACLTest::testGetAllUserPermissions() -{ - ACLUserPermissionsList list = m_acl.allUserPermissions(); - ACLUserPermissionsConstIterator it = list.begin(); - TQString name; - unsigned short permissions; - int count = 0; - while ( it != list.end() ) { - name = ( *it ).first; - permissions = ( *it ).second; - ++it; - ++count; - } - check( "All users count: ", TQString::number( count ), "1" ); - check( "All users name: ", name, "bin" ); - check( "All users permissions: ", TQString::number( permissions ), "7" ); -} - -void KACLTest::testGetAllGroupsPermissions() -{ - ACLGroupPermissionsList list = m_acl.allGroupPermissions(); - ACLGroupPermissionsConstIterator it = list.begin(); - TQString name; - unsigned short permissions; - int count = 0; - while ( it != list.end() ) { - name = ( *it ).first; - permissions = ( *it ).second; - // setACL sorts them alphabetically ... - if ( count == 0 ) { - check( "All groups name: ", name, s_group1 ); - check( "All groups permissions: ", TQString::number( permissions ), "1" ); - } else if ( count == 1 ) { - check( "All groups name: ", name, s_group2 ); - check( "All groups permissions: ", TQString::number( permissions ), "4" ); - } - ++it; - ++count; - } - check( "All users count: ", TQString::number( count ), "2" ); -} - -void KACLTest::testIsExtended() -{ - KACL dukeOfMonmoth( s_testACL ); - check( "isExtended on an extended one: ", dukeOfMonmoth.isExtended(), true ); - KACL earlOfUpnor( "user::r--\ngroup::r--\nother::r--\n" ); - check( "isExtended on a not extended one: ", earlOfUpnor.isExtended(), false ); -} - -void KACLTest::testOperators() -{ - KACL dukeOfMonmoth( s_testACL ); - KACL JamesScott( s_testACL ); - KACL earlOfUpnor( s_testACL2 ); - check( "operator== on different ones: ", dukeOfMonmoth == earlOfUpnor, false ); - check( "operator== on identical ones: ", dukeOfMonmoth == JamesScott, true ); - check( "operator!= on diffenrent ones: ", dukeOfMonmoth != earlOfUpnor, true ); - check( "operator!=: on identical ones: ", dukeOfMonmoth != JamesScott, false ); -} - -void KACLTest::testSettingBasic() -{ - KACL CharlesII( s_testACL ); - CharlesII.setOwnerPermissions( 7 ); // clearly - CharlesII.setOwningGroupPermissions( 0 ); - CharlesII.setOthersPermissions( 0 ); - check( "setOwnerPermissions: ", TQString::number( CharlesII.ownerPermissions() ),"7" ); - check( "setOwningGroupPermissions: ", TQString::number( CharlesII.owningGroupPermissions() ),"0" ); - check( "setOthersPermissions: ", TQString::number( CharlesII.othersPermissions() ),"0" ); -} - -void KACLTest::testSettingExtended() -{ - KACL CharlesII( s_testACL ); - CharlesII.setMaskPermissions( 7 ); // clearly - bool dummy = false; - check( "setMaskPermissions: ", TQString::number( CharlesII.maskPermissions( dummy ) ),"7" ); - - const TQString expected( "user::rw-\nuser:root:rwx\nuser:bin:r--\ngroup::rw-\nmask::rwx\nother::r--\n" ); - - ACLUserPermissionsList users; - ACLUserPermissions user = qMakePair( TQString( "root" ), ( unsigned short )7 ); - users.append( user ); - user = qMakePair( TQString( "bin" ), ( unsigned short )4 ); - users.append( user ); - CharlesII.setAllUserPermissions( users ); - check( "setAllUserPermissions: ", CharlesII.asString(), expected ); - - CharlesII.setACL( s_testACL ); // reset - // it already has an entry for bin, let's change it - CharlesII.setNamedUserPermissions( TQString("bin"), 4 ); - CharlesII.setNamedUserPermissions( TQString( "root" ), 7 ); - check( "setNamedUserPermissions: ", CharlesII.asString(), expected ); - - // groups, all and named - - const TQString expected2 = TQString::fromLatin1( "user::rw-\nuser:bin:rwx\ngroup::rw-\ngroup:" ) + s_group1 + - TQString::fromLatin1( ":-wx\ngroup:" ) + s_group2 + TQString::fromLatin1(":r--\nmask::rwx\nother::r--\n" ); - CharlesII.setACL( s_testACL ); // reset - ACLGroupPermissionsList groups; - ACLGroupPermissions group = qMakePair( s_group1, ( unsigned short )3 ); - groups.append( group ); - group = qMakePair( s_group2, ( unsigned short )4 ); - groups.append( group ); - CharlesII.setAllGroupPermissions( groups ); - check( "setAllGroupPermissions: ", CharlesII.asString(), expected2 ); - - CharlesII.setACL( s_testACL ); // reset - CharlesII.setNamedGroupPermissions( s_group1, 3 ); - CharlesII.setNamedGroupPermissions( s_group2, 4 ); - check( "setNamedGroupPermissions: ", CharlesII.asString(), expected2 ); -} - -void KACLTest::testSettingErrorHandling() -{ - KACL foo( s_testACL ); - bool v = foo.setNamedGroupPermissions( s_group1, 7 ); // existing group - check( "Existing group: ", v, true ); - v = foo.setNamedGroupPermissions( "jongel", 7 ); // non-existing group - check( "Non-existing group: ", v, false ); - - v = foo.setNamedUserPermissions( "bin", 7 ); // existing user - check( "Existing user: ", v, true ); - v = foo.setNamedUserPermissions( "jongel", 7 ); // non-existing user - check( "Non-existing user: ", v, false ); -} - -void KACLTest::testNewMask() -{ - KACL CharlesII( "user::rw-\ngroup::rw-\nother::rw\n" ); - bool dummy = false; - CharlesII.maskPermissions( dummy ); - check( "mask exists: ", dummy, false ); - - CharlesII.setMaskPermissions( 6 ); - check( "new mask set: ", TQString::number( CharlesII.maskPermissions( dummy ) ), "6" ); - check( "mask exists now: ", dummy, true ); -} diff --git a/kio/tests/kacltest.h b/kio/tests/kacltest.h deleted file mode 100644 index 1a85e4109..000000000 --- a/kio/tests/kacltest.h +++ /dev/null @@ -1,53 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 2005 Till Adam - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef KACLTEST_H -#define KACLTEST_H - -#include -#include - -class KACLTest -{ -public: - KACLTest(); - void setup(); - void runAll(); - void cleanup(); - - void testAsString(); - void testSetACL(); - void testGetOwnerPermissions(); - void testGetOwningGroupPermissions(); - void testGetOthersPermissions(); - void testGetMaskPermissions(); - void testGetAllUserPermissions(); - void testGetAllGroupsPermissions(); - void testIsExtended(); - void testOperators(); - void testSettingBasic(); - void testSettingExtended(); - void testSettingErrorHandling(); - void testNewMask(); - -private: - KACL m_acl; -}; - -#endif diff --git a/kio/tests/kdcopcheck.cpp b/kio/tests/kdcopcheck.cpp deleted file mode 100644 index 79f050f51..000000000 --- a/kio/tests/kdcopcheck.cpp +++ /dev/null @@ -1,132 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "kdcopcheck.h" -#include - -#include - -#include -#include - -void debug(TQString txt) -{ - fprintf(stderr, "%s\n", txt.ascii()); -} - -void debug(const char *txt) -{ - fprintf(stderr, "%s\n", txt); -} -void debug(const char *format, const char *txt) -{ - fprintf(stderr, format, txt); - fprintf(stderr, "\n"); -} - -TestService::TestService(const TQString &exec) -{ - m_exec = exec; - proc << exec; - - proc.start(); - - connect(kapp->dcopClient(), TQT_SIGNAL( applicationRegistered(const TQCString&)), - this, TQT_SLOT(newApp(const TQCString&))); - connect(kapp->dcopClient(), TQT_SIGNAL( applicationRemoved(const TQCString&)), - this, TQT_SLOT(endApp(const TQCString&))); - connect(&proc, TQT_SIGNAL(processExited(TDEProcess *)), - this, TQT_SLOT(appExit())); - - TQTimer::singleShot(20*1000, this, TQT_SLOT(stop())); - result = KService::DCOP_None; -} - -void TestService::newApp(const TQCString &appId) -{ - TQString id = appId; - if (id == m_exec) - { - result = KService::DCOP_Unique; - stop(); - } - else if (id.startsWith(m_exec)) - { - result = KService::DCOP_Multi; - stop(); - } - tqWarning("Register %s", appId.data()); -} - -void TestService::endApp(const TQCString &appId) -{ - tqWarning("Unegister %s", appId.data()); -} - -void TestService::appExit() -{ - tqWarning("Exit"); -} - -void TestService::stop() -{ - kapp->exit_loop(); -} - -int TestService::exec() -{ - kapp->enter_loop(); - return result; -} - -int main(int argc, char *argv[]) -{ - putenv("IGNORE_SYCOCA_VERSION=true"); - TDEApplication k(argc,argv,"whatever",false/*noGUI*/); // KMessageBox needs KApp for makeStdCaption - - k.dcopClient()->setNotifications(true); - - KService::List list = KService::allServices(); - - tqWarning("I found %d services.", list.count()); - int i = 0; - for(KService::List::ConstIterator it = list.begin(); it != list.end(); ++it) - { - if (((*it)->DCOPServiceType() == KService::DCOP_None) && - !(*it)->desktopEntryPath().startsWith("SuSE") && - (*it)->hasServiceType("Application")) - { - if ((*it)->exec().startsWith((*it)->desktopEntryName())) - { - i++; - - TestService *test = new TestService((*it)->desktopEntryName()); - int n = test->exec(); - delete test; - - TQString result; - if (n == KService::DCOP_None) - result = "None"; - else if (n == KService::DCOP_Unique) - result = "Unique"; - else if (n == KService::DCOP_Multi) - result = "Multi"; - - tqWarning("%s %s", (*it)->desktopEntryPath().latin1(), - result.latin1()); - } - } - } - tqWarning("%d left after filtering.", i); -} - -#include "kdcopcheck.moc" diff --git a/kio/tests/kdcopcheck.h b/kio/tests/kdcopcheck.h deleted file mode 100644 index 593dbba1e..000000000 --- a/kio/tests/kdcopcheck.h +++ /dev/null @@ -1,28 +0,0 @@ -#ifndef _BLA_H_ -#define _BLA_H_ - -#include -#include -#include - -class TestService : public TQObject -{ - Q_OBJECT -public: - TestService(const TQString &exec); - - int exec(); - -public slots: - void newApp(const TQCString &appId); - void endApp(const TQCString &appId); - void appExit(); - void stop(); - -protected: - int result; - TQString m_exec; - TDEProcess proc; -}; - -#endif diff --git a/kio/tests/kdefaultprogresstest.cpp b/kio/tests/kdefaultprogresstest.cpp deleted file mode 100644 index 79ad44e3c..000000000 --- a/kio/tests/kdefaultprogresstest.cpp +++ /dev/null @@ -1,39 +0,0 @@ -#include -#include -#include -#include - -using namespace TDEIO; - -int main(int argc, char **argv) -{ - TDEApplication app(argc, argv, "kdefaultprogresstest"); - - DefaultProgress* dlg = new DefaultProgress(); - KURL src("http://this.host.doesn't.exist/this/dir/neither/andthisfileneither"); - KURL dest("file:/tmp/dest"); - dlg->slotCopying( 0L, src, dest ); - dlg->slotTotalSize( 0L, 12000 ); - dlg->slotTotalFiles( 0L, 12 ); - dlg->slotTotalDirs( 0L, 1 ); - - dlg->slotSpeed( 0L, 55 ); - dlg->slotInfoMessage( 0L, TQString::fromLatin1( "Starting..." ) ); - - int files = 0; - for ( int size = 0 ; size < 12000 ; size += 1 ) - { - dlg->slotProcessedSize( 0L, size ); - dlg->slotPercent( 0L, 100 * size / 12000 ); - if ( size % 1000 == 0 ) - { - dlg->slotProcessedFiles( 0L, ++files ); - } - kapp->processEvents(); - } - dlg->slotInfoMessage( 0L, TQString::fromLatin1( "Done." ) ); - - delete dlg; - return 0; -} - diff --git a/kio/tests/kdirlistertest.cpp b/kio/tests/kdirlistertest.cpp deleted file mode 100644 index 000fb200c..000000000 --- a/kio/tests/kdirlistertest.cpp +++ /dev/null @@ -1,162 +0,0 @@ -/* This file is part of the KDE desktop environment - - Copyright (C) 2001, 2002 Michael Brade - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include -#include - -#include -#include -#include - -#include "kdirlistertest.h" - -#include - - -KDirListerTest::KDirListerTest( TQWidget *parent, const char *name ) - : TQWidget( parent, name ) -{ - lister = new KDirLister( false /* true */ ); - debug = new PrintSignals; - - TQVBoxLayout* layout = new TQVBoxLayout( this ); - - TQPushButton* startH = new TQPushButton( "Start listing $HOME", this ); - TQPushButton* startR= new TQPushButton( "Start listing /", this ); - TQPushButton* test = new TQPushButton( "Many", this ); - TQPushButton* startT = new TQPushButton( "tarfile", this ); - - layout->addWidget( startH ); - layout->addWidget( startR ); - layout->addWidget( startT ); - layout->addWidget( test ); - resize( layout->sizeHint() ); - - connect( startR, TQT_SIGNAL( clicked() ), TQT_SLOT( startRoot() ) ); - connect( startH, TQT_SIGNAL( clicked() ), TQT_SLOT( startHome() ) ); - connect( startT, TQT_SIGNAL( clicked() ), TQT_SLOT( startTar() ) ); - connect( test, TQT_SIGNAL( clicked() ), TQT_SLOT( test() ) ); - - connect( lister, TQT_SIGNAL( started( const KURL & ) ), - debug, TQT_SLOT( started( const KURL & ) ) ); - connect( lister, TQT_SIGNAL( completed() ), - debug, TQT_SLOT( completed() ) ); - connect( lister, TQT_SIGNAL( completed( const KURL & ) ), - debug, TQT_SLOT( completed( const KURL & ) ) ); - connect( lister, TQT_SIGNAL( canceled() ), - debug, TQT_SLOT( canceled() ) ); - connect( lister, TQT_SIGNAL( canceled( const KURL & ) ), - debug, TQT_SLOT( canceled( const KURL & ) ) ); - connect( lister, TQT_SIGNAL( redirection( const KURL & ) ), - debug, TQT_SLOT( redirection( const KURL & ) ) ); - connect( lister, TQT_SIGNAL( redirection( const KURL &, const KURL & ) ), - debug, TQT_SLOT( redirection( const KURL &, const KURL & ) ) ); - connect( lister, TQT_SIGNAL( clear() ), - debug, TQT_SLOT( clear() ) ); - connect( lister, TQT_SIGNAL( newItems( const KFileItemList & ) ), - debug, TQT_SLOT( newItems( const KFileItemList & ) ) ); - connect( lister, TQT_SIGNAL( itemsFilteredByMime( const KFileItemList & ) ), - debug, TQT_SLOT( itemsFilteredByMime( const KFileItemList & ) ) ); - connect( lister, TQT_SIGNAL( deleteItem( KFileItem * ) ), - debug, TQT_SLOT( deleteItem( KFileItem * ) ) ); - connect( lister, TQT_SIGNAL( refreshItems( const KFileItemList & ) ), - debug, TQT_SLOT( refreshItems( const KFileItemList & ) ) ); - connect( lister, TQT_SIGNAL( infoMessage( const TQString& ) ), - debug, TQT_SLOT( infoMessage( const TQString& ) ) ); - connect( lister, TQT_SIGNAL( percent( int ) ), - debug, TQT_SLOT( percent( int ) ) ); - connect( lister, TQT_SIGNAL( totalSize( TDEIO::filesize_t ) ), - debug, TQT_SLOT( totalSize( TDEIO::filesize_t ) ) ); - connect( lister, TQT_SIGNAL( processedSize( TDEIO::filesize_t ) ), - debug, TQT_SLOT( processedSize( TDEIO::filesize_t ) ) ); - connect( lister, TQT_SIGNAL( speed( int ) ), - debug, TQT_SLOT( speed( int ) ) ); - - connect( lister, TQT_SIGNAL( completed() ), - this, TQT_SLOT( completed() ) ); -} - -KDirListerTest::~KDirListerTest() -{ - delete lister; -} - -void KDirListerTest::startHome() -{ - KURL home( getenv( "HOME" ) ); - lister->openURL( home, false, false ); -// lister->stop(); -} - -void KDirListerTest::startRoot() -{ - KURL root( "file:/" ); - lister->openURL( root, true, true ); -// lister->stop( root ); -} - -void KDirListerTest::startTar() -{ - KURL root( "file:/home/jowenn/aclocal_1.tgz" ); - lister->openURL( root, true, true ); -// lister->stop( root ); -} - -void KDirListerTest::test() -{ - KURL home( getenv( "HOME" ) ); - KURL root( "file:/" ); -/* lister->openURL( home, true, false ); - lister->openURL( root, true, true ); - lister->openURL( KURL("file:/etc"), true, true ); - lister->openURL( root, true, true ); - lister->openURL( KURL("file:/dev"), true, true ); - lister->openURL( KURL("file:/tmp"), true, true ); - lister->openURL( KURL("file:/usr/include"), true, true ); - lister->updateDirectory( KURL("file:/usr/include") ); - lister->updateDirectory( KURL("file:/usr/include") ); - lister->openURL( KURL("file:/usr/"), true, true ); -*/ - lister->openURL( KURL("file:/dev"), true, true ); -} - -void KDirListerTest::completed() -{ - if ( lister->url().path() == "/") - { - KFileItem* item = lister->findByURL( "/tmp" ); - if ( item ) - kdDebug() << "Found /tmp: " << item << endl; - else - kdWarning() << "/tmp not found! Bug in findByURL?" << endl; - } -} - -int main ( int argc, char *argv[] ) -{ - TDEApplication app( argc, argv, "kdirlistertest" ); - - KDirListerTest *test = new KDirListerTest( 0 ); - test->show(); - app.setMainWidget( test ); - return app.exec(); -} - -#include "kdirlistertest.moc" diff --git a/kio/tests/kdirlistertest.h b/kio/tests/kdirlistertest.h deleted file mode 100644 index 065f7478d..000000000 --- a/kio/tests/kdirlistertest.h +++ /dev/null @@ -1,120 +0,0 @@ -/* This file is part of the KDE desktop environment - - Copyright (C) 2001, 2002 Michael Brade - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef _KDIRLISTERTEST_H_ -#define _KDIRLISTERTEST_H_ - -#include -#include - -#include -#include - -#include - -using namespace std; - -class PrintSignals : public TQObject -{ - Q_OBJECT -public: - PrintSignals() : TQObject() { } - -public slots: - void started( const KURL &url ) - { - cout << "*** started( " << url.url().local8Bit() << " )" << endl; - } - void canceled() { cout << "canceled()" << endl; } - void canceled( const KURL& url ) - { - cout << "*** canceled( " << url.prettyURL().local8Bit() << " )" << endl; - } - void completed() { cout << "*** completed()" << endl; } - void completed( const KURL& url ) - { - cout << "*** completed( " << url.prettyURL().local8Bit() << " )" << endl; - } - void redirection( const KURL& url ) - { - cout << "*** redirection( " << url.prettyURL().local8Bit() << " )" << endl; - } - void redirection( const KURL& src, const KURL& dest ) - { - cout << "*** redirection( " << src.prettyURL().local8Bit() << ", " - << dest.prettyURL().local8Bit() << " )" << endl; - } - void clear() { cout << "*** clear()" << endl; } - void newItems( const KFileItemList& items ) - { - cout << "*** newItems: " << endl; - for ( KFileItemListIterator it( items ) ; it.current() ; ++it ) - cout << it.current() << " " << it.current()->name().local8Bit() << endl; - } - void deleteItem( KFileItem* item ) - { - cout << "*** deleteItem: " << item->url().prettyURL().local8Bit() << endl; - } - void itemsFilteredByMime( const KFileItemList& ) - { - cout << "*** itemsFilteredByMime: " << endl; - // TODO - } - void refreshItems( const KFileItemList& ) - { - cout << "*** refreshItems: " << endl; - // TODO - } - void infoMessage( const TQString& msg ) - { cout << "*** infoMessage: " << msg.local8Bit() << endl; } - - void percent( int percent ) - { cout << "*** percent: " << percent << endl; } - - void totalSize( TDEIO::filesize_t size ) - { cout << "*** totalSize: " << (long)size << endl; } - - void processedSize( TDEIO::filesize_t size ) - { cout << "*** processedSize: " << (long)size << endl; } - - void speed( int bytes_per_second ) - { cout << "*** speed: " << bytes_per_second << endl; } -}; - -class KDirListerTest : public TQWidget -{ - Q_OBJECT -public: - KDirListerTest( TQWidget *parent=0, const char *name=0 ); - ~KDirListerTest(); - -public slots: - void startRoot(); - void startHome(); - void startTar(); - void test(); - void completed(); - -private: - KDirLister *lister; - PrintSignals *debug; -}; - -#endif diff --git a/kio/tests/kdirwatchtest.cpp b/kio/tests/kdirwatchtest.cpp deleted file mode 100644 index c741b20f0..000000000 --- a/kio/tests/kdirwatchtest.cpp +++ /dev/null @@ -1,82 +0,0 @@ - /* - This file is or will be part of KDE desktop environment - - Copyright 1998 Sven Radej - - It is licensed under GPL version 2. - - If it is part of KDE libraries than this file is licensed under - LGPL version 2. - */ - -#include - -#include -#include - -#include "kdirwatchtest.h" - -static const KCmdLineOptions options[] = -{ - {"+[directory ...]", "Directory(ies) to watch", 0}, - KCmdLineLastOption -}; - - -int main (int argc, char **argv) -{ - TDECmdLineArgs::init(argc, argv, "KDirWatchTest", - "Test for KDirWatch", "1.0"); - TDECmdLineArgs::addCmdLineOptions( options ); - TDEApplication::addCmdLineOptions(); - - TDEApplication a; - TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs(); - - myTest testObject; - - KDirWatch *dirwatch1 = KDirWatch::self(); - KDirWatch *dirwatch2 = new KDirWatch; - - testObject.connect(dirwatch1, TQT_SIGNAL( dirty( const TQString &)), TQT_SLOT( dirty( const TQString &)) ); - testObject.connect(dirwatch1, TQT_SIGNAL( created( const TQString &)), TQT_SLOT( created( const TQString &)) ); - testObject.connect(dirwatch1, TQT_SIGNAL( deleted( const TQString &)), TQT_SLOT( deleted( const TQString &)) ); - - if (args->count() >0) { - for(int i = 0; i < args->count(); i++) { - kdDebug() << "Watching: " << args->arg(i) << endl; - dirwatch2->addDir( TQFile::decodeName( args->arg(i))); - } - } - - TQString home = TQString(getenv ("HOME")) + "/"; - TQString desk = home + "Desktop/"; - kdDebug() << "Watching: " << home << endl; - dirwatch1->addDir(home); - kdDebug() << "Watching file: " << home << "foo " << endl; - dirwatch1->addFile(home+"foo"); - kdDebug() << "Watching: " << desk << endl; - dirwatch1->addDir(desk); - TQString test = home + "test/"; - kdDebug() << "Watching: (but skipped) " << test << endl; - dirwatch1->addDir(test); - - dirwatch1->startScan(); - dirwatch2->startScan(); - - if(!dirwatch1->stopDirScan(home)) - kdDebug() << "stopDirscan: " << home << " error!" << endl; - if(!dirwatch1->restartDirScan(home)) - kdDebug() << "restartDirScan: " << home << "error!" << endl; - if (!dirwatch1->stopDirScan(test)) - kdDebug() << "stopDirScan: error" << endl; - - KDirWatch::statistics(); - - delete dirwatch2; - - KDirWatch::statistics(); - - return a.exec(); -} -#include "kdirwatchtest.moc" diff --git a/kio/tests/kdirwatchtest.h b/kio/tests/kdirwatchtest.h deleted file mode 100644 index 24dc94a91..000000000 --- a/kio/tests/kdirwatchtest.h +++ /dev/null @@ -1,33 +0,0 @@ - /* - This file is or will be part of KDE desktop environment - - Copyright 1998 Sven Radej - - It is licensed under GPL version 2. - - If it is part of KDE libraries than this file is licensed under - LGPL version 2. - */ - -#ifndef _KDIRWATCHTEST_H_ -#define _KDIRWATCHTEST_H_ - -#include -#include -#include - -#include "kdirwatch.h" -#include "kapplication.h" - -class myTest : public TQObject -{ - Q_OBJECT -public: - myTest() { }; -public slots: - void dirty(const TQString &a) { printf("Dirty: %s\n", a.ascii()); }; - void created(const TQString& f) { printf("Created: %s\n", f.ascii()); } - void deleted(const TQString& f) { printf("Deleted: %s\n", f.ascii()); } -}; - -#endif diff --git a/kio/tests/kdirwatchunittest.cpp b/kio/tests/kdirwatchunittest.cpp deleted file mode 100644 index 3d7505a3f..000000000 --- a/kio/tests/kdirwatchunittest.cpp +++ /dev/null @@ -1,180 +0,0 @@ - /* - This file is or will be part of KDE desktop environment - - (c) 2006 Dirk Mueller - - It is licensed under GPL version 2. - - If it is part of KDE libraries than this file is licensed under - LGPL version 2. - */ - -#include - -#include -#include - -#include - -#include "kdirwatchunittest.h" - -void KDirWatchTest::VERIFY_NOTHING() -{ - unsigned m_s[3]; - for(int i = 0; i < 3; ++i) - m_s[i] = m_signals[i]; - - for (int i = 0; i < 20; ++i) { - usleep(100*1000); - tqApp->processEvents(); - } - - bool nothing_failed = true; - for (int i = 0; i < 3; ++i) - if (m_s[i] != m_signals[i]) - nothing_failed = false; - - KDirWatch::statistics(); - - VERIFY (nothing_failed); -} - -void KDirWatchTest::VERIFY_DIRTY(const TQString& alert) -{ - unsigned m_s[3]; - for(int i = 0; i < 3; ++i) - m_s[i] = m_signals[i]; - - for (int i = 0; i < 20; ++i) { - usleep(100*1000); - tqApp->processEvents(); - } - - VERIFY (m_s[sigCreated] == m_signals[sigCreated] && - m_s[sigDeleted] == m_signals[sigDeleted] && - m_s[sigDirty] + 1 == m_signals[sigDirty] && - m_lastSignal == alert); -} - -void KDirWatchTest::VERIFY_CREATED(const TQString& alert) -{ - unsigned m_s[3]; - for(int i = 0; i < 3; ++i) - m_s[i] = m_signals[i]; - - for (int i = 0; i < 20; ++i) { - usleep(100*1000); - tqApp->processEvents(); - } - - VERIFY (m_s[sigDirty] == m_signals[sigDirty] && - m_s[sigDeleted] == m_signals[sigDeleted] && - m_s[sigCreated] + 1 == m_signals[sigCreated] && - m_lastSignal == alert); -} - -void KDirWatchTest::VERIFY_DELETED(const TQString& alert) -{ - unsigned m_s[3]; - for(int i = 0; i < 3; ++i) - m_s[i] = m_signals[i]; - - for (int i = 0; i < 20; ++i) { - usleep(100*1000); - tqApp->processEvents(); - } - - VERIFY (m_s[sigDirty] == m_signals[sigDirty] && - m_s[sigCreated] == m_signals[sigCreated] && - m_s[sigDeleted] + 1 == m_signals[sigDeleted] && - m_lastSignal == alert); -} - -void KDirWatchTest::remove_file (const TQString& file) -{ - ::unlink (TQFile::encodeName(file)); -} - -void KDirWatchTest::touch_file (const TQString& file) -{ - TQFile f(file); - f.open(IO_WriteOnly); -} - -void KDirWatchTest::rename_file(const TQString& from, const TQString& to) -{ - ::rename(TQFile::encodeName(from), TQFile::encodeName(to)); -} - -KUNITTEST_MODULE ( tdeunittest_kdirwatch, "KDirWatchTest" ) -KUNITTEST_MODULE_REGISTER_TESTER (KDirWatchTest) - -#define SLEEP() TQApplication::processEvents(); - -void KDirWatchTest::allTests() -{ - for(int loop=0; loop<3; ++loop) { - d = new KDirWatch; - VERIFY (d != 0); - - TQDir* dir = new TQDir(m_workingDir); - VERIFY (dir != 0); - - connect(d, TQT_SIGNAL (dirty( const TQString &)), TQT_SLOT( slotDirty( const TQString &)) ); - connect(d, TQT_SIGNAL (created( const TQString &)), TQT_SLOT( slotCreated( const TQString &)) ); - connect(d, TQT_SIGNAL (deleted( const TQString &)), TQT_SLOT( slotDeleted( const TQString &)) ); - - VERIFY (dir->mkdir (m_workingDir)); - - d->addDir (m_workingDir); - VERIFY_NOTHING(); - dir->mkdir ("does"); - VERIFY_DIRTY (m_workingDir); - touch_file (m_workingDir + "/file"); - VERIFY_DIRTY (m_workingDir); - VERIFY_NOTHING (); - remove_file (m_workingDir + "/file"); - d->addDir (m_workingDir + "/does/not/exist"); - d->removeDir (m_workingDir); - VERIFY_NOTHING(); - - dir->mkdir ("does/not"); - VERIFY_NOTHING(); - dir->mkdir ("does/not/exist"); - VERIFY_CREATED (m_workingDir + "/does/not/exist"); - - dir->rmdir ("does/not/exist"); - VERIFY_DELETED (m_workingDir + "/does/not/exist"); - dir->rmdir ("does/not"); - VERIFY_NOTHING(); - dir->rmdir ("does"); - VERIFY_NOTHING(); - - d->addFile(m_workingDir + "/a"); - touch_file(m_workingDir + "/a"); - VERIFY_CREATED (m_workingDir + "/a"); - - rename_file (m_workingDir + "/a", m_workingDir + "/b"); - VERIFY_DELETED (m_workingDir + "/a"); - VERIFY_NOTHING(); - - touch_file (m_workingDir + "/a"); - VERIFY_CREATED (m_workingDir + "/a"); - VERIFY_NOTHING(); - - touch_file (m_workingDir + "/a"); - VERIFY_DIRTY (m_workingDir + "/a"); - - remove_file (m_workingDir + "/b"); - VERIFY_NOTHING(); - - d->removeFile(m_workingDir + "/a"); - - remove_file(m_workingDir + "/a"); - - VERIFY (dir->rmdir (m_workingDir)); - delete d; - } -} - -#include "kdirwatchunittest.moc" diff --git a/kio/tests/kdirwatchunittest.h b/kio/tests/kdirwatchunittest.h deleted file mode 100644 index 42222a787..000000000 --- a/kio/tests/kdirwatchunittest.h +++ /dev/null @@ -1,66 +0,0 @@ - /* - This file is or will be part of KDE desktop environment - - Copyright 1998 Sven Radej - - It is licensed under GPL version 2. - - If it is part of KDE libraries than this file is licensed under - LGPL version 2. - */ - -#ifndef _KDIRWATCHTEST_H_ -#define _KDIRWATCHTEST_H_ - -#include -#include -#include - -#include "kdirwatch.h" -#include "kapplication.h" - -#include -#include - -class KDirWatchTest : public KUnitTest::Tester -{ - Q_OBJECT - -public: - enum { sigDirty, sigCreated, sigDeleted }; - - KDirWatchTest() - { - m_signals[sigDirty] = m_signals[sigCreated] = m_signals[sigDeleted] = 0; - m_workingDir = "/tmp/kdirwatchtest"; - } - - virtual void allTests(); - -private slots: - void slotDirty (const TQString& s) { m_signals[sigDirty]++; m_lastSignal = s; } - void slotCreated (const TQString& s) { m_signals[sigCreated]++; m_lastSignal = s; } - void slotDeleted (const TQString& s) { m_signals[sigDeleted]++; m_lastSignal = s; } - -private: - unsigned m_signals[3]; - - /* verify nothing happens */ - void VERIFY_NOTHING(); - /* verify that dirty got emitted */ - void VERIFY_DIRTY (const TQString&); - /* verify that created got emitted */ - void VERIFY_CREATED (const TQString&); - /* verify that deleted got emitted */ - void VERIFY_DELETED (const TQString&); - - void touch_file (const TQString& file); - void remove_file (const TQString& file); - void rename_file (const TQString& from, const TQString& to); - - TQString m_lastSignal; - TQString m_workingDir; - KDirWatch* d; -}; - -#endif diff --git a/kio/tests/kfiltertest.cpp b/kio/tests/kfiltertest.cpp deleted file mode 100644 index 1922e207e..000000000 --- a/kio/tests/kfiltertest.cpp +++ /dev/null @@ -1,118 +0,0 @@ -/* - * Copyright (C) 2002, 2003 David Faure - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License version 2 as published by the Free Software Foundation; - * - * This library 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 - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public License - * along with this library; see the file COPYING.LIB. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - */ - -#include "kfilterdev.h" -#include "kfilterbase.h" -#include -#include -#include -#include -#include -#include - -void test_block( const TQString & fileName ) -{ - TQIODevice * dev = KFilterDev::deviceForFile( fileName ); - if (!dev) { kdWarning() << "dev=0" << endl; return; } - if ( !dev->open( IO_ReadOnly ) ) { kdWarning() << "open failed " << endl; return; } - - // This is what KGzipDev::readAll could do, if TQIODevice::readAll was virtual.... - - TQByteArray array(1024); - int n; - while ( ( n = dev->tqreadBlock( array.data(), array.size() ) ) ) - { - kdDebug() << "readBlock returned " << n << endl << endl; - // TQCString s(array,n+1); // Terminate with 0 before printing - // printf("%s", s.data()); - - kdDebug() << "dev.at = " << dev->at() << endl; - //kdDebug() << "f.at = " << f.at() << endl; - } - dev->close(); - delete dev; -} - -void test_block_write( const TQString & fileName ) -{ - TQIODevice * dev = KFilterDev::deviceForFile( fileName ); - if (!dev) { kdWarning() << "dev=0" << endl; return; } - if ( !dev->open( IO_WriteOnly ) ) { kdWarning() << "open failed " << endl; return; } - - TQCString s("hello\n"); - int ret = dev->tqwriteBlock( s, s.size()-1 ); - kdDebug() << "writeBlock ret=" << ret << endl; - //ret = dev->tqwriteBlock( s, s.size()-1 ); - //kdDebug() << "writeBlock ret=" << ret << endl; - dev->close(); - delete dev; -} - -void test_getch( const TQString & fileName ) -{ - TQIODevice * dev = KFilterDev::deviceForFile( fileName ); - if (!dev) { kdWarning() << "dev=0" << endl; return; } - if ( !dev->open( IO_ReadOnly ) ) { kdWarning() << "open failed " << endl; return; } - int ch; - while ( ( ch = dev->getch() ) != -1 ) - printf("%c",ch); - dev->close(); - delete dev; -} - -void test_textstream( const TQString & fileName ) -{ - TQIODevice * dev = KFilterDev::deviceForFile( fileName ); - if (!dev) { kdWarning() << "dev=0" << endl; return; } - if ( !dev->open( IO_ReadOnly ) ) { kdWarning() << "open failed " << endl; return; } - TQTextStream ts( dev ); - printf("%s\n", ts.read().latin1()); - dev->close(); - delete dev; -} - -int main() -{ - TDEInstance instance("kfiltertest"); - - char currentdir[PATH_MAX+1]; - getcwd( currentdir, PATH_MAX ); - TQString pathgz = TQFile::decodeName(currentdir) + "/test.gz"; - TQString pathbz2 = TQFile::decodeName(currentdir) + "/test.bz2"; - - kdDebug() << " -- test_block_write gzip -- " << endl; - test_block_write(pathgz); - kdDebug() << " -- test_block_write bzip2 -- " << endl; - test_block_write(pathbz2); - - kdDebug() << " -- test_block gzip -- " << endl; - test_block(pathgz); - kdDebug() << " -- test_getch gzip -- " << endl; - test_getch(pathgz); - kdDebug() << " -- test_textstream gzip -- " << endl; - test_textstream(pathgz); - - kdDebug() << " -- test_block bzip2 -- " << endl; - test_block(pathbz2); - kdDebug() << " -- test_getch bzip2 -- " << endl; - test_getch(pathbz2); - kdDebug() << " -- test_textstream bzip2 -- " << endl; - test_textstream(pathbz2); - - return 0; -} diff --git a/kio/tests/kionetrctest.cpp b/kio/tests/kionetrctest.cpp deleted file mode 100644 index 2d96c8495..000000000 --- a/kio/tests/kionetrctest.cpp +++ /dev/null @@ -1,71 +0,0 @@ -#include -#include -#include -#include - -#include "authinfo.h" - -void output( const KURL& u ) -{ - kdDebug() << "Looking up auto login for: " << u.url() << endl; - TDEIO::NetRC::AutoLogin l; - bool result = TDEIO::NetRC::self()->lookup( u, l, true ); - if ( !result ) - { - kdDebug() << "Either no .netrc and/or .kionetrc file was " - "found or there was problem when attempting to " - "read from them! Please make sure either or both " - "of the above files exist and have the correct " - "permission, i.e. a regular file owned by you with " - "with a read/write permission (0600)" << endl; - return; - } - - kdDebug() << "Type: " << l.type << endl - << "Machine: " << l.machine << endl - << "Login: " << l.login << endl - << "Password: " << l.password << endl; - - TQMap::ConstIterator it = l.macdef.begin(); - for ( ; it != l.macdef.end(); ++it ) - { - kdDebug() << "Macro: " << it.key() << "= " - << it.data().join(" ") << endl; - } -} - -int main(int argc, char **argv) -{ - const char *version = "0.5"; - const char *description = "Unit test for .netrc and kionetrc parser."; - KCmdLineOptions options[] = - { - { "+command", "[url1,url2 ,...]", 0 }, - KCmdLineLastOption - }; - - TDECmdLineArgs::init( argc, argv, "kionetrctest", description, version ); - TDECmdLineArgs::addCmdLineOptions( options ); - TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs(); - int count = args->count(); - TDEApplication app; - - if ( !count ) - args->usage(); - else - { - KURL u; - for( int i=0 ; i < count; i++ ) - { - u = args->arg(i); - if ( !u.isValid() ) - { - kdDebug() << u.url() << " is invalid! Ignoring..." << endl; - continue; - } - output( u ); - } - } - args->clear(); - return 0; -} diff --git a/kio/tests/kiopassdlgtest.cpp b/kio/tests/kiopassdlgtest.cpp deleted file mode 100644 index adb14a306..000000000 --- a/kio/tests/kiopassdlgtest.cpp +++ /dev/null @@ -1,32 +0,0 @@ -#include -#include -#include -#include -#include - -#include "passdlg.h" - -int main ( int argc, char** argv ) -{ - TDEAboutData aboutData("kiopassdlgtest", "KIO Password Dialog Test", "1.0"); - TDECmdLineArgs::init(argc, argv, &aboutData); - TDEApplication app; - - TQString usr, pass, comment, label; - label = "Site:"; - comment = "localhost"; - int res = TDEIO::PasswordDialog::getNameAndPassword( usr, pass, 0L, - TQString::null, false, - TQString::null, comment, - label ); - if ( res == TQDialog::Accepted ) - KMessageBox::information( 0L, TQString("You entered:\n" - " Username: %1\n" - " Password: %2").arg(usr).arg(pass), - "Test Result"); - else - KMessageBox::information( 0L, "Password dialog was canceled!", - "Test Result"); - - return 0; -} diff --git a/kio/tests/kioslavetest.cpp b/kio/tests/kioslavetest.cpp deleted file mode 100644 index 27a99eabc..000000000 --- a/kio/tests/kioslavetest.cpp +++ /dev/null @@ -1,555 +0,0 @@ - /* - This file is or will be part of KDE desktop environment - - Copyright 1999 Matt Koss - - It is licensed under GPL version 2. - - If it is part of KDE libraries than this file is licensed under - LGPL version 2. - */ - -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "kioslavetest.h" - -using namespace TDEIO; - -KioslaveTest::KioslaveTest( TQString src, TQString dest, uint op, uint pr ) - : KMainWindow(0, "") -{ - - job = 0L; - - main_widget = new TQWidget( this, ""); - TQBoxLayout *topLayout = new TQVBoxLayout( main_widget, 10, 5 ); - - TQGridLayout *grid = new TQGridLayout( 2, 2, 10 ); - topLayout->addLayout( grid ); - - grid->setRowStretch(0,1); - grid->setRowStretch(1,1); - - grid->setColStretch(0,1); - grid->setColStretch(1,100); - - lb_from = new TQLabel( "From:", main_widget ); - grid->addWidget( lb_from, 0, 0 ); - - le_source = new TQLineEdit( main_widget ); - grid->addWidget( le_source, 0, 1 ); - le_source->setText( src ); - - lb_to = new TQLabel( "To:", main_widget ); - grid->addWidget( lb_to, 1, 0 ); - - le_dest = new TQLineEdit( main_widget ); - grid->addWidget( le_dest, 1, 1 ); - le_dest->setText( dest ); - - // Operation groupbox & buttons - opButtons = new TQButtonGroup( "Operation", main_widget ); - topLayout->addWidget( opButtons, 10 ); - connect( opButtons, TQT_SIGNAL(clicked(int)), TQT_SLOT(changeOperation(int)) ); - - TQBoxLayout *hbLayout = new TQHBoxLayout( opButtons, 15 ); - - rbList = new TQRadioButton( "List", opButtons ); - opButtons->insert( rbList, List ); - hbLayout->addWidget( rbList, 5 ); - - rbListRecursive = new TQRadioButton( "ListRecursive", opButtons ); - opButtons->insert( rbListRecursive, ListRecursive ); - hbLayout->addWidget( rbListRecursive, 5 ); - - rbStat = new TQRadioButton( "Stat", opButtons ); - opButtons->insert( rbStat, Stat ); - hbLayout->addWidget( rbStat, 5 ); - - rbGet = new TQRadioButton( "Get", opButtons ); - opButtons->insert( rbGet, Get ); - hbLayout->addWidget( rbGet, 5 ); - - rbPut = new TQRadioButton( "Put", opButtons ); - opButtons->insert( rbPut, Put ); - hbLayout->addWidget( rbPut, 5 ); - - rbCopy = new TQRadioButton( "Copy", opButtons ); - opButtons->insert( rbCopy, Copy ); - hbLayout->addWidget( rbCopy, 5 ); - - rbMove = new TQRadioButton( "Move", opButtons ); - opButtons->insert( rbMove, Move ); - hbLayout->addWidget( rbMove, 5 ); - - rbDelete = new TQRadioButton( "Delete", opButtons ); - opButtons->insert( rbDelete, Delete ); - hbLayout->addWidget( rbDelete, 5 ); - - rbShred = new TQRadioButton( "Shred", opButtons ); - opButtons->insert( rbShred, Shred ); - hbLayout->addWidget( rbShred, 5 ); - - rbMkdir = new TQRadioButton( "Mkdir", opButtons ); - opButtons->insert( rbMkdir, Mkdir ); - hbLayout->addWidget( rbMkdir, 5 ); - - rbMimetype = new TQRadioButton( "Mimetype", opButtons ); - opButtons->insert( rbMimetype, Mimetype ); - hbLayout->addWidget( rbMimetype, 5 ); - - opButtons->setButton( op ); - changeOperation( op ); - - // Progress groupbox & buttons - progressButtons = new TQButtonGroup( "Progress dialog mode", main_widget ); - topLayout->addWidget( progressButtons, 10 ); - connect( progressButtons, TQT_SIGNAL(clicked(int)), TQT_SLOT(changeProgressMode(int)) ); - - hbLayout = new TQHBoxLayout( progressButtons, 15 ); - - rbProgressNone = new TQRadioButton( "None", progressButtons ); - progressButtons->insert( rbProgressNone, ProgressNone ); - hbLayout->addWidget( rbProgressNone, 5 ); - - rbProgressDefault = new TQRadioButton( "Default", progressButtons ); - progressButtons->insert( rbProgressDefault, ProgressDefault ); - hbLayout->addWidget( rbProgressDefault, 5 ); - - rbProgressStatus = new TQRadioButton( "Status", progressButtons ); - progressButtons->insert( rbProgressStatus, ProgressStatus ); - hbLayout->addWidget( rbProgressStatus, 5 ); - - progressButtons->setButton( pr ); - changeProgressMode( pr ); - - // statusbar progress widget - statusProgress = new StatusbarProgress( statusBar() ); - statusBar()->addWidget( statusProgress, 0, true ); - - // run & stop butons - hbLayout = new TQHBoxLayout( topLayout, 15 ); - - pbStart = new TQPushButton( "&Start", main_widget ); - pbStart->setFixedSize( pbStart->sizeHint() ); - connect( pbStart, TQT_SIGNAL(clicked()), TQT_SLOT(startJob()) ); - hbLayout->addWidget( pbStart, 5 ); - - pbStop = new TQPushButton( "Sto&p", main_widget ); - pbStop->setFixedSize( pbStop->sizeHint() ); - pbStop->setEnabled( false ); - connect( pbStop, TQT_SIGNAL(clicked()), TQT_SLOT(stopJob()) ); - hbLayout->addWidget( pbStop, 5 ); - - // close button - close = new TQPushButton( "&Close", main_widget ); - close->setFixedSize( close->sizeHint() ); - connect(close, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotQuit())); - - topLayout->addWidget( close, 5 ); - - main_widget->setMinimumSize( main_widget->sizeHint() ); - setCentralWidget( main_widget ); - - slave = 0; -// slave = TDEIO::Scheduler::getConnectedSlave(KURL("ftp://ftp.kde.org")); - TDEIO::Scheduler::connect(TQT_SIGNAL(slaveConnected(TDEIO::Slave*)), - this, TQT_SLOT(slotSlaveConnected())); - TDEIO::Scheduler::connect(TQT_SIGNAL(slaveError(TDEIO::Slave*,int,const TQString&)), - this, TQT_SLOT(slotSlaveError())); -} - - -void KioslaveTest::closeEvent( TQCloseEvent * ){ - slotQuit(); -} - - -void KioslaveTest::slotQuit(){ - if ( job ) { - job->kill( true ); // kill the job quietly - } - if (slave) - TDEIO::Scheduler::disconnectSlave(slave); - kapp->quit(); -} - - -void KioslaveTest::changeOperation( int id ) { - // only two urls for copy and move - bool enab = rbCopy->isChecked() || rbMove->isChecked(); - - le_dest->setEnabled( enab ); - - selectedOperation = id; -} - - -void KioslaveTest::changeProgressMode( int id ) { - progressMode = id; - - if ( progressMode == ProgressStatus ) { - statusBar()->show(); - } else { - statusBar()->hide(); - } -} - - -void KioslaveTest::startJob() { - TQString sCurrent = TQDir::currentDirPath()+"/"; - KURL::encode_string(sCurrent); - TQString sSrc( le_source->text() ); - KURL src( sCurrent, sSrc ); - - if ( !src.isValid() ) { - TQMessageBox::critical(this, "Kioslave Error Message", "Source URL is malformed" ); - return; - } - - TQString sDest( le_dest->text() ); - KURL dest( sCurrent, sDest ); - - if ( !dest.isValid() && - ( selectedOperation == Copy || selectedOperation == Move ) ) { - TQMessageBox::critical(this, "Kioslave Error Message", - "Destination URL is malformed" ); - return; - } - - pbStart->setEnabled( false ); - - bool observe = true; - if (progressMode != ProgressDefault) { - observe = false; - } - - SimpleJob *myJob = 0; - - switch ( selectedOperation ) { - case List: - myJob = TDEIO::listDir( src ); - connect(myJob, TQT_SIGNAL( entries( TDEIO::Job*, const TDEIO::UDSEntryList&)), - TQT_SLOT( slotEntries( TDEIO::Job*, const TDEIO::UDSEntryList&))); - break; - - case ListRecursive: - myJob = TDEIO::listRecursive( src ); - connect(myJob, TQT_SIGNAL( entries( TDEIO::Job*, const TDEIO::UDSEntryList&)), - TQT_SLOT( slotEntries( TDEIO::Job*, const TDEIO::UDSEntryList&))); - break; - - case Stat: - myJob = TDEIO::stat( src, false, 2 ); - break; - - case Get: - myJob = TDEIO::get( src, true ); - connect(myJob, TQT_SIGNAL( data( TDEIO::Job*, const TQByteArray &)), - TQT_SLOT( slotData( TDEIO::Job*, const TQByteArray &))); - break; - - case Put: - putBuffer = 0; - myJob = TDEIO::put( src, -1, true, false); - connect(myJob, TQT_SIGNAL( dataReq( TDEIO::Job*, TQByteArray &)), - TQT_SLOT( slotDataReq( TDEIO::Job*, TQByteArray &))); - break; - - case Copy: - job = TDEIO::copy( src, dest, observe ); - break; - - case Move: - job = TDEIO::move( src, dest, observe ); - break; - - case Delete: - job = TDEIO::del( src, false, observe ); - break; - - case Shred: - job = TDEIO::del(src, true, observe); - break; - - case Mkdir: - myJob = TDEIO::mkdir( src ); - break; - - case Mimetype: - myJob = TDEIO::mimetype( src ); - break; - } - if (myJob) - { - if (slave) - TDEIO::Scheduler::assignJobToSlave(slave, myJob); - job = myJob; - } - - connect( job, TQT_SIGNAL( result( TDEIO::Job * ) ), - TQT_SLOT( slotResult( TDEIO::Job * ) ) ); - - connect( job, TQT_SIGNAL( canceled( TDEIO::Job * ) ), - TQT_SLOT( slotResult( TDEIO::Job * ) ) ); - - if (progressMode == ProgressStatus) { - statusProgress->setJob( job ); - } - - pbStop->setEnabled( true ); -} - - -void KioslaveTest::slotResult( TDEIO::Job * _job ) -{ - if ( _job->error() ) - { - _job->showErrorDialog(); - } - else if ( selectedOperation == Stat ) - { - UDSEntry entry = ((TDEIO::StatJob*)_job)->statResult(); - printUDSEntry( entry ); - } - else if ( selectedOperation == Mimetype ) - { - kdDebug() << "mimetype is " << ((TDEIO::MimetypeJob*)_job)->mimetype() << endl; - } - - if (job == _job) - job = 0L; - pbStart->setEnabled( true ); - pbStop->setEnabled( false ); -} - -void KioslaveTest::slotSlaveConnected() -{ - kdDebug() << "Slave connected." << endl; -} - -void KioslaveTest::slotSlaveError() -{ - kdDebug() << "Error connected." << endl; - slave = 0; -} - -static void printACL( const TQString& acl ) -{ - KACL kacl( acl ); - kdDebug() << "According to KACL: " << endl << kacl.asString() << endl; - kdDebug() << "Owner: " << kacl.ownerPermissions() << endl; - kdDebug() << "Owning group: " << kacl.owningGroupPermissions() << endl; - kdDebug() << "Others: " << kacl.othersPermissions() << endl; -} - - -void KioslaveTest::printUDSEntry( const TDEIO::UDSEntry & entry ) -{ - TDEIO::UDSEntry::ConstIterator it = entry.begin(); - for( ; it != entry.end(); it++ ) { - switch ((*it).m_uds) { - case TDEIO::UDS_FILE_TYPE: - kdDebug() << "File Type : " << (mode_t)((*it).m_long) << endl; - if ( S_ISDIR( (mode_t)((*it).m_long) ) ) - { - kdDebug() << "is a dir" << endl; - } - break; - case TDEIO::UDS_ACCESS: - kdDebug() << "Access permissions : " << (*it).m_long << endl; - break; - case TDEIO::UDS_EXTENDED_ACL: - if( (*it).m_long == 1 ) - kdDebug() << "Has extended ACL information." << endl; - break; - case TDEIO::UDS_ACL_STRING: - kdDebug() << "ACL: " << ( (*it).m_str.ascii() ) << endl; - printACL( (*it).m_str ); - break; - case TDEIO::UDS_DEFAULT_ACL_STRING: - kdDebug() << "Default ACL: " << ( (*it).m_str.ascii() ) << endl; - printACL( (*it).m_str ); - break; - case TDEIO::UDS_USER: - kdDebug() << "User : " << ((*it).m_str.ascii() ) << endl; - break; - case TDEIO::UDS_GROUP: - kdDebug() << "Group : " << ((*it).m_str.ascii() ) << endl; - break; - case TDEIO::UDS_NAME: - kdDebug() << "Name : " << ((*it).m_str.ascii() ) << endl; - //m_strText = decodeFileName( (*it).m_str ); - break; - case TDEIO::UDS_URL: - kdDebug() << "URL : " << ((*it).m_str.ascii() ) << endl; - break; - case TDEIO::UDS_MIME_TYPE: - kdDebug() << "MimeType : " << ((*it).m_str.ascii() ) << endl; - break; - case TDEIO::UDS_LINK_DEST: - kdDebug() << "LinkDest : " << ((*it).m_str.ascii() ) << endl; - break; - case TDEIO::UDS_SIZE: - kdDebug() << "Size: " << TDEIO::convertSize((*it).m_long) << endl; - break; - } - } -} - -void KioslaveTest::slotEntries(TDEIO::Job* job, const TDEIO::UDSEntryList& list) { - - KURL url = static_cast( job )->url(); - KProtocolInfo::ExtraFieldList extraFields = KProtocolInfo::extraFields(url); - UDSEntryListConstIterator it=list.begin(); - for (; it != list.end(); ++it) { - // For each file... - KProtocolInfo::ExtraFieldList::Iterator extraFieldsIt = extraFields.begin(); - UDSEntry::ConstIterator it2 = (*it).begin(); - for( ; it2 != (*it).end(); it2++ ) { - if ((*it2).m_uds == UDS_NAME) - kdDebug() << "" << ( *it2 ).m_str << endl; - else if ( (*it2).m_uds == UDS_EXTRA) { - Q_ASSERT( extraFieldsIt != extraFields.end() ); - TQString column = (*extraFieldsIt).name; - //TQString type = (*extraFieldsIt).type; - kdDebug() << " Extra data (" << column << ") :" << ( *it2 ).m_str << endl; - ++extraFieldsIt; - } - } - } -} - -void KioslaveTest::slotData(TDEIO::Job*, const TQByteArray &data) -{ - if (data.size() == 0) - { - kdDebug(0) << "Data: " << endl; - } - else - { - kdDebug(0) << "Data: \"" << TQCString(data, data.size()+1) << "\"" << endl; - } -} - -void KioslaveTest::slotDataReq(TDEIO::Job*, TQByteArray &data) -{ - const char *fileDataArray[] = - { - "Hello world\n", - "This is a test file\n", - "You can safely delete it.\n", - "BIG\n", - 0 - }; - const char *fileData = fileDataArray[putBuffer++]; - - if (!fileData) - { - kdDebug(0) << "DataReq: " << endl; - return; - } - if (!strcmp(fileData, "BIG\n")) - data.fill(0, 29*1024*1024); - else - data.duplicate(fileData, strlen(fileData)); - kdDebug(0) << "DataReq: \"" << fileData << "\"" << endl; -} - -void KioslaveTest::stopJob() { - kdDebug() << "KioslaveTest::stopJob()" << endl; - job->kill(); - job = 0L; - - pbStop->setEnabled( false ); - pbStart->setEnabled( true ); -} - -static const char version[] = "v0.0.0 0000"; // :-) -static const char description[] = "Test for kioslaves"; -static KCmdLineOptions options[] = -{ - { "s", 0, 0 }, - { "src ", "Source URL", "" }, - { "d", 0, 0 }, - { "dest ", "Destination URL", "" }, - { "o", 0, 0 }, - { "operation ", "Operation (list,listrecursive,stat,get,put,copy,move,del,shred,mkdir)", "copy" }, - { "p", 0, 0 }, - { "progress ", "Progress Type (none,default,status)", "default" }, - KCmdLineLastOption -}; - -int main(int argc, char **argv) { - TDECmdLineArgs::init( argc, argv, "kioslavetest", description, version ); - TDECmdLineArgs::addCmdLineOptions( options ); - TDEApplication app; - - TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs(); - - TQString src = args->getOption("src"); - TQString dest = args->getOption("dest"); - - uint op = 0; - uint pr = 0; - - TQString tmps; - - tmps = args->getOption("operation"); - if ( tmps == "list") { - op = KioslaveTest::List; - } else if ( tmps == "listrecursive") { - op = KioslaveTest::ListRecursive; - } else if ( tmps == "stat") { - op = KioslaveTest::Stat; - } else if ( tmps == "get") { - op = KioslaveTest::Get; - } else if ( tmps == "put") { - op = KioslaveTest::Put; - } else if ( tmps == "copy") { - op = KioslaveTest::Copy; - } else if ( tmps == "move") { - op = KioslaveTest::Move; - } else if ( tmps == "del") { - op = KioslaveTest::Delete; - } else if ( tmps == "shred") { - op = KioslaveTest::Shred; - } else if ( tmps == "mkdir") { - op = KioslaveTest::Mkdir; - } else TDECmdLineArgs::usage("unknown operation"); - - tmps = args->getOption("progress"); - if ( tmps == "none") { - pr = KioslaveTest::ProgressNone; - } else if ( tmps == "default") { - pr = KioslaveTest::ProgressDefault; - } else if ( tmps == "status") { - pr = KioslaveTest::ProgressStatus; - } else TDECmdLineArgs::usage("unknown progress mode"); - - args->clear(); // Free up memory - - KioslaveTest test( src, dest, op, pr ); - test.show(); - // Bug in KTMW / Qt / layouts ? - test.resize( test.sizeHint() ); - - app.setMainWidget(&test); - app.exec(); -} - - -#include "kioslavetest.moc" diff --git a/kio/tests/kioslavetest.h b/kio/tests/kioslavetest.h deleted file mode 100644 index 79533bbc5..000000000 --- a/kio/tests/kioslavetest.h +++ /dev/null @@ -1,108 +0,0 @@ - /* - This file is or will be part of KDE desktop environment - - Copyright 1999 Matt Koss - - It is licensed under GPL version 2. - - If it is part of KDE libraries than this file is licensed under - LGPL version 2. - */ - -#ifndef _KIOSLAVETEST_H -#define _KIOSLAVETEST_H - -#include -#include -#include -#include -#include -#include - -#include - -#include "kio/job.h" -#include "kio/global.h" -#include "kio/statusbarprogress.h" -#include "kio/slave.h" - -class KioslaveTest : public KMainWindow { - Q_OBJECT - -public: - KioslaveTest( TQString src, TQString dest, uint op, uint pr ); - ~KioslaveTest() {} - - enum Operations { List, ListRecursive, Stat, Get, Put, Copy, Move, Delete, Shred, Mkdir, Mimetype }; - - enum ProgressModes { ProgressNone, ProgressDefault, ProgressStatus }; - -protected: - - void closeEvent( TQCloseEvent * ); - - void printUDSEntry( const TDEIO::UDSEntry & entry ); - - // info stuff - TQLabel *lb_from; - TQLineEdit *le_source; - - TQLabel *lb_to; - TQLineEdit *le_dest; - - // operation stuff - TQButtonGroup *opButtons; - - TQRadioButton *rbList; - TQRadioButton *rbListRecursive; - TQRadioButton *rbStat; - TQRadioButton *rbGet; - TQRadioButton *rbPut; - TQRadioButton *rbCopy; - TQRadioButton *rbMove; - TQRadioButton *rbDelete; - TQRadioButton *rbShred; - TQRadioButton *rbMkdir; - TQRadioButton *rbMimetype; - - // progress stuff - TQButtonGroup *progressButtons; - - TQRadioButton *rbProgressNone; - TQRadioButton *rbProgressDefault; - TQRadioButton *rbProgressStatus; - - TQPushButton *pbStart; - TQPushButton *pbStop; - - TQPushButton *close; - -protected slots: - void changeOperation( int id ); - void changeProgressMode( int id ); - - void startJob(); - void stopJob(); - - void slotResult( TDEIO::Job * ); - void slotEntries( TDEIO::Job *, const TDEIO::UDSEntryList& ); - void slotData( TDEIO::Job *, const TQByteArray &data ); - void slotDataReq( TDEIO::Job *, TQByteArray &data ); - - void slotQuit(); - void slotSlaveConnected(); - void slotSlaveError(); - -private: - TDEIO::Job *job; - TQWidget *main_widget; - - TDEIO::StatusbarProgress *statusProgress; - - int selectedOperation; - int progressMode; - int putBuffer; - TDEIO::Slave *slave; -}; - -#endif // _KIOSLAVETEST_H diff --git a/kio/tests/kmfitest.cpp b/kio/tests/kmfitest.cpp deleted file mode 100644 index 40530184d..000000000 --- a/kio/tests/kmfitest.cpp +++ /dev/null @@ -1,28 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include - -int main (int argc, char **argv) -{ - TDEInstance ins("kmfitest"); - - if (argc < 2) { - printf("usage: %s \n", argv[0]); - return 1; - } - - for (int i = 1; i < argc; i++) { - TQString file = TQFile::decodeName(argv[i]); - tqWarning("File: %s", file.local8Bit().data()); - KMimeType::Ptr p; - p = KMimeType::findByPath(file); - tqWarning("Mime type (findByPath): %s", p->name().latin1()); - KFileMetaInfo meta(file, TQString::null, KFileMetaInfo::TechnicalInfo | KFileMetaInfo::ContentInfo); - } - - return 0; -} diff --git a/kio/tests/kmimefromext.cpp b/kio/tests/kmimefromext.cpp deleted file mode 100644 index 026d4173b..000000000 --- a/kio/tests/kmimefromext.cpp +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright (C) 2002 David Faure - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License version 2 as published by the Free Software Foundation; - * - * This library 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 - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public License - * along with this library; see the file COPYING.LIB. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - */ - -#include -#include -#include -#include - -#include - -static KCmdLineOptions options[] = -{ - { "+filename", "the filename to test", 0 }, - KCmdLineLastOption -}; - -int main(int argc, char *argv[]) -{ - TDECmdLineArgs::init( argc, argv, "kmimefromext", "A mimetype testing tool, gives the mimetype for a given filename", "0.0" ); - - TDECmdLineArgs::addCmdLineOptions( options ); - - TDEApplication app; - - TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs(); - TQString fileName = args->arg( 0 ); - - // The "true" here means only the filename will be looked at. - // "Mime-magic" will not interfer. The file doesn't exist. - // TODO: a cmd line parameter for controlling this bool ;) - KMimeType::Ptr mime = KMimeType::findByPath( fileName, 0, true ); - if ( mime && mime->name() != KMimeType::defaultMimeType() ) - printf( "%s\n", mime->name().latin1()); - else - return 1; // error - - return 0; -} diff --git a/kio/tests/kmimemagictest.cpp b/kio/tests/kmimemagictest.cpp deleted file mode 100644 index 00c545c3c..000000000 --- a/kio/tests/kmimemagictest.cpp +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright (C) 2002 David Faure - * Copyright (C) 2003 Waldo Bastian - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License version 2 as published by the Free Software Foundation; - * - * This library 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 - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public License - * along with this library; see the file COPYING.LIB. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - */ - -#include -#include -#include -#include - -int main( int argc, char** argv ) -{ - if (argc != 2) - { - printf("\n" - "Usage : ./kmimemagictest file\n"); - return 1; - } - TDEInstance blah("kmimemagictest"); - - TQString file = TQString::fromLocal8Bit( argv[1] ); - - KMimeMagicResult * result = KMimeMagic::self()->findFileType( file ); - - if ( result->isValid() ) - printf( "Found %s, accuracy %d\n", result->mimeType().latin1(), result->accuracy() ); - else - printf( "Invalid result\n"); - - KMimeType::Format f = KMimeType::findFormatByFileContent( file ); - if (f.text) - printf("Text\n"); - else - printf("Binary\n"); - - if (f.compression == KMimeType::Format::GZipCompression) - printf("GZipped\n"); - - return 0; -} diff --git a/kio/tests/kmimetypetest.cpp b/kio/tests/kmimetypetest.cpp deleted file mode 100644 index 5d963c81c..000000000 --- a/kio/tests/kmimetypetest.cpp +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Copyright (C) 2005 David Faure - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License version 2 as published by the Free Software Foundation; - * - * This library 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 - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public License - * along with this library; see the file COPYING.LIB. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - */ - -#include -#include -#include -#include -#include -#include -#include -#include - -static void checkIcon( const KURL& url, const TQString& expectedIcon ) -{ - TQString icon = KMimeType::iconForURL( url ); - if ( icon == expectedIcon ) - tqDebug( "icon for %s is %s, OK", url.prettyURL().latin1(), icon.latin1() ); - else { - tqDebug( "ERROR: icon for %s is %s, expected %s!", url.prettyURL().latin1(), icon.latin1(), expectedIcon.latin1() ); - exit(1); - } -} - -int main( int argc, char** argv ) -{ - TDEInstance blah("kmimetypetest"); - - // Obviously those tests will need to be fixed if we ever change the name of the icons - // but at least they unit-test KMimeType::iconForURL. - KURL url; - - // safely check a "regular" folder - url.setPath( TQDir::homeDirPath() ); - checkIcon( url, "folder" ); - - // safely check a non-readable folder - if (0 != geteuid()) { // can't do this test if we're root - KTempDir tmp( TQString::null, 0 ); - tmp.setAutoDelete( true ); - url.setPath( tmp.name() ); - checkIcon( url, "folder_locked" ); - chmod( TQFile::encodeName( tmp.name() ), 0500 ); // so we can 'rm -rf' it - } - - // safely check the trash folder - if ( KProtocolInfo::isKnownProtocol( TQString("trash") ) ) { - checkIcon( "trash:/", "trashcan_full" ); // #100321 - checkIcon( "trash:/foo/", "folder" ); - } - - TQString pdf; - KMimeType::diagnoseFileName("foo.pdf", pdf); - tqDebug("extension: '%s'", pdf.latin1()); - assert(pdf == TQString("*.pdf")); - TQString ps; - KMimeType::diagnoseFileName("foo.ps", ps); - tqDebug("extension: '%s'", ps.latin1()); - assert(ps == TQString("*.ps")); - - return 0; -} diff --git a/kio/tests/kpropsdlgtest.cpp b/kio/tests/kpropsdlgtest.cpp deleted file mode 100644 index 811f03923..000000000 --- a/kio/tests/kpropsdlgtest.cpp +++ /dev/null @@ -1,35 +0,0 @@ -#include -#include -#include -#include -#include - - -static KCmdLineOptions options[] = -{ - { "+url", "the path or url to the file/dir for which to show properties", 0 }, - KCmdLineLastOption -}; - -int main ( int argc, char** argv ) -{ - TDEAboutData aboutData("kpropertiesdialogtest", "KIO Properties Dialog Test", "1.0"); - TDECmdLineArgs::init(argc, argv, &aboutData); - TDECmdLineArgs::addCmdLineOptions( options ); - - TDEApplication app; - - TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs(); - if ( args->count() < 1 ) - TDECmdLineArgs::usage(); - KURL u = args->url( 0 ); - - // This is the test for the KPropertiesDialog constructor that is now - // documented to NOT work. Passing only a URL means a TDEIO::stat will happen, - // and asking for the dialog to be modal too creates problems. - // (A non-modal, URL-only dialog is the one kicker uses for app buttons, no problem there) - KPropertiesDialog* dlg = new KPropertiesDialog( u, 0, 0, true /*modal*/, false /*we do exec ourselves*/ ); - dlg->exec(); - - return 0; -} diff --git a/kio/tests/kprotocolinfotest.cpp b/kio/tests/kprotocolinfotest.cpp deleted file mode 100644 index 845f3367c..000000000 --- a/kio/tests/kprotocolinfotest.cpp +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright (C) 2002 David Faure - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License version 2 as published by the Free Software Foundation; - * - * This library 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 - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public License - * along with this library; see the file COPYING.LIB. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - */ - -#include -#include -#include -#include -#include -#include -#include -#include - -int main(int argc, char **argv) { - TDEAboutData aboutData("kprotocolinfotest", "KProtocolinfo Test", - "1.0"); - - TDECmdLineArgs::init(argc, argv, &aboutData); - TDEApplication app; - - KURL url; - url.setPath("/tmp"); - assert( KProtocolInfo::supportsListing( KURL( "ftp://10.1.1.10") ) ); - assert( KProtocolInfo::inputType(url) == KProtocolInfo::T_NONE ); - assert( KProtocolInfo::outputType(url) == KProtocolInfo::T_FILESYSTEM ); - assert( KProtocolInfo::supportsReading(url) == true ); - KProtocolInfo::ExtraFieldList extraFields = KProtocolInfo::extraFields(url); - KProtocolInfo::ExtraFieldList::Iterator extraFieldsIt = extraFields.begin(); - for ( ; extraFieldsIt != extraFields.end() ; ++extraFieldsIt ) - kdDebug() << (*extraFieldsIt).name << " " << (*extraFieldsIt).type << endl; - - assert( KProtocolInfo::showFilePreview( "file" ) == true ); - assert( KProtocolInfo::showFilePreview( "audiocd" ) == false ); - assert( TDEGlobalSettings::showFilePreview( "audiocd:/" ) == false ); - - TQString proxy; - TQString protocol = KProtocolManager::slaveProtocol( "http://bugs.kde.org", proxy ); - assert( protocol == "http" ); - - TQStringList capabilities = KProtocolInfo::capabilities( "imap" ); - kdDebug() << "kio_imap capabilities: " << capabilities << endl; - //assert(capabilities.contains("ACL")); - - return 0; -} diff --git a/kio/tests/kruntest.cpp b/kio/tests/kruntest.cpp deleted file mode 100644 index d8f47859b..000000000 --- a/kio/tests/kruntest.cpp +++ /dev/null @@ -1,209 +0,0 @@ -/* - * Copyright (C) 2002 David Faure - * Copyright (C) 2003 Waldo Bastian - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License version 2 as published by the Free Software Foundation; - * - * This library 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 - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public License - * along with this library; see the file COPYING.LIB. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - */ - -// ------ this test works only if your terminal application is set to "x-term" ------ - -#include "kruntest.h" - -#include -#include -#include -#include -#include - -#include -#include -#include - -#include -#include -#include - -const int MAXKRUNS = 100; - -testKRun * myArray[MAXKRUNS]; - -void testKRun::foundMimeType( const TQString& _type ) -{ - kdDebug() << "testKRun::foundMimeType " << _type << endl; - kdDebug() << "testKRun::foundMimeType URL=" << m_strURL.url() << endl; - m_bFinished = true; - m_timer.start( 0, true ); - return; -} - -Receiver::Receiver() -{ - TQVBoxLayout *lay = new TQVBoxLayout(this); - lay->setAutoAdd(true); - TQPushButton * h = new TQPushButton( "Press here to terminate", this ); - start = new TQPushButton( "Launch KRuns", this ); - stop = new TQPushButton( "Stop those KRuns", this ); - stop->setEnabled(false); - TQObject::connect( h, TQT_SIGNAL(clicked()), kapp, TQT_SLOT(quit()) ); - TQObject::connect( start, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotStart()) ); - TQObject::connect( stop, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotStop()) ); - - adjustSize(); - show(); -} - -void Receiver::slotStop() -{ - for (int i = 0 ; i < MAXKRUNS ; i++ ) - { - kdDebug() << " deleting krun " << i << endl; - delete myArray[i]; - } - start->setEnabled(true); - stop->setEnabled(false); -} - - -void Receiver::slotStart() -{ - for (int i = 0 ; i < MAXKRUNS ; i++ ) - { - kdDebug() << "creating testKRun " << i << endl; - myArray[i] = new testKRun( KURL("file:/tmp"), 0, true, false /* no autodelete */ ); - } - start->setEnabled(false); - stop->setEnabled(true); -} - -void check(TQString txt, TQString a, TQString b) -{ - if (a.isEmpty()) - a = TQString::null; - if (b.isEmpty()) - b = TQString::null; - if (a == b) - kdDebug() << txt << " : '" << a << "' - ok" << endl; - else { - kdDebug() << txt << " : '" << a << "' but expected '" << b << "' - KO!" << endl; - exit(1); - } -} - -const char *bt(bool tr) { return tr?"true":"false"; } - -void checkBN(TQString a, bool tr, TQString b) -{ - check( TQString().sprintf("binaryName('%s', %s)", a.latin1(), bt(tr)), KRun::binaryName(a, tr), b); -} - -void checkPDE(const KService &service, const KURL::List &urls, bool hs, bool tf, TQString b) -{ - check( - TQString().sprintf("processDesktopExec( " - "service = {\nexec = %s\nterminal = %s, terminalOptions = %s\nsubstituteUid = %s, user = %s }," - "\nURLs = { %s },\nhas_shell = %s, temp_files = %s )", - service.exec().latin1(), bt(service.terminal()), service.terminalOptions().latin1(), bt(service.substituteUid()), service.username().latin1(), - KShell::joinArgs(urls.toStringList()).latin1(), bt(hs), bt(tf)), - KShell::joinArgs(KRun::processDesktopExec(service,urls,hs,tf)), b); -} - -int main(int argc, char **argv) -{ - TDEApplication app( argc, argv, "kruntest", true /* it _has_ a GUI ! */); - - // First some non-interactive tests - checkBN( "/usr/bin/ls", true, "ls"); - checkBN( "/usr/bin/ls", false, "/usr/bin/ls"); - checkBN( "/path/to/wine \"long argument with path\"", true, "wine" ); - checkBN( "/path/with/a/sp\\ ace/exe arg1 arg2", true, "exe" ); - checkBN( "\"progname\" \"arg1\"", true, "progname" ); - checkBN( "'quoted' \"arg1\"", true, "quoted" ); - checkBN( " 'leading space' arg1", true, "leading space" ); - - KURL::List l0; - KURL::List l1; l1 << "file:/tmp"; - KURL::List l2; l2 << "http://localhost/foo"; - KURL::List l3; l3 << "file:/local/file" << "http://remotehost.org/bar"; - - static const char - *execs[] = { "Exec=date -u", "Exec=echo $$PWD" }, - *terms[] = { "Terminal=false", "Terminal=true\nTerminalOptions=-T \"%f - %c\"" }, - *sus[] = { "X-TDE-SubstituteUID=false", "X-TDE-SubstituteUID=true\nX-TDE-Username=sprallo" }, - *rslts[] = { -"'date' '-u'", // 0 -"'/bin/sh' '-c' 'echo $PWD '", // 1 -"'x-term' '-T' ' - just_a_test' '-e' 'date' '-u'", // 2 -"'x-term' '-T' ' - just_a_test' '-e' '/bin/sh' '-c' 'echo $PWD '", // 3 -"'tdesu' '-u' 'sprallo' '-c' 'date -u '", // 4 -"'tdesu' '-u' 'sprallo' '-c' '/bin/sh -c '\\''echo $PWD '\\'''", // 5 -"'x-term' '-T' ' - just_a_test' '-e' 'su' 'sprallo' '-c' 'date -u '", // 6 -"'x-term' '-T' ' - just_a_test' '-e' 'su' 'sprallo' '-c' '/bin/sh -c '\\''echo $PWD '\\'''", // 7 -"'date -u '", // 8 -"'echo $PWD '", // 9 -"'x-term -T \" - just_a_test\"' '-e' 'date -u '", // a -"'x-term -T \" - just_a_test\"' '-e' '/bin/sh -c '\\''echo $PWD '\\'''", // b -"'tdesu' '-u' 'sprallo' '-c' ''\\''date -u '\\'''", // c -"'tdesu' '-u' 'sprallo' '-c' ''\\''/bin/sh -c '\\''\\'\\'''\\''echo $PWD '\\''\\'\\'''\\'''\\'''", // d -"'x-term -T \" - just_a_test\"' '-e' 'su' 'sprallo' '-c' ''\\''date -u '\\'''", // e -"'x-term -T \" - just_a_test\"' '-e' 'su' 'sprallo' '-c' ''\\''/bin/sh -c '\\''\\'\\'''\\''echo $PWD '\\''\\'\\'''\\'''\\'''", // f - }; - for (int hs = 0; hs < 2; hs++) - for (int su = 0; su < 2; su++) - for (int te = 0; te < 2; te++) - for (int ex = 0; ex < 2; ex++) { - int fd = creat("kruntest.desktop", 0666); - FILE *f; - if (fd < 0) abort(); - f = KDE_fdopen(fd, "w"); - fprintf(f, "[Desktop Entry]\n" - "Type=Application\n" - "Name=just_a_test\n" - "Icon=~/icon.png\n" - "%s\n%s\n%s\n",execs[ex],terms[te],sus[su]); - close(fd); - fclose(f); - KService s(TQDir::currentDirPath() + "/kruntest.desktop"); - unlink("kruntest.desktop"); - checkPDE( s, l0, hs, false, rslts[ex+te*2+su*4+hs*8]); - } - - KService s1("dummy", "kate %U", "app"); - checkPDE( s1, l0, false, false, "'kate'"); - checkPDE( s1, l1, false, false, "'kate' '/tmp'"); - checkPDE( s1, l2, false, false, "'kate' 'http://localhost/foo'"); - checkPDE( s1, l3, false, false, "'kate' '/local/file' 'http://remotehost.org/bar'"); - KService s2("dummy", "kate %u", "app"); - checkPDE( s2, l0, false, false, "'kate'"); - checkPDE( s2, l1, false, false, "'kate' '/tmp'"); - checkPDE( s2, l2, false, false, "'kate' 'http://localhost/foo'"); - checkPDE( s2, l3, false, false, "'kate'"); - KService s3("dummy", "kate %F", "app"); - checkPDE( s3, l0, false, false, "'kate'"); - checkPDE( s3, l1, false, false, "'kate' '/tmp'"); - checkPDE( s3, l2, false, false, "'kfmexec' 'kate %F' 'http://localhost/foo'"); - checkPDE( s3, l3, false, false, "'kfmexec' 'kate %F' 'file:/local/file' 'http://remotehost.org/bar'"); - - checkPDE( s3, l1, false, true, "'kfmexec' '--tempfiles' 'kate %F' 'file:/tmp'"); - checkPDE( s3, l1, true, true, "''\\''kfmexec'\\'' '\\''--tempfiles'\\'' '\\''kate %F'\\'' '\\''file:/tmp'\\'''"); - - KService s4("dummy", "sh -c \"kate \"'\\\"'\"%F\"'\\\"'", "app"); - checkPDE( s4, l1, false, false, "'kate' '\"/tmp\"'"); - - Receiver receiver; - app.setMainWidget(&receiver); - return app.exec(); -} - -#include "kruntest.moc" diff --git a/kio/tests/kruntest.h b/kio/tests/kruntest.h deleted file mode 100644 index 68e7a7280..000000000 --- a/kio/tests/kruntest.h +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright (C) 2002 David Faure - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License version 2 as published by the Free Software Foundation; - * - * This library 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 - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public License - * along with this library; see the file COPYING.LIB. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - */ - -#ifndef _kruntest_h -#define _kruntest_h - -#include - -#include - -class testKRun : public KRun -{ - Q_OBJECT -public: - - testKRun( const KURL& _url, mode_t _mode = 0, - bool _is_local_file = false, bool _auto_delete = true ) - : KRun( _url, _mode, _is_local_file, _auto_delete ) {} - - virtual ~testKRun() {} - - virtual void foundMimeType( const TQString& _type ); - -}; - - -class TQPushButton; -class Receiver : public TQWidget -{ - Q_OBJECT -public: - Receiver(); - ~Receiver() {} -public slots: - void slotStart(); - void slotStop(); -private: - TQPushButton * start; - TQPushButton * stop; - -}; - -#endif diff --git a/kio/tests/kscantest.cpp b/kio/tests/kscantest.cpp deleted file mode 100644 index 14abd1b33..000000000 --- a/kio/tests/kscantest.cpp +++ /dev/null @@ -1,16 +0,0 @@ -#include -#include - -int main( int argc, char **argv ) -{ - TDEApplication app( argc, argv, "kscantest" ); - KScanDialog *dlg = KScanDialog::getScanDialog(); - if ( !dlg ) { - tqDebug("*** EEK, no Scan-service available, aborting!"); - return 0; - } - - dlg->show(); - - return app.exec(); -} diff --git a/kio/tests/kshredtest.cpp b/kio/tests/kshredtest.cpp deleted file mode 100644 index 76e87fca4..000000000 --- a/kio/tests/kshredtest.cpp +++ /dev/null @@ -1,74 +0,0 @@ -/*--------------------------------------------------------------------------* - KShred.h Copyright (c) 2000 MieTerra LLC. - Credits: Andreas F. Pour - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#include "kshred.h" -#include - -int main(int argc, char **argv) - -{ - if (argc < 3) - { - fprintf(stderr, "Error, usage is '%s FILE MODE'\n", argv[0]); - exit(-1); - } - - //if (!shred(argv[1])) - //printf("ERROR shredding %s\n", argv[1]); - //exit(1); - - KShred::shred(argv[1]); - printf("Done\n"); - exit(1); - - KShred *shredder = new KShred(argv[1]); - - switch (argv[2][0]) - { - case '0': - if (!shredder->fill0s()) - fprintf(stderr, "ERROR in filling 0s\n"); - break; - case '1': - if (!shredder->fill1s()) - fprintf(stderr, "ERROR in filling 1s\n"); - break; - case 'r': - if (!shredder->fillrandom()) - fprintf(stderr, "ERROR in filling random\n"); - break; - case 'b': - if (!shredder->fillbyte((uint) argv[2][1])) - fprintf(stderr, "ERROR in filling byte '%c'\n", argv[2][1]); - break; - case 's': - if (!shredder->shred()) - fprintf(stderr, "ERROR in shredding\n"); - break; - default: - if (!shredder->fillpattern((unsigned char*)(argv[2]), strlen(argv[2]))) - fprintf(stderr, "ERROR in filling with pattern '%s'\n", argv[2]); - break; - } - fprintf(stdout, "Done\n"); - return 0; -} diff --git a/kio/tests/ktartest.cpp b/kio/tests/ktartest.cpp deleted file mode 100644 index 2c470f6e4..000000000 --- a/kio/tests/ktartest.cpp +++ /dev/null @@ -1,178 +0,0 @@ -/* - * Copyright (C) 2002, 2003 David Faure - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License version 2 as published by the Free Software Foundation; - * - * This library 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 - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public License - * along with this library; see the file COPYING.LIB. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - */ - -#include "ktar.h" -#include -#include -#include - -#include - -void recursive_print( const KTarDirectory * dir, const TQString & path ) -{ - TQStringList l = dir->entries(); - TQStringList::Iterator it = l.begin(); - for( ; it != l.end(); ++it ) - { - const KTarEntry* entry = dir->entry( (*it) ); - printf("mode=%07o %s %s %s%s %d isdir=%d\n", entry->permissions(), entry->user().latin1(), entry->group().latin1(), path.latin1(), (*it).latin1(), - entry->isFile() ? static_cast(entry)->size() : 0, - entry->isDirectory()); - if (entry->isDirectory()) - recursive_print( (KTarDirectory *)entry, path+(*it)+"/" ); - } -} - -int main( int argc, char** argv ) -{ - if (argc != 3) - { - printf("\n" - " Usage :\n" - " ./ktartest list /path/to/existing_file.tar.gz tests listing an existing tar.gz\n" - " ./ktartest readwrite newfile.tar.gz will create the tar.gz, then close and reopen it.\n" - " ./ktartest maxlength newfile.tar.gz tests the maximum filename length allowed.\n" - " ./ktartest iodevice /path/to/existing_file.tar.gz tests KArchiveFile::device()\n"); - return 1; - } - TDEInstance instance("ktartest"); - TQString command = argv[1]; - if ( command == "list" ) - { - KTarGz tar( argv[2] ); - - if ( !tar.open( IO_ReadOnly ) ) - { - printf("Could not open %s for reading\n", argv[2] ); - return 1; - } - - const KTarDirectory* dir = tar.directory(); - - //printf("calling recursive_print\n"); - recursive_print( dir, "" ); - //printf("recursive_print called\n"); - - tar.close(); - - return 0; - } - else if (command == "readwrite" ) - { - KTarGz tar( argv[2] ); - - if ( !tar.open( IO_WriteOnly ) ) - { - printf("Could not open %s for writing\n", argv[1]); - return 1; - } - - tar.writeFile( "empty", "weis", "users", 0, "" ); - tar.writeFile( "test1", "weis", "users", 5, "Hallo" ); - tar.writeFile( "test2", "weis", "users", 8, "Hallo Du" ); - tar.writeFile( "mydir/test3", "weis", "users", 13, "Noch so einer" ); - tar.writeFile( "my/dir/test3", "dfaure", "hackers", 29, "I don't speak German (David)" ); - -#define SIZE1 100 - // Now a medium file : 100 null bytes - char medium[ SIZE1 ]; - memset( medium, 0, SIZE1 ); - tar.writeFile( "mediumfile", "user", "group", SIZE1, medium ); - // Another one, with an absolute path - tar.writeFile( "/dir/subdir/mediumfile2", "user", "group", SIZE1, medium ); - - // Now a huge file : 20000 null bytes - int n = 20000; - char * huge = new char[ n ]; - memset( huge, 0, n ); - tar.writeFile( "hugefile", "user", "group", n, huge ); - delete [] huge; - - tar.close(); - - printf("-----------------------\n"); - - if ( !tar.open( IO_ReadOnly ) ) - { - printf("Could not open %s for reading\n", argv[1] ); - return 1; - } - - const KTarDirectory* dir = tar.directory(); - recursive_print(dir, ""); - - const KTarEntry* e = dir->entry( "mydir/test3" ); - Q_ASSERT( e && e->isFile() ); - const KTarFile* f = (KTarFile*)e; - - TQByteArray arr( f->data() ); - printf("SIZE=%i\n",arr.size() ); - TQString str( arr ); - printf("DATA=%s\n", str.latin1()); - - tar.close(); - - return 0; - } - else if ( command == "maxlength" ) - { - KTarGz tar( argv[2] ); - - if ( !tar.open( IO_WriteOnly ) ) - { - printf("Could not open %s for writing\n", argv[1]); - return 1; - } - // Generate long filenames of each possible length bigger than 98... - // Also exceed 512 byte block size limit to see how well the ././@LongLink - // implementation fares - for (int i = 98; i < 514 ; i++ ) - { - TQString str, num; - str.fill( 'a', i-10 ); - num.setNum( i ); - num = num.rightJustify( 10, '0' ); - tar.writeFile( str+num, "testu", "testg", 3, "hum" ); - } - // Result of this test : works perfectly now (failed at 482 formerly and - // before that at 154). - tar.close(); - printf("Now run 'tar tvzf %s'\n", argv[2]); - return 0; - } - else if ( command == "iodevice" ) - { - KTarGz tar( argv[2] ); - if ( !tar.open( IO_ReadOnly ) ) - return 1; - const KTarDirectory* dir = tar.directory(); - assert(dir); - const KTarEntry* entry = dir->entry( "my/dir/test3" ); - if ( entry && entry->isFile() ) - { - TQIODevice *dev = static_cast(entry)->device(); - TQByteArray contents = dev->readAll(); - printf("contents='%s'\n", TQCString(contents, contents.size()+1 ).data()); - } else - printf("entry=%p - not found if 0, otherwise not a file\n", (void*)entry); - return 0; - } - else - printf("Unknown command\n"); -} - diff --git a/kio/tests/ktradertest.cpp b/kio/tests/ktradertest.cpp deleted file mode 100644 index b05444dfd..000000000 --- a/kio/tests/ktradertest.cpp +++ /dev/null @@ -1,108 +0,0 @@ -/* - * Copyright (C) 2002, 2003 David Faure - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License version 2 as published by the Free Software Foundation; - * - * This library 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 - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public License - * along with this library; see the file COPYING.LIB. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - */ - -#include -#include -#include -#include -#include - -static KCmdLineOptions options[] = -{ - { "+query", "the query", 0 }, - { "+[genericServiceType]", "Application (default), or KParts/ReadOnlyPart", 0 }, - { "+[constraint]", "constraint", 0 }, - { "+[preference]", "preference", 0 }, - KCmdLineLastOption -}; - -int main( int argc, char **argv ) -{ - TDECmdLineArgs::init( argc, argv, "ktradertest", "KTradertest", "A KTrader testing tool", "0.0" ); - - TDECmdLineArgs::addCmdLineOptions( options ); - - TDEApplication app( false, false ); // no GUI - - TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs(); - - if ( args->count() < 1 ) - TDECmdLineArgs::usage(); - - TQString query = TQString::fromLocal8Bit( args->arg( 0 ) ); - - TQString genericServiceType, constraint, preference; - - if ( args->count() >= 2 ) - genericServiceType = TQString::fromLocal8Bit( args->arg( 1 ) ); - - if ( args->count() >= 3 ) - constraint = TQString::fromLocal8Bit( args->arg( 2 ) ); - - if ( args->count() == 4 ) - preference = TQString::fromLocal8Bit( args->arg( 3 ) ); - - printf( "query is : %s\n", query.local8Bit().data() ); - printf( "genericServiceType is : %s\n", genericServiceType.local8Bit().data() ); - printf( "constraint is : %s\n", constraint.local8Bit().data() ); - printf( "preference is : %s\n", preference.local8Bit().data() ); - - KTrader::OfferList offers = KTrader::self()->query( query, genericServiceType, constraint, preference ); - - printf("got %d offers.\n", offers.count()); - - int i = 0; - KTrader::OfferList::ConstIterator it = offers.begin(); - KTrader::OfferList::ConstIterator end = offers.end(); - for (; it != end; ++it, ++i ) - { - printf("---- Offer %d ----\n", i); - TQStringList props = (*it)->propertyNames(); - TQStringList::ConstIterator propIt = props.begin(); - TQStringList::ConstIterator propEnd = props.end(); - for (; propIt != propEnd; ++propIt ) - { - TQVariant prop = (*it)->property( *propIt ); - - if ( !prop.isValid() ) - { - printf("Invalid property %s\n", (*propIt).local8Bit().data()); - continue; - } - - TQString outp = *propIt; - outp += " : '"; - - switch ( prop.type() ) - { - case TQVariant::StringList: - outp += prop.toStringList().join(" - "); - break; - case TQVariant::Bool: - outp += prop.toBool() ? "TRUE" : "FALSE"; - break; - default: - outp += prop.toString(); - break; - } - - if ( !outp.isEmpty() ) - printf("%s'\n", outp.local8Bit().data()); - } - } -} diff --git a/kio/tests/kurifiltertest.cpp b/kio/tests/kurifiltertest.cpp deleted file mode 100644 index 820f97403..000000000 --- a/kio/tests/kurifiltertest.cpp +++ /dev/null @@ -1,361 +0,0 @@ -/* - * Copyright (C) 2002, 2003 David Faure - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License version 2 as published by the Free Software Foundation; - * - * This library 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 - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public License - * along with this library; see the file COPYING.LIB. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - */ - -#include "kurifilter.h" - -#include -#include -#include - -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -static const char * const s_uritypes[] = { "NET_PROTOCOL", "LOCAL_FILE", "LOCAL_DIR", "EXECUTABLE", "HELP", "SHELL", "BLOCKED", "ERROR", "UNKNOWN" }; -#define NO_FILTERING -2 - -void filter( const char* u, const char * expectedResult = 0, int expectedUriType = -1, TQStringList list = TQStringList(), const char * abs_path = 0, bool checkForExecutables = true ) -{ - TQString a = TQString::fromUtf8( u ); - KURIFilterData * m_filterData = new KURIFilterData; - m_filterData->setData( a ); - m_filterData->setCheckForExecutables( checkForExecutables ); - - if( abs_path ) - { - m_filterData->setAbsolutePath( TQString::fromLatin1( abs_path ) ); - kdDebug() << "Filtering: " << a << " with abs_path=" << abs_path << endl; - } - else - kdDebug() << "Filtering: " << a << endl; - - if (KURIFilter::self()->filterURI(*m_filterData, list)) - { - // Copied from minicli... - TQString cmd; - KURL uri = m_filterData->uri(); - - if ( uri.isLocalFile() && !uri.hasRef() && uri.query().isEmpty() ) - cmd = uri.path(); - else - cmd = uri.url(); - - switch( m_filterData->uriType() ) - { - case KURIFilterData::LOCAL_FILE: - case KURIFilterData::LOCAL_DIR: - case KURIFilterData::HELP: - kdDebug() << "*** Result: Local Resource => '" - << m_filterData->uri().url() << "'" << endl; - break; - case KURIFilterData::NET_PROTOCOL: - kdDebug() << "*** Result: Network Resource => '" - << m_filterData->uri().url() << "'" << endl; - break; - case KURIFilterData::SHELL: - case KURIFilterData::EXECUTABLE: - if( m_filterData->hasArgsAndOptions() ) - cmd += m_filterData->argsAndOptions(); - kdDebug() << "*** Result: Executable/Shell => '" << cmd << "'"<< endl; - break; - case KURIFilterData::ERROR: - kdDebug() << "*** Result: Encountered error. See reason below." << endl; - break; - default: - kdDebug() << "*** Result: Unknown or invalid resource." << endl; - } - - if ( expectedUriType != -1 && expectedUriType != m_filterData->uriType() ) - { - kdError() << " Got URI type " << s_uritypes[m_filterData->uriType()] - << " expected " << s_uritypes[expectedUriType] << endl; - ::exit(1); - } - - if ( expectedResult ) - { - // Hack for other locales than english, normalize google hosts to google.com - cmd = cmd.replace( TQRegExp( "www\\.google\\.[^/]*/" ), "www.google.com/" ); - if ( cmd != TQString::fromLatin1( expectedResult ) ) - { - kdError() << " Got " << cmd << " expected " << expectedResult << endl; - ::exit(1); - } - } - } - else - { - if ( expectedUriType == NO_FILTERING ) - kdDebug() << "*** No filtering required." << endl; - else - { - kdDebug() << "*** Could not be filtered." << endl; - if( expectedUriType != m_filterData->uriType() ) - { - kdError() << " Got URI type " << s_uritypes[m_filterData->uriType()] - << " expected " << s_uritypes[expectedUriType] << endl; - ::exit(1); - } - } - } - - delete m_filterData; - kdDebug() << "-----" << endl; -} - -void testLocalFile( const TQString& filename ) -{ - TQFile tmpFile( filename ); // Yeah, I know, security risk blah blah. This is a test prog! - - if ( tmpFile.open( IO_ReadWrite ) ) - { - TQCString fname = TQFile::encodeName( tmpFile.name() ); - filter(fname, fname, KURIFilterData::LOCAL_FILE); - tmpFile.close(); - tmpFile.remove(); - } - else - kdDebug() << "Couldn't create " << tmpFile.name() << ", skipping test" << endl; -} - -static const char appName[] = "kurifiltertest"; -static const char programName[] = I18N_NOOP("kurifiltertest"); -static const char description[] = I18N_NOOP("Unit test for the URI filter plugin framework."); -static const char version[] = "1.5"; - -static const KCmdLineOptions options[] = -{ - { "s", I18N_NOOP("Use space as keyword delimeter for web shortcuts"), 0}, - KCmdLineLastOption -}; - -int main(int argc, char **argv) -{ - // Ensure that user configuration doesn't change the results of those tests - // TDEHOME needs to be writable though, for a tdesycoca database - setenv( "TDEHOME", TQFile::encodeName( TQDir::homeDirPath() + "/.tde-kurifiltertest" ), true ); - setenv( "TDE_FORK_SLAVES", "yes", true ); // simpler, for the final cleanup - - TDEAboutData aboutData(appName, programName, version, description); - TDECmdLineArgs::init(argc, argv, &aboutData); - TDECmdLineArgs::addCmdLineOptions( options ); - - TDEApplication app; - app.disableAutoDcopRegistration(); - - // Allow testing of the search engine using both delimiters... - char delimiter = TDECmdLineArgs::parsedArgs()->isSet("s") ? ' ' : ':'; - - // Many tests check the "default search engine" feature. - // There is no default search engine by default (since it was annoying when making typos), - // so the user has to set it up, which we do here. - { - KSimpleConfig cfg( "kuriikwsfilterrc" ); - cfg.setGroup( "General" ); - cfg.writeEntry( "DefaultSearchEngine", "google" ); - cfg.writeEntry( "Verbose", true ); - cfg.writeEntry( "KeywordDelimiter", delimiter ); - cfg.sync(); - } - - // Enable verbosity for debugging - { - KSimpleConfig cfg( "kshorturifilterrc" ); - cfg.writeEntry( "Verbose", true ); - cfg.sync(); - } - - TQStringList minicliFilters; - minicliFilters << "kshorturifilter" << "kurisearchfilter" << "localdomainurifilter"; - - // URI that should require no filtering - filter( "http://www.kde.org", "http://www.kde.org", KURIFilterData::NET_PROTOCOL ); - filter( "http://www.kde.org/developer//index.html", "http://www.kde.org/developer//index.html", KURIFilterData::NET_PROTOCOL ); - // URL with reference - filter( "http://www.kde.org/index.html#q8", "http://www.kde.org/index.html#q8", KURIFilterData::NET_PROTOCOL ); - // local file with reference - filter( "file:/etc/passwd#q8", "file:///etc/passwd#q8", KURIFilterData::LOCAL_FILE ); - filter( "file:///etc/passwd#q8", "file:///etc/passwd#q8", KURIFilterData::LOCAL_FILE ); - filter( "/etc/passwd#q8", "file:///etc/passwd#q8", KURIFilterData::LOCAL_FILE ); - // local file with query (can be used by javascript) - filter( "file:/etc/passwd?foo=bar", "file:///etc/passwd?foo=bar", KURIFilterData::LOCAL_FILE ); - testLocalFile( "/tmp/kurifiltertest?foo" ); // local file with ? in the name (#58990) - testLocalFile( "/tmp/kurlfiltertest#foo" ); // local file with '#' in the name - testLocalFile( "/tmp/kurlfiltertest#foo?bar" ); // local file with both - testLocalFile( "/tmp/kurlfiltertest?foo#bar" ); // local file with both, the other way round - - // hostnames are lowercased by KURL - filter( "http://www.myDomain.commyPort/ViewObjectRes//Default:name=hello", - "http://www.mydomain.commyport/ViewObjectRes//Default:name=hello", KURIFilterData::NET_PROTOCOL); - filter( "ftp://ftp.kde.org", "ftp://ftp.kde.org", KURIFilterData::NET_PROTOCOL ); - filter( "ftp://username@ftp.kde.org:500", "ftp://username@ftp.kde.org:500", KURIFilterData::NET_PROTOCOL ); - - // ShortURI/LocalDomain filter tests. NOTE: any of these tests can fail - // if you have specified your own patterns in kshorturifilterrc. For - // examples, see $TDEDIR/share/config/kshorturifilterrc . - filter( "linuxtoday.com", "http://linuxtoday.com", KURIFilterData::NET_PROTOCOL ); - filter( "LINUXTODAY.COM", "http://linuxtoday.com", KURIFilterData::NET_PROTOCOL ); - filter( "kde.org", "http://kde.org", KURIFilterData::NET_PROTOCOL ); - filter( "ftp.kde.org", "ftp://ftp.kde.org", KURIFilterData::NET_PROTOCOL ); - filter( "ftp.kde.org:21", "ftp://ftp.kde.org:21", KURIFilterData::NET_PROTOCOL ); - filter( "cr.yp.to", "http://cr.yp.to", KURIFilterData::NET_PROTOCOL ); - filter( "user@192.168.1.0:3128", "http://user@192.168.1.0:3128", KURIFilterData::NET_PROTOCOL ); - filter( "127.0.0.1", "http://127.0.0.1", KURIFilterData::NET_PROTOCOL ); - filter( "127.0.0.1:3128", "http://127.0.0.1:3128", KURIFilterData::NET_PROTOCOL ); - filter( "foo@bar.com", "mailto:foo@bar.com", KURIFilterData::NET_PROTOCOL ); - filter( "firstname.lastname@x.foo.bar", "mailto:firstname.lastname@x.foo.bar", KURIFilterData::NET_PROTOCOL ); - filter( "www.123.foo", "http://www.123.foo", KURIFilterData::NET_PROTOCOL ); - filter( "user@www.123.foo:3128", "http://user@www.123.foo:3128", KURIFilterData::NET_PROTOCOL ); - - // Exotic IPv4 address formats... - filter( "127.1", "http://127.1", KURIFilterData::NET_PROTOCOL ); - filter( "127.0.1", "http://127.0.1", KURIFilterData::NET_PROTOCOL ); - - // Local domain filter - If you uncomment these test, make sure you - // you adjust it based on the localhost entry in your /etc/hosts file. - // filter( "localhost:3128", "http://localhost.localdomain:3128", KURIFilterData::NET_PROTOCOL ); - // filter( "localhost", "http://localhost.localdomain", KURIFilterData::NET_PROTOCOL ); - // filter( "localhost/~blah", "http://localhost.localdomain/~blah", KURIFilterData::NET_PROTOCOL ); - - filter( "/", "/", KURIFilterData::LOCAL_DIR ); - filter( "/", "/", KURIFilterData::LOCAL_DIR, "kshorturifilter" ); - filter( "~/.bashrc", TQDir::homeDirPath().local8Bit()+"/.bashrc", KURIFilterData::LOCAL_FILE, "kshorturifilter" ); - filter( "~", TQDir::homeDirPath().local8Bit(), KURIFilterData::LOCAL_DIR, "kshorturifilter", "/tmp" ); - filter( "~foobar", 0, KURIFilterData::ERROR, "kshorturifilter" ); - filter( "user@host.domain", "mailto:user@host.domain", KURIFilterData::NET_PROTOCOL ); // new in KDE-3.2 - - // Windows style SMB (UNC) URL. Should be converted into the valid smb format... - filter( "\\\\mainserver\\share\\file", "smb://mainserver/share/file" , KURIFilterData::NET_PROTOCOL ); - - // Should not be filtered at all. All valid protocols of this form will be ignored. - filter( "ftp:" , "ftp:", KURIFilterData::UNKNOWN ); - filter( "http:" , "http:", KURIFilterData::UNKNOWN ); - - /* - Automatic searching tests. NOTE: If the Default search engine is set to 'None', - this stuff will fail as the status returned will then be KURIFilterData::UNKNOWN. - */ - filter( "gg:", 0 , KURIFilterData::NET_PROTOCOL ); - filter( "KDE", 0 , KURIFilterData::NET_PROTOCOL ); - filter( "FTP", 0 , KURIFilterData::NET_PROTOCOL ); - - // If your default search engine is set to 'Google', you can uncomment the test below. - filter( "gg:", "http://www.google.com/search?q=gg%3A&ie=UTF-8&oe=UTF-8", KURIFilterData::NET_PROTOCOL ); - filter( "KDE", "http://www.google.com/search?q=KDE&ie=UTF-8&oe=UTF-8", KURIFilterData::NET_PROTOCOL ); - filter( "FTP", "http://www.google.com/search?q=FTP&ie=UTF-8&oe=UTF-8", KURIFilterData::NET_PROTOCOL ); - - // Typing 'cp' or any other valid unix command in konq's location bar should result in - // a search using the default search engine - // 'ls' is a bit of a special case though, due to the toplevel domain called 'ls' - filter( "cp", "http://www.google.com/search?q=cp&ie=UTF-8&oe=UTF-8", KURIFilterData::NET_PROTOCOL, - TQStringList(), 0, false /* don't check for executables, see konq_misc.cc */ ); - - // Executable tests - No IKWS in minicli - filter( "cp", "cp", KURIFilterData::EXECUTABLE, minicliFilters ); - filter( "kfmclient", "kfmclient", KURIFilterData::EXECUTABLE, minicliFilters ); - filter( "xwininfo", "xwininfo", KURIFilterData::EXECUTABLE, minicliFilters ); - filter( "KDE", "KDE", NO_FILTERING, minicliFilters ); - filter( "I/dont/exist", "I/dont/exist", NO_FILTERING, minicliFilters ); - filter( "/I/dont/exist", 0, KURIFilterData::ERROR, minicliFilters ); - filter( "/I/dont/exist#a", 0, KURIFilterData::ERROR, minicliFilters ); - filter( "kfmclient --help", "kfmclient --help", KURIFilterData::EXECUTABLE, minicliFilters ); // the args are in argsAndOptions() - filter( "/usr/bin/gs", "/usr/bin/gs", KURIFilterData::EXECUTABLE, minicliFilters ); - filter( "/usr/bin/gs -q -option arg1", "/usr/bin/gs -q -option arg1", KURIFilterData::EXECUTABLE, minicliFilters ); // the args are in argsAndOptions() - - // ENVIRONMENT variable - setenv( "SOMEVAR", "/somevar", 0 ); - setenv( "ETC", "/etc", 0 ); - - TQCString qtdir=getenv("QTDIR"); - TQCString home = getenv("HOME"); - TQCString tdehome = getenv("TDEHOME"); - - filter( "$SOMEVAR/tdelibs/kio", 0, KURIFilterData::ERROR ); // note: this dir doesn't exist... - filter( "$ETC/passwd", "/etc/passwd", KURIFilterData::LOCAL_FILE ); - filter( "$QTDIR/doc/html/functions.html#s", TQCString("file://")+qtdir+"/doc/html/functions.html#s", KURIFilterData::LOCAL_FILE ); - filter( "http://www.kde.org/$USER", "http://www.kde.org/$USER", KURIFilterData::NET_PROTOCOL ); // no expansion - - // Assume the default (~/.trinity) if - if (tdehome.isEmpty()) - { - tdehome += "$HOME/.trinity"; - setenv("TDEHOME", tdehome.data(), 0); - } - - filter( "$TDEHOME/share", tdehome+"/share", KURIFilterData::LOCAL_DIR ); - KStandardDirs::makeDir( tdehome+"/a+plus" ); - filter( "$TDEHOME/a+plus", tdehome+"/a+plus", KURIFilterData::LOCAL_DIR ); - - // BR 27788 - KStandardDirs::makeDir( tdehome+"/share/Dir With Space" ); - filter( "$TDEHOME/share/Dir With Space", tdehome+"/share/Dir With Space", KURIFilterData::LOCAL_DIR ); - - // support for name filters (BR 93825) - filter( "$TDEHOME/*.txt", tdehome+"/*.txt", KURIFilterData::LOCAL_DIR ); - filter( "$TDEHOME/[a-b]*.txt", tdehome+"/[a-b]*.txt", KURIFilterData::LOCAL_DIR ); - filter( "$TDEHOME/a?c.txt", tdehome+"/a?c.txt", KURIFilterData::LOCAL_DIR ); - filter( "$TDEHOME/?c.txt", tdehome+"/?c.txt", KURIFilterData::LOCAL_DIR ); - // but let's check that a directory with * in the name still works - KStandardDirs::makeDir( tdehome+"/share/Dir*With*Stars" ); - filter( "$TDEHOME/share/Dir*With*Stars", tdehome+"/share/Dir*With*Stars", KURIFilterData::LOCAL_DIR ); - KStandardDirs::makeDir( tdehome+"/share/Dir?QuestionMark" ); - filter( "$TDEHOME/share/Dir?QuestionMark", tdehome+"/share/Dir?QuestionMark", KURIFilterData::LOCAL_DIR ); - KStandardDirs::makeDir( tdehome+"/share/Dir[Bracket" ); - filter( "$TDEHOME/share/Dir[Bracket", tdehome+"/share/Dir[Bracket", KURIFilterData::LOCAL_DIR ); - - filter( "$HOME/$TDEDIR/tdebase/kcontrol/ebrowsing", 0, KURIFilterData::ERROR ); - filter( "$1/$2/$3", "http://www.google.com/search?q=$1/$2/$3&ie=UTF-8&oe=UTF-8", KURIFilterData::NET_PROTOCOL ); // can be used as bogus or valid test. Currently triggers default search, i.e. google - filter( "$$$$", "http://www.google.com/search?q=$$$$&ie=UTF-8&oe=UTF-8", KURIFilterData::NET_PROTOCOL ); // worst case scenarios. - - // Replaced the match testing with a 0 since - // the shortURI filter will return the string - // itself if the requested environment variable - // is not already set. - filter( "$QTDIR", 0, KURIFilterData::LOCAL_DIR, "kshorturifilter" ); //use specific filter. - filter( "$HOME", home, KURIFilterData::LOCAL_DIR, "kshorturifilter" ); //use specific filter. - - - TQCString sc; - filter( sc.sprintf("gg%cfoo bar",delimiter), "http://www.google.com/search?q=foo+bar&ie=UTF-8&oe=UTF-8", KURIFilterData::NET_PROTOCOL ); - filter( sc.sprintf("bug%c55798", delimiter), "http://bugs.kde.org/show_bug.cgi?id=55798", KURIFilterData::NET_PROTOCOL ); - - filter( sc.sprintf("gg%cC++", delimiter), "http://www.google.com/search?q=C%2B%2B&ie=UTF-8&oe=UTF-8", KURIFilterData::NET_PROTOCOL ); - filter( sc.sprintf("ya%cfoo bar was here", delimiter), 0, -1 ); // this triggers default search, i.e. google - filter( sc.sprintf("gg%cwww.kde.org", delimiter), "http://www.google.com/search?q=www.kde.org&ie=UTF-8&oe=UTF-8", KURIFilterData::NET_PROTOCOL ); - filter( sc.sprintf("av%c+rock +sample", delimiter), "http://www.altavista.com/cgi-bin/query?pg=q&kl=XX&stype=stext&q=%2Brock+%2Bsample", KURIFilterData::NET_PROTOCOL ); - filter( sc.sprintf("gg%cé", delimiter) /*eaccent in utf8*/, "http://www.google.com/search?q=%C3%A9&ie=UTF-8&oe=UTF-8", KURIFilterData::NET_PROTOCOL ); - filter( sc.sprintf("gg%cпрйвет", delimiter) /* greetings in russian utf-8*/, "http://www.google.com/search?q=%D0%BF%D1%80%D0%B9%D0%B2%D0%B5%D1%82&ie=UTF-8&oe=UTF-8", KURIFilterData::NET_PROTOCOL ); - - // Absolute Path tests for kshorturifilter - filter( "./", tdehome+"/share", KURIFilterData::LOCAL_DIR, "kshorturifilter", tdehome+"/share/" ); // cleanDirPath removes the trailing slash - filter( "../", tdehome, KURIFilterData::LOCAL_DIR, "kshorturifilter", tdehome+"/share" ); - filter( "config", tdehome+"/share/config", KURIFilterData::LOCAL_DIR, "kshorturifilter", tdehome+"/share" ); - - // Clean up - TDEIO::NetAccess::del( tdehome, 0 ); - - kdDebug() << "All tests done. Go home..." << endl; - return 0; -} diff --git a/kio/tests/kurlcompletiontest.cpp b/kio/tests/kurlcompletiontest.cpp deleted file mode 100644 index c8dc99595..000000000 --- a/kio/tests/kurlcompletiontest.cpp +++ /dev/null @@ -1,189 +0,0 @@ -/* - * Copyright (C) 2004 David Faure - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License version 2 as published by the Free Software Foundation; - * - * This library 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 - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public License - * along with this library; see the file COPYING.LIB. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -class KURLCompletionTest -{ -public: - KURLCompletionTest() {} - ~KURLCompletionTest() { teardown(); } - void setup( bool setDirAsURL ); - void teardown(); - void testLocalRelativePath(); - void testLocalAbsolutePath(); - void testLocalURL(); - -private: - void waitForCompletion(); - KURLCompletion* m_completion; - KTempDir* m_tempDir; - KURL m_dirURL; - TQString m_dir; -}; - -void KURLCompletionTest::setup( bool setDirAsURL ) -{ - kdDebug() << k_funcinfo << endl; - m_completion = new KURLCompletion; - m_tempDir = new KTempDir; - m_tempDir->setAutoDelete( true ); - m_dir = m_tempDir->name(); - kdDebug() << "m_dir=" << m_dir << endl; - Q_ASSERT( m_dir.endsWith( "/" ) ); - if ( setDirAsURL ) { - KURL d; d.setPath( m_dir ); - m_completion->setDir( d.url() ); - } else { - m_completion->setDir( m_dir ); - } - m_dirURL.setPath( m_dir ); - - TQFile f1( m_dir + "/file1" ); - bool ok = f1.open( IO_WriteOnly ); - assert( ok ); - f1.close(); - - TQFile f2( m_dir + "/file#a" ); - ok = f2.open( IO_WriteOnly ); - assert( ok ); - f2.close(); -} - -void KURLCompletionTest::teardown() -{ - delete m_completion; - m_completion = 0; - delete m_tempDir; - m_tempDir = 0; -} -void KURLCompletionTest::waitForCompletion() -{ - while ( m_completion->isRunning() ) { - kdDebug() << "waiting for thread..." << endl; - usleep( 10 ); - } -} - -void KURLCompletionTest::testLocalRelativePath() -{ - kdDebug() << k_funcinfo << endl; - // Completion from relative path, with two matches - m_completion->makeCompletion( "f" ); - waitForCompletion(); - TQStringList comp1all = m_completion->allMatches(); - assert( comp1all.count() == 2 ); - assert( comp1all.find( "file1" ) != comp1all.end() ); - assert( comp1all.find( "file#a" ) != comp1all.end() ); - TQString comp1 = m_completion->replacedPath( "file1" ); // like KURLRequester does - assert( comp1 == "file1" ); - - // Completion from relative path - kdDebug() << endl << k_funcinfo << "now completing on 'file#'" << endl; - m_completion->makeCompletion( "file#" ); - waitForCompletion(); - TQStringList compall = m_completion->allMatches(); - kdDebug() << compall << endl; - assert( compall.count() == 1 ); - assert( compall.first() == "file#a" ); - TQString comp2 = m_completion->replacedPath( compall.first() ); // like KURLRequester does - assert( comp2 == "file#a" ); -} - -void KURLCompletionTest::testLocalAbsolutePath() -{ - // Completion from absolute path - kdDebug() << k_funcinfo << m_dir+"file#" << endl; - m_completion->makeCompletion( m_dir + "file#" ); - waitForCompletion(); - TQStringList compall = m_completion->allMatches(); - kdDebug() << compall << endl; - assert( compall.count() == 1 ); - TQString comp = compall.first(); - assert( comp == m_dir + "file#a" ); - comp = m_completion->replacedPath( comp ); // like KURLRequester does - assert( comp == m_dir + "file#a" ); -} - -void KURLCompletionTest::testLocalURL() -{ - // Completion from URL - kdDebug() << k_funcinfo << endl; - KURL url = KURL::fromPathOrURL( m_dirURL.path() + "file" ); - m_completion->makeCompletion( url.prettyURL() ); - waitForCompletion(); - TQStringList comp1all = m_completion->allMatches(); - kdDebug() << comp1all << endl; - assert( comp1all.count() == 2 ); - assert( comp1all.find( m_dirURL.url() + "file1" ) != comp1all.end() ); - TQString filehash = m_dirURL.url() + "file%23a"; - assert( comp1all.find( filehash ) != comp1all.end() ); - TQString filehashPath = m_completion->replacedPath( filehash ); // note that it returns a path!! - kdDebug() << filehashPath << endl; - assert( filehashPath == m_dirURL.path() + "file#a" ); - - // Completion from URL with no match - url = KURL::fromPathOrURL( m_dirURL.path() + "foobar" ); - kdDebug() << k_funcinfo << "makeCompletion(" << url << ")" << endl; - TQString comp2 = m_completion->makeCompletion( url.prettyURL() ); - assert( comp2.isEmpty() ); - waitForCompletion(); - assert( m_completion->allMatches().isEmpty() ); - - // Completion from URL with a ref -> no match - url = KURL::fromPathOrURL( m_dirURL.path() + "f" ); - url.setRef( "ref" ); - kdDebug() << k_funcinfo << "makeCompletion(" << url << ")" << endl; - m_completion->makeCompletion( url.prettyURL() ); - waitForCompletion(); - assert( m_completion->allMatches().isEmpty() ); -} - -int main( int argc, char **argv ) -{ - TDEApplication::disableAutoDcopRegistration(); - TDECmdLineArgs::init(argc,argv,"kurlcompletiontest", 0, 0, 0, 0); - TDEApplication app; - - { - KURLCompletionTest test; - test.setup( false ); - test.testLocalRelativePath(); - test.testLocalAbsolutePath(); - test.testLocalURL(); - test.teardown(); - - // Try again, with another KTempDir (to check that the caching doesn't give us wrong results) - test.setup( true ); - test.testLocalRelativePath(); - test.testLocalAbsolutePath(); - test.testLocalURL(); - test.teardown(); - } - tqDebug( "All tests OK." ); - - return 0; -} diff --git a/kio/tests/kziptest.cpp b/kio/tests/kziptest.cpp deleted file mode 100644 index 84d38d134..000000000 --- a/kio/tests/kziptest.cpp +++ /dev/null @@ -1,435 +0,0 @@ -/* - * Copyright (C) 2002, 2003 David Faure - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License version 2 as published by the Free Software Foundation; - * - * This library 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 - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public License - * along with this library; see the file COPYING.LIB. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - */ - -#include "kzip.h" -#include -#include -#include -#include - -#include - -void recursive_print( const KArchiveDirectory * dir, const TQString & path ) -{ - TQStringList l = dir->entries(); - TQStringList::Iterator it = l.begin(); - for( ; it != l.end(); ++it ) - { - const KArchiveEntry* entry = dir->entry( (*it) ); - printf("mode=%07o %s %s size: %d pos: %d %s%s isdir=%d%s", entry->permissions(), - entry->user().latin1(), entry->group().latin1(), - entry->isDirectory() ? 0 : ((KArchiveFile*)entry)->size(), - entry->isDirectory() ? 0 : ((KArchiveFile*)entry)->position(), - path.latin1(), (*it).latin1(), entry->isDirectory(), - !entry->symlink() ? "" : TQString(" symlink: %1").arg(entry->symlink()).latin1() ); - -// if (!entry->isDirectory()) printf("%d", ((KArchiveFile*)entry)->size()); - printf("\n"); - if (entry->isDirectory()) - recursive_print( (KArchiveDirectory *)entry, path+(*it)+"/" ); - } -} - - -void recursive_transfer(const KArchiveDirectory * dir, - const TQString & path, KZip * zip) -{ - TQStringList l = dir->entries(); - TQStringList::Iterator it = l.begin(); - for( ; it != l.end(); ++it ) - { - const KArchiveEntry* e = dir->entry( (*it) ); - kdDebug() << "actual file: " << e->name() << endl; - if (e->isFile()) - { - Q_ASSERT( e && e->isFile() ); - const KArchiveFile* f = (KArchiveFile*)e; - printf("FILE=%s\n", e->name().latin1()); - - TQByteArray arr( f->data() ); - printf("SIZE=%i\n",arr.size() ); - TQString str( arr ); - printf("DATA=%s\n", str.latin1()); - - if (e->symlink().isEmpty()) { - zip->writeFile( path+e->name().latin1(), - "holgi", "holgrp", - arr.size() , f->data() ); - } else - zip->writeSymLink(path+e->name(), e->symlink(), "leo", "leo", - 0120777, 1000000000l, 1000000000l, 1000000000l); - } - else if (e->isDirectory()) - { - recursive_transfer((KArchiveDirectory *)e , - path+e->name()+"/", zip); - } - } -} - -int main( int argc, char** argv ) -{ - if (argc < 3) - { - printf("\n" - " Usage :\n" - " ./kziptest list /path/to/existing_file.zip tests listing an existing zip\n" - " ./kziptest readwrite newfile.zip will create the zip, then close and reopen it.\n" - " ./kziptest maxlength newfile.zip tests the maximum filename length allowed.\n" - " ./kziptest print file.zip prints contents of all files.\n" - " ./kziptest print2 file.zip filename prints contents of one file.\n" - " ./kziptest update file.zip filename updates contents of one file.\n" - " ./kziptest transfer file.zip newfile.zip complete transfer.\n" - " ./kziptest iodevice /path/to/existing_file.zip tests KArchiveFile::device()\n"); - return 1; - } - TDEInstance instance("kziptest"); - TQString command = argv[1]; - if ( command == "list" ) - { - KZip zip( argv[2] ); - - if ( !zip.open( IO_ReadOnly ) ) - { - printf("Could not open %s for reading\n", argv[2] ); - return 1; - } - - const KArchiveDirectory* dir = zip.directory(); - - //printf("calling recursive_print\n"); - recursive_print( dir, "" ); - //printf("recursive_print called\n"); - - zip.close(); - - return 0; - } - else if (command == "readwrite" ) - { - KZip zip( argv[2] ); - - if ( !zip.open( IO_WriteOnly ) ) - { - printf("Could not open %s for writing\n", argv[2]); - return 1; - } - - zip.setCompression( KZip::NoCompression ); - zip.writeFile( "typeid", "", "", 19, "application/x-kword" ); - zip.setCompression( KZip::DeflateCompression ); - zip.writeFile( "empty", "weis", "users", 0, "" ); - zip.writeFile( "test1", "weis", "users", 5, "Hallo" ); - zip.writeFile( "test2", "weis", "users", 8, "Hallo Du" ); - zip.writeFile( "mydir/test3", "weis", "users", 13, "Noch so einer" ); - zip.writeFile( "my/dir/test3", "dfaure", "hackers", 29, "I don't speak German (David)" ); - zip.writeSymLink( "a_link", "mydir/test3", "leo", "leo", 0120777, - 1000000000l, 1000000000l, 1000000000l); - -#define SIZE1 100 - // Now a medium file : 100 null bytes - char medium[ SIZE1 ]; - memset( medium, 0, SIZE1 ); - zip.writeFile( "mediumfile", "user", "group", SIZE1, medium ); - // Another one, with an absolute path - zip.writeFile( "/dir/subdir/mediumfile2", "user", "group", SIZE1, medium ); - - // Now a huge file : 20000 null bytes - int n = 20000; - char * huge = new char[ n ]; - memset( huge, 0, n ); - zip.writeFile( "hugefile", "user", "group", n, huge ); - delete [] huge; - - // Now a file from the harddisk - zip.addLocalFile( ".libs/lt-kziptest", "lt-kziptest" ); - - printf( "calling close\n" ); - - zip.close(); - - printf("-----------------------\n"); - - if ( !zip.open( IO_ReadOnly ) ) - { - printf("Could not open %s for reading\n", argv[2] ); - return 1; - } - - const KArchiveDirectory* dir = zip.directory(); - recursive_print(dir, ""); - - const KArchiveEntry* e = dir->entry( "mydir/test3" ); - Q_ASSERT( e && e->isFile() ); - const KArchiveFile* f = (KArchiveFile*)e; - - TQByteArray arr( f->data() ); - Q_ASSERT( arr.size() == 13 ); - printf("SIZE=%i\n",arr.size() ); - TQString str( arr ); - Q_ASSERT( str == "Noch so einer" ); - printf("DATA=%s\n", str.latin1()); - - e = dir->entry( "mediumfile" ); - Q_ASSERT( e && e->isFile() ); - f = (KArchiveFile*)e; - Q_ASSERT( f->data().size() == SIZE1 ); - - e = dir->entry( "hugefile" ); - Q_ASSERT( e && e->isFile() ); - f = (KArchiveFile*)e; - Q_ASSERT( f->data().size() == 20000 ); - - zip.close(); - - return 0; - } - else if ( command == "maxlength" ) - { - KZip zip( argv[2] ); - - if ( !zip.open( IO_WriteOnly ) ) - { - printf("Could not open %s for writing\n", argv[2]); - return 1; - } - // Generate long filenames of each possible length bigger than 98... - for (int i = 98; i < 500 ; i++ ) - { - TQString str, num; - str.fill( 'a', i-10 ); - num.setNum( i ); - num = num.rightJustify( 10, '0' ); - zip.writeFile( str+num, "testu", "testg", 3, "hum" ); - } - // Result of this test : it fails at 482 (instead of 154 previously). - // Ok, I think we can do with that :) - zip.close(); - printf("Now run 'unzip -l %s'\n", argv[2]); - return 0; - } - else if ( command == "iodevice" ) - { - KZip zip( argv[2] ); - if ( !zip.open( IO_ReadOnly ) ) - return 1; - const KArchiveDirectory* dir = zip.directory(); - assert(dir); - const KArchiveEntry* entry = dir->entry( "my/dir/test3" ); - if ( entry && entry->isFile() ) - { - TQIODevice *dev = static_cast(entry)->device(); - if ( dev ) { - TQByteArray contents = dev->readAll(); - printf("contents='%s'\n", TQCString(contents, contents.size()+1).data()); - } - } else - printf("entry=%p - not found if 0, otherwise not a file\n", (void*)entry); - return 0; - } - else if (command == "print" ) - { - KZip zip( argv[2] ); - kdDebug() << "Opening zip file" << endl; - if ( !zip.open( IO_ReadOnly ) ) - { - printf("Could not open %s for reading\n", argv[2] ); - return 1; - } - const KArchiveDirectory* dir = zip.directory(); - kdDebug() << "Listing toplevel of zip file" << endl; - TQStringList l = dir->entries(); - TQStringList::Iterator it = l.begin(); - for( ; it != l.end(); ++it ) - { - const KArchiveEntry* e = dir->entry( (*it) ); - kdDebug() << "Printing " << (*it) << endl; - if (e->isFile()) - { - Q_ASSERT( e && e->isFile() ); - const KArchiveFile* f = (KArchiveFile*)e; - - TQByteArray arr( f->data() ); - printf("SIZE=%i\n",arr.size() ); - TQString str( arr ); - printf("DATA=%s\n", str.latin1()); - } - } - zip.close(); - return 0; - } - else if (command == "print2" ) - { - if (argc != 4) - { - printf("usage: kziptest print2 archivename filename"); - return 1; - } - KZip zip( argv[2] ); - if ( !zip.open( IO_ReadOnly ) ) - { - printf("Could not open %s for reading\n", argv[2] ); - return 1; - } - const KArchiveDirectory* dir = zip.directory(); - const KArchiveEntry* e = dir->entry( argv[3] ); - Q_ASSERT( e && e->isFile() ); - const KArchiveFile* f = (KArchiveFile*)e; - - TQByteArray arr( f->data() ); - printf("SIZE=%i\n",arr.size() ); - TQString str( arr ); -// printf("DATA=%s\n", str.latin1()); - printf("%s", str.latin1()); - zip.close(); - - return 0; - - } - else if (command == "update" ) - { - if (argc != 4) - { - printf("usage: kziptest update archivename filename"); - return 1; - } - KZip zip( argv[2] ); - if ( !zip.open( IO_ReadWrite ) ) - { - printf("Could not open %s for read/write\n", argv[2] ); - return 1; - } - const KArchiveEntry* e = zip.directory()->entry( argv[3] ); -// Q_ASSERT( e && e->isFile() ); -// const KArchiveFile* f = (KArchiveFile*)e; - -// TQCString data( "This is some new data that goes into " ); - // data += argv[3]; - TQFile f ( argv[3] ); - if (!f.open( IO_ReadOnly )) - { - printf("Could not open %s for reading\n", argv[2] ); - return 1; - } - - TQDataStream s( &f ); - - -// zip.writeFile( argv[3], "", "", data.size(), data.data() ); - zip.writeFile( argv[3], "", "", f.size(), f.readAll() ); - zip.close(); - - return 0; - - } - else if (command == "transfer" ) - { - if (argc != 4) - { - printf("usage: kziptest transfer sourcefile destfile"); - return 1; - } - KZip zip1( argv[2] ); - KZip zip2( argv[3] ); - if ( !zip1.open( IO_ReadOnly ) ) - { - printf("Could not open %s for reading\n", argv[2] ); - return 1; - } - if ( !zip2.open( IO_WriteOnly ) ) - { - printf("Could not open %s for writing\n", argv[3] ); - return 1; - } - const KArchiveDirectory* dir1 = zip1.directory(); - - recursive_transfer(dir1, "", &zip2 ); - - zip1.close(); - zip2.close(); - -/* - zip.writeFile( "empty", "weis", "users", 0, "" ); - zip.writeFile( "test1", "weis", "users", 5, "Hallo" ); - zip.writeFile( "test2", "weis", "users", 8, "Hallo Du" ); - zip.writeFile( "mydir/test3", "weis", "users", 13, "Noch so einer" ); - zip.writeFile( "my/dir/test3", "dfaure", "hackers", 29, "I don't speak German (David)" ); - -#define SIZE1 100 - // Now a medium file : 100 null bytes - char medium[ SIZE1 ]; - memset( medium, 0, SIZE1 ); - zip.writeFile( "mediumfile", "user", "group", SIZE1, medium ); - // Another one, with an absolute path - zip.writeFile( "/dir/subdir/mediumfile2", "user", "group", SIZE1, medium ); - - // Now a huge file : 20000 null bytes - int n = 20000; - char * huge = new char[ n ]; - memset( huge, 0, n ); - zip.writeFile( "hugefile", "user", "group", n, huge ); - delete [] huge; - - zip.close(); - - printf("-----------------------\n"); - - if ( !zip.open( IO_ReadOnly ) ) - { - printf("Could not open %s for reading\n", argv[2] ); - return 1; - } - - const KArchiveDirectory* dir = zip.directory(); - recursive_print(dir, ""); - - const KArchiveEntry* e = dir->entry( "mydir/test3" ); - Q_ASSERT( e && e->isFile() ); - const KArchiveFile* f = (KArchiveFile*)e; - - TQByteArray arr( f->data() ); - printf("SIZE=%i\n",arr.size() ); - TQString str( arr ); - printf("DATA=%s\n", str.latin1()); - - zip.close(); - - return 0; - - - - - - const KArchiveEntry* e = dir1->entry( argv[3] ); - Q_ASSERT( e && e->isFile() ); - const KArchiveFile* f = (KArchiveFile*)e; - - TQByteArray arr( f->data() ); -// printf("SIZE=%i\n",arr.size() ); - TQString str( arr ); -// printf("DATA=%s\n", str.latin1()); - printf("%s", str.latin1()); - zip.close(); - -*/ - return 0; - - } - else - printf("Unknown command\n"); -} diff --git a/kio/tests/metatest.cpp b/kio/tests/metatest.cpp deleted file mode 100644 index 034d740ed..000000000 --- a/kio/tests/metatest.cpp +++ /dev/null @@ -1,321 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include -#include - -#define I18N_NOOP - - static KCmdLineOptions options[] = - { - { "+file", "File name", 0 }, - { "addgroup ", "Add a group to a file", 0}, - { "removegroup ", "Remove a group from a file", 0}, - { "removeitem ", "Remove the item from --group from a file", 0}, - { "group ", "Specify a group to work on", 0}, - { "validator", "Create a validator for an item and show its class", 0}, - { "item ", "Specify an item to work on", 0}, - { "add ", "Add the --item to the --group and set the value", 0}, - { "autogroupadd", "Automatically add a group if none is found", 0}, - { "set ", "Set the value of --item in --group", 0}, - { "groups", "list the groups of this file", 0 }, - { "mimetypeinfo ", "the mimetype info for a mimetype", 0 }, - KCmdLineLastOption - }; - -void printKeyValues(KFileMetaInfo& info) -{ - TQStringList l = info.preferredKeys(); - kdDebug() << "found " << l.size() << " keys\n"; - - TQString s; - TQStringList::Iterator it; - for (it = l.begin(); it!=l.end(); ++it) - { - s +=" - " + *it; - } - kdDebug() << "keys: " << s << endl; - - for (it = l.begin(); it!=l.end(); ++it) - { - KFileMetaInfoItem item = info.item(*it); - if ( item.isValid() && item.value().canCast(TQVariant::String)) { - kdDebug() << item.key() << "(" << item.translatedKey() << ") -> " - << item.string() << endl; - } - } -} - -void printMimeTypeInfo(TQString mimetype) -{ - const KFileMimeTypeInfo* info = KFileMetaInfoProvider::self()->mimeTypeInfo(mimetype); - - if (!info) return; - kdDebug() << "Preferred groups:\n"; - kdDebug() << "=================\n"; - TQStringList groups = info->preferredGroups(); - - for (TQStringList::Iterator it=groups.begin() ; it!=groups.end(); ++it) - { - kdDebug() << *it << endl; - } - - kdDebug() << endl; - kdDebug() << "Supported groups:\n"; - kdDebug() << "=================\n"; - groups = info->supportedGroups(); - for (TQStringList::Iterator it=groups.begin() ; it!=groups.end(); ++it) - { - kdDebug() << *it << endl; - } - - for (TQStringList::Iterator it=groups.begin() ; it!=groups.end(); ++it) - { - const KFileMimeTypeInfo::GroupInfo* groupinfo = info->groupInfo(*it); - - kdDebug() << endl; - kdDebug() << "Group \"" << *it << "\"\n"; - kdDebug() << "==================\n"; - - if (!groupinfo) kdDebug() << "argh! no group info\n"; - - kdDebug() << endl; - kdDebug() << " Supported keys:\n"; - TQStringList keys = groupinfo->supportedKeys(); - if (!keys.count()) kdDebug() << " none\n"; - for (TQStringList::Iterator kit=keys.begin(); kit!=keys.end(); ++kit) - { - kdDebug() << " " << *kit << endl; - - const KFileMimeTypeInfo::ItemInfo* iti = groupinfo->itemInfo(*kit); - kdDebug() << " Key: " << iti->key() << endl; - kdDebug() << " Translated: " << iti->key() << endl; - kdDebug() << " Type: " << TQVariant::typeToName(iti->type()) << endl; - kdDebug() << " Unit: " << iti->unit() << endl; - kdDebug() << " Hint: " << iti->hint() << endl; - kdDebug() << " Attributes: " << iti->attributes() << endl; - kdDebug() << " Prefix: " << iti->prefix() << endl; - kdDebug() << " Suffix: " << iti->suffix() << endl; - } - - kdDebug() << " name: " << groupinfo->name() << endl; - kdDebug() << " translated: " << groupinfo->translatedName() << endl; - kdDebug() << " attributes: " << groupinfo->attributes() << endl; - kdDebug() << " variable keys: " << (groupinfo->supportsVariableKeys() ? "Yes" : "No") << endl; - if (groupinfo->supportsVariableKeys()) - { - const KFileMimeTypeInfo::ItemInfo* iti = groupinfo->variableItemInfo(); - kdDebug() << " variable key type/attr: " << TQVariant::typeToName(iti->type()) << " / " << iti->attributes() << endl; - } - } - - kdDebug() << endl; - kdDebug() << "Preferred keys:\n"; - kdDebug() << "===============\n"; - TQStringList prefKeys = info->preferredKeys(); - if (!prefKeys.count()) kdDebug() << " none\n"; - for (TQStringList::Iterator kit=prefKeys.begin(); kit!=prefKeys.end(); ++kit) - { - kdDebug() << *kit << endl; - } - - kdDebug() << endl; - kdDebug() << "Supported keys:\n"; - kdDebug() << "===============\n"; - TQStringList supKeys = info->supportedKeys(); - if (!supKeys.count()) kdDebug() << " none\n"; - for (TQStringList::Iterator kit=supKeys.begin(); kit!=supKeys.end(); ++kit) - { - kdDebug() << *kit << endl; - } -} - -void addGroup(KFileMetaInfo& info, TQString group) -{ - kdDebug() << "trying to add group " << group << endl; - - kdDebug() << "groups before: \n"; - TQStringList groups = info.groups(); - for (TQStringList::Iterator it=groups.begin() ; it!=groups.end(); ++it) - kdDebug() << " " << *it << endl; - - if (info.addGroup(group)) - kdDebug() << "addGroup succeeded\n"; - else - kdDebug() << "addGroup failed\n"; - - kdDebug() << "trying another addGroup to see what happens\n"; - - if (info.addGroup(group)) - kdDebug() << "addGroup succeeded\n"; - else - kdDebug() << "addGroup failed\n"; - - - kdDebug() << "and afterwards: \n"; - groups = info.groups(); - for (TQStringList::Iterator it=groups.begin() ; it!=groups.end(); ++it) - kdDebug() << " " << *it << endl; -} - -void removeGroup(KFileMetaInfo& info, TQString group) -{ - kdDebug() << "trying to remove group " << group << endl; - - kdDebug() << "groups before: \n"; - TQStringList groups = info.groups(); - for (TQStringList::Iterator it=groups.begin() ; it!=groups.end(); ++it) - kdDebug() << " " << *it << endl; - - info.removeGroup(group); - - kdDebug() << "and afterwards: \n"; - groups = info.groups(); - for (TQStringList::Iterator it=groups.begin() ; it!=groups.end(); ++it) - kdDebug() << " " << *it << endl; -} - -int main( int argc, char **argv ) -{ - // Initialize command line args - TDECmdLineArgs::init(argc, argv, "kfilemetatest", "testing kfilmetainfo", "X"); - - // Tell which options are supported - TDECmdLineArgs::addCmdLineOptions( options ); - - // Add options from other components - TDEApplication::addCmdLineOptions(); - - TDEApplication app; - - TDECmdLineArgs* args = TDECmdLineArgs::parsedArgs(); - - TQCString ov; - ov = args->getOption("mimetypeinfo"); - if (ov) - { - printMimeTypeInfo(ov); - return 0; - } - - if (!args->count()) return 1; - - KFileMetaInfo info( args->url(0), TQString::null, KFileMetaInfo::Everything); - - if (args->isSet("groups")) - { - TQStringList groups = info.groups(); - for (TQStringList::Iterator it=groups.begin() ; it!=groups.end(); ++it) - { - kdDebug() << "group " << *it << endl; - } - return 0; - } - - TQString group, item; - - ov = args->getOption("addgroup"); - if (ov) addGroup(info, ov); - - ov = args->getOption("removegroup"); - if (ov) removeGroup(info, ov); - - ov = args->getOption("group"); - if (ov) group = ov; - - ov = args->getOption("item"); - if (ov) item = ov; - - ov = args->getOption("add"); - if (ov && !group.isNull() && !item.isNull()) - { - KFileMetaInfoGroup g = info[group]; - if (!g.isValid() && args->isSet("autogroupadd")) - { - kdDebug() << "group is not there, adding it\n"; - info.addGroup(group); - } - // add the item - KFileMetaInfoItem i = info[group].addItem(item); - if (i.isValid()) - kdDebug() << "additem success\n"; - else - kdDebug() << "additem failed\n"; - - if (i.setValue(ov)) - kdDebug() << "setValue success\n"; - else - kdDebug() << "setValue failed\n"; - } - - ov = args->getOption("set"); - if (ov && !group.isNull() && !item.isNull()) - { - if (info[group][item].setValue(TQString(ov))) - kdDebug() << "setValue success\n"; - else - kdDebug() << "setValue failed\n"; - } - - ov = args->getOption("removeitem"); - if (ov && !group.isNull()) - { - if (info[group].removeItem(ov)) - kdDebug() << "removeitem success\n"; - else - kdDebug() << "removeitem failed\n"; - } - - if (args->isSet("validator") && !group.isNull() && !item.isNull()) - { - const KFileMimeTypeInfo* kfmti = KFileMetaInfoProvider::self()->mimeTypeInfo(info.mimeType()); - TQValidator* v = kfmti->createValidator(group, item); - if (!v) - kdDebug() << "got no validator\n"; - else - { - kdDebug() << "validator is a " << v->className() << endl; - delete v; - } - - } - - kdDebug() << "is it valid?\n"; - - if (!info.isValid()) return 1; - - kdDebug() << "it is!\n"; - - printKeyValues(info); - - - kdDebug() << "========= again after applyChanges() =========\n"; - - info.applyChanges(); - - printKeyValues(info); - - KFileMetaInfoItem thumbitem = info.item(KFileMimeTypeInfo::Thumbnail); -// KFileMetaInfoItem thumbitem = info.item("Thumbnail"); - - if (!thumbitem.isValid()) kdDebug() << "no thumbnail\n"; - else - kdDebug() << "type of thumbnail is " << thumbitem.value().typeName() << endl; - - - if (thumbitem.isValid() && thumbitem.value().canCast(TQVariant::Image)) - { - TQLabel* label = new TQLabel(0); - app.setMainWidget(label); - TQPixmap pix; - pix.convertFromImage(thumbitem.value().toImage()); - label->setPixmap(pix); - label->show(); - app.exec(); - } - - return 0; -} diff --git a/kio/tests/netaccesstest.cpp b/kio/tests/netaccesstest.cpp deleted file mode 100644 index c83f45aae..000000000 --- a/kio/tests/netaccesstest.cpp +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (C) 2004 David Faure - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License version 2 as published by the Free Software Foundation; - * - * This library 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 - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public License - * along with this library; see the file COPYING.LIB. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - */ - -#include -#include -#include -#include -#include - -int main(int argc, char **argv) -{ - TDEApplication app( argc, argv, "netaccesstest", true /* it _has_ a GUI ! */); - - KURL srcURL( "ftp://ftp.kde.org/pub/kde/README" ); - KURL tmpURL( "file:/tmp/netaccesstest_README" ); - - for ( uint i = 0; i < 4 ; ++i ) { - kdDebug() << "file_copy" << endl; - if ( !TDEIO::NetAccess::file_copy(srcURL, tmpURL, -1, true, false, 0) ) - kdError() << "file_copy failed: " << TDEIO::NetAccess::lastErrorString() << endl; - else { - TQFile f( tmpURL.path() ); - if (!f.open(IO_ReadOnly)) - kdFatal() << "Cannot open: " << f.name() << ". The error was: " << f.errorString() << endl; - else { - f.close(); - } - } - } - - return 0; -} - diff --git a/kio/tests/previewtest.cpp b/kio/tests/previewtest.cpp deleted file mode 100644 index 62f6c3d62..000000000 --- a/kio/tests/previewtest.cpp +++ /dev/null @@ -1,64 +0,0 @@ - -#include -#include -#include - -#include -#include -#include - -#include - -#include "previewtest.moc" - -PreviewTest::PreviewTest() - :TQWidget() -{ - TQGridLayout *layout = new TQGridLayout(this, 2, 2); - m_url = new KLineEdit(this); - m_url->setText("/home/malte/gore_bush.jpg"); - layout->addWidget(m_url, 0, 0); - TQPushButton *btn = new TQPushButton("Generate", this); - connect(btn, TQT_SIGNAL(clicked()), TQT_SLOT(slotGenerate())); - layout->addWidget(btn, 0, 1); - m_preview = new TQLabel(this); - m_preview->setMinimumSize(400, 300); - layout->addMultiCellWidget(m_preview, 1, 1, 0, 1); -} - -void PreviewTest::slotGenerate() -{ - KURL::List urls; - urls.append(m_url->text()); - TDEIO::PreviewJob *job = TDEIO::filePreview(urls, m_preview->width(), m_preview->height(), true, 48); - connect(job, TQT_SIGNAL(result(TDEIO::Job*)), TQT_SLOT(slotResult(TDEIO::Job*))); - connect(job, TQT_SIGNAL(gotPreview(const KFileItem *, const TQPixmap &)), TQT_SLOT(slotPreview(const KFileItem *, const TQPixmap &))); - connect(job, TQT_SIGNAL(failed(const KFileItem *)), TQT_SLOT(slotFailed())); -} - -void PreviewTest::slotResult(TDEIO::Job*) -{ - kdDebug() << "PreviewTest::slotResult(...)" << endl; -} - -void PreviewTest::slotPreview(const KFileItem *, const TQPixmap &pix) -{ - kdDebug() << "PreviewTest::slotPreview()" << endl; - m_preview->setPixmap(pix); -} - -void PreviewTest::slotFailed() -{ - kdDebug() << "PreviewTest::slotFailed()" << endl; - m_preview->setText("failed"); -} - -int main(int argc, char **argv) -{ - TDEApplication app(argc, argv, "previewtest"); - PreviewTest *w = new PreviewTest; - w->show(); - app.setMainWidget(w); - return app.exec(); -} - diff --git a/kio/tests/previewtest.h b/kio/tests/previewtest.h deleted file mode 100644 index a749e95a3..000000000 --- a/kio/tests/previewtest.h +++ /dev/null @@ -1,25 +0,0 @@ - -#include -#include - -class KLineEdit; -class TQLabel; -class KFileItem; - -class PreviewTest : public TQWidget -{ - Q_OBJECT -public: - PreviewTest(); - -private slots: - void slotGenerate(); - void slotResult(TDEIO::Job *); - void slotPreview( const KFileItem *, const TQPixmap & ); - void slotFailed(); - -private: - KLineEdit *m_url; - TQLabel *m_preview; -}; - diff --git a/kio/tests/speed.cpp b/kio/tests/speed.cpp deleted file mode 100644 index 44a7d9330..000000000 --- a/kio/tests/speed.cpp +++ /dev/null @@ -1,139 +0,0 @@ -/* - * Copyright (C) 2002, 2003 Stephan Kulow - * Copyright (C) 2003 David Faure - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License version 2 as published by the Free Software Foundation; - * - * This library 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 - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public License - * along with this library; see the file COPYING.LIB. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - */ -#include -#include -#include -#include "speed.h" -#include -#include -#include -#include - -using namespace TDEIO; - -SpeedTest::SpeedTest( const KURL & url ) - : TQObject(0, "speed") -{ - Job *job = listRecursive( url ); - //Job *job = del( KURL("file:" + TQDir::currentDirPath()) ); DANGEROUS ! - connect(job, TQT_SIGNAL( result( TDEIO::Job*)), - TQT_SLOT( finished( TDEIO::Job* ) )); - /*connect(job, TQT_SIGNAL( entries( TDEIO::Job*, const TDEIO::UDSEntryList&)), - TQT_SLOT( entries( TDEIO::Job*, const TDEIO::UDSEntryList&))); - */ -} - -void SpeedTest::entries(TDEIO::Job*, const UDSEntryList& list) { - - UDSEntryListConstIterator it=list.begin(); - for (; it != list.end(); ++it) { - UDSEntry::ConstIterator it2 = (*it).begin(); - for( ; it2 != (*it).end(); it2++ ) { - if ((*it2).m_uds == UDS_NAME) - kdDebug() << ( *it2 ).m_str << endl; - } - } -} - - -void SpeedTest::finished(Job*) { - kdDebug() << "job finished" << endl; - kapp->quit(); -} - -static KCmdLineOptions options[] = -{ - { "+[URL]", "the URL to list", 0 }, - KCmdLineLastOption -}; - -int main(int argc, char **argv) { - - TDECmdLineArgs::init( argc, argv, "speedapp", "A TDEIO::listRecursive testing tool", "0.0" ); - - TDECmdLineArgs::addCmdLineOptions( options ); - - TDEApplication app; - - TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs(); - - KURL url; - if ( args->count() == 1 ) - url = args->url(0); - else - url = "file:" + TQDir::currentDirPath(); - - kdDebug() << url.url() << " is probably " << (TDEIO::probably_slow_mounted(url.path()) ? "slow" : "normal") << " mounted\n"; - kdDebug() << url.url() << " is " << (TDEIO::manually_mounted(url.path()) ? "manually" : "system") << " mounted\n"; - TQString mp = TDEIO::findDeviceMountPoint(url.path()); - if (mp.isEmpty()) { - kdDebug() << "no mount point for device " << url.url() << " found\n"; - } else - kdDebug() << mp << " is the mount point for device " << url.url() << endl; - - mp = TDEIO::findPathMountPoint(url.path()); - if (mp.isEmpty()) { - kdDebug() << "no mount point for path " << url.url() << " found\n"; - } else - kdDebug() << mp << " is the mount point for path " << url.url() << endl; - // SpeedTest test( url ); - // app.exec(); - - mp = TDEIO::findPathMountPoint(url.path()); - if (mp.isEmpty()) { - kdDebug() << "no mount point for path " << url.url() << " found\n"; - } else - kdDebug() << mp << " is the mount point for path " << url.url() << endl; - // SpeedTest test( url ); - // app.exec(); - - url.setPath(TQDir::homeDirPath()); - - mp = TDEIO::findPathMountPoint(url.path()); - if (mp.isEmpty()) { - kdDebug() << "no mount point for path " << url.url() << " found\n"; - } else - kdDebug() << mp << " is the mount point for path " << url.url() << endl; - // SpeedTest test( url ); - // app.exec(); - - mp = TDEIO::findPathMountPoint(url.path()); - if (mp.isEmpty()) { - kdDebug() << "no mount point for path " << url.url() << " found\n"; - } else - kdDebug() << mp << " is the mount point for path " << url.url() << endl; - // SpeedTest test( url ); - // app.exec(); - - if ( args->count() == 1 ) - url = args->url(0); - else - url = "file:" + TQDir::currentDirPath(); - - mp = TDEIO::findPathMountPoint(url.path()); - if (mp.isEmpty()) { - kdDebug() << "no mount point for path " << url.url() << " found\n"; - } else - kdDebug() << mp << " is the mount point for path " << url.url() << endl; - // SpeedTest test( url ); - // app.exec(); - -} - -#include "speed.moc" diff --git a/kio/tests/speed.h b/kio/tests/speed.h deleted file mode 100644 index 5b928a18e..000000000 --- a/kio/tests/speed.h +++ /dev/null @@ -1,24 +0,0 @@ -// -*- c++ -*- -#ifndef _SPEED_H -#define _SPEED_H - -#include -#include - -namespace TDEIO { - class Job; -} - -class SpeedTest : public TQObject { - Q_OBJECT - -public: - SpeedTest(const KURL & url); - -private slots: - void entries( TDEIO::Job *, const TDEIO::UDSEntryList& ); - void finished( TDEIO::Job *job ); - -}; - -#endif diff --git a/kio/tests/tdesycocatest.cpp b/kio/tests/tdesycocatest.cpp deleted file mode 100644 index 45f94ac3c..000000000 --- a/kio/tests/tdesycocatest.cpp +++ /dev/null @@ -1,360 +0,0 @@ -/* - * Copyright (C) 2002, 2003 David Faure - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License version 2 as published by the Free Software Foundation; - * - * This library 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 - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public License - * along with this library; see the file COPYING.LIB. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -#include -#include - -bool check(TQString txt, TQString a, TQString b) -{ - if (a.isEmpty()) - a = TQString::null; - if (b.isEmpty()) - b = TQString::null; - if (a == b) { - kdDebug() << txt << " : checking '" << a << "' against expected value '" << b << "'... " << "ok" << endl; - } - else { - kdDebug() << txt << " : checking '" << a << "' against expected value '" << b << "'... " << "KO !" << endl -; - exit(1); - } - return true; -} - -void debug(TQString txt) -{ - fprintf(stderr, "%s\n", txt.ascii()); -} - -void debug(const char *txt) -{ - fprintf(stderr, "%s\n", txt); -} -void debug(const char *format, const char *txt) -{ - fprintf(stderr, format, txt); - fprintf(stderr, "\n"); -} - -int main(int argc, char *argv[]) -{ - TDEApplication k(argc,argv,"whatever",false/*noGUI*/); // KMessageBox needs KApp for makeStdCaption - - TQCString instname = "kword"; - TQString desktopPath = TQString::fromLatin1( "Office/%1.desktop" ).arg( instname ); - tqDebug( "Looking for %s", desktopPath.latin1() ); - KService::Ptr service = KService::serviceByDesktopPath( desktopPath ); - if ( service ) - tqDebug( "found: %s", service->desktopEntryPath().latin1() ); - else - tqDebug( "not found" ); - - tqDebug( "Looking for desktop name = %s", instname.data() ); - service = KService::serviceByDesktopName( instname ); - if ( service ) - tqDebug( "found: %s", service->desktopEntryPath().latin1() ); - else - tqDebug( "not found" ); - - debug("Trying to look for text/plain"); - KMimeType::Ptr s1 = KMimeType::mimeType("text/plain"); - if ( s1 ) - { - debug("Found it !"); - debug(TQString("Comment is %1").arg(s1->comment(KURL(),false))); - } - else - { - debug("Not found !"); - exit(1); - } - - debug("Trying to look for application/x-zerosize"); - KMimeType::Ptr s0 = KMimeType::mimeType("application/x-zerosize"); - if ( s0 ) - { - debug("Found it !"); - debug(TQString("Comment is %1").arg(s0->comment(KURL(),false))); - } - else - { - debug("Not found !"); - exit(1); - } - - debug("Trying to look for Desktop Pager"); - KService::Ptr se = KService::serviceByName("Desktop Pager"); - if ( se ) - { - debug("Found it !"); - debug(TQString("Comment is %1").arg(se->comment())); - } - else - { - debug("Not found !"); - } - - debug("Trying to look for kpager"); - se = KService::serviceByDesktopName("kpager"); - if ( se ) - { - debug("Found it !"); - debug(TQString("Comment is %1").arg(se->comment())); - TQVariant qv = se->property("DocPath"); - debug(TQString("Property type is %1").arg(qv.typeName())); - debug(TQString("Property value is %1").arg(qv.toString())); - } - else - { - debug("Not found !"); - } - - debug("Trying to look for System/kpager.desktop"); - se = KService::serviceByDesktopPath("System/kpager.desktop"); - if ( se ) - { - debug("Found it !"); - debug(TQString("Comment is %1").arg(se->comment())); - } - else - { - debug("Not found !"); - } - - debug("Trying to look for System/fake-entry.desktop"); - se = KService::serviceByDesktopPath("System/fake-entry.desktop"); - if ( se ) - { - debug("Found it !"); - debug(TQString("Comment is %1").arg(se->comment())); - } - else - { - debug("Not found !"); - } - -#if 1 - debug("Querying userprofile for services associated with text/plain"); - KServiceTypeProfile::OfferList offers = KServiceTypeProfile::offers("text/plain"); - debug(TQString("got %1 offers").arg(offers.count())); - KServiceTypeProfile::OfferList::Iterator it = offers.begin(); - for ( ; it != offers.end() ; it++ ) - { - debug((*it).service()->name()); - } - - debug("Querying userprofile for services associated with KOfficeFilter"); - offers = KServiceTypeProfile::offers("KOfficeFilter"); - debug(TQString("got %1 offers").arg(offers.count())); - it = offers.begin(); - for ( ; it != offers.end() ; it++ ) - { - debug((*it).service()->name()); - } - - debug("Querying trader for Konqueror/Plugin"); - KTrader::OfferList traderoffers = KTrader::self()->query("Konqueror/Plugin"); - debug(TQString("got %1 offers").arg(traderoffers.count())); - KTrader::OfferList::Iterator trit = traderoffers.begin(); - for ( ; trit != traderoffers.end() ; trit++ ) - { - debug((*trit)->name()); - } -#endif - - - // - debug("\nTrying findByURL for $TDEDIR/bin/kdesktop"); - KMimeType::Ptr mf = KMimeType::findByURL( KStandardDirs::findExe( "kdesktop" ), 0, - true, false ); - assert( mf ); - check( "A binary's mimetype", mf->name(), "application/x-executable" ); - - // - debug("\nTrying findByURL for folder_home.png"); - TQString fh; - (void)k.iconLoader()->loadIcon("folder_home.png",KIcon::Desktop,0,KIcon::DefaultState,&fh); - mf = KMimeType::findByURL( fh, 0, true, false ); - assert( mf ); - check( "A PNG's mimetype", mf->name(), "image/png" ); - - // - //debug("\nTrying findByURL for Makefile.am"); - //mf = KMimeType::findByURL( KURL("/tmp/Makefile.am"), 0, true, false ); - //assert( mf ); - //debug(TQString("Name is %1").arg(mf->name())); - //debug(TQString("Comment is %1").arg(mf->comment(KURL(),false))); - - debug("\nTrying findByURL for man:/ls"); - mf = KMimeType::findByURL( KURL("man:/ls") ); - assert( mf ); - check( "man:/ls", mf->name(), "text/html" ); - check( "man:/ls/", mf->name(), "text/html" ); - - mf = KMimeType::findByURL( KURL("http://foo/bar.png") ); - check( "HTTP URL", mf->name(), "application/octet-stream" ); // HTTP can't know before downloading - -#if 1 - KMimeType::List mtl; - - mtl = KMimeType::allMimeTypes( ); - assert( mtl.count() ); - debug(TQString("Found %1 mime types.").arg(mtl.count())); - for(int i = 0; i < (int)mtl.count(); i++) - { - debug(TQString("Mime type %1: %2.").arg(i).arg(mtl[i]->name())); - } - - KService::List sl; - - sl = KService::allServices( ); - assert( sl.count() ); - debug(TQString("Found %1 services.").arg(sl.count())); - - KServiceGroup::Ptr root = KServiceGroup::root(); - KServiceGroup::List list = root->entries(); - //KServiceGroup::Ptr topGroup = KServiceGroup::childGroup( "kview" ); - //Q_ASSERT( topGroup ); - //KServiceGroup::List list = topGroup->entries(); - - KServiceGroup::Ptr first; - - debug(TQString("Found %1 entries").arg(list.count())); - for( KServiceGroup::List::ConstIterator it = list.begin(); - it != list.end(); it++) - { - KSycocaEntry *p = (*it); - if (p->isType(KST_KService)) - { - KService *service = static_cast(p); - debug(service->name()); - debug(service->desktopEntryPath()); - } - else if (p->isType(KST_KServiceGroup)) - { - KServiceGroup *serviceGroup = static_cast(p); - debug(TQString(" %1 -->").arg(serviceGroup->caption())); - if (!first) first = serviceGroup; - } - else - { - debug("KServiceGroup: Unexpected object in list!"); - } - } - - if (first) - { - list = first->entries(); - debug(TQString("Found %1 entries").arg(list.count())); - for( KServiceGroup::List::ConstIterator it = list.begin(); - it != list.end(); it++) - { - KSycocaEntry *p = (*it); - if (p->isType(KST_KService)) - { - KService *service = static_cast(p); - debug(TQString(" %1").arg(service->name())); - } - else if (p->isType(KST_KServiceGroup)) - { - KServiceGroup *serviceGroup = static_cast(p); - debug(TQString(" %1 -->").arg(serviceGroup->caption())); - } - else - { - debug("KServiceGroup: Unexpected object in list!"); - } - } - } - - debug("--services that require initialisation--"); - sl = KService::allInitServices(); - for( KService::List::ConstIterator it = sl.begin(); - it != sl.end(); it++) - { - KService *service = static_cast(*it); - debug(service->name()); - } - debug("--End of list--"); - - debug("--protocols--"); - TQStringList stringL = KProtocolInfo::protocols(); - for( TQStringList::ConstIterator it = stringL.begin(); - it != stringL.end(); it++) - { - debug((*it).ascii()); - } - debug("--End of list--"); -#endif - -#if 0 - KImageIO::registerFormats(); - - TQStringList types; - types = KImageIO::types(KImageIO::Reading); - debug("Can read:"); - for(TQStringList::ConstIterator it = types.begin(); - it != types.end(); ++it) - debug(TQString(" %1").arg((*it))); - - types = KImageIO::types(KImageIO::Writing); - debug("Can write:"); - for(TQStringList::ConstIterator it = types.begin(); - it != types.end(); ++it) - debug(TQString(" %1").arg((*it))); - - - TQString rPattern = KImageIO::pattern( KImageIO::Reading ); - debug("Read pattern:\n%s", rPattern.ascii()); - - TQString wPattern = KImageIO::pattern( KImageIO::Writing ); - debug("Write pattern:\n%s", wPattern.ascii()); - - TQString suffix = KImageIO::suffix("JPEG"); - debug("Standard suffix for JPEG: %s", suffix.ascii()); - - types = KImageIO::mimeTypes(KImageIO::Reading); - debug("Can read (mimetypes):"); - for(TQStringList::ConstIterator it = types.begin(); - it != types.end(); ++it) - debug(" %s", (*it).ascii()); - - types = KImageIO::mimeTypes(KImageIO::Writing); - debug("Can write (mimetypes):"); - for(TQStringList::ConstIterator it = types.begin(); - it != types.end(); ++it) - debug(" %s", (*it).ascii()); - - debug("done"); -#endif - return 0; -} diff --git a/kio/tests/tdesycocaupdatetest.cpp b/kio/tests/tdesycocaupdatetest.cpp deleted file mode 100644 index e7778e056..000000000 --- a/kio/tests/tdesycocaupdatetest.cpp +++ /dev/null @@ -1,11 +0,0 @@ -#include - -#include - -int main(int argc, char *argv[]) -{ - TDEApplication k(argc,argv,"whatever"); // KMessageBox needs KApp for makeStdCaption - - KService::rebuildKSycoca(0); - return 0; -} diff --git a/kio/tests/wronglocalsizes.zip b/kio/tests/wronglocalsizes.zip deleted file mode 100644 index 3f76738ba..000000000 Binary files a/kio/tests/wronglocalsizes.zip and /dev/null differ diff --git a/kio/useragent.pl b/kio/useragent.pl deleted file mode 100755 index f31e31e1d..000000000 --- a/kio/useragent.pl +++ /dev/null @@ -1,13 +0,0 @@ -#!/usr/bin/perl -# the script is called with interpreter, so don't worry about the path - -while(<>) -{ - if (($key, $domain, $useragent, $comment) = ($_ =~ /(Entry\d)=\.?([^:]+)::([^:]+)::([^\n]+)/)) - { - printf ("[%s]\n", $domain); - printf ("UserAgent=%s\n", $useragent); - printf ("# DELETE %s\n", $key); - } -} -printf ("# DELETE EntriesCount\n"); -- cgit v1.2.1