All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.gnome.gio.DBusInterfaceSkeletonFlags Maven / Gradle / Ivy

// This file was automatically generated by Java-GI. Do not edit this file
// directly! Visit  for more information.
//
// The API documentation in this file was derived from GObject-Introspection
// metadata and may include text or comments from the original C sources.
//
// Copyright (c), upstream authors as identified in the GObject-Introspection
// metadata.
//
// This generated file is distributed under the same license as the original
// GObject-Introspection data, unless otherwise specified. Users of this file
// are responsible for complying with any licenses or terms required by the
// original authors.
//
// THIS FILE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT.
//
package org.gnome.gio;

import io.github.jwharm.javagi.base.Enumeration;
import io.github.jwharm.javagi.interop.Interop;
import java.lang.IllegalStateException;
import java.lang.Override;
import javax.annotation.processing.Generated;
import org.gnome.glib.Type;

/**
 * Flags describing the behavior of a {@code GDBusInterfaceSkeleton} instance.
 *
 * @version 2.30
 */
@Generated("io.github.jwharm.JavaGI")
public enum DBusInterfaceSkeletonFlags implements Enumeration {
    /**
     * No flags set.
     */
    NONE(0),

    /**
     * Each method invocation is handled in
     *   a thread dedicated to the invocation. This means that the method implementation can use blocking IO
     *   without blocking any other part of the process. It also means that the method implementation must
     *   use locking to access data structures used by other threads.
     */
    HANDLE_METHOD_INVOCATIONS_IN_THREAD(1);

    static {
        Gio.javagi$ensureInitialized();
    }

    private final int value;

    /**
     * Create a new DBusInterfaceSkeletonFlags for the provided value
     *
     * @param value the bitfield value
     */
    private DBusInterfaceSkeletonFlags(int value) {
        this.value = value;
    }

    /**
     * Create a new DBusInterfaceSkeletonFlags for the provided value
     *
     * @param value the bitfield value
     * @return the bitfield for the provided value
     */
    public static DBusInterfaceSkeletonFlags of(int value) {
        return switch(value) {
            case 0 -> NONE;
            case 1 -> HANDLE_METHOD_INVOCATIONS_IN_THREAD;
            default -> throw new IllegalStateException("Unexpected value: " + value);
        } ;
    }

    /**
     * Get the numeric value of this enum
     *
     * @return the enum value
     */
    @Override
    public int getValue() {
        return value;
    }

    /**
     * Get the GType of the DBusInterfaceSkeletonFlags class
     *
     * @return the GType
     */
    public static Type getType() {
        return Interop.getType("g_dbus_interface_skeleton_flags_get_type");
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy