From 359294c33620c8328d61f67635046d7cc060530c Mon Sep 17 00:00:00 2001 From: Darrell Anderson Date: Fri, 17 May 2013 12:45:40 -0500 Subject: Rename kdessh -> tdessh and kdelirc -> tdelirc. --- CMakeLists.txt | 8 +- README | 2 +- doc/kdelirc/CMakeLists.txt | 12 - doc/kdelirc/Makefile.am | 5 - doc/kdelirc/irkick/CMakeLists.txt | 13 - doc/kdelirc/irkick/Makefile.am | 4 - doc/kdelirc/irkick/index.docbook | 131 --- doc/kdelirc/kcmlirc/CMakeLists.txt | 13 - doc/kdelirc/kcmlirc/Makefile.am | 4 - doc/kdelirc/kcmlirc/index.docbook | 165 --- doc/tdelirc/CMakeLists.txt | 12 + doc/tdelirc/Makefile.am | 5 + doc/tdelirc/irkick/CMakeLists.txt | 13 + doc/tdelirc/irkick/Makefile.am | 4 + doc/tdelirc/irkick/index.docbook | 131 +++ doc/tdelirc/kcmlirc/CMakeLists.txt | 13 + doc/tdelirc/kcmlirc/Makefile.am | 4 + doc/tdelirc/kcmlirc/index.docbook | 165 +++ kdelirc/AUTHORS | 3 - kdelirc/CMakeLists.txt | 17 - kdelirc/COPYING | 340 ------- kdelirc/Makefile.am | 3 - kdelirc/README | 55 - kdelirc/README.profile-creation | 145 --- kdelirc/README.remote-creation | 129 --- kdelirc/TODO | 6 - kdelirc/icons/CMakeLists.txt | 12 - kdelirc/icons/Makefile.am | 3 - kdelirc/irkick/CMakeLists.txt | 60 -- kdelirc/irkick/Makefile.am | 42 - kdelirc/irkick/icons/CMakeLists.txt | 13 - kdelirc/irkick/icons/Makefile.am | 3 - kdelirc/irkick/irkick.cpp | 336 ------- kdelirc/irkick/irkick.desktop | 116 --- kdelirc/irkick/irkick.h | 133 --- kdelirc/irkick/irkick.project | 12 - kdelirc/irkick/kdedmodule_stub.h | 34 - kdelirc/irkick/klircclient.cpp | 241 ----- kdelirc/irkick/klircclient.h | 115 --- kdelirc/irkick/main.cpp | 39 - kdelirc/kcmlirc/CMakeLists.txt | 47 - kdelirc/kcmlirc/Makefile.am | 15 - kdelirc/kcmlirc/addaction.cpp | 375 ------- kdelirc/kcmlirc/addaction.h | 74 -- kdelirc/kcmlirc/addactionbase.ui | 1608 ------------------------------ kdelirc/kcmlirc/editaction.cpp | 362 ------- kdelirc/kcmlirc/editaction.h | 56 -- kdelirc/kcmlirc/editactionbase.ui | 1287 ------------------------ kdelirc/kcmlirc/editmode.cpp | 38 - kdelirc/kcmlirc/editmode.h | 34 - kdelirc/kcmlirc/editmodebase.ui | 303 ------ kdelirc/kcmlirc/kcmlirc.cpp | 545 ---------- kdelirc/kcmlirc/kcmlirc.desktop | 119 --- kdelirc/kcmlirc/kcmlirc.h | 85 -- kdelirc/kcmlirc/kcmlircbase.ui | 506 ---------- kdelirc/kcmlirc/kcmlircbase.ui.h | 37 - kdelirc/kcmlirc/modeslist.cpp | 33 - kdelirc/kcmlirc/modeslist.h | 34 - kdelirc/kcmlirc/newmode.ui | 158 --- kdelirc/kcmlirc/newmode.ui.h | 24 - kdelirc/kcmlirc/selectprofile.ui | 128 --- kdelirc/kdelirc/CMakeLists.txt | 32 - kdelirc/kdelirc/Makefile.am | 45 - kdelirc/kdelirc/arguments.cpp | 36 - kdelirc/kdelirc/arguments.h | 32 - kdelirc/kdelirc/iraction.cpp | 155 --- kdelirc/kdelirc/iraction.h | 88 -- kdelirc/kdelirc/iractions.cpp | 90 -- kdelirc/kdelirc/iractions.h | 52 - kdelirc/kdelirc/mode.cpp | 51 - kdelirc/kdelirc/mode.h | 50 - kdelirc/kdelirc/modes.cpp | 128 --- kdelirc/kdelirc/modes.h | 62 -- kdelirc/kdelirc/profileserver.cpp | 159 --- kdelirc/kdelirc/profileserver.h | 142 --- kdelirc/kdelirc/prototype.cpp | 67 -- kdelirc/kdelirc/prototype.h | 54 - kdelirc/kdelirc/remoteserver.cpp | 109 -- kdelirc/kdelirc/remoteserver.h | 89 -- kdelirc/profiles/CMakeLists.txt | 16 - kdelirc/profiles/Makefile.am | 5 - kdelirc/profiles/konqueror.profile.xml | 17 - kdelirc/profiles/noatun.profile.xml | 75 -- kdelirc/profiles/profile.dtd | 28 - kdelirc/profiles/tdelauncher.profile.xml | 18 - kdelirc/remotes/CMakeLists.txt | 18 - kdelirc/remotes/Makefile.am | 6 - kdelirc/remotes/RM-0010.remote.xml | 49 - kdelirc/remotes/cimr100.remote.xml | 31 - kdelirc/remotes/hauppauge.remote.xml | 29 - kdelirc/remotes/remote.dtd | 15 - kdelirc/remotes/sherwood.remote.xml | 61 -- kdelirc/remotes/sonytv.remote.xml | 30 - kdessh/CMakeLists.txt | 36 - kdessh/LICENSE.readme | 124 --- kdessh/Makefile.am | 17 - kdessh/README | 3 - kdessh/kdessh.cpp | 201 ---- kdessh/sshdlg.cpp | 80 -- kdessh/sshdlg.h | 33 - tdelirc/AUTHORS | 3 + tdelirc/CMakeLists.txt | 17 + tdelirc/COPYING | 340 +++++++ tdelirc/Makefile.am | 3 + tdelirc/README | 55 + tdelirc/README.profile-creation | 145 +++ tdelirc/README.remote-creation | 129 +++ tdelirc/TODO | 6 + tdelirc/icons/CMakeLists.txt | 12 + tdelirc/icons/Makefile.am | 3 + tdelirc/irkick/CMakeLists.txt | 60 ++ tdelirc/irkick/Makefile.am | 42 + tdelirc/irkick/icons/CMakeLists.txt | 13 + tdelirc/irkick/icons/Makefile.am | 3 + tdelirc/irkick/irkick.cpp | 336 +++++++ tdelirc/irkick/irkick.desktop | 116 +++ tdelirc/irkick/irkick.h | 133 +++ tdelirc/irkick/irkick.project | 12 + tdelirc/irkick/kdedmodule_stub.h | 34 + tdelirc/irkick/klircclient.cpp | 241 +++++ tdelirc/irkick/klircclient.h | 115 +++ tdelirc/irkick/main.cpp | 39 + tdelirc/kcmlirc/CMakeLists.txt | 47 + tdelirc/kcmlirc/Makefile.am | 15 + tdelirc/kcmlirc/addaction.cpp | 375 +++++++ tdelirc/kcmlirc/addaction.h | 74 ++ tdelirc/kcmlirc/addactionbase.ui | 1608 ++++++++++++++++++++++++++++++ tdelirc/kcmlirc/editaction.cpp | 362 +++++++ tdelirc/kcmlirc/editaction.h | 56 ++ tdelirc/kcmlirc/editactionbase.ui | 1287 ++++++++++++++++++++++++ tdelirc/kcmlirc/editmode.cpp | 38 + tdelirc/kcmlirc/editmode.h | 34 + tdelirc/kcmlirc/editmodebase.ui | 303 ++++++ tdelirc/kcmlirc/kcmlirc.cpp | 545 ++++++++++ tdelirc/kcmlirc/kcmlirc.desktop | 119 +++ tdelirc/kcmlirc/kcmlirc.h | 85 ++ tdelirc/kcmlirc/kcmlircbase.ui | 506 ++++++++++ tdelirc/kcmlirc/kcmlircbase.ui.h | 37 + tdelirc/kcmlirc/modeslist.cpp | 33 + tdelirc/kcmlirc/modeslist.h | 34 + tdelirc/kcmlirc/newmode.ui | 158 +++ tdelirc/kcmlirc/newmode.ui.h | 24 + tdelirc/kcmlirc/selectprofile.ui | 128 +++ tdelirc/profiles/CMakeLists.txt | 16 + tdelirc/profiles/Makefile.am | 5 + tdelirc/profiles/konqueror.profile.xml | 17 + tdelirc/profiles/noatun.profile.xml | 75 ++ tdelirc/profiles/profile.dtd | 28 + tdelirc/profiles/tdelauncher.profile.xml | 18 + tdelirc/remotes/CMakeLists.txt | 18 + tdelirc/remotes/Makefile.am | 6 + tdelirc/remotes/RM-0010.remote.xml | 49 + tdelirc/remotes/cimr100.remote.xml | 31 + tdelirc/remotes/hauppauge.remote.xml | 29 + tdelirc/remotes/remote.dtd | 15 + tdelirc/remotes/sherwood.remote.xml | 61 ++ tdelirc/remotes/sonytv.remote.xml | 30 + tdelirc/tdelirc/CMakeLists.txt | 32 + tdelirc/tdelirc/Makefile.am | 45 + tdelirc/tdelirc/arguments.cpp | 36 + tdelirc/tdelirc/arguments.h | 32 + tdelirc/tdelirc/iraction.cpp | 155 +++ tdelirc/tdelirc/iraction.h | 88 ++ tdelirc/tdelirc/iractions.cpp | 90 ++ tdelirc/tdelirc/iractions.h | 52 + tdelirc/tdelirc/mode.cpp | 51 + tdelirc/tdelirc/mode.h | 50 + tdelirc/tdelirc/modes.cpp | 128 +++ tdelirc/tdelirc/modes.h | 62 ++ tdelirc/tdelirc/profileserver.cpp | 159 +++ tdelirc/tdelirc/profileserver.h | 142 +++ tdelirc/tdelirc/prototype.cpp | 67 ++ tdelirc/tdelirc/prototype.h | 54 + tdelirc/tdelirc/remoteserver.cpp | 109 ++ tdelirc/tdelirc/remoteserver.h | 89 ++ tdessh/CMakeLists.txt | 36 + tdessh/LICENSE.readme | 124 +++ tdessh/Makefile.am | 17 + tdessh/sshdlg.cpp | 80 ++ tdessh/sshdlg.h | 33 + tdessh/tdessh.cpp | 201 ++++ 181 files changed, 10407 insertions(+), 10410 deletions(-) delete mode 100644 doc/kdelirc/CMakeLists.txt delete mode 100644 doc/kdelirc/Makefile.am delete mode 100644 doc/kdelirc/irkick/CMakeLists.txt delete mode 100644 doc/kdelirc/irkick/Makefile.am delete mode 100644 doc/kdelirc/irkick/index.docbook delete mode 100644 doc/kdelirc/kcmlirc/CMakeLists.txt delete mode 100644 doc/kdelirc/kcmlirc/Makefile.am delete mode 100644 doc/kdelirc/kcmlirc/index.docbook create mode 100644 doc/tdelirc/CMakeLists.txt create mode 100644 doc/tdelirc/Makefile.am create mode 100644 doc/tdelirc/irkick/CMakeLists.txt create mode 100644 doc/tdelirc/irkick/Makefile.am create mode 100644 doc/tdelirc/irkick/index.docbook create mode 100644 doc/tdelirc/kcmlirc/CMakeLists.txt create mode 100644 doc/tdelirc/kcmlirc/Makefile.am create mode 100644 doc/tdelirc/kcmlirc/index.docbook delete mode 100644 kdelirc/AUTHORS delete mode 100644 kdelirc/CMakeLists.txt delete mode 100644 kdelirc/COPYING delete mode 100644 kdelirc/Makefile.am delete mode 100644 kdelirc/README delete mode 100644 kdelirc/README.profile-creation delete mode 100644 kdelirc/README.remote-creation delete mode 100644 kdelirc/TODO delete mode 100644 kdelirc/icons/CMakeLists.txt delete mode 100644 kdelirc/icons/Makefile.am delete mode 100644 kdelirc/irkick/CMakeLists.txt delete mode 100644 kdelirc/irkick/Makefile.am delete mode 100644 kdelirc/irkick/icons/CMakeLists.txt delete mode 100644 kdelirc/irkick/icons/Makefile.am delete mode 100644 kdelirc/irkick/irkick.cpp delete mode 100644 kdelirc/irkick/irkick.desktop delete mode 100644 kdelirc/irkick/irkick.h delete mode 100644 kdelirc/irkick/irkick.project delete mode 100644 kdelirc/irkick/kdedmodule_stub.h delete mode 100644 kdelirc/irkick/klircclient.cpp delete mode 100644 kdelirc/irkick/klircclient.h delete mode 100644 kdelirc/irkick/main.cpp delete mode 100644 kdelirc/kcmlirc/CMakeLists.txt delete mode 100644 kdelirc/kcmlirc/Makefile.am delete mode 100644 kdelirc/kcmlirc/addaction.cpp delete mode 100644 kdelirc/kcmlirc/addaction.h delete mode 100644 kdelirc/kcmlirc/addactionbase.ui delete mode 100644 kdelirc/kcmlirc/editaction.cpp delete mode 100644 kdelirc/kcmlirc/editaction.h delete mode 100644 kdelirc/kcmlirc/editactionbase.ui delete mode 100644 kdelirc/kcmlirc/editmode.cpp delete mode 100644 kdelirc/kcmlirc/editmode.h delete mode 100644 kdelirc/kcmlirc/editmodebase.ui delete mode 100644 kdelirc/kcmlirc/kcmlirc.cpp delete mode 100644 kdelirc/kcmlirc/kcmlirc.desktop delete mode 100644 kdelirc/kcmlirc/kcmlirc.h delete mode 100644 kdelirc/kcmlirc/kcmlircbase.ui delete mode 100644 kdelirc/kcmlirc/kcmlircbase.ui.h delete mode 100644 kdelirc/kcmlirc/modeslist.cpp delete mode 100644 kdelirc/kcmlirc/modeslist.h delete mode 100644 kdelirc/kcmlirc/newmode.ui delete mode 100644 kdelirc/kcmlirc/newmode.ui.h delete mode 100644 kdelirc/kcmlirc/selectprofile.ui delete mode 100644 kdelirc/kdelirc/CMakeLists.txt delete mode 100644 kdelirc/kdelirc/Makefile.am delete mode 100644 kdelirc/kdelirc/arguments.cpp delete mode 100644 kdelirc/kdelirc/arguments.h delete mode 100644 kdelirc/kdelirc/iraction.cpp delete mode 100644 kdelirc/kdelirc/iraction.h delete mode 100644 kdelirc/kdelirc/iractions.cpp delete mode 100644 kdelirc/kdelirc/iractions.h delete mode 100644 kdelirc/kdelirc/mode.cpp delete mode 100644 kdelirc/kdelirc/mode.h delete mode 100644 kdelirc/kdelirc/modes.cpp delete mode 100644 kdelirc/kdelirc/modes.h delete mode 100644 kdelirc/kdelirc/profileserver.cpp delete mode 100644 kdelirc/kdelirc/profileserver.h delete mode 100644 kdelirc/kdelirc/prototype.cpp delete mode 100644 kdelirc/kdelirc/prototype.h delete mode 100644 kdelirc/kdelirc/remoteserver.cpp delete mode 100644 kdelirc/kdelirc/remoteserver.h delete mode 100644 kdelirc/profiles/CMakeLists.txt delete mode 100644 kdelirc/profiles/Makefile.am delete mode 100644 kdelirc/profiles/konqueror.profile.xml delete mode 100644 kdelirc/profiles/noatun.profile.xml delete mode 100644 kdelirc/profiles/profile.dtd delete mode 100644 kdelirc/profiles/tdelauncher.profile.xml delete mode 100644 kdelirc/remotes/CMakeLists.txt delete mode 100644 kdelirc/remotes/Makefile.am delete mode 100644 kdelirc/remotes/RM-0010.remote.xml delete mode 100644 kdelirc/remotes/cimr100.remote.xml delete mode 100644 kdelirc/remotes/hauppauge.remote.xml delete mode 100644 kdelirc/remotes/remote.dtd delete mode 100644 kdelirc/remotes/sherwood.remote.xml delete mode 100644 kdelirc/remotes/sonytv.remote.xml delete mode 100644 kdessh/CMakeLists.txt delete mode 100644 kdessh/LICENSE.readme delete mode 100644 kdessh/Makefile.am delete mode 100644 kdessh/README delete mode 100644 kdessh/kdessh.cpp delete mode 100644 kdessh/sshdlg.cpp delete mode 100644 kdessh/sshdlg.h create mode 100644 tdelirc/AUTHORS create mode 100644 tdelirc/CMakeLists.txt create mode 100644 tdelirc/COPYING create mode 100644 tdelirc/Makefile.am create mode 100644 tdelirc/README create mode 100644 tdelirc/README.profile-creation create mode 100644 tdelirc/README.remote-creation create mode 100644 tdelirc/TODO create mode 100644 tdelirc/icons/CMakeLists.txt create mode 100644 tdelirc/icons/Makefile.am create mode 100644 tdelirc/irkick/CMakeLists.txt create mode 100644 tdelirc/irkick/Makefile.am create mode 100644 tdelirc/irkick/icons/CMakeLists.txt create mode 100644 tdelirc/irkick/icons/Makefile.am create mode 100644 tdelirc/irkick/irkick.cpp create mode 100644 tdelirc/irkick/irkick.desktop create mode 100644 tdelirc/irkick/irkick.h create mode 100644 tdelirc/irkick/irkick.project create mode 100644 tdelirc/irkick/kdedmodule_stub.h create mode 100644 tdelirc/irkick/klircclient.cpp create mode 100644 tdelirc/irkick/klircclient.h create mode 100644 tdelirc/irkick/main.cpp create mode 100644 tdelirc/kcmlirc/CMakeLists.txt create mode 100644 tdelirc/kcmlirc/Makefile.am create mode 100644 tdelirc/kcmlirc/addaction.cpp create mode 100644 tdelirc/kcmlirc/addaction.h create mode 100644 tdelirc/kcmlirc/addactionbase.ui create mode 100644 tdelirc/kcmlirc/editaction.cpp create mode 100644 tdelirc/kcmlirc/editaction.h create mode 100644 tdelirc/kcmlirc/editactionbase.ui create mode 100644 tdelirc/kcmlirc/editmode.cpp create mode 100644 tdelirc/kcmlirc/editmode.h create mode 100644 tdelirc/kcmlirc/editmodebase.ui create mode 100644 tdelirc/kcmlirc/kcmlirc.cpp create mode 100644 tdelirc/kcmlirc/kcmlirc.desktop create mode 100644 tdelirc/kcmlirc/kcmlirc.h create mode 100644 tdelirc/kcmlirc/kcmlircbase.ui create mode 100644 tdelirc/kcmlirc/kcmlircbase.ui.h create mode 100644 tdelirc/kcmlirc/modeslist.cpp create mode 100644 tdelirc/kcmlirc/modeslist.h create mode 100644 tdelirc/kcmlirc/newmode.ui create mode 100644 tdelirc/kcmlirc/newmode.ui.h create mode 100644 tdelirc/kcmlirc/selectprofile.ui create mode 100644 tdelirc/profiles/CMakeLists.txt create mode 100644 tdelirc/profiles/Makefile.am create mode 100644 tdelirc/profiles/konqueror.profile.xml create mode 100644 tdelirc/profiles/noatun.profile.xml create mode 100644 tdelirc/profiles/profile.dtd create mode 100644 tdelirc/profiles/tdelauncher.profile.xml create mode 100644 tdelirc/remotes/CMakeLists.txt create mode 100644 tdelirc/remotes/Makefile.am create mode 100644 tdelirc/remotes/RM-0010.remote.xml create mode 100644 tdelirc/remotes/cimr100.remote.xml create mode 100644 tdelirc/remotes/hauppauge.remote.xml create mode 100644 tdelirc/remotes/remote.dtd create mode 100644 tdelirc/remotes/sherwood.remote.xml create mode 100644 tdelirc/remotes/sonytv.remote.xml create mode 100644 tdelirc/tdelirc/CMakeLists.txt create mode 100644 tdelirc/tdelirc/Makefile.am create mode 100644 tdelirc/tdelirc/arguments.cpp create mode 100644 tdelirc/tdelirc/arguments.h create mode 100644 tdelirc/tdelirc/iraction.cpp create mode 100644 tdelirc/tdelirc/iraction.h create mode 100644 tdelirc/tdelirc/iractions.cpp create mode 100644 tdelirc/tdelirc/iractions.h create mode 100644 tdelirc/tdelirc/mode.cpp create mode 100644 tdelirc/tdelirc/mode.h create mode 100644 tdelirc/tdelirc/modes.cpp create mode 100644 tdelirc/tdelirc/modes.h create mode 100644 tdelirc/tdelirc/profileserver.cpp create mode 100644 tdelirc/tdelirc/profileserver.h create mode 100644 tdelirc/tdelirc/prototype.cpp create mode 100644 tdelirc/tdelirc/prototype.h create mode 100644 tdelirc/tdelirc/remoteserver.cpp create mode 100644 tdelirc/tdelirc/remoteserver.h create mode 100644 tdessh/CMakeLists.txt create mode 100644 tdessh/LICENSE.readme create mode 100644 tdessh/Makefile.am create mode 100644 tdessh/sshdlg.cpp create mode 100644 tdessh/sshdlg.h create mode 100644 tdessh/tdessh.cpp diff --git a/CMakeLists.txt b/CMakeLists.txt index e376de1..62c4e34 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -110,8 +110,8 @@ option( BUILD_ARK "Build ark" ${BUILD_ALL} ) option( BUILD_CHARSELECTAPPLET "Build charselectapplet" ${BUILD_ALL} ) option( BUILD_KCALC "Build kcalc" ${BUILD_ALL} ) option( BUILD_KCHARSELECT "Build kcharselect" ${BUILD_ALL} ) -option( BUILD_KDELIRC "Build kdelirc" ${BUILD_ALL} ) -option( BUILD_KDESSH "Build kdessh" ${BUILD_ALL} ) +option( BUILD_TDELIRC "Build tdelirc" ${BUILD_ALL} ) +option( BUILD_TDESSH "Build tdessh" ${BUILD_ALL} ) option( BUILD_KDF "Build kdf" ${BUILD_ALL} ) option( BUILD_KEDIT "Build kedit" ${BUILD_ALL} ) option( BUILD_KFLOPPY "Build kfloppy" ${BUILD_ALL} ) @@ -160,8 +160,8 @@ tde_conditional_add_subdirectory( BUILD_DOC doc ) tde_conditional_add_subdirectory( BUILD_CHARSELECTAPPLET charselectapplet ) tde_conditional_add_subdirectory( BUILD_KCALC kcalc ) tde_conditional_add_subdirectory( BUILD_KCHARSELECT kcharselect ) -tde_conditional_add_subdirectory( BUILD_KDELIRC kdelirc ) -tde_conditional_add_subdirectory( BUILD_KDESSH kdessh ) +tde_conditional_add_subdirectory( BUILD_TDELIRC tdelirc ) +tde_conditional_add_subdirectory( BUILD_TDESSH tdessh ) tde_conditional_add_subdirectory( BUILD_KDF kdf ) tde_conditional_add_subdirectory( BUILD_KEDIT kedit ) tde_conditional_add_subdirectory( BUILD_KFLOPPY kfloppy ) diff --git a/README b/README index 9e3708e..cc3dbeb 100644 --- a/README +++ b/README @@ -14,7 +14,7 @@ What it is the clipboard * charselectapplet: dito, but as a Kicker applet * kdepasswd: like 'passwd', a graphical password changer -* kdessh: front end to ssh +* tdessh: front end to ssh * kdf: like 'df', a graphical free disk space viewer * kedit: a simple text editor, without formatting like bold, italics etc * kfloppy: format a floppy disks with this app diff --git a/doc/kdelirc/CMakeLists.txt b/doc/kdelirc/CMakeLists.txt deleted file mode 100644 index dc6bb77..0000000 --- a/doc/kdelirc/CMakeLists.txt +++ /dev/null @@ -1,12 +0,0 @@ -################################################# -# -# (C) 2012 Golubev Alexander -# fatzer2 (AT) gmail.com -# -# Improvements and feedback are welcome -# -# This file is released under GPL >= 2 -# -################################################# - -tde_auto_add_subdirectories( ) diff --git a/doc/kdelirc/Makefile.am b/doc/kdelirc/Makefile.am deleted file mode 100644 index 6812bd2..0000000 --- a/doc/kdelirc/Makefile.am +++ /dev/null @@ -1,5 +0,0 @@ - -KDE_LANG = en -KDE_DOCS = AUTO -SUBDIRS = $(AUTODIRS) - diff --git a/doc/kdelirc/irkick/CMakeLists.txt b/doc/kdelirc/irkick/CMakeLists.txt deleted file mode 100644 index e48e649..0000000 --- a/doc/kdelirc/irkick/CMakeLists.txt +++ /dev/null @@ -1,13 +0,0 @@ -################################################# -# -# (C) 2012 Golubev Alexander -# fatzer2 (AT) gmail.com -# -# Improvements and feedback are welcome -# -# This file is released under GPL >= 2 -# -################################################# - -tde_create_handbook( DESTINATION irkick ) - diff --git a/doc/kdelirc/irkick/Makefile.am b/doc/kdelirc/irkick/Makefile.am deleted file mode 100644 index 085981d..0000000 --- a/doc/kdelirc/irkick/Makefile.am +++ /dev/null @@ -1,4 +0,0 @@ - -KDE_LANG = en -KDE_DOCS = AUTO - diff --git a/doc/kdelirc/irkick/index.docbook b/doc/kdelirc/irkick/index.docbook deleted file mode 100644 index 83c25f3..0000000 --- a/doc/kdelirc/irkick/index.docbook +++ /dev/null @@ -1,131 +0,0 @@ - -IRKick"> - KDE LIRC"> - - - - -]> - - - - -&irkick;: The KDE LIRC Server Handbook - - - -Gav -Wood - -
gav@kde.org
-
-
- -
- -2004-01-02 -1.0 - - -2004 -Gav Wood - - -&FDLNotice; - -&kdelirc; is the infrastructure for the KDE's -Infrared Remote Control functionality; &irkick; is the server -component of that infrastructure. - - -KDE -irkick -kdelirc -kcmlirc -lirc - - -
- - -Introduction - - -&irkick; is a background server that provides the 'glue' between -the operating system and your TDE applications for the purpose of -controlling TDE applications with your infrared remote controls. - - - -It has a configuration tool, which may be accessed either by the -TDE Control Center or directly from the menu of &irkick;. - - - -Requirements - - -For the KDELirc framework to be utilised you must have setup a LIRC -on your KDE machine. If it is properly set up, the &irkick; icon in -the system tray will light up red. If not, it will be grey and crossed -out. - - - -For more information about LIRC, visit their website at http://www.lirc.org. - - - - - - -Using &irkick; - - -&irkick; provides one main function: When a button on a remote control is -pressed, it will temporarily become lit up. Aside from this &irkick; does -little for the user directly aside from telling them of the activity of their -remote controls. - - - -Using the right-mouse-button menu, you can configure the KDE infrared remote -control framework. - - - - - -Credits and Licenses - -&kdelirc;: The KDE LIRC Framework Copyright (c) 2004 Gav Wood -gav@kde.org. - - - -&underFDL; -&underGPL; - - - - -Installation - -&install.intro.documentation; -&install.compile.documentation; - - -
- - diff --git a/doc/kdelirc/kcmlirc/CMakeLists.txt b/doc/kdelirc/kcmlirc/CMakeLists.txt deleted file mode 100644 index 7414552..0000000 --- a/doc/kdelirc/kcmlirc/CMakeLists.txt +++ /dev/null @@ -1,13 +0,0 @@ -################################################# -# -# (C) 2012 Golubev Alexander -# fatzer2 (AT) gmail.com -# -# Improvements and feedback are welcome -# -# This file is released under GPL >= 2 -# -################################################# - -tde_create_handbook( DESTINATION kcmlirc ) - diff --git a/doc/kdelirc/kcmlirc/Makefile.am b/doc/kdelirc/kcmlirc/Makefile.am deleted file mode 100644 index 085981d..0000000 --- a/doc/kdelirc/kcmlirc/Makefile.am +++ /dev/null @@ -1,4 +0,0 @@ - -KDE_LANG = en -KDE_DOCS = AUTO - diff --git a/doc/kdelirc/kcmlirc/index.docbook b/doc/kdelirc/kcmlirc/index.docbook deleted file mode 100644 index e3507c3..0000000 --- a/doc/kdelirc/kcmlirc/index.docbook +++ /dev/null @@ -1,165 +0,0 @@ - -KDE LIRC Control Center Module"> - KDE LIRC"> - - - -]> - - - - -KDE Infrared Remote Control Configuration - - - -Gav -Wood - -
gav@kde.org
-
-
- -
- -2004-01-02 -1.0 - - -2004 -Gav Wood - - -&FDLNotice; - -&kdelirc; configuration: The infrastructure for the KDE's -Infrared Remote Control functionality. - - -KDE -irkick -kdelirc -kcmlirc -lirc - - -
- - -Introduction - - - - - -Requirements - - -For the KDELirc framework to be utilised you must have setup a LIRC -on your KDE machine. If it is properly set up, the &kdelirc; icon in -the system tray (show icon here) will light up red. If not, it will -be grey and crossed out. - - - -For more information about LIRC, visit their website at http://www.lirc.org. - - - - - - -Usage - - -There are several sections of the configuration. The list on the left details the remote controls and modes. The selection of that dictates the contents of the right-most list, which shows button/action bindings. Flicking the main tab over to Loaded Extensions will show a list of applications and remote controls that are recognised for the advanced functionality; some data is also viewable by selecting one of the items. - - - -Remote Controls and Modes - - -Each remote control can have a number of modes. Having multiple modes allows the same button to conduct different actions in difference situations, and is how many remote controls handle many different appliances with a limited number of buttons. A good example are the TV/Video/Satellite/DVD multi-purpose remote controls - rather than having several sets of number buttons for each appliance they have only one set which works for the currently selected appliance only. - - - -Each remote control can be in at most one mode at once (it may also be in no mode at all). The remote control also has a "default mode", which is the mode that it starts in, and the mode that it gets reset to normally. This may be set by using the Edit button. - - - -The list contains any remote controls detected on your system. Modes may be added and removed by selecting the desired remote control and using the buttons directly below the list Add, Remove. Modes may be renamed "inline" in the standard KDE fashion by first selecting the mode in the list box, and then clicking it again after a short pause. The Edit button allows mode names to be edited, and also allows you to define an icon that will show up in the system tray when that mode is entered. - - - - - -Action-Button Bindings - - -An action/button binding ("action") is a connection between a button press and an effect. The effect may be to switch modes, to start a KDE program or to execute a function in a KDE program (using DCOP). - - - -Actions may be associated with a mode of the remote control; if it is, the action will only have effect when the remote control is in that mode. Actions may also be placed out of any mode. Such actions will always have their desired effect no matter what mode that remote control happens to be in. - - - -To add an action/button binding simply use the Add button. Removal may be performed by selecting the action(s) to be removed and clicking the Remove button. Actions may be Edited with the Edit button, and moved to different modes by dragging and dropping onto the desired mode in the remotes/modes list. - - - -Actions may also be "automatically" populated. This handles the instance when you have a supported remote control and you wish to map its buttons to a supported application's functions. &kdelirc; can attempt to match buttons to functions for you; this behaviour may have to be tweaked, however. - - - - - -Loaded Extensions - - -There is another tab available named "Loaded Extensions". This details the applications and remote controls that &kdelirc; recognises. &kdelirc; can also use unsupported remote controls and applications, but the Auto-Populate function will not work as well (if at all). - - - -By clicking on an entry you can see information on it such as the author's details. - - - - - - - -Credits and Licenses - -&kdelirc; KDE LIRC Framework Copyright (c) 2004 Gav Wood -gav@kde.org. - -Documentation Copyright (c) 2004 by Gav Wood -gav@kde.org. - -&underFDL; -&underGPL; - - - - -Installation - -&install.intro.documentation; -&install.compile.documentation; - - -
- - diff --git a/doc/tdelirc/CMakeLists.txt b/doc/tdelirc/CMakeLists.txt new file mode 100644 index 0000000..dc6bb77 --- /dev/null +++ b/doc/tdelirc/CMakeLists.txt @@ -0,0 +1,12 @@ +################################################# +# +# (C) 2012 Golubev Alexander +# fatzer2 (AT) gmail.com +# +# Improvements and feedback are welcome +# +# This file is released under GPL >= 2 +# +################################################# + +tde_auto_add_subdirectories( ) diff --git a/doc/tdelirc/Makefile.am b/doc/tdelirc/Makefile.am new file mode 100644 index 0000000..6812bd2 --- /dev/null +++ b/doc/tdelirc/Makefile.am @@ -0,0 +1,5 @@ + +KDE_LANG = en +KDE_DOCS = AUTO +SUBDIRS = $(AUTODIRS) + diff --git a/doc/tdelirc/irkick/CMakeLists.txt b/doc/tdelirc/irkick/CMakeLists.txt new file mode 100644 index 0000000..e48e649 --- /dev/null +++ b/doc/tdelirc/irkick/CMakeLists.txt @@ -0,0 +1,13 @@ +################################################# +# +# (C) 2012 Golubev Alexander +# fatzer2 (AT) gmail.com +# +# Improvements and feedback are welcome +# +# This file is released under GPL >= 2 +# +################################################# + +tde_create_handbook( DESTINATION irkick ) + diff --git a/doc/tdelirc/irkick/Makefile.am b/doc/tdelirc/irkick/Makefile.am new file mode 100644 index 0000000..085981d --- /dev/null +++ b/doc/tdelirc/irkick/Makefile.am @@ -0,0 +1,4 @@ + +KDE_LANG = en +KDE_DOCS = AUTO + diff --git a/doc/tdelirc/irkick/index.docbook b/doc/tdelirc/irkick/index.docbook new file mode 100644 index 0000000..6ea5f3e --- /dev/null +++ b/doc/tdelirc/irkick/index.docbook @@ -0,0 +1,131 @@ + +IRKick"> + TDE LIRC"> + + + + +]> + + + + +&irkick;: The TDE LIRC Server Handbook + + + +Gav +Wood + +
gav@kde.org
+
+
+ +
+ +2004-01-02 +1.0 + + +2004 +Gav Wood + + +&FDLNotice; + +&tdelirc; is the infrastructure for the TDE's +Infrared Remote Control functionality; &irkick; is the server +component of that infrastructure. + + +TDE +irkick +tdelirc +kcmlirc +lirc + + +
+ + +Introduction + + +&irkick; is a background server that provides the 'glue' between +the operating system and your TDE applications for the purpose of +controlling TDE applications with your infrared remote controls. + + + +It has a configuration tool, which may be accessed either by the +TDE Control Center or directly from the menu of &irkick;. + + + +Requirements + + +For the TDELirc framework to be utilised you must have setup a LIRC +on your TDE machine. If it is properly set up, the &irkick; icon in +the system tray will light up red. If not, it will be grey and crossed +out. + + + +For more information about LIRC, visit their website at http://www.lirc.org. + + + + + + +Using &irkick; + + +&irkick; provides one main function: When a button on a remote control is +pressed, it will temporarily become lit up. Aside from this &irkick; does +little for the user directly aside from telling them of the activity of their +remote controls. + + + +Using the right-mouse-button menu, you can configure the TDE infrared remote +control framework. + + + + + +Credits and Licenses + +&tdelirc;: The TDE LIRC Framework Copyright (c) 2004 Gav Wood +gav@kde.org. + + + +&underFDL; +&underGPL; + + + + +Installation + +&install.intro.documentation; +&install.compile.documentation; + + +
+ + diff --git a/doc/tdelirc/kcmlirc/CMakeLists.txt b/doc/tdelirc/kcmlirc/CMakeLists.txt new file mode 100644 index 0000000..7414552 --- /dev/null +++ b/doc/tdelirc/kcmlirc/CMakeLists.txt @@ -0,0 +1,13 @@ +################################################# +# +# (C) 2012 Golubev Alexander +# fatzer2 (AT) gmail.com +# +# Improvements and feedback are welcome +# +# This file is released under GPL >= 2 +# +################################################# + +tde_create_handbook( DESTINATION kcmlirc ) + diff --git a/doc/tdelirc/kcmlirc/Makefile.am b/doc/tdelirc/kcmlirc/Makefile.am new file mode 100644 index 0000000..085981d --- /dev/null +++ b/doc/tdelirc/kcmlirc/Makefile.am @@ -0,0 +1,4 @@ + +KDE_LANG = en +KDE_DOCS = AUTO + diff --git a/doc/tdelirc/kcmlirc/index.docbook b/doc/tdelirc/kcmlirc/index.docbook new file mode 100644 index 0000000..c60e125 --- /dev/null +++ b/doc/tdelirc/kcmlirc/index.docbook @@ -0,0 +1,165 @@ + +TDE LIRC Control Center Module"> + TDE LIRC"> + + + +]> + + + + +TDE Infrared Remote Control Configuration + + + +Gav +Wood + +
gav@kde.org
+
+
+ +
+ +2004-01-02 +1.0 + + +2004 +Gav Wood + + +&FDLNotice; + +&tdelirc; configuration: The infrastructure for the TDE's +Infrared Remote Control functionality. + + +TDE +irkick +tdelirc +kcmlirc +lirc + + +
+ + +Introduction + + + + + +Requirements + + +For the TDELirc framework to be utilised you must have setup a LIRC +on your TDE machine. If it is properly set up, the &tdelirc; icon in +the system tray (show icon here) will light up red. If not, it will +be grey and crossed out. + + + +For more information about LIRC, visit their website at http://www.lirc.org. + + + + + + +Usage + + +There are several sections of the configuration. The list on the left details the remote controls and modes. The selection of that dictates the contents of the right-most list, which shows button/action bindings. Flicking the main tab over to Loaded Extensions will show a list of applications and remote controls that are recognised for the advanced functionality; some data is also viewable by selecting one of the items. + + + +Remote Controls and Modes + + +Each remote control can have a number of modes. Having multiple modes allows the same button to conduct different actions in difference situations, and is how many remote controls handle many different appliances with a limited number of buttons. A good example are the TV/Video/Satellite/DVD multi-purpose remote controls - rather than having several sets of number buttons for each appliance they have only one set which works for the currently selected appliance only. + + + +Each remote control can be in at most one mode at once (it may also be in no mode at all). The remote control also has a "default mode", which is the mode that it starts in, and the mode that it gets reset to normally. This may be set by using the Edit button. + + + +The list contains any remote controls detected on your system. Modes may be added and removed by selecting the desired remote control and using the buttons directly below the list Add, Remove. Modes may be renamed "inline" in the standard TDE fashion by first selecting the mode in the list box, and then clicking it again after a short pause. The Edit button allows mode names to be edited, and also allows you to define an icon that will show up in the system tray when that mode is entered. + + + + + +Action-Button Bindings + + +An action/button binding ("action") is a connection between a button press and an effect. The effect may be to switch modes, to start a TDE program or to execute a function in a TDE program (using DCOP). + + + +Actions may be associated with a mode of the remote control; if it is, the action will only have effect when the remote control is in that mode. Actions may also be placed out of any mode. Such actions will always have their desired effect no matter what mode that remote control happens to be in. + + + +To add an action/button binding simply use the Add button. Removal may be performed by selecting the action(s) to be removed and clicking the Remove button. Actions may be Edited with the Edit button, and moved to different modes by dragging and dropping onto the desired mode in the remotes/modes list. + + + +Actions may also be "automatically" populated. This handles the instance when you have a supported remote control and you wish to map its buttons to a supported application's functions. &tdelirc; can attempt to match buttons to functions for you; this behaviour may have to be tweaked, however. + + + + + +Loaded Extensions + + +There is another tab available named "Loaded Extensions". This details the applications and remote controls that &tdelirc; recognises. &tdelirc; can also use unsupported remote controls and applications, but the Auto-Populate function will not work as well (if at all). + + + +By clicking on an entry you can see information on it such as the author's details. + + + + + + + +Credits and Licenses + +&tdelirc; TDE LIRC Framework Copyright (c) 2004 Gav Wood +gav@kde.org. + +Documentation Copyright (c) 2004 by Gav Wood +gav@kde.org. + +&underFDL; +&underGPL; + + + + +Installation + +&install.intro.documentation; +&install.compile.documentation; + + +
+ + diff --git a/kdelirc/AUTHORS b/kdelirc/AUTHORS deleted file mode 100644 index c6474a8..0000000 --- a/kdelirc/AUTHORS +++ /dev/null @@ -1,3 +0,0 @@ -Code mostly by Gav Wood -LIRC interface code adapted from Noatun/Infrared by Malte Starostik. - diff --git a/kdelirc/CMakeLists.txt b/kdelirc/CMakeLists.txt deleted file mode 100644 index 156165f..0000000 --- a/kdelirc/CMakeLists.txt +++ /dev/null @@ -1,17 +0,0 @@ -################################################# -# -# (C) 2012 Golubev Alexander -# fatzer2 (AT) gmail.com -# -# Improvements and feedback are welcome -# -# This file is released under GPL >= 2 -# -################################################# - -add_subdirectory( icons ) -add_subdirectory( irkick ) -add_subdirectory( kcmlirc ) -add_subdirectory( kdelirc ) -add_subdirectory( profiles ) -add_subdirectory( remotes ) diff --git a/kdelirc/COPYING b/kdelirc/COPYING deleted file mode 100644 index c13faf0..0000000 --- a/kdelirc/COPYING +++ /dev/null @@ -1,340 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Library General Public License instead.) You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - 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 - - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) year name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - - , 1 April 1989 - Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Library General -Public License instead of this License. diff --git a/kdelirc/Makefile.am b/kdelirc/Makefile.am deleted file mode 100644 index bb18f1c..0000000 --- a/kdelirc/Makefile.am +++ /dev/null @@ -1,3 +0,0 @@ - -SUBDIRS = icons kdelirc irkick kcmlirc profiles remotes - diff --git a/kdelirc/README b/kdelirc/README deleted file mode 100644 index 31af5d0..0000000 --- a/kdelirc/README +++ /dev/null @@ -1,55 +0,0 @@ -kdelirc -------- - -KDELIRC is a KDE frontend for the Linux Infrared Remote Control system. It has -two aims: - -1. Provide a control center module for configuration of: - a) Application bindings to remote control buttons. - b) Actual remote controls installed (i.e. lirc configuration). - -2. Provide a system-tray applet to act as a proxy between the LIRC system and - KDE (applications), in order to launch DCOP requests (and potentially - other IPC signals) to applications (and potentially collect/display - results). - -INSTALLATION - -Nothing but the normal ./configure && make && su -c "make install". - -SETUP - -For the KDELirc system to work properly, you *must* have lircd configured and -running. If you have already had a Lirc program running, then you most likely -have Lirc set up properly. If not, be sure that you have a correct kernel module -loaded for your IR receiver (1) and that the lircd program is running (2). - -You must also have some remote controls configured in "/etc/lircd.conf". Go to -the lircd website (www.lirc.org) for more information on this. - -(1) /sbin/lsmod | grep lirc -If you see some output, you have a lirc kernel module loaded (that's not to say -it's the right module for your hardware). - -(2) ps aux | grep -v grep | grep lircd -If you see some output, you have the lircd program running. This is good. - -DESIGN - -The design of the system is really quite simple---a control center module -modifies a centralised configuration file to determine what action(s) should -be taken on a remote control's button press. - -The same(?) module also provides a front-end for the input of /etc/lircd.conf, -necessary to specify remote controls to the LIRC system. An extra (standard -format XML-based) may be provided with the remote control description to give -less sucky (lower case, no spaces/symbols) names. - -The /etc/lircd.conf frontend has not yet been implemented, though all other -features are. - -The system tray applet interfaces with LIRC in order to catch key presses on -remote controls. It is then able to communicate with and potentially start -applications through DCOP. - -Gav Wood, 2003 (gav at kde dot org). diff --git a/kdelirc/README.profile-creation b/kdelirc/README.profile-creation deleted file mode 100644 index 95d9e78..0000000 --- a/kdelirc/README.profile-creation +++ /dev/null @@ -1,145 +0,0 @@ -How to give your KDE application IR support under KDE. -====================================================== - -by Gav Wood, 2003. - -Introduction ------------- - -All DCOP-using applications under KDE have basic lirc support, since KDELirc has -the ability to interface any button to any DCOP call. However, to give your -application the real professional touch when using it with KDELirc, I recommend -you create a profile for it. - -A profile tells KDELirc (and the user!) what the various DCOP calls do. -Essentially this is a kind of documentation for the DCOP calls. You don't have -to include all DCOP calls - just the ones that you feel would benefit end-users -the most (usually "interface adjusting" calls rather the "information gathering" -calls). - - -Method ------- - -1. DCOP - -The first thing to do is to give your application DCOP functionality. This is -*very* easy and essentially amounts to adding a declaration to each object you -want to give DCOP accessibility and adding an entry to your Makefile. I wont go -into it here as the KDE documentation already provides a suitable resource for -such information. - -Ensure you provide a full accessibility to your application's interface by DCOP, -and especially in the case of IR-interfacing, try not to have functions with too -many parameters, or with exotic types (stick to ints and QStrings where -necessary). - -2. Create a profile - -Having coded the necessary DCOP functionality into your application, the only -other thing to do is describe how it works to the user. This is done by means of -a .profile.xml document, examples of which may be found in the kdelirc/profiles -directory. A quick guide is given here: - -a) First create top level "profile" tags with the DCOP application id and KDE -service name (found in the .desktop file) as attributes of them: - - - - - - -b) Inside populate with name and author information. If your application is not a -KUniqueApplication, you **must** declare this with an "instances" tag, giving the -attribute "unique" a value of "0" (it defaults to "1", a KUniqueApplication). You -may optionally describe the default behavior KDELirc should take should there be -more than one instance of the application, with the attribute "ifmulti" which may -take one of "dontsend" (do nothing if >1 instance), "sendtoone" (send call to one -arbitrarily chosen instance) and "sendtoall" (send to all instances). The default -is "dontsend", however, "sendtoone" may be the most useful in many circumstances. - - - - - My Application - Me - - - -c) Populate the profile with action tags, for each DCOP action you want to be -available to the user. Each action tag should have DCOP object name and function -prototype. - Several optional attrubutes to specify are the key-class (an identifier to -act as an abstract binding between remote controls and applications). There are -several defined; see the DTD files for a current list. The other options, repeat -and autostart are boolean specificers to tell whether the action should repeat -or automatically start the program by default. - - - - - My Application - Me - - - - - -d) Give the action a name and comment: - - - - - My Application - Me - - - Show Integers - Shows a configurable integer - - - -e) Describe each argument with a comment and type attribute. Valid types are -found in the profile.dtd file. If you cant find the exact type, just use one -that is silently castable. You should declare a default value between the -default tags: - - - - - My Application - Me - - - Show Integers - Shows a configurable integer - - 5 - The integer to be shown - - - - -When you have created your profile.xml file, put in your project's main source -tree. - -3. Profile installation - -There is a data directory in KDE reserved for profiles such as these; it's path -is "$(kde_datadir)/profiles". These extra lines must therefore be added to your -Makefile.am in the directory of your profile.xml: - - profiledata_DATA = [YOURAPPHERE].profile.xml - profiledatadir = $(kde_datadir)/profiles - EXTRA_DIST = $(profiledata_DATA) - -(replace [YOURAPPHERE] with your application name---the prefix to your -profile.xml file.) - - -4. Finished - -That's it you're done! Your KDE application is now fully IR enabled. diff --git a/kdelirc/README.remote-creation b/kdelirc/README.remote-creation deleted file mode 100644 index 5cf5213..0000000 --- a/kdelirc/README.remote-creation +++ /dev/null @@ -1,129 +0,0 @@ -How to give your LIRC remote control KDELIRC functionality -========================================================== - -by Gav Wood, 2003. - -Introduction ------------- - -All LIRC-understandable remote controls automatically function in KDELirc. -However, to get the advanced (really cool) KDELirc stuff you'll need to create a -remote.xml file for your remote control. The files are simple and easy to create -so don't be put off. - -The function of the remote.xml file is to describe what the remote controls' -buttons do in a general manner and to provide free-form text names for them, -since LIRC only allows non-spaces, non-symbolic charecters in the remote control -definition files. - -When you're finished your remote.xml, you might want to send it to me -(gav at kde dot org) for inclusion in the distribution of KDELirc. It may soon -be possible to distribute the remote.xml files along with the lircd.conf files. - -Method ------- - -a) Start with the basic template and define the LIRC ID of the remote control. -The LIRC ID is most important, and must be the identifier (look for the line -"name <...>" after the "begin remote" line). put the text after "name" into "id" -attribute of the "remote" tag in the "lircd.conf" file ("/etc/lircd.conf"). - In addition to this, fill in the author and name tags with your name and the -"nice" name of the remote control. Any extra information you may wish to give it -(such as alternate names, multimedia bundles/system is comes with etc) may be -enclosed between optional information tags: - - - - - - My Remote Control - Me - As bundled with ACME LinTV - - -This would compliment a "lircd.conf" file: - - begin remote - name myremote - ... - end remote - -b) With the hard work out of the way, just start going though each button on the -remote control. For each button, make sure the "id" attribute is the same as in -the lircd.conf file. - For each (common) button, you might also want to specify the class, which will -help KDELirc match it to any application's action. For a list of all button -classes, look in the remote.dtd file which comes with KDELirc. If the class type -is one which encompasses many buttons, for example "number", then you should also -specify which number it is in the parameter attribute. Currently, this only -actually applies to "number" - all other classes are simple and do not require a -parameter attribute. - Note: If no "class" is given, it will default to the "id". In the unlikely -case that this is not what you want, simply define it to be null (class=""). - - - - - - My Remote Control - Me - - - - -This would compliment a "lircd.conf" file: - - begin remote - name myremote - ... - begin raw_codes - name num0 - ... - name rec - ... - end raw_codes - end remote - -c) The last thing to define in each of your buttons is the "nice" name. This may -be descriptive and use spaces, symbols and mixed case text, in a similar fashion -to the remote control's name. There is no need to copy the remote control's label -verbatim. If necessary expand the description to provide a readable, aethetically -pleasing label e.g. you should name the "CC" button "Closed Captions" or the "Rec" -button "Record". - - - - - - My Remote Control - Me - - - - - Note: The name of a button will automatically default to its "id", so you can -save yourself some time and effort with buttons which share the same name and id -by changing - - - -to the far less cluttered and simpler: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/kdelirc/remotes/cimr100.remote.xml b/kdelirc/remotes/cimr100.remote.xml deleted file mode 100644 index 5dfc36d..0000000 --- a/kdelirc/remotes/cimr100.remote.xml +++ /dev/null @@ -1,31 +0,0 @@ - - - - - Creative CIMR-100 - Gav Wood - - - - - - - - - - - - - - - diff --git a/kdelirc/remotes/hauppauge.remote.xml b/kdelirc/remotes/hauppauge.remote.xml deleted file mode 100644 index 4d2a402..0000000 --- a/kdelirc/remotes/hauppauge.remote.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - Hauppauge - Dirk Ziegelmeier - Bundled with WinTV PCI, PVR - - - - - - - - - - - - diff --git a/kdelirc/remotes/remote.dtd b/kdelirc/remotes/remote.dtd deleted file mode 100644 index a09b4b6..0000000 --- a/kdelirc/remotes/remote.dtd +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - - - - diff --git a/kdelirc/remotes/sherwood.remote.xml b/kdelirc/remotes/sherwood.remote.xml deleted file mode 100644 index db628ba..0000000 --- a/kdelirc/remotes/sherwood.remote.xml +++ /dev/null @@ -1,61 +0,0 @@ - - - - - Sherwood RM-RD-61 - Gav Wood - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/kdelirc/remotes/sonytv.remote.xml b/kdelirc/remotes/sonytv.remote.xml deleted file mode 100644 index 4e5ee97..0000000 --- a/kdelirc/remotes/sonytv.remote.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - - - SonyTV - Bundled with some Sony TVs - Dirk Ziegelmeier - - - - - - - - - - - - - diff --git a/kdessh/CMakeLists.txt b/kdessh/CMakeLists.txt deleted file mode 100644 index 8abf536..0000000 --- a/kdessh/CMakeLists.txt +++ /dev/null @@ -1,36 +0,0 @@ -################################################# -# -# (C) 2012 Golubev Alexander -# fatzer2 (AT) gmail.com -# -# Improvements and feedback are welcome -# -# This file is released under GPL >= 2 -# -################################################# - -include_directories( - ${CMAKE_BINARY_DIR} - ${CMAKE_CURRENT_BINARY_DIR} - ${CMAKE_CURRENT_SOURCE_DIR} - ${TDE_INCLUDE_DIR} - ${TQT_INCLUDE_DIRS} -) - -link_directories( - ${TQT_LIBRARY_DIRS} -) - -add_definitions( - -DQT_NO_CAST_ASCII -) - - -##### kdessh (executable) ####################### - -tde_add_executable( kdessh AUTOMOC - SOURCES kdessh.cpp sshdlg.cpp - LINK tdeui-shared tdesu-shared - DESTINATION ${BIN_INSTALL_DIR} -) - diff --git a/kdessh/LICENSE.readme b/kdessh/LICENSE.readme deleted file mode 100644 index eb08ce6..0000000 --- a/kdessh/LICENSE.readme +++ /dev/null @@ -1,124 +0,0 @@ -kdessh - a KDE front end to ssh - -Copyright (c) 1999,2000 by Geert Jansen - - The "Artistic License" - - Preamble - - The intent of this document is to state the conditions under which a - Package may be copied, such that the Copyright Holder maintains some - semblance of artistic control over the development of the package, - while giving the users of the package the right to use and - distribute the Package in a more-or-less customary fashion, plus the - right to make reasonable modifications. - - Definitions: - - * "Package" refers to the collection of files distributed by the - Copyright Holder, and derivatives of that collection of files - created through textual modification. - - * "Standard Version" refers to such a Package if it has not been - modified, or has been modified in accordance with the wishes of - the Copyright Holder. - - * "Copyright Holder" is whoever is named in the copyright or - copyrights for the package. - - * "You" is you, if you're thinking about copying or distributing - this Package. - - * "Reasonable copying fee" is whatever you can justify on the - basis of media cost, duplication charges, time of people - involved, and so on. (You will not be required to justify it to - the Copyright Holder, but only to the computing community at - large as a market that must bear the fee.) - - * "Freely Available" means that no fee is charged for the item - itself, though there may be fees involved in handling the item. - It also means that recipients of the item may redistribute it - under the same conditions they received it. - - 1. You may make and give away verbatim copies of the source form of - the Standard Version of this Package without restriction, provided - that you duplicate all of the original copyright notices and - associated disclaimers. - - 2. You may apply bug fixes, portability fixes and other - modifications derived from the Public Domain or from the Copyright - Holder. A Package modified in such a way shall still be considered - the Standard Version. - - 3. You may otherwise modify your copy of this Package in any way, - provided that you insert a prominent notice in each changed file - stating how and when you changed that file, and provided that you do - at least ONE of the following: - - a) place your modifications in the Public Domain or - otherwise make them Freely Available, such as by posting - said modifications to Usenet or an equivalent medium, or - placing the modifications on a major archive site such as - ftp.uu.net, or by allowing the Copyright Holder to include - your modifications in the Standard Version of the Package. - - b) use the modified Package only within your corporation - or organization. - - c) rename any non-standard executables so the names do not - conflict with standard executables, which must also be - provided, and provide a separate manual page for each - non-standard executable that clearly documents how it - differs from the Standard Version. - - d) make other distribution arrangements with the Copyright - Holder. - - 4. You may distribute the programs of this Package in object code or - executable form, provided that you do at least ONE of the following: - - a) distribute a Standard Version of the executables and - library files, together with instructions (in the manual - page or equivalent) on where to get the Standard Version. - - b) accompany the distribution with the machine-readable - source of the Package with your modifications. - - c) accompany any non-standard executables with their - corresponding Standard Version executables, giving the - non-standard executables non-standard names, and clearly - documenting the differences in manual pages (or - equivalent), together with instructions on where to get - the Standard Version. - - d) make other distribution arrangements with the Copyright - Holder. - - 5. You may charge a reasonable copying fee for any distribution of - this Package. You may charge any fee you choose for support of this - Package. You may not charge a fee for this Package itself. However, - you may distribute this Package in aggregate with other (possibly - commercial) programs as part of a larger (possibly commercial) - software distribution provided that you do not advertise this - Package as a product of your own. - - 6. The scripts and library files supplied as input to or produced as - output from the programs of this Package do not automatically fall - under the copyright of this Package, but belong to whomever - generated them, and may be sold commercially, and may be aggregated - with this Package. - - 7. C or perl subroutines supplied by you and linked into this - Package shall not be considered part of this Package. - - 8. The name of the Copyright Holder may not be used to endorse or - promote products derived from this software without specific prior - written permission. - - 9. THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR - IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED - WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. - - The End - - diff --git a/kdessh/Makefile.am b/kdessh/Makefile.am deleted file mode 100644 index f716244..0000000 --- a/kdessh/Makefile.am +++ /dev/null @@ -1,17 +0,0 @@ -## Makefile.am for kdessh -AM_CPPFLAGS = -DQT_NO_CAST_ASCII - -INCLUDES= $(all_includes) - -## kdessh -bin_PROGRAMS = kdessh -kdessh_SOURCES = kdessh.cpp sshdlg.cpp -kdessh_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor -kdessh_LDADD = $(LIB_TDEUI) -ltdesu -kdessh_METASOURCES = AUTO -noinst_HEADERS = sshdlg.h - -## Messages -messages: - $(XGETTEXT) $(kdessh_SOURCES) -o $(podir)/kdessh.pot - diff --git a/kdessh/README b/kdessh/README deleted file mode 100644 index b897486..0000000 --- a/kdessh/README +++ /dev/null @@ -1,3 +0,0 @@ -kdessh: A KDE front end to ssh. - -Please report bugs to Geert Jansen . diff --git a/kdessh/kdessh.cpp b/kdessh/kdessh.cpp deleted file mode 100644 index 5d64290..0000000 --- a/kdessh/kdessh.cpp +++ /dev/null @@ -1,201 +0,0 @@ -/* vi: ts=8 sts=4 sw=4 - * - * $Id$ - * - * This file is part of the KDE project, module tdesu. - * Copyright (C) 2000 Geert Jansen - */ - -#include - -#include -#include -#include -#include -#include - -#include -#include - - -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -#include "sshdlg.h" - -static TDECmdLineOptions options[] = -{ - { "+host", I18N_NOOP("Specifies the remote host"), 0 }, - { "+command", I18N_NOOP("The command to run"), 0 }, - { "u ", I18N_NOOP("Specifies the target uid"), 0 }, - { "s ", I18N_NOOP("Specify remote stub location"), "tdesu_stub" }, - { "n", I18N_NOOP("Do not keep password"), 0 }, - { "q", I18N_NOOP("Stop the daemon (forgets all passwords)"), 0 }, - { "t", I18N_NOOP("Enable terminal output (no password keeping)"), 0 }, - TDECmdLineLastOption -}; - - -int main(int argc, char *argv[]) -{ - TDEAboutData aboutData("kdessh", I18N_NOOP("TDE ssh"), - VERSION, I18N_NOOP("Runs a program on a remote host"), - TDEAboutData::License_Artistic, - "Copyright (c) 2000 Geert Jansen"); - aboutData.addAuthor("Geert Jansen", I18N_NOOP("Maintainer"), - "jansen@kde.org", "http://www.stack.nl/~geertj/"); - - TDECmdLineArgs::init(argc, argv, &aboutData); - TDECmdLineArgs::addCmdLineOptions(options); - - TDEApplication app; - TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs(); - - // Stop daemon and exit? - if (args->isSet("q")) - { - KDEsuClient client; - if (client.ping() == -1) - { - kdError(1511) << "Daemon not running -- nothing to stop\n"; - exit(1); - } - if (client.stopServer() != -1) - { - kdDebug(1511) << "Daemon stopped\n"; - exit(0); - } - kdError(1511) << "Could not stop daemon\n"; - exit(1); - } - - if (args->count() < 2) - TDECmdLineArgs::usage(i18n("No command or host specified.")); - - // Check if ssh is available - if (TDEStandardDirs::findExe(TQString::fromLatin1("ssh")).isEmpty()) - { - kdError(1511) << "ssh not found\n"; - exit(1); - } - - // Get remote userid - TQCString user = args->getOption("u"); - if (user.isNull()) - { - struct passwd *pw = getpwuid(getuid()); - if (pw == 0L) - { - kdError(1511) << "You don't exist!\n"; - exit(1); - } - user = pw->pw_name; - } - - // Remote stub location - TQCString stub = args->getOption("s"); - - // Get remote host, command - TQCString host = args->arg(0); - TQCString command = args->arg(1); - for (int i=2; icount(); i++) - { - command += " "; - command += args->arg(i); - } - - // Check for daemon and start if necessary - bool have_daemon = true; - KDEsuClient client; - if (!client.isServerSGID()) - { - kdWarning(1511) << "Daemon not safe (not sgid), not using it.\n"; - have_daemon = false; - } - else if ((client.ping() == -1) && (client.startServer() == -1)) - { - kdWarning(1511) << "Could not start daemon, reduced functionality.\n"; - have_daemon = false; - } - - // Try to exec the command with tdesud? - bool keep = !args->isSet("n") && have_daemon; - bool terminal = args->isSet("t"); - if (keep && !terminal) - { - client.setHost(host); - if (client.exec(command, user) != -1) - return 0; - } - - // Set core dump size to 0 because we will have - // root's password in memory. - struct rlimit rlim; - rlim.rlim_cur = rlim.rlim_max = 0; - if (setrlimit(RLIMIT_CORE, &rlim)) - { - kdError(1511) << "rlimit(): " << perror << "\n"; - exit(1); - } - - - // Read configuration - TDEConfig *config = TDEGlobal::config(); - config->setGroup(TQString::fromLatin1("Passwords")); - int timeout = config->readNumEntry(TQString::fromLatin1("Timeout"), defTimeout); - - SshProcess proc(host, user); - proc.setStub(stub); - int needpw = proc.checkNeedPassword(); - if (needpw < 0) - { - TQString msg = i18n("Ssh returned with an error!\n" - "The error message is:\n\n"); - msg += proc.error(); - KMessageBox::error(0L, msg); - exit(1); - } - - TQCString password; - if (needpw != 0) - { - KDEsshDialog *dlg = new KDEsshDialog(host, user, stub, - proc.prompt(), keep && !terminal); - dlg->addLine(i18n("Command"), command); - int res = dlg->exec(); - if (res == KDEsshDialog::Rejected) - exit(0); - keep = dlg->keep(); - password = dlg->password(); - delete dlg; - } else - keep = 0; - - // Make the dialog go away. - app.processEvents(); - - // Run command - if (keep && have_daemon) - { - client.setHost(host); - client.setPass(password, timeout); - return client.exec(command, user); - } else - { - proc.setCommand(command); - proc.setTerminal(terminal); - proc.setErase(true); - return proc.exec(password); - } -} - diff --git a/kdessh/sshdlg.cpp b/kdessh/sshdlg.cpp deleted file mode 100644 index c7ca281..0000000 --- a/kdessh/sshdlg.cpp +++ /dev/null @@ -1,80 +0,0 @@ -/* vi: ts=8 sts=4 sw=4 - * - * $Id$ - * - * This file is part of the KDE project, module tdesu. - * Copyright (C) 2000 Geert Jansen - */ - -#include -#include - -#include -#include "sshdlg.h" - - -KDEsshDialog::KDEsshDialog(TQCString host, TQCString user, TQCString stub, - TQString prompt, bool enableKeep) - : KPasswordDialog(Password, enableKeep, 0) -{ - m_Host = host; - m_User = user; - m_Stub = stub; - - setCaption(TQString::fromLatin1("%1@%2").arg(TQString(m_User)).arg(TQString(m_Host))); - - // Make the prompt a little more polite :-) - if (prompt.lower().left(6) == TQString::fromLatin1("enter ")) - prompt.remove(0, 6); - int pos = prompt.find(':'); - if (pos != -1) - prompt.remove(pos, 10); - prompt += '.'; - prompt.prepend(i18n("The action you requested needs authentication. " - "Please enter ")); - setPrompt(prompt); -} - - -KDEsshDialog::~KDEsshDialog() -{ -} - - -bool KDEsshDialog::checkPassword(const char *password) -{ - SshProcess proc(m_Host, m_User); - proc.setStub(m_Stub); - - int ret = proc.checkInstall(password); - switch (ret) - { - case -1: - KMessageBox::error(this, i18n("Conversation with ssh failed.\n")); - done(Rejected); - return false; - - case 0: - return true; - - case SshProcess::SshNotFound: - KMessageBox::sorry(this, - i18n("The programs 'ssh' or 'tdesu_stub' cannot be found.\n" - "Make sure your PATH is set correctly.")); - done(Rejected); - return false; - - case SshProcess::SshIncorrectPassword: - KMessageBox::sorry(this, i18n("Incorrect password. Please try again.")); - return false; - - default: - KMessageBox::error(this, i18n("Internal error: Illegal return from " - "SshProcess::checkInstall()")); - done(Rejected); - } - return true; -} - - -#include "sshdlg.moc" diff --git a/kdessh/sshdlg.h b/kdessh/sshdlg.h deleted file mode 100644 index 45175d7..0000000 --- a/kdessh/sshdlg.h +++ /dev/null @@ -1,33 +0,0 @@ -/* vi: ts=8 sts=4 sw=4 - * - * $Id$ - * - * This file is part of the KDE project, module tdesu. - * Copyright (C) 2000 Geert Jansen - */ - -#ifndef __SshDlg_h_Included__ -#define __SshDlg_h_Included__ - -#include - -class KDEsshDialog - : public KPasswordDialog -{ - Q_OBJECT - - -public: - KDEsshDialog(TQCString host, TQCString user, TQCString stub, - TQString prompt, bool enableKeep); - ~KDEsshDialog(); - -protected: - bool checkPassword(const char *password); - -private: - TQCString m_User, m_Host, m_Stub; -}; - - -#endif // __SshDlg_h_Included__ diff --git a/tdelirc/AUTHORS b/tdelirc/AUTHORS new file mode 100644 index 0000000..c6474a8 --- /dev/null +++ b/tdelirc/AUTHORS @@ -0,0 +1,3 @@ +Code mostly by Gav Wood +LIRC interface code adapted from Noatun/Infrared by Malte Starostik. + diff --git a/tdelirc/CMakeLists.txt b/tdelirc/CMakeLists.txt new file mode 100644 index 0000000..251c9db --- /dev/null +++ b/tdelirc/CMakeLists.txt @@ -0,0 +1,17 @@ +################################################# +# +# (C) 2012 Golubev Alexander +# fatzer2 (AT) gmail.com +# +# Improvements and feedback are welcome +# +# This file is released under GPL >= 2 +# +################################################# + +add_subdirectory( icons ) +add_subdirectory( irkick ) +add_subdirectory( kcmlirc ) +add_subdirectory( tdelirc ) +add_subdirectory( profiles ) +add_subdirectory( remotes ) diff --git a/tdelirc/COPYING b/tdelirc/COPYING new file mode 100644 index 0000000..c13faf0 --- /dev/null +++ b/tdelirc/COPYING @@ -0,0 +1,340 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + 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 + + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General +Public License instead of this License. diff --git a/tdelirc/Makefile.am b/tdelirc/Makefile.am new file mode 100644 index 0000000..1b42dee --- /dev/null +++ b/tdelirc/Makefile.am @@ -0,0 +1,3 @@ + +SUBDIRS = icons tdelirc irkick kcmlirc profiles remotes + diff --git a/tdelirc/README b/tdelirc/README new file mode 100644 index 0000000..8ae6875 --- /dev/null +++ b/tdelirc/README @@ -0,0 +1,55 @@ +tdelirc +------- + +TDELIRC is a TDE frontend for the Linux Infrared Remote Control system. It has +two aims: + +1. Provide a control center module for configuration of: + a) Application bindings to remote control buttons. + b) Actual remote controls installed (i.e. lirc configuration). + +2. Provide a system-tray applet to act as a proxy between the LIRC system and + TDE (applications), in order to launch DCOP requests (and potentially + other IPC signals) to applications (and potentially collect/display + results). + +INSTALLATION + +Nothing but the normal ./configure && make && su -c "make install". + +SETUP + +For the TDELirc system to work properly, you *must* have lircd configured and +running. If you have already had a Lirc program running, then you most likely +have Lirc set up properly. If not, be sure that you have a correct kernel module +loaded for your IR receiver (1) and that the lircd program is running (2). + +You must also have some remote controls configured in "/etc/lircd.conf". Go to +the lircd website (www.lirc.org) for more information on this. + +(1) /sbin/lsmod | grep lirc +If you see some output, you have a lirc kernel module loaded (that's not to say +it's the right module for your hardware). + +(2) ps aux | grep -v grep | grep lircd +If you see some output, you have the lircd program running. This is good. + +DESIGN + +The design of the system is really quite simple---a control center module +modifies a centralised configuration file to determine what action(s) should +be taken on a remote control's button press. + +The same(?) module also provides a front-end for the input of /etc/lircd.conf, +necessary to specify remote controls to the LIRC system. An extra (standard +format XML-based) may be provided with the remote control description to give +less sucky (lower case, no spaces/symbols) names. + +The /etc/lircd.conf frontend has not yet been implemented, though all other +features are. + +The system tray applet interfaces with LIRC in order to catch key presses on +remote controls. It is then able to communicate with and potentially start +applications through DCOP. + +Gav Wood, 2003 (gav at kde dot org). diff --git a/tdelirc/README.profile-creation b/tdelirc/README.profile-creation new file mode 100644 index 0000000..80ec429 --- /dev/null +++ b/tdelirc/README.profile-creation @@ -0,0 +1,145 @@ +How to give your KDE application IR support under KDE. +====================================================== + +by Gav Wood, 2003. + +Introduction +------------ + +All DCOP-using applications under KDE have basic lirc support, since TDELirc has +the ability to interface any button to any DCOP call. However, to give your +application the real professional touch when using it with TDELirc, I recommend +you create a profile for it. + +A profile tells TDELirc (and the user!) what the various DCOP calls do. +Essentially this is a kind of documentation for the DCOP calls. You don't have +to include all DCOP calls - just the ones that you feel would benefit end-users +the most (usually "interface adjusting" calls rather the "information gathering" +calls). + + +Method +------ + +1. DCOP + +The first thing to do is to give your application DCOP functionality. This is +*very* easy and essentially amounts to adding a declaration to each object you +want to give DCOP accessibility and adding an entry to your Makefile. I wont go +into it here as the KDE documentation already provides a suitable resource for +such information. + +Ensure you provide a full accessibility to your application's interface by DCOP, +and especially in the case of IR-interfacing, try not to have functions with too +many parameters, or with exotic types (stick to ints and QStrings where +necessary). + +2. Create a profile + +Having coded the necessary DCOP functionality into your application, the only +other thing to do is describe how it works to the user. This is done by means of +a .profile.xml document, examples of which may be found in the tdelirc/profiles +directory. A quick guide is given here: + +a) First create top level "profile" tags with the DCOP application id and KDE +service name (found in the .desktop file) as attributes of them: + + + + + + +b) Inside populate with name and author information. If your application is not a +KUniqueApplication, you **must** declare this with an "instances" tag, giving the +attribute "unique" a value of "0" (it defaults to "1", a KUniqueApplication). You +may optionally describe the default behavior TDELirc should take should there be +more than one instance of the application, with the attribute "ifmulti" which may +take one of "dontsend" (do nothing if >1 instance), "sendtoone" (send call to one +arbitrarily chosen instance) and "sendtoall" (send to all instances). The default +is "dontsend", however, "sendtoone" may be the most useful in many circumstances. + + + + + My Application + Me + + + +c) Populate the profile with action tags, for each DCOP action you want to be +available to the user. Each action tag should have DCOP object name and function +prototype. + Several optional attrubutes to specify are the key-class (an identifier to +act as an abstract binding between remote controls and applications). There are +several defined; see the DTD files for a current list. The other options, repeat +and autostart are boolean specificers to tell whether the action should repeat +or automatically start the program by default. + + + + + My Application + Me + + + + + +d) Give the action a name and comment: + + + + + My Application + Me + + + Show Integers + Shows a configurable integer + + + +e) Describe each argument with a comment and type attribute. Valid types are +found in the profile.dtd file. If you cant find the exact type, just use one +that is silently castable. You should declare a default value between the +default tags: + + + + + My Application + Me + + + Show Integers + Shows a configurable integer + + 5 + The integer to be shown + + + + +When you have created your profile.xml file, put in your project's main source +tree. + +3. Profile installation + +There is a data directory in KDE reserved for profiles such as these; it's path +is "$(kde_datadir)/profiles". These extra lines must therefore be added to your +Makefile.am in the directory of your profile.xml: + + profiledata_DATA = [YOURAPPHERE].profile.xml + profiledatadir = $(kde_datadir)/profiles + EXTRA_DIST = $(profiledata_DATA) + +(replace [YOURAPPHERE] with your application name---the prefix to your +profile.xml file.) + + +4. Finished + +That's it you're done! Your KDE application is now fully IR enabled. diff --git a/tdelirc/README.remote-creation b/tdelirc/README.remote-creation new file mode 100644 index 0000000..a9342c5 --- /dev/null +++ b/tdelirc/README.remote-creation @@ -0,0 +1,129 @@ +How to give your LIRC remote control TDELIRC functionality +========================================================== + +by Gav Wood, 2003. + +Introduction +------------ + +All LIRC-understandable remote controls automatically function in TDELirc. +However, to get the advanced (really cool) TDELirc stuff you'll need to create a +remote.xml file for your remote control. The files are simple and easy to create +so don't be put off. + +The function of the remote.xml file is to describe what the remote controls' +buttons do in a general manner and to provide free-form text names for them, +since LIRC only allows non-spaces, non-symbolic charecters in the remote control +definition files. + +When you're finished your remote.xml, you might want to send it to me +(gav at kde dot org) for inclusion in the distribution of TDELirc. It may soon +be possible to distribute the remote.xml files along with the lircd.conf files. + +Method +------ + +a) Start with the basic template and define the LIRC ID of the remote control. +The LIRC ID is most important, and must be the identifier (look for the line +"name <...>" after the "begin remote" line). put the text after "name" into "id" +attribute of the "remote" tag in the "lircd.conf" file ("/etc/lircd.conf"). + In addition to this, fill in the author and name tags with your name and the +"nice" name of the remote control. Any extra information you may wish to give it +(such as alternate names, multimedia bundles/system is comes with etc) may be +enclosed between optional information tags: + + + + + + My Remote Control + Me + As bundled with ACME LinTV + + +This would compliment a "lircd.conf" file: + + begin remote + name myremote + ... + end remote + +b) With the hard work out of the way, just start going though each button on the +remote control. For each button, make sure the "id" attribute is the same as in +the lircd.conf file. + For each (common) button, you might also want to specify the class, which will +help TDELirc match it to any application's action. For a list of all button +classes, look in the remote.dtd file which comes with TDELirc. If the class type +is one which encompasses many buttons, for example "number", then you should also +specify which number it is in the parameter attribute. Currently, this only +actually applies to "number" - all other classes are simple and do not require a +parameter attribute. + Note: If no "class" is given, it will default to the "id". In the unlikely +case that this is not what you want, simply define it to be null (class=""). + + + + + + My Remote Control + Me + + + + +This would compliment a "lircd.conf" file: + + begin remote + name myremote + ... + begin raw_codes + name num0 + ... + name rec + ... + end raw_codes + end remote + +c) The last thing to define in each of your buttons is the "nice" name. This may +be descriptive and use spaces, symbols and mixed case text, in a similar fashion +to the remote control's name. There is no need to copy the remote control's label +verbatim. If necessary expand the description to provide a readable, aethetically +pleasing label e.g. you should name the "CC" button "Closed Captions" or the "Rec" +button "Record". + + + + + + My Remote Control + Me + + + + + Note: The name of a button will automatically default to its "id", so you can +save yourself some time and effort with buttons which share the same name and id +by changing + + + +to the far less cluttered and simpler: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tdelirc/remotes/cimr100.remote.xml b/tdelirc/remotes/cimr100.remote.xml new file mode 100644 index 0000000..5dfc36d --- /dev/null +++ b/tdelirc/remotes/cimr100.remote.xml @@ -0,0 +1,31 @@ + + + + + Creative CIMR-100 + Gav Wood + + + + + + + + + + + + + + + diff --git a/tdelirc/remotes/hauppauge.remote.xml b/tdelirc/remotes/hauppauge.remote.xml new file mode 100644 index 0000000..4d2a402 --- /dev/null +++ b/tdelirc/remotes/hauppauge.remote.xml @@ -0,0 +1,29 @@ + + + + + Hauppauge + Dirk Ziegelmeier + Bundled with WinTV PCI, PVR + + + + + + + + + + + + diff --git a/tdelirc/remotes/remote.dtd b/tdelirc/remotes/remote.dtd new file mode 100644 index 0000000..a09b4b6 --- /dev/null +++ b/tdelirc/remotes/remote.dtd @@ -0,0 +1,15 @@ + + + + + + + + + + + + + diff --git a/tdelirc/remotes/sherwood.remote.xml b/tdelirc/remotes/sherwood.remote.xml new file mode 100644 index 0000000..db628ba --- /dev/null +++ b/tdelirc/remotes/sherwood.remote.xml @@ -0,0 +1,61 @@ + + + + + Sherwood RM-RD-61 + Gav Wood + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tdelirc/remotes/sonytv.remote.xml b/tdelirc/remotes/sonytv.remote.xml new file mode 100644 index 0000000..4e5ee97 --- /dev/null +++ b/tdelirc/remotes/sonytv.remote.xml @@ -0,0 +1,30 @@ + + + + + SonyTV + Bundled with some Sony TVs + Dirk Ziegelmeier + + + + + + + + + + + + + diff --git a/tdelirc/tdelirc/CMakeLists.txt b/tdelirc/tdelirc/CMakeLists.txt new file mode 100644 index 0000000..2893472 --- /dev/null +++ b/tdelirc/tdelirc/CMakeLists.txt @@ -0,0 +1,32 @@ +################################################# +# +# (C) 2012 Golubev Alexander +# fatzer2 (AT) gmail.com +# +# Improvements and feedback are welcome +# +# This file is released under GPL >= 2 +# +################################################# + +include_directories( + ${CMAKE_BINARY_DIR} + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_CURRENT_SOURCE_DIR} + ${TDE_INCLUDE_DIR} + ${TQT_INCLUDE_DIRS} +) + +link_directories( + ${TQT_LIBRARY_DIRS} +) + + +##### tdelirc (static) ########################## + +tde_add_library( tdelirc STATIC_PIC + SOURCES iraction.cpp arguments.cpp + iractions.cpp prototype.cpp modes.cpp + mode.cpp profileserver.cpp remoteserver.cpp +) + diff --git a/tdelirc/tdelirc/Makefile.am b/tdelirc/tdelirc/Makefile.am new file mode 100644 index 0000000..e488f85 --- /dev/null +++ b/tdelirc/tdelirc/Makefile.am @@ -0,0 +1,45 @@ +####### tdevelop will overwrite this part!!! (begin)########## +noinst_LTLIBRARIES = libtdelirc.la + +noinst_HEADERS = iraction.h arguments.h iractions.h prototype.h modes.h mode.h profileserver.h remoteserver.h + +libtdelirc_la_SOURCES = iraction.cpp arguments.cpp iractions.cpp prototype.cpp modes.cpp mode.cpp profileserver.cpp remoteserver.cpp +libtdelirc_la_LIBADD = $(LIB_QT) $(LIB_TDECORE) $(LIB_TDEUI) $(LIBSOCKET) + +####### tdevelop will overwrite this part!!! (end)############ +# These paths are TDE specific. Use them: +# kde_appsdir Where your application's menu entry (.desktop) should go to. +# kde_icondir Where your icon should go to - better use KDE_ICON. +# kde_sounddir Where your sounds should go to. +# kde_htmldir Where your docs should go to. (contains lang subdirs) +# kde_datadir Where you install application data. (Use a subdir) +# kde_locale Where translation files should go to. (contains lang subdirs) +# kde_cgidir Where cgi-bin executables should go to. +# kde_confdir Where config files should go to (system-wide ones with default values). +# kde_mimedir Where mimetypes .desktop files should go to. +# kde_servicesdir Where services .desktop files should go to. +# kde_servicetypesdir Where servicetypes .desktop files should go to. +# kde_toolbardir Where general toolbar icons should go to (deprecated, use KDE_ICON). +# kde_wallpaperdir Where general wallpapers should go to. +# kde_irkicksdir Where irkicks for the "New" menu (Konqueror/KDesktop) should go to. +# kde_bindir Where executables should go to. Use bin_PROGRAMS or bin_SCRIPTS. +# kde_libdir Where shared libraries should go to. Use lib_LTLIBRARIES. +# kde_moduledir Where modules (e.g. parts) should go to. Use kde_module_LTLIBRARIES. +# kde_styledir Where Qt/TDE widget styles should go to (new in KDE 3). +# kde_designerdir Where Qt Designer plugins should go to (new in KDE 3). + +# set the include path for X, qt and TDE +INCLUDES = $(all_includes) + +METASOURCES = AUTO + +# the library search path. +libtdelirc_la_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor + +# Uncomment the following two lines if you add a ui.rc file for your application to make use of +# KDE´s XML GUI builing +#rcdir = $(kde_datadir)/irkick +#rc_DATA = irkickui.rc + +messages: + $(XGETTEXT) *.cpp *.h -o $(podir)/tdelirc.pot diff --git a/tdelirc/tdelirc/arguments.cpp b/tdelirc/tdelirc/arguments.cpp new file mode 100644 index 0000000..fc678ce --- /dev/null +++ b/tdelirc/tdelirc/arguments.cpp @@ -0,0 +1,36 @@ +// +// +// C++ Implementation: $MODULE$ +// +// Description: +// +// +// Author: Gav Wood , (C) 2003 +// +// Copyright: See COPYING file that comes with this distribution +// +// +#include + +#include "arguments.h" + +Arguments::Arguments() +{ +} + +Arguments::~Arguments() +{ +} + +const TQString Arguments::toString() const +{ + TQString ret = ""; + for(Arguments::const_iterator i = begin(); i != end(); ++i) + { TQString s = (*i).toString(); + if(s.isNull()) s = "..."; + if(i != begin()) ret += ", "; + ret += s; + } + return ret; +} + diff --git a/tdelirc/tdelirc/arguments.h b/tdelirc/tdelirc/arguments.h new file mode 100644 index 0000000..dae1f5c --- /dev/null +++ b/tdelirc/tdelirc/arguments.h @@ -0,0 +1,32 @@ +// +// +// C++ Interface: $MODULE$ +// +// Description: +// +// +// Author: Gav Wood , (C) 2003 +// +// Copyright: See COPYING file that comes with this distribution +// +// +#ifndef ARGUMENTS_H +#define ARGUMENTS_H + +#include +#include + +/** +@author Gav Wood +*/ + +class Arguments : public TQValueList +{ +public: + const TQString toString() const; + + Arguments(); + ~Arguments(); +}; + +#endif diff --git a/tdelirc/tdelirc/iraction.cpp b/tdelirc/tdelirc/iraction.cpp new file mode 100644 index 0000000..46b581f --- /dev/null +++ b/tdelirc/tdelirc/iraction.cpp @@ -0,0 +1,155 @@ +// +// +// C++ Implementation: $MODULE$ +// +// Description: +// +// +// Author: Gav Wood , (C) 2003 +// +// Copyright: See COPYING file that comes with this distribution +// +// + +#include + +#include +#include + +#include "iraction.h" +#include "profileserver.h" +#include "remoteserver.h" + +IRAction::IRAction(const TQString &newProgram, const TQString &newObject, const TQString &newMethod, const Arguments &newArguments, const TQString &newRemote, const TQString &newMode, const TQString &newButton, const bool newRepeat, const bool newAutoStart, const bool newDoBefore, const bool newDoAfter, const bool newUnique, const IfMulti newIfMulti) +{ + theProgram = newProgram; + theObject = newObject; + theMethod = newMethod; + theArguments = newArguments; + theRemote = newRemote; + theMode = newMode; + theButton = newButton; + theRepeat = newRepeat; + theDoAfter = newDoAfter; + theDoBefore = newDoBefore; + theAutoStart = newAutoStart; + theUnique = newUnique; + theIfMulti = newIfMulti; +} + +const IRAction &IRAction::loadFromConfig(TDEConfig &theConfig, int index) +{ + TQString Binding = "Binding" + TQString().setNum(index); + int numArguments = theConfig.readNumEntry(Binding + "Arguments"); + theArguments.clear(); + for(int j = 0; j < numArguments; j++) + { TQVariant::Type theType = (TQVariant::Type)theConfig.readNumEntry(Binding + "ArgumentType" + TQString().setNum(j), TQVariant::String); + theArguments += theConfig.readPropertyEntry(Binding + "Argument" + TQString().setNum(j), theType == TQVariant::CString ? TQVariant::String : theType); + theArguments.last().cast(theType); + } + + theProgram = theConfig.readEntry(Binding + "Program"); + theObject = theConfig.readEntry(Binding + "Object"); + theMethod.setPrototype(theConfig.readEntry(Binding + "Method")); + theRemote = theConfig.readEntry(Binding + "Remote"); + theMode = theConfig.readEntry(Binding + "Mode"); + theButton = theConfig.readEntry(Binding + "Button"); + theRepeat = theConfig.readBoolEntry(Binding + "Repeat"); + theDoBefore = theConfig.readBoolEntry(Binding + "DoBefore"); + theDoAfter = theConfig.readBoolEntry(Binding + "DoAfter"); + theAutoStart = theConfig.readBoolEntry(Binding + "AutoStart"); + theUnique = theConfig.readBoolEntry(Binding + "Unique", true); + theIfMulti = (IfMulti)theConfig.readNumEntry(Binding + "IfMulti", IM_DONTSEND); + + return *this; +} + +void IRAction::saveToConfig(TDEConfig &theConfig, int index) const +{ + TQString Binding = "Binding" + TQString().setNum(index); + + theConfig.writeEntry(Binding + "Arguments", theArguments.count()); + for(unsigned j = 0; j < theArguments.count(); j++) + { TQVariant arg = theArguments[j]; + TQVariant::Type preType = arg.type(); + if(preType == TQVariant::CString) arg.cast(TQVariant::String); + theConfig.writeEntry(Binding + "Argument" + TQString().setNum(j), arg); + theConfig.writeEntry(Binding + "ArgumentType" + TQString().setNum(j), preType); + } + theConfig.writeEntry(Binding + "Program", theProgram); + theConfig.writeEntry(Binding + "Object", theObject); + theConfig.writeEntry(Binding + "Method", theMethod.prototype()); + theConfig.writeEntry(Binding + "Remote", theRemote); + theConfig.writeEntry(Binding + "Mode", theMode); + theConfig.writeEntry(Binding + "Button", theButton); + theConfig.writeEntry(Binding + "Repeat", theRepeat); + theConfig.writeEntry(Binding + "DoBefore", theDoBefore); + theConfig.writeEntry(Binding + "DoAfter", theDoAfter); + theConfig.writeEntry(Binding + "AutoStart", theAutoStart); + theConfig.writeEntry(Binding + "Unique", theUnique); + theConfig.writeEntry(Binding + "IfMulti", theIfMulti); +} + +const TQString IRAction::function() const +{ + ProfileServer *theServer = ProfileServer::profileServer(); + if(theProgram.isEmpty()) + if(theObject.isEmpty()) + return i18n("Exit mode"); + else + return i18n("Switch to %1").arg(theObject); + else + if(theObject.isEmpty()) + return i18n("Just start"); + else + { + const ProfileAction *a = theServer->getAction(theProgram, theObject, theMethod.prototype()); + if(a) + return a->name(); + else + return theObject + "::" + theMethod.name(); + } +} + +const TQString IRAction::notes() const +{ + + if(isModeChange()) + return TQString(theDoBefore ? i18n("Do actions before. ") : "") + + TQString(theDoAfter ? i18n("Do actions after. ") : ""); + else if(isJustStart()) + return ""; + else + return TQString(theAutoStart ? i18n("Auto-start. ") : "") + + TQString(theRepeat ? i18n("Repeatable. ") : "") + + TQString(!theUnique ? (theIfMulti == IM_DONTSEND ? i18n("Do nothing if many instances. ") + : theIfMulti == IM_SENDTOTOP ? i18n("Send to top instance. ") + : theIfMulti == IM_SENDTOBOTTOM ? i18n("Send to bottom instance. ") : i18n("Send to all instances. ")) + : ""); +} + +const TQString IRAction::application() const +{ + ProfileServer *theServer = ProfileServer::profileServer(); + if(theProgram.isEmpty()) + return ""; + else + { + const Profile *a = theServer->profiles()[theProgram]; + if(a) + return a->name(); + else + return theProgram; + } +} + +const TQString IRAction::remoteName() const +{ + return RemoteServer::remoteServer()->getRemoteName(theRemote); +} + +const TQString IRAction::buttonName() const +{ + return RemoteServer::remoteServer()->getButtonName(theRemote, theButton); +} + diff --git a/tdelirc/tdelirc/iraction.h b/tdelirc/tdelirc/iraction.h new file mode 100644 index 0000000..14d0354 --- /dev/null +++ b/tdelirc/tdelirc/iraction.h @@ -0,0 +1,88 @@ +// +// +// C++ Interface: $MODULE$ +// +// Description: +// +// +// Author: Gav Wood , (C) 2003 +// +// Copyright: See COPYING file that comes with this distribution +// +// +#ifndef IRACTION_H +#define IRACTION_H + +#include + +#include "prototype.h" +#include "arguments.h" +#include "profileserver.h" + +/** +@author Gav Wood +*/ + +class TDEConfig; + +class IRAction +{ + TQString theProgram, theObject, theRemote, theButton, theMode; + Prototype theMethod; + Arguments theArguments; + bool theRepeat, theAutoStart, theDoBefore, theDoAfter; + IfMulti theIfMulti; + bool theUnique; + +public: + // load/save convenience functions + const IRAction &loadFromConfig(TDEConfig &theConfig, int index); + void saveToConfig(TDEConfig &theConfig, int index) const; + + // may be changed to a profile-based representation in the future. + const TQString function() const; + const TQString application() const; + const TQString buttonName() const; + const TQString remoteName() const; + const TQString notes() const; + + // bog standard raw DCOP stuff + const TQString &program() const { return theProgram; } + const TQString &object() const { return theObject; } + const Prototype &method() const { return theMethod; } + const TQString &remote() const { return theRemote; } + const TQString &mode() const { return theMode; } + const TQString &button() const { return theButton; } + const Arguments arguments() const { if(theProgram != "" && theObject != "") return theArguments; return Arguments(); } + const bool repeat() const { return theRepeat; } + const bool autoStart() const { return theAutoStart; } + const IfMulti ifMulti() const { return theIfMulti; } + const bool unique() const { return theUnique; } + + const TQString &modeChange() const { return theObject; } + const bool doBefore() const { return theDoBefore; } + const bool doAfter() const { return theDoAfter; } + + bool isModeChange() const { return theProgram == ""; } + bool isJustStart() const { return theProgram != "" && theObject == ""; } + + void setProgram(const TQString &newProgram) { theProgram = newProgram; } + void setObject(const TQString &newObject) { theObject = newObject; } + void setMethod(const Prototype &newMethod) { theMethod = newMethod; } + void setRemote(const TQString &newRemote) { theRemote = newRemote; } + void setMode(const TQString &newMode) { theMode = newMode; } + void setButton(const TQString &newButton) { theButton = newButton; } + void setArguments(const Arguments &newArguments) { theArguments = newArguments; } + void setRepeat(bool newRepeat) { theRepeat = newRepeat; } + void setDoBefore(bool a) { theDoBefore = a; } + void setDoAfter(bool a) { theDoAfter = a; } + void setAutoStart(bool newAutoStart) { theAutoStart = newAutoStart; } + void setModeChange(const TQString &a) { theObject = a; } + void setIfMulti(const IfMulti a) { theIfMulti = a; } + void setUnique(const bool a) { theUnique = a; } + + IRAction(const TQString &newProgram, const TQString &newObject, const TQString &newMethod, const Arguments &newArguments, const TQString &newRemote, const TQString &newMode, const TQString &newButton, const bool newRepeat, const bool newAutoStart, const bool newDoBefore, const bool newDoAfter, const bool newUnique, const IfMulti newIfMulti); + IRAction() { theProgram = TQString(); } +}; + +#endif diff --git a/tdelirc/tdelirc/iractions.cpp b/tdelirc/tdelirc/iractions.cpp new file mode 100644 index 0000000..85d144e --- /dev/null +++ b/tdelirc/tdelirc/iractions.cpp @@ -0,0 +1,90 @@ +// +// +// C++ Implementation: $MODULE$ +// +// Description: +// +// +// Author: Gav Wood , (C) 2003 +// +// Copyright: See COPYING file that comes with this distribution +// +// +#include +#include + +#include "iractions.h" +#include "iraction.h" + +void IRActions::loadFromConfig(TDEConfig &theConfig) +{ + clear(); + int numBindings = theConfig.readNumEntry("Bindings"); + for(int i = 0; i < numBindings; i++) + addAction(IRAction().loadFromConfig(theConfig, i)); +} + +void IRActions::purgeAllBindings(TDEConfig &theConfig) +{ + int numBindings = theConfig.readNumEntry("Bindings"); + for(int i = 0; i < numBindings; i++) + { TQString Binding = "Binding" + TQString().setNum(i); + int numArguments = theConfig.readNumEntry(Binding + "Arguments"); + for(int j = 0; j < numArguments; j++) + { theConfig.deleteEntry(Binding + "Argument" + TQString().setNum(j)); + theConfig.deleteEntry(Binding + "ArgumentType" + TQString().setNum(j)); + } + theConfig.deleteEntry(Binding + "Arguments"); theConfig.deleteEntry(Binding + "Program"); + theConfig.deleteEntry(Binding + "Object"); theConfig.deleteEntry(Binding + "Method"); + theConfig.deleteEntry(Binding + "Remote"); theConfig.deleteEntry(Binding + "Button"); + theConfig.deleteEntry(Binding + "Repeat"); theConfig.deleteEntry(Binding + "Mode"); + } +} + +void IRActions::saveToConfig(TDEConfig &theConfig) +{ + int index = 0; + purgeAllBindings(theConfig); + for(iterator i = begin(); i != end(); ++i,index++) + (*i).saveToConfig(theConfig, index); + theConfig.writeEntry("Bindings", index); +} + +IRAIt IRActions::addAction(const IRAction &theAction) +{ + return append(theAction); +} + +IRAItList IRActions::findByButton(const TQString &remote, const TQString &button) +{ + IRAItList ret; + for(iterator i = begin(); i != end(); ++i) + if((*i).remote() == remote && (*i).button() == button) + ret += i; + return ret; +} + +void IRActions::renameMode(const Mode &mode, const TQString &to) +{ + for(iterator i = begin(); i != end(); ++i) + { if((*i).remote() == mode.remote() && (*i).mode() == mode.name()) (*i).setMode(to); + if((*i).isModeChange() && (*i).modeChange() == mode.name()) (*i).setModeChange(to); + } +} + +IRAItList IRActions::findByMode(const Mode &mode) +{ + IRAItList ret; + for(iterator i = begin(); i != end(); ++i) + if((*i).remote() == mode.remote() && (*i).mode() == mode.name()) ret += i; + return ret; +} + +IRAItList IRActions::findByModeButton(const Mode &mode, const TQString &button) +{ + IRAItList ret; + for(iterator i = begin(); i != end(); ++i) + if((*i).remote() == mode.remote() && (*i).mode() == mode.name() && (*i).button() == button) + ret += i; + return ret; +} diff --git a/tdelirc/tdelirc/iractions.h b/tdelirc/tdelirc/iractions.h new file mode 100644 index 0000000..4c44c46 --- /dev/null +++ b/tdelirc/tdelirc/iractions.h @@ -0,0 +1,52 @@ +// +// +// C++ Interface: $MODULE$ +// +// Description: +// +// +// Author: Gav Wood , (C) 2003 +// +// Copyright: See COPYING file that comes with this distribution +// +// +#ifndef IRACTIONS_H +#define IRACTIONS_H + +#include +#include +#include +#include + +#include "iraction.h" +#include "mode.h" + +/** +@author Gav Wood +*/ + +class TDEConfig; + +typedef TQValueListIterator IRAIt; +typedef TQValueList IRAItList; + +class IRActions: protected TQValueList +{ +private: + void purgeAllBindings(TDEConfig &theConfig); + +public: + IRAIt addAction(const IRAction &theAction); + IRAItList findByButton(const TQString &remote, const TQString &button); + IRAItList findByMode(const Mode &mode); + IRAItList findByModeButton(const Mode &mode, const TQString &button); + + void erase(const IRAIt &action) { TQValueList::erase(action); } + void renameMode(const Mode &mode, const TQString &to); + + void loadFromConfig(TDEConfig &theConfig); + void saveToConfig(TDEConfig &theConfig); +}; + + +#endif diff --git a/tdelirc/tdelirc/mode.cpp b/tdelirc/tdelirc/mode.cpp new file mode 100644 index 0000000..9402573 --- /dev/null +++ b/tdelirc/tdelirc/mode.cpp @@ -0,0 +1,51 @@ +// +// +// C++ Implementation: $MODULE$ +// +// Description: +// +// +// Author: Gav Wood , (C) 2003 +// +// Copyright: See COPYING file that comes with this distribution +// +// + +#include + +#include "modes.h" +#include "mode.h" + +Mode::Mode() : theName(TQString()) +{ +} + +Mode::Mode(const TQString &remote, const TQString &name, const TQString &iconFile) +{ + theRemote = remote; + theName = name; + theIconFile = iconFile; +} + +Mode::~Mode() +{ +} + +const Mode &Mode::loadFromConfig(TDEConfig &theConfig, int index) +{ + TQString Prefix = "Mode" + TQString().setNum(index); + theName = theConfig.readEntry(Prefix + "Name"); + theRemote = theConfig.readEntry(Prefix + "Remote"); + theIconFile = theConfig.readEntry(Prefix + "IconFile"); + if(theIconFile.isEmpty()) theIconFile = TQString(); + return *this; +} + +void Mode::saveToConfig(TDEConfig &theConfig, int index) +{ + TQString Prefix = "Mode" + TQString().setNum(index); + theConfig.writeEntry(Prefix + "Name", theName); + theConfig.writeEntry(Prefix + "Remote", theRemote); + theConfig.writeEntry(Prefix + "IconFile", theIconFile); +} + diff --git a/tdelirc/tdelirc/mode.h b/tdelirc/tdelirc/mode.h new file mode 100644 index 0000000..55b7b0a --- /dev/null +++ b/tdelirc/tdelirc/mode.h @@ -0,0 +1,50 @@ +// +// +// C++ Interface: $MODULE$ +// +// Description: +// +// +// Author: Gav Wood , (C) 2003 +// +// Copyright: See COPYING file that comes with this distribution +// +// +#ifndef MODE_H +#define MODE_H + +#include + +#include "remoteserver.h" + +/** +@author Gav Wood +*/ + +class TDEConfig; + +class Mode +{ + TQString theName, theRemote, theIconFile; + +public: + void setName(const TQString &a) { theName = a; } + void setRemote(const TQString &a) { theRemote = a; } + void setIconFile(const TQString &a) { theIconFile = a; } + + const TQString &name() const { return theName; } + const TQString &remote() const { return theRemote; } + const TQString &iconFile() const { return theIconFile; } + const TQString &remoteName() const { return RemoteServer::remoteServer()->getRemoteName(theRemote); } + + const Mode &loadFromConfig(TDEConfig &theConfig, int index); + void saveToConfig(TDEConfig &theConfig, int index); + + bool operator==(const Mode &mode) const { return mode.theName == theName && mode.theRemote == theRemote; } + + Mode(); + Mode(const TQString &remote, const TQString &name, const TQString &iconFile = TQString()); + ~Mode(); +}; + +#endif diff --git a/tdelirc/tdelirc/modes.cpp b/tdelirc/tdelirc/modes.cpp new file mode 100644 index 0000000..8eedce0 --- /dev/null +++ b/tdelirc/tdelirc/modes.cpp @@ -0,0 +1,128 @@ +// +// +// C++ Implementation: $MODULE$ +// +// Description: +// +// +// Author: Gav Wood , (C) 2003 +// +// Copyright: See COPYING file that comes with this distribution +// +// +#include +#include + +#include "modes.h" +#include "mode.h" + +Modes::Modes() +{ +} + + +Modes::~Modes() +{ +} + +void Modes::loadFromConfig(TDEConfig &theConfig) +{ + clear(); + int numModes = theConfig.readNumEntry("Modes"); + for(int i = 0; i < numModes; i++) + { + add(Mode().loadFromConfig(theConfig, i)); + } + + for(iterator i = begin(); i != end(); ++i) + theDefaults[i.key()] = theConfig.readEntry("Default" + i.key()); +} + +void Modes::generateNulls(const TQStringList &theRemotes) +{ + for(TQStringList::const_iterator i = theRemotes.begin(); i != theRemotes.end(); ++i) + { if(!contains(*i) || !operator[](*i).contains("")) operator[](*i)[""] = Mode(*i, ""); + if(!theDefaults.contains(*i)) theDefaults[*i].isEmpty(); + } +} + +bool Modes::isDefault(const Mode &mode) const +{ + if(theDefaults[mode.remote()] == mode.name()) + return true; +// if(theDefaults[mode.remote()].isEmpty() || theDefaults[mode.remote()].isNull()) +// return mode.name().isEmpty(); + return false; +} + +const Mode Modes::getDefault(const TQString &remote) const +{ +// if(theDefaults[remote] == TQString()) +// return Mode(remote, ""); + if(contains(remote)) + if(operator[](remote).contains(theDefaults[remote])) + return operator[](remote)[theDefaults[remote]]; + else return Mode(remote, ""); + else return Mode(remote, ""); + +} + +void Modes::purgeAllModes(TDEConfig &theConfig) +{ + int numModes = theConfig.readNumEntry("Modes"); + for(int i = 0; i < numModes; i++) + { TQString Prefix = "Mode" + TQString().setNum(i); + theConfig.deleteEntry(Prefix + "Name"); + theConfig.deleteEntry(Prefix + "Remote"); + } +} + +void Modes::saveToConfig(TDEConfig &theConfig) +{ + int index = 0; + purgeAllModes(theConfig); + for(iterator i = begin(); i != end(); ++i) + for(TQMap::iterator j = (*i).begin(); j != (*i).end(); ++j,index++) + (*j).saveToConfig(theConfig, index); + theConfig.writeEntry("Modes", index); + + for(iterator i = begin(); i != end(); ++i) + if(theDefaults[i.key()] == TQString()) + theConfig.writeEntry("Default" + i.key(), ""); + else + theConfig.writeEntry("Default" + i.key(), theDefaults[i.key()]); +} + +const Mode &Modes::getMode(const TQString &remote, const TQString &mode) const +{ + return operator[](remote)[mode]; +} + +ModeList Modes::getModes(const TQString &remote) const +{ + ModeList ret; + for(TQMap::const_iterator i = operator[](remote).begin(); i != operator[](remote).end(); ++i) + ret += *i; + return ret; +} + +void Modes::erase(const Mode &mode) +{ + operator[](mode.remote()).erase(mode.name()); +} + +void Modes::add(const Mode &mode) +{ + kdDebug() << "adding a mode " << mode.name() << " to remote " << mode.remote() << endl; + operator[](mode.remote())[mode.name()] = mode; +} + +void Modes::rename(Mode &mode, const TQString name) +{ + bool was = isDefault(mode); + erase(mode); + mode.setName(name); + if(was) setDefault(mode); + add(mode); +} + diff --git a/tdelirc/tdelirc/modes.h b/tdelirc/tdelirc/modes.h new file mode 100644 index 0000000..d0de17a --- /dev/null +++ b/tdelirc/tdelirc/modes.h @@ -0,0 +1,62 @@ +// +// +// C++ Interface: $MODULE$ +// +// Description: +// +// +// Author: Gav Wood , (C) 2003 +// +// Copyright: See COPYING file that comes with this distribution +// +// +#ifndef MODES_H +#define MODES_H + +#include +#include +#include +#include + +#include "mode.h" + +/** +@author Gav Wood +*/ + +class TDEConfig; + +typedef TQValueList ModeList; + +class Modes : protected TQMap > +{ + void purgeAllModes(TDEConfig &theConfig); + TQMap theDefaults; + +public: + void loadFromConfig(TDEConfig &theConfig); + void saveToConfig(TDEConfig &theConfig); + void generateNulls(const TQStringList &theRemotes); + + const Mode &getMode(const TQString &remote, const TQString &mode) const; + ModeList getModes(const TQString &remote) const; + const Mode getDefault(const TQString &remote) const; + bool isDefault(const Mode &mode) const; + + /** + * Call when you've changed a previously getMode'd mode and you want the changes + * to be recorded + **/ + void updateMode(const Mode &mode) { operator[](mode.remote())[mode.name()] = mode; } + void setDefault(const Mode &mode) { theDefaults[mode.remote()] = mode.name(); } + void erase(const Mode &mode); + void add(const Mode &mode); + + // dont use this without renaming all the modes in the actions!!! + void rename(Mode &mode, const TQString name); + + Modes(); + ~Modes(); +}; + +#endif diff --git a/tdelirc/tdelirc/profileserver.cpp b/tdelirc/tdelirc/profileserver.cpp new file mode 100644 index 0000000..ba39442 --- /dev/null +++ b/tdelirc/tdelirc/profileserver.cpp @@ -0,0 +1,159 @@ +// +// +// C++ Implementation: $MODULE$ +// +// Description: +// +// +// Author: Gav Wood , (C) 2003 +// +// Copyright: See COPYING file that comes with this distribution +// +// + +#include +#include + +#include +#include +#include + +#include "profileserver.h" + +ProfileServer *ProfileServer::theInstance = 0; + +ProfileServer::ProfileServer() +{ + theProfiles.setAutoDelete(true); + loadProfiles(); +} + +ProfileServer::~ProfileServer() +{ +} + +void ProfileServer::loadProfiles() +{ + TQStringList theFiles = TDEGlobal::dirs()->findAllResources("data", "profiles/*.profile.xml"); + for(TQStringList::iterator i = theFiles.begin(); i != theFiles.end(); ++i) + { kdDebug() << "Found data file: " << *i << endl; + Profile *p = new Profile(); + p->loadFromFile(*i); + theProfiles.insert(p->id(), p); + } +} + +Profile::Profile() +{ + // set up defaults + theUnique = true; + theIfMulti = IM_DONTSEND; + + theActions.setAutoDelete(true); +} + +const ProfileAction *Profile::searchClass(const TQString &c) const +{ + for(TQDictIterator i(theActions); i.current(); ++i) + if(i.current()->getClass() == c) return i; + return 0; +} + +void Profile::loadFromFile(const TQString &fileName) +{ + charBuffer = ""; + curPA = 0; + curPAA = 0; + + TQFile xmlFile(fileName); + TQXmlInputSource source(TQT_TQIODEVICE(&xmlFile)); + TQXmlSimpleReader reader; + reader.setContentHandler(this); + reader.parse(source); +} + +const ProfileAction *ProfileServer::getAction(const TQString &appId, const TQString &actionId) const +{ + if(theProfiles[appId]) + if(theProfiles[appId]->theActions[actionId]) + return theProfiles[appId]->theActions[actionId]; + return 0; +} + +const TQString &ProfileServer::getServiceName(const TQString &appId) const +{ + if(theProfiles[appId]) + return theProfiles[appId]->serviceName(); + return TQString(); +} + +const ProfileAction *ProfileServer::getAction(const TQString &appId, const TQString &objId, const TQString &prototype) const +{ + return getAction(appId, objId + "::" + prototype); +} + +bool Profile::characters(const TQString &data) +{ + charBuffer += data; + return true; +} + +bool Profile::startElement(const TQString &, const TQString &, const TQString &name, const TQXmlAttributes &attributes) +{ + if(name == "profile") + { theId = attributes.value("id"); + theServiceName = attributes.value("servicename"); + } + else if(name == "action") + { curPA = new ProfileAction; + curPA->setObjId(attributes.value("objid")); + curPA->setPrototype(attributes.value("prototype")); + curPA->setClass(attributes.value("class")); + curPA->setMultiplier(attributes.value("multiplier").isEmpty() ? 1.0 : attributes.value("multiplier").toFloat()); + curPA->setRepeat(attributes.value("repeat") == "1"); + curPA->setAutoStart(attributes.value("autostart") == "1"); + } + else if(name == "instances") + { theUnique = attributes.value("unique") == "1"; + theIfMulti = attributes.value("ifmulti") == "sendtotop" ? IM_SENDTOTOP : attributes.value("ifmulti") == "sendtobottom" ? IM_SENDTOBOTTOM : attributes.value("ifmulti") == "sendtoall" ? IM_SENDTOALL : IM_DONTSEND; + } + else if(name == "argument") + { curPA->theArguments.append(ProfileActionArgument()); + curPAA = &(curPA->theArguments.last()); + curPAA->setAction(curPA); + curPAA->setType(attributes.value("type")); + } + else if(name == "range" && curPAA) + curPAA->setRange(tqMakePair(attributes.value("min").toInt(), attributes.value("max").toInt())); + + charBuffer = ""; + return true; +} + +bool Profile::endElement(const TQString &, const TQString &, const TQString &name) +{ + if(name == "name") + if(curPA) + curPA->setName(charBuffer); + else + theName = charBuffer; + else if(name == "author") + theAuthor = charBuffer; + else if(name == "comment" && curPA && !curPAA) + curPA->setComment(charBuffer); + else if(name == "default" && curPA && curPAA) + curPAA->setDefault(charBuffer); + else if(name == "comment" && curPA && curPAA) + curPAA->setComment(charBuffer); + else if(name == "action") + { + curPA->setProfile(this); + theActions.insert(curPA->objId() + "::" + curPA->prototype(), curPA); + curPA = 0; + } + else if(name == "argument") + curPAA = 0; + + charBuffer = ""; + return true; +} diff --git a/tdelirc/tdelirc/profileserver.h b/tdelirc/tdelirc/profileserver.h new file mode 100644 index 0000000..0d9bc59 --- /dev/null +++ b/tdelirc/tdelirc/profileserver.h @@ -0,0 +1,142 @@ +// +// +// C++ Interface: $MODULE$ +// +// Description: +// +// +// Author: Gav Wood , (C) 2003 +// +// Copyright: See COPYING file that comes with this distribution +// +// +#ifndef PROFILESERVER_H +#define PROFILESERVER_H + +#include +#include +#include +#include +#include +#include + +/** +@author Gav Wood +*/ + +enum IfMulti {IM_DONTSEND, IM_SENDTOALL, IM_SENDTOTOP, IM_SENDTOBOTTOM}; + +typedef TQPair Range; + +class ProfileAction; +class Profile; + +class ProfileActionArgument +{ + TQString theComment, theType; + Range theRange; + TQString theDefault; // should be TQVariant? + const ProfileAction *parent; + + friend class Profile; +public: + const TQString &comment() const { return theComment; } + void setComment(const TQString &a) { theComment = a; } + const TQString &type() const { return theType; } + void setType(const TQString &a) { theType = a; } + const TQString &getDefault() const { return theDefault; } + void setDefault(const TQString &a) { theDefault = a; } + const Range &range() const { return theRange; } + void setRange(const Range &a) { theRange = a; } + + const ProfileAction *action() const { return parent; } + void setAction(const ProfileAction *a) { parent = a; } +}; + +class ProfileAction +{ + TQString theObjId, thePrototype, theName, theComment, theClass; + float theMultiplier; + const Profile *parent; + bool theRepeat, theAutoStart; + TQValueList theArguments; + + friend class Profile; +public: + const TQString &objId() const { return theObjId; } + void setObjId(const TQString &a) { theObjId = a; } + const TQString &prototype() const { return thePrototype; } + void setPrototype(const TQString &a) { thePrototype = a; } + const TQString &name() const { return theName; } + void setName(const TQString &a) { theName = a; } + const TQString &comment() const { return theComment; } + void setComment(const TQString &a) { theComment = a; } + const TQString &getClass() const { return theClass; } + void setClass(const TQString &a) { theClass = a; } + const float multiplier() const { return theMultiplier; } + void setMultiplier(const float a) { theMultiplier = a; } + bool repeat() const { return theRepeat; } + void setRepeat(bool a) { theRepeat = a; } + bool autoStart() const { return theAutoStart; } + void setAutoStart(bool a) { theAutoStart = a; } + const TQValueList &arguments() const { return theArguments; } + + const Profile *profile() const { return parent; } + void setProfile(const Profile *a) { parent = a; } +}; + +class Profile : public TQXmlDefaultHandler +{ + TQString theId, theName, theAuthor, theServiceName; + IfMulti theIfMulti; + bool theUnique; + TQString charBuffer; + + ProfileAction *curPA; + ProfileActionArgument *curPAA; + TQDict theActions; // objid+"::"+prototype => ProfileAction + + friend class ProfileServer; +public: + bool characters(const TQString &data); + bool startElement(const TQString &, const TQString &, const TQString &name, const TQXmlAttributes &attributes); + bool endElement(const TQString &, const TQString &, const TQString &name); + + const TQString &id() const { return theId; } + void setId(const TQString &a) { theId = a; } + const TQString &name() const { return theName; } + void setName(const TQString &a) { theName = a; } + const TQString &author() const { return theAuthor; } + void setAuthor(const TQString &a) { theAuthor = a; } + const bool unique() const { return theUnique; } + void setUnique(const bool a) { theUnique = a; } + const IfMulti ifMulti() const { return theIfMulti; } + void setIfMulti(const IfMulti a) { theIfMulti = a; } + const TQString &serviceName() const { if(theServiceName != TQString()) return theServiceName; return theName; } + void setServiceName(const TQString &a) { theServiceName = a; } + const TQDict &actions() const { return theActions; } + const ProfileAction *searchClass(const TQString &c) const; + + void loadFromFile(const TQString &fileName); + + Profile(); +}; + +class ProfileServer +{ + static ProfileServer *theInstance; + void loadProfiles(); + TQDict theProfiles; // id => Profile + +public: + static ProfileServer *profileServer() { if(!theInstance) theInstance = new ProfileServer(); return theInstance; } + const TQDict profiles() const { return theProfiles; } + const ProfileAction *getAction(const TQString &appId, const TQString &objId, const TQString &prototype) const; + const ProfileAction *getAction(const TQString &appId, const TQString &actionId) const; + const TQString &getServiceName(const TQString &appId) const; + + ProfileServer(); + ~ProfileServer(); +}; + +#endif diff --git a/tdelirc/tdelirc/prototype.cpp b/tdelirc/tdelirc/prototype.cpp new file mode 100644 index 0000000..8e2eedf --- /dev/null +++ b/tdelirc/tdelirc/prototype.cpp @@ -0,0 +1,67 @@ +// +// +// C++ Implementation: $MODULE$ +// +// Description: +// +// +// Author: Gav Wood , (C) 2003 +// +// Copyright: See COPYING file that comes with this distribution +// +// +#include + +#include "prototype.h" + +Prototype::Prototype() +{ + original = ""; +} + +Prototype::Prototype(const TQString &source) +{ + original = source; + parse(); +} + +Prototype::~Prototype() +{ +} + +const TQString Prototype::argumentList() const +{ + TQString ret = ""; + for(unsigned i = 0; i < theTypes.count(); i++) + ret += (i ? ", " : "") + theTypes[i] + " " + theNames[i]; + return ret; +} + +const TQString Prototype::argumentListNN() const +{ + TQString ret = ""; + for(unsigned i = 0; i < theTypes.count(); i++) + ret += (i ? ", " : "") + theTypes[i]; + return ret; +} + +void Prototype::parse() +{ + theNames.clear(); + theTypes.clear(); + + TQRegExp main("^(.*) (\\w[\\d\\w]*)\\((.*)\\)"); + TQRegExp parameters("^\\s*([^,\\s]+)(\\s+(\\w[\\d\\w]*))?(,(.*))?$"); + + if(main.search(original) == -1) return; + theReturn = main.cap(1); + theName = main.cap(2); + + TQString args = main.cap(3); + while(parameters.search(args) != -1) + { theTypes += parameters.cap(1); + theNames += parameters.cap(3); + args = parameters.cap(5); + } +} + diff --git a/tdelirc/tdelirc/prototype.h b/tdelirc/tdelirc/prototype.h new file mode 100644 index 0000000..fa101b7 --- /dev/null +++ b/tdelirc/tdelirc/prototype.h @@ -0,0 +1,54 @@ +// +// +// C++ Interface: $MODULE$ +// +// Description: +// +// +// Author: Gav Wood , (C) 2003 +// +// Copyright: See COPYING file that comes with this distribution +// +// +#ifndef PROTOTYPE_H +#define PROTOTYPE_H + +#include +#include +#include + +/** +@author Gav Wood +*/ + +class Prototype +{ + TQString original, theName, theReturn; + TQStringList theNames, theTypes; + + void parse(); + +public: + unsigned count() const{ return theTypes.count(); } + const TQPair operator[](int i) const { return tqMakePair(theTypes[i], theNames[i]); } + const TQString &name(int i) const { return theNames[i]; } + const TQString &type(int i) const { return theTypes[i]; } + const TQString &returnType() const { return theReturn; } + const TQString &name() const { return theName; } + const TQString &prototype() const { return original; } + const TQString argumentList() const; + const TQString argumentListNN() const; + const int argumentCount() { return theTypes.count(); } + const TQString prototypeNR() const { return theName + "(" + argumentListNN() + ")"; } + + void setPrototype(const TQString &source) { original = source; parse(); } + + Prototype &operator=(const TQString &source) { setPrototype(source); return *this; } + + Prototype(const TQString &source); + Prototype(); + ~Prototype(); + +}; + +#endif diff --git a/tdelirc/tdelirc/remoteserver.cpp b/tdelirc/tdelirc/remoteserver.cpp new file mode 100644 index 0000000..dafa67d --- /dev/null +++ b/tdelirc/tdelirc/remoteserver.cpp @@ -0,0 +1,109 @@ +// +// +// C++ Implementation: $MODULE$ +// +// Description: +// +// +// Author: Gav Wood , (C) 2003 +// +// Copyright: See COPYING file that comes with this distribution +// +// + +#include +#include + +#include +#include +#include + +#include "remoteserver.h" + +RemoteServer *RemoteServer::theInstance = 0; + +RemoteServer::RemoteServer() +{ + theRemotes.setAutoDelete(true); + loadRemotes(); +} + +RemoteServer::~RemoteServer() +{ +} + +void RemoteServer::loadRemotes() +{ + TQStringList theFiles = TDEGlobal::dirs()->findAllResources("data", "remotes/*.remote.xml"); + for(TQStringList::iterator i = theFiles.begin(); i != theFiles.end(); ++i) + { kdDebug() << "Found data file: " << *i << endl; + Remote *p = new Remote(); + p->loadFromFile(*i); + theRemotes.insert(p->id(), p); + } +} + +Remote::Remote() +{ + theButtons.setAutoDelete(true); +} + +Remote::~Remote() +{ +} + +void Remote::loadFromFile(const TQString &fileName) +{ + charBuffer = ""; + curRB = 0; + + TQFile xmlFile(fileName); + TQXmlInputSource source(TQT_TQIODEVICE(&xmlFile)); + TQXmlSimpleReader reader; + reader.setContentHandler(this); + reader.parse(source); +} + +bool Remote::characters(const TQString &data) +{ + charBuffer += data; + return true; +} + +bool Remote::startElement(const TQString &, const TQString &, const TQString &name, const TQXmlAttributes &attributes) +{ + if(name == "remote") + theId = theName = attributes.value("id"); + else if(name == "button") + { + curRB = new RemoteButton(); + curRB->setId(attributes.value("id")); + curRB->setClass(attributes.value("id")); + if(attributes.index("class") > -1) + curRB->setClass(attributes.value("class")); + curRB->setParameter(attributes.value("parameter")); + curRB->setName(attributes.value("id")); + } + + charBuffer = ""; + return true; +} + +bool Remote::endElement(const TQString &, const TQString &, const TQString &name) +{ + if(name == "name") + if(curRB) + curRB->setName(charBuffer); + else + theName = charBuffer; + else if(name == "author") + theAuthor = charBuffer; + else if(name == "button") + { + theButtons.insert(curRB->id(), curRB); + curRB = 0; + } + + charBuffer = ""; + return true; +} diff --git a/tdelirc/tdelirc/remoteserver.h b/tdelirc/tdelirc/remoteserver.h new file mode 100644 index 0000000..80891ba --- /dev/null +++ b/tdelirc/tdelirc/remoteserver.h @@ -0,0 +1,89 @@ +// +// +// C++ Interface: $MODULE$ +// +// Description: +// +// +// Author: Gav Wood , (C) 2003 +// +// Copyright: See COPYING file that comes with this distribution +// +// +#ifndef REMOTESERVER_H +#define REMOTESERVER_H + +#include +#include +#include + +/** +@author Gav Wood +*/ + + +class RemoteButton +{ + TQString theName, theId, theClass, theParameter; + + friend class Remote; +public: + void setName(const TQString &a) { theName = a; } + const TQString &name(void) const { return theName; } + void setClass(const TQString &a) { theClass = a; } + const TQString &getClass(void) const { return theClass; } + void setParameter(const TQString &a) { theParameter = a; } + const TQString ¶meter(void) const { return theParameter; } + void setId(const TQString &a) { theId = a; } + const TQString &id(void) const { return theId; } +}; + +class Remote : public TQXmlDefaultHandler +{ + TQString theName, theId, theAuthor; + TQDict theButtons; + + TQString charBuffer; + RemoteButton *curRB; + + friend class RemoteServer; +public: + bool characters(const TQString &data); + bool startElement(const TQString &, const TQString &, const TQString &name, const TQXmlAttributes &attributes); + bool endElement(const TQString &, const TQString &, const TQString &name); + + void setName(const TQString &a) { theName = a; } + const TQString &name(void) const { return theName; } + void setId(const TQString &a) { theId = a; } + const TQString &id(void) const { return theId; } + void setAuthor(const TQString &a) { theAuthor = a; } + const TQString &author(void) const { return theAuthor; } + const TQDict &buttons() const { return theButtons; } + + void loadFromFile(const TQString &fileName); + + const TQString &getButtonName(const TQString &id) const { if(theButtons[id]) return theButtons[id]->name(); return id; } + + Remote(); + ~Remote(); +}; + +class RemoteServer +{ + static RemoteServer *theInstance; + void loadRemotes(); + TQDict theRemotes; + +public: + static RemoteServer *remoteServer() { if(!theInstance) theInstance = new RemoteServer(); return theInstance; } + + const TQDict &remotes() const { return theRemotes; } + + const TQString &getRemoteName(const TQString &id) const { if(theRemotes[id]) return theRemotes[id]->name(); return id; } + const TQString &getButtonName(const TQString &remote, const TQString &button) const { if(theRemotes[remote]) return theRemotes[remote]->getButtonName(button); return button; } + + RemoteServer(); + ~RemoteServer(); +}; + +#endif diff --git a/tdessh/CMakeLists.txt b/tdessh/CMakeLists.txt new file mode 100644 index 0000000..9681682 --- /dev/null +++ b/tdessh/CMakeLists.txt @@ -0,0 +1,36 @@ +################################################# +# +# (C) 2012 Golubev Alexander +# fatzer2 (AT) gmail.com +# +# Improvements and feedback are welcome +# +# This file is released under GPL >= 2 +# +################################################# + +include_directories( + ${CMAKE_BINARY_DIR} + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_CURRENT_SOURCE_DIR} + ${TDE_INCLUDE_DIR} + ${TQT_INCLUDE_DIRS} +) + +link_directories( + ${TQT_LIBRARY_DIRS} +) + +add_definitions( + -DQT_NO_CAST_ASCII +) + + +##### tdessh (executable) ####################### + +tde_add_executable( tdessh AUTOMOC + SOURCES tdessh.cpp sshdlg.cpp + LINK tdeui-shared tdesu-shared + DESTINATION ${BIN_INSTALL_DIR} +) + diff --git a/tdessh/LICENSE.readme b/tdessh/LICENSE.readme new file mode 100644 index 0000000..3ce8813 --- /dev/null +++ b/tdessh/LICENSE.readme @@ -0,0 +1,124 @@ +tdessh - a TDE front end to ssh + +Copyright (c) 1999,2000 by Geert Jansen + + The "Artistic License" + + Preamble + + The intent of this document is to state the conditions under which a + Package may be copied, such that the Copyright Holder maintains some + semblance of artistic control over the development of the package, + while giving the users of the package the right to use and + distribute the Package in a more-or-less customary fashion, plus the + right to make reasonable modifications. + + Definitions: + + * "Package" refers to the collection of files distributed by the + Copyright Holder, and derivatives of that collection of files + created through textual modification. + + * "Standard Version" refers to such a Package if it has not been + modified, or has been modified in accordance with the wishes of + the Copyright Holder. + + * "Copyright Holder" is whoever is named in the copyright or + copyrights for the package. + + * "You" is you, if you're thinking about copying or distributing + this Package. + + * "Reasonable copying fee" is whatever you can justify on the + basis of media cost, duplication charges, time of people + involved, and so on. (You will not be required to justify it to + the Copyright Holder, but only to the computing community at + large as a market that must bear the fee.) + + * "Freely Available" means that no fee is charged for the item + itself, though there may be fees involved in handling the item. + It also means that recipients of the item may redistribute it + under the same conditions they received it. + + 1. You may make and give away verbatim copies of the source form of + the Standard Version of this Package without restriction, provided + that you duplicate all of the original copyright notices and + associated disclaimers. + + 2. You may apply bug fixes, portability fixes and other + modifications derived from the Public Domain or from the Copyright + Holder. A Package modified in such a way shall still be considered + the Standard Version. + + 3. You may otherwise modify your copy of this Package in any way, + provided that you insert a prominent notice in each changed file + stating how and when you changed that file, and provided that you do + at least ONE of the following: + + a) place your modifications in the Public Domain or + otherwise make them Freely Available, such as by posting + said modifications to Usenet or an equivalent medium, or + placing the modifications on a major archive site such as + ftp.uu.net, or by allowing the Copyright Holder to include + your modifications in the Standard Version of the Package. + + b) use the modified Package only within your corporation + or organization. + + c) rename any non-standard executables so the names do not + conflict with standard executables, which must also be + provided, and provide a separate manual page for each + non-standard executable that clearly documents how it + differs from the Standard Version. + + d) make other distribution arrangements with the Copyright + Holder. + + 4. You may distribute the programs of this Package in object code or + executable form, provided that you do at least ONE of the following: + + a) distribute a Standard Version of the executables and + library files, together with instructions (in the manual + page or equivalent) on where to get the Standard Version. + + b) accompany the distribution with the machine-readable + source of the Package with your modifications. + + c) accompany any non-standard executables with their + corresponding Standard Version executables, giving the + non-standard executables non-standard names, and clearly + documenting the differences in manual pages (or + equivalent), together with instructions on where to get + the Standard Version. + + d) make other distribution arrangements with the Copyright + Holder. + + 5. You may charge a reasonable copying fee for any distribution of + this Package. You may charge any fee you choose for support of this + Package. You may not charge a fee for this Package itself. However, + you may distribute this Package in aggregate with other (possibly + commercial) programs as part of a larger (possibly commercial) + software distribution provided that you do not advertise this + Package as a product of your own. + + 6. The scripts and library files supplied as input to or produced as + output from the programs of this Package do not automatically fall + under the copyright of this Package, but belong to whomever + generated them, and may be sold commercially, and may be aggregated + with this Package. + + 7. C or perl subroutines supplied by you and linked into this + Package shall not be considered part of this Package. + + 8. The name of the Copyright Holder may not be used to endorse or + promote products derived from this software without specific prior + written permission. + + 9. THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR + IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED + WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. + + The End + + diff --git a/tdessh/Makefile.am b/tdessh/Makefile.am new file mode 100644 index 0000000..84f1b5b --- /dev/null +++ b/tdessh/Makefile.am @@ -0,0 +1,17 @@ +## Makefile.am for tdessh +AM_CPPFLAGS = -DQT_NO_CAST_ASCII + +INCLUDES= $(all_includes) + +## tdessh +bin_PROGRAMS = tdessh +tdessh_SOURCES = tdessh.cpp sshdlg.cpp +tdessh_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor +tdessh_LDADD = $(LIB_TDEUI) -ltdesu +tdessh_METASOURCES = AUTO +noinst_HEADERS = sshdlg.h + +## Messages +messages: + $(XGETTEXT) $(tdessh_SOURCES) -o $(podir)/tdessh.pot + diff --git a/tdessh/sshdlg.cpp b/tdessh/sshdlg.cpp new file mode 100644 index 0000000..a43c9d0 --- /dev/null +++ b/tdessh/sshdlg.cpp @@ -0,0 +1,80 @@ +/* vi: ts=8 sts=4 sw=4 + * + * $Id$ + * + * This file is part of the KDE project, module tdesu. + * Copyright (C) 2000 Geert Jansen + */ + +#include +#include + +#include +#include "sshdlg.h" + + +TDEsshDialog::TDEsshDialog(TQCString host, TQCString user, TQCString stub, + TQString prompt, bool enableKeep) + : KPasswordDialog(Password, enableKeep, 0) +{ + m_Host = host; + m_User = user; + m_Stub = stub; + + setCaption(TQString::fromLatin1("%1@%2").arg(TQString(m_User)).arg(TQString(m_Host))); + + // Make the prompt a little more polite :-) + if (prompt.lower().left(6) == TQString::fromLatin1("enter ")) + prompt.remove(0, 6); + int pos = prompt.find(':'); + if (pos != -1) + prompt.remove(pos, 10); + prompt += '.'; + prompt.prepend(i18n("The action you requested needs authentication. " + "Please enter ")); + setPrompt(prompt); +} + + +TDEsshDialog::~TDEsshDialog() +{ +} + + +bool TDEsshDialog::checkPassword(const char *password) +{ + SshProcess proc(m_Host, m_User); + proc.setStub(m_Stub); + + int ret = proc.checkInstall(password); + switch (ret) + { + case -1: + KMessageBox::error(this, i18n("Conversation with ssh failed.\n")); + done(Rejected); + return false; + + case 0: + return true; + + case SshProcess::SshNotFound: + KMessageBox::sorry(this, + i18n("The programs 'ssh' or 'tdesu_stub' cannot be found.\n" + "Make sure your PATH is set correctly.")); + done(Rejected); + return false; + + case SshProcess::SshIncorrectPassword: + KMessageBox::sorry(this, i18n("Incorrect password. Please try again.")); + return false; + + default: + KMessageBox::error(this, i18n("Internal error: Illegal return from " + "SshProcess::checkInstall()")); + done(Rejected); + } + return true; +} + + +#include "sshdlg.moc" diff --git a/tdessh/sshdlg.h b/tdessh/sshdlg.h new file mode 100644 index 0000000..79415ad --- /dev/null +++ b/tdessh/sshdlg.h @@ -0,0 +1,33 @@ +/* vi: ts=8 sts=4 sw=4 + * + * $Id$ + * + * This file is part of the KDE project, module tdesu. + * Copyright (C) 2000 Geert Jansen + */ + +#ifndef __SshDlg_h_Included__ +#define __SshDlg_h_Included__ + +#include + +class TDEsshDialog + : public KPasswordDialog +{ + Q_OBJECT + + +public: + TDEsshDialog(TQCString host, TQCString user, TQCString stub, + TQString prompt, bool enableKeep); + ~TDEsshDialog(); + +protected: + bool checkPassword(const char *password); + +private: + TQCString m_User, m_Host, m_Stub; +}; + + +#endif // __SshDlg_h_Included__ diff --git a/tdessh/tdessh.cpp b/tdessh/tdessh.cpp new file mode 100644 index 0000000..593a0fd --- /dev/null +++ b/tdessh/tdessh.cpp @@ -0,0 +1,201 @@ +/* vi: ts=8 sts=4 sw=4 + * + * $Id$ + * + * This file is part of the KDE project, module tdesu. + * Copyright (C) 2000 Geert Jansen + */ + +#include + +#include +#include +#include +#include +#include + +#include +#include + + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include "sshdlg.h" + +static TDECmdLineOptions options[] = +{ + { "+host", I18N_NOOP("Specifies the remote host"), 0 }, + { "+command", I18N_NOOP("The command to run"), 0 }, + { "u ", I18N_NOOP("Specifies the target uid"), 0 }, + { "s ", I18N_NOOP("Specify remote stub location"), "tdesu_stub" }, + { "n", I18N_NOOP("Do not keep password"), 0 }, + { "q", I18N_NOOP("Stop the daemon (forgets all passwords)"), 0 }, + { "t", I18N_NOOP("Enable terminal output (no password keeping)"), 0 }, + TDECmdLineLastOption +}; + + +int main(int argc, char *argv[]) +{ + TDEAboutData aboutData("tdessh", I18N_NOOP("TDE ssh"), + VERSION, I18N_NOOP("Runs a program on a remote host"), + TDEAboutData::License_Artistic, + "Copyright (c) 2000 Geert Jansen"); + aboutData.addAuthor("Geert Jansen", I18N_NOOP("Maintainer"), + "jansen@kde.org", "http://www.stack.nl/~geertj/"); + + TDECmdLineArgs::init(argc, argv, &aboutData); + TDECmdLineArgs::addCmdLineOptions(options); + + TDEApplication app; + TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs(); + + // Stop daemon and exit? + if (args->isSet("q")) + { + KDEsuClient client; + if (client.ping() == -1) + { + kdError(1511) << "Daemon not running -- nothing to stop\n"; + exit(1); + } + if (client.stopServer() != -1) + { + kdDebug(1511) << "Daemon stopped\n"; + exit(0); + } + kdError(1511) << "Could not stop daemon\n"; + exit(1); + } + + if (args->count() < 2) + TDECmdLineArgs::usage(i18n("No command or host specified.")); + + // Check if ssh is available + if (TDEStandardDirs::findExe(TQString::fromLatin1("ssh")).isEmpty()) + { + kdError(1511) << "ssh not found\n"; + exit(1); + } + + // Get remote userid + TQCString user = args->getOption("u"); + if (user.isNull()) + { + struct passwd *pw = getpwuid(getuid()); + if (pw == 0L) + { + kdError(1511) << "You don't exist!\n"; + exit(1); + } + user = pw->pw_name; + } + + // Remote stub location + TQCString stub = args->getOption("s"); + + // Get remote host, command + TQCString host = args->arg(0); + TQCString command = args->arg(1); + for (int i=2; icount(); i++) + { + command += " "; + command += args->arg(i); + } + + // Check for daemon and start if necessary + bool have_daemon = true; + KDEsuClient client; + if (!client.isServerSGID()) + { + kdWarning(1511) << "Daemon not safe (not sgid), not using it.\n"; + have_daemon = false; + } + else if ((client.ping() == -1) && (client.startServer() == -1)) + { + kdWarning(1511) << "Could not start daemon, reduced functionality.\n"; + have_daemon = false; + } + + // Try to exec the command with tdesud? + bool keep = !args->isSet("n") && have_daemon; + bool terminal = args->isSet("t"); + if (keep && !terminal) + { + client.setHost(host); + if (client.exec(command, user) != -1) + return 0; + } + + // Set core dump size to 0 because we will have + // root's password in memory. + struct rlimit rlim; + rlim.rlim_cur = rlim.rlim_max = 0; + if (setrlimit(RLIMIT_CORE, &rlim)) + { + kdError(1511) << "rlimit(): " << perror << "\n"; + exit(1); + } + + + // Read configuration + TDEConfig *config = TDEGlobal::config(); + config->setGroup(TQString::fromLatin1("Passwords")); + int timeout = config->readNumEntry(TQString::fromLatin1("Timeout"), defTimeout); + + SshProcess proc(host, user); + proc.setStub(stub); + int needpw = proc.checkNeedPassword(); + if (needpw < 0) + { + TQString msg = i18n("Ssh returned with an error!\n" + "The error message is:\n\n"); + msg += proc.error(); + KMessageBox::error(0L, msg); + exit(1); + } + + TQCString password; + if (needpw != 0) + { + TDEsshDialog *dlg = new TDEsshDialog(host, user, stub, + proc.prompt(), keep && !terminal); + dlg->addLine(i18n("Command"), command); + int res = dlg->exec(); + if (res == TDEsshDialog::Rejected) + exit(0); + keep = dlg->keep(); + password = dlg->password(); + delete dlg; + } else + keep = 0; + + // Make the dialog go away. + app.processEvents(); + + // Run command + if (keep && have_daemon) + { + client.setHost(host); + client.setPass(password, timeout); + return client.exec(command, user); + } else + { + proc.setCommand(command); + proc.setTerminal(terminal); + proc.setErase(true); + return proc.exec(password); + } +} + -- cgit v1.2.3