From 0f7217afa7cdcb108dd2afba0ff6b42c97ab6f44 Mon Sep 17 00:00:00 2001 From: zecke Date: Sun, 14 Mar 2004 13:22:42 +0000 Subject: Convert net to ODP and QtAUX --- (limited to 'noncore/net/mail') 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 @@ -15,6 +15,7 @@ #include #include +using namespace Opie::Core; #define SETPIX(x) if (!account->getOffline()) {setPixmap( 0,x);} else {setPixmap( 0, PIXMAP_OFFLINE );} /** * POP3 Account stuff @@ -49,7 +50,7 @@ AbstractMail *POP3viewItem::getWrapper() return wrapper; } -void POP3viewItem::refresh(QValueList > & ) +void POP3viewItem::refresh(QValueList > & ) { refresh(); } @@ -1042,7 +1043,7 @@ AccountViewItem::AccountViewItem( QListViewItem *parent , QListViewItem*after ) init(); } -AccountViewItem::AccountViewItem( const Opie::OSmartPointer&folderInit,QListViewItem *parent , QListViewItem*after ) +AccountViewItem::AccountViewItem( const Opie::Core::OSmartPointer&folderInit,QListViewItem *parent , QListViewItem*after ) :QListViewItem( parent,after ),folder(folderInit) { 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 @@ -24,11 +24,11 @@ public: AccountViewItem( AccountView *parent ); AccountViewItem( QListViewItem *parent); AccountViewItem( QListViewItem *parent , QListViewItem*after ); - AccountViewItem( const Opie::OSmartPointer&folderInit,QListViewItem *parent , QListViewItem*after ); + AccountViewItem( const Opie::Core::OSmartPointer&folderInit,QListViewItem *parent , QListViewItem*after ); virtual ~AccountViewItem(); - virtual void refresh(QValueList >&)=0; - virtual RecBody fetchBody(const Opie::OSmartPointer&)=0; + virtual void refresh(QValueList >&)=0; + virtual RecBody fetchBody(const Opie::Core::OSmartPointer&)=0; virtual QPopupMenu * getContextMenu(){return 0;}; virtual void contextMenuSelected(int){} virtual AccountView*accountView(); @@ -39,10 +39,10 @@ protected: AccountViewItem*findSubItem(const QString&path,AccountViewItem*start=0); virtual void init(); virtual void removeChilds(); - virtual void deleteAllMail(AbstractMail*wrapper,const Opie::OSmartPointer&f); + virtual void deleteAllMail(AbstractMail*wrapper,const Opie::Core::OSmartPointer&f); static const QString contextName; AccountView*m_Backlink; - Opie::OSmartPointer folder; + Opie::Core::OSmartPointer folder; }; class POP3viewItem : public AccountViewItem @@ -51,8 +51,8 @@ class POP3viewItem : public AccountViewItem public: POP3viewItem( POP3account *a, AccountView *parent ); virtual ~POP3viewItem(); - virtual void refresh(QValueList >&target ); - virtual RecBody fetchBody( const Opie::OSmartPointer &mail ); + virtual void refresh(QValueList >&target ); + virtual RecBody fetchBody( const Opie::Core::OSmartPointer &mail ); AbstractMail *getWrapper(); virtual QPopupMenu * getContextMenu(); virtual void contextMenuSelected(int); @@ -69,10 +69,10 @@ class POP3folderItem : public AccountViewItem { public: - POP3folderItem( const Opie::OSmartPointer&folder, POP3viewItem *parent , QListViewItem*after ); + POP3folderItem( const Opie::Core::OSmartPointer&folder, POP3viewItem *parent , QListViewItem*after ); virtual ~POP3folderItem(); - virtual void refresh(QValueList >&); - virtual RecBody fetchBody(const Opie::OSmartPointer&); + virtual void refresh(QValueList >&); + virtual RecBody fetchBody(const Opie::Core::OSmartPointer&); virtual QPopupMenu * getContextMenu(); virtual void contextMenuSelected(int); @@ -88,8 +88,8 @@ class NNTPviewItem : public AccountViewItem public: NNTPviewItem( NNTPaccount *a, AccountView *parent ); virtual ~NNTPviewItem(); - virtual void refresh(QValueList >&target ); - virtual RecBody fetchBody( const Opie::OSmartPointer &mail ); + virtual void refresh(QValueList >&target ); + virtual RecBody fetchBody( const Opie::Core::OSmartPointer &mail ); AbstractMail *getWrapper(); virtual QPopupMenu * getContextMenu(); virtual void contextMenuSelected(int); @@ -107,10 +107,10 @@ class NNTPfolderItem : public AccountViewItem { public: - NNTPfolderItem(const Opie::OSmartPointer&folder, NNTPviewItem *parent , QListViewItem*after ); + NNTPfolderItem(const Opie::Core::OSmartPointer&folder, NNTPviewItem *parent , QListViewItem*after ); virtual ~NNTPfolderItem(); - virtual void refresh(QValueList >&); - virtual RecBody fetchBody(const Opie::OSmartPointer&); + virtual void refresh(QValueList >&); + virtual RecBody fetchBody(const Opie::Core::OSmartPointer&); virtual QPopupMenu * getContextMenu(); virtual void contextMenuSelected(int); @@ -127,8 +127,8 @@ class IMAPviewItem : public AccountViewItem public: IMAPviewItem( IMAPaccount *a, AccountView *parent ); virtual ~IMAPviewItem(); - virtual void refresh(QValueList >&); - virtual RecBody fetchBody(const Opie::OSmartPointer&); + virtual void refresh(QValueList >&); + virtual RecBody fetchBody(const Opie::Core::OSmartPointer&); AbstractMail *getWrapper(); virtual QPopupMenu * getContextMenu(); virtual void contextMenuSelected(int); @@ -147,11 +147,11 @@ class IMAPfolderItem : public AccountViewItem { public: - IMAPfolderItem( const Opie::OSmartPointer&folder, IMAPviewItem *parent , QListViewItem*after ); - IMAPfolderItem( const Opie::OSmartPointer&folder, IMAPfolderItem *parent , QListViewItem*after, IMAPviewItem *master ); + IMAPfolderItem( const Opie::Core::OSmartPointer&folder, IMAPviewItem *parent , QListViewItem*after ); + IMAPfolderItem( const Opie::Core::OSmartPointer&folder, IMAPfolderItem *parent , QListViewItem*after, IMAPviewItem *master ); virtual ~IMAPfolderItem(); - virtual void refresh(QValueList >&); - virtual RecBody fetchBody(const Opie::OSmartPointer&); + virtual void refresh(QValueList >&); + virtual RecBody fetchBody(const Opie::Core::OSmartPointer&); virtual QPopupMenu * getContextMenu(); virtual void contextMenuSelected(int); virtual const QString& Delemiter()const; @@ -169,8 +169,8 @@ class MHviewItem : public AccountViewItem public: MHviewItem( const QString&aMboxPath, AccountView *parent ); virtual ~MHviewItem(); - virtual void refresh(QValueList >&target ); - virtual RecBody fetchBody( const Opie::OSmartPointer &mail ); + virtual void refresh(QValueList >&target ); + virtual RecBody fetchBody( const Opie::Core::OSmartPointer &mail ); AbstractMail *getWrapper(); virtual QPopupMenu * getContextMenu(); virtual void contextMenuSelected(int); @@ -189,14 +189,14 @@ class MHfolderItem : public AccountViewItem { public: - MHfolderItem( const Opie::OSmartPointer&folder, MHviewItem *parent , QListViewItem*after ); - MHfolderItem( const Opie::OSmartPointer&folder, MHfolderItem *parent, QListViewItem*after, MHviewItem*master); + MHfolderItem( const Opie::Core::OSmartPointer&folder, MHviewItem *parent , QListViewItem*after ); + MHfolderItem( const Opie::Core::OSmartPointer&folder, MHfolderItem *parent, QListViewItem*after, MHviewItem*master); virtual ~MHfolderItem(); - virtual void refresh(QValueList >&); - virtual RecBody fetchBody(const Opie::OSmartPointer&); + virtual void refresh(QValueList >&); + virtual RecBody fetchBody(const Opie::Core::OSmartPointer&); virtual QPopupMenu * getContextMenu(); virtual void contextMenuSelected(int); - virtual const Opie::OSmartPointer&getFolder()const; + virtual const Opie::Core::OSmartPointer&getFolder()const; virtual bool isDraftfolder(); protected: 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 @@ -14,6 +14,7 @@ #include #include +using namespace Opie::Core; AccountView::AccountView( QWidget *parent, const char *name, WFlags flags ) : QListView( parent, name, flags ) { 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 @@ -21,8 +21,8 @@ public: AccountView( QWidget *parent = 0, const char *name = 0, WFlags flags = 0 ); virtual ~AccountView(); virtual void populate( QList list ); - virtual RecBody fetchBody(const Opie::OSmartPointer&aMail); - virtual void downloadMails(const Opie::OSmartPointer&fromFolder,AbstractMail*fromWrapper); + virtual RecBody fetchBody(const Opie::Core::OSmartPointer&aMail); + virtual void downloadMails(const Opie::Core::OSmartPointer&fromFolder,AbstractMail*fromWrapper); virtual bool currentisDraft(); public slots: 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 @@ -13,6 +13,8 @@ #include #include +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 ) { @@ -160,7 +162,7 @@ void ComposeMail::slotAdjustColumns() 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 ); @@ -188,7 +190,7 @@ void ComposeMail::accept() qDebug( "Sending Mail with " + smtpAccounts.at( smtpAccountBox->currentItem() )->getAccountName() ); #endif - Opie::OSmartPointer mail=new Mail; + Opie::Core::OSmartPointer mail=new Mail; SMTPaccount *smtp = smtpAccounts.at( smtpAccountBox->currentItem() ); mail->setMail(fromBox->currentText()); @@ -236,7 +238,7 @@ void ComposeMail::reject() tr("No"),QString::null,0,1); if (yesno == 0) { - Opie::OSmartPointer mail=new Mail(); + Opie::Core::OSmartPointer mail=new Mail(); mail->setMail(fromBox->currentText()); mail->setTo( toLine->text() ); mail->setName(senderNameEdit->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 @@ -37,7 +37,7 @@ public: ComposeMail( Settings *s, QWidget *parent = 0, const char *name = 0, bool modal = false, WFlags flags = 0 ); virtual ~ComposeMail(); - void reEditMail(const Opie::OSmartPointer¤t); + void reEditMail(const Opie::Core::OSmartPointer¤t); public slots: void slotAdjustColumns(); 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 @@ -11,6 +11,7 @@ #include #include +using namespace Opie::Core; AbstractMail* AbstractMail::getWrapper(IMAPaccount *a) { return new IMAPwrapper(a); @@ -129,7 +130,7 @@ QString AbstractMail::draftFolder() } /* temporary - will be removed when implemented in all classes */ -void AbstractMail::deleteMails(const QString &,const QValueList > &) +void AbstractMail::deleteMails(const QString &,const QValueList > &) { } 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 @@ -21,7 +21,7 @@ class AbstractMail:public QObject public: AbstractMail(){}; virtual ~AbstractMail(){} - virtual QValueList >* listFolders()=0; + virtual QValueList >* listFolders()=0; virtual void listMessages(const QString & mailbox,QValueList&target )=0; virtual void statusFolder(folderStat&target_stat,const QString & mailbox="INBOX")=0; virtual RecBody fetchBody(const RecMailP&mail)=0; @@ -32,12 +32,12 @@ public: virtual void deleteMail(const RecMailP&mail)=0; virtual void answeredMail(const RecMailP&mail)=0; - virtual int deleteAllMail(const Opie::OSmartPointer&)=0; - virtual void deleteMails(const QString & FolderName,const QValueList >&target); - virtual int deleteMbox(const Opie::OSmartPointer&)=0; + virtual int deleteAllMail(const Opie::Core::OSmartPointer&)=0; + virtual void deleteMails(const QString & FolderName,const QValueList >&target); + virtual int deleteMbox(const Opie::Core::OSmartPointer&)=0; virtual void storeMessage(const char*msg,size_t length, const QString&folder)=0; - virtual void mvcpAllMails(const Opie::OSmartPointer&fromFolder, + virtual void mvcpAllMails(const Opie::Core::OSmartPointer&fromFolder, const QString&targetFolder,AbstractMail*targetWrapper,bool moveit); virtual void mvcpMail(const RecMailP&mail,const QString&targetFolder,AbstractMail*targetWrapper,bool moveit); @@ -47,7 +47,7 @@ public: * if the implementing subclass has prefixes, * them has to be appended automatic. */ - virtual int createMbox(const QString&,const Opie::OSmartPointer&parentfolder=0, + virtual int createMbox(const QString&,const Opie::Core::OSmartPointer&parentfolder=0, const QString& delemiter="/",bool getsubfolder=false); virtual void logout()=0; 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 @@ -5,6 +5,7 @@ #include +using namespace Opie::Core; const char* Generatemail::USER_AGENT="OpieMail v0.6"; Generatemail::Generatemail() @@ -279,7 +280,7 @@ mailimf_mailbox *Generatemail::newMailbox(const QString&name, const QString&mail strdup( mail.latin1() ) ); } -mailimf_fields *Generatemail::createImfFields(const Opie::OSmartPointer&mail ) +mailimf_fields *Generatemail::createImfFields(const Opie::Core::OSmartPointer&mail ) { mailimf_fields *fields = NULL; mailimf_field *xmailer = NULL; @@ -399,7 +400,7 @@ mailimf_fields *Generatemail::createImfFields(const Opie::OSmartPointer&ma return fields; } -mailmime *Generatemail::createMimeMail(const Opie::OSmartPointer &mail ) { +mailmime *Generatemail::createMimeMail(const Opie::Core::OSmartPointer &mail ) { mailmime *message, *txtPart; mailimf_fields *fields; int err; 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 @@ -36,8 +36,8 @@ protected: 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 ); - mailmime *createMimeMail(const Opie::OSmartPointer&mail ); + mailimf_fields *createImfFields(const Opie::Core::OSmartPointer &mail ); + mailmime *createMimeMail(const Opie::Core::OSmartPointer&mail ); clist *createRcptList( mailimf_fields *fields ); static const char* USER_AGENT; 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 @@ -2,6 +2,7 @@ #include #include "mailtypes.h" +using namespace Opie::Core; Genericwrapper::Genericwrapper() : AbstractMail() { @@ -387,7 +388,7 @@ QStringList Genericwrapper::parseInreplies(mailimf_in_reply_to * in_replies) return res; } -void Genericwrapper::parseList(QValueList > &target,mailsession*session,const QString&mailbox,bool mbox_as_to) +void Genericwrapper::parseList(QValueList > &target,mailsession*session,const QString&mailbox,bool mbox_as_to) { int r; mailmessage_list * env_list = 0; 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 @@ -38,7 +38,7 @@ public: 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&){return 1;} + virtual int deleteMbox(const Opie::Core::OSmartPointer&){return 1;} virtual void logout(){}; virtual void storeMessage(const char*msg,size_t length, const QString&folder){}; @@ -54,7 +54,7 @@ protected: 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 > &target,mailsession*session,const QString&mailbox,bool mbox_as_to=false); + virtual void parseList(QValueList > &target,mailsession*session,const QString&mailbox,bool mbox_as_to=false); QStringList parseInreplies(mailimf_in_reply_to * in_replies); QString msgTempName; 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 @@ -6,6 +6,7 @@ #include "mailtypes.h" #include "logindialog.h" +using namespace Opie::Core; IMAPwrapper::IMAPwrapper( IMAPaccount *a ) : AbstractMail() { @@ -205,7 +206,7 @@ void IMAPwrapper::logout() m_Lastmbox = ""; } -void IMAPwrapper::listMessages(const QString&mailbox,QValueList > &target ) +void IMAPwrapper::listMessages(const QString&mailbox,QValueList > &target ) { int err = MAILIMAP_NO_ERROR; clist *result = 0; @@ -266,7 +267,7 @@ void IMAPwrapper::listMessages(const QString&mailbox,QValueList >* IMAPwrapper::listFolders() +QValueList >* IMAPwrapper::listFolders() { const char *path, *mask; int err = MAILIMAP_NO_ERROR; 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 @@ -23,15 +23,15 @@ class IMAPwrapper : public AbstractMail public: IMAPwrapper( IMAPaccount *a ); virtual ~IMAPwrapper(); - virtual QValueList >* listFolders(); - virtual void listMessages(const QString & mailbox,QValueList >&target ); + virtual QValueList >* listFolders(); + virtual void listMessages(const QString & mailbox,QValueList >&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); + virtual int deleteAllMail(const Opie::Core::OSmartPointer&folder); virtual void storeMessage(const char*msg,size_t length, const QString&folder); - virtual void mvcpAllMails(const Opie::OSmartPointer&fromFolder, + virtual void mvcpAllMails(const Opie::Core::OSmartPointer&fromFolder, const QString&targetFolder,AbstractMail*targetWrapper,bool moveit); virtual void mvcpMail(const RecMailP&mail,const QString&targetFolder,AbstractMail*targetWrapper,bool moveit); @@ -41,9 +41,9 @@ public: virtual encodedString* fetchRawPart(const RecMailP&mail,const RecPart&part); virtual encodedString* fetchRawBody(const RecMailP&mail); - virtual int createMbox(const QString&,const Opie::OSmartPointer&parentfolder=0, + virtual int createMbox(const QString&,const Opie::Core::OSmartPointer&parentfolder=0, const QString& delemiter="/",bool getsubfolder=false); - virtual int deleteMbox(const Opie::OSmartPointer&folder); + virtual int deleteMbox(const Opie::Core::OSmartPointer&folder); static void imap_progress( size_t current, size_t maximum ); 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,14 +1,15 @@ #include "mailtypes.h" #include +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); 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 @@ -29,7 +29,7 @@ class AbstractMail; 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(); @@ -81,7 +81,7 @@ protected: void copy_old(const RecMail&old); }; -typedef Opie::OSmartPointer RecMailP; +typedef Opie::Core::OSmartPointer RecMailP; typedef QMap part_plist_t; class RecPart 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 @@ -21,6 +21,7 @@ #define UTF16LOEND 0xDFFFUL +using namespace Opie::Core; Attachment::Attachment( DocLnk lnk ) { doc = lnk; @@ -155,7 +156,7 @@ QString IMAPFolder::decodeFolderName( const QString &name ) } Mail::Mail() - :Opie::ORefCount(),name(""), mail(""), to(""), cc(""), bcc(""), reply(""), subject(""), message("") + :Opie::Core::ORefCount(),name(""), mail(""), to(""), cc(""), bcc(""), reply(""), subject(""), message("") { } 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 @@ -28,7 +28,7 @@ protected: }; -class Mail:public Opie::ORefCount +class Mail:public Opie::Core::ORefCount { public: Mail(); @@ -66,7 +66,7 @@ private: 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 ); @@ -82,7 +82,7 @@ protected: QString nameDisplay, name, separator,prefix; }; -typedef Opie::OSmartPointer FolderP; +typedef Opie::Core::OSmartPointer FolderP; class MHFolder : public Folder { 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 @@ -6,6 +6,7 @@ #include #include +using namespace Opie::Core; MBOXwrapper::MBOXwrapper(const QString & mbox_dir,const QString&mbox_name) : Genericwrapper(),MBOXPath(mbox_dir),MBOXName(mbox_name) { @@ -44,9 +45,9 @@ void MBOXwrapper::listMessages(const QString & mailbox, QValueList &ta Global::statusMessage(tr("Mailbox has %1 mail(s)").arg(target.count())); } -QValueList >* MBOXwrapper::listFolders() +QValueList >* MBOXwrapper::listFolders() { - QValueList >* folders = new QValueList >(); + QValueList >* folders = new QValueList >(); QDir dir(MBOXPath); if (!dir.exists()) return folders; dir.setFilter(QDir::Files|QDir::Writable|QDir::Readable); 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 @@ -16,15 +16,15 @@ public: virtual ~MBOXwrapper(); virtual void listMessages(const QString & mailbox, QValueList&target ); - virtual QValueList >* listFolders(); + virtual QValueList >* 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&f=0, + virtual int createMbox(const QString&folder,const Opie::Core::OSmartPointer&f=0, const QString&d="",bool s=false); - virtual int deleteMbox(const Opie::OSmartPointer&); + virtual int deleteMbox(const Opie::Core::OSmartPointer&); virtual void storeMessage(const char*msg,size_t length, const QString&folder); @@ -33,7 +33,7 @@ public: virtual encodedString* fetchRawBody(const RecMailP&mail); virtual void deleteMails(const QString & FolderName,const QValueList &target); - virtual int deleteAllMail(const Opie::OSmartPointer&); + virtual int deleteAllMail(const Opie::Core::OSmartPointer&); virtual MAILLIB::ATYPE getType()const; virtual const QString&getName()const; 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 @@ -8,6 +8,9 @@ #include #include +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) { @@ -60,7 +63,7 @@ MHwrapper::~MHwrapper() clean_storage(); } -void MHwrapper::listMessages(const QString & mailbox, QValueList > &target ) +void MHwrapper::listMessages(const QString & mailbox, QValueList > &target ) { init_storage(); if (!m_storage) { @@ -76,9 +79,9 @@ void MHwrapper::listMessages(const QString & mailbox, QValueList >* MHwrapper::listFolders() +QValueList >* MHwrapper::listFolders() { - QValueList >* folders = new QValueList >(); + QValueList >* folders = new QValueList >(); /* this is needed! */ if (m_storage) mailstorage_disconnect(m_storage); init_storage(); @@ -317,9 +320,9 @@ int MHwrapper::deleteMbox(const FolderP&tfolder) 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; 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 @@ -8,7 +8,7 @@ class encodedString; struct mailmbox_folder; -class OProcess; +namespace Opie {namespace Core {class Opie::Core::OProcess;}} class MHwrapper : public Genericwrapper { @@ -17,19 +17,19 @@ public: MHwrapper(const QString & dir,const QString&name); virtual ~MHwrapper(); - virtual void listMessages(const QString & mailbox, QValueList > &target ); - virtual QValueList >* listFolders(); + virtual void listMessages(const QString & mailbox, QValueList > &target ); + virtual QValueList >* 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&fromFolder, + virtual void mvcpAllMails(const Opie::Core::OSmartPointer&fromFolder, const QString&targetFolder,AbstractMail*targetWrapper,bool moveit); - virtual int createMbox(const QString&folder,const Opie::OSmartPointer&f=0, + virtual int createMbox(const QString&folder,const Opie::Core::OSmartPointer&f=0, const QString&d="",bool s=false); - virtual int deleteMbox(const Opie::OSmartPointer&); + virtual int deleteMbox(const Opie::Core::OSmartPointer&); virtual void storeMessage(const char*msg,size_t length, const QString&folder); @@ -37,15 +37,15 @@ public: static void mbox_progress( size_t current, size_t maximum ); virtual encodedString* fetchRawBody(const RecMailP&mail); - virtual void deleteMails(const QString & FolderName,const QValueList > &target); - virtual int deleteAllMail(const Opie::OSmartPointer&); + virtual void deleteMails(const QString & FolderName,const QValueList > &target); + virtual int deleteAllMail(const Opie::Core::OSmartPointer&); 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; 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 @@ -11,6 +11,7 @@ #define HARD_MSG_SIZE_LIMIT 5242880 +using namespace Opie::Core; NNTPwrapper::NNTPwrapper( NNTPaccount *a ) : Genericwrapper() { account = a; @@ -96,7 +97,7 @@ RecBody NNTPwrapper::fetchBody( const RecMailP &mail ) { } -void NNTPwrapper::listMessages(const QString & which, QValueList > &target ) +void NNTPwrapper::listMessages(const QString & which, QValueList > &target ) { login(); if (!m_nntp) @@ -188,9 +189,9 @@ void NNTPwrapper::logout() m_nntp = 0; } -QValueList >* NNTPwrapper::listFolders() { +QValueList >* NNTPwrapper::listFolders() { - QValueList >* folders = new QValueList >(); + QValueList >* folders = new QValueList >(); QStringList groups; if (account) { groups = account->getGroups(); 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 @@ -20,15 +20,15 @@ public: virtual ~NNTPwrapper(); /* mailbox will be ignored */ - virtual void listMessages(const QString & mailbox, QValueList > &target ); + virtual void listMessages(const QString & mailbox, QValueList > &target ); /* should only get the subscribed one */ - virtual QValueList >* listFolders(); + virtual QValueList >* 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&); + virtual int deleteAllMail(const Opie::Core::OSmartPointer&); virtual RecBody fetchBody( const RecMailP &mail ); virtual encodedString* fetchRawBody(const RecMailP&mail); 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 @@ -10,6 +10,7 @@ /* 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; @@ -93,7 +94,7 @@ RecBody POP3wrapper::fetchBody( const RecMailP &mail ) { return body; } -void POP3wrapper::listMessages(const QString &, QValueList > &target ) +void POP3wrapper::listMessages(const QString &, QValueList > &target ) { login(); if (!m_pop3) @@ -176,8 +177,8 @@ void POP3wrapper::logout() } -QValueList >* POP3wrapper::listFolders() { - QValueList >* folders = new QValueList(); +QValueList >* POP3wrapper::listFolders() { + QValueList >* folders = new QValueList(); FolderP inb=new Folder("INBOX","/"); folders->append(inb); return folders; 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 @@ -17,14 +17,14 @@ public: POP3wrapper( POP3account *a ); virtual ~POP3wrapper(); /* mailbox will be ignored */ - virtual void listMessages(const QString & mailbox, QValueList > &target ); - virtual QValueList >* listFolders(); + virtual void listMessages(const QString & mailbox, QValueList > &target ); + virtual QValueList >* 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&); + virtual int deleteAllMail(const Opie::Core::OSmartPointer&); virtual RecBody fetchBody( const RecMailP &mail ); virtual encodedString* fetchRawBody(const RecMailP&mail); 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 @@ -13,6 +13,7 @@ #include +using namespace Opie::Core; progressMailSend*SMTPwrapper::sendProgress = 0; SMTPwrapper::SMTPwrapper(SMTPaccount * aSmtp ) @@ -312,7 +313,7 @@ int SMTPwrapper::smtpSend(char*from,clist*rcpts,const char*data,size_t size ) return result; } -void SMTPwrapper::sendMail(const Opie::OSmartPointer&mail,bool later ) +void SMTPwrapper::sendMail(const Opie::Core::OSmartPointer&mail,bool later ) { mailmime * mimeMail; 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 @@ -23,7 +23,7 @@ class SMTPwrapper : public Generatemail public: SMTPwrapper(SMTPaccount * aSmtp); virtual ~SMTPwrapper(); - void sendMail(const Opie::OSmartPointer& mail,bool later=false ); + void sendMail(const Opie::Core::OSmartPointer& mail,bool later=false ); bool flushOutbox(); static progressMailSend*sendProgress; @@ -50,7 +50,7 @@ protected: void storeMail(mailmime*mail, const QString&box); - int sendQueuedMail(AbstractMail*wrap,const Opie::OSmartPointer&which); + int sendQueuedMail(AbstractMail*wrap,const Opie::Core::OSmartPointer&which); void storeFailedMail(const char*data,unsigned int size, const char*failuremessage); int m_queuedMail; 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 @@ -9,6 +9,7 @@ #include +using namespace Opie::Core; Storemail::Storemail(Account*aAccount,const QString&aFolder) : Generatemail() { @@ -49,7 +50,7 @@ Storemail::~Storemail() { } -int Storemail::storeMail(const Opie::OSmartPointer&mail) +int Storemail::storeMail(const Opie::Core::OSmartPointer&mail) { if (!wrapper) return 0; int ret = 1; 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 @@ -18,7 +18,7 @@ public: Storemail(const QString&aFolder); virtual ~Storemail(); - int storeMail(const Opie::OSmartPointer&mail); + int storeMail(const Opie::Core::OSmartPointer&mail); protected: Account* m_Account; 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 @@ -52,7 +52,7 @@ INTERFACES = editaccountsui.ui \ nntpgroupsui.ui -INCLUDEPATH += $(OPIEDIR)/include +INCLUDEPATH += $(OPIEDIR)/include /usr/local/include CONFTEST = $$system( echo $CONFIG_TARGET_MACOSX ) contains( CONFTEST, y ){ 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 @@ -2,4 +2,6 @@ #include "opiemail.h" +using namespace Opie::Core; +using namespace Opie::Core; OPIE_EXPORT_APP( OApplicationFactory ) 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 @@ -12,7 +12,7 @@ #include "mailapplet.h" -using namespace Opie; +using namespace Opie::Core; MailApplet::MailApplet( QWidget *parent ) : QWidget( parent ) { 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 @@ -18,6 +18,7 @@ #include #include +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&path) : QListViewItem(parent,after),_partNum(num) @@ -220,7 +221,7 @@ void ViewMail::slotItemClicked( QListViewItem * item , const QPoint & point, int { MimeTypes types; types.insert( "all", "*" ); - QString str = Opie::OFileDialog::getSaveFileName( 1, + QString str = OFileDialog::getSaveFileName( 1, "/", item->text( 2 ) , types, 0 ); if( !str.isEmpty() ) 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 @@ -4,7 +4,7 @@ #include #include -#include +#include #include #include -- cgit v0.9.0.2