/work/obj-fuzz/dist/include/mozilla/dom/NativeOSFileInternalsBinding.h
Line | Count | Source (jump to first uncovered line) |
1 | | /* THIS FILE IS AUTOGENERATED FROM NativeOSFileInternals.webidl BY Codegen.py - DO NOT EDIT */ |
2 | | |
3 | | #ifndef mozilla_dom_NativeOSFileInternalsBinding_h |
4 | | #define mozilla_dom_NativeOSFileInternalsBinding_h |
5 | | |
6 | | #include "GeckoProfiler.h" |
7 | | #include "js/RootingAPI.h" |
8 | | #include "jspubtd.h" |
9 | | #include "mozilla/ErrorResult.h" |
10 | | #include "mozilla/dom/BindingDeclarations.h" |
11 | | #include "mozilla/dom/Nullable.h" |
12 | | |
13 | | namespace mozilla { |
14 | | namespace dom { |
15 | | |
16 | | struct NativeOSFileReadOptionsAtoms; |
17 | | struct NativeOSFileWriteAtomicOptionsAtoms; |
18 | | struct NativePropertyHooks; |
19 | | class ProtoAndIfaceCache; |
20 | | |
21 | | } // namespace dom |
22 | | } // namespace mozilla |
23 | | |
24 | | namespace mozilla { |
25 | | namespace dom { |
26 | | |
27 | | struct NativeOSFileReadOptions : public DictionaryBase |
28 | | { |
29 | | MOZ_INIT_OUTSIDE_CTOR Optional<Nullable<uint64_t>> mBytes; |
30 | | MOZ_INIT_OUTSIDE_CTOR Optional<nsString> mEncoding; |
31 | | |
32 | | NativeOSFileReadOptions(); |
33 | | |
34 | | explicit inline NativeOSFileReadOptions(const FastDictionaryInitializer& ) |
35 | 0 | { |
36 | 0 | // Do nothing here; this is used by our "Fast" subclass |
37 | 0 | } |
38 | | |
39 | | explicit inline NativeOSFileReadOptions(const NativeOSFileReadOptions& aOther) |
40 | 0 | { |
41 | 0 | *this = aOther; |
42 | 0 | } |
43 | | |
44 | | bool |
45 | | Init(JSContext* cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false); |
46 | | |
47 | | bool |
48 | | Init(const nsAString& aJSON); |
49 | | |
50 | | bool |
51 | | ToObjectInternal(JSContext* cx, JS::MutableHandle<JS::Value> rval) const; |
52 | | |
53 | | bool |
54 | | ToJSON(nsAString& aJSON) const; |
55 | | |
56 | | void |
57 | | TraceDictionary(JSTracer* trc); |
58 | | |
59 | | NativeOSFileReadOptions& |
60 | | operator=(const NativeOSFileReadOptions& aOther); |
61 | | |
62 | | private: |
63 | | static bool |
64 | | InitIds(JSContext* cx, NativeOSFileReadOptionsAtoms* atomsCache); |
65 | | }; |
66 | | |
67 | | namespace binding_detail { |
68 | | struct FastNativeOSFileReadOptions : public NativeOSFileReadOptions |
69 | | { |
70 | | inline FastNativeOSFileReadOptions() |
71 | | : NativeOSFileReadOptions(FastDictionaryInitializer()) |
72 | 0 | { |
73 | 0 | // Doesn't matter what int we pass to the parent constructor |
74 | 0 | } |
75 | | }; |
76 | | } // namespace binding_detail |
77 | | |
78 | | |
79 | | struct NativeOSFileWriteAtomicOptions : public DictionaryBase |
80 | | { |
81 | | MOZ_INIT_OUTSIDE_CTOR nsString mBackupTo; |
82 | | MOZ_INIT_OUTSIDE_CTOR Optional<Nullable<uint64_t>> mBytes; |
83 | | MOZ_INIT_OUTSIDE_CTOR bool mFlush; |
84 | | MOZ_INIT_OUTSIDE_CTOR bool mNoOverwrite; |
85 | | MOZ_INIT_OUTSIDE_CTOR nsString mTmpPath; |
86 | | |
87 | | NativeOSFileWriteAtomicOptions(); |
88 | | |
89 | | explicit inline NativeOSFileWriteAtomicOptions(const FastDictionaryInitializer& ) |
90 | 0 | { |
91 | 0 | // Do nothing here; this is used by our "Fast" subclass |
92 | 0 | } |
93 | | |
94 | | explicit inline NativeOSFileWriteAtomicOptions(const NativeOSFileWriteAtomicOptions& aOther) |
95 | 0 | { |
96 | 0 | *this = aOther; |
97 | 0 | } |
98 | | |
99 | | bool |
100 | | Init(JSContext* cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false); |
101 | | |
102 | | bool |
103 | | Init(const nsAString& aJSON); |
104 | | |
105 | | bool |
106 | | ToObjectInternal(JSContext* cx, JS::MutableHandle<JS::Value> rval) const; |
107 | | |
108 | | bool |
109 | | ToJSON(nsAString& aJSON) const; |
110 | | |
111 | | void |
112 | | TraceDictionary(JSTracer* trc); |
113 | | |
114 | | NativeOSFileWriteAtomicOptions& |
115 | | operator=(const NativeOSFileWriteAtomicOptions& aOther); |
116 | | |
117 | | private: |
118 | | static bool |
119 | | InitIds(JSContext* cx, NativeOSFileWriteAtomicOptionsAtoms* atomsCache); |
120 | | }; |
121 | | |
122 | | namespace binding_detail { |
123 | | struct FastNativeOSFileWriteAtomicOptions : public NativeOSFileWriteAtomicOptions |
124 | | { |
125 | | inline FastNativeOSFileWriteAtomicOptions() |
126 | | : NativeOSFileWriteAtomicOptions(FastDictionaryInitializer()) |
127 | 0 | { |
128 | 0 | // Doesn't matter what int we pass to the parent constructor |
129 | 0 | } |
130 | | }; |
131 | | } // namespace binding_detail |
132 | | |
133 | | |
134 | | } // namespace dom |
135 | | } // namespace mozilla |
136 | | |
137 | | #endif // mozilla_dom_NativeOSFileInternalsBinding_h |