Expand Minimize Picture-in-picture Power Device Status Voice Recognition Skip Back Skip Forward Minus Plus Play Search
Internet Explorer alert
This browser is not recommended for use with smartdevicelink.com, and may not function properly. Upgrade to a different browser to guarantee support of all features.
close alert
Documentation
SystemCapabilityManager

Class SystemCapabilityManager

Hierarchy

java.lang.Object

Package
com.smartdevicelink.proxy

Constructors

SystemCapabilityManager( ISdl callback )

public SystemCapabilityManager(ISdl callback)

Parameters

callback

Methods

getWindowCapability( int windowID )

public com.smartdevicelink.proxy.rpc.WindowCapability getWindowCapability(int windowID)

Parameters

windowID

getDefaultMainWindowCapability()

public com.smartdevicelink.proxy.rpc.WindowCapability getDefaultMainWindowCapability()

parseRAIResponse( RegisterAppInterfaceResponse response )

public void parseRAIResponse(RegisterAppInterfaceResponse response)

Parameters

response

setCapability( SystemCapabilityType systemCapabilityType, Object capability )

Sets a capability in the cached map. This should only be done when an RPC is received and contains updates to the capability that is being cached in the SystemCapabilityManager.

public synchronized void setCapability(SystemCapabilityType systemCapabilityType,Object capability)

Parameters

systemCapabilityType
the system capability type that will be set
capability
the value of the capability that will be set

isCapabilitySupported( SystemCapabilityType type )

Ability to see if the connected module supports the given capability. Useful to check before attempting to query for capabilities that require asynchronous calls to initialize.

public boolean isCapabilitySupported(SystemCapabilityType type)

Parameters

type
the SystemCapabilityType that is to be checked

supportsSubscriptions()

Checks is subscriptions are available on the connected head unit.

public boolean supportsSubscriptions()

getCapability( SystemCapabilityType systemCapabilityType, OnSystemCapabilityListener scListener, boolean forceUpdate )

Gets the capability object that corresponds to the supplied capability type by returning the currently cached value immediately (or null) as well as calling the listener immediately with the cached value, if available. If not available, the listener will retrieve a new value and return that when the head unit responds. If capability is not cached, the method will return null and trigger the supplied listener when the capability becomes available

public java.lang.Object getCapability(SystemCapabilityType systemCapabilityType,OnSystemCapabilityListener scListener,boolean forceUpdate)

Parameters

systemCapabilityType
type of capability desired
scListener
callback to execute upon retrieving capability
forceUpdate
flag to force getting a new fresh copy of the capability from the head unit even if it is cached

getCapability( SystemCapabilityType systemCapabilityType, OnSystemCapabilityListener scListener )

Deprecated
Gets the capability object that corresponds to the supplied capability type by calling the listener immediately with the cached value, if available. If not available, the listener will retrieve a new value and return that when the head unit responds.

public void getCapability(SystemCapabilityType systemCapabilityType,OnSystemCapabilityListener scListener)

Parameters

systemCapabilityType
Type of capability desired
scListener
callback to execute upon retrieving capability

getCapability( SystemCapabilityType systemCapabilityType )

Deprecated
Gets the capability object that corresponds to the supplied capability type by returning the currently cached value immediately if available. Otherwise returns a null object and works in the background to retrieve the capability for the next call

public java.lang.Object getCapability(SystemCapabilityType systemCapabilityType)

Parameters

systemCapabilityType
Type of capability desired

addOnSystemCapabilityListener( SystemCapabilityType systemCapabilityType, OnSystemCapabilityListener listener )

Adds a listener to be called whenever a new capability is retrieved. This method automatically subscribes to the supplied capability type and may call the listener multiple times if there are future updates, unlike getCapability() methods, which only call the listener one time.

public void addOnSystemCapabilityListener(SystemCapabilityType systemCapabilityType,OnSystemCapabilityListener listener)

Parameters

systemCapabilityType
Type of capability desired
listener
callback to execute upon retrieving capability

removeOnSystemCapabilityListener( SystemCapabilityType systemCapabilityType, OnSystemCapabilityListener listener )

Removes an OnSystemCapabilityListener that was previously added

public boolean removeOnSystemCapabilityListener(SystemCapabilityType systemCapabilityType,OnSystemCapabilityListener listener)

Parameters

systemCapabilityType
Type of capability
listener
the listener that should be removed

convertToList( Object object, java.lang.Class<T> classType )

Converts a capability object into a list.

public static java.util.List convertToList(Object object,java.lang.Class<T> classType)

Parameters

object
the capability that needs to be converted
classType
The class type of that should be contained in the list

Inherited Methods

From Class Methods
java.lang.Object getClass, hashCode, equals, clone, toString, notify, notifyAll, wait, wait, wait, finalize
View on GitHub.com
Previous Section Next Section