/* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). * Version 3.0.2 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. * ----------------------------------------------------------------------------- */ package com.frostwire.jlibtorrent.swig; public class pe_settings { private long swigCPtr; protected boolean swigCMemOwn; protected pe_settings(long cPtr, boolean cMemoryOwn) { swigCMemOwn = cMemoryOwn; swigCPtr = cPtr; } protected static long getCPtr(pe_settings obj) { return (obj == null) ? 0 : obj.swigCPtr; } protected void finalize() { delete(); } public synchronized void delete() { if (swigCPtr != 0) { if (swigCMemOwn) { swigCMemOwn = false; libtorrent_jni.delete_pe_settings(swigCPtr); } swigCPtr = 0; } } public pe_settings() { this(libtorrent_jni.new_pe_settings(), true); } public void setOut_enc_policy(short value) { libtorrent_jni.pe_settings_out_enc_policy_set(swigCPtr, this, value); } public short getOut_enc_policy() { return libtorrent_jni.pe_settings_out_enc_policy_get(swigCPtr, this); } public void setIn_enc_policy(short value) { libtorrent_jni.pe_settings_in_enc_policy_set(swigCPtr, this, value); } public short getIn_enc_policy() { return libtorrent_jni.pe_settings_in_enc_policy_get(swigCPtr, this); } public void setAllowed_enc_level(short value) { libtorrent_jni.pe_settings_allowed_enc_level_set(swigCPtr, this, value); } public short getAllowed_enc_level() { return libtorrent_jni.pe_settings_allowed_enc_level_get(swigCPtr, this); } public void setPrefer_rc4(boolean value) { libtorrent_jni.pe_settings_prefer_rc4_set(swigCPtr, this, value); } public boolean getPrefer_rc4() { return libtorrent_jni.pe_settings_prefer_rc4_get(swigCPtr, this); } public enum enc_policy { forced, enabled, disabled; public final int swigValue() { return swigValue; } public static enc_policy swigToEnum(int swigValue) { enc_policy[] swigValues = enc_policy.class.getEnumConstants(); if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue) return swigValues[swigValue]; for (enc_policy swigEnum : swigValues) if (swigEnum.swigValue == swigValue) return swigEnum; throw new IllegalArgumentException("No enum " + enc_policy.class + " with value " + swigValue); } @SuppressWarnings("unused") private enc_policy() { this.swigValue = SwigNext.next++; } @SuppressWarnings("unused") private enc_policy(int swigValue) { this.swigValue = swigValue; SwigNext.next = swigValue+1; } @SuppressWarnings("unused") private enc_policy(enc_policy swigEnum) { this.swigValue = swigEnum.swigValue; SwigNext.next = this.swigValue+1; } private final int swigValue; private static class SwigNext { private static int next = 0; } } public enum enc_level { plaintext(libtorrent_jni.pe_settings_plaintext_get()), rc4(libtorrent_jni.pe_settings_rc4_get()), both(libtorrent_jni.pe_settings_both_get()); public final int swigValue() { return swigValue; } public static enc_level swigToEnum(int swigValue) { enc_level[] swigValues = enc_level.class.getEnumConstants(); if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue) return swigValues[swigValue]; for (enc_level swigEnum : swigValues) if (swigEnum.swigValue == swigValue) return swigEnum; throw new IllegalArgumentException("No enum " + enc_level.class + " with value " + swigValue); } @SuppressWarnings("unused") private enc_level() { this.swigValue = SwigNext.next++; } @SuppressWarnings("unused") private enc_level(int swigValue) { this.swigValue = swigValue; SwigNext.next = swigValue+1; } @SuppressWarnings("unused") private enc_level(enc_level swigEnum) { this.swigValue = swigEnum.swigValue; SwigNext.next = this.swigValue+1; } private final int swigValue; private static class SwigNext { private static int next = 0; } } }