Line data Source code
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 "js/RootingAPI.h"
7 : #include "jspubtd.h"
8 : #include "mozilla/ErrorResult.h"
9 : #include "mozilla/dom/BindingDeclarations.h"
10 : #include "mozilla/dom/Nullable.h"
11 :
12 : namespace mozilla {
13 : namespace dom {
14 :
15 : struct NativeOSFileReadOptionsAtoms;
16 : struct NativePropertyHooks;
17 : class ProtoAndIfaceCache;
18 :
19 : } // namespace dom
20 : } // namespace mozilla
21 :
22 : namespace mozilla {
23 : namespace dom {
24 :
25 3 : struct NativeOSFileReadOptions : public DictionaryBase
26 : {
27 : MOZ_INIT_OUTSIDE_CTOR Optional<Nullable<uint64_t>> mBytes;
28 : MOZ_INIT_OUTSIDE_CTOR Optional<nsString> mEncoding;
29 :
30 : NativeOSFileReadOptions();
31 :
32 : explicit inline NativeOSFileReadOptions(const FastDictionaryInitializer& )
33 : {
34 : // Do nothing here; this is used by our "Fast" subclass
35 : }
36 :
37 : explicit inline NativeOSFileReadOptions(const NativeOSFileReadOptions& aOther)
38 : {
39 : *this = aOther;
40 : }
41 :
42 : bool
43 : Init(JSContext* cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false);
44 :
45 : bool
46 : Init(const nsAString& aJSON);
47 :
48 : bool
49 : ToObjectInternal(JSContext* cx, JS::MutableHandle<JS::Value> rval) const;
50 :
51 : bool
52 : ToJSON(nsAString& aJSON) const;
53 :
54 : void
55 : TraceDictionary(JSTracer* trc);
56 :
57 : NativeOSFileReadOptions&
58 : operator=(const NativeOSFileReadOptions& aOther);
59 :
60 : private:
61 : static bool
62 : InitIds(JSContext* cx, NativeOSFileReadOptionsAtoms* atomsCache);
63 : };
64 :
65 : namespace binding_detail {
66 : struct FastNativeOSFileReadOptions : public NativeOSFileReadOptions
67 : {
68 : inline FastNativeOSFileReadOptions()
69 : : NativeOSFileReadOptions(FastDictionaryInitializer())
70 : {
71 : // Doesn't matter what int we pass to the parent constructor
72 : }
73 : };
74 : } // namespace binding_detail
75 :
76 :
77 : } // namespace dom
78 : } // namespace mozilla
79 :
80 : #endif // mozilla_dom_NativeOSFileInternalsBinding_h
|