author | zecke <zecke> | 2004-03-14 13:22:42 (UTC) |
---|---|---|
committer | zecke <zecke> | 2004-03-14 13:22:42 (UTC) |
commit | 0f7217afa7cdcb108dd2afba0ff6b42c97ab6f44 (patch) (side-by-side diff) | |
tree | f6a68afa76a9be4099c3de7a286caeadd250c966 | |
parent | d9d68663164078b8dbdbfe70d291291b9fd5aacf (diff) | |
download | opie-0f7217afa7cdcb108dd2afba0ff6b42c97ab6f44.zip opie-0f7217afa7cdcb108dd2afba0ff6b42c97ab6f44.tar.gz opie-0f7217afa7cdcb108dd2afba0ff6b42c97ab6f44.tar.bz2 |
Convert net to ODP and QtAUX
70 files changed, 310 insertions, 228 deletions
diff --git a/noncore/net/linphone/main.cpp b/noncore/net/linphone/main.cpp index 9146fee..6368708 100644 --- a/noncore/net/linphone/main.cpp +++ b/noncore/net/linphone/main.cpp @@ -11,12 +11,14 @@ * 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. * * * ***************************************************************************/ -#include <opie/oapplicationfactory.h> +#include <opie2/oapplicationfactory.h> #include "mainwindow.h" + +using namespace Opie::Core; OPIE_EXPORT_APP( OApplicationFactory<MainWindow> ) diff --git a/noncore/net/mail/accountitem.cpp b/noncore/net/mail/accountitem.cpp index 9a09c18..e4bb6c5 100644 --- a/noncore/net/mail/accountitem.cpp +++ b/noncore/net/mail/accountitem.cpp @@ -12,12 +12,13 @@ #include <qpe/qpeapplication.h> /* QT */ #include <qpopupmenu.h> #include <qmessagebox.h> +using namespace Opie::Core; #define SETPIX(x) if (!account->getOffline()) {setPixmap( 0,x);} else {setPixmap( 0, PIXMAP_OFFLINE );} /** * POP3 Account stuff */ POP3viewItem::POP3viewItem( POP3account *a, AccountView *parent ) : AccountViewItem( parent ) @@ -46,13 +47,13 @@ POP3viewItem::~POP3viewItem() AbstractMail *POP3viewItem::getWrapper() { return wrapper; } -void POP3viewItem::refresh(QValueList<Opie::OSmartPointer<RecMail> > & ) +void POP3viewItem::refresh(QValueList<Opie::Core::OSmartPointer<RecMail> > & ) { refresh(); } void POP3viewItem::refresh() { @@ -1039,13 +1040,13 @@ AccountViewItem::AccountViewItem( QListViewItem *parent) AccountViewItem::AccountViewItem( QListViewItem *parent , QListViewItem*after ) :QListViewItem( parent,after ),folder(0) { init(); } -AccountViewItem::AccountViewItem( const Opie::OSmartPointer<Folder>&folderInit,QListViewItem *parent , QListViewItem*after ) +AccountViewItem::AccountViewItem( const Opie::Core::OSmartPointer<Folder>&folderInit,QListViewItem *parent , QListViewItem*after ) :QListViewItem( parent,after ),folder(folderInit) { init(); } void AccountViewItem::init() diff --git a/noncore/net/mail/accountitem.h b/noncore/net/mail/accountitem.h index 276eae0..6cdb260 100644 --- a/noncore/net/mail/accountitem.h +++ b/noncore/net/mail/accountitem.h @@ -21,41 +21,41 @@ class AccountViewItem : public QListViewItem { public: AccountViewItem( AccountView *parent ); AccountViewItem( QListViewItem *parent); AccountViewItem( QListViewItem *parent , QListViewItem*after ); - AccountViewItem( const Opie::OSmartPointer<Folder>&folderInit,QListViewItem *parent , QListViewItem*after ); + AccountViewItem( const Opie::Core::OSmartPointer<Folder>&folderInit,QListViewItem *parent , QListViewItem*after ); virtual ~AccountViewItem(); - virtual void refresh(QValueList<Opie::OSmartPointer<RecMail> >&)=0; - virtual RecBody fetchBody(const Opie::OSmartPointer<RecMail>&)=0; + virtual void refresh(QValueList<Opie::Core::OSmartPointer<RecMail> >&)=0; + virtual RecBody fetchBody(const Opie::Core::OSmartPointer<RecMail>&)=0; virtual QPopupMenu * getContextMenu(){return 0;}; virtual void contextMenuSelected(int){} virtual AccountView*accountView(); virtual bool matchName(const QString&name)const; virtual bool isDraftfolder(); protected: AccountViewItem*findSubItem(const QString&path,AccountViewItem*start=0); virtual void init(); virtual void removeChilds(); - virtual void deleteAllMail(AbstractMail*wrapper,const Opie::OSmartPointer<Folder>&f); + virtual void deleteAllMail(AbstractMail*wrapper,const Opie::Core::OSmartPointer<Folder>&f); static const QString contextName; AccountView*m_Backlink; - Opie::OSmartPointer<Folder> folder; + Opie::Core::OSmartPointer<Folder> folder; }; class POP3viewItem : public AccountViewItem { public: POP3viewItem( POP3account *a, AccountView *parent ); virtual ~POP3viewItem(); - virtual void refresh(QValueList<Opie::OSmartPointer<RecMail> >&target ); - virtual RecBody fetchBody( const Opie::OSmartPointer<RecMail> &mail ); + virtual void refresh(QValueList<Opie::Core::OSmartPointer<RecMail> >&target ); + virtual RecBody fetchBody( const Opie::Core::OSmartPointer<RecMail> &mail ); AbstractMail *getWrapper(); virtual QPopupMenu * getContextMenu(); virtual void contextMenuSelected(int); protected: POP3account *account; @@ -66,16 +66,16 @@ protected: }; class POP3folderItem : public AccountViewItem { public: - POP3folderItem( const Opie::OSmartPointer<Folder>&folder, POP3viewItem *parent , QListViewItem*after ); + POP3folderItem( const Opie::Core::OSmartPointer<Folder>&folder, POP3viewItem *parent , QListViewItem*after ); virtual ~POP3folderItem(); - virtual void refresh(QValueList<Opie::OSmartPointer<RecMail> >&); - virtual RecBody fetchBody(const Opie::OSmartPointer<RecMail>&); + virtual void refresh(QValueList<Opie::Core::OSmartPointer<RecMail> >&); + virtual RecBody fetchBody(const Opie::Core::OSmartPointer<RecMail>&); virtual QPopupMenu * getContextMenu(); virtual void contextMenuSelected(int); protected: void downloadMails(); POP3viewItem *pop3; @@ -85,14 +85,14 @@ protected: class NNTPviewItem : public AccountViewItem { public: NNTPviewItem( NNTPaccount *a, AccountView *parent ); virtual ~NNTPviewItem(); - virtual void refresh(QValueList<Opie::OSmartPointer<RecMail> >&target ); - virtual RecBody fetchBody( const Opie::OSmartPointer<RecMail> &mail ); + virtual void refresh(QValueList<Opie::Core::OSmartPointer<RecMail> >&target ); + virtual RecBody fetchBody( const Opie::Core::OSmartPointer<RecMail> &mail ); AbstractMail *getWrapper(); virtual QPopupMenu * getContextMenu(); virtual void contextMenuSelected(int); protected: NNTPaccount *account; @@ -104,16 +104,16 @@ protected: }; class NNTPfolderItem : public AccountViewItem { public: - NNTPfolderItem(const Opie::OSmartPointer<Folder>&folder, NNTPviewItem *parent , QListViewItem*after ); + NNTPfolderItem(const Opie::Core::OSmartPointer<Folder>&folder, NNTPviewItem *parent , QListViewItem*after ); virtual ~NNTPfolderItem(); - virtual void refresh(QValueList<Opie::OSmartPointer<RecMail> >&); - virtual RecBody fetchBody(const Opie::OSmartPointer<RecMail>&); + virtual void refresh(QValueList<Opie::Core::OSmartPointer<RecMail> >&); + virtual RecBody fetchBody(const Opie::Core::OSmartPointer<RecMail>&); virtual QPopupMenu * getContextMenu(); virtual void contextMenuSelected(int); protected: void downloadMails(); NNTPviewItem *nntp; @@ -124,14 +124,14 @@ protected: class IMAPviewItem : public AccountViewItem { friend class IMAPfolderItem; public: IMAPviewItem( IMAPaccount *a, AccountView *parent ); virtual ~IMAPviewItem(); - virtual void refresh(QValueList<Opie::OSmartPointer<RecMail> >&); - virtual RecBody fetchBody(const Opie::OSmartPointer<RecMail>&); + virtual void refresh(QValueList<Opie::Core::OSmartPointer<RecMail> >&); + virtual RecBody fetchBody(const Opie::Core::OSmartPointer<RecMail>&); AbstractMail *getWrapper(); virtual QPopupMenu * getContextMenu(); virtual void contextMenuSelected(int); const QStringList&subFolders(); virtual void refreshFolders(bool force=false); bool offline(); @@ -144,17 +144,17 @@ protected: }; class IMAPfolderItem : public AccountViewItem { public: - IMAPfolderItem( const Opie::OSmartPointer<Folder>&folder, IMAPviewItem *parent , QListViewItem*after ); - IMAPfolderItem( const Opie::OSmartPointer<Folder>&folder, IMAPfolderItem *parent , QListViewItem*after, IMAPviewItem *master ); + IMAPfolderItem( const Opie::Core::OSmartPointer<Folder>&folder, IMAPviewItem *parent , QListViewItem*after ); + IMAPfolderItem( const Opie::Core::OSmartPointer<Folder>&folder, IMAPfolderItem *parent , QListViewItem*after, IMAPviewItem *master ); virtual ~IMAPfolderItem(); - virtual void refresh(QValueList<Opie::OSmartPointer<RecMail> >&); - virtual RecBody fetchBody(const Opie::OSmartPointer<RecMail>&); + virtual void refresh(QValueList<Opie::Core::OSmartPointer<RecMail> >&); + virtual RecBody fetchBody(const Opie::Core::OSmartPointer<RecMail>&); virtual QPopupMenu * getContextMenu(); virtual void contextMenuSelected(int); virtual const QString& Delemiter()const; protected: virtual void createNewFolder(); virtual void deleteFolder(); @@ -166,14 +166,14 @@ class MHviewItem : public AccountViewItem { friend class MHfolderItem; public: MHviewItem( const QString&aMboxPath, AccountView *parent ); virtual ~MHviewItem(); - virtual void refresh(QValueList<Opie::OSmartPointer<RecMail> >&target ); - virtual RecBody fetchBody( const Opie::OSmartPointer<RecMail> &mail ); + virtual void refresh(QValueList<Opie::Core::OSmartPointer<RecMail> >&target ); + virtual RecBody fetchBody( const Opie::Core::OSmartPointer<RecMail> &mail ); AbstractMail *getWrapper(); virtual QPopupMenu * getContextMenu(); virtual void contextMenuSelected(int); QStringList subFolders(); virtual void refresh(bool force=false); @@ -186,20 +186,20 @@ protected: }; class MHfolderItem : public AccountViewItem { public: - MHfolderItem( const Opie::OSmartPointer<Folder>&folder, MHviewItem *parent , QListViewItem*after ); - MHfolderItem( const Opie::OSmartPointer<Folder>&folder, MHfolderItem *parent, QListViewItem*after, MHviewItem*master); + MHfolderItem( const Opie::Core::OSmartPointer<Folder>&folder, MHviewItem *parent , QListViewItem*after ); + MHfolderItem( const Opie::Core::OSmartPointer<Folder>&folder, MHfolderItem *parent, QListViewItem*after, MHviewItem*master); virtual ~MHfolderItem(); - virtual void refresh(QValueList<Opie::OSmartPointer<RecMail> >&); - virtual RecBody fetchBody(const Opie::OSmartPointer<RecMail>&); + virtual void refresh(QValueList<Opie::Core::OSmartPointer<RecMail> >&); + virtual RecBody fetchBody(const Opie::Core::OSmartPointer<RecMail>&); virtual QPopupMenu * getContextMenu(); virtual void contextMenuSelected(int); - virtual const Opie::OSmartPointer<Folder>&getFolder()const; + virtual const Opie::Core::OSmartPointer<Folder>&getFolder()const; virtual bool isDraftfolder(); protected: void downloadMails(); virtual void createFolder(); virtual void deleteFolder(); diff --git a/noncore/net/mail/accountview.cpp b/noncore/net/mail/accountview.cpp index 26107ff..811e57a 100644 --- a/noncore/net/mail/accountview.cpp +++ b/noncore/net/mail/accountview.cpp @@ -11,12 +11,13 @@ #include <qpe/qpeapplication.h> /* QT */ #include <qmessagebox.h> #include <qpopupmenu.h> +using namespace Opie::Core; AccountView::AccountView( QWidget *parent, const char *name, WFlags flags ) : QListView( parent, name, flags ) { connect( this, SIGNAL( selectionChanged(QListViewItem*) ), SLOT( refresh(QListViewItem*) ) ); connect( this, SIGNAL( mouseButtonPressed(int,QListViewItem*,const QPoint&,int) ),this, diff --git a/noncore/net/mail/accountview.h b/noncore/net/mail/accountview.h index d236058..b082b1f 100644 --- a/noncore/net/mail/accountview.h +++ b/noncore/net/mail/accountview.h @@ -18,14 +18,14 @@ class AccountView : public QListView Q_OBJECT public: AccountView( QWidget *parent = 0, const char *name = 0, WFlags flags = 0 ); virtual ~AccountView(); virtual void populate( QList<Account> list ); - virtual RecBody fetchBody(const Opie::OSmartPointer<RecMail>&aMail); - virtual void downloadMails(const Opie::OSmartPointer<Folder>&fromFolder,AbstractMail*fromWrapper); + virtual RecBody fetchBody(const Opie::Core::OSmartPointer<RecMail>&aMail); + virtual void downloadMails(const Opie::Core::OSmartPointer<Folder>&fromFolder,AbstractMail*fromWrapper); virtual bool currentisDraft(); public slots: virtual void refreshAll(); virtual void refresh(QListViewItem *item); virtual void refreshCurrent(); diff --git a/noncore/net/mail/composemail.cpp b/noncore/net/mail/composemail.cpp index 74ccc7b..5bc2883 100644 --- a/noncore/net/mail/composemail.cpp +++ b/noncore/net/mail/composemail.cpp @@ -10,12 +10,14 @@ #include <libmailwrapper/smtpwrapper.h> #include <libmailwrapper/storemail.h> #include <libmailwrapper/abstractmail.h> #include <libmailwrapper/mailtypes.h> +using namespace Opie::Core; +using namespace Opie::Ui; ComposeMail::ComposeMail( Settings *s, QWidget *parent, const char *name, bool modal, WFlags flags ) : ComposeMailUI( parent, name, modal, flags ) { settings = s; m_replyid = ""; @@ -157,13 +159,13 @@ void ComposeMail::slotAdjustColumns() tabWidget->setCurrentPage( currPage ); } void ComposeMail::addAttachment() { - DocLnk lnk = Opie::OFileDialog::getOpenFileName( 1, "/" ); + DocLnk lnk = OFileDialog::getOpenFileName( 1, "/" ); if ( !lnk.name().isEmpty() ) { Attachment *att = new Attachment( lnk ); (void) new AttachViewItem( attList, att ); } } @@ -185,13 +187,13 @@ void ComposeMail::accept() } #if 0 qDebug( "Sending Mail with " + smtpAccounts.at( smtpAccountBox->currentItem() )->getAccountName() ); #endif - Opie::OSmartPointer<Mail> mail=new Mail; + Opie::Core::OSmartPointer<Mail> mail=new Mail; SMTPaccount *smtp = smtpAccounts.at( smtpAccountBox->currentItem() ); mail->setMail(fromBox->currentText()); if ( !toLine->text().isEmpty() ) { mail->setTo( toLine->text() ); @@ -233,13 +235,13 @@ void ComposeMail::reject() int yesno = QMessageBox::warning(0,tr("Store message"), tr("Store message into drafts?"), tr("Yes"), tr("No"),QString::null,0,1); if (yesno == 0) { - Opie::OSmartPointer<Mail> mail=new Mail(); + Opie::Core::OSmartPointer<Mail> mail=new Mail(); mail->setMail(fromBox->currentText()); mail->setTo( toLine->text() ); mail->setName(senderNameEdit->text()); mail->setCC( ccLine->text() ); mail->setBCC( bccLine->text() ); mail->setReply( replyLine->text() ); diff --git a/noncore/net/mail/composemail.h b/noncore/net/mail/composemail.h index c12eb30..4693927 100644 --- a/noncore/net/mail/composemail.h +++ b/noncore/net/mail/composemail.h @@ -34,13 +34,13 @@ class ComposeMail : public ComposeMailUI Q_OBJECT public: ComposeMail( Settings *s, QWidget *parent = 0, const char *name = 0, bool modal = false, WFlags flags = 0 ); virtual ~ComposeMail(); - void reEditMail(const Opie::OSmartPointer<RecMail>¤t); + void reEditMail(const Opie::Core::OSmartPointer<RecMail>¤t); public slots: void slotAdjustColumns(); void setTo( const QString & to ); void setSubject( const QString & subject ); diff --git a/noncore/net/mail/libmailwrapper/abstractmail.cpp b/noncore/net/mail/libmailwrapper/abstractmail.cpp index 68a7a4d..6bebb7b 100644 --- a/noncore/net/mail/libmailwrapper/abstractmail.cpp +++ b/noncore/net/mail/libmailwrapper/abstractmail.cpp @@ -8,12 +8,13 @@ #include <qfile.h> #include <qtextstream.h> #include <stdlib.h> #include <libetpan/mailmime_content.h> #include <libetpan/mailmime.h> +using namespace Opie::Core; AbstractMail* AbstractMail::getWrapper(IMAPaccount *a) { return new IMAPwrapper(a); } AbstractMail* AbstractMail::getWrapper(POP3account *a) @@ -126,13 +127,13 @@ QString AbstractMail::defaultLocalfolder() QString AbstractMail::draftFolder() { return QString("Drafts"); } /* temporary - will be removed when implemented in all classes */ -void AbstractMail::deleteMails(const QString &,const QValueList<Opie::OSmartPointer<RecMail> > &) +void AbstractMail::deleteMails(const QString &,const QValueList<Opie::Core::OSmartPointer<RecMail> > &) { } void AbstractMail::mvcpAllMails(const FolderP&fromFolder, const QString&targetFolder,AbstractMail*targetWrapper,bool moveit) { diff --git a/noncore/net/mail/libmailwrapper/abstractmail.h b/noncore/net/mail/libmailwrapper/abstractmail.h index b03d757..2d55c83 100644 --- a/noncore/net/mail/libmailwrapper/abstractmail.h +++ b/noncore/net/mail/libmailwrapper/abstractmail.h @@ -18,39 +18,39 @@ struct folderStat; class AbstractMail:public QObject { Q_OBJECT public: AbstractMail(){}; virtual ~AbstractMail(){} - virtual QValueList<Opie::OSmartPointer<Folder> >* listFolders()=0; + virtual QValueList<Opie::Core::OSmartPointer<Folder> >* listFolders()=0; virtual void listMessages(const QString & mailbox,QValueList<RecMailP>&target )=0; virtual void statusFolder(folderStat&target_stat,const QString & mailbox="INBOX")=0; virtual RecBody fetchBody(const RecMailP&mail)=0; virtual QString fetchTextPart(const RecMailP&mail,const RecPart&part)=0; virtual encodedString* fetchDecodedPart(const RecMailP&mail,const RecPart&part)=0; virtual encodedString* fetchRawPart(const RecMailP&mail,const RecPart&part)=0; virtual encodedString* fetchRawBody(const RecMailP&mail)=0; virtual void deleteMail(const RecMailP&mail)=0; virtual void answeredMail(const RecMailP&mail)=0; - virtual int deleteAllMail(const Opie::OSmartPointer<Folder>&)=0; - virtual void deleteMails(const QString & FolderName,const QValueList<Opie::OSmartPointer<RecMail> >&target); - virtual int deleteMbox(const Opie::OSmartPointer<Folder>&)=0; + virtual int deleteAllMail(const Opie::Core::OSmartPointer<Folder>&)=0; + virtual void deleteMails(const QString & FolderName,const QValueList<Opie::Core::OSmartPointer<RecMail> >&target); + virtual int deleteMbox(const Opie::Core::OSmartPointer<Folder>&)=0; virtual void storeMessage(const char*msg,size_t length, const QString&folder)=0; - virtual void mvcpAllMails(const Opie::OSmartPointer<Folder>&fromFolder, + virtual void mvcpAllMails(const Opie::Core::OSmartPointer<Folder>&fromFolder, const QString&targetFolder,AbstractMail*targetWrapper,bool moveit); virtual void mvcpMail(const RecMailP&mail,const QString&targetFolder,AbstractMail*targetWrapper,bool moveit); virtual void cleanMimeCache(){}; /* mail box methods */ /* parameter is the box to create. * if the implementing subclass has prefixes, * them has to be appended automatic. */ - virtual int createMbox(const QString&,const Opie::OSmartPointer<Folder>&parentfolder=0, + virtual int createMbox(const QString&,const Opie::Core::OSmartPointer<Folder>&parentfolder=0, const QString& delemiter="/",bool getsubfolder=false); virtual void logout()=0; static AbstractMail* getWrapper(IMAPaccount *a); static AbstractMail* getWrapper(POP3account *a); static AbstractMail* getWrapper(NNTPaccount *a); diff --git a/noncore/net/mail/libmailwrapper/generatemail.cpp b/noncore/net/mail/libmailwrapper/generatemail.cpp index cb7ccc0..cb58d82 100644 --- a/noncore/net/mail/libmailwrapper/generatemail.cpp +++ b/noncore/net/mail/libmailwrapper/generatemail.cpp @@ -2,12 +2,13 @@ #include "mailwrapper.h" #include <libetpan/libetpan.h> #include <qt.h> +using namespace Opie::Core; const char* Generatemail::USER_AGENT="OpieMail v0.6"; Generatemail::Generatemail() { } @@ -276,13 +277,13 @@ err_free: mailimf_mailbox *Generatemail::newMailbox(const QString&name, const QString&mail ) { return mailimf_mailbox_new( strdup( name.latin1() ), strdup( mail.latin1() ) ); } -mailimf_fields *Generatemail::createImfFields(const Opie::OSmartPointer<Mail>&mail ) +mailimf_fields *Generatemail::createImfFields(const Opie::Core::OSmartPointer<Mail>&mail ) { mailimf_fields *fields = NULL; mailimf_field *xmailer = NULL; mailimf_mailbox *sender=0,*fromBox=0; mailimf_mailbox_list *from=0; mailimf_address_list *to=0, *cc=0, *bcc=0, *reply=0; @@ -396,13 +397,13 @@ mailimf_fields *Generatemail::createImfFields(const Opie::OSmartPointer<Mail>&ma } } } return fields; } -mailmime *Generatemail::createMimeMail(const Opie::OSmartPointer<Mail> &mail ) { +mailmime *Generatemail::createMimeMail(const Opie::Core::OSmartPointer<Mail> &mail ) { mailmime *message, *txtPart; mailimf_fields *fields; int err; fields = createImfFields( mail ); if ( fields == NULL ) diff --git a/noncore/net/mail/libmailwrapper/generatemail.h b/noncore/net/mail/libmailwrapper/generatemail.h index c246a2a..a767b61 100644 --- a/noncore/net/mail/libmailwrapper/generatemail.h +++ b/noncore/net/mail/libmailwrapper/generatemail.h @@ -33,14 +33,14 @@ protected: static mailimf_field *getField( mailimf_fields *fields, int type ); mailimf_address_list *parseAddresses(const QString&addr ); void addFileParts( mailmime *message,const QList<Attachment>&files ); mailmime *buildFilePart(const QString&filename,const QString&mimetype,const QString&content); mailmime *buildTxtPart(const QString&str ); mailimf_mailbox *newMailbox(const QString&name,const QString&mail ); - mailimf_fields *createImfFields(const Opie::OSmartPointer<Mail> &mail ); - mailmime *createMimeMail(const Opie::OSmartPointer<Mail>&mail ); + mailimf_fields *createImfFields(const Opie::Core::OSmartPointer<Mail> &mail ); + mailmime *createMimeMail(const Opie::Core::OSmartPointer<Mail>&mail ); clist *createRcptList( mailimf_fields *fields ); static const char* USER_AGENT; }; #endif diff --git a/noncore/net/mail/libmailwrapper/genericwrapper.cpp b/noncore/net/mail/libmailwrapper/genericwrapper.cpp index ee2c8cd..f428415 100644 --- a/noncore/net/mail/libmailwrapper/genericwrapper.cpp +++ b/noncore/net/mail/libmailwrapper/genericwrapper.cpp @@ -1,10 +1,11 @@ #include "genericwrapper.h" #include <libetpan/libetpan.h> #include "mailtypes.h" +using namespace Opie::Core; Genericwrapper::Genericwrapper() : AbstractMail() { bodyCache.clear(); m_storage = 0; m_folder = 0; @@ -384,13 +385,13 @@ QStringList Genericwrapper::parseInreplies(mailimf_in_reply_to * in_replies) res.append(h); } } return res; } -void Genericwrapper::parseList(QValueList<Opie::OSmartPointer<RecMail> > &target,mailsession*session,const QString&mailbox,bool mbox_as_to) +void Genericwrapper::parseList(QValueList<Opie::Core::OSmartPointer<RecMail> > &target,mailsession*session,const QString&mailbox,bool mbox_as_to) { int r; mailmessage_list * env_list = 0; r = mailsession_get_messages_list(session,&env_list); if (r != MAIL_NO_ERROR) { qDebug("Error message list"); diff --git a/noncore/net/mail/libmailwrapper/genericwrapper.h b/noncore/net/mail/libmailwrapper/genericwrapper.h index f9968d1..f5b9504 100644 --- a/noncore/net/mail/libmailwrapper/genericwrapper.h +++ b/noncore/net/mail/libmailwrapper/genericwrapper.h @@ -35,13 +35,13 @@ public: virtual ~Genericwrapper(); virtual encodedString* fetchDecodedPart(const RecMailP&mail,const RecPart&part); virtual encodedString* fetchRawPart(const RecMailP&mail,const RecPart&part); virtual QString fetchTextPart(const RecMailP&mail,const RecPart&part); virtual void cleanMimeCache(); - virtual int deleteMbox(const Opie::OSmartPointer<Folder>&){return 1;} + virtual int deleteMbox(const Opie::Core::OSmartPointer<Folder>&){return 1;} virtual void logout(){}; virtual void storeMessage(const char*msg,size_t length, const QString&folder){}; protected: RecBody parseMail( mailmessage * msg ); QString parseMailboxList( mailimf_mailbox_list *list ); @@ -51,13 +51,13 @@ protected: QString parseDateTime( mailimf_date_time *date ); void traverseBody(RecBody&target,mailmessage*message,mailmime*mime,QValueList<int>recList,unsigned int current_rek=0,int current_count=1); static void fillSingleBody(RecPart&target,mailmessage*message,mailmime*mime); static void fillParameters(RecPart&target,clist*parameters); static QString getencoding(mailmime_mechanism*aEnc); - virtual void parseList(QValueList<Opie::OSmartPointer<RecMail> > &target,mailsession*session,const QString&mailbox,bool mbox_as_to=false); + virtual void parseList(QValueList<Opie::Core::OSmartPointer<RecMail> > &target,mailsession*session,const QString&mailbox,bool mbox_as_to=false); QStringList parseInreplies(mailimf_in_reply_to * in_replies); QString msgTempName; unsigned int last_msg_id; QMap<QString,encodedString*> bodyCache; mailstorage * m_storage; diff --git a/noncore/net/mail/libmailwrapper/imapwrapper.cpp b/noncore/net/mail/libmailwrapper/imapwrapper.cpp index 071e734..56e7df9 100644 --- a/noncore/net/mail/libmailwrapper/imapwrapper.cpp +++ b/noncore/net/mail/libmailwrapper/imapwrapper.cpp @@ -3,12 +3,13 @@ #include <qpe/global.h> #include "imapwrapper.h" #include "mailtypes.h" #include "logindialog.h" +using namespace Opie::Core; IMAPwrapper::IMAPwrapper( IMAPaccount *a ) : AbstractMail() { account = a; m_imap = 0; m_Lastmbox = ""; @@ -202,13 +203,13 @@ void IMAPwrapper::logout() err = mailimap_close( m_imap ); mailimap_free( m_imap ); m_imap = 0; m_Lastmbox = ""; } -void IMAPwrapper::listMessages(const QString&mailbox,QValueList<Opie::OSmartPointer<RecMail> > &target ) +void IMAPwrapper::listMessages(const QString&mailbox,QValueList<Opie::Core::OSmartPointer<RecMail> > &target ) { int err = MAILIMAP_NO_ERROR; clist *result = 0; clistcell *current; mailimap_fetch_type *fetchType = 0; mailimap_set *set = 0; @@ -263,13 +264,13 @@ void IMAPwrapper::listMessages(const QString&mailbox,QValueList<Opie::OSmartPoin } else { Global::statusMessage(tr("Error fetching headers: %1").arg(m_imap->imap_response)); } if (result) mailimap_fetch_list_free(result); } -QValueList<Opie::OSmartPointer<Folder> >* IMAPwrapper::listFolders() +QValueList<Opie::Core::OSmartPointer<Folder> >* IMAPwrapper::listFolders() { const char *path, *mask; int err = MAILIMAP_NO_ERROR; clist *result = 0; clistcell *current = 0; clistcell*cur_flag = 0; diff --git a/noncore/net/mail/libmailwrapper/imapwrapper.h b/noncore/net/mail/libmailwrapper/imapwrapper.h index 3bd5967..7448acb 100644 --- a/noncore/net/mail/libmailwrapper/imapwrapper.h +++ b/noncore/net/mail/libmailwrapper/imapwrapper.h @@ -20,33 +20,33 @@ class encodedString; class IMAPwrapper : public AbstractMail { Q_OBJECT public: IMAPwrapper( IMAPaccount *a ); virtual ~IMAPwrapper(); - virtual QValueList<Opie::OSmartPointer<Folder> >* listFolders(); - virtual void listMessages(const QString & mailbox,QValueList<Opie::OSmartPointer<RecMail> >&target ); + virtual QValueList<Opie::Core::OSmartPointer<Folder> >* listFolders(); + virtual void listMessages(const QString & mailbox,QValueList<Opie::Core::OSmartPointer<RecMail> >&target ); virtual void statusFolder(folderStat&target_stat,const QString & mailbox="INBOX"); virtual void deleteMail(const RecMailP&mail); virtual void answeredMail(const RecMailP&mail); - virtual int deleteAllMail(const Opie::OSmartPointer<Folder>&folder); + virtual int deleteAllMail(const Opie::Core::OSmartPointer<Folder>&folder); virtual void storeMessage(const char*msg,size_t length, const QString&folder); - virtual void mvcpAllMails(const Opie::OSmartPointer<Folder>&fromFolder, + virtual void mvcpAllMails(const Opie::Core::OSmartPointer<Folder>&fromFolder, const QString&targetFolder,AbstractMail*targetWrapper,bool moveit); virtual void mvcpMail(const RecMailP&mail,const QString&targetFolder,AbstractMail*targetWrapper,bool moveit); virtual RecBody fetchBody(const RecMailP&mail); virtual QString fetchTextPart(const RecMailP&mail,const RecPart&part); virtual encodedString* fetchDecodedPart(const RecMailP&mail,const RecPart&part); virtual encodedString* fetchRawPart(const RecMailP&mail,const RecPart&part); virtual encodedString* fetchRawBody(const RecMailP&mail); - virtual int createMbox(const QString&,const Opie::OSmartPointer<Folder>&parentfolder=0, + virtual int createMbox(const QString&,const Opie::Core::OSmartPointer<Folder>&parentfolder=0, const QString& delemiter="/",bool getsubfolder=false); - virtual int deleteMbox(const Opie::OSmartPointer<Folder>&folder); + virtual int deleteMbox(const Opie::Core::OSmartPointer<Folder>&folder); static void imap_progress( size_t current, size_t maximum ); virtual void logout(); virtual MAILLIB::ATYPE getType()const; virtual const QString&getName()const; diff --git a/noncore/net/mail/libmailwrapper/mailtypes.cpp b/noncore/net/mail/libmailwrapper/mailtypes.cpp index 7dd7e58..fd91fe5 100644 --- a/noncore/net/mail/libmailwrapper/mailtypes.cpp +++ b/noncore/net/mail/libmailwrapper/mailtypes.cpp @@ -1,17 +1,18 @@ #include "mailtypes.h" #include <stdlib.h> +using namespace Opie::Core; RecMail::RecMail() - :Opie::ORefCount(),subject(""),date(""),from(""),mbox(""),msg_id(""),msg_number(0),msg_size(0),msg_flags(7) + :Opie::Core::ORefCount(),subject(""),date(""),from(""),mbox(""),msg_id(""),msg_number(0),msg_size(0),msg_flags(7) { init(); } RecMail::RecMail(const RecMail&old) - :Opie::ORefCount(),subject(""),date(""),from(""),mbox(""),msg_id(""),msg_number(0),msg_flags(7) + :Opie::Core::ORefCount(),subject(""),date(""),from(""),mbox(""),msg_id(""),msg_number(0),msg_flags(7) { init(); copy_old(old); qDebug("Copy constructor RecMail"); } diff --git a/noncore/net/mail/libmailwrapper/mailtypes.h b/noncore/net/mail/libmailwrapper/mailtypes.h index dc10de6..941556a 100644 --- a/noncore/net/mail/libmailwrapper/mailtypes.h +++ b/noncore/net/mail/libmailwrapper/mailtypes.h @@ -26,13 +26,13 @@ class AbstractMail; needed from the mail-wrapper class direct from the server itself (imap) or from a file-based cache (pop3?) So there is no interface "const QString&body()" but you should make a request to the mailwrapper with this class as parameter to get the body. Same words for the attachments. */ -class RecMail:public Opie::ORefCount +class RecMail:public Opie::Core::ORefCount { public: RecMail(); RecMail(const RecMail&old); virtual ~RecMail(); @@ -78,13 +78,13 @@ protected: QStringList to,cc,bcc,in_reply_to,references; AbstractMail*wrapper; void init(); void copy_old(const RecMail&old); }; -typedef Opie::OSmartPointer<RecMail> RecMailP; +typedef Opie::Core::OSmartPointer<RecMail> RecMailP; typedef QMap<QString,QString> part_plist_t; class RecPart { protected: QString m_type,m_subtype,m_identifier,m_encoding,m_description; diff --git a/noncore/net/mail/libmailwrapper/mailwrapper.cpp b/noncore/net/mail/libmailwrapper/mailwrapper.cpp index 9bf2fd3..eddc0b9 100644 --- a/noncore/net/mail/libmailwrapper/mailwrapper.cpp +++ b/noncore/net/mail/libmailwrapper/mailwrapper.cpp @@ -18,12 +18,13 @@ #define UTF16HIGHSTART 0xD800UL #define UTF16HIGHEND 0xDBFFUL #define UTF16LOSTART 0xDC00UL #define UTF16LOEND 0xDFFFUL +using namespace Opie::Core; Attachment::Attachment( DocLnk lnk ) { doc = lnk; size = QFileInfo( doc.file() ).size(); } @@ -152,13 +153,13 @@ QString IMAPFolder::decodeFolderName( const QString &name ) } return QString::fromUtf8( dst.data() ); } Mail::Mail() - :Opie::ORefCount(),name(""), mail(""), to(""), cc(""), bcc(""), reply(""), subject(""), message("") + :Opie::Core::ORefCount(),name(""), mail(""), to(""), cc(""), bcc(""), reply(""), subject(""), message("") { } MHFolder::MHFolder(const QString&disp_name,const QString&mbox) : Folder( disp_name,"/" ) { diff --git a/noncore/net/mail/libmailwrapper/mailwrapper.h b/noncore/net/mail/libmailwrapper/mailwrapper.h index 6bf0078..542de03 100644 --- a/noncore/net/mail/libmailwrapper/mailwrapper.h +++ b/noncore/net/mail/libmailwrapper/mailwrapper.h @@ -25,13 +25,13 @@ public: protected: DocLnk doc; int size; }; -class Mail:public Opie::ORefCount +class Mail:public Opie::Core::ORefCount { public: Mail(); /* Possible that this destructor must not be declared virtual * 'cause it seems that it will never have some child classes. * in this case this object will not get a virtual table -> memory and @@ -63,13 +63,13 @@ public: private: QList<Attachment> attList; QString name, mail, to, cc, bcc, reply, subject, message; QStringList m_in_reply_to; }; -class Folder:public Opie::ORefCount +class Folder:public Opie::Core::ORefCount { public: Folder( const QString&init_name,const QString&sep ); virtual ~Folder(); const QString&getDisplayName()const { return nameDisplay; } const QString&getName()const { return name; } @@ -79,13 +79,13 @@ public: const QString&Separator()const; protected: QString nameDisplay, name, separator,prefix; }; -typedef Opie::OSmartPointer<Folder> FolderP; +typedef Opie::Core::OSmartPointer<Folder> FolderP; class MHFolder : public Folder { public: MHFolder(const QString&disp_name,const QString&mbox); virtual ~MHFolder(); diff --git a/noncore/net/mail/libmailwrapper/mboxwrapper.cpp b/noncore/net/mail/libmailwrapper/mboxwrapper.cpp index 5e6b714..4aee0be 100644 --- a/noncore/net/mail/libmailwrapper/mboxwrapper.cpp +++ b/noncore/net/mail/libmailwrapper/mboxwrapper.cpp @@ -3,12 +3,13 @@ #include "mailwrapper.h" #include <libetpan/libetpan.h> #include <qdir.h> #include <stdlib.h> #include <qpe/global.h> +using namespace Opie::Core; MBOXwrapper::MBOXwrapper(const QString & mbox_dir,const QString&mbox_name) : Genericwrapper(),MBOXPath(mbox_dir),MBOXName(mbox_name) { QDir dir(MBOXPath); if (!dir.exists()) { dir.mkdir(MBOXPath); @@ -41,15 +42,15 @@ void MBOXwrapper::listMessages(const QString & mailbox, QValueList<RecMailP> &ta mailfolder_disconnect(folder); mailfolder_free(folder); mailstorage_free(storage); Global::statusMessage(tr("Mailbox has %1 mail(s)").arg(target.count())); } -QValueList<Opie::OSmartPointer<Folder> >* MBOXwrapper::listFolders() +QValueList<Opie::Core::OSmartPointer<Folder> >* MBOXwrapper::listFolders() { - QValueList<Opie::OSmartPointer<Folder> >* folders = new QValueList<Opie::OSmartPointer<Folder> >(); + QValueList<Opie::Core::OSmartPointer<Folder> >* folders = new QValueList<Opie::Core::OSmartPointer<Folder> >(); QDir dir(MBOXPath); if (!dir.exists()) return folders; dir.setFilter(QDir::Files|QDir::Writable|QDir::Readable); QStringList entries = dir.entryList(); QStringList::ConstIterator it = entries.begin(); for (;it!=entries.end();++it) { diff --git a/noncore/net/mail/libmailwrapper/mboxwrapper.h b/noncore/net/mail/libmailwrapper/mboxwrapper.h index 33eeb1e..a2ecfee 100644 --- a/noncore/net/mail/libmailwrapper/mboxwrapper.h +++ b/noncore/net/mail/libmailwrapper/mboxwrapper.h @@ -13,30 +13,30 @@ class MBOXwrapper : public Genericwrapper public: MBOXwrapper(const QString & dir,const QString&name); virtual ~MBOXwrapper(); virtual void listMessages(const QString & mailbox, QValueList<RecMailP>&target ); - virtual QValueList<Opie::OSmartPointer<Folder> >* listFolders(); + virtual QValueList<Opie::Core::OSmartPointer<Folder> >* listFolders(); virtual void statusFolder(folderStat&target_stat,const QString & mailbox="INBOX"); virtual void deleteMail(const RecMailP&mail); virtual void answeredMail(const RecMailP&mail); - virtual int createMbox(const QString&folder,const Opie::OSmartPointer<Folder>&f=0, + virtual int createMbox(const QString&folder,const Opie::Core::OSmartPointer<Folder>&f=0, const QString&d="",bool s=false); - virtual int deleteMbox(const Opie::OSmartPointer<Folder>&); + virtual int deleteMbox(const Opie::Core::OSmartPointer<Folder>&); virtual void storeMessage(const char*msg,size_t length, const QString&folder); virtual RecBody fetchBody( const RecMailP &mail ); static void mbox_progress( size_t current, size_t maximum ); virtual encodedString* fetchRawBody(const RecMailP&mail); virtual void deleteMails(const QString & FolderName,const QValueList<RecMailP> &target); - virtual int deleteAllMail(const Opie::OSmartPointer<Folder>&); + virtual int deleteAllMail(const Opie::Core::OSmartPointer<Folder>&); virtual MAILLIB::ATYPE getType()const; virtual const QString&getName()const; protected: static void deleteMails(mailmbox_folder*f,const QValueList<RecMailP> &target); QString MBOXPath; diff --git a/noncore/net/mail/libmailwrapper/mhwrapper.cpp b/noncore/net/mail/libmailwrapper/mhwrapper.cpp index 0b00a2e..21e24a0 100644 --- a/noncore/net/mail/libmailwrapper/mhwrapper.cpp +++ b/noncore/net/mail/libmailwrapper/mhwrapper.cpp @@ -5,12 +5,15 @@ #include <qdir.h> #include <qmessagebox.h> #include <stdlib.h> #include <qpe/global.h> #include <opie2/oprocess.h> +using namespace Opie::Core; +using namespace Opie::Core; +using namespace Opie::Core; MHwrapper::MHwrapper(const QString & mbox_dir,const QString&mbox_name) : Genericwrapper(),MHPath(mbox_dir),MHName(mbox_name) { if (MHPath.length()>0) { if (MHPath[MHPath.length()-1]=='/') { MHPath=MHPath.left(MHPath.length()-1); @@ -57,13 +60,13 @@ void MHwrapper::clean_storage() MHwrapper::~MHwrapper() { clean_storage(); } -void MHwrapper::listMessages(const QString & mailbox, QValueList<Opie::OSmartPointer<RecMail> > &target ) +void MHwrapper::listMessages(const QString & mailbox, QValueList<Opie::Core::OSmartPointer<RecMail> > &target ) { init_storage(); if (!m_storage) { return; } QString f = buildPath(mailbox); @@ -73,15 +76,15 @@ void MHwrapper::listMessages(const QString & mailbox, QValueList<Opie::OSmartPoi return; } parseList(target,m_storage->sto_session,f); Global::statusMessage(tr("Mailbox has %1 mail(s)").arg(target.count())); } -QValueList<Opie::OSmartPointer<Folder> >* MHwrapper::listFolders() +QValueList<Opie::Core::OSmartPointer<Folder> >* MHwrapper::listFolders() { - QValueList<Opie::OSmartPointer<Folder> >* folders = new QValueList<Opie::OSmartPointer<Folder> >(); + QValueList<Opie::Core::OSmartPointer<Folder> >* folders = new QValueList<Opie::Core::OSmartPointer<Folder> >(); /* this is needed! */ if (m_storage) mailstorage_disconnect(m_storage); init_storage(); if (!m_storage) { return folders; } @@ -314,15 +317,15 @@ int MHwrapper::deleteMbox(const FolderP&tfolder) QStringList command; command << "/bin/sh"; command << "-c"; command << cmd.latin1(); OProcess *process = new OProcess(); - connect(process, SIGNAL(processExited(OProcess*)), + connect(process, SIGNAL(processExited(Opie::Core::OProcess*)), this, SLOT( processEnded(OProcess*))); - connect(process, SIGNAL( receivedStderr(OProcess*,char*,int)), + connect(process, SIGNAL( receivedStderr(Opie::Core::OProcess*,char*,int)), this, SLOT( oprocessStderr(OProcess*,char*,int))); *process << command; removeMboxfailed = false; if(!process->start(OProcess::Block, OProcess::All) ) { qDebug("could not start process"); diff --git a/noncore/net/mail/libmailwrapper/mhwrapper.h b/noncore/net/mail/libmailwrapper/mhwrapper.h index 208cf2f..1245507 100644 --- a/noncore/net/mail/libmailwrapper/mhwrapper.h +++ b/noncore/net/mail/libmailwrapper/mhwrapper.h @@ -5,50 +5,50 @@ #include "genericwrapper.h" #include <qstring.h> class encodedString; struct mailmbox_folder; -class OProcess; +namespace Opie {namespace Core {class Opie::Core::OProcess;}} class MHwrapper : public Genericwrapper { Q_OBJECT public: MHwrapper(const QString & dir,const QString&name); virtual ~MHwrapper(); - virtual void listMessages(const QString & mailbox, QValueList<Opie::OSmartPointer<RecMail> > &target ); - virtual QValueList<Opie::OSmartPointer<Folder> >* listFolders(); + virtual void listMessages(const QString & mailbox, QValueList<Opie::Core::OSmartPointer<RecMail> > &target ); + virtual QValueList<Opie::Core::OSmartPointer<Folder> >* listFolders(); virtual void statusFolder(folderStat&target_stat,const QString & mailbox="INBOX"); virtual void deleteMail(const RecMailP&mail); virtual void answeredMail(const RecMailP&mail); virtual void mvcpMail(const RecMailP&mail,const QString&targetFolder,AbstractMail*targetWrapper,bool moveit); - virtual void mvcpAllMails(const Opie::OSmartPointer<Folder>&fromFolder, + virtual void mvcpAllMails(const Opie::Core::OSmartPointer<Folder>&fromFolder, const QString&targetFolder,AbstractMail*targetWrapper,bool moveit); - virtual int createMbox(const QString&folder,const Opie::OSmartPointer<Folder>&f=0, + virtual int createMbox(const QString&folder,const Opie::Core::OSmartPointer<Folder>&f=0, const QString&d="",bool s=false); - virtual int deleteMbox(const Opie::OSmartPointer<Folder>&); + virtual int deleteMbox(const Opie::Core::OSmartPointer<Folder>&); virtual void storeMessage(const char*msg,size_t length, const QString&folder); virtual RecBody fetchBody( const RecMailP &mail ); static void mbox_progress( size_t current, size_t maximum ); virtual encodedString* fetchRawBody(const RecMailP&mail); - virtual void deleteMails(const QString & FolderName,const QValueList<Opie::OSmartPointer<RecMail> > &target); - virtual int deleteAllMail(const Opie::OSmartPointer<Folder>&); + virtual void deleteMails(const QString & FolderName,const QValueList<Opie::Core::OSmartPointer<RecMail> > &target); + virtual int deleteAllMail(const Opie::Core::OSmartPointer<Folder>&); virtual MAILLIB::ATYPE getType()const; virtual const QString&getName()const; public slots: /* for deleting maildirs we are using a system call */ - virtual void oprocessStderr(OProcess*, char *buffer, int ); - virtual void processEnded(OProcess *); + virtual void oprocessStderr(Opie::Core::OProcess*, char *buffer, int ); + virtual void processEnded(Opie::Core::OProcess *); protected: QString buildPath(const QString&p); QString MHPath; QString MHName; void init_storage(); diff --git a/noncore/net/mail/libmailwrapper/nntpwrapper.cpp b/noncore/net/mail/libmailwrapper/nntpwrapper.cpp index c0b3eec..9de958d 100644 --- a/noncore/net/mail/libmailwrapper/nntpwrapper.cpp +++ b/noncore/net/mail/libmailwrapper/nntpwrapper.cpp @@ -8,12 +8,13 @@ #include <libetpan/libetpan.h> #define HARD_MSG_SIZE_LIMIT 5242880 +using namespace Opie::Core; NNTPwrapper::NNTPwrapper( NNTPaccount *a ) : Genericwrapper() { account = a; m_nntp = NULL; msgTempName = a->getFileName()+"_msg_cache"; last_msg_id = 0; @@ -93,13 +94,13 @@ RecBody NNTPwrapper::fetchBody( const RecMailP &mail ) { free(message); return body; } -void NNTPwrapper::listMessages(const QString & which, QValueList<Opie::OSmartPointer<RecMail> > &target ) +void NNTPwrapper::listMessages(const QString & which, QValueList<Opie::Core::OSmartPointer<RecMail> > &target ) { login(); if (!m_nntp) return; uint32_t res_messages,res_recent,res_unseen; mailsession_status_folder(m_nntp->sto_session,(char*)which.latin1(),&res_messages,&res_recent,&res_unseen); @@ -185,15 +186,15 @@ void NNTPwrapper::logout() if ( m_nntp == NULL ) return; mailstorage_free(m_nntp); m_nntp = 0; } -QValueList<Opie::OSmartPointer<Folder> >* NNTPwrapper::listFolders() { +QValueList<Opie::Core::OSmartPointer<Folder> >* NNTPwrapper::listFolders() { - QValueList<Opie::OSmartPointer<Folder> >* folders = new QValueList<Opie::OSmartPointer<Folder> >(); + QValueList<Opie::Core::OSmartPointer<Folder> >* folders = new QValueList<Opie::Core::OSmartPointer<Folder> >(); QStringList groups; if (account) { groups = account->getGroups(); } for ( QStringList::Iterator it = groups.begin(); it != groups.end(); ++it ) { folders->append(new Folder((*it),".")); diff --git a/noncore/net/mail/libmailwrapper/nntpwrapper.h b/noncore/net/mail/libmailwrapper/nntpwrapper.h index a7e4b95..a87a8e8 100644 --- a/noncore/net/mail/libmailwrapper/nntpwrapper.h +++ b/noncore/net/mail/libmailwrapper/nntpwrapper.h @@ -17,21 +17,21 @@ class NNTPwrapper : public Genericwrapper public: NNTPwrapper( NNTPaccount *a ); virtual ~NNTPwrapper(); /* mailbox will be ignored */ - virtual void listMessages(const QString & mailbox, QValueList<Opie::OSmartPointer<RecMail> > &target ); + virtual void listMessages(const QString & mailbox, QValueList<Opie::Core::OSmartPointer<RecMail> > &target ); /* should only get the subscribed one */ - virtual QValueList<Opie::OSmartPointer<Folder> >* listFolders(); + virtual QValueList<Opie::Core::OSmartPointer<Folder> >* listFolders(); /* mailbox will be ignored */ virtual void statusFolder(folderStat&target_stat,const QString & mailbox="INBOX"); QStringList listAllNewsgroups(const QString&mask = QString::null); virtual void deleteMail(const RecMailP&mail); virtual void answeredMail(const RecMailP&mail); - virtual int deleteAllMail(const Opie::OSmartPointer<Folder>&); + virtual int deleteAllMail(const Opie::Core::OSmartPointer<Folder>&); virtual RecBody fetchBody( const RecMailP &mail ); virtual encodedString* fetchRawBody(const RecMailP&mail); virtual void logout(); virtual MAILLIB::ATYPE getType()const; virtual const QString&getName()const; diff --git a/noncore/net/mail/libmailwrapper/pop3wrapper.cpp b/noncore/net/mail/libmailwrapper/pop3wrapper.cpp index 6737d6c..f5694fe 100644 --- a/noncore/net/mail/libmailwrapper/pop3wrapper.cpp +++ b/noncore/net/mail/libmailwrapper/pop3wrapper.cpp @@ -7,12 +7,13 @@ #include <qfile.h> //#include <qstring.h> /* we don't fetch messages larger than 5 MB */ #define HARD_MSG_SIZE_LIMIT 5242880 +using namespace Opie::Core; POP3wrapper::POP3wrapper( POP3account *a ) : Genericwrapper() { account = a; m_pop3 = NULL; msgTempName = a->getFileName()+"_msg_cache"; last_msg_id = 0; @@ -90,13 +91,13 @@ RecBody POP3wrapper::fetchBody( const RecMailP &mail ) { if (message) free(message); return body; } -void POP3wrapper::listMessages(const QString &, QValueList<Opie::OSmartPointer<RecMail> > &target ) +void POP3wrapper::listMessages(const QString &, QValueList<Opie::Core::OSmartPointer<RecMail> > &target ) { login(); if (!m_pop3) return; uint32_t res_messages,res_recent,res_unseen; mailsession_status_folder(m_pop3->sto_session,"INBOX",&res_messages,&res_recent,&res_unseen); @@ -173,14 +174,14 @@ void POP3wrapper::logout() return; mailstorage_free(m_pop3); m_pop3 = 0; } -QValueList<Opie::OSmartPointer<Folder> >* POP3wrapper::listFolders() { - QValueList<Opie::OSmartPointer<Folder> >* folders = new QValueList<FolderP>(); +QValueList<Opie::Core::OSmartPointer<Folder> >* POP3wrapper::listFolders() { + QValueList<Opie::Core::OSmartPointer<Folder> >* folders = new QValueList<FolderP>(); FolderP inb=new Folder("INBOX","/"); folders->append(inb); return folders; } void POP3wrapper::deleteMail(const RecMailP&mail) { diff --git a/noncore/net/mail/libmailwrapper/pop3wrapper.h b/noncore/net/mail/libmailwrapper/pop3wrapper.h index 31eb6f1..c46b941 100644 --- a/noncore/net/mail/libmailwrapper/pop3wrapper.h +++ b/noncore/net/mail/libmailwrapper/pop3wrapper.h @@ -14,20 +14,20 @@ class POP3wrapper : public Genericwrapper Q_OBJECT public: POP3wrapper( POP3account *a ); virtual ~POP3wrapper(); /* mailbox will be ignored */ - virtual void listMessages(const QString & mailbox, QValueList<Opie::OSmartPointer<RecMail> > &target ); - virtual QValueList<Opie::OSmartPointer<Folder> >* listFolders(); + virtual void listMessages(const QString & mailbox, QValueList<Opie::Core::OSmartPointer<RecMail> > &target ); + virtual QValueList<Opie::Core::OSmartPointer<Folder> >* listFolders(); /* mailbox will be ignored */ virtual void statusFolder(folderStat&target_stat,const QString & mailbox="INBOX"); virtual void deleteMail(const RecMailP&mail); virtual void answeredMail(const RecMailP&mail); - virtual int deleteAllMail(const Opie::OSmartPointer<Folder>&); + virtual int deleteAllMail(const Opie::Core::OSmartPointer<Folder>&); virtual RecBody fetchBody( const RecMailP &mail ); virtual encodedString* fetchRawBody(const RecMailP&mail); virtual void logout(); virtual MAILLIB::ATYPE getType()const; virtual const QString&getName()const; diff --git a/noncore/net/mail/libmailwrapper/smtpwrapper.cpp b/noncore/net/mail/libmailwrapper/smtpwrapper.cpp index 86673aa..e2cea7a 100644 --- a/noncore/net/mail/libmailwrapper/smtpwrapper.cpp +++ b/noncore/net/mail/libmailwrapper/smtpwrapper.cpp @@ -10,12 +10,13 @@ #include <qpe/config.h> #include <qpe/qcopenvelope_qws.h> #include <libetpan/libetpan.h> +using namespace Opie::Core; progressMailSend*SMTPwrapper::sendProgress = 0; SMTPwrapper::SMTPwrapper(SMTPaccount * aSmtp ) : Generatemail() { m_SmtpAccount = aSmtp; @@ -309,13 +310,13 @@ int SMTPwrapper::smtpSend(char*from,clist*rcpts,const char*data,size_t size ) qDebug( "Mail sent." ); storeMail(data,size,"Sent"); } return result; } -void SMTPwrapper::sendMail(const Opie::OSmartPointer<Mail>&mail,bool later ) +void SMTPwrapper::sendMail(const Opie::Core::OSmartPointer<Mail>&mail,bool later ) { mailmime * mimeMail; mimeMail = createMimeMail(mail ); if ( mimeMail == NULL ) { qDebug( "sendMail: error creating mime mail" ); diff --git a/noncore/net/mail/libmailwrapper/smtpwrapper.h b/noncore/net/mail/libmailwrapper/smtpwrapper.h index 71ae35c..6c5bbe8 100644 --- a/noncore/net/mail/libmailwrapper/smtpwrapper.h +++ b/noncore/net/mail/libmailwrapper/smtpwrapper.h @@ -20,13 +20,13 @@ class SMTPwrapper : public Generatemail { Q_OBJECT public: SMTPwrapper(SMTPaccount * aSmtp); virtual ~SMTPwrapper(); - void sendMail(const Opie::OSmartPointer<Mail>& mail,bool later=false ); + void sendMail(const Opie::Core::OSmartPointer<Mail>& mail,bool later=false ); bool flushOutbox(); static progressMailSend*sendProgress; signals: void queuedMails( int ); @@ -47,13 +47,13 @@ protected: static void progress( size_t current, size_t maximum ); int smtpSend(char*from,clist*rcpts,const char*data,size_t size); void storeMail(mailmime*mail, const QString&box); - int sendQueuedMail(AbstractMail*wrap,const Opie::OSmartPointer<RecMail>&which); + int sendQueuedMail(AbstractMail*wrap,const Opie::Core::OSmartPointer<RecMail>&which); void storeFailedMail(const char*data,unsigned int size, const char*failuremessage); int m_queuedMail; protected slots: void emitQCop( int queued ); diff --git a/noncore/net/mail/libmailwrapper/storemail.cpp b/noncore/net/mail/libmailwrapper/storemail.cpp index 595e7fc..914a11d 100644 --- a/noncore/net/mail/libmailwrapper/storemail.cpp +++ b/noncore/net/mail/libmailwrapper/storemail.cpp @@ -6,12 +6,13 @@ #include <libetpan/libetpan.h> #include <qstring.h> #include <stdlib.h> +using namespace Opie::Core; Storemail::Storemail(Account*aAccount,const QString&aFolder) : Generatemail() { wrapper = 0; m_Account = aAccount; m_tfolder = aFolder; @@ -46,13 +47,13 @@ Storemail::Storemail(const QString&aFolder) } Storemail::~Storemail() { } -int Storemail::storeMail(const Opie::OSmartPointer<Mail>&mail) +int Storemail::storeMail(const Opie::Core::OSmartPointer<Mail>&mail) { if (!wrapper) return 0; int ret = 1; mailmime * mimeMail = 0; mimeMail = createMimeMail(mail ); diff --git a/noncore/net/mail/libmailwrapper/storemail.h b/noncore/net/mail/libmailwrapper/storemail.h index 80c7431..4433de0 100644 --- a/noncore/net/mail/libmailwrapper/storemail.h +++ b/noncore/net/mail/libmailwrapper/storemail.h @@ -15,13 +15,13 @@ class Storemail : public Generatemail public: Storemail(Account*aAccount,const QString&aFolder); Storemail(const QString&dir,const QString&aFolder); Storemail(const QString&aFolder); virtual ~Storemail(); - int storeMail(const Opie::OSmartPointer<Mail>&mail); + int storeMail(const Opie::Core::OSmartPointer<Mail>&mail); protected: Account* m_Account; QString m_tfolder; AbstractMail*wrapper; }; diff --git a/noncore/net/mail/mail.pro b/noncore/net/mail/mail.pro index 005a839..926cdbd 100644 --- a/noncore/net/mail/mail.pro +++ b/noncore/net/mail/mail.pro @@ -49,13 +49,13 @@ INTERFACES = editaccountsui.ui \ statuswidgetui.ui \ newmaildirui.ui \ selectstoreui.ui \ nntpgroupsui.ui -INCLUDEPATH += $(OPIEDIR)/include +INCLUDEPATH += $(OPIEDIR)/include /usr/local/include CONFTEST = $$system( echo $CONFIG_TARGET_MACOSX ) contains( CONFTEST, y ){ LIBS += -lqpe -lopieui2 -lopiecore2 -lopiepim2 -lopiedb2 -lmailwrapper -liconv }else{ LIBS += -lqpe -lopieui2 -lopiecore2 -lopiepim2 -lopiedb2 -lmailwrapper diff --git a/noncore/net/mail/main.cpp b/noncore/net/mail/main.cpp index 54ac7fb..4942083 100644 --- a/noncore/net/mail/main.cpp +++ b/noncore/net/mail/main.cpp @@ -1,5 +1,7 @@ #include <opie2/oapplicationfactory.h> #include "opiemail.h" +using namespace Opie::Core; +using namespace Opie::Core; OPIE_EXPORT_APP( OApplicationFactory<OpieMail> ) diff --git a/noncore/net/mail/taskbarapplet/mailapplet.cpp b/noncore/net/mail/taskbarapplet/mailapplet.cpp index de32007..f672a36 100644 --- a/noncore/net/mail/taskbarapplet/mailapplet.cpp +++ b/noncore/net/mail/taskbarapplet/mailapplet.cpp @@ -9,13 +9,13 @@ #include <opie2/odevice.h> #include <libmailwrapper/settings.h> #include "mailapplet.h" -using namespace Opie; +using namespace Opie::Core; MailApplet::MailApplet( QWidget *parent ) : QWidget( parent ) { m_config = new Config( "mail" ); m_config->setGroup( "Applet" ); diff --git a/noncore/net/mail/viewmail.cpp b/noncore/net/mail/viewmail.cpp index 894a386..f00d2cb 100644 --- a/noncore/net/mail/viewmail.cpp +++ b/noncore/net/mail/viewmail.cpp @@ -15,12 +15,13 @@ #include <qmessagebox.h> #include <qtextstream.h> #include <qaction.h> #include <qpopupmenu.h> #include <qfile.h> +using namespace Opie::Ui; AttachItem::AttachItem(QListView * parent,QListViewItem *after, const QString&mime,const QString&desc,const QString&file, const QString&fsize,int num,const QValueList<int>&path) : QListViewItem(parent,after),_partNum(num) { _path=path; setText(0, mime); @@ -217,13 +218,13 @@ void ViewMail::slotItemClicked( QListViewItem * item , const QPoint & point, int switch(ret) { case 0: { MimeTypes types; types.insert( "all", "*" ); - QString str = Opie::OFileDialog::getSaveFileName( 1, + QString str = OFileDialog::getSaveFileName( 1, "/", item->text( 2 ) , types, 0 ); if( !str.isEmpty() ) { encodedString*content = m_recMail->Wrapper()->fetchDecodedPart( m_recMail, m_body.Parts()[ ( ( AttachItem* )item )->Partnumber() ] ); if (content) diff --git a/noncore/net/mail/viewmailbase.cpp b/noncore/net/mail/viewmailbase.cpp index c2bf08c..cbb98cc 100644 --- a/noncore/net/mail/viewmailbase.cpp +++ b/noncore/net/mail/viewmailbase.cpp @@ -1,13 +1,13 @@ #include <qtextbrowser.h> #include <qlistview.h> #include <qaction.h> #include <qlabel.h> #include <qvbox.h> -#include <qpe/qpetoolbar.h> +#include <qtoolbar.h> #include <qmenubar.h> #include <qpe/resource.h> #include "viewmailbase.h" //#include "opendiag.h" diff --git a/noncore/net/opieftp/main.cpp b/noncore/net/opieftp/main.cpp index d9da4b2..330ca52 100644 --- a/noncore/net/opieftp/main.cpp +++ b/noncore/net/opieftp/main.cpp @@ -1,8 +1,9 @@ /*************************************************************************** + main.cpp - description ------------------- begin : March 10, 2002 copyright : (C) 2002 by llornkcor email : ljp@llornkcor.com * This program is free software; you can redistribute it and/or modify * @@ -10,7 +11,8 @@ * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * ***************************************************************************/ #include <opie2/oapplicationfactory.h> #include "opieftp.h" +using namespace Opie::Core; OPIE_EXPORT_APP( OApplicationFactory<OpieFtp> ) diff --git a/noncore/net/opieirc/config.in b/noncore/net/opieirc/config.in index 7c6949d..38fa347 100644 --- a/noncore/net/opieirc/config.in +++ b/noncore/net/opieirc/config.in @@ -1,4 +1,4 @@ config OPIEIRC boolean "opie-irc (chat via your favorite IRC server)" default "y" - depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE + depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIEUI2 && LIBQTAUX diff --git a/noncore/net/opieirc/ircsettings.cpp b/noncore/net/opieirc/ircsettings.cpp index f69d2c4..13fcc24 100644 --- a/noncore/net/opieirc/ircsettings.cpp +++ b/noncore/net/opieirc/ircsettings.cpp @@ -1,19 +1,21 @@ #include "ircsettings.h" #include "irctab.h" /* OPIE */ -#include <opie/ocolorbutton.h> -#include <opie/otabwidget.h> +#include <opie2/ocolorbutton.h> +#include <opie2/otabwidget.h> #include <qpe/qpeapplication.h> /* QT */ #include <qvalidator.h> #include <qwhatsthis.h> +using namespace Opie; +using namespace Opie::Ui; IRCSettings::IRCSettings(QWidget* parent, const char* name, bool modal, WFlags) : QDialog(parent, name, modal, WStyle_ContextHelp) { setCaption(tr("Settings") ); m_config = new Config("OpieIRC"); m_config->setGroup("OpieIRC"); QHBoxLayout *l = new QHBoxLayout(this, 2, 2); diff --git a/noncore/net/opieirc/ircsettings.h b/noncore/net/opieirc/ircsettings.h index cb8d896..56e667b 100644 --- a/noncore/net/opieirc/ircsettings.h +++ b/noncore/net/opieirc/ircsettings.h @@ -22,28 +22,30 @@ #define __IRCSETTINGS_H #include <qpe/config.h> #include <qdialog.h> #include <qlineedit.h> +namespace Opie { class OColorButton; +} class IRCSettings : public QDialog { Q_OBJECT public: IRCSettings(QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags f = 0); ~IRCSettings(); protected slots: void accept(); protected: Config *m_config; - OColorButton *m_background; - OColorButton *m_text; - OColorButton *m_error; - OColorButton *m_self; - OColorButton *m_server; - OColorButton *m_other; - OColorButton *m_notification; + Opie::OColorButton *m_background; + Opie::OColorButton *m_text; + Opie::OColorButton *m_error; + Opie::OColorButton *m_self; + Opie::OColorButton *m_server; + Opie::OColorButton *m_other; + Opie::OColorButton *m_notification; QLineEdit *m_lines; }; #endif /* __IRCSETTINGS_H */ diff --git a/noncore/net/opieirc/main.cpp b/noncore/net/opieirc/main.cpp index da38024..f3cbecc 100644 --- a/noncore/net/opieirc/main.cpp +++ b/noncore/net/opieirc/main.cpp @@ -1,6 +1,7 @@ #include "mainwindow.h" -#include <opie/oapplicationfactory.h> +#include <opie2/oapplicationfactory.h> +using namespace Opie::Core; OPIE_EXPORT_APP( OApplicationFactory<MainWindow> ) diff --git a/noncore/net/opieirc/opieirc.pro b/noncore/net/opieirc/opieirc.pro index 537f810..9039ff8 100644 --- a/noncore/net/opieirc/opieirc.pro +++ b/noncore/net/opieirc/opieirc.pro @@ -15,11 +15,11 @@ SOURCES = ircchannel.cpp ircconnection.cpp \ irctab.cpp ircservertab.cpp \ ircchanneltab.cpp ircchannellist.cpp \ ircserverlist.cpp ircservereditor.cpp \ ircquerytab.cpp ircsettings.cpp ircmisc.cpp INCLUDEPATH += $(OPIEDIR)/include DEPENDPATH += $(OPIEDIR)/include -LIBS += -lqpe -lopie +LIBS += -lqpe -lopieui2 -lqtaux2 TARGET = opieirc include ( $(OPIEDIR)/include.pro ) diff --git a/noncore/net/opietooth/applet/bluezapplet.cpp b/noncore/net/opietooth/applet/bluezapplet.cpp index 817936d..93b2c67 100644 --- a/noncore/net/opietooth/applet/bluezapplet.cpp +++ b/noncore/net/opietooth/applet/bluezapplet.cpp @@ -31,13 +31,13 @@ #include <qapplication.h> #include <qpe/qcopenvelope_qws.h> #include <qpe/config.h> #include <qpe/resource.h> -#include <opie/odevice.h> +#include <opie2/odevice.h> #include <qpoint.h> #include <qpainter.h> #include <qlayout.h> #include <qframe.h> #include <qpixmap.h> diff --git a/noncore/net/opietooth/lib/device.cc b/noncore/net/opietooth/lib/device.cc index bae1c47..d913853 100644 --- a/noncore/net/opietooth/lib/device.cc +++ b/noncore/net/opietooth/lib/device.cc @@ -1,15 +1,17 @@ #include <signal.h> -#include <opie/oprocess.h> +#include <opie2/oprocess.h> #include "device.h" using namespace OpieTooth; +using namespace Opie::Core; +using namespace Opie::Core; namespace { int parsePid( const QCString& par ){ int id=0; QString string( par ); QStringList list = QStringList::split( '\n', string ); for( QStringList::Iterator it = list.begin(); it != list.end(); ++it ){ @@ -44,17 +46,17 @@ void Device::attach(){ m_output.resize(0); qWarning("new process to create" ); m_process = new OProcess(); *m_process << "hciattach"; *m_process << "-p"; *m_process << m_device << m_mode << m_speed; - connect(m_process, SIGNAL( processExited(OProcess*) ), + connect(m_process, SIGNAL( processExited(Opie::Core::OProcess*) ), this, SLOT( slotExited(OProcess* ) ) ); - connect(m_process, SIGNAL( receivedStdout(OProcess*, char*, int) ), + connect(m_process, SIGNAL( receivedStdout(Opie::Core::OProcess*, char*, int) ), this, SLOT(slotStdOut(OProcess*,char*,int ) ) ); - connect(m_process, SIGNAL(receivedStderr(OProcess*, char*, int ) ), + connect(m_process, SIGNAL(receivedStderr(Opie::Core::OProcess*, char*, int ) ), this, SLOT(slotStdErr(OProcess*,char*,int) ) ); if(!m_process->start(OProcess::NotifyOnExit, OProcess::AllOutput ) ){ qWarning("Could not start" ); delete m_process; m_process = 0; } @@ -93,13 +95,13 @@ void Device::slotExited( OProcess* proc) // now hciconfig hci0 up ( determine hciX FIXME) // and call hciconfig hci0 up // FIXME hardcoded to hci0 now :( m_hci = new OProcess( ); *m_hci << "hciconfig"; *m_hci << "hci0 up"; - connect(m_hci, SIGNAL( processExited(OProcess*) ), + connect(m_hci, SIGNAL( processExited(Opie::Core::OProcess*) ), this, SLOT( slotExited(OProcess* ) ) ); if(!m_hci->start() ){ qWarning("could not start" ); m_attached = false; emit device("hci0", false ); } diff --git a/noncore/net/opietooth/lib/device.h b/noncore/net/opietooth/lib/device.h index ce7fccc..f3339fc 100644 --- a/noncore/net/opietooth/lib/device.h +++ b/noncore/net/opietooth/lib/device.h @@ -5,13 +5,13 @@ #include <qobject.h> #include <qstring.h> #include <qvaluelist.h> #include <sys/types.h> -class OProcess; +namespace Opie {namespace Core {class Opie::Core::OProcess;}} namespace OpieTooth { /** * Device takes care of attaching serial * devices to the blueZ stack. * After attaching it hciconfig ups it */ @@ -64,22 +64,22 @@ namespace OpieTooth { * Signals devicename and up status * @return &device QString, Devicename * @return up bool, if the device is up or not. */ void device(const QString& device, bool up ); private slots: - virtual void slotExited( OProcess* ); - virtual void slotStdOut(OProcess*, char*, int ); - virtual void slotStdErr(OProcess*, char*, int ); + virtual void slotExited( Opie::Core::OProcess* ); + virtual void slotStdOut(Opie::Core::OProcess*, char*, int ); + virtual void slotStdErr(Opie::Core::OProcess*, char*, int ); private: class Private; Private *d; QString m_device; bool m_attached:1; - OProcess* m_hci; - OProcess* m_process; + Opie::Core::OProcess* m_hci; + Opie::Core::OProcess* m_process; QString m_devId; QString m_mode; QString m_speed; pid_t pid; QCString m_output; }; diff --git a/noncore/net/opietooth/lib/manager.cc b/noncore/net/opietooth/lib/manager.cc index c89d325..56156a8 100644 --- a/noncore/net/opietooth/lib/manager.cc +++ b/noncore/net/opietooth/lib/manager.cc @@ -1,16 +1,18 @@ -#include <opie/oprocess.h> +#include <opie2/oprocess.h> #include "parser.h" #include "manager.h" using namespace OpieTooth; +using namespace Opie::Core; +using namespace Opie::Core; Manager::Manager( const QString& dev ) : QObject() { qWarning("created"); m_device = dev; m_hcitool = 0; @@ -39,13 +41,13 @@ void Manager::setDevice( Device* /*dev*/ ){ } void Manager::isAvailable( const QString& device ){ OProcess* l2ping = new OProcess(); l2ping->setName( device.latin1() ); *l2ping << "l2ping" << "-c1" << device; - connect(l2ping, SIGNAL(processExited(OProcess* ) ), + connect(l2ping, SIGNAL(processExited(Opie::Core::OProcess* ) ), this, SLOT(slotProcessExited(OProcess*) ) ); if (!l2ping->start() ) { emit available( device, false ); delete l2ping; } @@ -57,15 +59,15 @@ void Manager::isAvailable( Device* /*dev*/ ){ } void Manager::searchDevices( const QString& device ){ qWarning("search devices"); OProcess* hcitool = new OProcess(); hcitool->setName( device.isEmpty() ? "hci0" : device.latin1() ); *hcitool << "hcitool" << "scan"; - connect( hcitool, SIGNAL(processExited(OProcess*) ) , + connect( hcitool, SIGNAL(processExited(Opie::Core::OProcess*) ) , this, SLOT(slotHCIExited(OProcess* ) ) ); - connect( hcitool, SIGNAL(receivedStdout(OProcess*, char*, int ) ), + connect( hcitool, SIGNAL(receivedStdout(Opie::Core::OProcess*, char*, int ) ), this, SLOT(slotHCIOut(OProcess*, char*, int ) ) ); if (!hcitool->start(OProcess::NotifyOnExit, OProcess::AllOutput) ) { qWarning("could not start"); RemoteDevice::ValueList list; emit foundDevices( device, list ); delete hcitool; @@ -104,15 +106,15 @@ void Manager::removeServices( const QStringList& list){ } void Manager::searchServices( const QString& remDevice ){ OProcess *m_sdp =new OProcess(); *m_sdp << "sdptool" << "browse" << remDevice; m_sdp->setName( remDevice.latin1() ); qWarning("search Services for %s", remDevice.latin1() ); - connect(m_sdp, SIGNAL(processExited(OProcess*) ), + connect(m_sdp, SIGNAL(processExited(Opie::Core::OProcess*) ), this, SLOT(slotSDPExited(OProcess* ) ) ); - connect(m_sdp, SIGNAL(receivedStdout(OProcess*, char*, int ) ), + connect(m_sdp, SIGNAL(receivedStdout(Opie::Core::OProcess*, char*, int ) ), this, SLOT(slotSDPOut(OProcess*, char*, int) ) ); if (!m_sdp->start(OProcess::NotifyOnExit, OProcess::AllOutput) ) { qWarning("could not start sdptool" ); delete m_sdp; Services::ValueList list; emit foundServices( remDevice, list ); @@ -243,15 +245,15 @@ void Manager::connectTo( const QString& mac) { void Manager::searchConnections() { qWarning("searching connections?"); OProcess* proc = new OProcess(); m_hcitoolCon = QString::null; - connect(proc, SIGNAL(processExited(OProcess*) ), + connect(proc, SIGNAL(processExited(Opie::Core::OProcess*) ), this, SLOT(slotConnectionExited( OProcess*) ) ); - connect(proc, SIGNAL(receivedStdout(OProcess*, char*, int) ), + connect(proc, SIGNAL(receivedStdout(Opie::Core::OProcess*, char*, int) ), this, SLOT(slotConnectionOutput(OProcess*, char*, int) ) ); *proc << "hcitool"; *proc << "con"; if (!proc->start(OProcess::NotifyOnExit, OProcess::AllOutput) ) { ConnectionState::ValueList list; @@ -302,15 +304,15 @@ ConnectionState::ValueList Manager::parseConnections( const QString& out ) { } void Manager::signalStrength( const QString &mac ) { OProcess* sig_proc = new OProcess(); - connect(sig_proc, SIGNAL(processExited(OProcess*) ), + connect(sig_proc, SIGNAL(processExited(Opie::Core::OProcess*) ), this, SLOT(slotSignalStrengthExited( OProcess*) ) ); - connect(sig_proc, SIGNAL(receivedStdout(OProcess*, char*, int) ), + connect(sig_proc, SIGNAL(receivedStdout(Opie::Core::OProcess*, char*, int) ), this, SLOT(slotSignalStrengthOutput(OProcess*, char*, int) ) ); *sig_proc << "hcitool"; *sig_proc << "lq"; *sig_proc << mac; sig_proc->setName( mac.latin1() ); diff --git a/noncore/net/opietooth/lib/manager.h b/noncore/net/opietooth/lib/manager.h index abc8ba1..9b1c714 100644 --- a/noncore/net/opietooth/lib/manager.h +++ b/noncore/net/opietooth/lib/manager.h @@ -8,13 +8,13 @@ #include <qvaluelist.h> #include "connection.h" #include "remotedevice.h" #include "services.h" -class OProcess; +namespace Opie {namespace Core {class Opie::Core::OProcess;}} namespace OpieTooth { class Device; /** Manager manages a blueZ device (hci0 for example) * without Manager you can control the things you * could do from command line in a OO and asynchronus * way. @@ -139,35 +139,35 @@ namespace OpieTooth { void foundServices( const QString& device, Services::ValueList ); void foundDevices( const QString& device, RemoteDevice::ValueList ); void connections( ConnectionState::ValueList ); void signalStrength( const QString& mac, const QString& strengh ); private slots: - void slotProcessExited(OProcess* ); + void slotProcessExited(Opie::Core::OProcess* ); - void slotSDPExited(OProcess*); - void slotSDPOut(OProcess*, char*, int); + void slotSDPExited(Opie::Core::OProcess*); + void slotSDPOut(Opie::Core::OProcess*, char*, int); - void slotHCIExited(OProcess* ); - void slotHCIOut(OProcess*, char*, int ); + void slotHCIExited(Opie::Core::OProcess* ); + void slotHCIOut(Opie::Core::OProcess*, char*, int ); - void slotConnectionExited(OProcess* ); - void slotConnectionOutput(OProcess*, char*, int ); + void slotConnectionExited(Opie::Core::OProcess* ); + void slotConnectionOutput(Opie::Core::OProcess*, char*, int ); - void slotSignalStrengthOutput( OProcess*, char*, int ); - void slotSignalStrengthExited( OProcess* ); + void slotSignalStrengthOutput( Opie::Core::OProcess*, char*, int ); + void slotSignalStrengthExited( Opie::Core::OProcess* ); private: Services::ValueList parseSDPOutput( const QString& ); RemoteDevice::ValueList parseHCIOutput( const QString& ); ConnectionState::ValueList parseConnections( const QString& ); - OProcess *m_hcitool; - OProcess *m_sdp; // not only one + Opie::Core::OProcess *m_hcitool; + Opie::Core::OProcess *m_sdp; // not only one QString m_device; QMap<QString, int> m_signalStrength; QMap<QString, QString> m_out; QMap<QString, QString> m_devices; - QMap<OProcess*, QString> m_signalMac; + QMap<Opie::Core::OProcess*, QString> m_signalMac; QString m_hcitoolCon; }; }; #endif diff --git a/noncore/net/opietooth/lib/startdunconnection.cpp b/noncore/net/opietooth/lib/startdunconnection.cpp index c3850eb..90ef04a 100644 --- a/noncore/net/opietooth/lib/startdunconnection.cpp +++ b/noncore/net/opietooth/lib/startdunconnection.cpp @@ -1,12 +1,14 @@ #include "startdunconnection.h" using namespace OpieTooth; +using namespace Opie::Core; +using namespace Opie::Core; StartDunConnection::StartDunConnection() { m_dunConnect = 0l; setConnectionType(); } StartDunConnection::~StartDunConnection() { @@ -36,15 +38,15 @@ StartConnection::ConnectionType StartDunConnection::type() { } void StartDunConnection::start() { m_dunConnect = new OProcess(); *m_dunConnect << "dund" << "--listen" << "--connect" << m_mac; - connect( m_dunConnect, SIGNAL( processExited(OProcess*) ) , + connect( m_dunConnect, SIGNAL( processExited(Opie::Core::OProcess*) ) , this, SLOT( slotExited(OProcess*) ) ); - connect( m_dunConnect, SIGNAL( receivedStdout(OProcess*,char*,int) ), + connect( m_dunConnect, SIGNAL( receivedStdout(Opie::Core::OProcess*,char*,int) ), this, SLOT( slotStdOut(OProcess*,char*,int) ) ); if (!m_dunConnect->start( OProcess::NotifyOnExit, OProcess::AllOutput) ) { qWarning( "could not start" ); delete m_dunConnect; } } diff --git a/noncore/net/opietooth/lib/startdunconnection.h b/noncore/net/opietooth/lib/startdunconnection.h index 43a852a..f6107f6 100644 --- a/noncore/net/opietooth/lib/startdunconnection.h +++ b/noncore/net/opietooth/lib/startdunconnection.h @@ -1,12 +1,12 @@ #ifndef startdunconnection_h #define startdunconnection_h #include <qobject.h> #include "connection.h" -#include <opie/oprocess.h> +#include <opie2/oprocess.h> namespace OpieTooth { class StartDunConnection : StartConnection { Q_OBJECT @@ -24,17 +24,17 @@ namespace OpieTooth { void stop(); private: QString m_name; QString m_mac; ConnectionType m_connectionType; - OProcess* m_dunConnect; + Opie::Core::OProcess* m_dunConnect; private slots: - void slotExited( OProcess* proc ); - void slotStdOut( OProcess* proc, char* chars, int len ); + void slotExited( Opie::Core::OProcess* proc ); + void slotStdOut( Opie::Core::OProcess* proc, char* chars, int len ); }; } #endif diff --git a/noncore/net/opietooth/lib/startpanconnection.cpp b/noncore/net/opietooth/lib/startpanconnection.cpp index a42b407..fef35d9 100644 --- a/noncore/net/opietooth/lib/startpanconnection.cpp +++ b/noncore/net/opietooth/lib/startpanconnection.cpp @@ -1,12 +1,14 @@ #include "startpanconnection.h" using namespace OpieTooth; +using namespace Opie::Core; +using namespace Opie::Core; StartPanConnection::StartPanConnection() { m_panConnect = 0l; setConnectionType(); } StartPanConnection::~StartPanConnection() { @@ -37,15 +39,15 @@ StartConnection::ConnectionType StartPanConnection::type() { void StartPanConnection::start() { m_panConnect = new OProcess(); qDebug( "IM START " + m_mac ); *m_panConnect << "pand" << "--connect" << m_mac; - connect( m_panConnect, SIGNAL( processExited(OProcess*) ) , + connect( m_panConnect, SIGNAL( processExited(Opie::Core::OProcess*) ) , this, SLOT( slotExited(OProcess*) ) ); - connect( m_panConnect, SIGNAL( receivedStdout(OProcess*,char*,int) ), + connect( m_panConnect, SIGNAL( receivedStdout(Opie::Core::OProcess*,char*,int) ), this, SLOT( slotStdOut(OProcess*,char*,int) ) ); if (!m_panConnect->start( OProcess::NotifyOnExit, OProcess::AllOutput) ) { qWarning( "could not start" ); delete m_panConnect; } } @@ -67,15 +69,15 @@ void StartPanConnection::stop() { } m_panConnect = new OProcess(); qDebug("IM STOP " + m_mac); *m_panConnect << "pand" << "--kill" << m_mac; - connect( m_panConnect, SIGNAL( processExited(OProcess*) ) , + connect( m_panConnect, SIGNAL( processExited(Opie::Core::OProcess*) ) , this, SLOT( slotExited(OProcess*) ) ); - connect( m_panConnect, SIGNAL( receivedStdout(OProcess*,char*,int) ), + connect( m_panConnect, SIGNAL( receivedStdout(Opie::Core::OProcess*,char*,int) ), this, SLOT( slotStdOut(OProcess*,char*,int) ) ); if (!m_panConnect->start( OProcess::NotifyOnExit, OProcess::AllOutput) ) { qWarning( "could not stop" ); delete m_panConnect; } } diff --git a/noncore/net/opietooth/lib/startpanconnection.h b/noncore/net/opietooth/lib/startpanconnection.h index 7e5bd95..e12dad0 100644 --- a/noncore/net/opietooth/lib/startpanconnection.h +++ b/noncore/net/opietooth/lib/startpanconnection.h @@ -1,12 +1,12 @@ #ifndef startpanconnection_h #define startpanconnection_h #include <qobject.h> #include "connection.h" -#include <opie/oprocess.h> +#include <opie2/oprocess.h> namespace OpieTooth { class StartPanConnection : StartConnection { Q_OBJECT @@ -24,17 +24,17 @@ namespace OpieTooth { void stop(); private: QString m_name; QString m_mac; ConnectionType m_connectionType; - OProcess* m_panConnect; + Opie::Core::OProcess* m_panConnect; private slots: - void slotExited( OProcess* proc ); - void slotStdOut( OProcess* proc, char* chars, int len ); + void slotExited( Opie::Core::OProcess* proc ); + void slotStdOut( Opie::Core::OProcess* proc, char* chars, int len ); }; } #endif diff --git a/noncore/net/opietooth/manager/main.cpp b/noncore/net/opietooth/manager/main.cpp index 82aeebd..a96f128 100644 --- a/noncore/net/opietooth/manager/main.cpp +++ b/noncore/net/opietooth/manager/main.cpp @@ -1,7 +1,9 @@ /* +using namespace Opie::Core; +using namespace Opie::Core; * main.cpp * * --------------------- * * begin : Sun 10 17:20:00 CEST 2002 * copyright : (c) 2002 by Maximilian Reiß @@ -16,10 +18,10 @@ * (at your option) any later version. * * * ***************************************************************************/ #include "bluebase.h" #include <qpe/qpeapplication.h> -#include <opie/oapplicationfactory.h> +#include <opie2/oapplicationfactory.h> OPIE_EXPORT_APP( OApplicationFactory<OpieTooth::BlueBase> ) diff --git a/noncore/net/opietooth/manager/obexdialog.cpp b/noncore/net/opietooth/manager/obexdialog.cpp index 46a0e3d..1ef862a 100644 --- a/noncore/net/opietooth/manager/obexdialog.cpp +++ b/noncore/net/opietooth/manager/obexdialog.cpp @@ -6,17 +6,20 @@ #include <qlayout.h> #include <qlabel.h> #include <qfileinfo.h> #include <qpe/resource.h> -#include <opie/oprocess.h> -#include <opie/ofiledialog.h> +#include <opie2/oprocess.h> +#include <opie2/ofiledialog.h> using namespace OpieTooth; +using namespace Opie::Core; +using namespace Opie::Ui; +using namespace Opie::Core; ObexDialog::ObexDialog( QWidget* parent, const char* name, bool modal, WFlags fl, const QString& device ) : QDialog( parent, name, modal, fl ) { if ( !name ) setName( "ObexDialog" ); setCaption( tr( "beam files " ) ) ; diff --git a/noncore/net/opietooth/manager/obexdialog.h b/noncore/net/opietooth/manager/obexdialog.h index b3d5e6d..d5b5682 100644 --- a/noncore/net/opietooth/manager/obexdialog.h +++ b/noncore/net/opietooth/manager/obexdialog.h @@ -1,12 +1,12 @@ #ifndef OBEXDIALOG_H #define OBEXDIALOG_H #include <qdialog.h> -#include <opie/oprocess.h> +#include <opie2/oprocess.h> class QVBoxLayout; class QPushButton; class QMultiLineEdit; class QLineEdit; diff --git a/noncore/net/opietooth/manager/pppdialog.cpp b/noncore/net/opietooth/manager/pppdialog.cpp index 4e58552..870e7fd 100644 --- a/noncore/net/opietooth/manager/pppdialog.cpp +++ b/noncore/net/opietooth/manager/pppdialog.cpp @@ -2,16 +2,18 @@ #include "pppdialog.h" #include <qpushbutton.h> #include <qmultilineedit.h> #include <qlineedit.h> #include <qlayout.h> #include <qlabel.h> -#include <opie/oprocess.h> +#include <opie2/oprocess.h> using namespace OpieTooth; +using namespace Opie::Core; +using namespace Opie::Core; PPPDialog::PPPDialog( QWidget* parent, const char* name, bool modal, WFlags fl, const QString& device ) : QDialog( parent, name, modal, fl ) { if ( !name ) setName( "PPPDialog" ); setCaption( tr( "ppp connection " ) ) ; @@ -49,13 +51,13 @@ PPPDialog::~PPPDialog() { void PPPDialog::connectToDevice() { outPut->clear(); // vom popupmenu beziehen QString connectScript = "/etc/ppp/peers/" + cmdLine->text(); OProcess* pppDial = new OProcess(); *pppDial << "pppd" << m_device << "call" << connectScript; - connect( pppDial, SIGNAL(receivedStdout(OProcess*,char*,int) ), + connect( pppDial, SIGNAL(receivedStdout(Opie::Core::OProcess*,char*,int) ), this, SLOT(fillOutPut(OProcess*,char*,int) ) ); if (!pppDial->start(OProcess::DontCare, OProcess::AllOutput) ) { qWarning("could not start"); delete pppDial; } } diff --git a/noncore/net/opietooth/manager/pppdialog.h b/noncore/net/opietooth/manager/pppdialog.h index bb8b734..05894e2 100644 --- a/noncore/net/opietooth/manager/pppdialog.h +++ b/noncore/net/opietooth/manager/pppdialog.h @@ -1,12 +1,12 @@ #ifndef PPPDIALOG_H #define PPPDIALOG_H #include <qdialog.h> -#include <opie/oprocess.h> +#include <opie2/oprocess.h> class QVBoxLayout; class QPushButton; class QMultiLineEdit; class QLineEdit; @@ -20,13 +20,13 @@ namespace OpieTooth { public: PPPDialog( QWidget* parent = 0, const char* name = 0, bool modal = TRUE, WFlags fl = 0, const QString& device = 0); ~PPPDialog(); private slots: void connectToDevice(); - void fillOutPut( OProcess* pppDial, char* cha, int len ); + void fillOutPut( Opie::Core::OProcess* pppDial, char* cha, int len ); protected: QVBoxLayout* layout; QLineEdit* cmdLine; QPushButton* connectButton; QMultiLineEdit* outPut; diff --git a/noncore/net/ubrowser/main.cpp b/noncore/net/ubrowser/main.cpp index 0488cfd..0736f1f 100644 --- a/noncore/net/ubrowser/main.cpp +++ b/noncore/net/ubrowser/main.cpp @@ -15,10 +15,12 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include <qpe/qpeapplication.h> #include "mainview.h" -#include <opie/oapplicationfactory.h> +#include <opie2/oapplicationfactory.h> + +using namespace Opie::Core; OPIE_EXPORT_APP( OApplicationFactory<MainView> ) diff --git a/noncore/net/wellenreiter/gui/configwindow.cpp b/noncore/net/wellenreiter/gui/configwindow.cpp index 95b03d0..da39113 100644 --- a/noncore/net/wellenreiter/gui/configwindow.cpp +++ b/noncore/net/wellenreiter/gui/configwindow.cpp @@ -40,12 +40,18 @@ using namespace Opie; #include <qspinbox.h> #include <qtextstream.h> /* POSIX */ #include <assert.h> +using namespace Opie::Core; +using namespace Opie::Net; +using namespace Opie::Core; +using namespace Opie::Net; +using namespace Opie::Core; +using namespace Opie::Net; WellenreiterConfigWindow* WellenreiterConfigWindow::_instance = 0; WellenreiterConfigWindow::WellenreiterConfigWindow( QWidget * parent, const char * name, WFlags f ) :WellenreiterConfigBase( parent, name, true, f ) { _devicetype[ "cisco" ] = DEVTYPE_CISCO; diff --git a/noncore/net/wellenreiter/gui/main.cpp b/noncore/net/wellenreiter/gui/main.cpp index 7dcc583..6bbc39b 100644 --- a/noncore/net/wellenreiter/gui/main.cpp +++ b/noncore/net/wellenreiter/gui/main.cpp @@ -26,12 +26,15 @@ #include <errno.h> #include <signal.h> #include <string.h> #include <unistd.h> +using namespace Opie::Core; +using namespace Opie::Core; +using namespace Opie::Core; int main( int argc, char **argv ) { #ifdef QWS OApplication a( argc, argv, "Wellenreiter II" ); #else QApplication a( argc, argv ); diff --git a/noncore/net/wellenreiter/gui/mainwindow.cpp b/noncore/net/wellenreiter/gui/mainwindow.cpp index 5cc0daf..7add6cd 100644 --- a/noncore/net/wellenreiter/gui/mainwindow.cpp +++ b/noncore/net/wellenreiter/gui/mainwindow.cpp @@ -48,12 +48,17 @@ using namespace Opie; #include <qapplication.h> #include <qfiledialog.h> #endif #include <unistd.h> +using namespace Opie::Ui; +using namespace Opie::Net; +using namespace Opie::Ui; +using namespace Opie::Net; +using namespace Opie::Net; WellenreiterMainWindow::WellenreiterMainWindow( QWidget * parent, const char * name, WFlags f ) :QMainWindow( parent, name, f ) { cw = new WellenreiterConfigWindow( this ); mw = new Wellenreiter( this ); mw->setConfigWindow( cw ); diff --git a/noncore/net/wellenreiter/gui/packetview.cpp b/noncore/net/wellenreiter/gui/packetview.cpp index ef5d020..8312e71 100644 --- a/noncore/net/wellenreiter/gui/packetview.cpp +++ b/noncore/net/wellenreiter/gui/packetview.cpp @@ -22,12 +22,15 @@ #include <qtextview.h> #include <qspinbox.h> #include <qlabel.h> #include <qlayout.h> #include <qlist.h> +using namespace Opie::Net; +using namespace Opie::Net; +using namespace Opie::Net; PacketView::PacketView( QWidget * parent, const char * name, WFlags f ) :QFrame( parent, name, f ) { _number = new QSpinBox( this ); _number->setPrefix( "Packet # " ); _label = new QLabel( this ); diff --git a/noncore/net/wellenreiter/gui/packetview.h b/noncore/net/wellenreiter/gui/packetview.h index b5f2b26..1ac19bb 100644 --- a/noncore/net/wellenreiter/gui/packetview.h +++ b/noncore/net/wellenreiter/gui/packetview.h @@ -20,30 +20,30 @@ #include <qframe.h> class QString; class QSpinBox; class QLabel; class QTextView; -class OPacket; +namespace Opie {namespace Net {class Opie::Net::OPacket;}} class PacketView: public QFrame { public: PacketView( QWidget * parent = 0, const char * name = "PacketView", WFlags f = 0 ); - void add( OPacket* p ); + void add( Opie::Net::OPacket* p ); const QString getLog() const; void clear(); protected: QSpinBox* _number; QLabel* _label; QLabel* _list; QTextView* _hex; - QList<OPacket> _packets; + QList<Opie::Net::OPacket> _packets; }; #endif diff --git a/noncore/net/wellenreiter/gui/scanlist.cpp b/noncore/net/wellenreiter/gui/scanlist.cpp index 6005818..3b7120a 100644 --- a/noncore/net/wellenreiter/gui/scanlist.cpp +++ b/noncore/net/wellenreiter/gui/scanlist.cpp @@ -43,12 +43,18 @@ const int col_traffic = 5; const int col_ip = 6; const int col_manuf = 7; const int col_firstseen = 8; const int col_lastseen = 9; const int col_location = 10; +using namespace Opie::Net; +using namespace Opie::Ui; +using namespace Opie::Net; +using namespace Opie::Ui; +using namespace Opie::Ui; +using namespace Opie::Net; MScanListView::MScanListView( QWidget* parent, const char* name ) :OListView( parent, name ) { setFrameShape( QListView::StyledPanel ); setFrameShadow( QListView::Sunken ); diff --git a/noncore/net/wellenreiter/gui/scanlist.h b/noncore/net/wellenreiter/gui/scanlist.h index ab870c2..6a80f70 100644 --- a/noncore/net/wellenreiter/gui/scanlist.h +++ b/noncore/net/wellenreiter/gui/scanlist.h @@ -25,49 +25,49 @@ /* QT */ #include <qtextstream.h> class QString; class MScanListItem; -class MScanListView: public OListView +class MScanListView: public Opie::Ui::OListView { Q_OBJECT public: MScanListView( QWidget* parent = 0, const char* name = 0 ); virtual ~MScanListView(); - virtual OListViewItem* childFactory(); + virtual Opie::Ui::OListViewItem* childFactory(); virtual void serializeTo( QDataStream& s ) const; virtual void serializeFrom( QDataStream& s ); public slots: - void addNewItem( const QString& type, const QString&, const OMacAddress&, bool, int, int, const GpsLocation&, bool = false ); - void addService( const QString& name, const OMacAddress& macaddr, const QString& ip ); + void addNewItem( const QString& type, const QString&, const Opie::Net::OMacAddress&, bool, int, int, const GpsLocation&, bool = false ); + void addService( const QString& name, const Opie::Net::OMacAddress& macaddr, const QString& ip ); - void fromDStraffic( const OMacAddress& from, const OMacAddress& to, const OMacAddress& via ); - void toDStraffic( const OMacAddress& from, const OMacAddress& to, const OMacAddress& via ); - void WDStraffic( const OMacAddress& from, const OMacAddress& to, const OMacAddress& viaFrom, const OMacAddress& viaTo ); - void IBSStraffic( const OMacAddress& from, const OMacAddress& to, const OMacAddress& via ); + void fromDStraffic( const Opie::Net::OMacAddress& from, const Opie::Net::OMacAddress& to, const Opie::Net::OMacAddress& via ); + void toDStraffic( const Opie::Net::OMacAddress& from, const Opie::Net::OMacAddress& to, const Opie::Net::OMacAddress& via ); + void WDStraffic( const Opie::Net::OMacAddress& from, const Opie::Net::OMacAddress& to, const Opie::Net::OMacAddress& viaFrom, const Opie::Net::OMacAddress& viaTo ); + void IBSStraffic( const Opie::Net::OMacAddress& from, const Opie::Net::OMacAddress& to, const Opie::Net::OMacAddress& via ); - void identify( const OMacAddress&, const QString& ipaddr ); + void identify( const Opie::Net::OMacAddress&, const QString& ipaddr ); void contextMenuRequested( QListViewItem* item, const QPoint&, int ); signals: void rightButtonClicked(QListViewItem*,const QPoint&,int); void joinNetwork( const QString&, const QString&, int, const QString& ); protected: - void addIfNotExisting( MScanListItem* parent, const OMacAddress& addr, const QString& type = "station" ); + void addIfNotExisting( MScanListItem* parent, const Opie::Net::OMacAddress& addr, const QString& type = "station" ); }; //****************************** MScanListItem **************************************************************** -class MScanListItem: public OListViewItem +class MScanListItem: public Opie::Ui::OListViewItem { public: MScanListItem::MScanListItem( QListView* parent, const QString& type = "unknown", const QString& essid = "unknown", const QString& macaddr = "unknown", @@ -103,13 +103,13 @@ class MScanListItem: public OListViewItem void setSignal( int signal ) { /* TODO */ }; void receivedBeacon(); void setManufacturer( const QString& manufacturer ); void setLocation( const QString& location ); - virtual OListViewItem* childFactory(); + virtual Opie::Ui::OListViewItem* childFactory(); virtual void serializeTo( QDataStream& s ) const; virtual void serializeFrom( QDataStream& s ); private: QString _type; QString _essid; @@ -122,13 +122,13 @@ class MScanListItem: public OListViewItem }; //****************************** MScanListViewFactory **************************************************************** /* -class MScanListViewFactory : public OListViewFactory +class MScanListViewFactory : public Opie::Ui::OListViewFactory { public: virtual QListView* listViewFactory(); virtual QListViewItem* listViewItemFactory( QListView* lv ); virtual QListViewItem* listViewItemFactory( QListViewItem* lvi ); virtual void setColumnText( int depth, QListViewItem* lvi, int column, const QString& text ); diff --git a/noncore/net/wellenreiter/gui/statwindow.cpp b/noncore/net/wellenreiter/gui/statwindow.cpp index 48e4847..e3c6bbe 100644 --- a/noncore/net/wellenreiter/gui/statwindow.cpp +++ b/noncore/net/wellenreiter/gui/statwindow.cpp @@ -13,12 +13,15 @@ ** **********************************************************************/ #include "statwindow.h" #include <opie2/olistview.h> +using namespace Opie::Ui; +using namespace Opie::Ui; +using namespace Opie::Ui; MStatWindow::MStatWindow( QWidget * parent, const char * name, WFlags f ) :QVBox( parent, name, f ) { table = new OListView( this ); table->addColumn( tr( "Protocol" ) ); table->addColumn( tr( "Count" ) ); diff --git a/noncore/net/wellenreiter/gui/statwindow.h b/noncore/net/wellenreiter/gui/statwindow.h index b9057e7..e11247b 100644 --- a/noncore/net/wellenreiter/gui/statwindow.h +++ b/noncore/net/wellenreiter/gui/statwindow.h @@ -16,13 +16,13 @@ #ifndef STATWINDOW_H #define STATWINDOW_H #include <qvbox.h> class QString; -class OListView; +namespace Opie {namespace Ui {class Opie::Ui::OListView;}} class MStatWindow: public QVBox { Q_OBJECT public: @@ -32,12 +32,12 @@ class MStatWindow: public QVBox const QString getLog() const; void clear(); void updateCounter( const QString&, int ); protected: - OListView* table; + Opie::Ui::OListView* table; }; #endif diff --git a/noncore/net/wellenreiter/gui/wellenreiter.cpp b/noncore/net/wellenreiter/gui/wellenreiter.cpp index ce416e5..e8d9de7 100644 --- a/noncore/net/wellenreiter/gui/wellenreiter.cpp +++ b/noncore/net/wellenreiter/gui/wellenreiter.cpp @@ -58,12 +58,18 @@ using namespace Opie; #include <errno.h> #include <unistd.h> #include <string.h> #include <sys/types.h> #include <stdlib.h> +using namespace Opie::Core; +using namespace Opie::Net; +using namespace Opie::Net; +using namespace Opie::Core; +using namespace Opie::Net; +using namespace Opie::Core; Wellenreiter::Wellenreiter( QWidget* parent ) : WellenreiterBase( parent, 0, 0 ), sniffing( false ), iface( 0 ), configwindow( 0 ) { logwindow->log( "(i) Wellenreiter has been started." ); @@ -443,13 +449,13 @@ void Wellenreiter::receivePacket( OPacket* p ) void Wellenreiter::stopClicked() { if ( iface ) { - disconnect( SIGNAL( receivedPacket(OPacket*) ), this, SLOT( receivePacket(OPacket*) ) ); + disconnect( SIGNAL( receivedPacket(Opie::Net::OPacket*) ), this, SLOT( receivePacket(Opie::Net::OPacket*) ) ); disconnect( SIGNAL( hopped(int) ), this, SLOT( channelHopped(int) ) ); iface->setChannelHopping(); // stop hopping channels } else killTimers(); @@ -608,13 +614,13 @@ void Wellenreiter::startClicked() iface->setChannelHopping( configwindow->hopInterval->value() ); //use interval from config window } if ( cardtype != DEVTYPE_FILE ) { // connect socket notifier and start channel hopper - connect( pcap, SIGNAL( receivedPacket(OPacket*) ), this, SLOT( receivePacket(OPacket*) ) ); + connect( pcap, SIGNAL( receivedPacket(Opie::Net::OPacket*) ), this, SLOT( receivePacket(Opie::Net::OPacket*) ) ); connect( iface->channelHopper(), SIGNAL( hopped(int) ), this, SLOT( channelHopped(int) ) ); } else { // start timer for reading packets startTimer( 100 ); diff --git a/noncore/net/wellenreiter/gui/wellenreiter.h b/noncore/net/wellenreiter/gui/wellenreiter.h index d02813b..83299c9 100644 --- a/noncore/net/wellenreiter/gui/wellenreiter.h +++ b/noncore/net/wellenreiter/gui/wellenreiter.h @@ -15,27 +15,27 @@ #define WELLENREITER_H #include "wellenreiterbase.h" #ifdef QWS #include <opie2/odevice.h> -using namespace Opie; #endif class QTimerEvent; class QPixmap; -class OPacket; -class OWaveLanManagementPacket; -class OWaveLanControlPacket; -class OWaveLanDataPacket; -class OEthernetPacket; -class OARPPacket; -class OMacAddress; -class OIPPacket; -class OPacketCapturer; -class OWirelessNetworkInterface; +namespace Opie {namespace Net {class Opie::Net::OPacket;}} +namespace Opie {namespace Net {class Opie::Net::OWaveLanManagementPacket;}} +namespace Opie {namespace Net {class Opie::Net::OWaveLanControlPacket;}} +namespace Opie {namespace Net {class Opie::Net::OWaveLanDataPacket;}} +namespace Opie {namespace Net {class Opie::Net::OEthernetPacket;}} +namespace Opie {namespace Net {class Opie::Net::OARPPacket;}} +namespace Opie {namespace Net {class Opie::Net::OMacAddress;}} +namespace Opie {namespace Net {class Opie::Net::OIPPacket;}} +namespace Opie {namespace Net {class Opie::Net::OPacket;}} +namespace Opie {namespace Net {class Opie::Net::OWirelessNetworkInterface;}} +namespace Opie {namespace Net {class Opie::Net::OPacketCapturer;}} class PacketView; class WellenreiterConfigWindow; class MLogWindow; class GPS; class Wellenreiter : public WellenreiterBase { @@ -59,45 +59,45 @@ class Wellenreiter : public WellenreiterBase { virtual void timerEvent( QTimerEvent* ); public slots: void initialTimer(); void channelHopped(int); - void receivePacket(OPacket*); + void receivePacket(Opie::Net::OPacket*); void startClicked(); void stopClicked(); void joinNetwork(const QString&,const QString&,int,const QString&); signals: void startedSniffing(); void stoppedSniffing(); private: - void handleManagementFrame( OPacket* p, OWaveLanManagementPacket* ); - void handleManagementFrameBeacon( OPacket* p, OWaveLanManagementPacket* ); - void handleManagementFrameProbeRequest( OPacket* p, OWaveLanManagementPacket* ); - void handleManagementFrameProbeResponse( OPacket* p, OWaveLanManagementPacket* ); - void handleControlFrame( OPacket* p, OWaveLanControlPacket* control ); - void handleWlanData( OPacket* p, OWaveLanDataPacket* data, OMacAddress& from, OMacAddress& to ); - void handleEthernetData( OPacket* p, OEthernetPacket* data, OMacAddress& from, OMacAddress& to ); - void handleARPData( OPacket* p, OARPPacket* arp, OMacAddress& from, OMacAddress& to ); - void handleIPData( OPacket* p, OIPPacket* ip, OMacAddress& from, OMacAddress& to ); - void handleNotification( OPacket* p ); - void doAction( const QString& action, const QString& protocol, OPacket* p ); - QObject* childIfToParse( OPacket* p, const QString& protocol ); - bool checkDumpPacket( OPacket* p ); + void handleManagementFrame( Opie::Net::OPacket* p, Opie::Net::OWaveLanManagementPacket* ); + void handleManagementFrameBeacon( Opie::Net::OPacket* p, Opie::Net::OWaveLanManagementPacket* ); + void handleManagementFrameProbeRequest( Opie::Net::OPacket* p, Opie::Net::OWaveLanManagementPacket* ); + void handleManagementFrameProbeResponse( Opie::Net::OPacket* p, Opie::Net::OWaveLanManagementPacket* ); + void handleControlFrame( Opie::Net::OPacket* p, Opie::Net::OWaveLanControlPacket* control ); + void handleWlanData( Opie::Net::OPacket* p, Opie::Net::OWaveLanDataPacket* data, Opie::Net::OMacAddress& from, Opie::Net::OMacAddress& to ); + void handleEthernetData( Opie::Net::OPacket* p, Opie::Net::OEthernetPacket* data, Opie::Net::OMacAddress& from, Opie::Net::OMacAddress& to ); + void handleARPData( Opie::Net::OPacket* p, Opie::Net::OARPPacket* arp, Opie::Net::OMacAddress& from, Opie::Net::OMacAddress& to ); + void handleIPData( Opie::Net::OPacket* p, Opie::Net::OIPPacket* ip, Opie::Net::OMacAddress& from, Opie::Net::OMacAddress& to ); + void handleNotification( Opie::Net::OPacket* p ); + void doAction( const QString& action, const QString& protocol, Opie::Net::OPacket* p ); + QObject* childIfToParse( Opie::Net::OPacket* p, const QString& protocol ); + bool checkDumpPacket( Opie::Net::OPacket* p ); private: #ifdef QWS - OSystem _system; // Opie Operating System identifier + Opie::Core::OSystem _system; // Opie Operating System identifier #endif QString dumpname; - OWirelessNetworkInterface* iface; - OPacketCapturer* pcap; + Opie::Net::OWirelessNetworkInterface* iface; + Opie::Net::OPacketCapturer* pcap; WellenreiterConfigWindow* configwindow; GPS* gps; //void readConfig(); //void writeConfig(); }; diff --git a/noncore/net/wellenreiter/gui/wellenreiterbase.cpp b/noncore/net/wellenreiter/gui/wellenreiterbase.cpp index 3d0595d..f035e89 100644 --- a/noncore/net/wellenreiter/gui/wellenreiterbase.cpp +++ b/noncore/net/wellenreiter/gui/wellenreiterbase.cpp @@ -35,12 +35,15 @@ using namespace Opie; /* * Constructs a WellenreiterBase which is a child of 'parent', with the * name 'name' and widget flags set to 'f' */ +using namespace Opie::Ui; +using namespace Opie::Ui; +using namespace Opie::Ui; WellenreiterBase::WellenreiterBase( QWidget* parent, const char* name, WFlags fl ) : QWidget( parent, name, fl ) { //ani1 = new QPixmap( Resource::loadPixmap( "wellenreiter/networks_rot0" ) ); //ani2 = new QPixmap( Resource::loadPixmap( "wellenreiter/networks_rot90" ) ); //ani3 = new QPixmap( Resource::loadPixmap( "wellenreiter/networks_rot180" ) ); diff --git a/noncore/net/wellenreiter/gui/wellenreiterbase.h b/noncore/net/wellenreiter/gui/wellenreiterbase.h index 126aad2..e40b699 100644 --- a/noncore/net/wellenreiter/gui/wellenreiterbase.h +++ b/noncore/net/wellenreiter/gui/wellenreiterbase.h @@ -43,13 +43,13 @@ class WellenreiterBase : public QWidget public: WellenreiterBase( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); ~WellenreiterBase(); #ifdef QWS - OTabWidget* TabWidget; + Opie::Ui::OTabWidget* TabWidget; #else QTabWidget* TabWidget; #endif QWidget* ap; MScanListView* netview; MLogWindow* logwindow; |