PageRenderTime 83ms CodeModel.GetById 40ms app.highlight 4ms RepoModel.GetById 36ms app.codeStats 1ms

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