summaryrefslogtreecommitdiffstats
path: root/comm/mailnews/base/src/nsMsgTagService.h
diff options
context:
space:
mode:
Diffstat (limited to 'comm/mailnews/base/src/nsMsgTagService.h')
-rw-r--r--comm/mailnews/base/src/nsMsgTagService.h50
1 files changed, 50 insertions, 0 deletions
diff --git a/comm/mailnews/base/src/nsMsgTagService.h b/comm/mailnews/base/src/nsMsgTagService.h
new file mode 100644
index 0000000000..7eee648271
--- /dev/null
+++ b/comm/mailnews/base/src/nsMsgTagService.h
@@ -0,0 +1,50 @@
+/* -*- 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/. */
+
+#ifndef nsMsgTagService_h__
+#define nsMsgTagService_h__
+
+#include "nsIMsgTagService.h"
+#include "nsIPrefBranch.h"
+#include "nsCOMPtr.h"
+#include "nsString.h"
+#include "nsTArray.h"
+
+class nsMsgTag final : public nsIMsgTag {
+ public:
+ NS_DECL_ISUPPORTS
+ NS_DECL_NSIMSGTAG
+
+ nsMsgTag(const nsACString& aKey, const nsAString& aTag,
+ const nsACString& aColor, const nsACString& aOrdinal);
+
+ protected:
+ ~nsMsgTag();
+
+ nsString mTag;
+ nsCString mKey, mColor, mOrdinal;
+};
+
+class nsMsgTagService final : public nsIMsgTagService {
+ public:
+ NS_DECL_ISUPPORTS
+ NS_DECL_NSIMSGTAGSERVICE
+
+ nsMsgTagService();
+
+ private:
+ ~nsMsgTagService();
+
+ protected:
+ nsresult SetUnicharPref(const char* prefName, const nsAString& prefValue);
+ nsresult GetUnicharPref(const char* prefName, nsAString& prefValue);
+ nsresult SetupLabelTags();
+ nsresult RefreshKeyCache();
+
+ nsCOMPtr<nsIPrefBranch> m_tagPrefBranch;
+ nsTArray<nsCString> m_keys;
+};
+
+#endif