1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
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 
6 /**
7    Class for handling Maildir stores.
8 */
9 
10 #ifndef nsMsgMaildirStore_h__
11 #define nsMsgMaildirStore_h__
12 
13 #include "nsMsgLocalStoreUtils.h"
14 #include "nsIMsgPluggableStore.h"
15 #include "nsIFile.h"
16 #include "nsMsgMessageFlags.h"
17 
18 class nsMsgMaildirStore final : public nsMsgLocalStoreUtils,
19                                 nsIMsgPluggableStore {
20  public:
21   NS_DECL_ISUPPORTS
22   NS_DECL_NSIMSGPLUGGABLESTORE
23 
24   nsMsgMaildirStore();
25 
26  private:
27   ~nsMsgMaildirStore();
28 
29  protected:
30   nsresult GetDirectoryForFolder(nsIFile* path);
31   nsresult CreateDirectoryForFolder(nsIFile* path, bool aIsServer);
32 
33   nsresult CreateMaildir(nsIFile* path);
34   nsresult AddSubFolders(nsIMsgFolder* parent, nsIFile* path, bool deep);
35   nsresult GetOutputStream(nsIMsgDBHdr* aHdr,
36                            nsCOMPtr<nsIOutputStream>& aOutputStream);
37 };
38 #endif
39