com.smartdevicelink.proxy.rpc.DeleteWindow Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sdl_java_se Show documentation
Show all versions of sdl_java_se Show documentation
The app library component of SDL is meant to run on the end userâs smart-device from within SDL enabled apps, as an embedded app, or connected to the cloud. App libraries allow the apps to connect to SDL enabled head-units and hardware through bluetooth, USB, and TCP for Android, and cloud and embedded apps can connect through web sockets, Java Beans, and other custom transports. Once the library establishes a connection between the smart device and head-unit through the preferred method of transport, the two components are able to communicate using the SDL defined protocol. The app integrating this library project is then able to expose its functionality to the head-unit through text, media, and other interactive elements.
package com.smartdevicelink.proxy.rpc;
import androidx.annotation.NonNull;
import com.smartdevicelink.protocol.enums.FunctionID;
import com.smartdevicelink.proxy.RPCRequest;
import java.util.Hashtable;
/**
* This RPC deletes the window created by the CreateWindow RPC
*
* @see CreateWindow
* @since 6.0
*/
public class DeleteWindow extends RPCRequest {
public static final String KEY_WINDOW_ID = "windowID";
/**
* Constructs a new DeleteWindow object
*/
public DeleteWindow() {
super(FunctionID.DELETE_WINDOW.toString());
}
/**
* Constructs a new DeleteWindow object indicated by the Hashtable
* parameter
*
* @param hash The Hashtable to use
*/
public DeleteWindow(Hashtable hash) {
super(hash);
}
/**
* Constructs a new DeleteWindow object
*
* @param windowID A unique ID to identify the window. The value of '0' will always be the default main window on the main display and cannot be deleted.
* See PredefinedWindows enum.
*/
public DeleteWindow(@NonNull Integer windowID) {
this();
setWindowID(windowID);
}
/**
* Sets the windowID. It's a unique ID to identify the window.
* The value of '0' will always be the default main window on the main display and cannot be deleted.
* See PredefinedWindows enum.
*
* @param windowID A unique ID to identify the window. The value of '0' will always be the default main window on the main display and should not be used in this context as it will already be created for the app. See PredefinedWindows enum. Creating a window with an ID that is already in use will be rejected with `INVALID_ID`.
*/
public DeleteWindow setWindowID(@NonNull Integer windowID) {
setParameters(KEY_WINDOW_ID, windowID);
return this;
}
/**
* Gets the windowID.
*
* @return int -an int value representing the windowID.
*/
public Integer getWindowID() {
return getInteger(KEY_WINDOW_ID);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy