From 4140fee92e2293c37a8e9aa8f21254dc66433a0a Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Sun, 27 Jan 2013 21:04:23 -0600 Subject: Rename kiobuffer and KHTML --- kdict/Makefile.am | 2 +- kdict/queryview.cpp | 4 +- kdict/queryview.h | 2 +- kget/kget_plug_in/Makefile.am | 2 +- kget/kget_plug_in/kget_plug_in.cpp | 8 +- kopete/kopete/chatwindow/chatmessagepart.cpp | 14 +- kopete/kopete/chatwindow/chatmessagepart.h | 4 +- kopete/kopete/chatwindow/chatview.cpp | 2 +- .../kopete/config/appearance/appearanceconfig.cpp | 2 +- kopete/libkopete/tests/mock/Makefile.am | 2 +- kopete/libkopete/ui/Makefile.am | 2 +- kopete/libkopete/ui/userinfodialog.cpp | 4 +- kopete/libkopete/ui/userinfodialog.h | 2 +- kopete/plugins/history/Makefile.am | 4 +- kopete/plugins/history/historydialog.cpp | 2 +- kopete/plugins/history/historydialog.h | 8 +- kopete/plugins/statistics/Makefile.am | 2 +- kopete/plugins/statistics/statisticsdialog.cpp | 2 +- kopete/plugins/statistics/statisticsdialog.h | 4 +- kopete/protocols/irc/Makefile.am | 2 +- lanbrowsing/kio_lan/AUTHORS | 2 - lanbrowsing/kio_lan/CMakeLists.txt | 48 -- lanbrowsing/kio_lan/Makefile.am | 31 - lanbrowsing/kio_lan/README | 16 - lanbrowsing/kio_lan/TODO | 3 - lanbrowsing/kio_lan/kio_lan.cpp | 794 --------------------- lanbrowsing/kio_lan/kio_lan.h | 87 --- lanbrowsing/kio_lan/lan.desktop | 81 --- lanbrowsing/kio_lan/lan.protocol | 15 - lanbrowsing/kio_lan/lisa.desktop | 66 -- lanbrowsing/kio_lan/rlan.protocol | 15 - lanbrowsing/tdeio_lan/AUTHORS | 2 + lanbrowsing/tdeio_lan/CMakeLists.txt | 48 ++ lanbrowsing/tdeio_lan/Makefile.am | 31 + lanbrowsing/tdeio_lan/README | 16 + lanbrowsing/tdeio_lan/TODO | 3 + lanbrowsing/tdeio_lan/lan.desktop | 81 +++ lanbrowsing/tdeio_lan/lan.protocol | 15 + lanbrowsing/tdeio_lan/lisa.desktop | 66 ++ lanbrowsing/tdeio_lan/rlan.protocol | 15 + lanbrowsing/tdeio_lan/tdeio_lan.cpp | 794 +++++++++++++++++++++ lanbrowsing/tdeio_lan/tdeio_lan.h | 87 +++ 42 files changed, 1195 insertions(+), 1195 deletions(-) delete mode 100644 lanbrowsing/kio_lan/AUTHORS delete mode 100644 lanbrowsing/kio_lan/CMakeLists.txt delete mode 100644 lanbrowsing/kio_lan/Makefile.am delete mode 100644 lanbrowsing/kio_lan/README delete mode 100644 lanbrowsing/kio_lan/TODO delete mode 100644 lanbrowsing/kio_lan/kio_lan.cpp delete mode 100644 lanbrowsing/kio_lan/kio_lan.h delete mode 100644 lanbrowsing/kio_lan/lan.desktop delete mode 100644 lanbrowsing/kio_lan/lan.protocol delete mode 100644 lanbrowsing/kio_lan/lisa.desktop delete mode 100644 lanbrowsing/kio_lan/rlan.protocol create mode 100644 lanbrowsing/tdeio_lan/AUTHORS create mode 100644 lanbrowsing/tdeio_lan/CMakeLists.txt create mode 100644 lanbrowsing/tdeio_lan/Makefile.am create mode 100644 lanbrowsing/tdeio_lan/README create mode 100644 lanbrowsing/tdeio_lan/TODO create mode 100644 lanbrowsing/tdeio_lan/lan.desktop create mode 100644 lanbrowsing/tdeio_lan/lan.protocol create mode 100644 lanbrowsing/tdeio_lan/lisa.desktop create mode 100644 lanbrowsing/tdeio_lan/rlan.protocol create mode 100644 lanbrowsing/tdeio_lan/tdeio_lan.cpp create mode 100644 lanbrowsing/tdeio_lan/tdeio_lan.h diff --git a/kdict/Makefile.am b/kdict/Makefile.am index d9e600f6..a65f1a7e 100644 --- a/kdict/Makefile.am +++ b/kdict/Makefile.am @@ -12,7 +12,7 @@ tdeinit_LTLIBRARIES = kdict.la AM_CPPFLAGS = $(all_includes) kdict_la_LDFLAGS = $(KDE_RPATH) $(all_libraries) -module $(KDE_PLUGIN) -kdict_la_LIBADD = $(LIB_KFILE) $(LIB_KHTML) $(LIBPTHREAD) $(LIBRESOLV) +kdict_la_LIBADD = $(LIB_KFILE) $(LIB_TDEHTML) $(LIBPTHREAD) $(LIBRESOLV) kdict_la_SOURCES = dcopinterface.skel main.cpp actions.cpp dict.cpp options.cpp \ queryview.cpp toplevel.cpp sets.cpp matchview.cpp application.cpp diff --git a/kdict/queryview.cpp b/kdict/queryview.cpp index 88dc69de..7dbeaba4 100644 --- a/kdict/queryview.cpp +++ b/kdict/queryview.cpp @@ -110,7 +110,7 @@ BrowseData::BrowseData(const TQString &Nhtml, const TQString &NqueryText) //********* DictHTMLPart ****************************************** DictHTMLPart::DictHTMLPart(TQWidget *parentWidget, const char *widgetname) - : KHTMLPart(parentWidget,widgetname) + : TDEHTMLPart(parentWidget,widgetname) {} @@ -123,7 +123,7 @@ void DictHTMLPart::tdehtmlMouseReleaseEvent(tdehtml::MouseReleaseEvent *event) if (event->qmouseEvent()->button()==Qt::MidButton) emit(middleButtonClicked()); else - KHTMLPart::tdehtmlMouseReleaseEvent(event); + TDEHTMLPart::tdehtmlMouseReleaseEvent(event); } diff --git a/kdict/queryview.h b/kdict/queryview.h index ddce43de..359eac85 100644 --- a/kdict/queryview.h +++ b/kdict/queryview.h @@ -74,7 +74,7 @@ public: //********* DictHTMLPart *************************************** -class DictHTMLPart : public KHTMLPart +class DictHTMLPart : public TDEHTMLPart { Q_OBJECT diff --git a/kget/kget_plug_in/Makefile.am b/kget/kget_plug_in/Makefile.am index d067473d..cff33984 100644 --- a/kget/kget_plug_in/Makefile.am +++ b/kget/kget_plug_in/Makefile.am @@ -4,7 +4,7 @@ kde_module_LTLIBRARIES = tdehtml_kget.la tdehtml_kget_la_METASOURCES = AUTO tdehtml_kget_la_SOURCES = kget_plug_in.cpp kget_linkview.cpp links.cpp -tdehtml_kget_la_LIBADD = $(LIB_KHTML) +tdehtml_kget_la_LIBADD = $(LIB_TDEHTML) tdehtml_kget_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -module $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor $(LIB_KPARTS) KDE_ICON = AUTO diff --git a/kget/kget_plug_in/kget_plug_in.cpp b/kget/kget_plug_in/kget_plug_in.cpp index edb90655..c8e5ccf2 100644 --- a/kget/kget_plug_in/kget_plug_in.cpp +++ b/kget/kget_plug_in/kget_plug_in.cpp @@ -104,16 +104,16 @@ void KGet_plug_in::slotShowDrop() void KGet_plug_in::slotShowLinks() { - if ( !parent() || !parent()->inherits( "KHTMLPart" ) ) + if ( !parent() || !parent()->inherits( "TDEHTMLPart" ) ) return; - KHTMLPart *htmlPart = static_cast( parent() ); + TDEHTMLPart *htmlPart = static_cast( parent() ); KParts::Part *activePart = 0L; if ( htmlPart->partManager() ) { activePart = htmlPart->partManager()->activePart(); - if ( activePart && activePart->inherits( "KHTMLPart" ) ) - htmlPart = static_cast( activePart ); + if ( activePart && activePart->inherits( "TDEHTMLPart" ) ) + htmlPart = static_cast( activePart ); } DOM::HTMLDocument doc = htmlPart->htmlDocument(); diff --git a/kopete/kopete/chatwindow/chatmessagepart.cpp b/kopete/kopete/chatwindow/chatmessagepart.cpp index 7a6235f1..8b7d5e3e 100644 --- a/kopete/kopete/chatwindow/chatmessagepart.cpp +++ b/kopete/kopete/chatwindow/chatmessagepart.cpp @@ -36,7 +36,7 @@ #include #include -// KHTML::DOM includes +// TDEHTML::DOM includes #include #include #include @@ -214,7 +214,7 @@ private: }; ChatMessagePart::ChatMessagePart( Kopete::ChatSession *mgr, TQWidget *parent, const char *name) - : KHTMLPart( parent, name ), d( new Private ) + : TDEHTMLPart( parent, name ), d( new Private ) { d->manager = mgr; @@ -228,7 +228,7 @@ ChatMessagePart::ChatMessagePart( Kopete::ChatSession *mgr, TQWidget *parent, co setMetaRefreshEnabled( false ); setOnlyLocalReferences( true ); - // Write the template to KHTMLPart + // Write the template to TDEHTMLPart writeTemplate(); view()->setFocusPolicy( TQ_NoFocus ); @@ -834,7 +834,7 @@ void ChatMessagePart::copy(bool justselection /* default false */) long startOffset, endOffset; selection( startNode, startOffset, endNode, endOffset ); - //BEGIN: copied from KHTMLPart::selectedText + //BEGIN: copied from TDEHTMLPart::selectedText bool hasNewLine = true; DOM::Node n = startNode; @@ -858,7 +858,7 @@ void ChatMessagePart::copy(bool justselection /* default false */) unsigned short id = n.elementId(); switch(id) { - case ID_IMG: //here is the main difference with KHTMLView::selectedText + case ID_IMG: //here is the main difference with TDEHTMLView::selectedText { DOM::HTMLElement e = n; if( !e.isNull() && e.hasAttribute( "title" ) ) @@ -936,7 +936,7 @@ void ChatMessagePart::copy(bool justselection /* default false */) text=text.mid(start, end-start); - //END: copied from KHTMLPart::selectedText + //END: copied from TDEHTMLPart::selectedText #endif if(text.isEmpty()) return; @@ -974,7 +974,7 @@ void ChatMessagePart::print() void ChatMessagePart::tdehtmlDrawContentsEvent( tdehtml::DrawContentsEvent * event) //virtual { - KHTMLPart::tdehtmlDrawContentsEvent(event); + TDEHTMLPart::tdehtmlDrawContentsEvent(event); //copy(true /*selection only*/); not needed anymore. } void ChatMessagePart::slotCloseView( bool force ) diff --git a/kopete/kopete/chatwindow/chatmessagepart.h b/kopete/kopete/chatwindow/chatmessagepart.h index 10eacd11..278291bb 100644 --- a/kopete/kopete/chatwindow/chatmessagepart.h +++ b/kopete/kopete/chatwindow/chatmessagepart.h @@ -36,7 +36,7 @@ class ChatWindowStyle; /** * @author Richard Smith */ -class ChatMessagePart : public KHTMLPart +class ChatMessagePart : public TDEHTMLPart { Q_OBJECT @@ -233,7 +233,7 @@ private: TQString formatMessageBody( const Kopete::Message &message ); /** - * Write the template file to KHTMLPart + * Write the template file to TDEHTMLPart */ void writeTemplate(); diff --git a/kopete/kopete/chatwindow/chatview.cpp b/kopete/kopete/chatwindow/chatview.cpp index 136a9b4e..487f80c5 100644 --- a/kopete/kopete/chatwindow/chatview.cpp +++ b/kopete/kopete/chatwindow/chatview.cpp @@ -88,7 +88,7 @@ ChatView::ChatView( Kopete::ChatSession *mgr, ChatWindowPlugin *parent, const ch //FIXME: don't widgets start off hidden anyway? hide(); - //Create the view dock widget (KHTML Part), and set it to no docking (lock it in place) + //Create the view dock widget (TDEHTML Part), and set it to no docking (lock it in place) viewDock = createDockWidget(TQString::fromLatin1( "viewDock" ), TQPixmap(), 0L,TQString::fromLatin1("viewDock"), TQString::fromLatin1(" ")); m_messagePart = new ChatMessagePart( mgr, viewDock, "m_messagePart" ); diff --git a/kopete/kopete/config/appearance/appearanceconfig.cpp b/kopete/kopete/config/appearance/appearanceconfig.cpp index 0aff7691..56d5d3cf 100644 --- a/kopete/kopete/config/appearance/appearanceconfig.cpp +++ b/kopete/kopete/config/appearance/appearanceconfig.cpp @@ -238,7 +238,7 @@ AppearanceConfig::AppearanceConfig(TQWidget *parent, const char* /*name*/, const d->preview->setJavaEnabled(false); d->preview->setPluginsEnabled(false); d->preview->setMetaRefreshEnabled(false); - KHTMLView *htmlWidget = d->preview->view(); + TDEHTMLView *htmlWidget = d->preview->view(); htmlWidget->setMarginWidth(4); htmlWidget->setMarginHeight(4); htmlWidget->setFocusPolicy(TQ_NoFocus); diff --git a/kopete/libkopete/tests/mock/Makefile.am b/kopete/libkopete/tests/mock/Makefile.am index b132a2a5..84b6dee7 100644 --- a/kopete/libkopete/tests/mock/Makefile.am +++ b/kopete/libkopete/tests/mock/Makefile.am @@ -7,7 +7,7 @@ noinst_LTLIBRARIES = libkopete_mock.la libkopete_mock_la_SOURCES = kopetemessage_mock.cpp kopeteaccount_mock.cpp kopetecontact_mock.cpp kopetemetacontact_mock.cpp kopeteprotocol_mock.cpp libkopete_mock_la_LDFLAGS = $(all_libraries) -lkabc -libkopete_mock_la_LIBADD = ../../libkopete.la ../../private/libkopeteprivate.la $(LIB_KHTML) +libkopete_mock_la_LIBADD = ../../libkopete.la ../../private/libkopeteprivate.la $(LIB_TDEHTML) noinst_HEADERS = kopetemessage_mock.h kopetecontact_mock.h kopetemetacontact_mock.h kopeteaccount_mock.h kopeteprotocol_mock.h diff --git a/kopete/libkopete/ui/Makefile.am b/kopete/libkopete/ui/Makefile.am index bd7f3c21..3e88846d 100644 --- a/kopete/libkopete/ui/Makefile.am +++ b/kopete/libkopete/ui/Makefile.am @@ -15,7 +15,7 @@ libkopeteui_la_SOURCES = kopetecontactaction.cpp addcontactpage.cpp \ addressbooklinkwidget.cpp libkopeteui_la_LDFLAGS = $(all_libraries) -lkabc -libkopeteui_la_LIBADD = ../private/libkopeteprivate.la $(LIB_KHTML) +libkopeteui_la_LIBADD = ../private/libkopeteprivate.la $(LIB_TDEHTML) kopeteincludedir = $(includedir)/kopete/ui kopeteinclude_HEADERS = accountselector.h fileconfirmbase.h \ diff --git a/kopete/libkopete/ui/userinfodialog.cpp b/kopete/libkopete/ui/userinfodialog.cpp index 99c306f8..130973ce 100644 --- a/kopete/libkopete/ui/userinfodialog.cpp +++ b/kopete/libkopete/ui/userinfodialog.cpp @@ -45,7 +45,7 @@ struct UserInfoDialog::UserInfoDialogPrivate { TQVBoxLayout *topLayout; TQWidget *page; DialogStyle style; - KHTMLPart *htmlPart; + TDEHTMLPart *htmlPart; KLineEdit *nameEdit; KLineEdit *idEdit; @@ -146,7 +146,7 @@ TQHBox* UserInfoDialog::addLabelEdit( const TQString& label, const TQString& tex void UserInfoDialog::fillHTML() { - d->htmlPart = new KHTMLPart( this ); + d->htmlPart = new TDEHTMLPart( this ); TQString text; /* diff --git a/kopete/libkopete/ui/userinfodialog.h b/kopete/libkopete/ui/userinfodialog.h index 511aeb3f..9a7bcb4e 100644 --- a/kopete/libkopete/ui/userinfodialog.h +++ b/kopete/libkopete/ui/userinfodialog.h @@ -38,7 +38,7 @@ namespace Kopete { /** * Specifies the look of this dialog. If set to HTML only - * KHTMLPart will be in the dialog and it's look can be customized + * TDEHTMLPart will be in the dialog and it's look can be customized * through setStyleSheet * @see setStyleSheet */ diff --git a/kopete/plugins/history/Makefile.am b/kopete/plugins/history/Makefile.am index b43b8ed4..c0066373 100644 --- a/kopete/plugins/history/Makefile.am +++ b/kopete/plugins/history/Makefile.am @@ -7,11 +7,11 @@ kde_module_LTLIBRARIES = kopete_history.la kcm_kopete_history.la kopete_history_la_SOURCES = historyplugin.cpp historydialog.cpp historyviewer.ui\ historylogger.cpp converter.cpp historyguiclient.cpp historyconfig.kcfgc -kopete_history_la_LDFLAGS = -module -no-undefined $(KDE_PLUGIN) $(all_libraries) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor $(LIB_KHTML) $(LIB_KUTILS) +kopete_history_la_LDFLAGS = -module -no-undefined $(KDE_PLUGIN) $(all_libraries) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor $(LIB_TDEHTML) $(LIB_KUTILS) kopete_history_la_LIBADD = ../../libkopete/libkopete.la kcm_kopete_history_la_SOURCES = historyprefsui.ui historypreferences.cpp historyconfig.kcfgc -kcm_kopete_history_la_LDFLAGS = -module -no-undefined $(KDE_PLUGIN) $(all_libraries) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor $(LIB_KHTML) $(LIB_KUTILS) +kcm_kopete_history_la_LDFLAGS = -module -no-undefined $(KDE_PLUGIN) $(all_libraries) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor $(LIB_TDEHTML) $(LIB_KUTILS) kcm_kopete_history_la_LIBADD = ../../libkopete/libkopete.la $(LIB_KUTILS) service_DATA = kopete_history.desktop diff --git a/kopete/plugins/history/historydialog.cpp b/kopete/plugins/history/historydialog.cpp index 708b85fc..1dd63cc3 100644 --- a/kopete/plugins/history/historydialog.cpp +++ b/kopete/plugins/history/historydialog.cpp @@ -135,7 +135,7 @@ HistoryDialog::HistoryDialog(Kopete::MetaContact *mc, TQWidget* parent, // Initializing HTML Part mMainWidget->htmlFrame->setFrameStyle(TQFrame::WinPanel | TQFrame::Sunken); TQVBoxLayout *l = new TQVBoxLayout(mMainWidget->htmlFrame); - mHtmlPart = new KHTMLPart(mMainWidget->htmlFrame, "htmlHistoryView"); + mHtmlPart = new TDEHTMLPart(mMainWidget->htmlFrame, "htmlHistoryView"); //Security settings, we don't need this stuff mHtmlPart->setJScriptEnabled(false); diff --git a/kopete/plugins/history/historydialog.h b/kopete/plugins/history/historydialog.h index 05295ad6..4df323d6 100644 --- a/kopete/plugins/history/historydialog.h +++ b/kopete/plugins/history/historydialog.h @@ -33,8 +33,8 @@ class HistoryViewer; namespace Kopete { class MetaContact; } namespace Kopete { class XSLT; } class HistoryLogger; -class KHTMLView; -class KHTMLPart; +class TDEHTMLView; +class TDEHTMLPart; class KURL; namespace KParts { struct URLArgs; class Part; } @@ -127,8 +127,8 @@ class HistoryDialog : public KDialogBase TQPtrList mMetaContactList; // History View - KHTMLView *mHtmlView; - KHTMLPart *mHtmlPart; + TDEHTMLView *mHtmlView; + TDEHTMLPart *mHtmlPart; HistoryViewer *mMainWidget; Kopete::XSLT *mXsltParser; diff --git a/kopete/plugins/statistics/Makefile.am b/kopete/plugins/statistics/Makefile.am index 93a8e28a..e7cb9c25 100644 --- a/kopete/plugins/statistics/Makefile.am +++ b/kopete/plugins/statistics/Makefile.am @@ -6,7 +6,7 @@ kde_module_LTLIBRARIES = kopete_statistics.la kopete_statistics_la_SOURCES = statisticsplugin.cpp statisticsdb.cpp statisticsdialog.cpp statisticswidget.ui statisticscontact.cpp statisticsdcopiface.skel -kopete_statistics_la_LDFLAGS = -module -no-undefined $(KDE_PLUGIN) $(all_libraries) -lsqlite3 $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor $(LIB_KHTML) +kopete_statistics_la_LDFLAGS = -module -no-undefined $(KDE_PLUGIN) $(all_libraries) -lsqlite3 $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor $(LIB_TDEHTML) kopete_statistics_la_LIBADD = ../../libkopete/libkopete.la -lsqlite3 service_DATA = kopete_statistics.desktop diff --git a/kopete/plugins/statistics/statisticsdialog.cpp b/kopete/plugins/statistics/statisticsdialog.cpp index ad7adb9e..02a5f4b7 100644 --- a/kopete/plugins/statistics/statisticsdialog.cpp +++ b/kopete/plugins/statistics/statisticsdialog.cpp @@ -53,7 +53,7 @@ StatisticsDialog::StatisticsDialog(StatisticsContact *contact, StatisticsDB *db, TQHBox *hbox = new TQHBox(this); - generalHTMLPart = new KHTMLPart(hbox); + generalHTMLPart = new TDEHTMLPart(hbox); generalHTMLPart->setOnlyLocalReferences(true); connect ( generalHTMLPart->browserExtension(), TQT_SIGNAL( openURLRequestDelayed( const KURL &, const KParts::URLArgs & ) ), this, TQT_SLOT( slotOpenURLRequest( const KURL &, const KParts::URLArgs & ) ) ); diff --git a/kopete/plugins/statistics/statisticsdialog.h b/kopete/plugins/statistics/statisticsdialog.h index def9d03e..a84f4b0e 100644 --- a/kopete/plugins/statistics/statisticsdialog.h +++ b/kopete/plugins/statistics/statisticsdialog.h @@ -29,7 +29,7 @@ class StatisticsPlugin; class StatisticsDB; class StatisticsContact; -class KHTMLPart; +class TDEHTMLPart; class KURL; namespace KParts { @@ -49,7 +49,7 @@ class StatisticsDialog : public KDialogBase TQString stringFromSeconds(const int seconds); StatisticsWidget *mainWidget; - KHTMLPart *generalHTMLPart; + TDEHTMLPart *generalHTMLPart; /// Database from which we get the statistics StatisticsDB *m_db; diff --git a/kopete/protocols/irc/Makefile.am b/kopete/protocols/irc/Makefile.am index 37e27bad..93b5d46f 100644 --- a/kopete/protocols/irc/Makefile.am +++ b/kopete/protocols/irc/Makefile.am @@ -22,7 +22,7 @@ kopete_irc_la_SOURCES = \ kcodecaction.cpp \ ksparser.cpp -kopete_irc_la_LDFLAGS = -module $(KDE_PLUGIN) $(all_libraries) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor $(LIB_KHTML) +kopete_irc_la_LDFLAGS = -module $(KDE_PLUGIN) $(all_libraries) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor $(LIB_TDEHTML) kopete_irc_la_LIBADD = ../../libkopete/libkopete.la \ ./ui/libkopeteircui.la \ ./libkirc/libkirc.la \ diff --git a/lanbrowsing/kio_lan/AUTHORS b/lanbrowsing/kio_lan/AUTHORS deleted file mode 100644 index 062f9d6c..00000000 --- a/lanbrowsing/kio_lan/AUTHORS +++ /dev/null @@ -1,2 +0,0 @@ -Written and maintained by: -Alexander Neundorf, neundorf@kde.org diff --git a/lanbrowsing/kio_lan/CMakeLists.txt b/lanbrowsing/kio_lan/CMakeLists.txt deleted file mode 100644 index 50794770..00000000 --- a/lanbrowsing/kio_lan/CMakeLists.txt +++ /dev/null @@ -1,48 +0,0 @@ -################################################# -# -# (C) 2010-2011 Serghei Amelian -# serghei (DOT) amelian (AT) gmail.com -# -# Improvements and feedback are welcome -# -# This file is released under GPL >= 2 -# -################################################# - -include_directories( - ${CMAKE_BINARY_DIR} - ${TDE_INCLUDE_DIR} - ${TQT_INCLUDE_DIRS} -) - -link_directories( - ${TQT_LIBRARY_DIRS} -) - - -##### other data ################################ - -install( FILES - lan.protocol rlan.protocol - DESTINATION ${SERVICES_INSTALL_DIR} ) - -install( FILES - lan.desktop - DESTINATION ${DATA_INSTALL_DIR}/konqueror/dirtree/remote ) - -install( FILES - lan.desktop - DESTINATION ${DATA_INSTALL_DIR}/remoteview ) - -install( FILES - lisa.desktop - DESTINATION ${DATA_INSTALL_DIR}/konqsidebartng/virtual_folders/services ) - - -##### tdeio_lan (module) ########################## - -tde_add_kpart( tdeio_lan - SOURCES tdeio_lan.cpp - LINK tdeio-shared - DESTINATION ${PLUGIN_INSTALL_DIR} -) diff --git a/lanbrowsing/kio_lan/Makefile.am b/lanbrowsing/kio_lan/Makefile.am deleted file mode 100644 index df87f09d..00000000 --- a/lanbrowsing/kio_lan/Makefile.am +++ /dev/null @@ -1,31 +0,0 @@ -## Makefile.am of tdebase/tdeioslave/man - -INCLUDES= $(all_includes) - -####### Files - -kde_module_LTLIBRARIES = tdeio_lan.la - -tdeio_lan_la_SOURCES = tdeio_lan.cpp -tdeio_lan_la_LIBADD = $(LIB_KIO) -tdeio_lan_la_LDFLAGS = -module -avoid-version -no-undefined $(all_libraries) $(KDE_RPATH) - -noinst_HEADERS = tdeio_lan.h - -kdelnk_DATA = lan.protocol rlan.protocol -kdelnkdir = $(kde_servicesdir) - -remote_DATA = lan.desktop -remotedir = $(kde_datadir)/konqueror/dirtree/remote - -remoteio_DATA = lan.desktop -remoteiodir = $(kde_datadir)/remoteview - -konq_sidebartree_DATA = lisa.desktop -konq_sidebartreedir = $(kde_datadir)/konqsidebartng/virtual_folders/services - -METASOURCES = AUTO - -messages: - $(XGETTEXT) *.cpp -o $(podir)/tdeio_lan.pot - diff --git a/lanbrowsing/kio_lan/README b/lanbrowsing/kio_lan/README deleted file mode 100644 index 224cae5b..00000000 --- a/lanbrowsing/kio_lan/README +++ /dev/null @@ -1,16 +0,0 @@ -This is a brandnew ioslave for my brandnew LISa daemon/server. -It provides something like a network neighbourhood -only relying on the TCP/IP protocol stack for KDE. Enter lan:/ to see it. -Read the README for lisa/reslisa. -LISa/resLISa is in the subdir lisa/. -Maybe you have to adjust the Makefile a little bit, it currently doesn't -use the automake/configure stuff. -On some systems (e.g. Solaris) you will have to add some libraries, like --lnsl, I think. - -Copy this directory e.g. under tdebase/tdeioslave and enter it in -tdebase/tdeioslave/Makefile.am in the SUBDIR line. The rerun make in -tdebase/tdeioslave. - -Alexander Neundorf - diff --git a/lanbrowsing/kio_lan/TODO b/lanbrowsing/kio_lan/TODO deleted file mode 100644 index 8640402e..00000000 --- a/lanbrowsing/kio_lan/TODO +++ /dev/null @@ -1,3 +0,0 @@ -mainly testing, I think - -Alex diff --git a/lanbrowsing/kio_lan/kio_lan.cpp b/lanbrowsing/kio_lan/kio_lan.cpp deleted file mode 100644 index e573f7ea..00000000 --- a/lanbrowsing/kio_lan/kio_lan.cpp +++ /dev/null @@ -1,794 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 2000,2001 Alexander Neundorf - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifdef HAVE_CONFIG_H -#include -#endif - -#include -#include -#include -#include -#include -#include - -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "tdeio_lan.h" - -#ifndef AF_LOCAL -#define AF_LOCAL AF_UNIX -#endif - -#define PORTSETTINGS_CHECK 0 -#define PORTSETTINGS_PROVIDE 1 -#define PORTSETTINGS_DISABLE 2 - -using namespace TDEIO; - -#ifndef SHUT_RDWR -#define SHUT_RDWR 2 -#endif - -extern "C" { KDE_EXPORT int kdemain(int argc, char **argv); } - -int kdemain( int argc, char **argv ) -{ - TDEInstance instance( "tdeio_lan" ); - - if (argc != 4) - { - fprintf(stderr, "Usage: tdeio_lan protocol domain-socket1 domain-socket2\n"); - exit(-1); - } - int isLanIoslave=(strcmp("lan",argv[1])==0); - - // Trigger creation to make sure we pick up KIOSK settings correctly. - (void)TDEGlobal::dirs(); - (void)TDEGlobal::locale(); - (void)TDEGlobal::config(); - - kdDebug(7101) << "LAN: kdemain: starting" << endl; - - LANProtocol slave(isLanIoslave, argv[2], argv[3]); - slave.dispatchLoop(); - return 0; -} - -LANProtocol::LANProtocol(int isLanIoslave, const TQCString &pool, const TQCString &app ) -:TCPSlaveBase(7741,isLanIoslave?"lan":"rlan", pool, app) -,m_currentHost("") -,m_port(7741) -,m_maxAge(15*60) -,m_isLanIoslave(isLanIoslave?true:false) -{ - TDEConfig *config=TDEGlobal::config(); - - m_protocolInfo[KIOLAN_FTP].enabled=config->readNumEntry("Support_FTP",PORTSETTINGS_CHECK); - m_protocolInfo[KIOLAN_HTTP].enabled=config->readNumEntry("Support_HTTP",PORTSETTINGS_CHECK); - m_protocolInfo[KIOLAN_NFS].enabled=config->readNumEntry("Support_NFS",PORTSETTINGS_CHECK); - m_protocolInfo[KIOLAN_SMB].enabled=config->readNumEntry("Support_SMB",PORTSETTINGS_CHECK); - m_protocolInfo[KIOLAN_FISH].enabled=config->readNumEntry("Support_FISH",PORTSETTINGS_CHECK); - - m_defaultLisaHost=config->readEntry("DefaultLisaHost", "localhost"); - m_shortHostnames=config->readBoolEntry("ShowShortHostnames",false); - m_maxAge=config->readNumEntry("MaxAge",15)*60; - if (m_maxAge<0) m_maxAge=0; - - strcpy(m_protocolInfo[KIOLAN_NFS].name,"NFS"); - strcpy(m_protocolInfo[KIOLAN_FTP].name,"FTP"); - strcpy(m_protocolInfo[KIOLAN_SMB].name,"SMB"); - strcpy(m_protocolInfo[KIOLAN_HTTP].name,"HTTP"); - strcpy(m_protocolInfo[KIOLAN_FISH].name,"FISH"); - - // Now we check for port 445 for SMB/CIFS also. But we call both entries - // SMB. Clients will see only one SMB folder, though, whichever - // port (or both) is detected. The smb ioslave should be able - // to figure out which port to actually use. - - m_protocolInfo[KIOLAN_NFS].ports.push_back(2049); - m_protocolInfo[KIOLAN_FTP].ports.push_back(21); - m_protocolInfo[KIOLAN_SMB].ports.push_back(445); - m_protocolInfo[KIOLAN_SMB].ports.push_back(139); - m_protocolInfo[KIOLAN_HTTP].ports.push_back(80); - m_protocolInfo[KIOLAN_FISH].ports.push_back(22); - - m_hostInfoCache.setAutoDelete(true); -} - -LANProtocol::~LANProtocol() -{ - m_hostInfoCache.clear(); -} - -int LANProtocol::readDataFromServer() -{ - if (m_isLanIoslave) - return lanReadDataFromServer(); - else - return rlanReadDataFromServer(); - return 0; -} - -int LANProtocol::lanReadDataFromServer() -{ - kdDebug(7101)<<"LANProtocol::lanReadDataFromServer() host: "<The Lisa daemon does not appear to be running.

" - "In order to use the LAN Browser the Lisa daemon must be " - "installed and activated by the system administrator.")); - return 0; - } - kdDebug(7101)<<"LANProtocol::lanReadDataFromServer() connected"<0) - { - char *newBuf=new char[receivedBytes+bytesRead]; - if (receiveBuffer!=0) memcpy(newBuf,receiveBuffer,receivedBytes); - memcpy(newBuf+receivedBytes,tmpBuf,bytesRead); - receivedBytes+=bytesRead; - if (receiveBuffer!=0) delete [] receiveBuffer; - receiveBuffer=newBuf; - } - } - } while (bytesRead>0); - closeDescriptor(); - if ((bytesRead<0) || (receivedBytes<4)) - { - delete [] receiveBuffer; - error(ERR_INTERNAL_SERVER,i18n("Received unexpected data from %1").arg(m_currentHost)); - return 0; - } - - UDSEntry entry; - - char *currentBuf=receiveBuffer; - int bytesLeft=receivedBytes; - //this should be large enough for a name - char tmpName[4*1024]; - //this should be large enough for the hostname - char tmpHostname[4*1024]; - while (bytesLeft>0) - { - int tmpIP=2; - tmpName[0]='\0'; - if ((memchr(currentBuf,0,bytesLeft)==0) || (memchr(currentBuf,int('\n'),bytesLeft)==0)) - { - delete [] receiveBuffer; - error(ERR_INTERNAL_SERVER,i18n("Received unexpected data from %1").arg(m_currentHost)); - return 0; - } - kdDebug(7101)<<"LANProtocol::lanReadDataFromServer: processing "<pw_name; - else - //should never happen - socketname+="???"; - - strlcpy(addr.sun_path,socketname,sizeof(addr.sun_path)); - int result=::connect(sockFD,(sockaddr*)&addr, sizeof(addr)); - - kdDebug(7101)<<"readDataFromServer(): result: "<0) - { - char *newBuf=new char[receivedBytes+bytesRead]; - if (receiveBuffer!=0) memcpy(newBuf,receiveBuffer,receivedBytes); - memcpy(newBuf+receivedBytes,tmpBuf,bytesRead); - receivedBytes+=bytesRead; - if (receiveBuffer!=0) delete [] receiveBuffer; - receiveBuffer=newBuf; - } - } - } while (bytesRead>0); - ::close(sockFD); - - - if ((bytesRead<0) || (receivedBytes<4)) - { - delete [] receiveBuffer; - error(ERR_CANNOT_OPEN_FOR_READING,socketname); - return 0; - } - - UDSEntry entry; - - char *currentBuf=receiveBuffer; - int bytesLeft=receivedBytes; - //this should be large enough for a name - char tmpName[4*1024]; - //this should be large enough for the hostname - char tmpHostname[4*1024]; - while (bytesLeft>0) - { - int tmpIP=2; - tmpName[0]='\0'; - if ((memchr(currentBuf,0,bytesLeft)==0) || (memchr(currentBuf,int('\n'),bytesLeft)==0)) - { - delete [] receiveBuffer; - error(ERR_INTERNAL_SERVER,i18n("Received unexpected data from %1").arg(socketname.data())); - return 0; - } - kdDebug(7101)<<"RLANProtocol::readDataFromServer: processing "<created)>m_maxAge) - { - kdDebug(7101)<<"LAN::checkHost() cache content too old, deleting it"<h_addr, sizeof(ip)); - - for (int i=0; iservices[i]=result; - } - hostInfo->created=time(0); - m_hostInfoCache.insert(hostUpper,hostInfo); - } - //here hostInfo is always != 0 - if (hostInfo==0) - { - error( ERR_INTERNAL, "hostInfo==0" ); - return 0; - } - - UDSEntry entry; - for (int i=0; iservices[i]==1) - { - kdDebug(7101)<<"LAN::checkHost(): Host ["<& _ports, in_addr ip ) -{ - int _port=0; - struct sockaddr_in to_scan; - - to_scan.sin_family = AF_INET; - to_scan.sin_addr = ip; - - for (TQValueVector::iterator i= _ports.begin(); i != _ports.end(); i++) - { - _port=(*i); - kdDebug(7101)<<"LANProtocol::checkPort: "<<_port<2) - { - kdDebug(7101)<<"LANProtocol::listDir: too deep path: "< - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef KIO_XLAN_H -#define KIO_XLAN_H - -#include -#include -#include - -#include -#include -#include -#include - -#include -#include - -#define KIOLAN_HTTP 0 -#define KIOLAN_FTP 1 -#define KIOLAN_SMB 2 -#define KIOLAN_NFS 3 -#define KIOLAN_FISH 4 -#define KIOLAN_MAX 5 - -#define NAMELEN 8 - -struct MyProtocolInfo -{ - int enabled; - TQValueVector ports; - //this should be large enough for things like "FTP" and so on - char name[NAMELEN]; -}; - -struct HostInfo -{ - time_t created; - int services[KIOLAN_MAX]; -}; - -class LANProtocol : public TDEIO::TCPSlaveBase -{ - public: - LANProtocol (int isLanIoSlave, const TQCString &pool, const TQCString &app ); - virtual ~LANProtocol(); - - virtual void setHost( const TQString& host, int port, const TQString& user, const TQString& pass ); - virtual void mimetype( const KURL& ); - - virtual void listDir( const KURL& url); - virtual void stat( const KURL & url); - virtual void get( const KURL& url ); - - protected: - TQDict m_hostInfoCache; - int readDataFromServer(); - int lanReadDataFromServer(); - int rlanReadDataFromServer(); - int checkHost(const TQString& host); - int checkPort(TQValueVector& _ports, in_addr ip); - TQString m_currentHost; - unsigned short int m_port; - MyProtocolInfo m_protocolInfo[KIOLAN_MAX]; - int m_maxAge; - bool m_isLanIoslave; - bool m_shortHostnames; - TQString m_defaultLisaHost; -}; - -#endif diff --git a/lanbrowsing/kio_lan/lan.desktop b/lanbrowsing/kio_lan/lan.desktop deleted file mode 100644 index c5f1f59d..00000000 --- a/lanbrowsing/kio_lan/lan.desktop +++ /dev/null @@ -1,81 +0,0 @@ -[Desktop Entry] -Type=Link -DocPath=lisa/index.html -URL=lan:/ -Icon=network_local -Name=Local Network -Name[af]=Plaaslike Netwerk -Name[ar]=الشبكة المحلية -Name[az]=Yerli Şəbəkə -Name[be]=Мясцовая сетка -Name[bg]=Локална мрежа -Name[bn]=স্থানীয় নেটওয়ার্ক -Name[br]=Rouedad lec'hel -Name[bs]=Lokalna mreža -Name[ca]=Xarxa local -Name[cs]=Lokální síť -Name[cy]=Rhwydwaith Lleol -Name[da]=Lokalt netværk -Name[de]=Lokales Netzwerk -Name[el]=Τοπικό δίκτυο -Name[eo]=Loka reto -Name[es]=Red local -Name[et]=Kohalik võrk -Name[eu]=Sare lokala -Name[fa]=شبکۀ محلی -Name[fi]=Paikallisverkko -Name[fr]=Réseau local -Name[ga]=Gréasán Logánta -Name[gl]=Rede Local -Name[he]=רשת מקומית -Name[hi]=स्थानीय नेटवर्क -Name[hr]=Lokalna mreža -Name[hu]=Helyi hálózat -Name[id]=Jaringan lokal -Name[is]=Staðarnet -Name[it]=Rete locale -Name[ja]=ローカルネットワーク -Name[ka]=ლოკალური ქსელი -Name[kk]=Жергілікті желі -Name[km]=បណ្ដាញ​មូលដ្ឋាន -Name[ko]=지역 네트워크 -Name[lt]=Vietinis tinklas -Name[lv]=Lokālais Tīkls -Name[mk]=Локална мрежа -Name[mn]=Дотоод сүлжээ -Name[ms]=Jaringan Setempat -Name[mt]=Network Lokali -Name[nb]=Lokalt nettverk -Name[nds]=Lokaal Nettwark -Name[ne]=स्थानीय सञ्जाल -Name[nl]=Lokaal netwerk -Name[nn]=Lokalt nettverk -Name[nso]=Kgokagano Selegae -Name[pa]=ਲੋਕਲ ਨੈੱਟਵਰਕ -Name[pl]=Sieć lokalna -Name[pt]=Rede Local -Name[pt_BR]=Rede local -Name[ro]=Reţea locală -Name[ru]=Локальная сеть -Name[se]=Báikkálaš fierpmádat -Name[sk]=Lokálna sieť -Name[sl]=Krajevno omrežje -Name[sr]=Локална мрежа -Name[sr@Latn]=Lokalna mreža -Name[sv]=Lokalt nätverk -Name[ta]=உள்ளக பிணையம் -Name[tg]=Шабакаи Маҳаллӣ -Name[th]=เครือข่ายท้องถิ่น -Name[tr]=Yerel Ağ -Name[uk]=Локальна мережа -Name[uz]=Lokal tarmoq -Name[uz@cyrillic]=Локал тармоқ -Name[ven]=Vhukwamani ha tsini -Name[wa]=Rantoele locåle -Name[xh]=Umsebenzi womnatha Wobulali -Name[zh_CN]=局域网 -Name[zh_HK]=區域網絡 -Name[zh_TW]=區域網路 -Name[zu]=Oluseduze Uxhumaniso olusakazekile -Open=false -X-TDE-TreeModule=Directory diff --git a/lanbrowsing/kio_lan/lan.protocol b/lanbrowsing/kio_lan/lan.protocol deleted file mode 100644 index a4101a0e..00000000 --- a/lanbrowsing/kio_lan/lan.protocol +++ /dev/null @@ -1,15 +0,0 @@ -[Protocol] -exec=tdeio_lan -protocol=lan -input=none -output=filesystem -listing=Name,Type -reading=true -writing=false -makedir=false -deleting=false -linking=false -moving=false -DocPath=tdeioslave/lan.html -Icon=network_local -Class=:local diff --git a/lanbrowsing/kio_lan/lisa.desktop b/lanbrowsing/kio_lan/lisa.desktop deleted file mode 100644 index b4807d94..00000000 --- a/lanbrowsing/kio_lan/lisa.desktop +++ /dev/null @@ -1,66 +0,0 @@ -[Desktop Entry] -Type=Link -URL=lan:/ -Icon=network -Name=LAN Browser -Name[be]=Аглядальнік мясцовай сеткі -Name[bg]=Браузър на локалната мрежа -Name[bn]=ল্যান ব্রাউজার -Name[br]=Furcher LAN -Name[bs]=LAN preglednik -Name[ca]=Navegador LAN -Name[cs]=Prohlížení lokální sítě -Name[da]=LAN-søger -Name[de]=LAN durchsuchen -Name[el]=Περιηγητής LAN -Name[eo]=Rigardilo por loka reto -Name[es]=Navegador de red -Name[et]=Kohtvõrgu sirvija -Name[eu]=LAN arakatzailea -Name[fa]=مرورگر شبکۀ داخلی -Name[fi]=Lähiverkon selain -Name[fr]=Navigateur réseau -Name[ga]=Brabhsálaí an Ghréasáin Logánta -Name[gl]=Explorador LAN -Name[he]=LAN דפדפן -Name[hr]=Preglednik LAN-a -Name[hu]=Hálózatböngésző -Name[is]=Netflakkari -Name[it]=Navigazione della rete locale -Name[ja]=LAN ブラウザ -Name[ka]=LAN ბროუზერი -Name[kk]=LAN шолғышы -Name[km]=កម្មវិធី​រុករក​បណ្ដាញ​មូលដ្ឋាន -Name[lt]=Vietinio tinklo naršyklė -Name[lv]=LAN Pārlūks -Name[mk]=Прегледувач на LAN -Name[nb]=LAN-los -Name[nds]=Nettwark-Kieker -Name[ne]=LAN ब्राउजर -Name[nn]=LAN-lesar -Name[pa]=LAN ਝਲਕਾਰਾ -Name[pl]=Przeglądarka sieci lokalnej -Name[pt]=Navegador de Rede -Name[pt_BR]=Navegador LAN -Name[ru]=Проводник LAN -Name[se]=LAN-bláđđejeaddji -Name[sk]=Prehliadač siete -Name[sl]=Brskalnik po krajevnem omrežju -Name[sr]=Претраживач LAN-а -Name[sr@Latn]=Pretraživač LAN-a -Name[sv]=Bläddrare i lokalt nätverk -Name[ta]=LAN உலாவி -Name[tg]=Барраси Шабакаи Маҳаллӣ -Name[th]=การเรียกดูระบบแลน -Name[tr]=LAN Tarayıcı -Name[uk]=Навігатор ЛОМ -Name[ven]=Buronza ya LAN -Name[xh]=Umkhangeli zincwadi we LAN -Name[zh_CN]=局域网浏览器 -Name[zh_HK]=區域網絡瀏覽器 -Name[zh_TW]=LAN 瀏覽器 -Name[zu]=Umbheki zincwadi ze LAN -Open=false -X-TDE-TreeModule=Directory -X-TDE-KonqSidebarModule=konqsidebar_tree -X-TDE-ConfiguredURL=tdeio_lanrc:noGroup:sidebarURL diff --git a/lanbrowsing/kio_lan/rlan.protocol b/lanbrowsing/kio_lan/rlan.protocol deleted file mode 100644 index f41507e7..00000000 --- a/lanbrowsing/kio_lan/rlan.protocol +++ /dev/null @@ -1,15 +0,0 @@ -[Protocol] -exec=tdeio_lan -protocol=rlan -input=none -output=filesystem -listing=Name,Type -reading=true -writing=false -makedir=false -deleting=false -linking=false -moving=false -DocPath=tdeioslave/rlan.html -Icon=network_local -Class=:local diff --git a/lanbrowsing/tdeio_lan/AUTHORS b/lanbrowsing/tdeio_lan/AUTHORS new file mode 100644 index 00000000..062f9d6c --- /dev/null +++ b/lanbrowsing/tdeio_lan/AUTHORS @@ -0,0 +1,2 @@ +Written and maintained by: +Alexander Neundorf, neundorf@kde.org diff --git a/lanbrowsing/tdeio_lan/CMakeLists.txt b/lanbrowsing/tdeio_lan/CMakeLists.txt new file mode 100644 index 00000000..50794770 --- /dev/null +++ b/lanbrowsing/tdeio_lan/CMakeLists.txt @@ -0,0 +1,48 @@ +################################################# +# +# (C) 2010-2011 Serghei Amelian +# serghei (DOT) amelian (AT) gmail.com +# +# Improvements and feedback are welcome +# +# This file is released under GPL >= 2 +# +################################################# + +include_directories( + ${CMAKE_BINARY_DIR} + ${TDE_INCLUDE_DIR} + ${TQT_INCLUDE_DIRS} +) + +link_directories( + ${TQT_LIBRARY_DIRS} +) + + +##### other data ################################ + +install( FILES + lan.protocol rlan.protocol + DESTINATION ${SERVICES_INSTALL_DIR} ) + +install( FILES + lan.desktop + DESTINATION ${DATA_INSTALL_DIR}/konqueror/dirtree/remote ) + +install( FILES + lan.desktop + DESTINATION ${DATA_INSTALL_DIR}/remoteview ) + +install( FILES + lisa.desktop + DESTINATION ${DATA_INSTALL_DIR}/konqsidebartng/virtual_folders/services ) + + +##### tdeio_lan (module) ########################## + +tde_add_kpart( tdeio_lan + SOURCES tdeio_lan.cpp + LINK tdeio-shared + DESTINATION ${PLUGIN_INSTALL_DIR} +) diff --git a/lanbrowsing/tdeio_lan/Makefile.am b/lanbrowsing/tdeio_lan/Makefile.am new file mode 100644 index 00000000..df87f09d --- /dev/null +++ b/lanbrowsing/tdeio_lan/Makefile.am @@ -0,0 +1,31 @@ +## Makefile.am of tdebase/tdeioslave/man + +INCLUDES= $(all_includes) + +####### Files + +kde_module_LTLIBRARIES = tdeio_lan.la + +tdeio_lan_la_SOURCES = tdeio_lan.cpp +tdeio_lan_la_LIBADD = $(LIB_KIO) +tdeio_lan_la_LDFLAGS = -module -avoid-version -no-undefined $(all_libraries) $(KDE_RPATH) + +noinst_HEADERS = tdeio_lan.h + +kdelnk_DATA = lan.protocol rlan.protocol +kdelnkdir = $(kde_servicesdir) + +remote_DATA = lan.desktop +remotedir = $(kde_datadir)/konqueror/dirtree/remote + +remoteio_DATA = lan.desktop +remoteiodir = $(kde_datadir)/remoteview + +konq_sidebartree_DATA = lisa.desktop +konq_sidebartreedir = $(kde_datadir)/konqsidebartng/virtual_folders/services + +METASOURCES = AUTO + +messages: + $(XGETTEXT) *.cpp -o $(podir)/tdeio_lan.pot + diff --git a/lanbrowsing/tdeio_lan/README b/lanbrowsing/tdeio_lan/README new file mode 100644 index 00000000..224cae5b --- /dev/null +++ b/lanbrowsing/tdeio_lan/README @@ -0,0 +1,16 @@ +This is a brandnew ioslave for my brandnew LISa daemon/server. +It provides something like a network neighbourhood +only relying on the TCP/IP protocol stack for KDE. Enter lan:/ to see it. +Read the README for lisa/reslisa. +LISa/resLISa is in the subdir lisa/. +Maybe you have to adjust the Makefile a little bit, it currently doesn't +use the automake/configure stuff. +On some systems (e.g. Solaris) you will have to add some libraries, like +-lnsl, I think. + +Copy this directory e.g. under tdebase/tdeioslave and enter it in +tdebase/tdeioslave/Makefile.am in the SUBDIR line. The rerun make in +tdebase/tdeioslave. + +Alexander Neundorf + diff --git a/lanbrowsing/tdeio_lan/TODO b/lanbrowsing/tdeio_lan/TODO new file mode 100644 index 00000000..8640402e --- /dev/null +++ b/lanbrowsing/tdeio_lan/TODO @@ -0,0 +1,3 @@ +mainly testing, I think + +Alex diff --git a/lanbrowsing/tdeio_lan/lan.desktop b/lanbrowsing/tdeio_lan/lan.desktop new file mode 100644 index 00000000..c5f1f59d --- /dev/null +++ b/lanbrowsing/tdeio_lan/lan.desktop @@ -0,0 +1,81 @@ +[Desktop Entry] +Type=Link +DocPath=lisa/index.html +URL=lan:/ +Icon=network_local +Name=Local Network +Name[af]=Plaaslike Netwerk +Name[ar]=الشبكة المحلية +Name[az]=Yerli Şəbəkə +Name[be]=Мясцовая сетка +Name[bg]=Локална мрежа +Name[bn]=স্থানীয় নেটওয়ার্ক +Name[br]=Rouedad lec'hel +Name[bs]=Lokalna mreža +Name[ca]=Xarxa local +Name[cs]=Lokální síť +Name[cy]=Rhwydwaith Lleol +Name[da]=Lokalt netværk +Name[de]=Lokales Netzwerk +Name[el]=Τοπικό δίκτυο +Name[eo]=Loka reto +Name[es]=Red local +Name[et]=Kohalik võrk +Name[eu]=Sare lokala +Name[fa]=شبکۀ محلی +Name[fi]=Paikallisverkko +Name[fr]=Réseau local +Name[ga]=Gréasán Logánta +Name[gl]=Rede Local +Name[he]=רשת מקומית +Name[hi]=स्थानीय नेटवर्क +Name[hr]=Lokalna mreža +Name[hu]=Helyi hálózat +Name[id]=Jaringan lokal +Name[is]=Staðarnet +Name[it]=Rete locale +Name[ja]=ローカルネットワーク +Name[ka]=ლოკალური ქსელი +Name[kk]=Жергілікті желі +Name[km]=បណ្ដាញ​មូលដ្ឋាន +Name[ko]=지역 네트워크 +Name[lt]=Vietinis tinklas +Name[lv]=Lokālais Tīkls +Name[mk]=Локална мрежа +Name[mn]=Дотоод сүлжээ +Name[ms]=Jaringan Setempat +Name[mt]=Network Lokali +Name[nb]=Lokalt nettverk +Name[nds]=Lokaal Nettwark +Name[ne]=स्थानीय सञ्जाल +Name[nl]=Lokaal netwerk +Name[nn]=Lokalt nettverk +Name[nso]=Kgokagano Selegae +Name[pa]=ਲੋਕਲ ਨੈੱਟਵਰਕ +Name[pl]=Sieć lokalna +Name[pt]=Rede Local +Name[pt_BR]=Rede local +Name[ro]=Reţea locală +Name[ru]=Локальная сеть +Name[se]=Báikkálaš fierpmádat +Name[sk]=Lokálna sieť +Name[sl]=Krajevno omrežje +Name[sr]=Локална мрежа +Name[sr@Latn]=Lokalna mreža +Name[sv]=Lokalt nätverk +Name[ta]=உள்ளக பிணையம் +Name[tg]=Шабакаи Маҳаллӣ +Name[th]=เครือข่ายท้องถิ่น +Name[tr]=Yerel Ağ +Name[uk]=Локальна мережа +Name[uz]=Lokal tarmoq +Name[uz@cyrillic]=Локал тармоқ +Name[ven]=Vhukwamani ha tsini +Name[wa]=Rantoele locåle +Name[xh]=Umsebenzi womnatha Wobulali +Name[zh_CN]=局域网 +Name[zh_HK]=區域網絡 +Name[zh_TW]=區域網路 +Name[zu]=Oluseduze Uxhumaniso olusakazekile +Open=false +X-TDE-TreeModule=Directory diff --git a/lanbrowsing/tdeio_lan/lan.protocol b/lanbrowsing/tdeio_lan/lan.protocol new file mode 100644 index 00000000..a4101a0e --- /dev/null +++ b/lanbrowsing/tdeio_lan/lan.protocol @@ -0,0 +1,15 @@ +[Protocol] +exec=tdeio_lan +protocol=lan +input=none +output=filesystem +listing=Name,Type +reading=true +writing=false +makedir=false +deleting=false +linking=false +moving=false +DocPath=tdeioslave/lan.html +Icon=network_local +Class=:local diff --git a/lanbrowsing/tdeio_lan/lisa.desktop b/lanbrowsing/tdeio_lan/lisa.desktop new file mode 100644 index 00000000..b4807d94 --- /dev/null +++ b/lanbrowsing/tdeio_lan/lisa.desktop @@ -0,0 +1,66 @@ +[Desktop Entry] +Type=Link +URL=lan:/ +Icon=network +Name=LAN Browser +Name[be]=Аглядальнік мясцовай сеткі +Name[bg]=Браузър на локалната мрежа +Name[bn]=ল্যান ব্রাউজার +Name[br]=Furcher LAN +Name[bs]=LAN preglednik +Name[ca]=Navegador LAN +Name[cs]=Prohlížení lokální sítě +Name[da]=LAN-søger +Name[de]=LAN durchsuchen +Name[el]=Περιηγητής LAN +Name[eo]=Rigardilo por loka reto +Name[es]=Navegador de red +Name[et]=Kohtvõrgu sirvija +Name[eu]=LAN arakatzailea +Name[fa]=مرورگر شبکۀ داخلی +Name[fi]=Lähiverkon selain +Name[fr]=Navigateur réseau +Name[ga]=Brabhsálaí an Ghréasáin Logánta +Name[gl]=Explorador LAN +Name[he]=LAN דפדפן +Name[hr]=Preglednik LAN-a +Name[hu]=Hálózatböngésző +Name[is]=Netflakkari +Name[it]=Navigazione della rete locale +Name[ja]=LAN ブラウザ +Name[ka]=LAN ბროუზერი +Name[kk]=LAN шолғышы +Name[km]=កម្មវិធី​រុករក​បណ្ដាញ​មូលដ្ឋាន +Name[lt]=Vietinio tinklo naršyklė +Name[lv]=LAN Pārlūks +Name[mk]=Прегледувач на LAN +Name[nb]=LAN-los +Name[nds]=Nettwark-Kieker +Name[ne]=LAN ब्राउजर +Name[nn]=LAN-lesar +Name[pa]=LAN ਝਲਕਾਰਾ +Name[pl]=Przeglądarka sieci lokalnej +Name[pt]=Navegador de Rede +Name[pt_BR]=Navegador LAN +Name[ru]=Проводник LAN +Name[se]=LAN-bláđđejeaddji +Name[sk]=Prehliadač siete +Name[sl]=Brskalnik po krajevnem omrežju +Name[sr]=Претраживач LAN-а +Name[sr@Latn]=Pretraživač LAN-a +Name[sv]=Bläddrare i lokalt nätverk +Name[ta]=LAN உலாவி +Name[tg]=Барраси Шабакаи Маҳаллӣ +Name[th]=การเรียกดูระบบแลน +Name[tr]=LAN Tarayıcı +Name[uk]=Навігатор ЛОМ +Name[ven]=Buronza ya LAN +Name[xh]=Umkhangeli zincwadi we LAN +Name[zh_CN]=局域网浏览器 +Name[zh_HK]=區域網絡瀏覽器 +Name[zh_TW]=LAN 瀏覽器 +Name[zu]=Umbheki zincwadi ze LAN +Open=false +X-TDE-TreeModule=Directory +X-TDE-KonqSidebarModule=konqsidebar_tree +X-TDE-ConfiguredURL=tdeio_lanrc:noGroup:sidebarURL diff --git a/lanbrowsing/tdeio_lan/rlan.protocol b/lanbrowsing/tdeio_lan/rlan.protocol new file mode 100644 index 00000000..f41507e7 --- /dev/null +++ b/lanbrowsing/tdeio_lan/rlan.protocol @@ -0,0 +1,15 @@ +[Protocol] +exec=tdeio_lan +protocol=rlan +input=none +output=filesystem +listing=Name,Type +reading=true +writing=false +makedir=false +deleting=false +linking=false +moving=false +DocPath=tdeioslave/rlan.html +Icon=network_local +Class=:local diff --git a/lanbrowsing/tdeio_lan/tdeio_lan.cpp b/lanbrowsing/tdeio_lan/tdeio_lan.cpp new file mode 100644 index 00000000..e573f7ea --- /dev/null +++ b/lanbrowsing/tdeio_lan/tdeio_lan.cpp @@ -0,0 +1,794 @@ +/* This file is part of the KDE project + Copyright (C) 2000,2001 Alexander Neundorf + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifdef HAVE_CONFIG_H +#include +#endif + +#include +#include +#include +#include +#include +#include + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "tdeio_lan.h" + +#ifndef AF_LOCAL +#define AF_LOCAL AF_UNIX +#endif + +#define PORTSETTINGS_CHECK 0 +#define PORTSETTINGS_PROVIDE 1 +#define PORTSETTINGS_DISABLE 2 + +using namespace TDEIO; + +#ifndef SHUT_RDWR +#define SHUT_RDWR 2 +#endif + +extern "C" { KDE_EXPORT int kdemain(int argc, char **argv); } + +int kdemain( int argc, char **argv ) +{ + TDEInstance instance( "tdeio_lan" ); + + if (argc != 4) + { + fprintf(stderr, "Usage: tdeio_lan protocol domain-socket1 domain-socket2\n"); + exit(-1); + } + int isLanIoslave=(strcmp("lan",argv[1])==0); + + // Trigger creation to make sure we pick up KIOSK settings correctly. + (void)TDEGlobal::dirs(); + (void)TDEGlobal::locale(); + (void)TDEGlobal::config(); + + kdDebug(7101) << "LAN: kdemain: starting" << endl; + + LANProtocol slave(isLanIoslave, argv[2], argv[3]); + slave.dispatchLoop(); + return 0; +} + +LANProtocol::LANProtocol(int isLanIoslave, const TQCString &pool, const TQCString &app ) +:TCPSlaveBase(7741,isLanIoslave?"lan":"rlan", pool, app) +,m_currentHost("") +,m_port(7741) +,m_maxAge(15*60) +,m_isLanIoslave(isLanIoslave?true:false) +{ + TDEConfig *config=TDEGlobal::config(); + + m_protocolInfo[KIOLAN_FTP].enabled=config->readNumEntry("Support_FTP",PORTSETTINGS_CHECK); + m_protocolInfo[KIOLAN_HTTP].enabled=config->readNumEntry("Support_HTTP",PORTSETTINGS_CHECK); + m_protocolInfo[KIOLAN_NFS].enabled=config->readNumEntry("Support_NFS",PORTSETTINGS_CHECK); + m_protocolInfo[KIOLAN_SMB].enabled=config->readNumEntry("Support_SMB",PORTSETTINGS_CHECK); + m_protocolInfo[KIOLAN_FISH].enabled=config->readNumEntry("Support_FISH",PORTSETTINGS_CHECK); + + m_defaultLisaHost=config->readEntry("DefaultLisaHost", "localhost"); + m_shortHostnames=config->readBoolEntry("ShowShortHostnames",false); + m_maxAge=config->readNumEntry("MaxAge",15)*60; + if (m_maxAge<0) m_maxAge=0; + + strcpy(m_protocolInfo[KIOLAN_NFS].name,"NFS"); + strcpy(m_protocolInfo[KIOLAN_FTP].name,"FTP"); + strcpy(m_protocolInfo[KIOLAN_SMB].name,"SMB"); + strcpy(m_protocolInfo[KIOLAN_HTTP].name,"HTTP"); + strcpy(m_protocolInfo[KIOLAN_FISH].name,"FISH"); + + // Now we check for port 445 for SMB/CIFS also. But we call both entries + // SMB. Clients will see only one SMB folder, though, whichever + // port (or both) is detected. The smb ioslave should be able + // to figure out which port to actually use. + + m_protocolInfo[KIOLAN_NFS].ports.push_back(2049); + m_protocolInfo[KIOLAN_FTP].ports.push_back(21); + m_protocolInfo[KIOLAN_SMB].ports.push_back(445); + m_protocolInfo[KIOLAN_SMB].ports.push_back(139); + m_protocolInfo[KIOLAN_HTTP].ports.push_back(80); + m_protocolInfo[KIOLAN_FISH].ports.push_back(22); + + m_hostInfoCache.setAutoDelete(true); +} + +LANProtocol::~LANProtocol() +{ + m_hostInfoCache.clear(); +} + +int LANProtocol::readDataFromServer() +{ + if (m_isLanIoslave) + return lanReadDataFromServer(); + else + return rlanReadDataFromServer(); + return 0; +} + +int LANProtocol::lanReadDataFromServer() +{ + kdDebug(7101)<<"LANProtocol::lanReadDataFromServer() host: "<The Lisa daemon does not appear to be running.

" + "In order to use the LAN Browser the Lisa daemon must be " + "installed and activated by the system administrator.")); + return 0; + } + kdDebug(7101)<<"LANProtocol::lanReadDataFromServer() connected"<0) + { + char *newBuf=new char[receivedBytes+bytesRead]; + if (receiveBuffer!=0) memcpy(newBuf,receiveBuffer,receivedBytes); + memcpy(newBuf+receivedBytes,tmpBuf,bytesRead); + receivedBytes+=bytesRead; + if (receiveBuffer!=0) delete [] receiveBuffer; + receiveBuffer=newBuf; + } + } + } while (bytesRead>0); + closeDescriptor(); + if ((bytesRead<0) || (receivedBytes<4)) + { + delete [] receiveBuffer; + error(ERR_INTERNAL_SERVER,i18n("Received unexpected data from %1").arg(m_currentHost)); + return 0; + } + + UDSEntry entry; + + char *currentBuf=receiveBuffer; + int bytesLeft=receivedBytes; + //this should be large enough for a name + char tmpName[4*1024]; + //this should be large enough for the hostname + char tmpHostname[4*1024]; + while (bytesLeft>0) + { + int tmpIP=2; + tmpName[0]='\0'; + if ((memchr(currentBuf,0,bytesLeft)==0) || (memchr(currentBuf,int('\n'),bytesLeft)==0)) + { + delete [] receiveBuffer; + error(ERR_INTERNAL_SERVER,i18n("Received unexpected data from %1").arg(m_currentHost)); + return 0; + } + kdDebug(7101)<<"LANProtocol::lanReadDataFromServer: processing "<pw_name; + else + //should never happen + socketname+="???"; + + strlcpy(addr.sun_path,socketname,sizeof(addr.sun_path)); + int result=::connect(sockFD,(sockaddr*)&addr, sizeof(addr)); + + kdDebug(7101)<<"readDataFromServer(): result: "<0) + { + char *newBuf=new char[receivedBytes+bytesRead]; + if (receiveBuffer!=0) memcpy(newBuf,receiveBuffer,receivedBytes); + memcpy(newBuf+receivedBytes,tmpBuf,bytesRead); + receivedBytes+=bytesRead; + if (receiveBuffer!=0) delete [] receiveBuffer; + receiveBuffer=newBuf; + } + } + } while (bytesRead>0); + ::close(sockFD); + + + if ((bytesRead<0) || (receivedBytes<4)) + { + delete [] receiveBuffer; + error(ERR_CANNOT_OPEN_FOR_READING,socketname); + return 0; + } + + UDSEntry entry; + + char *currentBuf=receiveBuffer; + int bytesLeft=receivedBytes; + //this should be large enough for a name + char tmpName[4*1024]; + //this should be large enough for the hostname + char tmpHostname[4*1024]; + while (bytesLeft>0) + { + int tmpIP=2; + tmpName[0]='\0'; + if ((memchr(currentBuf,0,bytesLeft)==0) || (memchr(currentBuf,int('\n'),bytesLeft)==0)) + { + delete [] receiveBuffer; + error(ERR_INTERNAL_SERVER,i18n("Received unexpected data from %1").arg(socketname.data())); + return 0; + } + kdDebug(7101)<<"RLANProtocol::readDataFromServer: processing "<created)>m_maxAge) + { + kdDebug(7101)<<"LAN::checkHost() cache content too old, deleting it"<h_addr, sizeof(ip)); + + for (int i=0; iservices[i]=result; + } + hostInfo->created=time(0); + m_hostInfoCache.insert(hostUpper,hostInfo); + } + //here hostInfo is always != 0 + if (hostInfo==0) + { + error( ERR_INTERNAL, "hostInfo==0" ); + return 0; + } + + UDSEntry entry; + for (int i=0; iservices[i]==1) + { + kdDebug(7101)<<"LAN::checkHost(): Host ["<& _ports, in_addr ip ) +{ + int _port=0; + struct sockaddr_in to_scan; + + to_scan.sin_family = AF_INET; + to_scan.sin_addr = ip; + + for (TQValueVector::iterator i= _ports.begin(); i != _ports.end(); i++) + { + _port=(*i); + kdDebug(7101)<<"LANProtocol::checkPort: "<<_port<2) + { + kdDebug(7101)<<"LANProtocol::listDir: too deep path: "< + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef KIO_XLAN_H +#define KIO_XLAN_H + +#include +#include +#include + +#include +#include +#include +#include + +#include +#include + +#define KIOLAN_HTTP 0 +#define KIOLAN_FTP 1 +#define KIOLAN_SMB 2 +#define KIOLAN_NFS 3 +#define KIOLAN_FISH 4 +#define KIOLAN_MAX 5 + +#define NAMELEN 8 + +struct MyProtocolInfo +{ + int enabled; + TQValueVector ports; + //this should be large enough for things like "FTP" and so on + char name[NAMELEN]; +}; + +struct HostInfo +{ + time_t created; + int services[KIOLAN_MAX]; +}; + +class LANProtocol : public TDEIO::TCPSlaveBase +{ + public: + LANProtocol (int isLanIoSlave, const TQCString &pool, const TQCString &app ); + virtual ~LANProtocol(); + + virtual void setHost( const TQString& host, int port, const TQString& user, const TQString& pass ); + virtual void mimetype( const KURL& ); + + virtual void listDir( const KURL& url); + virtual void stat( const KURL & url); + virtual void get( const KURL& url ); + + protected: + TQDict m_hostInfoCache; + int readDataFromServer(); + int lanReadDataFromServer(); + int rlanReadDataFromServer(); + int checkHost(const TQString& host); + int checkPort(TQValueVector& _ports, in_addr ip); + TQString m_currentHost; + unsigned short int m_port; + MyProtocolInfo m_protocolInfo[KIOLAN_MAX]; + int m_maxAge; + bool m_isLanIoslave; + bool m_shortHostnames; + TQString m_defaultLisaHost; +}; + +#endif -- cgit v1.2.3