|
1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
|
2 /* vim: set ts=2 et sw=2 tw=80: */ |
|
3 /* This Source Code Form is subject to the terms of the Mozilla Public |
|
4 * License, v. 2.0. If a copy of the MPL was not distributed with this file, |
|
5 * You can obtain one at http://mozilla.org/MPL/2.0/. */ |
|
6 |
|
7 #ifndef nsIFileStorage_h__ |
|
8 #define nsIFileStorage_h__ |
|
9 |
|
10 #include "nsISupports.h" |
|
11 |
|
12 #define NS_FILESTORAGE_IID \ |
|
13 {0x6278f453, 0xd557, 0x4a55, \ |
|
14 { 0x99, 0x3e, 0xf4, 0x69, 0xe2, 0xa5, 0xe1, 0xd0 } } |
|
15 |
|
16 class nsIFileStorage : public nsISupports |
|
17 { |
|
18 public: |
|
19 NS_DECLARE_STATIC_IID_ACCESSOR(NS_FILESTORAGE_IID) |
|
20 |
|
21 NS_IMETHOD_(const nsACString&) |
|
22 Id() = 0; |
|
23 |
|
24 // Whether or not the storage has been invalidated. If it has then no further |
|
25 // operations for this storage will be allowed to run. |
|
26 NS_IMETHOD_(bool) |
|
27 IsInvalidated() = 0; |
|
28 |
|
29 NS_IMETHOD_(bool) |
|
30 IsShuttingDown() = 0; |
|
31 |
|
32 NS_IMETHOD_(void) |
|
33 SetThreadLocals() = 0; |
|
34 |
|
35 NS_IMETHOD_(void) |
|
36 UnsetThreadLocals() = 0; |
|
37 }; |
|
38 |
|
39 NS_DEFINE_STATIC_IID_ACCESSOR(nsIFileStorage, NS_FILESTORAGE_IID) |
|
40 |
|
41 #define NS_DECL_NSIFILESTORAGE \ |
|
42 NS_IMETHOD_(const nsACString&) \ |
|
43 Id() MOZ_OVERRIDE; \ |
|
44 \ |
|
45 NS_IMETHOD_(bool) \ |
|
46 IsInvalidated() MOZ_OVERRIDE; \ |
|
47 \ |
|
48 NS_IMETHOD_(bool) \ |
|
49 IsShuttingDown() MOZ_OVERRIDE; \ |
|
50 \ |
|
51 NS_IMETHOD_(void) \ |
|
52 SetThreadLocals() MOZ_OVERRIDE; \ |
|
53 \ |
|
54 NS_IMETHOD_(void) \ |
|
55 UnsetThreadLocals() MOZ_OVERRIDE; |
|
56 |
|
57 #endif // nsIFileStorage_h__ |