diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 17:32:43 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 17:32:43 +0000 |
commit | 6bf0a5cb5034a7e684dcc3500e841785237ce2dd (patch) | |
tree | a68f146d7fa01f0134297619fbe7e33db084e0aa /comm/mailnews/mime/src/nsMimeObjectClassAccess.cpp | |
parent | Initial commit. (diff) | |
download | thunderbird-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 '')
-rw-r--r-- | comm/mailnews/mime/src/nsMimeObjectClassAccess.cpp | 75 |
1 files changed, 75 insertions, 0 deletions
diff --git a/comm/mailnews/mime/src/nsMimeObjectClassAccess.cpp b/comm/mailnews/mime/src/nsMimeObjectClassAccess.cpp new file mode 100644 index 0000000000..a769ae192e --- /dev/null +++ b/comm/mailnews/mime/src/nsMimeObjectClassAccess.cpp @@ -0,0 +1,75 @@ +/* -*- 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/. */ +#include <stdio.h> +#include "mimecom.h" +#include "nscore.h" +#include "nsMimeObjectClassAccess.h" + +/* + * The following macros actually implement addref, release and + * query interface for our component. + */ +NS_IMPL_ISUPPORTS(nsMimeObjectClassAccess, nsIMimeObjectClassAccess) + +/* + * nsMimeObjectClassAccess definitions.... + */ + +/* + * Inherited methods for nsMimeObjectClassAccess + */ +nsMimeObjectClassAccess::nsMimeObjectClassAccess() {} + +nsMimeObjectClassAccess::~nsMimeObjectClassAccess() {} + +nsresult nsMimeObjectClassAccess::MimeObjectWrite(void* mimeObject, char* data, + int32_t length, + bool user_visible_p) { + int rc = XPCOM_MimeObject_write(mimeObject, data, length, user_visible_p); + NS_ENSURE_FALSE(rc < 0, NS_ERROR_FAILURE); + + return NS_OK; +} + +nsresult nsMimeObjectClassAccess::GetmimeInlineTextClass(void** ptr) { + *ptr = XPCOM_GetmimeInlineTextClass(); + return NS_OK; +} + +nsresult nsMimeObjectClassAccess::GetmimeLeafClass(void** ptr) { + *ptr = XPCOM_GetmimeLeafClass(); + return NS_OK; +} + +nsresult nsMimeObjectClassAccess::GetmimeObjectClass(void** ptr) { + *ptr = XPCOM_GetmimeObjectClass(); + return NS_OK; +} + +nsresult nsMimeObjectClassAccess::GetmimeContainerClass(void** ptr) { + *ptr = XPCOM_GetmimeContainerClass(); + return NS_OK; +} + +nsresult nsMimeObjectClassAccess::GetmimeMultipartClass(void** ptr) { + *ptr = XPCOM_GetmimeMultipartClass(); + return NS_OK; +} + +nsresult nsMimeObjectClassAccess::GetmimeMultipartSignedClass(void** ptr) { + *ptr = XPCOM_GetmimeMultipartSignedClass(); + return NS_OK; +} + +nsresult nsMimeObjectClassAccess::GetmimeEncryptedClass(void** ptr) { + *ptr = XPCOM_GetmimeEncryptedClass(); + return NS_OK; +} + +nsresult nsMimeObjectClassAccess::MimeCreate(char* content_type, void* hdrs, + void* opts, void** ptr) { + *ptr = XPCOM_Mime_create(content_type, hdrs, opts); + return NS_OK; +} |