DXR is a code search and navigation tool aimed at making sense of large projects. It supports full-text and regex searches as well as structural queries.

Untracked file

nsIEntityConverter

Macros

Line Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137
/*
 * DO NOT EDIT.  THIS FILE IS GENERATED FROM ../../../dist/idl/nsIEntityConverter.idl
 */

#ifndef __gen_nsIEntityConverter_h__
#define __gen_nsIEntityConverter_h__


#ifndef __gen_nsISupports_h__
#include "nsISupports.h"
#endif

/* For IDL files that don't want to include root IDL files. */
#ifndef NS_NO_VTABLE
#define NS_NO_VTABLE
#endif
// {9E9B565A-8E52-4C1A-8805-B2B91655F874}
#define NS_ENTITYCONVERTER_CID { 0x9e9b565a, 0x8e52, 0x4c1a, {0x88, 0x05, 0xb2, 0xb9, 0x16, 0x55, 0xf8, 0x74}}
#define NS_ENTITYCONVERTER_CONTRACTID "@mozilla.org/intl/entityconverter;1"

/* starting interface:    nsIEntityConverter */
#define NS_IENTITYCONVERTER_IID_STR "d14c7111-55e0-11d3-91d9-00105aa3f7dc"

#define NS_IENTITYCONVERTER_IID \
  {0xd14c7111, 0x55e0, 0x11d3, \
    { 0x91, 0xd9, 0x00, 0x10, 0x5a, 0xa3, 0xf7, 0xdc }}

class NS_NO_VTABLE nsIEntityConverter : public nsISupports {
 public:

  NS_DECLARE_STATIC_IID_ACCESSOR(NS_IENTITYCONVERTER_IID)

  enum {
    entityNone = 0U,
    html40Latin1 = 1U,
    html40Symbols = 2U,
    html40Special = 4U,
    transliterate = 8U,
    mathml20 = 16U,
    html32 = 1U,
    html40 = 7U,
    entityW3C = 23U
  };

  /* string ConvertUTF32ToEntity (in unsigned long character, in unsigned long entityVersion); */
  NS_IMETHOD ConvertUTF32ToEntity(uint32_t character, uint32_t entityVersion, char * *_retval) = 0;

  /* string ConvertToEntity (in wchar character, in unsigned long entityVersion); */
  NS_IMETHOD ConvertToEntity(char16_t character, uint32_t entityVersion, char * *_retval) = 0;

  /* wstring ConvertToEntities (in wstring inString, in unsigned long entityVersion); */
  NS_IMETHOD ConvertToEntities(const char16_t * inString, uint32_t entityVersion, char16_t * *_retval) = 0;

};

  NS_DEFINE_STATIC_IID_ACCESSOR(nsIEntityConverter, NS_IENTITYCONVERTER_IID)

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIENTITYCONVERTER \
  NS_IMETHOD ConvertUTF32ToEntity(uint32_t character, uint32_t entityVersion, char * *_retval) override; \
  NS_IMETHOD ConvertToEntity(char16_t character, uint32_t entityVersion, char * *_retval) override; \
  NS_IMETHOD ConvertToEntities(const char16_t * inString, uint32_t entityVersion, char16_t * *_retval) override; 

/* Use this macro when declaring the members of this interface when the
   class doesn't implement the interface. This is useful for forwarding. */
#define NS_DECL_NON_VIRTUAL_NSIENTITYCONVERTER \
  nsresult ConvertUTF32ToEntity(uint32_t character, uint32_t entityVersion, char * *_retval); \
  nsresult ConvertToEntity(char16_t character, uint32_t entityVersion, char * *_retval); \
  nsresult ConvertToEntities(const char16_t * inString, uint32_t entityVersion, char16_t * *_retval); 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIENTITYCONVERTER(_to) \
  NS_IMETHOD ConvertUTF32ToEntity(uint32_t character, uint32_t entityVersion, char * *_retval) override { return _to ConvertUTF32ToEntity(character, entityVersion, _retval); } \
  NS_IMETHOD ConvertToEntity(char16_t character, uint32_t entityVersion, char * *_retval) override { return _to ConvertToEntity(character, entityVersion, _retval); } \
  NS_IMETHOD ConvertToEntities(const char16_t * inString, uint32_t entityVersion, char16_t * *_retval) override { return _to ConvertToEntities(inString, entityVersion, _retval); } 

/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSIENTITYCONVERTER(_to) \
  NS_IMETHOD ConvertUTF32ToEntity(uint32_t character, uint32_t entityVersion, char * *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->ConvertUTF32ToEntity(character, entityVersion, _retval); } \
  NS_IMETHOD ConvertToEntity(char16_t character, uint32_t entityVersion, char * *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->ConvertToEntity(character, entityVersion, _retval); } \
  NS_IMETHOD ConvertToEntities(const char16_t * inString, uint32_t entityVersion, char16_t * *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->ConvertToEntities(inString, entityVersion, _retval); } 

#if 0
/* Use the code below as a template for the implementation class for this interface. */

/* Header file */
class nsEntityConverter : public nsIEntityConverter
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_NSIENTITYCONVERTER

  nsEntityConverter();

private:
  ~nsEntityConverter();

protected:
  /* additional members */
};

/* Implementation file */
NS_IMPL_ISUPPORTS(nsEntityConverter, nsIEntityConverter)

nsEntityConverter::nsEntityConverter()
{
  /* member initializers and constructor code */
}

nsEntityConverter::~nsEntityConverter()
{
  /* destructor code */
}

/* string ConvertUTF32ToEntity (in unsigned long character, in unsigned long entityVersion); */
NS_IMETHODIMP nsEntityConverter::ConvertUTF32ToEntity(uint32_t character, uint32_t entityVersion, char * *_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* string ConvertToEntity (in wchar character, in unsigned long entityVersion); */
NS_IMETHODIMP nsEntityConverter::ConvertToEntity(char16_t character, uint32_t entityVersion, char * *_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* wstring ConvertToEntities (in wstring inString, in unsigned long entityVersion); */
NS_IMETHODIMP nsEntityConverter::ConvertToEntities(const char16_t * inString, uint32_t entityVersion, char16_t * *_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* End of implementation class template. */
#endif


#endif /* __gen_nsIEntityConverter_h__ */