/* THIS FILE IS AUTOGENERATED FROM NetworkOptions.webidl BY Codegen.py - DO NOT EDIT */

#ifndef mozilla_dom_NetworkOptionsBinding_h
#define mozilla_dom_NetworkOptionsBinding_h

#include "js/RootingAPI.h"
#include "jspubtd.h"
#include "mozilla/ErrorResult.h"
#include "mozilla/dom/BindingDeclarations.h"
#include "mozilla/dom/Nullable.h"

namespace mozilla {
namespace dom {

struct NativePropertyHooks;
struct NetworkCommandOptionsAtoms;
struct NetworkResultOptionsAtoms;
class ProtoAndIfaceCache;

} // namespace dom
} // namespace mozilla

namespace mozilla {
namespace dom {

struct NetworkCommandOptions : public DictionaryBase
{
  MOZ_INIT_OUTSIDE_CTOR nsString mCmd;
  MOZ_INIT_OUTSIDE_CTOR Optional<nsString> mCurExternalIfname;
  MOZ_INIT_OUTSIDE_CTOR Optional<nsString> mCurInternalIfname;
  MOZ_INIT_OUTSIDE_CTOR Optional<nsString> mDns1;
  MOZ_INIT_OUTSIDE_CTOR Optional<int32_t> mDns1_long;
  MOZ_INIT_OUTSIDE_CTOR Optional<nsString> mDns2;
  MOZ_INIT_OUTSIDE_CTOR Optional<int32_t> mDns2_long;
  MOZ_INIT_OUTSIDE_CTOR Optional<Sequence<nsString>> mDnses;
  MOZ_INIT_OUTSIDE_CTOR Optional<nsString> mDomain;
  MOZ_INIT_OUTSIDE_CTOR Optional<bool> mEnable;
  MOZ_INIT_OUTSIDE_CTOR Optional<bool> mEnabled;
  MOZ_INIT_OUTSIDE_CTOR Optional<nsString> mEndIp;
  MOZ_INIT_OUTSIDE_CTOR Optional<nsString> mExternalIfname;
  MOZ_INIT_OUTSIDE_CTOR Optional<nsString> mGateway;
  MOZ_INIT_OUTSIDE_CTOR Optional<int32_t> mGateway_long;
  MOZ_INIT_OUTSIDE_CTOR Optional<Sequence<nsString>> mGateways;
  MOZ_INIT_OUTSIDE_CTOR int32_t mId;
  MOZ_INIT_OUTSIDE_CTOR Optional<nsString> mIfname;
  MOZ_INIT_OUTSIDE_CTOR Optional<Sequence<nsString>> mInterfaceList;
  MOZ_INIT_OUTSIDE_CTOR Optional<nsString> mInternalIfname;
  MOZ_INIT_OUTSIDE_CTOR Optional<nsString> mIp;
  MOZ_INIT_OUTSIDE_CTOR Optional<int32_t> mIpaddr;
  MOZ_INIT_OUTSIDE_CTOR Optional<nsString> mKey;
  MOZ_INIT_OUTSIDE_CTOR Optional<nsString> mLink;
  MOZ_INIT_OUTSIDE_CTOR Optional<int32_t> mMask;
  MOZ_INIT_OUTSIDE_CTOR Optional<nsString> mMaskLength;
  MOZ_INIT_OUTSIDE_CTOR Optional<nsString> mMode;
  MOZ_INIT_OUTSIDE_CTOR Optional<int32_t> mMtu;
  MOZ_INIT_OUTSIDE_CTOR Optional<nsString> mPreExternalIfname;
  MOZ_INIT_OUTSIDE_CTOR Optional<nsString> mPreInternalIfname;
  MOZ_INIT_OUTSIDE_CTOR Optional<nsString> mPrefix;
  MOZ_INIT_OUTSIDE_CTOR Optional<uint32_t> mPrefixLength;
  MOZ_INIT_OUTSIDE_CTOR Optional<bool> mReport;
  MOZ_INIT_OUTSIDE_CTOR Optional<nsString> mSecurity;
  MOZ_INIT_OUTSIDE_CTOR Optional<nsString> mServerIp;
  MOZ_INIT_OUTSIDE_CTOR Optional<nsString> mSsid;
  MOZ_INIT_OUTSIDE_CTOR Optional<nsString> mStartIp;
  MOZ_INIT_OUTSIDE_CTOR Optional<int64_t> mThreshold;
  MOZ_INIT_OUTSIDE_CTOR Optional<nsString> mUsbEndIp;
  MOZ_INIT_OUTSIDE_CTOR Optional<nsString> mUsbStartIp;
  MOZ_INIT_OUTSIDE_CTOR Optional<nsString> mWifiEndIp;
  MOZ_INIT_OUTSIDE_CTOR Optional<nsString> mWifiStartIp;
  MOZ_INIT_OUTSIDE_CTOR Optional<nsString> mWifictrlinterfacename;

  NetworkCommandOptions();

  explicit inline NetworkCommandOptions(const FastDictionaryInitializer& )
  {
    // Do nothing here; this is used by our "Fast" subclass
  }

  explicit inline NetworkCommandOptions(const NetworkCommandOptions& aOther)
  {
    *this = aOther;
  }

  bool
  Init(JSContext* cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false);

  bool
  Init(const nsAString& aJSON);

  bool
  ToObjectInternal(JSContext* cx, JS::MutableHandle<JS::Value> rval) const;

  bool
  ToJSON(nsAString& aJSON) const;

  void
  TraceDictionary(JSTracer* trc);

  void
  operator=(const NetworkCommandOptions& aOther);

private:
  static bool
  InitIds(JSContext* cx, NetworkCommandOptionsAtoms* atomsCache);
};

namespace binding_detail {
struct FastNetworkCommandOptions : public NetworkCommandOptions
{
  inline FastNetworkCommandOptions()
    : NetworkCommandOptions(FastDictionaryInitializer())
  {
    // Doesn't matter what int we pass to the parent constructor
  }
};
} // namespace binding_detail


struct NetworkResultOptions : public DictionaryBase
{
  MOZ_INIT_OUTSIDE_CTOR bool mBroadcast;
  MOZ_INIT_OUTSIDE_CTOR nsString mCurExternalIfname;
  MOZ_INIT_OUTSIDE_CTOR nsString mCurInternalIfname;
  MOZ_INIT_OUTSIDE_CTOR int32_t mDns1;
  MOZ_INIT_OUTSIDE_CTOR nsString mDns1_str;
  MOZ_INIT_OUTSIDE_CTOR int32_t mDns2;
  MOZ_INIT_OUTSIDE_CTOR nsString mDns2_str;
  MOZ_INIT_OUTSIDE_CTOR bool mEnable;
  MOZ_INIT_OUTSIDE_CTOR bool mError;
  MOZ_INIT_OUTSIDE_CTOR nsString mFlag;
  MOZ_INIT_OUTSIDE_CTOR int32_t mGateway;
  MOZ_INIT_OUTSIDE_CTOR nsString mGateway_str;
  MOZ_INIT_OUTSIDE_CTOR int32_t mId;
  MOZ_INIT_OUTSIDE_CTOR Optional<Sequence<nsString>> mInterfaceList;
  MOZ_INIT_OUTSIDE_CTOR nsString mIpAddr;
  MOZ_INIT_OUTSIDE_CTOR int32_t mIpaddr;
  MOZ_INIT_OUTSIDE_CTOR nsString mIpaddr_str;
  MOZ_INIT_OUTSIDE_CTOR int32_t mLease;
  MOZ_INIT_OUTSIDE_CTOR nsString mMacAddr;
  MOZ_INIT_OUTSIDE_CTOR int32_t mMask;
  MOZ_INIT_OUTSIDE_CTOR nsString mMask_str;
  MOZ_INIT_OUTSIDE_CTOR nsString mNetId;
  MOZ_INIT_OUTSIDE_CTOR int32_t mPrefixLength;
  MOZ_INIT_OUTSIDE_CTOR nsString mReason;
  MOZ_INIT_OUTSIDE_CTOR nsString mReply;
  MOZ_INIT_OUTSIDE_CTOR bool mResult;
  MOZ_INIT_OUTSIDE_CTOR int32_t mResultCode;
  MOZ_INIT_OUTSIDE_CTOR nsString mResultReason;
  MOZ_INIT_OUTSIDE_CTOR bool mRet;
  MOZ_INIT_OUTSIDE_CTOR nsString mRoute;
  MOZ_INIT_OUTSIDE_CTOR int32_t mServer;
  MOZ_INIT_OUTSIDE_CTOR nsString mServer_str;
  MOZ_INIT_OUTSIDE_CTOR bool mSuccess;
  MOZ_INIT_OUTSIDE_CTOR nsString mTopic;
  MOZ_INIT_OUTSIDE_CTOR nsString mVendor_str;

  NetworkResultOptions();

  explicit inline NetworkResultOptions(const FastDictionaryInitializer& )
  {
    // Do nothing here; this is used by our "Fast" subclass
  }

  explicit inline NetworkResultOptions(const NetworkResultOptions& aOther)
  {
    *this = aOther;
  }

  bool
  Init(JSContext* cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false);

  bool
  Init(const nsAString& aJSON);

  bool
  ToObjectInternal(JSContext* cx, JS::MutableHandle<JS::Value> rval) const;

  bool
  ToJSON(nsAString& aJSON) const;

  void
  TraceDictionary(JSTracer* trc);

  void
  operator=(const NetworkResultOptions& aOther);

private:
  static bool
  InitIds(JSContext* cx, NetworkResultOptionsAtoms* atomsCache);
};

namespace binding_detail {
struct FastNetworkResultOptions : public NetworkResultOptions
{
  inline FastNetworkResultOptions()
    : NetworkResultOptions(FastDictionaryInitializer())
  {
    // Doesn't matter what int we pass to the parent constructor
  }
};
} // namespace binding_detail


} // namespace dom
} // namespace mozilla

#endif // mozilla_dom_NetworkOptionsBinding_h
