Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions | Protected Attributes
nsDataFlavor Class Reference

DataFlavor wrapper. More...

#include <nsDataFlavor.h>

Collaboration diagram for nsDataFlavor:
Collaboration graph

List of all members.

Public Member Functions

 nsDataFlavor ()
virtual ~nsDataFlavor ()
NS_DECL_ISUPPORTS NS_IMETHOD Init (const nsString &aMimeType, const nsString &aHumanPresentableName)
NS_IMETHOD GetMimeType (nsString &aMimeStr) const
NS_IMETHOD GetHumanPresentableName (nsString &aReadableStr) const
NS_IMETHOD Equals (const nsIDataFlavor *aDataFlavor)
NS_IMETHOD GetPredefinedDataFlavor (nsString &aStr, nsIDataFlavor **aDataFlavor)
 Cache of nsDataFlavor instances.

Protected Attributes

nsString mMimeType
nsString mHumanPresentableName

Detailed Description

DataFlavor wrapper.

Definition at line 50 of file nsDataFlavor.h.

Constructor & Destructor Documentation

Definition at line 52 of file nsDataFlavor.cpp.


Definition at line 61 of file nsDataFlavor.cpp.


Member Function Documentation

NS_METHOD nsDataFlavor::Equals ( const nsIDataFlavor *  aDataFlavor)

Definition at line 129 of file nsDataFlavor.cpp.

  nsString mimeInQues;

  return (mMimeType.Equals(mimeInQues)?NS_OK:NS_ERROR_FAILURE);

Definition at line 119 of file nsDataFlavor.cpp.

  aHumanPresentableName = mHumanPresentableName;
  return NS_OK;

Definition at line 109 of file nsDataFlavor.cpp.

  aMimeStr = mMimeType;
  return NS_OK;
NS_METHOD nsDataFlavor::GetPredefinedDataFlavor ( nsString aStr,
nsIDataFlavor **  aDataFlavor 

Cache of nsDataFlavor instances.

Does this addRef, and do I have to release the last flavor before I call GetPredefined again?

Definition at line 144 of file nsDataFlavor.cpp.

  return NS_OK;
NS_METHOD nsDataFlavor::Init ( const nsString aMimeType,
const nsString aHumanPresentableName 

Definition at line 93 of file nsDataFlavor.cpp.

  mMimeType = aMimeType;
  mHumanPresentableName = aHumanPresentableName;

  char * str = ToNewCString(mMimeType);

  delete[] str;

  return NS_OK;

Here is the call graph for this function:

Member Data Documentation

Definition at line 71 of file nsDataFlavor.h.

Definition at line 70 of file nsDataFlavor.h.

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