diff options
author | Matt A. Tobin <email@mattatobin.com> | 2019-11-03 00:17:46 -0400 |
---|---|---|
committer | Matt A. Tobin <email@mattatobin.com> | 2019-11-03 00:17:46 -0400 |
commit | 302bf1b523012e11b60425d6eee1221ebc2724eb (patch) | |
tree | b191a895f8716efcbe42f454f37597a545a6f421 /mailnews/mime/src/nsMimeObjectClassAccess.cpp | |
parent | 21b3f6247403c06f85e1f45d219f87549862198f (diff) | |
download | UXP-302bf1b523012e11b60425d6eee1221ebc2724eb.tar UXP-302bf1b523012e11b60425d6eee1221ebc2724eb.tar.gz UXP-302bf1b523012e11b60425d6eee1221ebc2724eb.tar.lz UXP-302bf1b523012e11b60425d6eee1221ebc2724eb.tar.xz UXP-302bf1b523012e11b60425d6eee1221ebc2724eb.zip |
Issue #1258 - Part 1: Import mailnews, ldap, and mork from comm-esr52.9.1
Diffstat (limited to 'mailnews/mime/src/nsMimeObjectClassAccess.cpp')
-rw-r--r-- | mailnews/mime/src/nsMimeObjectClassAccess.cpp | 97 |
1 files changed, 97 insertions, 0 deletions
diff --git a/mailnews/mime/src/nsMimeObjectClassAccess.cpp b/mailnews/mime/src/nsMimeObjectClassAccess.cpp new file mode 100644 index 000000000..f1286dcc1 --- /dev/null +++ b/mailnews/mime/src/nsMimeObjectClassAccess.cpp @@ -0,0 +1,97 @@ +/* -*- 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; +} |