/* THIS FILE IS AUTOGENERATED - 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
{
  nsString mCmd;
  Optional<nsString> mCurExternalIfname;
  Optional<nsString> mCurInternalIfname;
  Optional<nsString> mDns1;
  Optional<nsString> mDns2;
  Optional<Sequence<nsString>> mDnses;
  Optional<nsString> mDomain;
  Optional<bool> mEnable;
  Optional<bool> mEnabled;
  Optional<nsString> mEndIp;
  Optional<nsString> mExternalIfname;
  Optional<nsString> mGateway;
  Optional<Sequence<nsString>> mGateways;
  int32_t mId;
  Optional<nsString> mIfname;
  Optional<Sequence<nsString>> mInterfaceList;
  Optional<nsString> mInternalIfname;
  Optional<nsString> mIp;
  Optional<bool> mIsAsync;
  Optional<nsString> mKey;
  Optional<nsString> mLink;
  Optional<nsString> mMaskLength;
  Optional<nsString> mMode;
  Optional<nsString> mOldIfname;
  Optional<nsString> mPreExternalIfname;
  Optional<nsString> mPreInternalIfname;
  Optional<nsString> mPrefix;
  Optional<uint32_t> mPrefixLength;
  Optional<bool> mReport;
  Optional<nsString> mSecurity;
  Optional<nsString> mServerIp;
  Optional<nsString> mSsid;
  Optional<nsString> mStartIp;
  Optional<int32_t> mThreshold;
  Optional<nsString> mUsbEndIp;
  Optional<nsString> mUsbStartIp;
  Optional<nsString> mWifiEndIp;
  Optional<nsString> mWifiStartIp;
  Optional<nsString> mWifictrlinterfacename;

  NetworkCommandOptions();

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

protected:
  explicit inline NetworkCommandOptions(int )
  {
    // Do nothing here; this is used by our "Fast" subclass
  }

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

public:
  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);

  void
  TraceDictionary(JSTracer* trc);

  void
  operator=(const NetworkCommandOptions& aOther);
};

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


struct NetworkResultOptions : public DictionaryBase
{
  bool mBroadcast;
  nsString mCurExternalIfname;
  nsString mCurInternalIfname;
  bool mEnable;
  bool mError;
  int32_t mId;
  nsString mReason;
  bool mResult;
  int32_t mResultCode;
  nsString mResultReason;
  bool mRet;
  bool mSuccess;
  nsString mTopic;

  NetworkResultOptions();

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

protected:
  explicit inline NetworkResultOptions(int )
  {
    // Do nothing here; this is used by our "Fast" subclass
  }

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

public:
  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);

  void
  TraceDictionary(JSTracer* trc);

  void
  operator=(const NetworkResultOptions& aOther);
};

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


} // namespace dom
} // namespace mozilla

#endif // mozilla_dom_NetworkOptionsBinding_h
