mailnews/local/src/nsMsgMaildirStore.h
author Geoff Lankow <geoff@darktrojan.net>
Wed, 06 Jun 2012 14:24:01 +1200
changeset 12845 9e8f283a8af138b0338d0d4e90518ad6adfd5f5d
parent 12521 84ac3c71109811da751f0ef2d72108075938f094
child 15739 115c44b4353a2ee8efad8aa6bf789d40708dfd37
permissions -rw-r--r--
Bug 749930 - Replace uses of nsILocalFile with nsIFile (compiled code only); r=Fallen,Neil sr=Standard8

/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */

/**
   Class for handling Maildir stores.
*/

#ifndef nsMsgMaildirStore_h__
#define nsMsgMaildirStore_h__

#include "nsMsgLocalStoreUtils.h"
#include "nsIFile.h"
#include "nsInterfaceHashtable.h"
#include "nsMsgMessageFlags.h"

class nsMsgMaildirStore : public nsMsgLocalStoreUtils, nsIMsgPluggableStore
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_NSIMSGPLUGGABLESTORE

  nsMsgMaildirStore();

private:
  ~nsMsgMaildirStore();

protected:
  nsresult GetDirectoryForFolder(nsIFile *path);
  nsresult CreateDirectoryForFolder(nsIFile *path, bool aIsServer);

  nsresult CreateMaildir(nsIFile *path);
  nsresult AddSubFolders(nsIMsgFolder *parent, nsIFile *path, bool deep);
  nsresult GetOutputStream(nsIMsgDBHdr *aHdr,
                           nsCOMPtr<nsIOutputStream> &aOutputStream);

};
#endif