1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ 2 /* This Source Code Form is subject to the terms of the Mozilla Public 3 * License, v. 2.0. If a copy of the MPL was not distributed with this 4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 5 #ifndef _nsMsgOfflineImapOperation_H_ 6 7 # include "nsIMsgOfflineImapOperation.h" 8 # include "mdb.h" 9 # include "nsMsgDatabase.h" 10 # include "prlog.h" 11 12 class nsMsgOfflineImapOperation : public nsIMsgOfflineImapOperation { 13 public: 14 /** Instance Methods **/ 15 nsMsgOfflineImapOperation(nsMsgDatabase* db, nsIMdbRow* row); 16 NS_DECL_ISUPPORTS 17 NS_DECL_NSIMSGOFFLINEIMAPOPERATION 18 GetMDBRow()19 nsIMdbRow* GetMDBRow() { return m_mdbRow; } 20 nsresult GetCopiesFromDB(); 21 nsresult SetCopiesToDB(); 22 void Log(); 23 24 protected: 25 virtual ~nsMsgOfflineImapOperation(); 26 nsresult AddKeyword(const char* aKeyword, nsCString& addList, 27 const char* addProp, nsCString& removeList, 28 const char* removeProp); 29 30 nsOfflineImapOperationType m_operation; 31 nsMsgKey m_messageKey; 32 nsMsgKey m_sourceMessageKey; 33 uint32_t m_operationFlags; // what to do on sync 34 imapMessageFlagsType m_newFlags; // used for kFlagsChanged 35 36 // these are URI's, and are escaped. Thus, we can use a delimter like ' ' 37 // because the real spaces should be escaped. 38 nsCString m_sourceFolder; 39 nsCString m_moveDestination; 40 nsTArray<nsCString> m_copyDestinations; 41 42 nsCString m_keywordsToAdd; 43 nsCString m_keywordsToRemove; 44 45 // nsMsgOfflineImapOperation will have to know what db and row they belong to, 46 // since they are really just a wrapper around the offline operation row in 47 // the mdb. though I hope not. 48 nsMsgDatabase* m_mdb; 49 nsCOMPtr<nsIMdbRow> m_mdbRow; 50 }; 51 52 #endif /* _nsMsgOfflineImapOperation_H_ */ 53