Package com.tomtom.ivi.appsuite.media.api.common.frontend.policies

Media item policies; these classes are used to customize the media frontend for a specific source.

Types

Link copied to clipboard
@IviExperimental(reasons = [])
fun interface BrowseSourceUserFlow

A user flow performed when the user requests to browse a media source.

Link copied to clipboard
@IviExperimental(reasons = [])
class DefaultMediaControlPolicy : MediaControlPolicy

The default policy for configuring media controls. It does not add any customControls, nor does it override any controls in replacedStandardControls.

Link copied to clipboard
@IviExperimental(reasons = [])
class DefaultMediaItemComparisonPolicy : Function2<first: IviMediaItem, second: IviMediaItem?, Boolean>

Default implementation of MediaItemComparisonPolicy.

Link copied to clipboard
@IviExperimental(reasons = [])
class DefaultMediaItemMappingPolicy : Function1<item: IviMediaItem, IviMediaItem>

Default implementation of MediaItemMappingPolicy.

Link copied to clipboard

Default implementation of MediaSourceAttributionPolicy.

Link copied to clipboard
@IviExperimental(reasons = [])
class DefaultSourceDefinitionPolicy : SourceDefinitionPolicy

The default general source definition policy.

Link copied to clipboard
@IviExperimental(reasons = [])
fun interface IntentUserFlow

A user flow performed when the source provides an Intent to launch an external flow.

Link copied to clipboard
@IviExperimental(reasons = [])
typealias IsPlaylistItemPolicy = (mediaItem: IviMediaItem) -> Boolean

Determines if the media item represents a playlist.

This policy can be used to determine whether to open the playlist panel for a given IviMediaItem.

Link copied to clipboard
@IviExperimental(reasons = [])
interface MediaControlPolicy

The policy that configures the available media controls. A media control is a visual control for a media-related command; see MediaControl.

Link copied to clipboard
@IviExperimental(reasons = [])
data class MediaControlsDisplayLimit(    val primaryControlsSmallLimit: Int = 3,     val secondaryControlsSmallLimit: Int = 2,     val primaryControlsMediumLimit: Int = 3,     val secondaryControlsMediumLimit: Int = 3,     val primaryControlsLargeLimit: Int = 4,     val secondaryControlsLargeLimit: Int = 5)

The maximum numbers of media controls to display based on the available space.

Link copied to clipboard
@IviExperimental(reasons = [])
typealias MediaItemComparisonPolicy = (first: IviMediaItem, second: IviMediaItem?) -> Boolean

Returns true if the two IviMediaItems represent the same media object; false otherwise.

Link copied to clipboard
@IviExperimental(reasons = [])
typealias MediaItemMappingPolicy = (item: IviMediaItem) -> IviMediaItem

Maps IviMediaItem into a different IviMediaItem by changing its fields as needed.

This is used to improve how the content of IviMediaItems is displayed to the user.

For example, if the media source places both song title and artist in the IviMediaItem.title field, this can be used to split it into IviMediaItem.title and IviMediaItem.artist.

Link copied to clipboard
@IviExperimental(reasons = [])
interface MediaSourceAttributionPolicy

A policy for media source attributes customization.

Link copied to clipboard
@IviExperimental(reasons = [])
data class PolicyProvider(    val compareItemsPolicy: MediaItemComparisonPolicy = DefaultMediaItemComparisonPolicy(),     val itemMappingPolicy: MediaItemMappingPolicy = DefaultMediaItemMappingPolicy(),     val sourceAttributionPolicy: MediaSourceAttributionPolicy = DefaultMediaSourceAttributionPolicy(),     val mediaControlPolicy: MediaControlPolicy = DefaultMediaControlPolicy(),     val isPlaylistItemPolicy: IsPlaylistItemPolicy? = null,     val userFlowPolicy: UserFlowPolicy = UserFlowPolicy(),     val sourceDefinitionPolicy: SourceDefinitionPolicy = DefaultSourceDefinitionPolicy())

A container of customization policies for a media source.

Link copied to clipboard
@IviExperimental(reasons = [])
data class SourceAttributionFormat(    val preferWordMark: Boolean = false,     val preferMonochrome: Boolean = false,     val preferSimplified: Boolean = false,     val preferPresentation: Boolean = false)

Specification of what format source attribution is requested in.

Link copied to clipboard
@IviExperimental(reasons = [])
interface SourceDefinitionPolicy

Policy to define general aspects of the media source.

Link copied to clipboard
@IviExperimental(reasons = [])
data class SourceStyle(val accentColor: ColorResolver?) : Parcelable

Style for a media source. Provides branding colors.

Link copied to clipboard
@IviExperimental(reasons = [])
data class UserFlowPolicy(    val loginUserFlow: IntentUserFlow? = null,     val browseSourceUserFlow: BrowseSourceUserFlow? = null,     val settingsUserFlow: IntentUserFlow? = null)

A policy to override the default user flow behavior for a media source.

Link copied to clipboard
@IviExperimental(reasons = [])
sealed class UserFlowResult

A result returned by an user flow. Can be used to notify the user.