dom/file/nsIFileStorage.h

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/dom/file/nsIFileStorage.h	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,57 @@
     1.4 +/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
     1.5 +/* vim: set ts=2 et sw=2 tw=80: */
     1.6 +/* This Source Code Form is subject to the terms of the Mozilla Public
     1.7 + * License, v. 2.0. If a copy of the MPL was not distributed with this file,
     1.8 + * You can obtain one at http://mozilla.org/MPL/2.0/. */
     1.9 +
    1.10 +#ifndef nsIFileStorage_h__
    1.11 +#define nsIFileStorage_h__
    1.12 +
    1.13 +#include "nsISupports.h"
    1.14 +
    1.15 +#define NS_FILESTORAGE_IID \
    1.16 +  {0x6278f453, 0xd557, 0x4a55, \
    1.17 +  { 0x99, 0x3e, 0xf4, 0x69, 0xe2, 0xa5, 0xe1, 0xd0 } }
    1.18 +
    1.19 +class nsIFileStorage : public nsISupports
    1.20 +{
    1.21 +public:
    1.22 +  NS_DECLARE_STATIC_IID_ACCESSOR(NS_FILESTORAGE_IID)
    1.23 +
    1.24 +  NS_IMETHOD_(const nsACString&)
    1.25 +  Id() = 0;
    1.26 +
    1.27 +  // Whether or not the storage has been invalidated. If it has then no further
    1.28 +  // operations for this storage will be allowed to run.
    1.29 +  NS_IMETHOD_(bool)
    1.30 +  IsInvalidated() = 0;
    1.31 +
    1.32 +  NS_IMETHOD_(bool)
    1.33 +  IsShuttingDown() = 0;
    1.34 +
    1.35 +  NS_IMETHOD_(void)
    1.36 +  SetThreadLocals() = 0;
    1.37 +
    1.38 +  NS_IMETHOD_(void)
    1.39 +  UnsetThreadLocals() = 0;
    1.40 +};
    1.41 +
    1.42 +NS_DEFINE_STATIC_IID_ACCESSOR(nsIFileStorage, NS_FILESTORAGE_IID)
    1.43 +
    1.44 +#define NS_DECL_NSIFILESTORAGE                                                 \
    1.45 +  NS_IMETHOD_(const nsACString&)                                               \
    1.46 +  Id() MOZ_OVERRIDE;                                                           \
    1.47 +                                                                               \
    1.48 +  NS_IMETHOD_(bool)                                                            \
    1.49 +  IsInvalidated() MOZ_OVERRIDE;                                                \
    1.50 +                                                                               \
    1.51 +  NS_IMETHOD_(bool)                                                            \
    1.52 +  IsShuttingDown() MOZ_OVERRIDE;                                               \
    1.53 +                                                                               \
    1.54 +  NS_IMETHOD_(void)                                                            \
    1.55 +  SetThreadLocals() MOZ_OVERRIDE;                                              \
    1.56 +                                                                               \
    1.57 +  NS_IMETHOD_(void)                                                            \
    1.58 +  UnsetThreadLocals() MOZ_OVERRIDE;
    1.59 +
    1.60 +#endif // nsIFileStorage_h__

mercurial