Changes for nsISupports implementation

This commit is contained in:
rhp%netscape.com 1999-02-01 16:26:42 +00:00
Родитель bcae9d0638
Коммит 6866629639
2 изменённых файлов: 17 добавлений и 7 удалений

Просмотреть файл

@ -22,6 +22,8 @@
#ifndef _MIMECOM_H_
#define _MIMECOM_H_
#include "prtypes.h"
/*
* These functions are exposed by libmime to be used by content type
* handler plugins for processing stream data.
@ -29,18 +31,18 @@
/*
* This is the write call for outputting processed stream data.
*/
extern int XPCOM_MimeObject_write(void *mimeObject, char *data,
extern "C" int XPCOM_MimeObject_write(void *mimeObject, char *data,
PRInt32 length,
PRBool user_visible_p);
/*
* The following group of calls expose the pointers for the object
* system within libmime.
*/
extern void *XPCOM_GetmimeInlineTextClass(void);
extern void *XPCOM_GetmimeLeafClass(void);
extern void *XPCOM_GetmimeObjectClass(void);
extern void *XPCOM_GetmimeContainerClass(void);
extern void *XPCOM_GetmimeMultipartClass(void);
extern void *XPCOM_GetmimeMultipartSignedClass(void);
extern "C" void *XPCOM_GetmimeInlineTextClass(void);
extern "C" void *XPCOM_GetmimeLeafClass(void);
extern "C" void *XPCOM_GetmimeObjectClass(void);
extern "C" void *XPCOM_GetmimeContainerClass(void);
extern "C" void *XPCOM_GetmimeMultipartClass(void);
extern "C" void *XPCOM_GetmimeMultipartSignedClass(void);
#endif /* _MIMECOM_H_ */

Просмотреть файл

@ -16,6 +16,7 @@
* Reserved.
*/
#include "stdio.h"
#include "mimecom.h"
#include "nscore.h"
#include "nsIFactory.h"
#include "nsISupports.h"
@ -79,41 +80,48 @@ nsMimeObjectClassAccess::MimeObjectWrite(void *mimeObject,
PRInt32 length,
PRBool user_visible_p)
{
int rc = XPCOM_MimeObject_write(mimeObject, data, length, user_visible_p);
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;
}