/* THIS FILE IS AUTOGENERATED FROM NetworkOptions.webidl BY Codegen.py - DO NOT EDIT */ #include #include "AtomList.h" #include "MainThreadUtils.h" #include "NetworkOptionsBinding.h" #include "js/Array.h" #include "js/CallAndConstruct.h" #include "js/Exception.h" #include "js/ForOfIterator.h" #include "js/MapAndSet.h" #include "js/Object.h" #include "js/PropertyAndElement.h" #include "js/PropertyDescriptor.h" #include "js/experimental/JitInfo.h" #include "mozilla/OwningNonNull.h" #include "mozilla/dom/BindingCallContext.h" #include "mozilla/dom/BindingUtils.h" #include "mozilla/dom/NonRefcountedDOMObject.h" #include "mozilla/dom/PrimitiveConversions.h" #include "mozilla/dom/ScriptSettings.h" #include "mozilla/dom/SimpleGlobalObject.h" namespace mozilla::dom { namespace binding_detail {}; // Just to make sure it's known as a namespace using namespace mozilla::dom::binding_detail; NetworkCommandOptions::NetworkCommandOptions() { // Safe to pass a null context if we pass a null value Init(); } bool NetworkCommandOptions::InitIds(JSContext* cx, NetworkCommandOptionsAtoms* atomsCache) { MOZ_ASSERT(reinterpret_cast(atomsCache)->isVoid()); // Initialize these in reverse order so that any failure leaves the first one // uninitialized. if (!atomsCache->wifictrlinterfacename_id.init(cx, "wifictrlinterfacename") || !atomsCache->wifiStartIp_id.init(cx, "wifiStartIp") || !atomsCache->wifiEndIp_id.init(cx, "wifiEndIp") || !atomsCache->usbStartIp_id.init(cx, "usbStartIp") || !atomsCache->usbEndIp_id.init(cx, "usbEndIp") || !atomsCache->threshold_id.init(cx, "threshold") || !atomsCache->startIp_id.init(cx, "startIp") || !atomsCache->ssid_id.init(cx, "ssid") || !atomsCache->serverIp_id.init(cx, "serverIp") || !atomsCache->security_id.init(cx, "security") || !atomsCache->report_id.init(cx, "report") || !atomsCache->prefixLength_id.init(cx, "prefixLength") || !atomsCache->prefix_id.init(cx, "prefix") || !atomsCache->preInternalIfname_id.init(cx, "preInternalIfname") || !atomsCache->preExternalIfname_id.init(cx, "preExternalIfname") || !atomsCache->mtu_id.init(cx, "mtu") || !atomsCache->mode_id.init(cx, "mode") || !atomsCache->maskLength_id.init(cx, "maskLength") || !atomsCache->mask_id.init(cx, "mask") || !atomsCache->link_id.init(cx, "link") || !atomsCache->key_id.init(cx, "key") || !atomsCache->ipaddr_id.init(cx, "ipaddr") || !atomsCache->ip_id.init(cx, "ip") || !atomsCache->internalIfname_id.init(cx, "internalIfname") || !atomsCache->interfaceList_id.init(cx, "interfaceList") || !atomsCache->ifname_id.init(cx, "ifname") || !atomsCache->id_id.init(cx, "id") || !atomsCache->gateways_id.init(cx, "gateways") || !atomsCache->gateway_long_id.init(cx, "gateway_long") || !atomsCache->gateway_id.init(cx, "gateway") || !atomsCache->externalIfname_id.init(cx, "externalIfname") || !atomsCache->endIp_id.init(cx, "endIp") || !atomsCache->enabled_id.init(cx, "enabled") || !atomsCache->enable_id.init(cx, "enable") || !atomsCache->domain_id.init(cx, "domain") || !atomsCache->dnses_id.init(cx, "dnses") || !atomsCache->dns2_long_id.init(cx, "dns2_long") || !atomsCache->dns2_id.init(cx, "dns2") || !atomsCache->dns1_long_id.init(cx, "dns1_long") || !atomsCache->dns1_id.init(cx, "dns1") || !atomsCache->curInternalIfname_id.init(cx, "curInternalIfname") || !atomsCache->curExternalIfname_id.init(cx, "curExternalIfname") || !atomsCache->cmd_id.init(cx, "cmd")) { return false; } return true; } bool NetworkCommandOptions::Init(const char* sourceDescription, bool passedToJSImpl) { { // scope for any temporaries our default value setting needs. mCmd.AssignLiteral(u""); } { // scope for any temporaries our default value setting needs. mId = 0; } return true; } void NetworkCommandOptions::TraceDictionary(JSTracer* trc) { } NetworkCommandOptions& NetworkCommandOptions::operator=(const NetworkCommandOptions& aOther) { DictionaryBase::operator=(aOther); mCmd = aOther.mCmd; mCurExternalIfname.Reset(); if (aOther.mCurExternalIfname.WasPassed()) { mCurExternalIfname.Construct(aOther.mCurExternalIfname.Value()); } mCurInternalIfname.Reset(); if (aOther.mCurInternalIfname.WasPassed()) { mCurInternalIfname.Construct(aOther.mCurInternalIfname.Value()); } mDns1.Reset(); if (aOther.mDns1.WasPassed()) { mDns1.Construct(aOther.mDns1.Value()); } mDns1_long.Reset(); if (aOther.mDns1_long.WasPassed()) { mDns1_long.Construct(aOther.mDns1_long.Value()); } mDns2.Reset(); if (aOther.mDns2.WasPassed()) { mDns2.Construct(aOther.mDns2.Value()); } mDns2_long.Reset(); if (aOther.mDns2_long.WasPassed()) { mDns2_long.Construct(aOther.mDns2_long.Value()); } mDnses.Reset(); if (aOther.mDnses.WasPassed()) { mDnses.Construct(aOther.mDnses.Value()); } mDomain.Reset(); if (aOther.mDomain.WasPassed()) { mDomain.Construct(aOther.mDomain.Value()); } mEnable.Reset(); if (aOther.mEnable.WasPassed()) { mEnable.Construct(aOther.mEnable.Value()); } mEnabled.Reset(); if (aOther.mEnabled.WasPassed()) { mEnabled.Construct(aOther.mEnabled.Value()); } mEndIp.Reset(); if (aOther.mEndIp.WasPassed()) { mEndIp.Construct(aOther.mEndIp.Value()); } mExternalIfname.Reset(); if (aOther.mExternalIfname.WasPassed()) { mExternalIfname.Construct(aOther.mExternalIfname.Value()); } mGateway.Reset(); if (aOther.mGateway.WasPassed()) { mGateway.Construct(aOther.mGateway.Value()); } mGateway_long.Reset(); if (aOther.mGateway_long.WasPassed()) { mGateway_long.Construct(aOther.mGateway_long.Value()); } mGateways.Reset(); if (aOther.mGateways.WasPassed()) { mGateways.Construct(aOther.mGateways.Value()); } mId = aOther.mId; mIfname.Reset(); if (aOther.mIfname.WasPassed()) { mIfname.Construct(aOther.mIfname.Value()); } mInterfaceList.Reset(); if (aOther.mInterfaceList.WasPassed()) { mInterfaceList.Construct(aOther.mInterfaceList.Value()); } mInternalIfname.Reset(); if (aOther.mInternalIfname.WasPassed()) { mInternalIfname.Construct(aOther.mInternalIfname.Value()); } mIp.Reset(); if (aOther.mIp.WasPassed()) { mIp.Construct(aOther.mIp.Value()); } mIpaddr.Reset(); if (aOther.mIpaddr.WasPassed()) { mIpaddr.Construct(aOther.mIpaddr.Value()); } mKey.Reset(); if (aOther.mKey.WasPassed()) { mKey.Construct(aOther.mKey.Value()); } mLink.Reset(); if (aOther.mLink.WasPassed()) { mLink.Construct(aOther.mLink.Value()); } mMask.Reset(); if (aOther.mMask.WasPassed()) { mMask.Construct(aOther.mMask.Value()); } mMaskLength.Reset(); if (aOther.mMaskLength.WasPassed()) { mMaskLength.Construct(aOther.mMaskLength.Value()); } mMode.Reset(); if (aOther.mMode.WasPassed()) { mMode.Construct(aOther.mMode.Value()); } mMtu.Reset(); if (aOther.mMtu.WasPassed()) { mMtu.Construct(aOther.mMtu.Value()); } mPreExternalIfname.Reset(); if (aOther.mPreExternalIfname.WasPassed()) { mPreExternalIfname.Construct(aOther.mPreExternalIfname.Value()); } mPreInternalIfname.Reset(); if (aOther.mPreInternalIfname.WasPassed()) { mPreInternalIfname.Construct(aOther.mPreInternalIfname.Value()); } mPrefix.Reset(); if (aOther.mPrefix.WasPassed()) { mPrefix.Construct(aOther.mPrefix.Value()); } mPrefixLength.Reset(); if (aOther.mPrefixLength.WasPassed()) { mPrefixLength.Construct(aOther.mPrefixLength.Value()); } mReport.Reset(); if (aOther.mReport.WasPassed()) { mReport.Construct(aOther.mReport.Value()); } mSecurity.Reset(); if (aOther.mSecurity.WasPassed()) { mSecurity.Construct(aOther.mSecurity.Value()); } mServerIp.Reset(); if (aOther.mServerIp.WasPassed()) { mServerIp.Construct(aOther.mServerIp.Value()); } mSsid.Reset(); if (aOther.mSsid.WasPassed()) { mSsid.Construct(aOther.mSsid.Value()); } mStartIp.Reset(); if (aOther.mStartIp.WasPassed()) { mStartIp.Construct(aOther.mStartIp.Value()); } mThreshold.Reset(); if (aOther.mThreshold.WasPassed()) { mThreshold.Construct(aOther.mThreshold.Value()); } mUsbEndIp.Reset(); if (aOther.mUsbEndIp.WasPassed()) { mUsbEndIp.Construct(aOther.mUsbEndIp.Value()); } mUsbStartIp.Reset(); if (aOther.mUsbStartIp.WasPassed()) { mUsbStartIp.Construct(aOther.mUsbStartIp.Value()); } mWifiEndIp.Reset(); if (aOther.mWifiEndIp.WasPassed()) { mWifiEndIp.Construct(aOther.mWifiEndIp.Value()); } mWifiStartIp.Reset(); if (aOther.mWifiStartIp.WasPassed()) { mWifiStartIp.Construct(aOther.mWifiStartIp.Value()); } mWifictrlinterfacename.Reset(); if (aOther.mWifictrlinterfacename.WasPassed()) { mWifictrlinterfacename.Construct(aOther.mWifictrlinterfacename.Value()); } return *this; } NetworkResultOptions::NetworkResultOptions() { // Safe to pass a null context if we pass a null value Init(); } bool NetworkResultOptions::InitIds(JSContext* cx, NetworkResultOptionsAtoms* atomsCache) { MOZ_ASSERT(reinterpret_cast(atomsCache)->isVoid()); // Initialize these in reverse order so that any failure leaves the first one // uninitialized. if (!atomsCache->vendor_str_id.init(cx, "vendor_str") || !atomsCache->topic_id.init(cx, "topic") || !atomsCache->success_id.init(cx, "success") || !atomsCache->server_str_id.init(cx, "server_str") || !atomsCache->server_id.init(cx, "server") || !atomsCache->route_id.init(cx, "route") || !atomsCache->ret_id.init(cx, "ret") || !atomsCache->resultReason_id.init(cx, "resultReason") || !atomsCache->resultCode_id.init(cx, "resultCode") || !atomsCache->result_id.init(cx, "result") || !atomsCache->reply_id.init(cx, "reply") || !atomsCache->reason_id.init(cx, "reason") || !atomsCache->prefixLength_id.init(cx, "prefixLength") || !atomsCache->netId_id.init(cx, "netId") || !atomsCache->mask_str_id.init(cx, "mask_str") || !atomsCache->mask_id.init(cx, "mask") || !atomsCache->macAddr_id.init(cx, "macAddr") || !atomsCache->lease_id.init(cx, "lease") || !atomsCache->ipaddr_str_id.init(cx, "ipaddr_str") || !atomsCache->ipaddr_id.init(cx, "ipaddr") || !atomsCache->ipAddr_id.init(cx, "ipAddr") || !atomsCache->interfaceList_id.init(cx, "interfaceList") || !atomsCache->id_id.init(cx, "id") || !atomsCache->gateway_str_id.init(cx, "gateway_str") || !atomsCache->gateway_id.init(cx, "gateway") || !atomsCache->flag_id.init(cx, "flag") || !atomsCache->error_id.init(cx, "error") || !atomsCache->enable_id.init(cx, "enable") || !atomsCache->dns2_str_id.init(cx, "dns2_str") || !atomsCache->dns2_id.init(cx, "dns2") || !atomsCache->dns1_str_id.init(cx, "dns1_str") || !atomsCache->dns1_id.init(cx, "dns1") || !atomsCache->curInternalIfname_id.init(cx, "curInternalIfname") || !atomsCache->curExternalIfname_id.init(cx, "curExternalIfname") || !atomsCache->broadcast_id.init(cx, "broadcast")) { return false; } return true; } bool NetworkResultOptions::Init(const char* sourceDescription, bool passedToJSImpl) { { // scope for any temporaries our default value setting needs. mBroadcast = false; } { // scope for any temporaries our default value setting needs. mCurExternalIfname.AssignLiteral(u""); } { // scope for any temporaries our default value setting needs. mCurInternalIfname.AssignLiteral(u""); } { // scope for any temporaries our default value setting needs. mDns1 = 0; } { // scope for any temporaries our default value setting needs. mDns1_str.AssignLiteral(u""); } { // scope for any temporaries our default value setting needs. mDns2 = 0; } { // scope for any temporaries our default value setting needs. mDns2_str.AssignLiteral(u""); } { // scope for any temporaries our default value setting needs. mEnable = false; } { // scope for any temporaries our default value setting needs. mError = false; } { // scope for any temporaries our default value setting needs. mFlag.AssignLiteral(u"down"); } { // scope for any temporaries our default value setting needs. mGateway = 0; } { // scope for any temporaries our default value setting needs. mGateway_str.AssignLiteral(u""); } { // scope for any temporaries our default value setting needs. mId = 0; } { // scope for any temporaries our default value setting needs. mIpAddr.AssignLiteral(u""); } { // scope for any temporaries our default value setting needs. mIpaddr = 0; } { // scope for any temporaries our default value setting needs. mIpaddr_str.AssignLiteral(u""); } { // scope for any temporaries our default value setting needs. mLease = 0; } { // scope for any temporaries our default value setting needs. mMacAddr.AssignLiteral(u""); } { // scope for any temporaries our default value setting needs. mMask = 0; } { // scope for any temporaries our default value setting needs. mMask_str.AssignLiteral(u""); } { // scope for any temporaries our default value setting needs. mNetId.AssignLiteral(u""); } { // scope for any temporaries our default value setting needs. mPrefixLength = 0; } { // scope for any temporaries our default value setting needs. mReason.AssignLiteral(u""); } { // scope for any temporaries our default value setting needs. mReply.AssignLiteral(u""); } { // scope for any temporaries our default value setting needs. mResult = false; } { // scope for any temporaries our default value setting needs. mResultCode = 0; } { // scope for any temporaries our default value setting needs. mResultReason.AssignLiteral(u""); } { // scope for any temporaries our default value setting needs. mRet = false; } { // scope for any temporaries our default value setting needs. mRoute.AssignLiteral(u""); } { // scope for any temporaries our default value setting needs. mServer = 0; } { // scope for any temporaries our default value setting needs. mServer_str.AssignLiteral(u""); } { // scope for any temporaries our default value setting needs. mSuccess = false; } { // scope for any temporaries our default value setting needs. mTopic.AssignLiteral(u""); } { // scope for any temporaries our default value setting needs. mVendor_str.AssignLiteral(u""); } return true; } void NetworkResultOptions::TraceDictionary(JSTracer* trc) { } NetworkResultOptions& NetworkResultOptions::operator=(const NetworkResultOptions& aOther) { DictionaryBase::operator=(aOther); mBroadcast = aOther.mBroadcast; mCurExternalIfname = aOther.mCurExternalIfname; mCurInternalIfname = aOther.mCurInternalIfname; mDns1 = aOther.mDns1; mDns1_str = aOther.mDns1_str; mDns2 = aOther.mDns2; mDns2_str = aOther.mDns2_str; mEnable = aOther.mEnable; mError = aOther.mError; mFlag = aOther.mFlag; mGateway = aOther.mGateway; mGateway_str = aOther.mGateway_str; mId = aOther.mId; mInterfaceList.Reset(); if (aOther.mInterfaceList.WasPassed()) { mInterfaceList.Construct(aOther.mInterfaceList.Value()); } mIpAddr = aOther.mIpAddr; mIpaddr = aOther.mIpaddr; mIpaddr_str = aOther.mIpaddr_str; mLease = aOther.mLease; mMacAddr = aOther.mMacAddr; mMask = aOther.mMask; mMask_str = aOther.mMask_str; mNetId = aOther.mNetId; mPrefixLength = aOther.mPrefixLength; mReason = aOther.mReason; mReply = aOther.mReply; mResult = aOther.mResult; mResultCode = aOther.mResultCode; mResultReason = aOther.mResultReason; mRet = aOther.mRet; mRoute = aOther.mRoute; mServer = aOther.mServer; mServer_str = aOther.mServer_str; mSuccess = aOther.mSuccess; mTopic = aOther.mTopic; mVendor_str = aOther.mVendor_str; return *this; } } // namespace mozilla::dom