summaryrefslogtreecommitdiffstats
path: root/comm/mailnews/mime/src/nsMimeObjectClassAccess.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 17:32:43 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 17:32:43 +0000
commit6bf0a5cb5034a7e684dcc3500e841785237ce2dd (patch)
treea68f146d7fa01f0134297619fbe7e33db084e0aa /comm/mailnews/mime/src/nsMimeObjectClassAccess.h
parentInitial commit. (diff)
downloadthunderbird-6bf0a5cb5034a7e684dcc3500e841785237ce2dd.tar.xz
thunderbird-6bf0a5cb5034a7e684dcc3500e841785237ce2dd.zip
Adding upstream version 1:115.7.0.upstream/1%115.7.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'comm/mailnews/mime/src/nsMimeObjectClassAccess.h')
-rw-r--r--comm/mailnews/mime/src/nsMimeObjectClassAccess.h50
1 files changed, 50 insertions, 0 deletions
diff --git a/comm/mailnews/mime/src/nsMimeObjectClassAccess.h b/comm/mailnews/mime/src/nsMimeObjectClassAccess.h
new file mode 100644
index 0000000000..d131ffa1a6
--- /dev/null
+++ b/comm/mailnews/mime/src/nsMimeObjectClassAccess.h
@@ -0,0 +1,50 @@
+/* -*- Mode: C; tab-width: 4; 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/. */
+
+/*
+ * This interface is implemented by libmime. This interface is used by
+ * a Content-Type handler "Plug In" (i.e. vCard) for accessing various
+ * internal information about the object class system of libmime. When
+ * libmime progresses to a C++ object class, this would probably change.
+ */
+#ifndef nsMimeObjectClassAccess_h_
+#define nsMimeObjectClassAccess_h_
+
+#include "mozilla/Attributes.h"
+#include "nsISupports.h"
+#include "nsIMimeObjectClassAccess.h"
+
+class nsMimeObjectClassAccess : public nsIMimeObjectClassAccess {
+ public:
+ nsMimeObjectClassAccess();
+
+ /* this macro defines QueryInterface, AddRef and Release for this class */
+ NS_DECL_ISUPPORTS
+
+ // These methods are all implemented by libmime to be used by
+ // content type handler plugins for processing stream data.
+
+ // This is the write call for outputting processed stream data.
+ NS_IMETHOD MimeObjectWrite(void* mimeObject, char* data, int32_t length,
+ bool user_visible_p) override;
+
+ // The following group of calls expose the pointers for the object
+ // system within libmime.
+ NS_IMETHOD GetmimeInlineTextClass(void** ptr) override;
+ NS_IMETHOD GetmimeLeafClass(void** ptr) override;
+ NS_IMETHOD GetmimeObjectClass(void** ptr) override;
+ NS_IMETHOD GetmimeContainerClass(void** ptr) override;
+ NS_IMETHOD GetmimeMultipartClass(void** ptr) override;
+ NS_IMETHOD GetmimeMultipartSignedClass(void** ptr) override;
+ NS_IMETHOD GetmimeEncryptedClass(void** ptr) override;
+
+ NS_IMETHOD MimeCreate(char* content_type, void* hdrs, void* opts,
+ void** ptr) override;
+
+ private:
+ virtual ~nsMimeObjectClassAccess();
+};
+
+#endif /* nsMimeObjectClassAccess_h_ */