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

org.cryptomator.jni.MacLaunchServices Maven / Gradle / Ivy

Go to download

This library provides the system-specific native functions used by Cryptomator.

The newest version!
/*******************************************************************************
 * Copyright (c) 2019 Tobias Hagemann and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the accompanying LICENSE.txt.
 *
 * Contributors:
 *     Tobias Hagemann - initial API and implementation
 *******************************************************************************/
package org.cryptomator.jni;

public class MacLaunchServices {

	/**
	 * Check if login item is currently enabled.
	 *
	 * @return true if login item is currently enabled, false otherwise.
	 */
	public boolean isLoginItemEnabled() {
		return isLoginItemEnabled0();
	}

	private native boolean isLoginItemEnabled0();

	/**
	 * Enable login item. If it is already enabled, nothing happens and it will be handled as successful.
	 *
	 * @return true if enabling login item was successful, false otherwise.
	 */
	public boolean enableLoginItem() {
		return enableLoginItem0();
	}

	private native boolean enableLoginItem0();

	/**
	 * Disable login item. If it is already disabled, nothing happens and it will be handled as successful.
	 *
	 * @return true if disabling login item was successful, false otherwise.
	 */
	public boolean disableLoginItem() {
		return disableLoginItem0();
	}

	private native boolean disableLoginItem0();

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy