PageRenderTime 83ms CodeModel.GetById 40ms app.highlight 3ms RepoModel.GetById 37ms 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
  5#ifndef __gen_nsIDOMStorageItem_h__
  6#define __gen_nsIDOMStorageItem_h__
  7
  8
  9#ifndef __gen_domstubs_h__
 10#include "domstubs.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:    nsIDOMStorageItem */
 19#define NS_IDOMSTORAGEITEM_IID_STR "0cc37c78-4c5f-48e1-adfc-7480b8fe9dc4"
 20
 21#define NS_IDOMSTORAGEITEM_IID \
 22  {0x0cc37c78, 0x4c5f, 0x48e1, \
 23    { 0xad, 0xfc, 0x74, 0x80, 0xb8, 0xfe, 0x9d, 0xc4 }}
 24
 25/**
 26 * Interface for a client side storage item. See
 27 * http://www.whatwg.org/specs/web-apps/current-work/#scs-client-side
 28 * for more information.
 29 *
 30 * A respresentation of a storage object item.
 31 */
 32class NS_NO_VTABLE NS_SCRIPTABLE nsIDOMStorageItem : public nsISupports {
 33 public: 
 34
 35  NS_DECLARE_STATIC_IID_ACCESSOR(NS_IDOMSTORAGEITEM_IID)
 36
 37  /**
 38   * Indicates whether a key is available only in a secure context.
 39   */
 40  /* attribute boolean secure; */
 41  NS_SCRIPTABLE NS_IMETHOD GetSecure(PRBool *aSecure) = 0;
 42  NS_SCRIPTABLE NS_IMETHOD SetSecure(PRBool aSecure) = 0;
 43
 44  /**
 45   * The value associated with the item.
 46   */
 47  /* attribute DOMString value; */
 48  NS_SCRIPTABLE NS_IMETHOD GetValue(nsAString & aValue) = 0;
 49  NS_SCRIPTABLE NS_IMETHOD SetValue(const nsAString & aValue) = 0;
 50
 51};
 52
 53  NS_DEFINE_STATIC_IID_ACCESSOR(nsIDOMStorageItem, NS_IDOMSTORAGEITEM_IID)
 54
 55/* Use this macro when declaring classes that implement this interface. */
 56#define NS_DECL_NSIDOMSTORAGEITEM \
 57  NS_SCRIPTABLE NS_IMETHOD GetSecure(PRBool *aSecure); \
 58  NS_SCRIPTABLE NS_IMETHOD SetSecure(PRBool aSecure); \
 59  NS_SCRIPTABLE NS_IMETHOD GetValue(nsAString & aValue); \
 60  NS_SCRIPTABLE NS_IMETHOD SetValue(const nsAString & aValue); 
 61
 62/* Use this macro to declare functions that forward the behavior of this interface to another object. */
 63#define NS_FORWARD_NSIDOMSTORAGEITEM(_to) \
 64  NS_SCRIPTABLE NS_IMETHOD GetSecure(PRBool *aSecure) { return _to GetSecure(aSecure); } \
 65  NS_SCRIPTABLE NS_IMETHOD SetSecure(PRBool aSecure) { return _to SetSecure(aSecure); } \
 66  NS_SCRIPTABLE NS_IMETHOD GetValue(nsAString & aValue) { return _to GetValue(aValue); } \
 67  NS_SCRIPTABLE NS_IMETHOD SetValue(const nsAString & aValue) { return _to SetValue(aValue); } 
 68
 69/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
 70#define NS_FORWARD_SAFE_NSIDOMSTORAGEITEM(_to) \
 71  NS_SCRIPTABLE NS_IMETHOD GetSecure(PRBool *aSecure) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetSecure(aSecure); } \
 72  NS_SCRIPTABLE NS_IMETHOD SetSecure(PRBool aSecure) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetSecure(aSecure); } \
 73  NS_SCRIPTABLE NS_IMETHOD GetValue(nsAString & aValue) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetValue(aValue); } \
 74  NS_SCRIPTABLE NS_IMETHOD SetValue(const nsAString & aValue) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetValue(aValue); } 
 75
 76#if 0
 77/* Use the code below as a template for the implementation class for this interface. */
 78
 79/* Header file */
 80class nsDOMStorageItem : public nsIDOMStorageItem
 81{
 82public:
 83  NS_DECL_ISUPPORTS
 84  NS_DECL_NSIDOMSTORAGEITEM
 85
 86  nsDOMStorageItem();
 87
 88private:
 89  ~nsDOMStorageItem();
 90
 91protected:
 92  /* additional members */
 93};
 94
 95/* Implementation file */
 96NS_IMPL_ISUPPORTS1(nsDOMStorageItem, nsIDOMStorageItem)
 97
 98nsDOMStorageItem::nsDOMStorageItem()
 99{
100  /* member initializers and constructor code */
101}
102
103nsDOMStorageItem::~nsDOMStorageItem()
104{
105  /* destructor code */
106}
107
108/* attribute boolean secure; */
109NS_IMETHODIMP nsDOMStorageItem::GetSecure(PRBool *aSecure)
110{
111    return NS_ERROR_NOT_IMPLEMENTED;
112}
113NS_IMETHODIMP nsDOMStorageItem::SetSecure(PRBool aSecure)
114{
115    return NS_ERROR_NOT_IMPLEMENTED;
116}
117
118/* attribute DOMString value; */
119NS_IMETHODIMP nsDOMStorageItem::GetValue(nsAString & aValue)
120{
121    return NS_ERROR_NOT_IMPLEMENTED;
122}
123NS_IMETHODIMP nsDOMStorageItem::SetValue(const nsAString & aValue)
124{
125    return NS_ERROR_NOT_IMPLEMENTED;
126}
127
128/* End of implementation class template. */
129#endif
130
131
132#endif /* __gen_nsIDOMStorageItem_h__ */