[haiku-commits] haiku: hrev50056 - src/kits/mail src/add-ons/mail_daemon/inbound_protocols/pop3 src/add-ons/mail_daemon/inbound_protocols/imap headers/os/add-ons/mail_daemon

  • From: axeld@xxxxxxxxxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Tue, 26 Jan 2016 16:05:47 +0100 (CET)

hrev50056 adds 1 changeset to branch 'master'
old head: 522150d01af2c8d4e7327cd38a783655b8b9bac8
new head: de4b1dede1d53ff01585d2bd9087ebafdbb8e582
overview: 
http://cgit.haiku-os.org/haiku/log/?qt=range&q=de4b1dede1d5+%5E522150d01af2

----------------------------------------------------------------------------

de4b1dede1d5: BMailProtocol: Removed delete/append methods.
  
  * The mail system is file based which makes these methods pretty much
    superfluous.

                                   [ Axel Dörfler <axeld@xxxxxxxxxxxxxxxx> ]

----------------------------------------------------------------------------

Revision:    hrev50056
Commit:      de4b1dede1d53ff01585d2bd9087ebafdbb8e582
URL:         http://cgit.haiku-os.org/haiku/commit/?id=de4b1dede1d5
Author:      Axel Dörfler <axeld@xxxxxxxxxxxxxxxx>
Date:        Wed Jan 20 20:11:58 2016 UTC

----------------------------------------------------------------------------

6 files changed, 109 deletions(-)
headers/os/add-ons/mail_daemon/MailProtocol.h    |  9 ----
.../inbound_protocols/imap/IMAPProtocol.cpp      | 16 -------
.../inbound_protocols/imap/IMAPProtocol.h        |  2 -
.../mail_daemon/inbound_protocols/pop3/POP3.cpp  | 31 ------------
.../mail_daemon/inbound_protocols/pop3/POP3.h    |  1 -
src/kits/mail/MailProtocol.cpp                   | 50 --------------------

----------------------------------------------------------------------------

diff --git a/headers/os/add-ons/mail_daemon/MailProtocol.h 
b/headers/os/add-ons/mail_daemon/MailProtocol.h
index 6ae1dff..4840057 100644
--- a/headers/os/add-ons/mail_daemon/MailProtocol.h
+++ b/headers/os/add-ons/mail_daemon/MailProtocol.h
@@ -70,11 +70,6 @@ public:
 
        virtual void                            MessageReceived(BMessage* 
message);
 
-                       // Mail storage operations
-       virtual status_t                        MoveMessage(const entry_ref& 
ref,
-                                                                       
BDirectory& dir);
-       virtual status_t                        DeleteMessage(const entry_ref& 
ref);
-
                        // Convenience methods that call the BMailNotifier
                        void                            ShowError(const char* 
error);
                        void                            ShowMessage(const char* 
message);
@@ -140,8 +135,6 @@ public:
                                                                        
BMessenger* replyTo);
        virtual status_t                        MarkMessageAsRead(const 
entry_ref& ref,
                                                                        
read_flags flags = B_READ);
-       virtual status_t                        DeleteMessage(const entry_ref& 
ref);
-       virtual status_t                        AppendMessage(const entry_ref& 
ref);
 
        static  void                            ReplyBodyFetched(const 
BMessenger& replyTo,
                                                                        const 
entry_ref& ref, status_t status);
@@ -150,8 +143,6 @@ protected:
        virtual status_t                        HandleFetchBody(const 
entry_ref& ref,
                                                                        const 
BMessenger& replyTo) = 0;
 
-       virtual status_t                        HandleDeleteMessage(const 
entry_ref& ref) = 0;
-
                        void                            
NotiyMailboxSynchronized(status_t status);
 };
 
diff --git a/src/add-ons/mail_daemon/inbound_protocols/imap/IMAPProtocol.cpp 
b/src/add-ons/mail_daemon/inbound_protocols/imap/IMAPProtocol.cpp
index 8ad0f54..2af0605 100644
--- a/src/add-ons/mail_daemon/inbound_protocols/imap/IMAPProtocol.cpp
+++ b/src/add-ons/mail_daemon/inbound_protocols/imap/IMAPProtocol.cpp
@@ -200,14 +200,6 @@ IMAPProtocol::MarkMessageAsRead(const entry_ref& ref, 
read_flags flags)
 }
 
 
-status_t
-IMAPProtocol::AppendMessage(const entry_ref& ref)
-{
-       printf("IMAP: append message %s\n", ref.name);
-       return B_ERROR;
-}
-
-
 void
 IMAPProtocol::MessageReceived(BMessage* message)
 {
@@ -247,14 +239,6 @@ IMAPProtocol::HandleFetchBody(const entry_ref& ref, const 
BMessenger& replyTo)
 }
 
 
-status_t
-IMAPProtocol::HandleDeleteMessage(const entry_ref& ref)
-{
-       printf("IMAP: delete message %s\n", ref.name);
-       return B_ERROR;
-}
-
-
 void
 IMAPProtocol::ReadyToRun()
 {
diff --git a/src/add-ons/mail_daemon/inbound_protocols/imap/IMAPProtocol.h 
b/src/add-ons/mail_daemon/inbound_protocols/imap/IMAPProtocol.h
index 57ab581..0f89ae4 100644
--- a/src/add-ons/mail_daemon/inbound_protocols/imap/IMAPProtocol.h
+++ b/src/add-ons/mail_daemon/inbound_protocols/imap/IMAPProtocol.h
@@ -47,14 +47,12 @@ public:
        virtual status_t                        SyncMessages();
        virtual status_t                        MarkMessageAsRead(const 
entry_ref& ref,
                                                                        
read_flags flags = B_READ);
-       virtual status_t                        AppendMessage(const entry_ref& 
ref);
 
        virtual void                            MessageReceived(BMessage* 
message);
 
 protected:
        virtual status_t                        HandleFetchBody(const 
entry_ref& ref,
                                                                        const 
BMessenger& replyTo);
-       virtual status_t                        HandleDeleteMessage(const 
entry_ref& ref);
 
                        void                            ReadyToRun();
 
diff --git a/src/add-ons/mail_daemon/inbound_protocols/pop3/POP3.cpp 
b/src/add-ons/mail_daemon/inbound_protocols/pop3/POP3.cpp
index 4ecdfc5..313aa74 100644
--- a/src/add-ons/mail_daemon/inbound_protocols/pop3/POP3.cpp
+++ b/src/add-ons/mail_daemon/inbound_protocols/pop3/POP3.cpp
@@ -317,37 +317,6 @@ POP3Protocol::HandleFetchBody(const entry_ref& ref, const 
BMessenger& replyTo)
 
 
 status_t
-POP3Protocol::HandleDeleteMessage(const entry_ref& ref)
-{
-       status_t error = Connect();
-       if (error < B_OK)
-               return error;
-
-       error = _RetrieveUniqueIDs();
-       if (error < B_OK) {
-               Disconnect();
-               return error;
-       }
-
-       char uidString[256];
-       BNode node(&ref);
-       if (node.ReadAttr("MAIL:unique_id", B_STRING_TYPE, 0, uidString, 256) < 
0) {
-               Disconnect();
-               return B_ERROR;
-       }
-
-       #if DEBUG
-       printf("DeleteMessage: ID is %d\n", (int)fUniqueIDs.IndexOf(uidString));
-               // What should we use for int32 instead of %d?
-       #endif
-       Delete(fUniqueIDs.IndexOf(uidString));
-
-       Disconnect();
-       return B_OK;
-}
-
-
-status_t
 POP3Protocol::Open(const char* server, int port, int)
 {
        ReportProgress(0, 0, B_TRANSLATE("Connecting to POP3 server"
diff --git a/src/add-ons/mail_daemon/inbound_protocols/pop3/POP3.h 
b/src/add-ons/mail_daemon/inbound_protocols/pop3/POP3.h
index c4cf020..4049cd9 100644
--- a/src/add-ons/mail_daemon/inbound_protocols/pop3/POP3.h
+++ b/src/add-ons/mail_daemon/inbound_protocols/pop3/POP3.h
@@ -43,7 +43,6 @@ public:
 protected:
        virtual status_t                        HandleFetchBody(const 
entry_ref& ref,
                                                                        const 
BMessenger& replyTo);
-       virtual status_t                        HandleDeleteMessage(const 
entry_ref& ref);
 
                        // pop3 methods
                        status_t                        Open(const char* 
server, int port,
diff --git a/src/kits/mail/MailProtocol.cpp b/src/kits/mail/MailProtocol.cpp
index eb3bcc1..c4291b0 100644
--- a/src/kits/mail/MailProtocol.cpp
+++ b/src/kits/mail/MailProtocol.cpp
@@ -39,10 +39,6 @@
 using namespace BPrivate;
 
 
-const uint32 kMsgDeleteMessage = '&DeM';
-const uint32 kMsgAppendMessage = '&ApM';
-
-
 BMailProtocol::BMailProtocol(const char* name,
        const BMailAccountSettings& settings)
        :
@@ -136,22 +132,6 @@ BMailProtocol::MessageReceived(BMessage* message)
 }
 
 
-status_t
-BMailProtocol::MoveMessage(const entry_ref& ref, BDirectory& dir)
-{
-       BEntry entry(&ref);
-       return entry.MoveTo(&dir);
-}
-
-
-status_t
-BMailProtocol::DeleteMessage(const entry_ref& ref)
-{
-       BEntry entry(&ref);
-       return entry.Remove();
-}
-
-
 void
 BMailProtocol::ShowError(const char* error)
 {
@@ -435,22 +415,6 @@ BInboundMailProtocol::MessageReceived(BMessage* message)
                        break;
                }
 
-               case kMsgDeleteMessage:
-               {
-                       entry_ref ref;
-                       message->FindRef("ref", &ref);
-                       DeleteMessage(ref);
-                       break;
-               }
-
-               case kMsgAppendMessage:
-               {
-                       entry_ref ref;
-                       message->FindRef("ref", &ref);
-                       AppendMessage(ref);
-                       break;
-               }
-
                default:
                        BMailProtocol::MessageReceived(message);
                        break;
@@ -478,20 +442,6 @@ BInboundMailProtocol::MarkMessageAsRead(const entry_ref& 
ref, read_flags flag)
 }
 
 
-status_t
-BInboundMailProtocol::DeleteMessage(const entry_ref& ref)
-{
-       return B_ERROR;
-}
-
-
-status_t
-BInboundMailProtocol::AppendMessage(const entry_ref& ref)
-{
-       return B_OK;
-}
-
-
 /*static*/ void
 BInboundMailProtocol::ReplyBodyFetched(const BMessenger& replyTo,
        const entry_ref& ref, status_t status)


Other related posts:

  • » [haiku-commits] haiku: hrev50056 - src/kits/mail src/add-ons/mail_daemon/inbound_protocols/pop3 src/add-ons/mail_daemon/inbound_protocols/imap headers/os/add-ons/mail_daemon - axeld