You.i Engine
CYICloudInterface Class Referenceabstract

Detailed Description

The cloud interface provides a binding to the Cloud SDK.

On non-cloud builds, an CYICloudInterface interface (NOP) will be returned. On cloud builds, the interface will forward function calls to the Cloud SDK.

#include <YiCloudInterface.h>

Inheritance diagram for CYICloudInterface:

Public Types

enum  InterfaceType {
  InterfaceType::NULL_INTERFACE,
  InterfaceType::ROKU_INTERFACE,
  InterfaceType::WEB_INTERFACE
}
 
enum  ListIncomingFocusStyle {
  ListIncomingFocusStyle::SERVER,
  ListIncomingFocusStyle::CLOSEST,
  ListIncomingFocusStyle::PREVIOUS_ITEM
}
 
enum  ListOutgoingFocusStyle {
  ListOutgoingFocusStyle::SERVER,
  ListOutgoingFocusStyle::CLOSEST,
  ListOutgoingFocusStyle::CLOSEST_TO_LIST
}
 

Public Member Functions

 CYICloudInterface ()=default
 
virtual ~CYICloudInterface ()
 
virtual bool IsCloudServer ()=0
 Returns true if the implementation is a cloud server. More...
 
virtual bool IsUsingNullRenderer () const =0
 Return true if the cloud sdk is using the null renderer. More...
 
virtual bool SendFocusMap (CYISceneManager *pSceneManager=nullptr)=0
 Send a generated focus map to the client. More...
 
virtual bool SetExportHint (CYISceneNode *pNode, const CYIString &hintName, const CYIString &value)=0
 Apply the given export hint to a scene node. More...
 
virtual void SetIncomingFocusStyle (CYIListView *pList, ListIncomingFocusStyle focusStyle)=0
 Used to set up how focus will be calculated when list recieves focus from another item. More...
 
virtual void SetOutgoingFocusStyle (CYIListView *pList, ListOutgoingFocusStyle focusStyle)=0
 Used to set up how focus will be calculated when list recieves focus from another item. More...
 
virtual void SetInitalScrollIndexWithFocus (CYIListView *pList, uint32_t index)=0
 Call setInitalScrollIndexWithFocus to set the initial scroll index of the list. This method will also set focus to the corresponding list item. It this API called in a react native application, it should be called via onLoad. Please do not call this method from other RN life cycle methods as this can cause incorrect application behaviour (The focus request is delayed until after the client receives the new scene graph update). More...
 
virtual bool SetVideoNodeProperties (const CYIBundle &properties)=0
 Add video node properties such as content metadata including DRM configuration, notificationInterval, etc. More...
 
virtual bool SetVideoSurfaceProperties (const CYIBundle &properties, CYIVideoSurfaceView *pVideoSurfaceView=nullptr)=0
 Set the video surface view properties. More...
 
virtual const CYIClientPlayer::PlaybackSessionInfoGetLastPlaybackSessionInfo () const =0
 Get the recently updated playback session information such as bookmark and audio/cc settings. More...
 
virtual void SetFocusOnSceneNode (const CYISceneNode *pNode)=0
 Set client focus on the specified scene node. More...
 
virtual void ClearClientFocus ()=0
 Clear the client's focus. The server will then push its own focus state once a view has focus. More...
 
virtual void InvokeCommand (const CYIString cmd, const CYIBundle &args=CYIBundle(), CYIClientCallback callback=nullptr)=0
 Invoke custom client command. More...
 
virtual bool IsLowEndDevice ()=0
 Returns true if the device is low end. More...
 
virtual const CYIStringGetClientExternalIp () const =0
 Return the external IP of the client. More...
 
virtual const CYIStringGetClientLocalIp () const =0
 Return the local IP of the client. More...
 
virtual const glm::vec2 GetClientUIResolution () const =0
 Returns the UI resolution of the client. More...
 
virtual void TerminateApplication ()=0
 Terminate the Application and return to the home screen. More...
 
virtual void SetDisconnectOnInactivityEnabled (bool enabled)=0
 Sets whether disconnect on inactivity is enabled or disabled for the application. More...
 
virtual void ShowWaitSpinnerNow ()=0
 Show the wait spinner right away. More...
 
virtual void SetSpinnerDelayMs (uint32_t delayMs)=0
 Sets the time of spinner delay in milliseconds. More...
 
virtual void ShowWaitSpinner ()=0
 Show the wait spinner with configured delay. More...
 
virtual void SetWaitSpinnerAccessibilityAttributes (CYIAccessibilityAttributes::Accessible accessible, std::unique_ptr< const CYIAccessibilityAttributes > pAccessibilityAttributes=nullptr)=0
 Configure CYIAccessibilityAttributes and accessibility of the Roku wait spinner. More...
 
virtual void HideWaitSpinner ()=0
 Hide the wait spinner. More...
 
virtual void AddModalScene (const CYIString &name, const CYISceneNode *pSceneNode, int32_t layerIndex=0, std::set< CYIString > associatedScenes=std::set< CYIString >())=0
 Identify overlay scene to be exported with initial components. More...
 
virtual void RemoveModalScene (const CYIString &name)=0
 Remove an overlay scene from the set of registered modals. More...
 
virtual void SendScrollToNode (const CYIScrollingView *pScrollingView, const CYISceneNode *pNode)=0
 Scroll the given scrolling view to the provided node. More...
 
virtual void SendScrollingTextViewUpdate (const CYISceneNode *pScrollingTextView, const CYIString &text, const CYIString &title)=0
 Update the text for a scrolling text view. More...
 
virtual void SetDefaultCloudKeyboardTitle (const CYIString &title)=0
 Set the title string that will be shown when the keyboard is displayed. The default title will be superceded by an element with a title hint. More...
 
virtual const CYIStringGetDefaultCloudKeyboardTitle () const =0
 Get currently set default title for the cloud device. More...
 
virtual uint64_t RegisterDataListener (CYIString eventId, std::function< bool(CYIString eventId, const yi::rapidjson::Document *pEvent)> dataFunction)=0
 Register a data listener so that it may receive client data. More...
 
virtual void UnregisterDataListener (CYIString eventId, uint64_t listenerId)=0
 Unregister a data listener so that it no longer receives client data. More...
 
virtual void RegisterPersistentStore (const CYIString &name, CYIPersistentStore *pStore)=0
 Register the given persistent store object for synchronization with the client. More...
 
virtual void UnregisterPersistentStore (CYIPersistentStore *pStore)=0
 Unregister the given persistent object so that it is no longer synchronized with the client. More...
 
virtual void SendRokuAnalyticsEvent (const CYIString &eventName, const CYIString &parameters)=0
 Send the given event and paramaters to the Roku analytics framework. More...
 
virtual void GetIAPCustomerUID (std::function< void(const CloudIAPRequestStatus &status, const CloudIAPCustomerUID &customerUID)> responder)=0
 Request the client in-app purchase customer unique ID. This is an asynchronous network operation. The given responder will be invoked when complete. More...
 
virtual void GetChannelCredentials (std::function< void(const CloudIAPRequestStatus &status, const CloudIAPChannelCredentials &channelCredentials)> responder)=0
 Request getting the client in-app purchase channel credentials. This is an asynchronous network operation. The given responder will be invoked when complete. More...
 
virtual void SaveChannelCredentials (const CYIString &credentials, std::function< void(const CloudIAPRequestStatus &status)> responder)=0
 Request saving the client in-app purchase channel credentials. This is an asynchronous network operation. The given responder will be invoked when complete. More...
 
virtual void GetIAPUser (std::function< void(const CloudIAPRequestStatus &status, const CloudIAPUser &iapUser)> responder)=0
 Request the client in-app purchase user account. This is an asynchronous network operation. The given responder will be invoked when complete. More...
 
virtual void GetAvailableProducts (std::function< void(const CloudIAPRequestStatus &status, const std::vector< std::shared_ptr< CloudIAPProduct >> &products)> responder)=0
 In app purchases request of available products for the channel This is an asynchronous network operation. The given responder will be invoked when complete. More...
 
virtual void GetUserPurchases (std::function< void(const CloudIAPRequestStatus &status, const std::vector< std::shared_ptr< CloudIAPPurchase >> &purchases)> responder)=0
 In app purchases request of user purchases This is an asynchronous network operation. The given responder will be invoked when complete. More...
 
virtual void RequestPurchase (const CYIString &productId, std::function< void(const CloudIAPRequestStatus &status, const CloudIAPReceipt &receipt)> responder)=0
 In app purchases request to purchase a given product This is an asynchronous network operation. The given responder will be invoked when complete. More...
 
virtual bool ConfigureVideoDrawer (CYIAbstractVideoPlayer *pVideoPlayer, CYISceneNode *pContentDrawerSceneNode, const CYIClientPlayer::ContentDrawerAnimations &animations)=0
 Associate video drawer with player. More...
 
virtual bool SetVideoPlayerColor (CYIAbstractVideoPlayer *pVideoPlayer, const CYIColor &color)=0
 Set the color of the video player controls. Note: Must be called after a video surface view has been associated with the player. More...
 
virtual void SendStopVideo ()=0
 Sends a 'stop' command to the active video node. More...
 
virtual bool ConfigureContentOverlay (const CYIContentOverlay::Configuration &configuration)=0
 Configure the content overlay with required properties. More...
 
virtual bool ContentOverlaySetState (const CYISceneView *pNode, const CYIContentOverlay::State &state)=0
 Attempt to set the content overlay to the provided state. Configured parameters for that state will be triggered like animations and initial focus if set. More...
 
virtual void SendStopAnimation (const CYIString &animation, const CYISceneNode *pNode=nullptr)=0
 Sends a message to the client to stop the given animation. More...
 
virtual void SendEpgContent (CYISceneNode *pNode, const CloudEpgContentModel &content)=0
 Sends updated EPG content data. Notes: The given node must be specified as an EPG Grid with EXPORT_CLASS_NAME = "CYIEpgGridView". More...
 
virtual void SendFocusEpgProgram (CYISceneNode *pNode, const CYIString &channelTitle, const int64_t startTime)=0
 Sends request focus to the specified program with given channel title and start time. More...
 
virtual void ReplaceSubtree (const CYISceneNode *pSubtreeRootNode, bool useJSON=false)=0
 Replace the given subtree on the client. A common use of this method is to update the content data of a list. Example: ReplaceSubtree(pListView, true) More...
 
virtual void SendErrorMessage (const CYIString &message)=0
 Send the given string to be displayed as a Roku error message. More...
 
virtual void PauseExportUpdates ()=0
 Pauses the automatic export process. Until resumed, changes to the scene tree will not result in automated exports. More...
 
virtual void ResumeExportUpdates ()=0
 Resumes the automatic export process. Changes to the scene tree will again result in automated exports. More...
 
virtual bool AreExportUpdatesPaused ()=0
 Returns true if the automatic export process is paused. More...
 
virtual void EnqueuePostExportAction (std::function< void()> action)=0
 Enqueue an action that will execute after the next scene export. More...
 
virtual void SetNavigationPersistenceKey (const CYIString &persistenceKey)=0
 Sets the persistence key for the navigate state. App will save the navigation history only if this gets called at the time of App::UserStart(). More...
 
virtual const CYIStringGetStatus () const =0
 Gets the stringified cloud app status from client. More...
 
virtual void SaveInstanceState (const CYIString &stringifiedState)=0
 Provide the stringified state of the application to be used when restarting the app instance. More...
 
virtual const CYIStringGetSavedInstanceState () const =0
 Retrieve the stringified saved state. More...
 
virtual std::shared_ptr< CYIPersistentStoreFindUnusedPersistentStore (const CYIString &name)=0
 Retrieve a persistent store containing data that was not stored when the app is started. More...
 
virtual void SendAppBeacon (const CYIString &beaconName)=0
 Sends an app beacon of the provided name to the client. More...
 

Public Attributes

CYISignal ExportComplete
 
CYISignal ClientBackgrounded
 Fired when the client starts playback or inactivated. More...
 
CYISignal ScreenSaverWillStart
 Fired when the client notifies the screensaver is about to start. Server can take opportunity to save the instance state to client before going into screensaver mode. Client won't send the ClientBackgrounded signal while the screensaver is on. More...
 

Protected Member Functions

virtual void AddUnusedPersistentStoreData (const CYIString &name, yi::rapidjson::Value *pData)=0
 Adds data to the list of unused persistent store data. More...
 

Friends

class CYICloudInterfaceManager
 
class CYICloudContext
 

Member Enumeration Documentation

◆ InterfaceType

Enumerator
NULL_INTERFACE 
ROKU_INTERFACE 
WEB_INTERFACE 

Not supported. For internal use only.

◆ ListIncomingFocusStyle

Enumerator
SERVER 
CLOSEST 

The closest item will receive focus.

PREVIOUS_ITEM 

The item that previously had focus should receive focus.

◆ ListOutgoingFocusStyle

Enumerator
SERVER 
CLOSEST 

The item closest the source list item will receive focus.

CLOSEST_TO_LIST 

The item closest to the entire list will receive focus.

Constructor & Destructor Documentation

◆ CYICloudInterface()

CYICloudInterface::CYICloudInterface ( )
default

◆ ~CYICloudInterface()

virtual CYICloudInterface::~CYICloudInterface ( )
inlinevirtual

Member Function Documentation

◆ AddModalScene()

virtual void CYICloudInterface::AddModalScene ( const CYIString name,
const CYISceneNode pSceneNode,
int32_t  layerIndex = 0,
std::set< CYIString associatedScenes = std::set< CYIString >() 
)
pure virtual

Identify overlay scene to be exported with initial components.

Parameters
nameis the name of the modal scene.
pSceneNodeis the node of the modal scene.
layerIndexis the index of the scene layer.
associatedScenesis the set of scenes this modal should be included with when exporting the component library. If empty, the modal will be included in all scenes.

Implemented in CYINullInterface.

◆ AddUnusedPersistentStoreData()

virtual void CYICloudInterface::AddUnusedPersistentStoreData ( const CYIString name,
yi::rapidjson::Value *  pData 
)
protectedpure virtual

Adds data to the list of unused persistent store data.

This function is needed to support the recreation of the Async Storage module when a React Native app is live reloaded.

Implemented in CYINullInterface.

◆ AreExportUpdatesPaused()

virtual bool CYICloudInterface::AreExportUpdatesPaused ( )
pure virtual

Returns true if the automatic export process is paused.

See also
PauseExportUpdates
ResumeExportUpdates

Implemented in CYINullInterface.

◆ ClearClientFocus()

virtual void CYICloudInterface::ClearClientFocus ( )
pure virtual

Clear the client's focus. The server will then push its own focus state once a view has focus.

Implemented in CYINullInterface.

◆ ConfigureContentOverlay()

virtual bool CYICloudInterface::ConfigureContentOverlay ( const CYIContentOverlay::Configuration configuration)
pure virtual

Configure the content overlay with required properties.

Parameters
configurationthe parameters required to fully setup the content overlay
Returns
true if the content overlay was successfully created.

Implemented in CYINullInterface.

◆ ConfigureVideoDrawer()

virtual bool CYICloudInterface::ConfigureVideoDrawer ( CYIAbstractVideoPlayer pVideoPlayer,
CYISceneNode pContentDrawerSceneNode,
const CYIClientPlayer::ContentDrawerAnimations animations 
)
pure virtual

Associate video drawer with player.

Parameters
pVideoPlayeris the video player associated with the content drawer
pContentDrawerSceneNodecontains the CYIListView with the fully streamed in set of video content
animationsidentifies the names of the animations contained in the VideoListSceneNode to show and hide the drawer

Implemented in CYINullInterface.

◆ ContentOverlaySetState()

virtual bool CYICloudInterface::ContentOverlaySetState ( const CYISceneView pNode,
const CYIContentOverlay::State state 
)
pure virtual

Attempt to set the content overlay to the provided state. Configured parameters for that state will be triggered like animations and initial focus if set.

Parameters
pNodethe engine scene view to preform the operations on. This node must have been configured as a content overlay using the ConfigureContentOverlay interface
statethe target state to attempt to transition the overlay to

Implemented in CYINullInterface.

◆ EnqueuePostExportAction()

virtual void CYICloudInterface::EnqueuePostExportAction ( std::function< void()>  action)
pure virtual

Enqueue an action that will execute after the next scene export.

Implemented in CYINullInterface.

◆ FindUnusedPersistentStore()

virtual std::shared_ptr<CYIPersistentStore> CYICloudInterface::FindUnusedPersistentStore ( const CYIString name)
pure virtual

Retrieve a persistent store containing data that was not stored when the app is started.

In react native apps, the Async Storage module is lazy instantiated, so data not laoded into an existing store at load time is retained for when it is created. If no persistent store is found with the given name, nullptr is returned.

Implemented in CYINullInterface.

◆ GetAvailableProducts()

virtual void CYICloudInterface::GetAvailableProducts ( )
pure virtual

In app purchases request of available products for the channel This is an asynchronous network operation. The given responder will be invoked when complete.

Implemented in CYINullInterface.

◆ GetChannelCredentials()

virtual void CYICloudInterface::GetChannelCredentials ( std::function< void(const CloudIAPRequestStatus &status, const CloudIAPChannelCredentials &channelCredentials)>  responder)
pure virtual

Request getting the client in-app purchase channel credentials. This is an asynchronous network operation. The given responder will be invoked when complete.

◆ GetClientExternalIp()

virtual const CYIString& CYICloudInterface::GetClientExternalIp ( ) const
pure virtual

Return the external IP of the client.

Implemented in CYINullInterface.

◆ GetClientLocalIp()

virtual const CYIString& CYICloudInterface::GetClientLocalIp ( ) const
pure virtual

Return the local IP of the client.

Note
This call will only return a valid result for a development client. For production clients this will always be and empty string.

Implemented in CYINullInterface.

◆ GetClientUIResolution()

virtual const glm::vec2 CYICloudInterface::GetClientUIResolution ( ) const
pure virtual

Returns the UI resolution of the client.

Implemented in CYINullInterface.

◆ GetDefaultCloudKeyboardTitle()

virtual const CYIString& CYICloudInterface::GetDefaultCloudKeyboardTitle ( ) const
pure virtual

Get currently set default title for the cloud device.

See also
SetDefaultCloudKeyboardTitle

Implemented in CYINullInterface.

◆ GetIAPCustomerUID()

virtual void CYICloudInterface::GetIAPCustomerUID ( std::function< void(const CloudIAPRequestStatus &status, const CloudIAPCustomerUID &customerUID)>  responder)
pure virtual

Request the client in-app purchase customer unique ID. This is an asynchronous network operation. The given responder will be invoked when complete.

Deprecated:
This function is deprecated and may be removed in a future release. GetChannelCredentials should be used instead.

◆ GetIAPUser()

virtual void CYICloudInterface::GetIAPUser ( std::function< void(const CloudIAPRequestStatus &status, const CloudIAPUser &iapUser)>  responder)
pure virtual

Request the client in-app purchase user account. This is an asynchronous network operation. The given responder will be invoked when complete.

◆ GetLastPlaybackSessionInfo()

virtual const CYIClientPlayer::PlaybackSessionInfo& CYICloudInterface::GetLastPlaybackSessionInfo ( ) const
pure virtual

Get the recently updated playback session information such as bookmark and audio/cc settings.

See also
CYIClientPlayer::PlaybackSessionInfo

Implemented in CYINullInterface.

◆ GetSavedInstanceState()

virtual const CYIString& CYICloudInterface::GetSavedInstanceState ( ) const
pure virtual

Retrieve the stringified saved state.

Implemented in CYINullInterface.

◆ GetStatus()

virtual const CYIString& CYICloudInterface::GetStatus ( ) const
pure virtual

Gets the stringified cloud app status from client.

When a new server instance gets created by reconnection request from a client, a set of context information will be provided. The context information will contain the statusCode, errorCode and errorMessage. The errorCode and errorMessage will be provided only when reconnecting with error situation. This is read only.

Implemented in CYINullInterface.

◆ GetUserPurchases()

virtual void CYICloudInterface::GetUserPurchases ( )
pure virtual

In app purchases request of user purchases This is an asynchronous network operation. The given responder will be invoked when complete.

Implemented in CYINullInterface.

◆ HideWaitSpinner()

virtual void CYICloudInterface::HideWaitSpinner ( )
pure virtual

Hide the wait spinner.

Implemented in CYINullInterface.

◆ InvokeCommand()

virtual void CYICloudInterface::InvokeCommand ( const CYIString  cmd,
const CYIBundle args = CYIBundle(),
CYIClientCallback  callback = nullptr 
)
pure virtual

Invoke custom client command.

Parameters
cmdis the name of the custom command.
argsa map of argument name and value pairs. Value is CYIAny but limited to simple types such as int, bool and string.
callbackis called with the result of the custom command.

Implemented in CYINullInterface.

◆ IsCloudServer()

virtual bool CYICloudInterface::IsCloudServer ( )
pure virtual

Returns true if the implementation is a cloud server.

Implemented in CYINullInterface.

◆ IsLowEndDevice()

virtual bool CYICloudInterface::IsLowEndDevice ( )
pure virtual

Returns true if the device is low end.

Implemented in CYINullInterface.

◆ IsUsingNullRenderer()

virtual bool CYICloudInterface::IsUsingNullRenderer ( ) const
pure virtual

Return true if the cloud sdk is using the null renderer.

Implemented in CYINullInterface.

◆ PauseExportUpdates()

virtual void CYICloudInterface::PauseExportUpdates ( )
pure virtual

Pauses the automatic export process. Until resumed, changes to the scene tree will not result in automated exports.

See also
ResumeExportUpdates
AreExportUpdatesPaused

Implemented in CYINullInterface.

◆ RegisterDataListener()

virtual uint64_t CYICloudInterface::RegisterDataListener ( CYIString  eventId,
std::function< bool(CYIString eventId, const yi::rapidjson::Document *pEvent)>  dataFunction 
)
pure virtual

Register a data listener so that it may receive client data.

Implemented in CYINullInterface.

◆ RegisterPersistentStore()

virtual void CYICloudInterface::RegisterPersistentStore ( const CYIString name,
CYIPersistentStore pStore 
)
pure virtual

Register the given persistent store object for synchronization with the client.

Each CYIPersistentObject is mapped to a unique Roku object specified by the 'name' parameter. Earlier versions of the Roku Client synchronized all CYIPersistentStore objects with a single, hardcoded Roku object, called "PersistentStore." When upgrading from an older Cloud version to a current version, you'll need to RegisterPersistentStore() using "PersistentStore" as the name in order to retrieve persistent data saved under the old version. This function must be called in your app's UserInit function.

Implemented in CYINullInterface.

◆ RemoveModalScene()

virtual void CYICloudInterface::RemoveModalScene ( const CYIString name)
pure virtual

Remove an overlay scene from the set of registered modals.

Implemented in CYINullInterface.

◆ ReplaceSubtree()

virtual void CYICloudInterface::ReplaceSubtree ( const CYISceneNode pSubtreeRootNode,
bool  useJSON = false 
)
pure virtual

Replace the given subtree on the client. A common use of this method is to update the content data of a list. Example: ReplaceSubtree(pListView, true)

Parameters
pSubtreeRootNodeis the root of the subtree to update.
useJSONdeprecated as it is the default

Implemented in CYINullInterface.

◆ RequestPurchase()

virtual void CYICloudInterface::RequestPurchase ( const CYIString productId,
std::function< void(const CloudIAPRequestStatus &status, const CloudIAPReceipt &receipt)>  responder 
)
pure virtual

In app purchases request to purchase a given product This is an asynchronous network operation. The given responder will be invoked when complete.

◆ ResumeExportUpdates()

virtual void CYICloudInterface::ResumeExportUpdates ( )
pure virtual

Resumes the automatic export process. Changes to the scene tree will again result in automated exports.

See also
PauseExportUpdates
AreExportUpdatesPaused

Implemented in CYINullInterface.

◆ SaveChannelCredentials()

virtual void CYICloudInterface::SaveChannelCredentials ( const CYIString credentials,
std::function< void(const CloudIAPRequestStatus &status)>  responder 
)
pure virtual

Request saving the client in-app purchase channel credentials. This is an asynchronous network operation. The given responder will be invoked when complete.

Parameters
credentialsis the credentials to save
responderis the funtion pointer to be called after performing the request

Implemented in CYINullInterface.

◆ SaveInstanceState()

virtual void CYICloudInterface::SaveInstanceState ( const CYIString stringifiedState)
pure virtual

Provide the stringified state of the application to be used when restarting the app instance.

SaveInstanceState should be called as a response to the background event from ClientBackgrounded and ScreenSaverWillStart signal. If the ClientBackgrounded signal raised, the application is terminated once its instance state is saved.

Parameters
stringifiedStatecontains the string that will be provided to new incarnation of the application to rebuild the current screen and stacked screen state of the application.
See also
ClientBackgrounded
ScreenSaverWillStart

Implemented in CYINullInterface.

◆ SendAppBeacon()

virtual void CYICloudInterface::SendAppBeacon ( const CYIString beaconName)
pure virtual

Sends an app beacon of the provided name to the client.

Implemented in CYINullInterface.

◆ SendEpgContent()

virtual void CYICloudInterface::SendEpgContent ( CYISceneNode pNode,
const CloudEpgContentModel content 
)
pure virtual

Sends updated EPG content data. Notes: The given node must be specified as an EPG Grid with EXPORT_CLASS_NAME = "CYIEpgGridView".

Implemented in CYINullInterface.

◆ SendErrorMessage()

virtual void CYICloudInterface::SendErrorMessage ( const CYIString message)
pure virtual

Send the given string to be displayed as a Roku error message.

Implemented in CYINullInterface.

◆ SendFocusEpgProgram()

virtual void CYICloudInterface::SendFocusEpgProgram ( CYISceneNode pNode,
const CYIString channelTitle,
const int64_t  startTime 
)
pure virtual

Sends request focus to the specified program with given channel title and start time.

Implemented in CYINullInterface.

◆ SendFocusMap()

virtual bool CYICloudInterface::SendFocusMap ( CYISceneManager pSceneManager = nullptr)
pure virtual

Send a generated focus map to the client.

Implemented in CYINullInterface.

◆ SendRokuAnalyticsEvent()

virtual void CYICloudInterface::SendRokuAnalyticsEvent ( const CYIString eventName,
const CYIString parameters 
)
pure virtual

Send the given event and paramaters to the Roku analytics framework.

Implemented in CYINullInterface.

◆ SendScrollingTextViewUpdate()

virtual void CYICloudInterface::SendScrollingTextViewUpdate ( const CYISceneNode pScrollingTextView,
const CYIString text,
const CYIString title 
)
pure virtual

Update the text for a scrolling text view.

Implemented in CYINullInterface.

◆ SendScrollToNode()

virtual void CYICloudInterface::SendScrollToNode ( const CYIScrollingView pScrollingView,
const CYISceneNode pNode 
)
pure virtual

Scroll the given scrolling view to the provided node.

Implemented in CYINullInterface.

◆ SendStopAnimation()

virtual void CYICloudInterface::SendStopAnimation ( const CYIString animation,
const CYISceneNode pNode = nullptr 
)
pure virtual

Sends a message to the client to stop the given animation.

Implemented in CYINullInterface.

◆ SendStopVideo()

virtual void CYICloudInterface::SendStopVideo ( )
pure virtual

Sends a 'stop' command to the active video node.

Implemented in CYINullInterface.

◆ SetDefaultCloudKeyboardTitle()

virtual void CYICloudInterface::SetDefaultCloudKeyboardTitle ( const CYIString title)
pure virtual

Set the title string that will be shown when the keyboard is displayed. The default title will be superceded by an element with a title hint.

See also
SetDefaultCloudKeyboardTitle

Implemented in CYINullInterface.

◆ SetDisconnectOnInactivityEnabled()

virtual void CYICloudInterface::SetDisconnectOnInactivityEnabled ( bool  enabled)
pure virtual

Sets whether disconnect on inactivity is enabled or disabled for the application.

Note
The application must have enabled disconnect on inactivity in the clientConfig.

Implemented in CYINullInterface.

◆ SetExportHint()

virtual bool CYICloudInterface::SetExportHint ( CYISceneNode pNode,
const CYIString hintName,
const CYIString value 
)
pure virtual

Apply the given export hint to a scene node.

Implemented in CYINullInterface.

◆ SetFocusOnSceneNode()

virtual void CYICloudInterface::SetFocusOnSceneNode ( const CYISceneNode pNode)
pure virtual

Set client focus on the specified scene node.

Implemented in CYINullInterface.

◆ SetIncomingFocusStyle()

virtual void CYICloudInterface::SetIncomingFocusStyle ( CYIListView pList,
ListIncomingFocusStyle  focusStyle 
)
pure virtual

Used to set up how focus will be calculated when list recieves focus from another item.

Parameters
pListis the list that is being configured.
focusStyleis the style of focus.

Implemented in CYINullInterface.

◆ SetInitalScrollIndexWithFocus()

virtual void CYICloudInterface::SetInitalScrollIndexWithFocus ( CYIListView pList,
uint32_t  index 
)
pure virtual

Call setInitalScrollIndexWithFocus to set the initial scroll index of the list. This method will also set focus to the corresponding list item. It this API called in a react native application, it should be called via onLoad. Please do not call this method from other RN life cycle methods as this can cause incorrect application behaviour (The focus request is delayed until after the client receives the new scene graph update).

Parameters
pListis the list will receive focus.
indexcoresponds to the list item that will receive focus.

Implemented in CYINullInterface.

◆ SetNavigationPersistenceKey()

virtual void CYICloudInterface::SetNavigationPersistenceKey ( const CYIString persistenceKey)
pure virtual

Sets the persistence key for the navigate state. App will save the navigation history only if this gets called at the time of App::UserStart().

Parameters
persistenceKeyis the key for the persistence store.

Implemented in CYINullInterface.

◆ SetOutgoingFocusStyle()

virtual void CYICloudInterface::SetOutgoingFocusStyle ( CYIListView pList,
ListOutgoingFocusStyle  focusStyle 
)
pure virtual

Used to set up how focus will be calculated when list recieves focus from another item.

Parameters
pListis the list that is being configured.
focusStyleis the style of focus.

Implemented in CYINullInterface.

◆ SetSpinnerDelayMs()

virtual void CYICloudInterface::SetSpinnerDelayMs ( uint32_t  delayMs)
pure virtual

Sets the time of spinner delay in milliseconds.

Parameters
delayMsis the duration of delaying before showing in milliseconds. If hiding the spinner gets called within the duration, spinner won't show. Default value is 2000ms for Roku requirement of 3 secs with a second of margin.

Implemented in CYINullInterface.

◆ SetVideoNodeProperties()

virtual bool CYICloudInterface::SetVideoNodeProperties ( const CYIBundle properties)
pure virtual

Add video node properties such as content metadata including DRM configuration, notificationInterval, etc.

Parameters
propertiesCYIBundle of video node properties. The JSON document structure should match with the video node fields structure described in https://developer.roku.com/en-ca/docs/references/scenegraph/media-playback-nodes/video.md. Until CS-4192 and CS-4175 done, it can contain "ads" and "analytics" fields. The keys in the bundle have to be always in lower case.

Implemented in CYINullInterface.

◆ SetVideoPlayerColor()

virtual bool CYICloudInterface::SetVideoPlayerColor ( CYIAbstractVideoPlayer pVideoPlayer,
const CYIColor color 
)
pure virtual

Set the color of the video player controls. Note: Must be called after a video surface view has been associated with the player.

Implemented in CYINullInterface.

◆ SetVideoSurfaceProperties()

virtual bool CYICloudInterface::SetVideoSurfaceProperties ( const CYIBundle properties,
CYIVideoSurfaceView pVideoSurfaceView = nullptr 
)
pure virtual

Set the video surface view properties.

Parameters
propertiesCYIBundle of video surface properties such as exitonvideocomplete, handlebackkeyevent, and shouldautofocus.
pVideoSurfaceViewthe CYIVideoSurfaceView to be used for Video player. If not supplied the video surface view currently associated with the video player is used.

Implemented in CYINullInterface.

◆ SetWaitSpinnerAccessibilityAttributes()

virtual void CYICloudInterface::SetWaitSpinnerAccessibilityAttributes ( CYIAccessibilityAttributes::Accessible  accessible,
std::unique_ptr< const CYIAccessibilityAttributes pAccessibilityAttributes = nullptr 
)
pure virtual

Configure CYIAccessibilityAttributes and accessibility of the Roku wait spinner.

Implemented in CYINullInterface.

◆ ShowWaitSpinner()

virtual void CYICloudInterface::ShowWaitSpinner ( )
pure virtual

Show the wait spinner with configured delay.

See also
SetSpinnerDelayMs

Implemented in CYINullInterface.

◆ ShowWaitSpinnerNow()

virtual void CYICloudInterface::ShowWaitSpinnerNow ( )
pure virtual

Show the wait spinner right away.

Note
This call will force to show the spinner right away without respecting the configured delay duration.

Implemented in CYINullInterface.

◆ TerminateApplication()

virtual void CYICloudInterface::TerminateApplication ( )
pure virtual

Terminate the Application and return to the home screen.

Implemented in CYINullInterface.

◆ UnregisterDataListener()

virtual void CYICloudInterface::UnregisterDataListener ( CYIString  eventId,
uint64_t  listenerId 
)
pure virtual

Unregister a data listener so that it no longer receives client data.

Implemented in CYINullInterface.

◆ UnregisterPersistentStore()

virtual void CYICloudInterface::UnregisterPersistentStore ( CYIPersistentStore pStore)
pure virtual

Unregister the given persistent object so that it is no longer synchronized with the client.

Implemented in CYINullInterface.

Friends And Related Function Documentation

◆ CYICloudContext

friend class CYICloudContext
friend

◆ CYICloudInterfaceManager

friend class CYICloudInterfaceManager
friend

Member Data Documentation

◆ ClientBackgrounded

CYISignal CYICloudInterface::ClientBackgrounded

Fired when the client starts playback or inactivated.

See also
SaveInstanceState

◆ ExportComplete

CYISignal CYICloudInterface::ExportComplete

◆ ScreenSaverWillStart

CYISignal CYICloudInterface::ScreenSaverWillStart

Fired when the client notifies the screensaver is about to start. Server can take opportunity to save the instance state to client before going into screensaver mode. Client won't send the ClientBackgrounded signal while the screensaver is on.

See also
SaveInstanceState

The documentation for this class was generated from the following file: