PageRenderTime 29ms CodeModel.GetById 20ms RepoModel.GetById 1ms app.codeStats 0ms

/gecko_api/include/nsIDOMStorageItem.h

http://firefox-mac-pdf.googlecode.com/
C Header | 132 lines | 72 code | 28 blank | 32 comment | 0 complexity | a2d1eb3123935831a5b95c04e13f7256 MD5 | raw file
  1. /*
  2. * DO NOT EDIT. THIS FILE IS GENERATED FROM /builds/tinderbox/XR-Trunk/Darwin_8.8.4_Depend/mozilla/dom/public/idl/storage/nsIDOMStorageItem.idl
  3. */
  4. #ifndef __gen_nsIDOMStorageItem_h__
  5. #define __gen_nsIDOMStorageItem_h__
  6. #ifndef __gen_domstubs_h__
  7. #include "domstubs.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: nsIDOMStorageItem */
  14. #define NS_IDOMSTORAGEITEM_IID_STR "0cc37c78-4c5f-48e1-adfc-7480b8fe9dc4"
  15. #define NS_IDOMSTORAGEITEM_IID \
  16. {0x0cc37c78, 0x4c5f, 0x48e1, \
  17. { 0xad, 0xfc, 0x74, 0x80, 0xb8, 0xfe, 0x9d, 0xc4 }}
  18. /**
  19. * Interface for a client side storage item. See
  20. * http://www.whatwg.org/specs/web-apps/current-work/#scs-client-side
  21. * for more information.
  22. *
  23. * A respresentation of a storage object item.
  24. */
  25. class NS_NO_VTABLE NS_SCRIPTABLE nsIDOMStorageItem : public nsISupports {
  26. public:
  27. NS_DECLARE_STATIC_IID_ACCESSOR(NS_IDOMSTORAGEITEM_IID)
  28. /**
  29. * Indicates whether a key is available only in a secure context.
  30. */
  31. /* attribute boolean secure; */
  32. NS_SCRIPTABLE NS_IMETHOD GetSecure(PRBool *aSecure) = 0;
  33. NS_SCRIPTABLE NS_IMETHOD SetSecure(PRBool aSecure) = 0;
  34. /**
  35. * The value associated with the item.
  36. */
  37. /* attribute DOMString value; */
  38. NS_SCRIPTABLE NS_IMETHOD GetValue(nsAString & aValue) = 0;
  39. NS_SCRIPTABLE NS_IMETHOD SetValue(const nsAString & aValue) = 0;
  40. };
  41. NS_DEFINE_STATIC_IID_ACCESSOR(nsIDOMStorageItem, NS_IDOMSTORAGEITEM_IID)
  42. /* Use this macro when declaring classes that implement this interface. */
  43. #define NS_DECL_NSIDOMSTORAGEITEM \
  44. NS_SCRIPTABLE NS_IMETHOD GetSecure(PRBool *aSecure); \
  45. NS_SCRIPTABLE NS_IMETHOD SetSecure(PRBool aSecure); \
  46. NS_SCRIPTABLE NS_IMETHOD GetValue(nsAString & aValue); \
  47. NS_SCRIPTABLE NS_IMETHOD SetValue(const nsAString & aValue);
  48. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  49. #define NS_FORWARD_NSIDOMSTORAGEITEM(_to) \
  50. NS_SCRIPTABLE NS_IMETHOD GetSecure(PRBool *aSecure) { return _to GetSecure(aSecure); } \
  51. NS_SCRIPTABLE NS_IMETHOD SetSecure(PRBool aSecure) { return _to SetSecure(aSecure); } \
  52. NS_SCRIPTABLE NS_IMETHOD GetValue(nsAString & aValue) { return _to GetValue(aValue); } \
  53. NS_SCRIPTABLE NS_IMETHOD SetValue(const nsAString & aValue) { return _to SetValue(aValue); }
  54. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  55. #define NS_FORWARD_SAFE_NSIDOMSTORAGEITEM(_to) \
  56. NS_SCRIPTABLE NS_IMETHOD GetSecure(PRBool *aSecure) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetSecure(aSecure); } \
  57. NS_SCRIPTABLE NS_IMETHOD SetSecure(PRBool aSecure) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetSecure(aSecure); } \
  58. NS_SCRIPTABLE NS_IMETHOD GetValue(nsAString & aValue) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetValue(aValue); } \
  59. NS_SCRIPTABLE NS_IMETHOD SetValue(const nsAString & aValue) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetValue(aValue); }
  60. #if 0
  61. /* Use the code below as a template for the implementation class for this interface. */
  62. /* Header file */
  63. class nsDOMStorageItem : public nsIDOMStorageItem
  64. {
  65. public:
  66. NS_DECL_ISUPPORTS
  67. NS_DECL_NSIDOMSTORAGEITEM
  68. nsDOMStorageItem();
  69. private:
  70. ~nsDOMStorageItem();
  71. protected:
  72. /* additional members */
  73. };
  74. /* Implementation file */
  75. NS_IMPL_ISUPPORTS1(nsDOMStorageItem, nsIDOMStorageItem)
  76. nsDOMStorageItem::nsDOMStorageItem()
  77. {
  78. /* member initializers and constructor code */
  79. }
  80. nsDOMStorageItem::~nsDOMStorageItem()
  81. {
  82. /* destructor code */
  83. }
  84. /* attribute boolean secure; */
  85. NS_IMETHODIMP nsDOMStorageItem::GetSecure(PRBool *aSecure)
  86. {
  87. return NS_ERROR_NOT_IMPLEMENTED;
  88. }
  89. NS_IMETHODIMP nsDOMStorageItem::SetSecure(PRBool aSecure)
  90. {
  91. return NS_ERROR_NOT_IMPLEMENTED;
  92. }
  93. /* attribute DOMString value; */
  94. NS_IMETHODIMP nsDOMStorageItem::GetValue(nsAString & aValue)
  95. {
  96. return NS_ERROR_NOT_IMPLEMENTED;
  97. }
  98. NS_IMETHODIMP nsDOMStorageItem::SetValue(const nsAString & aValue)
  99. {
  100. return NS_ERROR_NOT_IMPLEMENTED;
  101. }
  102. /* End of implementation class template. */
  103. #endif
  104. #endif /* __gen_nsIDOMStorageItem_h__ */