mailnews/news/src/nsNntpUrl.h
author aleth <aleth@instantbird.org>
Thu, 11 Aug 2016 14:32:01 +0200
changeset 19871 50bcb56180491a4ae898c29cb72a30102457809d
parent 19836 ddc5d8a70ab105ba2f2fa5989b9acaf512648acf
child 19880 28876b046ec271296611b271d6329937889dc694
permissions -rw-r--r--
Bug 1294260 - Allow compiler warnings in ldap. r=jorgk,r=aceman, a=jorgk CLOSED TREE DONTBUILD

/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* 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/. */

#ifndef nsNntpUrl_h__
#define nsNntpUrl_h__

#include "nsINntpUrl.h"
#include "nsMsgMailNewsUrl.h"
#include "nsINNTPNewsgroupPost.h"
#include "nsIFile.h"

class nsNntpUrl : public nsINntpUrl, public nsMsgMailNewsUrl, public nsIMsgMessageUrl, public nsIMsgI18NUrl
{
public:
  NS_DECL_NSINNTPURL
  NS_DECL_NSIMSGMESSAGEURL
  NS_DECL_NSIMSGI18NURL

  // nsIURI over-ride...
  NS_IMETHOD SetSpec(const nsACString &aSpec);

  NS_IMETHOD IsUrlType(uint32_t type, bool *isType);

  // nsIMsgMailNewsUrl overrides
  NS_IMETHOD GetServer(nsIMsgIncomingServer **server);
  NS_IMETHOD GetFolder(nsIMsgFolder **msgFolder);
  NS_IMETHOD CloneInternal(uint32_t aRefHandlingMode,
                           const nsACString& newRef,nsIURI **_retval);

  // nsNntpUrl
  nsNntpUrl();

  NS_DECL_ISUPPORTS_INHERITED

private:
  virtual ~nsNntpUrl();
  nsresult DetermineNewsAction();
  nsresult ParseNewsURL();
  nsresult ParseNntpURL();

  nsCOMPtr<nsINNTPNewsgroupPost> m_newsgroupPost;
  nsNewsAction m_newsAction; // the action this url represents...parse mailbox, display messages, etc.

  nsCString mURI; // the RDF URI associated with this url.
  nsCString mCharsetOverride; // used by nsIMsgI18NUrl...

  nsCString mOriginalSpec;
  nsCOMPtr <nsIFile>  m_filePath;

  // used by save message to disk
  nsCOMPtr<nsIFile> m_messageFile;

  bool          m_addDummyEnvelope;
  bool          m_canonicalLineEnding;
  bool          m_getOldMessages;

  nsCString m_group;
  nsCString m_messageID;
  nsMsgKey m_key;
};

#endif // nsNntpUrl_h__