/* ---------------------------------------------------------------------------- * 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 performance_alert extends torrent_alert { private long swigCPtr; protected performance_alert(long cPtr, boolean cMemoryOwn) { super(libtorrent_jni.performance_alert_SWIGUpcast(cPtr), cMemoryOwn); swigCPtr = cPtr; } protected static long getCPtr(performance_alert 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_performance_alert(swigCPtr); } swigCPtr = 0; } super.delete(); } public performance_alert(torrent_handle h, performance_alert.performance_warning_t w) { this(libtorrent_jni.new_performance_alert(torrent_handle.getCPtr(h), h, w.swigValue()), true); } public int type() { return libtorrent_jni.performance_alert_type(swigCPtr, this); } public int category() { return libtorrent_jni.performance_alert_category(swigCPtr, this); } public String what() { return libtorrent_jni.performance_alert_what(swigCPtr, this); } public String message() { return libtorrent_jni.performance_alert_message(swigCPtr, this); } public void setWarning_code(performance_alert.performance_warning_t value) { libtorrent_jni.performance_alert_warning_code_set(swigCPtr, this, value.swigValue()); } public performance_alert.performance_warning_t getWarning_code() { return performance_alert.performance_warning_t.swigToEnum(libtorrent_jni.performance_alert_warning_code_get(swigCPtr, this)); } public enum performance_warning_t { outstanding_disk_buffer_limit_reached, outstanding_request_limit_reached, upload_limit_too_low, download_limit_too_low, send_buffer_watermark_too_low, too_many_optimistic_unchoke_slots, too_high_disk_queue_limit, bittyrant_with_no_uplimit, too_few_outgoing_ports, too_few_file_descriptors, num_warnings; public final int swigValue() { return swigValue; } public static performance_warning_t swigToEnum(int swigValue) { performance_warning_t[] swigValues = performance_warning_t.class.getEnumConstants(); if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue) return swigValues[swigValue]; for (performance_warning_t swigEnum : swigValues) if (swigEnum.swigValue == swigValue) return swigEnum; throw new IllegalArgumentException("No enum " + performance_warning_t.class + " with value " + swigValue); } @SuppressWarnings("unused") private performance_warning_t() { this.swigValue = SwigNext.next++; } @SuppressWarnings("unused") private performance_warning_t(int swigValue) { this.swigValue = swigValue; SwigNext.next = swigValue+1; } @SuppressWarnings("unused") private performance_warning_t(performance_warning_t swigEnum) { this.swigValue = swigEnum.swigValue; SwigNext.next = this.swigValue+1; } private final int swigValue; private static class SwigNext { private static int next = 0; } } public final static int alert_type = libtorrent_jni.performance_alert_alert_type_get(); public final static int static_category = libtorrent_jni.performance_alert_static_category_get(); }