PageRenderTime 39ms CodeModel.GetById 21ms RepoModel.GetById 1ms app.codeStats 0ms

/gecko_api/include/nsIPrefLocalizedString.h

http://firefox-mac-pdf.googlecode.com/
C Header | 169 lines | 81 code | 30 blank | 58 comment | 0 complexity | 19fdb256a14674970cc94ed394f92305 MD5 | raw file
  1. /*
  2. * DO NOT EDIT. THIS FILE IS GENERATED FROM /builds/tinderbox/XR-Trunk/Darwin_8.8.4_Depend/mozilla/modules/libpref/public/nsIPrefLocalizedString.idl
  3. */
  4. #ifndef __gen_nsIPrefLocalizedString_h__
  5. #define __gen_nsIPrefLocalizedString_h__
  6. #ifndef __gen_nsISupports_h__
  7. #include "nsISupports.h"
  8. #endif
  9. /* For IDL files that don't want to include root IDL files. */
  10. #ifndef NS_NO_VTABLE
  11. #define NS_NO_VTABLE
  12. #endif
  13. /* starting interface: nsIPrefLocalizedString */
  14. #define NS_IPREFLOCALIZEDSTRING_IID_STR "ae419e24-1dd1-11b2-b39a-d3e5e7073802"
  15. #define NS_IPREFLOCALIZEDSTRING_IID \
  16. {0xae419e24, 0x1dd1, 0x11b2, \
  17. { 0xb3, 0x9a, 0xd3, 0xe5, 0xe7, 0x07, 0x38, 0x02 }}
  18. /**
  19. * The nsIPrefLocalizedString interface is simply a wrapper interface for
  20. * nsISupportsString so the preferences service can have a unique identifier
  21. * to distinguish between requests for normal wide strings (nsISupportsString)
  22. * and "localized" wide strings, which get their default values from properites
  23. * files.
  24. *
  25. * @see nsIPrefBranch
  26. * @see nsISupportsString
  27. *
  28. * @status FROZEN
  29. */
  30. class NS_NO_VTABLE NS_SCRIPTABLE nsIPrefLocalizedString : public nsISupports {
  31. public:
  32. NS_DECLARE_STATIC_IID_ACCESSOR(NS_IPREFLOCALIZEDSTRING_IID)
  33. /**
  34. * Provides access to string data stored in this property.
  35. *
  36. * @return NS_OK The operation succeeded.
  37. * @return Other An error occured.
  38. */
  39. /* attribute wstring data; */
  40. NS_SCRIPTABLE NS_IMETHOD GetData(PRUnichar * *aData) = 0;
  41. NS_SCRIPTABLE NS_IMETHOD SetData(const PRUnichar * aData) = 0;
  42. /**
  43. * Used to retrieve the contents of this object into a wide string.
  44. *
  45. * @return wstring The string containing the data stored within this object.
  46. */
  47. /* wstring toString (); */
  48. NS_SCRIPTABLE NS_IMETHOD ToString(PRUnichar **_retval) = 0;
  49. /**
  50. * Used to set the contents of this object.
  51. *
  52. * @param length The length of the string. This value should not include
  53. * space for the null terminator, nor should it account for the
  54. * size of a character. It should only be the number of
  55. * characters for which there is space in the string.
  56. * @param data The string data to be stored.
  57. *
  58. * @note
  59. * This makes a copy of the string argument passed in.
  60. *
  61. * @return NS_OK The data was successfully stored.
  62. */
  63. /* void setDataWithLength (in unsigned long length, [size_is (length)] in wstring data); */
  64. NS_SCRIPTABLE NS_IMETHOD SetDataWithLength(PRUint32 length, const PRUnichar *data) = 0;
  65. };
  66. NS_DEFINE_STATIC_IID_ACCESSOR(nsIPrefLocalizedString, NS_IPREFLOCALIZEDSTRING_IID)
  67. /* Use this macro when declaring classes that implement this interface. */
  68. #define NS_DECL_NSIPREFLOCALIZEDSTRING \
  69. NS_SCRIPTABLE NS_IMETHOD GetData(PRUnichar * *aData); \
  70. NS_SCRIPTABLE NS_IMETHOD SetData(const PRUnichar * aData); \
  71. NS_SCRIPTABLE NS_IMETHOD ToString(PRUnichar **_retval); \
  72. NS_SCRIPTABLE NS_IMETHOD SetDataWithLength(PRUint32 length, const PRUnichar *data);
  73. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  74. #define NS_FORWARD_NSIPREFLOCALIZEDSTRING(_to) \
  75. NS_SCRIPTABLE NS_IMETHOD GetData(PRUnichar * *aData) { return _to GetData(aData); } \
  76. NS_SCRIPTABLE NS_IMETHOD SetData(const PRUnichar * aData) { return _to SetData(aData); } \
  77. NS_SCRIPTABLE NS_IMETHOD ToString(PRUnichar **_retval) { return _to ToString(_retval); } \
  78. NS_SCRIPTABLE NS_IMETHOD SetDataWithLength(PRUint32 length, const PRUnichar *data) { return _to SetDataWithLength(length, data); }
  79. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  80. #define NS_FORWARD_SAFE_NSIPREFLOCALIZEDSTRING(_to) \
  81. NS_SCRIPTABLE NS_IMETHOD GetData(PRUnichar * *aData) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetData(aData); } \
  82. NS_SCRIPTABLE NS_IMETHOD SetData(const PRUnichar * aData) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetData(aData); } \
  83. NS_SCRIPTABLE NS_IMETHOD ToString(PRUnichar **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->ToString(_retval); } \
  84. NS_SCRIPTABLE NS_IMETHOD SetDataWithLength(PRUint32 length, const PRUnichar *data) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetDataWithLength(length, data); }
  85. #if 0
  86. /* Use the code below as a template for the implementation class for this interface. */
  87. /* Header file */
  88. class nsPrefLocalizedString : public nsIPrefLocalizedString
  89. {
  90. public:
  91. NS_DECL_ISUPPORTS
  92. NS_DECL_NSIPREFLOCALIZEDSTRING
  93. nsPrefLocalizedString();
  94. private:
  95. ~nsPrefLocalizedString();
  96. protected:
  97. /* additional members */
  98. };
  99. /* Implementation file */
  100. NS_IMPL_ISUPPORTS1(nsPrefLocalizedString, nsIPrefLocalizedString)
  101. nsPrefLocalizedString::nsPrefLocalizedString()
  102. {
  103. /* member initializers and constructor code */
  104. }
  105. nsPrefLocalizedString::~nsPrefLocalizedString()
  106. {
  107. /* destructor code */
  108. }
  109. /* attribute wstring data; */
  110. NS_IMETHODIMP nsPrefLocalizedString::GetData(PRUnichar * *aData)
  111. {
  112. return NS_ERROR_NOT_IMPLEMENTED;
  113. }
  114. NS_IMETHODIMP nsPrefLocalizedString::SetData(const PRUnichar * aData)
  115. {
  116. return NS_ERROR_NOT_IMPLEMENTED;
  117. }
  118. /* wstring toString (); */
  119. NS_IMETHODIMP nsPrefLocalizedString::ToString(PRUnichar **_retval)
  120. {
  121. return NS_ERROR_NOT_IMPLEMENTED;
  122. }
  123. /* void setDataWithLength (in unsigned long length, [size_is (length)] in wstring data); */
  124. NS_IMETHODIMP nsPrefLocalizedString::SetDataWithLength(PRUint32 length, const PRUnichar *data)
  125. {
  126. return NS_ERROR_NOT_IMPLEMENTED;
  127. }
  128. /* End of implementation class template. */
  129. #endif
  130. #define NS_PREFLOCALIZEDSTRING_CID \
  131. { /* {064d9cee-1dd2-11b2-83e3-d25ab0193c26} */ \
  132. 0x064d9cee, \
  133. 0x1dd2, \
  134. 0x11b2, \
  135. { 0x83, 0xe3, 0xd2, 0x5a, 0xb0, 0x19, 0x3c, 0x26 } \
  136. }
  137. #define NS_PREFLOCALIZEDSTRING_CONTRACTID "@mozilla.org/pref-localizedstring;1"
  138. #define NS_PREFLOCALIZEDSTRING_CLASSNAME "Pref LocalizedString"
  139. #endif /* __gen_nsIPrefLocalizedString_h__ */