Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions | Private Attributes
nsMimeContentTypeHandler Class Reference

#include <nsMimeContentTypeHandler.h>

Inheritance diagram for nsMimeContentTypeHandler:
Inheritance graph
Collaboration diagram for nsMimeContentTypeHandler:
Collaboration graph

List of all members.

Public Member Functions

 nsMimeContentTypeHandler (const char *aMimeType, MCTHCreateCTHClass callback)
virtual ~nsMimeContentTypeHandler (void)
NS_DECL_ISUPPORTS NS_IMETHOD GetContentType (char **contentType)
NS_IMETHOD CreateContentTypeHandlerClass (const char *content_type, contentTypeHandlerInitStruct *initStruct, MimeObjectClass **objClass)

Private Attributes

char * mimeType
MCTHCreateCTHClass realCreateContentTypeHandlerClass

Detailed Description

Definition at line 60 of file nsMimeContentTypeHandler.h.

Constructor & Destructor Documentation

nsMimeContentTypeHandler::nsMimeContentTypeHandler ( const char *  aMimeType,
MCTHCreateCTHClass  callback 

Definition at line 55 of file nsMimeContentTypeHandler.cpp.

  NS_ASSERTION(aMimeType, "nsMimeContentTypeHandler should be initialized with non-null mime type");
  NS_ASSERTION(callback, "nsMimeContentTypeHandler should be initialized with non-null callback");
  mimeType = PL_strdup(aMimeType);
  realCreateContentTypeHandlerClass = callback;

Definition at line 64 of file nsMimeContentTypeHandler.cpp.

Member Function Documentation

nsresult nsMimeContentTypeHandler::CreateContentTypeHandlerClass ( const char *  content_type,
contentTypeHandlerInitStruct initStruct,
MimeObjectClass **  objClass 
) [virtual]

Implements nsIMimeContentTypeHandler.

Definition at line 83 of file nsMimeContentTypeHandler.cpp.

  *objClass = realCreateContentTypeHandlerClass(content_type, initStruct);
  if (!*objClass)
    return NS_ERROR_OUT_OF_MEMORY; /* we couldn't allocate the object */
    return NS_OK;
nsresult nsMimeContentTypeHandler::GetContentType ( char **  contentType) [virtual]

Implements nsIMimeContentTypeHandler.

Definition at line 75 of file nsMimeContentTypeHandler.cpp.

  *contentType = PL_strdup(mimeType);
  return NS_OK;

Member Data Documentation

Definition at line 75 of file nsMimeContentTypeHandler.h.

Definition at line 76 of file nsMimeContentTypeHandler.h.

The documentation for this class was generated from the following files: