org.freedesktop.gstreamer.gst.PluginError Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of gst Show documentation
Show all versions of gst Show documentation
Java language bindings for Gst, generated with Java-GI
/* Java-GI - Java language bindings for GObject-Introspection-based libraries
* Copyright (C) 2022-2023 Jan-Willem Harmannij
*
* SPDX-License-Identifier: LGPL-2.1-or-later
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, see .
*/
/* This file has been generated with Java-GI.
* Do not edit this file directly!
* Visit https://jwharm.github.io/java-gi for more information.
*/
package org.freedesktop.gstreamer.gst;
import io.github.jwharm.javagi.gobject.*;
import io.github.jwharm.javagi.gobject.types.*;
import io.github.jwharm.javagi.base.*;
import io.github.jwharm.javagi.interop.*;
import java.lang.foreign.*;
import java.lang.invoke.*;
import org.jetbrains.annotations.*;
/**
* The plugin loading errors
*/
public enum PluginError implements io.github.jwharm.javagi.base.Enumeration {
/**
* The plugin could not be loaded
*/
MODULE(0),
/**
* The plugin has unresolved dependencies
*/
DEPENDENCIES(1),
/**
* The plugin has already be loaded from a different file
*/
NAME_MISMATCH(2);
/**
* Get the GType of the GstPluginError class.
* @return the GType
*/
public static org.gnome.glib.Type getType() {
return Interop.getType("gst_plugin_error_get_type");
}
private final int value;
/**
* Create a new PluginError for the provided value
* @param value the enum value
*/
PluginError(int value) {
this.value = value;
}
/**
* Get the numeric value of this enum
* @return the enum value
*/
@Override
public int getValue() {
return value;
}
/**
* Create a new PluginError for the provided value
* @param value the enum value
* @return the enum for the provided value
*/
public static PluginError of(int value) {
return switch (value) {
case 0 -> MODULE;
case 1 -> DEPENDENCIES;
case 2 -> NAME_MISMATCH;
default -> throw new IllegalStateException("Unexpected value: " + value);
};
}
/**
* Get the error quark.
* @return The error quark used in GError messages
*/
public static org.gnome.glib.Quark quark() {
FunctionDescriptor _fdesc = FunctionDescriptor.of(ValueLayout.JAVA_INT);
int _result;
try {
_result = (int) Interop.downcallHandle("gst_plugin_error_quark", _fdesc, false).invokeExact();
} catch (Throwable _err) {
throw new AssertionError("Unexpected exception occurred: ", _err);
}
return new org.gnome.glib.Quark(_result);
}
}