You.i Engine
CYINullInterface Class Reference

Detailed Description

The cloud interface provides a binding to the Cloud SDK.

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

#include <YiNullInterface.h>

Inheritance diagram for CYINullInterface:

Public Member Functions

 CYINullInterface ()=default
 
virtual ~CYINullInterface ()
 
virtual bool IsCloudServer () override
 Returns true if the implementation is a cloud server. More...
 
virtual bool IsUsingNullRenderer () const override
 Return true if the cloud sdk is using the null renderer. More...
 
virtual bool SendFocusMap (CYISceneManager *=nullptr) override
 Send a generated focus map to the client. More...
 
virtual bool SetExportHint (CYISceneNode *, const CYIString &, const CYIString &) override
 Apply the given export hint to a scene node. More...
 
virtual void SetIncomingFocusStyle (CYIListView *, ListIncomingFocusStyle) override
 Used to set up how focus will be calculated when list recieves focus from another item. More...
 
virtual void SetOutgoingFocusStyle (CYIListView *, ListOutgoingFocusStyle) override
 Used to set up how focus will be calculated when list recieves focus from another item. More...
 
virtual void SetInitalScrollIndexWithFocus (CYIListView *, uint32_t) override
 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 &) override
 Add video node properties such as content metadata including DRM configuration, notificationInterval, etc. More...
 
virtual bool SetVideoSurfaceProperties (const CYIBundle &, CYIVideoSurfaceView *) override
 Set the video surface view properties. More...
 
virtual const CYIClientPlayer::PlaybackSessionInfoGetLastPlaybackSessionInfo () const override
 Get the recently updated playback session information such as bookmark and audio/cc settings. More...
 
virtual void SetFocusOnSceneNode (const CYISceneNode *) override
 Set client focus on the specified scene node. More...
 
virtual void ClearClientFocus () override
 Clear the client's focus. The server will then push its own focus state once a view has focus. More...
 
virtual bool IsLowEndDevice () override
 Returns true if the device is low end. More...
 
virtual void InvokeCommand (const CYIString, const CYIBundle &, CYIClientCallback) override
 Invoke custom client command. More...
 
virtual const CYIStringGetClientExternalIp () const override
 Return the external IP of the client. More...
 
virtual const CYIStringGetClientLocalIp () const override
 Return the local IP of the client. More...
 
virtual const glm::vec2 GetClientUIResolution () const override
 Returns the UI resolution of the client. More...
 
virtual void TerminateApplication () override
 Terminate the Application and return to the home screen. More...
 
virtual void SetDisconnectOnInactivityEnabled (bool) override
 Sets whether disconnect on inactivity is enabled or disabled for the application. More...
 
virtual void ShowWaitSpinnerNow () override
 Show the wait spinner right away. More...
 
virtual void SetSpinnerDelayMs (uint32_t) override
 Sets the time of spinner delay in milliseconds. More...
 
virtual void ShowWaitSpinner () override
 Show the wait spinner with configured delay. More...
 
virtual void HideWaitSpinner () override
 Hide the wait spinner. More...
 
virtual void SetWaitSpinnerAccessibilityAttributes (CYIAccessibilityAttributes::Accessible, std::unique_ptr< const CYIAccessibilityAttributes >) override
 Configure CYIAccessibilityAttributes and accessibility of the Roku wait spinner. More...
 
virtual void AddModalScene (const CYIString &, const CYISceneNode *, int32_t=0, std::set< CYIString >=std::set< CYIString >()) override
 Identify overlay scene to be exported with initial components. More...
 
virtual void RemoveModalScene (const CYIString &) override
 Remove an overlay scene from the set of registered modals. More...
 
virtual void SendScrollToNode (const CYIScrollingView *, const CYISceneNode *) override
 Scroll the given scrolling view to the provided node. More...
 
virtual void SendScrollingTextViewUpdate (const CYISceneNode *, const CYIString &, const CYIString &) override
 Update the text for a scrolling text view. More...
 
virtual void SetDefaultCloudKeyboardTitle (const CYIString &) override
 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 override
 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)> handler) override
 Register a data listener so that it may receive client data. More...
 
virtual void UnregisterDataListener (CYIString eventId, uint64_t listenerId) override
 Unregister a data listener so that it no longer receives client data. More...
 
virtual void RegisterPersistentStore (const CYIString &, CYIPersistentStore *) override
 Register the given persistent store object for synchronization with the client. More...
 
virtual void UnregisterPersistentStore (CYIPersistentStore *) override
 Unregister the given persistent object so that it is no longer synchronized with the client. More...
 
virtual void SendRokuAnalyticsEvent (const CYIString &, const CYIString &) override
 Send the given event and paramaters to the Roku analytics framework. More...
 
virtual void GetIAPCustomerUID (std::function< void(const CloudIAPRequestStatus &, const CloudIAPCustomerUID &)>) override
 
virtual void GetChannelCredentials (std::function< void(const CloudIAPRequestStatus &, const CloudIAPChannelCredentials &channelCredentials)>) override
 
virtual void SaveChannelCredentials (const CYIString &, std::function< void(const CloudIAPRequestStatus &status)>) override
 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 &, const CloudIAPUser &)>) override
 
virtual void GetAvailableProducts (std::function< void(const CloudIAPRequestStatus &, const std::vector< std::shared_ptr< CloudIAPProduct >> &)>) override
 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 &, const std::vector< std::shared_ptr< CloudIAPPurchase >> &)>) override
 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 &, std::function< void(const CloudIAPRequestStatus &, const CloudIAPReceipt &)>) override
 
virtual bool SetVideoPlayerColor (CYIAbstractVideoPlayer *, const CYIColor &) override
 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 () override
 Sends a 'stop' command to the active video node. More...
 
virtual bool ContentOverlaySetState (const CYIContentOverlay *, const CYIContentOverlay::State &) override
 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 &, const CYISceneNode *) override
 Sends a message to the client to stop the given animation. More...
 
virtual void SendEpgContent (CYISceneNode *, const CloudEpgContentModel &) override
 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 *, const CYIString &, const int64_t) override
 Sends request focus to the specified program with given channel title and start time. More...
 
virtual void ReplaceSubtree (const CYISceneNode *, bool) override
 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 &) override
 Send the given string to be displayed as a Roku error message. More...
 
virtual void SendAccessibilityAnnouncement (const CYIString &) override
 Send the given accessibility message to be announced on the client. More...
 
virtual void PauseExportUpdates () override
 Pauses the automatic export process. Until resumed, changes to the scene tree will not result in automated exports. More...
 
virtual void ResumeExportUpdates () override
 Resumes the automatic export process. Changes to the scene tree will again result in automated exports. More...
 
virtual bool AreExportUpdatesPaused () override
 Returns true if the automatic export process is paused. More...
 
virtual void SetNavigationPersistenceKey (const CYIString &) override
 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 override
 Gets the stringified cloud app status from client. More...
 
virtual const CYIStringGetSavedInstanceState () const override
 Retrieve the stringified saved state. More...
 
virtual void SaveInstanceState (const CYIString &) override
 Provide the stringified state of the application to be used when restarting the app instance. More...
 
virtual void EnqueuePostExportAction (std::function< void()>) override
 Enqueue an action that will execute after the next scene export. More...
 
virtual std::shared_ptr< CYIPersistentStoreFindUnusedPersistentStore (const CYIString &) override
 Retrieve a persistent store containing data that was not stored when the app is started. More...
 
virtual void SendAppBeacon (const CYIString &) override
 Sends an app beacon of the provided name to the client. More...
 
virtual void SendPlatformAnalyticsEvent (PlatformAnalyticsType, const CYIString &) override
 Sends an platform analytcs to the client. More...
 
- Public Member Functions inherited from CYICloudInterface
 CYICloudInterface ()=default
 
virtual ~CYICloudInterface ()
 
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 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 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...
 

Protected Member Functions

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

Additional Inherited Members

- Public Types inherited from CYICloudInterface
enum  InterfaceType {
  InterfaceType::NULL_INTERFACE,
  InterfaceType::CLOUD_INTERFACE
}
 
enum  ListIncomingFocusStyle {
  ListIncomingFocusStyle::SERVER,
  ListIncomingFocusStyle::CLOSEST,
  ListIncomingFocusStyle::PREVIOUS_ITEM
}
 
enum  ListOutgoingFocusStyle {
  ListOutgoingFocusStyle::SERVER,
  ListOutgoingFocusStyle::CLOSEST,
  ListOutgoingFocusStyle::CLOSEST_TO_LIST
}
 
enum  SynchronizationStatus {
  SynchronizationStatus::ReconnectedSyncNotRequired,
  SynchronizationStatus::ReconnectedSynchronized,
  SynchronizationStatus::Synchronized
}
 
enum  PlatformAnalyticsType {
  PlatformAnalyticsType::Application,
  PlatformAnalyticsType::Authentication
}
 
- Public Attributes inherited from CYICloudInterface
CYISignal< SynchronizationStatusExportComplete
 Fired after a synchronization command has been sent or after the application has rehydrated to a matched state to the reconnected client. More...
 
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...
 

Constructor & Destructor Documentation

◆ CYINullInterface()

CYINullInterface::CYINullInterface ( )
default

◆ ~CYINullInterface()

virtual CYINullInterface::~CYINullInterface ( )
inlinevirtual

Member Function Documentation

◆ AddModalScene()

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

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.

Implements CYICloudInterface.

◆ AddUnusedPersistentStoreData()

virtual void CYINullInterface::AddUnusedPersistentStoreData ( const CYIString name,
yi::rapidjson::Value *  pData 
)
inlineoverrideprotectedvirtual

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.

Implements CYICloudInterface.

◆ AreExportUpdatesPaused()

virtual bool CYINullInterface::AreExportUpdatesPaused ( )
inlineoverridevirtual

Returns true if the automatic export process is paused.

See also
PauseExportUpdates
ResumeExportUpdates

Implements CYICloudInterface.

◆ ClearClientFocus()

virtual void CYINullInterface::ClearClientFocus ( )
inlineoverridevirtual

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

Implements CYICloudInterface.

◆ ContentOverlaySetState()

virtual bool CYINullInterface::ContentOverlaySetState ( const CYIContentOverlay pNode,
const CYIContentOverlay::State state 
)
inlineoverridevirtual

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 perform 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

Implements CYICloudInterface.

◆ EnqueuePostExportAction()

virtual void CYINullInterface::EnqueuePostExportAction ( std::function< void()>  action)
inlineoverridevirtual

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

Implements CYICloudInterface.

◆ FindUnusedPersistentStore()

virtual std::shared_ptr<CYIPersistentStore> CYINullInterface::FindUnusedPersistentStore ( const CYIString name)
inlineoverridevirtual

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.

Implements CYICloudInterface.

◆ GetAvailableProducts()

virtual void CYINullInterface::GetAvailableProducts ( )
inlineoverridevirtual

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

Implements CYICloudInterface.

◆ GetChannelCredentials()

virtual void CYINullInterface::GetChannelCredentials ( std::function< void(const CloudIAPRequestStatus &, const CloudIAPChannelCredentials &channelCredentials)>  )
inlineoverridevirtual

◆ GetClientExternalIp()

virtual const CYIString& CYINullInterface::GetClientExternalIp ( ) const
inlineoverridevirtual

Return the external IP of the client.

Implements CYICloudInterface.

◆ GetClientLocalIp()

virtual const CYIString& CYINullInterface::GetClientLocalIp ( ) const
inlineoverridevirtual

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.

Implements CYICloudInterface.

◆ GetClientUIResolution()

virtual const glm::vec2 CYINullInterface::GetClientUIResolution ( ) const
inlineoverridevirtual

Returns the UI resolution of the client.

Implements CYICloudInterface.

◆ GetDefaultCloudKeyboardTitle()

virtual const CYIString& CYINullInterface::GetDefaultCloudKeyboardTitle ( ) const
inlineoverridevirtual

Get currently set default title for the cloud device.

See also
SetDefaultCloudKeyboardTitle

Implements CYICloudInterface.

◆ GetIAPCustomerUID()

virtual void CYINullInterface::GetIAPCustomerUID ( std::function< void(const CloudIAPRequestStatus &, const CloudIAPCustomerUID &)>  )
inlineoverridevirtual

◆ GetIAPUser()

virtual void CYINullInterface::GetIAPUser ( std::function< void(const CloudIAPRequestStatus &, const CloudIAPUser &)>  )
inlineoverridevirtual

◆ GetLastPlaybackSessionInfo()

virtual const CYIClientPlayer::PlaybackSessionInfo& CYINullInterface::GetLastPlaybackSessionInfo ( ) const
inlineoverridevirtual

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

See also
CYIClientPlayer::PlaybackSessionInfo

Implements CYICloudInterface.

◆ GetSavedInstanceState()

virtual const CYIString& CYINullInterface::GetSavedInstanceState ( ) const
inlineoverridevirtual

Retrieve the stringified saved state.

Implements CYICloudInterface.

◆ GetStatus()

virtual const CYIString& CYINullInterface::GetStatus ( ) const
inlineoverridevirtual

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.

Implements CYICloudInterface.

◆ GetUserPurchases()

virtual void CYINullInterface::GetUserPurchases ( )
inlineoverridevirtual

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

Implements CYICloudInterface.

◆ HideWaitSpinner()

virtual void CYINullInterface::HideWaitSpinner ( )
inlineoverridevirtual

Hide the wait spinner.

Implements CYICloudInterface.

◆ InvokeCommand()

virtual void CYINullInterface::InvokeCommand ( const CYIString  cmd,
const CYIBundle args,
CYIClientCallback  callback 
)
inlineoverridevirtual

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.

Implements CYICloudInterface.

◆ IsCloudServer()

virtual bool CYINullInterface::IsCloudServer ( )
inlineoverridevirtual

Returns true if the implementation is a cloud server.

Implements CYICloudInterface.

◆ IsLowEndDevice()

virtual bool CYINullInterface::IsLowEndDevice ( )
inlineoverridevirtual

Returns true if the device is low end.

Implements CYICloudInterface.

◆ IsUsingNullRenderer()

virtual bool CYINullInterface::IsUsingNullRenderer ( ) const
inlineoverridevirtual

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

Implements CYICloudInterface.

◆ PauseExportUpdates()

virtual void CYINullInterface::PauseExportUpdates ( )
inlineoverridevirtual

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

See also
ResumeExportUpdates
AreExportUpdatesPaused

Implements CYICloudInterface.

◆ RegisterDataListener()

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

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

Implements CYICloudInterface.

◆ RegisterPersistentStore()

virtual void CYINullInterface::RegisterPersistentStore ( const CYIString name,
CYIPersistentStore pStore 
)
inlineoverridevirtual

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.

Implements CYICloudInterface.

◆ RemoveModalScene()

virtual void CYINullInterface::RemoveModalScene ( const CYIString name)
inlineoverridevirtual

Remove an overlay scene from the set of registered modals.

Implements CYICloudInterface.

◆ ReplaceSubtree()

virtual void CYINullInterface::ReplaceSubtree ( const CYISceneNode pSubtreeRootNode,
bool  useJSON 
)
inlineoverridevirtual

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

Implements CYICloudInterface.

◆ RequestPurchase()

virtual void CYINullInterface::RequestPurchase ( const CYIString ,
std::function< void(const CloudIAPRequestStatus &, const CloudIAPReceipt &)>   
)
inlineoverridevirtual

◆ ResumeExportUpdates()

virtual void CYINullInterface::ResumeExportUpdates ( )
inlineoverridevirtual

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

See also
PauseExportUpdates
AreExportUpdatesPaused

Implements CYICloudInterface.

◆ SaveChannelCredentials()

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

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

Implements CYICloudInterface.

◆ SaveInstanceState()

virtual void CYINullInterface::SaveInstanceState ( const CYIString stringifiedState)
inlineoverridevirtual

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

Implements CYICloudInterface.

◆ SendAccessibilityAnnouncement()

virtual void CYINullInterface::SendAccessibilityAnnouncement ( const CYIString announcement)
inlineoverridevirtual

Send the given accessibility message to be announced on the client.

Implements CYICloudInterface.

◆ SendAppBeacon()

virtual void CYINullInterface::SendAppBeacon ( const CYIString eventName)
inlineoverridevirtual

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

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

Implements CYICloudInterface.

◆ SendEpgContent()

virtual void CYINullInterface::SendEpgContent ( CYISceneNode pNode,
const CloudEpgContentModel content 
)
inlineoverridevirtual

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

Implements CYICloudInterface.

◆ SendErrorMessage()

virtual void CYINullInterface::SendErrorMessage ( const CYIString message)
inlineoverridevirtual

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

Implements CYICloudInterface.

◆ SendFocusEpgProgram()

virtual void CYINullInterface::SendFocusEpgProgram ( CYISceneNode pNode,
const CYIString channelTitle,
const int64_t  startTime 
)
inlineoverridevirtual

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

Implements CYICloudInterface.

◆ SendFocusMap()

virtual bool CYINullInterface::SendFocusMap ( CYISceneManager pSceneManager = nullptr)
inlineoverridevirtual

Send a generated focus map to the client.

Implements CYICloudInterface.

◆ SendPlatformAnalyticsEvent()

virtual void CYINullInterface::SendPlatformAnalyticsEvent ( PlatformAnalyticsType  type,
const CYIString eventName 
)
inlineoverridevirtual

Sends an platform analytcs to the client.

Parameters
typeis the analytics type.
eventNamecontains the analytics event name that gets sent by the connected client.
See also
PlatformAnalyticsType

Some analytics events are required by the platform for their purpose. They are not related to any application-side business logic, but typically they are required by the platform. There are two types were defined, one is "Application", the other one is "Authentication". In the Roku client, the "Application" event messages will be converted to the "App Beacon" messages, and the "Authentication" type messages will be converted to "Roku Event Dispatcher" or "Roku Ads Framework" messages by the configuration of the app "manifest". The message's destination will be defined by the Web or Native clients as necessary in the future. The name of the events and when to send them can be decided are completely up to applications.

Implements CYICloudInterface.

◆ SendRokuAnalyticsEvent()

virtual void CYINullInterface::SendRokuAnalyticsEvent ( const CYIString eventName,
const CYIString parameters 
)
inlineoverridevirtual

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

Implements CYICloudInterface.

◆ SendScrollingTextViewUpdate()

virtual void CYINullInterface::SendScrollingTextViewUpdate ( const CYISceneNode pScrollingTextView,
const CYIString text,
const CYIString title 
)
inlineoverridevirtual

Update the text for a scrolling text view.

Implements CYICloudInterface.

◆ SendScrollToNode()

virtual void CYINullInterface::SendScrollToNode ( const CYIScrollingView pScrollingView,
const CYISceneNode pNode 
)
inlineoverridevirtual

Scroll the given scrolling view to the provided node.

Implements CYICloudInterface.

◆ SendStopAnimation()

virtual void CYINullInterface::SendStopAnimation ( const CYIString animation,
const CYISceneNode pNode 
)
inlineoverridevirtual

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

Implements CYICloudInterface.

◆ SendStopVideo()

virtual void CYINullInterface::SendStopVideo ( )
inlineoverridevirtual

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

Implements CYICloudInterface.

◆ SetDefaultCloudKeyboardTitle()

virtual void CYINullInterface::SetDefaultCloudKeyboardTitle ( const CYIString title)
inlineoverridevirtual

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

Implements CYICloudInterface.

◆ SetDisconnectOnInactivityEnabled()

virtual void CYINullInterface::SetDisconnectOnInactivityEnabled ( bool  enabled)
inlineoverridevirtual

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

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

Implements CYICloudInterface.

◆ SetExportHint()

virtual bool CYINullInterface::SetExportHint ( CYISceneNode pNode,
const CYIString hintName,
const CYIString value 
)
inlineoverridevirtual

Apply the given export hint to a scene node.

Implements CYICloudInterface.

◆ SetFocusOnSceneNode()

virtual void CYINullInterface::SetFocusOnSceneNode ( const CYISceneNode pNode)
inlineoverridevirtual

Set client focus on the specified scene node.

Implements CYICloudInterface.

◆ SetIncomingFocusStyle()

virtual void CYINullInterface::SetIncomingFocusStyle ( CYIListView pList,
ListIncomingFocusStyle  focusStyle 
)
inlineoverridevirtual

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.

Implements CYICloudInterface.

◆ SetInitalScrollIndexWithFocus()

virtual void CYINullInterface::SetInitalScrollIndexWithFocus ( CYIListView pList,
uint32_t  index 
)
inlineoverridevirtual

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.

Implements CYICloudInterface.

◆ SetNavigationPersistenceKey()

virtual void CYINullInterface::SetNavigationPersistenceKey ( const CYIString persistenceKey)
inlineoverridevirtual

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.

Implements CYICloudInterface.

◆ SetOutgoingFocusStyle()

virtual void CYINullInterface::SetOutgoingFocusStyle ( CYIListView pList,
ListOutgoingFocusStyle  focusStyle 
)
inlineoverridevirtual

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.

Implements CYICloudInterface.

◆ SetSpinnerDelayMs()

virtual void CYINullInterface::SetSpinnerDelayMs ( uint32_t  delayMs)
inlineoverridevirtual

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.

Implements CYICloudInterface.

◆ SetVideoNodeProperties()

virtual bool CYINullInterface::SetVideoNodeProperties ( const CYIBundle properties)
inlineoverridevirtual

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.

Implements CYICloudInterface.

◆ SetVideoPlayerColor()

virtual bool CYINullInterface::SetVideoPlayerColor ( CYIAbstractVideoPlayer pVideoPlayer,
const CYIColor color 
)
inlineoverridevirtual

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

Implements CYICloudInterface.

◆ SetVideoSurfaceProperties()

virtual bool CYINullInterface::SetVideoSurfaceProperties ( const CYIBundle properties,
CYIVideoSurfaceView pVideoSurfaceView 
)
inlineoverridevirtual

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.

Implements CYICloudInterface.

◆ SetWaitSpinnerAccessibilityAttributes()

virtual void CYINullInterface::SetWaitSpinnerAccessibilityAttributes ( CYIAccessibilityAttributes::Accessible  accessible,
std::unique_ptr< const CYIAccessibilityAttributes pAccessibilityAttributes 
)
inlineoverridevirtual

Configure CYIAccessibilityAttributes and accessibility of the Roku wait spinner.

Implements CYICloudInterface.

◆ ShowWaitSpinner()

virtual void CYINullInterface::ShowWaitSpinner ( )
inlineoverridevirtual

Show the wait spinner with configured delay.

See also
SetSpinnerDelayMs

Implements CYICloudInterface.

◆ ShowWaitSpinnerNow()

virtual void CYINullInterface::ShowWaitSpinnerNow ( )
inlineoverridevirtual

Show the wait spinner right away.

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

Implements CYICloudInterface.

◆ TerminateApplication()

virtual void CYINullInterface::TerminateApplication ( )
inlineoverridevirtual

Terminate the Application and return to the home screen.

Implements CYICloudInterface.

◆ UnregisterDataListener()

virtual void CYINullInterface::UnregisterDataListener ( CYIString  eventId,
uint64_t  listenerId 
)
inlineoverridevirtual

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

Implements CYICloudInterface.

◆ UnregisterPersistentStore()

virtual void CYINullInterface::UnregisterPersistentStore ( CYIPersistentStore pStore)
inlineoverridevirtual

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

Implements CYICloudInterface.


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