author | llornkcor <llornkcor> | 2005-08-16 10:22:06 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2005-08-16 10:22:06 (UTC) |
commit | e68f54c2f00d8e7a8e753722a50b47484c1124ee (patch) (side-by-side diff) | |
tree | fc2076fbc51424f59d10ad1e88e3bdbb2ed78411 | |
parent | dd4792fe0ac89205e7d7a7e38f3d4350e19f25d7 (diff) | |
download | opie-e68f54c2f00d8e7a8e753722a50b47484c1124ee.zip opie-e68f54c2f00d8e7a8e753722a50b47484c1124ee.tar.gz opie-e68f54c2f00d8e7a8e753722a50b47484c1124ee.tar.bz2 |
proper opie header and maintainter
-rw-r--r-- | noncore/net/opie-smb/opie-smb.control | 2 | ||||
-rw-r--r-- | noncore/net/opie-smb/qsmb.cpp | 28 | ||||
-rw-r--r-- | noncore/net/opie-smb/qsmb.h | 28 |
3 files changed, 57 insertions, 1 deletions
diff --git a/noncore/net/opie-smb/opie-smb.control b/noncore/net/opie-smb/opie-smb.control index fc8c316..2ec46be 100644 --- a/noncore/net/opie-smb/opie-smb.control +++ b/noncore/net/opie-smb/opie-smb.control @@ -1,11 +1,11 @@ Package: opie-smb Files: plugins/application/libopie-smb.so* bin/opie-smb bin/smbfind pics/opie-smb apps/Applications/opie-smb.desktop Version: $QPE_VERSION$EXTRAVERSION Architecture: arm Arch: arm -Maintainer: Kurt Korbatits (support@midget.net.au) +Maintainer: ljp <lpotter@trolltech.com> Section: Network Priority: optional Description: Gui front end for samba utilities. Source: Depends: smbclient diff --git a/noncore/net/opie-smb/qsmb.cpp b/noncore/net/opie-smb/qsmb.cpp index d35e09a..d74f240 100644 --- a/noncore/net/opie-smb/qsmb.cpp +++ b/noncore/net/opie-smb/qsmb.cpp @@ -1,96 +1,124 @@ +/* + =. This file is part of the OPIE Project + .=l. Copyright (c) 2002-2005 Kurt Korbatits <support@midget.net.au> + .>+-= Copyright (c) 2005 L. Potter <lpotter@trolltech.com> + _;:, .> :=|. This program is free software; you can +.> <`_, > . <= redistribute it and/or modify it under +:`=1 )Y*s>-.-- : the terms of the GNU General Public +.="- .-=="i, .._ License as published by the Free Software + - . .-<_> .<> Foundation; either version 2 of the License, + ._= =} : or (at your option) any later version. + .%`+i> _;_. + .i_,=:_. -<s. 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 library; see the file COPYING.BIN. + If not, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. + +*/ + #include "qsmb.h" #include <qpushbutton.h> #include <qpe/qpeapplication.h> #include <string.h> #include <qstring.h> #include <qstringlist.h> #include <qdir.h> #include <qfileinfo.h> #include <qtabwidget.h> #include <qpe/process.h> #include <qlabel.h> #include <qlineedit.h> #include <qcombobox.h> #include <qstringlist.h> #include <qcheckbox.h> #include <qtextview.h> #include <qmessagebox.h> #include <qtextstream.h> #include <pthread.h> #include <signal.h> #include <ctype.h> #include <netinet/in.h> #include <arpa/inet.h> #include <rpc/clnt.h> #include <sys/vfs.h> #include <mntent.h> // #include <opie2/odebug.h> // using namespace Opie::Core; Qsmb::Qsmb( QWidget* parent, const char* name, WFlags fl ) : FormQPESMBBase( parent, name, fl ) { connect(CBHost, SIGNAL(activated(int)), this, SLOT(hostSelected(int))); connect(DoItBtn, SIGNAL(clicked()), this, SLOT(DoItClicked())); connect(UnmountBtn, SIGNAL(clicked()), this, SLOT(umountIt())); connect(BtnScan, SIGNAL(clicked()), this, SLOT(scanClicked())); connect(BtnClear, SIGNAL(clicked()), this, SLOT(clear())); connect(ListViewScan, SIGNAL(clicked(QListViewItem*)), this, SLOT(TextViewClicked(QListViewItem*))); mountpt->setEditable(true); mountpt->insertItem("/mnt/samba1",-1); mountpt->insertItem("/mnt/samba2",-1); mountpt->insertItem("/mnt/samba3",-1); setTabOrder(BtnScan, username); setTabOrder(username, password); setTabOrder(password, CBHost); setTabOrder(CBHost, TextViewOutput); setTabOrder(TextViewOutput, mountpt); setTabOrder(mountpt, DoItBtn); setTabOrder(DoItBtn, UnmountBtn); top_element = NULL; scanning = false; } Qsmb::~Qsmb() { } void Qsmb::clear() { if (scanning) return; ListViewScan->clear(); TextViewOutput->setText(""); CBHost->clear(); top_element = NULL; } void Qsmb::scanClicked() { if (scanning) return; pthread_create(&tpid, NULL, runit, (void *)this); } void Qsmb::DoItClicked() { if( !ListViewScan->selectedItem()) { QMessageBox::warning(this, tr("Error"),tr("<p>No share selected!</p>")); return; } if (scanning) return; pthread_create(&tpid, NULL, runitm, (void *)this); } void* runit(void* arg) diff --git a/noncore/net/opie-smb/qsmb.h b/noncore/net/opie-smb/qsmb.h index 175b2c3..7908837 100644 --- a/noncore/net/opie-smb/qsmb.h +++ b/noncore/net/opie-smb/qsmb.h @@ -1,49 +1,77 @@ +/* + =. This file is part of the OPIE Project + .=l. Copyright (c) 2002-2005 Kurt Korbatits <support@midget.net.au> + .>+-= Copyright (c) 2005 L. Potter <lpotter@trolltech.com> + _;:, .> :=|. This program is free software; you can +.> <`_, > . <= redistribute it and/or modify it under +:`=1 )Y*s>-.-- : the terms of the GNU General Public +.="- .-=="i, .._ License as published by the Free Software + - . .-<_> .<> Foundation; either version 2 of the License, + ._= =} : or (at your option) any later version. + .%`+i> _;_. + .i_,=:_. -<s. 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 library; see the file COPYING.BIN. + If not, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. + +*/ + #ifndef QSMB_H #define QSMB_H #include "qsmbbase.h" #include <stdlib.h> #include <stdlib.h> #include <stdio.h> #include <qlistview.h> #include <pthread.h> #include <qlistview.h> class Qsmb : public FormQPESMBBase { Q_OBJECT public: static QString appName() { return QString::fromLatin1("opie-smb"); } Qsmb( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); ~Qsmb(); void scan(); void DoIt(); private: QListViewItem *top_element; QComboBox *hosts; pthread_t tpid; bool scanning; bool isMounted(const QString &); QString getMount(const QString &); public slots: void clear(); void scanClicked(); void hostSelected(int); void DoItClicked(); void umountIt(); QString out; bool runCommand(const QStringList &); private slots: void TextViewClicked(QListViewItem*); }; void* runit(void *arg); void* runitm(void *arg); #endif // QSMB_H |