/* 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<int32_t> mDns1_long;
  Optional<nsString> mDns2;
  Optional<int32_t> mDns2_long;
  Optional<Sequence<nsString>> mDnses;
  Optional<nsString> mDomain;
  Optional<bool> mEnable;
  Optional<bool> mEnabled;
  Optional<nsString> mEndIp;
  Optional<nsString> mExternalIfname;
  Optional<nsString> mGateway;
  Optional<int32_t> mGateway_long;
  Optional<Sequence<nsString>> mGateways;
  int32_t mId;
  Optional<nsString> mIfname;
  Optional<Sequence<nsString>> mInterfaceList;
  Optional<nsString> mInternalIfname;
  Optional<nsString> mIp;
  Optional<int32_t> mIpaddr;
  Optional<nsString> mKey;
  Optional<nsString> mLink;
  Optional<int32_t> mMask;
  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 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
{
  bool mBroadcast;
  nsString mCurExternalIfname;
  nsString mCurInternalIfname;
  int32_t mDns1;
  nsString mDns1_str;
  int32_t mDns2;
  nsString mDns2_str;
  bool mEnable;
  bool mError;
  int32_t mGateway;
  nsString mGateway_str;
  int32_t mId;
  int32_t mIpaddr;
  nsString mIpaddr_str;
  int32_t mLease;
  int32_t mMask;
  nsString mMask_str;
  nsString mNetId;
  nsString mReason;
  nsString mReply;
  bool mResult;
  int32_t mResultCode;
  nsString mResultReason;
  bool mRet;
  nsString mRoute;
  int32_t mServer;
  nsString mServer_str;
  bool mSuccess;
  nsString mTopic;
  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
