Package sage.api

Class Global


  • public class Global
    extends java.lang.Object
    System methods used for dealing with Sage specifics
    • Constructor Summary

      Constructors 
      Constructor Description
      Global()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Object AddGlobalContext​(java.lang.String Name, java.lang.Object Value)
      Sets the variable with the specified name to the specified value.
      java.lang.Object AddStaticContext​(java.lang.String Name, java.lang.Object Value)
      Sets the variable with the specified name to the specified value.
      void ApplyServiceLevelToLineup​(java.lang.String Lineup, int ServiceLevel)
      Applies a service level to a given lineup.
      boolean AreAiringsSameShow​(sage.Airing Airing1, sage.Airing Airing2)
      Returns true if two Airings represent the same Show.
      boolean AreScreenshotsSupported()
      Returns true if it's possible to take screenshots of the UI using the API on this UI client
      boolean AreThereUnresolvedConflicts()
      Returns whether or not there are unresolved scheduling conflicts
      void CachePlaceshifterLogin()
      This is used to store an authentication block on the current client that it can use in the future to automatically connect to this server w/out having to login.
      boolean CanCachePlaceshifterLogin()
      This indicates whether the server and the client both support caching of placeshifter logins.
      void CancelBackgroundFileDownload​(java.io.File DestFile)
      Cancels a previous request that was made to perform a background file download.
      void CancelFileCopy()
      Cancels a previous request that was made to perform a file copy
      void CancelFileDownload()
      Cancels a previous request that was made to perform a file download
      java.lang.Object CDBurnTheBurnList​(sage.Playlist BurnList)
      Instructs the CD burning engine inside SageTV to start prepping the specified Playlist to be burned to a CD, and then perform the actual burn.
      void CDCancelBurn()
      Cancels a previous request that was made to perform CD burning.
      void CDCancelRip()
      Cancels a previous request that was made to perform CD ripping
      java.lang.Object CDGetCurrentBurnStatus()
      Gets the current status of a previously invoked CD burning process.
      java.lang.Object CDGetCurrentRipStatus()
      Gets the current status of a previously invoked CD ripping process.
      java.lang.Object CDRipToLibrary​(java.io.File LibraryDir, java.lang.String BitrateKbps)
      Instructs the CD ripping engine to rip the contents of a CD and encode it in MP3 format and then store it in the music library.
      void CloseOptionsMenu()
      Closes the last OptionsMenu that was shown and continues execution of the Action chain that spawned that OptionsMenu at the sibling after this OptionsMenu.
      boolean CloseOptionsMenu​(java.lang.String WidgetName, boolean WaitForClose)
      Closes the OptionsMenu who's Widget name (or themed Widget name) matches that of the argument and continues execution of the Action chain that spawned that OptionsMenu at the sibling after this OptionsMenu.
      java.lang.Object CreateTimedRecording​(sage.Channel Channel, long StartTime, long StopTime, java.lang.String Recurrence)
      Creates a new time based recording for SageTV.
      void DebugLog​(java.lang.String DebugString)
      Prints out a message to SageTV's debug log
      java.lang.String[] DiscoverSageTVServers​(long Timeout)
      Returns a list of the SageTV servers on the network.
      java.lang.Object DVDBurnTheBurnList​(sage.Playlist BurnList)
      Instructs the DVD burning engine inside SageTV to start prepping the specified Playlist to be burned to a DVD, and then perform the actual burn.
      void DVDCancelBurn()
      Cancels a previous request that was made to perform DVD burning.
      java.lang.Object DVDGetCurrentBurnStatus()
      Gets the current status of a previously invoked DVD burning process.
      boolean EnsureVisibilityForVariable​(java.lang.String Name, java.lang.Object Value, int DisplayIndex)
      Searches the tables in the current menu for a cell that matches the passed in name/value pair; if found it will ensure that it is currently visible in the UI at the specified visual index of the table.
      void Exit()
      Causes the SageTV application to terminate.
      void Fork()
      Spawns a new thread of execution that will be used for further processing of Widget chain.
      java.util.Vector GetAiringsThatWontBeRecorded​(boolean OnlyUnresolved)
      Returns all of the Airings that the user has requested to record that SageTV will not be recording.
      java.lang.String[] GetAllLineups()
      Returns the name of all the EPG lineups in the system
      long GetApplicationLaunchTime()
      Returns the time that the SageTV application was instantiated.
      java.lang.Object GetBackgroundFileDownloadStatus​(java.io.File DestFile)
      Gets the current status of a previously invoked file background download process.
      long GetBackgroundFileDownloadStreamTime​(java.io.File DestFile)
      Gets the current stream time of a previously invoked file download process.
      long GetBackgroundFileDownloadTotalSize​(java.io.File DestFile)
      Gets the total size of the specified background download target.
      java.lang.Object GetChildUIComponentForVariable​(java.lang.Object UIComponent, java.lang.String MatchName, java.lang.Object MatchValue)
      Searches all child UI elements in of the specified UIComponent until it finds one that has a variable with the specified name matching the specified value.
      java.lang.String GetClientServerConnectionProgress()
      Returns a string describing the state of the client/server connection process.
      java.lang.String[] GetConnectedClients()
      Returns a list of all the clients that are currently connected to this server.
      sage.MediaFile[] GetCurrentlyRecordingMediaFiles()
      Returns a list of all of the files that SageTV is currently recording
      java.lang.Object GetDataFromTableFocusedOffset​(java.lang.Object UIComponent, int Offset, boolean WrapIndex)
      Gets the data value for the table that is used for the cell at the specified position relative to what is currently focused for the table.
      java.lang.Object GetDataFromTableVisiblePosition​(java.lang.Object UIComponent, int Offset, boolean WrapIndex)
      Gets the data value for the table that is used for the cell at the specified position relative to what is currently visible for the table.
      java.lang.String GetDisplayResolution()
      Returns a string describing the current display resolution set
      java.lang.String GetDisplayResolutionDetails​(java.lang.String Resolution)
      Returns the detailed format description for the specific resolution returned from GetDisplayResolutionOptions() NOTE: This API call is only valid on embedded platforms.
      int GetDisplayResolutionHeight()
      Returns the height in pixels of the current display resolution set
      java.lang.String[] GetDisplayResolutionOptions()
      Returns a list of the possible display resolutions.
      int GetDisplayResolutionWidth()
      Returns the width in pixels of the current display resolution set
      java.awt.Panel GetEmbeddedPanel()
      Gets a java.awt.Panel which can be used for embedding Java UI elements directly into SageTV
      java.lang.Object GetEPGProperty​(java.lang.String EPGDataSource, java.lang.String Property, java.lang.String Parameter)
      Gets a property from a specific EPG data source with an optional parameter
      java.lang.String GetEPGUpdateState()
      Returns a string describing the state of the epg system.
      java.lang.Object GetFileCopyStatus()
      Gets the current status of a previously invoked file copy process.
      java.lang.Object GetFileDownloadStatus()
      Gets the current status of a previously invoked file download process.
      long GetFileDownloadStreamTime()
      Gets the current stream time of a previously invoked file download process.
      boolean GetFocusContext()
      Copies all variables from the currently focused UI element's variable context to the current context of the calling Action.
      int GetFullUIHeight()
      Returns the height in pixels of the user interface for the calling SageTV UI context.
      int GetFullUIWidth()
      Returns the width in pixels of the user interface for the calling SageTV UI context.
      java.util.Map GetHotplugStorageMap()
      Returns a map of name->file for any hotplug storage devies on the system.
      long GetLastEPGDownloadTime()
      Returns the last time that SageTV did an EPG update.
      java.lang.Object GetLineupsForZipCodeFromEPGServer​(java.lang.String ZipCode)
      Gets a list from the EPG server of all the possible EPG Lineups that are available in a given zip code
      java.lang.Object GetLocalMarketsFromEPGServer()
      Gets a list of all the possible United States local broadcast markets from the EPG server
      sage.MetaImage GetLogo​(java.lang.String LogoName)
      Gets an Image object that represents the specified name.
      java.lang.String GetOS()
      Gets the name of the operating system that is being used.
      java.lang.String[] GetPreferredDisplayResolutions()
      Returns a list of the preferred display resolutions.
      sage.Airing[] GetRecentlyWatched​(long DurationToLookBack)
      Gets a list of all of the Airings that have been watched within the specified amount of time
      java.lang.String GetRemoteClientVersion()
      Returns the version string for this connected remote client
      java.lang.String GetRemoteUIType()
      Returns the type of client that is connected on this remote interface
      java.util.Vector GetSageCommandNames()
      Gets the names of all of the SageTV commands that are available in the system
      sage.Airing[] GetScheduledRecordings()
      Gets a list of all of the Airings that SageTV is planning to record in the future
      sage.Airing[] GetScheduledRecordingsForDevice​(java.lang.String CaptureDevice)
      Gets a list of all of the Airings that SageTV is planning to record in the future on the specified CaptureDevice
      sage.Airing[] GetScheduledRecordingsForDeviceForTime​(java.lang.String CaptureDevice, long StartTime, long StopTime)
      Gets a list of all of the Airings that SageTV is planning on recording during the specified time span on a specified CaptureDevice
      sage.Airing[] GetScheduledRecordingsForTime​(long StartTime, long StopTime)
      Gets a list of all of the Airings that SageTV is planning on recording during the specified time span
      java.lang.String GetServerAddress()
      Gets the hostname of the SageTV server if this is a client, otherwise it returns the name of the host SageTV is running on
      sage.Airing[] GetSuggestedIntelligentRecordings()
      Gets a list of all of the Airings that SageTV would record if Intelligent Recording was enabled.
      int GetTableFocusedPosition​(java.lang.Object UIComponent)
      Gets the table position that currently has focus in the specified table.
      int GetTableFocusedVisibleColumn​(java.lang.Object UIComponent)
      Gets the column number that currently has focus in the specified table.
      int GetTableFocusedVisiblePosition​(java.lang.Object UIComponent)
      Gets the visible table position that currently has focus in the specified table.
      int GetTableFocusedVisibleRow​(java.lang.Object UIComponent)
      Gets the row number that currently has focus in the specified table.
      java.lang.String GetTextForUIComponent​(java.lang.Object UIComponent)
      Gets the value displayed for the textual component of the specified UI object.
      long GetTimeUntilNextEPGDownload()
      The amount of time in milliseconds until SageTV will perform an EPG update again.
      long GetTotalDiskspaceAvailable()
      Gets the total diskspace available for television recording by SageTV.
      long GetTotalLibraryDuration()
      Returns the total duration of all of the content in the media library
      long GetTotalVideoDuration()
      Returns the total duration of all of the recorded television content
      java.lang.Object GetUIComponentContext()
      Returns the UI component that this execution originated from.
      java.lang.Object GetUIComponentForVariable​(java.lang.String MatchName, java.lang.Object MatchValue)
      Searches all UI elements in the current menu until it finds one that has a variable with the specified name matching the specified value.
      int GetUIComponentHeight​(java.lang.Object UIComponent)
      Returns the height in pixels in the UI of the specified UI component.
      float GetUIComponentHeightf​(java.lang.Object UIComponent)
      Returns the height in the UI of the specified UI component relative to the entire UI height.
      java.lang.Object GetUIComponentLastFocusedChild​(java.lang.Object UIComponent)
      If the specified component currently has a focused child; that child's UI object will be returned.
      int GetUIComponentPositionX​(java.lang.Object UIComponent)
      Returns the X position in pixels in the UI of the specified UI component.
      float GetUIComponentPositionXf​(java.lang.Object UIComponent)
      Returns the X position in the UI of the specified UI component.
      int GetUIComponentPositionY​(java.lang.Object UIComponent)
      Returns the Y position in pixels in the UI of the specified UI component.
      float GetUIComponentPositionYf​(java.lang.Object UIComponent)
      Returns the Y position in the UI of the specified UI component.
      int GetUIComponentWidth​(java.lang.Object UIComponent)
      Returns the width in pixels in the UI of the specified UI component.
      int GetUIComponentWidthf​(java.lang.Object UIComponent)
      Returns the width in the UI of the specified UI component relative to the entire UI width.
      java.lang.String GetUIContextName()
      Returns the name of the UI context that makes the API call.
      java.lang.String[] GetUIContextNames()
      Returns a list of the names of the different UI contexts that are available.
      long GetUsedLibraryDiskspace()
      Returns the total number of bytes on disk used by the content in the imported video, picturees and music libraries
      long GetUsedVideoDiskspace()
      Returns the total number of bytes on disk used by recorded television content
      java.lang.Object GetVariableFromContext​(java.lang.String MatchName, java.lang.Object MatchValue, java.lang.String LookupName)
      Searches all UI elements in the current menu until it finds one that has a variable with the specified name matching the specified value.
      java.lang.Object GetVariableFromUIComponent​(java.lang.Object UIComponent, java.lang.String VarName)
      Retrieves the variable with the specified name from the context of the passed in UIComponent.
      boolean GetVisibilityForVariable​(java.lang.String MatchName, java.lang.Object MatchValue)
      Searches all UI elements in the current menu until it finds one that has a variable with the specified name matching the specified value.
      boolean IsAsleep()
      Returns true if SageTV is in the Sleep state.
      boolean IsBackgroundFileDownloadProgressivePlay​(java.io.File DestFile)
      Returns whether or not the current file being downloaded can be played back while being downloaded.
      boolean IsChannelDownloadComplete​(java.lang.String Lineup)
      Returns true if the channel download has been completed on the specified lineup
      boolean IsClient()
      Returns true if this is an instance of SageTV Client
      boolean IsClientDisconnected()
      Returns true if this is an instance of SageTVClient (or a remote client connected via SageTVClient) and there is currently not a connection to the server.
      boolean IsDesktopUI()
      Returns true if this UI is being run in a desktop environment.
      boolean IsDoingLibraryImportScan()
      Returns true if the server is currently scanning the import directories for new files
      boolean IsEmbeddedServer()
      Returns true if running on an 'embedded' platform in standalone mode or running as a SageTV Client that is connected to a server running on an embedded platform.
      boolean IsEmbeddedSystem()
      Returns true if running on an 'embedded' platform.
      boolean IsFileDownloadProgressivePlay()
      Returns whether or not the current file being downloaded can be played back while being downloaded.
      boolean IsFullScreen()
      Returns whether or not SageTV is in full screen mode
      boolean IsLinuxOS()
      Returns true if SageTV is currently running on a Linux operating system.
      boolean IsMacOS()
      Returns true if SageTV is currently running on a Macintosh operating system.
      boolean IsOptionsMenuOpen()
      Returns true if an options menu is currently open in the UI.
      boolean IsPVR()
      Returns true if running on a system or connected to a server that has PVR functionality.
      boolean IsRemoteUI()
      Returns true if this UI is being remoted onto another device such as a media extender.
      boolean IsSDEPGServiceAvailable()
      Returns true if the Schedules Direct EPG service is available.
      boolean IsServerUI()
      Returns true if this UI is being run on the same system as the SageTV Server it's connected to.
      boolean IsTableTransitionToNext​(java.lang.Object UIComponent)
      Returns true if the specified table argument (or the first table parent of the argument) is on the leading edge of a transition to a cell after the current one.
      boolean IsTableTransitionToPrevious​(java.lang.Object UIComponent)
      Returns true if the specified table argument (or the first table parent of the argument) is on the leading edge of a transition to a cell before the current one.
      boolean IsTouchUI()
      Returns true if this UI is being run in a touch environment, such as a phone or tablet.
      boolean IsTransitioningFromMenu​(java.lang.String MenuName)
      Returns true if the specified menu name matches the name of the menu widget for the previously loaded menu.
      boolean IsTransitioningFromMenus​(java.lang.String[] MenuNames)
      Returns true if one of the specified menu names matches the name of the menu widget for the previously loaded menu.
      boolean IsTransitioningToMenu​(java.lang.String MenuName)
      Returns true if the specified menu name matches the name of the menu widget that the UI is in the process of transitioning to.
      boolean IsTransitioningToMenus​(java.lang.String[] MenuNames)
      Returns true if one of the specified menu name matches the name of the menu widget that the UI is in the process of transitioning to.
      boolean IsWindowsOS()
      Returns true if SageTV is currently running on a Windows operating system.
      void PassiveListen()
      Should only be used in the Action chain from a Listener Widget.
      void PrepareForFirmwareLoad()
      Prepares the device for a firmware download & flash.
      void Refresh()
      Re-evaluates and redraws all UI elements on the current menu
      void RefreshArea​(java.lang.String WidgetName)
      Finds the Widget on the current menu who's name matches the argument and then re-evaluates and redraws all UI elements, and their children for this Widget
      void RefreshAreaForVariable​(java.lang.String Name, java.lang.Object Value)
      Searches all visible UI elements in the current menu finding any that have a variable with the specified name matching the specified value.
      void ReloadSystemHooks()
      This is a Windows only API call which tells SageTV to unload and then reload any system hooks it has installed.
      boolean RemoveUnusedLineups()
      Removes all of the lineups from SageTV's configuration that are no longer in use by a CaptureDevice
      void Repaint()
      Redraws all UI elements on the current menu
      void RepaintArea​(java.lang.String WidgetName)
      Finds the Widget on the current menu who's name matches the argument and then redraws all UI elements, and their children for this Widget
      void RunLibraryImportScan​(boolean WaitUntilDone)
      Tells SageTV to run a library import scan now.
      void SageCommand​(java.lang.String Command)
      Causes the corresponding Sage Command to be executed just like it would be if the user performed it.
      void SageCommand​(java.lang.String Command, java.lang.Object Payload)
      Causes the corresponding Sage Command to be executed just like it would be if the user performed it.
      boolean SaveScreenshotToFile​(java.io.File FilePath)
      Takes a screenshot of the current UI and saves it to the specified file in PNG format.
      java.lang.Object SendEventToUIComponent​(java.lang.Object UIComponent, java.lang.String Command, int RepeatCount)
      Sends an event to a specific UI component for processing.
      void SetDisplayResolution​(java.lang.String Resolution)
      Sets the current output display resolution.
      void SetEmbeddedPanelBounds​(float x, float y, float width, float height)
      Sets the bounding region to be used for the embedded panel.
      java.lang.Object SetEPGProperty​(java.lang.String EPGDataSource, java.lang.String Property, java.lang.String Value)
      Sets a property for a specific EPG data source to the provided value
      boolean SetFocusForVariable​(java.lang.String Name, java.lang.Object Value)
      Searches all UI elements in the current menu until it finds one that has a variable with the specified name matching the specified value.
      boolean SetFocusToUIComponent​(java.lang.Object UIComponent)
      Sets focus in the specified UI component.
      void SetFullScreen​(boolean FullScreen)
      Sets SageTV to be in full or non-full screen mode
      boolean SetRemoteEventEncryptionEnabled​(boolean EnableEncryption)
      This is used to enable/disable encryption on the event channel for the SageTV MiniClient.
      void SetVariableForUIComponent​(java.lang.Object UIComponent, java.lang.String VarName, java.lang.Object VarValue)
      Sets the variable with the specified name in the context of the passed in UIComponent.
      boolean StartBackgroundFileDownload​(java.lang.String ServerAddress, java.lang.String SourceFile, java.io.File DestFile, java.util.Properties RequestProperties)
      Instructs the file transfer engine to download the specified file from the server to the local destination file.
      boolean StartCircularFileDownload​(java.lang.String ServerAddress, java.lang.String SourceFile, java.io.File DestFile)
      Instructs the file transfer engine to download the specified file from the server to the local destination file.
      boolean StartCircularFileDownload​(java.lang.String ServerAddress, java.lang.String SourceFile, java.io.File DestFile, java.util.Properties RequestProperties)
      Instructs the file transfer engine to download the specified file from the server to the local destination file.
      java.lang.Object StartFileCopy​(java.lang.String Filename, java.lang.String SourceDirectory, java.io.File DestDirectory)
      Instructs the file transfer engine to copy the specified file(s) from the source directory to the destination directory.
      boolean StartFileDownload​(java.lang.String ServerAddress, java.lang.String SourceFile, java.io.File DestFile)
      Instructs the file transfer engine to download the specified file from the server to the local destination file.
      boolean StartFileDownload​(java.lang.String ServerAddress, java.lang.String SourceFile, java.io.File DestFile, java.util.Properties RequestProperties)
      Instructs the file transfer engine to download the specified file from the server to the local destination file.
      void SwitchEmbeddedModeTo​(java.lang.String NewMode)
      Executes a predefined application in the context of an embedded client.
      void TransmitCommandUsingInfraredTuningPlugin​(java.lang.String TuningPlugin, int TuningPluginPort, java.lang.String RemoteName, java.lang.String CommandName, int RepeatFactor)
      Causes SageTV to instruct the specified tuning plugin to send a command
      void UpdateLocatorServer()
      This API call can be used to tell SageTV to do an update with the Locator server right now.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Global

        public Global()
    • Method Detail

      • Refresh

        public void Refresh()
        Re-evaluates and redraws all UI elements on the current menu
      • RefreshArea

        public void RefreshArea​(java.lang.String WidgetName)
        Finds the Widget on the current menu who's name matches the argument and then re-evaluates and redraws all UI elements, and their children for this Widget
        Parameters:
        WidgetName - the name that a UI component's Widget must match, if null or zero length, then this is the same as calling Refresh()
      • RefreshAreaForVariable

        public void RefreshAreaForVariable​(java.lang.String Name,
                                           java.lang.Object Value)
        Searches all visible UI elements in the current menu finding any that have a variable with the specified name matching the specified value. For any elements it finds, it will re-evaluate and redraws its UI elements, and its children
        Parameters:
        Name - the name of the variable to match
        Value - the value of the variable to match on
        Since:
        6.6
      • Repaint

        public void Repaint()
        Redraws all UI elements on the current menu
      • RepaintArea

        public void RepaintArea​(java.lang.String WidgetName)
        Finds the Widget on the current menu who's name matches the argument and then redraws all UI elements, and their children for this Widget
        Parameters:
        WidgetName - the name that a UI component's Widget must match, if null or zero length, then this is the same as calling Repaint()
      • AddStaticContext

        public java.lang.Object AddStaticContext​(java.lang.String Name,
                                                 java.lang.Object Value)
        Sets the variable with the specified name to the specified value. This variable will exist for the lifetime of the current Menu. When the next Menu transition occurs, all values in the static context will be copied to the highest level context for the new Menu. The static context is then cleared. This is the way you can pass an Object from one menu to another, an example is showing the detailed info for an Airing by adding the Airing to the static context and then transitioning to a Menu that will display the details for that Airing.
        Parameters:
        Name - the name to use for this 'static context' variable
        Value - the value to set this 'static context' variable to
        Returns:
        the passed in Value
      • AddGlobalContext

        public java.lang.Object AddGlobalContext​(java.lang.String Name,
                                                 java.lang.Object Value)
        Sets the variable with the specified name to the specified value. This variable will exist for the lifetime of the SageTV application and is always in scope for all expression evaluation. This is a 'global variable'.
        Parameters:
        Name - the name to use for this 'global context' variable
        Value - the value to set this 'global context' variable to
        Returns:
        the passed in Value
      • AreThereUnresolvedConflicts

        public boolean AreThereUnresolvedConflicts()
        Returns whether or not there are unresolved scheduling conflicts
        Returns:
        true if there are unresolved scheduling conflicts, false otherwise
      • IsAsleep

        public boolean IsAsleep()
        Returns true if SageTV is in the Sleep state.
        Returns:
        true if SageTV is in the Sleep state
      • GetTotalDiskspaceAvailable

        public long GetTotalDiskspaceAvailable()
        Gets the total diskspace available for television recording by SageTV. This is the unused space in the video directories.
        Returns:
        the total diskspace available for television recording by SageTV (in bytes)
      • GetTotalLibraryDuration

        public long GetTotalLibraryDuration()
        Returns the total duration of all of the content in the media library
        Returns:
        the total duration of all of the content in the media library in milliseconds
      • GetTotalVideoDuration

        public long GetTotalVideoDuration()
        Returns the total duration of all of the recorded television content
        Returns:
        the total duration of all of the recorded television content in milliseconds
      • GetUsedLibraryDiskspace

        public long GetUsedLibraryDiskspace()
        Returns the total number of bytes on disk used by the content in the imported video, picturees and music libraries
        Returns:
        the total number of bytes on disk used by the content in the imported video, picturees and music libraries
      • GetUsedVideoDiskspace

        public long GetUsedVideoDiskspace()
        Returns the total number of bytes on disk used by recorded television content
        Returns:
        the total number of bytes on disk used by recorded television content
      • AreAiringsSameShow

        public boolean AreAiringsSameShow​(sage.Airing Airing1,
                                          sage.Airing Airing2)
        Returns true if two Airings represent the same Show. This means that they both are the same content (i.e. one is a repeat of the other) Just because two Airings use the same Show object (in terms of object reference) doesn't mean this call will return true.
        Parameters:
        Airing1 - one of the two Airing objects to compare
        Airing2 - the other Airing object to compare
        Returns:
        true if two Airings represent the same Show, false otherwise
      • GetLastEPGDownloadTime

        public long GetLastEPGDownloadTime()
        Returns the last time that SageTV did an EPG update. The returned value uses the same units as java.lang.System.currentTimeMillis()
        Returns:
        the last time that SageTV did an EPG update
      • GetLogo

        public sage.MetaImage GetLogo​(java.lang.String LogoName)
        Gets an Image object that represents the specified name. This is normally used for Channel Logos.
        Parameters:
        LogoName - the name to use to lookup the logo image
        Returns:
        the image object that corresponds to the specified name if one exists, the null image otherwise
      • GetTimeUntilNextEPGDownload

        public long GetTimeUntilNextEPGDownload()
        The amount of time in milliseconds until SageTV will perform an EPG update again. Zero if no update is planned.
        Returns:
        the amount of time in milliseconds until SageTV will perform an EPG update again. Zero if no update is planned
      • GetAllLineups

        public java.lang.String[] GetAllLineups()
        Returns the name of all the EPG lineups in the system
        Returns:
        a list of all the names of the EPG lineups in the system
      • IsChannelDownloadComplete

        public boolean IsChannelDownloadComplete​(java.lang.String Lineup)
        Returns true if the channel download has been completed on the specified lineup
        Parameters:
        Lineup - the name of the Lineup
        Returns:
        true if the channel download has been completed on the specified lineup, false otherwise
      • GetEPGProperty

        public java.lang.Object GetEPGProperty​(java.lang.String EPGDataSource,
                                               java.lang.String Property,
                                               java.lang.String Parameter)
        Gets a property from a specific EPG data source with an optional parameter
        Parameters:
        EPGDataSource - the name of the EPG data source
        Property - the property name to get
        Parameter - optional parameter
        Returns:
        the value of the requested property
        Since:
        9.0
      • SetEPGProperty

        public java.lang.Object SetEPGProperty​(java.lang.String EPGDataSource,
                                               java.lang.String Property,
                                               java.lang.String Value)
        Sets a property for a specific EPG data source to the provided value
        Parameters:
        EPGDataSource - the name of the EPG data source
        Property - the property name to set
        Value - the value to set
        Returns:
        result of setting the property
        Since:
        9.0
      • GetLocalMarketsFromEPGServer

        public java.lang.Object GetLocalMarketsFromEPGServer()
        Gets a list of all the possible United States local broadcast markets from the EPG server
        Returns:
        a String[] of all the possible United States local broadcast markets from the EPG server or a String error message of "NO_KEY", "INVALID_KEY", or "CONNECTION_FAILURE"
      • GetLineupsForZipCodeFromEPGServer

        public java.lang.Object GetLineupsForZipCodeFromEPGServer​(java.lang.String ZipCode)
        Gets a list from the EPG server of all the possible EPG Lineups that are available in a given zip code
        Parameters:
        ZipCode - the zip code to search for EPG lineups in
        Returns:
        a String[] from the EPG server of all the possible EPG lineups in the specified zip code or a String error message of "NO_KEY", "INVALID_KEY", or "CONNECTION_FAILURE"
      • GetCurrentlyRecordingMediaFiles

        public sage.MediaFile[] GetCurrentlyRecordingMediaFiles()
        Returns a list of all of the files that SageTV is currently recording
        Returns:
        a list of all of the files that SageTV is currently recording
      • GetSuggestedIntelligentRecordings

        public sage.Airing[] GetSuggestedIntelligentRecordings()
        Gets a list of all of the Airings that SageTV would record if Intelligent Recording was enabled. This does not include Manual Recordings or Favorites.
        Returns:
        a list of all of the Airings that SageTV would record if Intelligent Recording was enabled.
        Since:
        4.1
      • GetScheduledRecordings

        public sage.Airing[] GetScheduledRecordings()
        Gets a list of all of the Airings that SageTV is planning to record in the future
        Returns:
        a list of all of the Airings that SageTV is planning to record in the future
      • GetScheduledRecordingsForDevice

        public sage.Airing[] GetScheduledRecordingsForDevice​(java.lang.String CaptureDevice)
        Gets a list of all of the Airings that SageTV is planning to record in the future on the specified CaptureDevice
        Parameters:
        CaptureDevice - the name of a CaptureDevice for SageTV to get the scheduled recordings for
        Returns:
        a list of all of the Airings that SageTV is planning to record in the future on the specified CaptureDevice
      • GetScheduledRecordingsForTime

        public sage.Airing[] GetScheduledRecordingsForTime​(long StartTime,
                                                           long StopTime)
        Gets a list of all of the Airings that SageTV is planning on recording during the specified time span
        Parameters:
        StartTime - the starting time to get all of the scheduled recordings for
        StopTime - the ending time to get all of the scheduled recordings for
        Returns:
        a list of all of the Airings that SageTV is planning on recording during the specified start-stop time window
      • GetScheduledRecordingsForDeviceForTime

        public sage.Airing[] GetScheduledRecordingsForDeviceForTime​(java.lang.String CaptureDevice,
                                                                    long StartTime,
                                                                    long StopTime)
        Gets a list of all of the Airings that SageTV is planning on recording during the specified time span on a specified CaptureDevice
        Parameters:
        CaptureDevice - the name of a CaptureDevice for SageTV to get the scheduled recordings for
        StartTime - the starting time to get all of the scheduled recordings for
        StopTime - the ending time to get all of the scheduled recordings for
        Returns:
        a list of all of the Airings that SageTV is planning on recording during the specified start-stop time window on the specified CaptureDevice
      • GetRecentlyWatched

        public sage.Airing[] GetRecentlyWatched​(long DurationToLookBack)
        Gets a list of all of the Airings that have been watched within the specified amount of time
        Parameters:
        DurationToLookBack - tha amount of time in milliseconds that should be searched for watched Airings
        Returns:
        a list of all of the Airings that have been watched within the specified amount of time
      • RunLibraryImportScan

        public void RunLibraryImportScan​(boolean WaitUntilDone)
        Tells SageTV to run a library import scan now. This will scan all of the library import directories for new content.
        Parameters:
        WaitUntilDone - if this parameter is true then this call will not return until SageTV has finished the import scan, otherwise it returns immediately
      • Exit

        public void Exit()
        Causes the SageTV application to terminate. If this is called from the non-primary UI session then it will terminate the UI session it is called from.
      • SageCommand

        public void SageCommand​(java.lang.String Command)
        Causes the corresponding Sage Command to be executed just like it would be if the user performed it. These are always done asynchronously with the exception of "Back" and "Forward" since those effect the current UI and may be used to override a menu transition.
        Parameters:
        Command - the name of the Sage Command to execute
      • SageCommand

        public void SageCommand​(java.lang.String Command,
                                java.lang.Object Payload)
        Causes the corresponding Sage Command to be executed just like it would be if the user performed it. These are always done asynchronously with the exception of "Back" and "Forward" since those effect the current UI and may be used to override a menu transition. The payload will be passed along and be accessible in the listener object in the STV.
        Parameters:
        Command - the name of the Sage Command to execute
        Payload - an object to pass along with the event
        Since:
        8.1
      • RemoveUnusedLineups

        public boolean RemoveUnusedLineups()
        Removes all of the lineups from SageTV's configuration that are no longer in use by a CaptureDevice
        Returns:
        true if any lineups were removed, false otherwise
      • GetApplicationLaunchTime

        public long GetApplicationLaunchTime()
        Returns the time that the SageTV application was instantiated.
        Returns:
        the time that the SageTV application was instantiated
      • GetFocusContext

        public boolean GetFocusContext()
        Copies all variables from the currently focused UI element's variable context to the current context of the calling Action. Any variables that are in a common parent hierarchy are not copied as part of this.
        Returns:
        true if there was a focused element and it's context was copied, false if there was no focused element found
      • Fork

        public void Fork()
        Spawns a new thread of execution that will be used for further processing of Widget chain. This is analagous to 'forking' a thread to continue execution of a widget chain in parallel to the current system execution.
      • TransmitCommandUsingInfraredTuningPlugin

        public void TransmitCommandUsingInfraredTuningPlugin​(java.lang.String TuningPlugin,
                                                             int TuningPluginPort,
                                                             java.lang.String RemoteName,
                                                             java.lang.String CommandName,
                                                             int RepeatFactor)
        Causes SageTV to instruct the specified tuning plugin to send a command
        Parameters:
        TuningPlugin - the name of the tuning plugin that should send the command
        TuningPluginPort - the name of the port the specified tuning plugin is on
        RemoteName - the name of the 'Remote Control' that should be used to send the command
        CommandName - the name of the command to be sent
        RepeatFactor - the 'repeat factor' to use for sending the infrared command, 2 is the default
      • DebugLog

        public void DebugLog​(java.lang.String DebugString)
        Prints out a message to SageTV's debug log
        Parameters:
        DebugString - the string to print out
      • CloseOptionsMenu

        public void CloseOptionsMenu()
        Closes the last OptionsMenu that was shown and continues execution of the Action chain that spawned that OptionsMenu at the sibling after this OptionsMenu. The feature of continuing execution can be used to prompt the user with a question through an OptionsMenu before continuing on execution of an Action chain. An example is confirming something they just did before it actually gets done.
      • CloseOptionsMenu

        public boolean CloseOptionsMenu​(java.lang.String WidgetName,
                                        boolean WaitForClose)
        Closes the OptionsMenu who's Widget name (or themed Widget name) matches that of the argument and continues execution of the Action chain that spawned that OptionsMenu at the sibling after this OptionsMenu. The feature of continuing execution can be used to prompt the user with a question through an OptionsMenu before continuing on execution of an Action chain. An example is confirming something they just did before it actually gets done. If this OptionsMenu is not on top, then it cannot be closed until it becomes the one on top.
        Parameters:
        WidgetName - the name of the Widget for the OptionsMenu or the themed OptionsMenu source for that Widget that should be closed
        WaitForClose - if true then this call will not return until the specified OptionsMenu target is closed
        Returns:
        returns true if the target OptionsMenu is not open or if it was closed as a result of this call, will only return false if waitForClose is true and the target OptionsMenu is not on top
        Since:
        7.1
      • IsOptionsMenuOpen

        public boolean IsOptionsMenuOpen()
        Returns true if an options menu is currently open in the UI.
        Returns:
        true if an options menu is currently open in the UI, false otherwise
        Since:
        7.1
      • GetSageCommandNames

        public java.util.Vector GetSageCommandNames()
        Gets the names of all of the SageTV commands that are available in the system
        Returns:
        a list of the names of all of the SageTV commands that are available in the system
      • ApplyServiceLevelToLineup

        public void ApplyServiceLevelToLineup​(java.lang.String Lineup,
                                              int ServiceLevel)
        Applies a service level to a given lineup. This is specific to the EPG data source that is being used.
        Parameters:
        Lineup - the name of the EPG lineup to modify
        ServiceLevel - the service level to apply to the lineup
      • SetFocusForVariable

        public boolean SetFocusForVariable​(java.lang.String Name,
                                           java.lang.Object Value)
        Searches all UI elements in the current menu until it finds one that has a variable with the specified name matching the specified value. Once it finds this UI element, it gives it the focus. If scrolling of a table or panel is necessary to make it visible, that scrolling will occur.
        Parameters:
        Name - the name of the variable to match
        Value - the value of the variable to match on
        Returns:
        true if the focus was set
      • EnsureVisibilityForVariable

        public boolean EnsureVisibilityForVariable​(java.lang.String Name,
                                                   java.lang.Object Value,
                                                   int DisplayIndex)
        Searches the tables in the current menu for a cell that matches the passed in name/value pair; if found it will ensure that it is currently visible in the UI at the specified visual index of the table. The name should match the name of the TableComponent-Cell. For example if the TableComponent with a Cell subtype had a name of "File" and listed all of the MediaFiles; then calling EnsureVisibilityForVariable("File", MyMediaFile, 1) would cause the table to scroll so that the second row showed the cell whose File value corresponded to MyMediaFile. This does NOT change the focus, if you wish to scroll a table and shift the focus then use SetFocusForVariable
        Parameters:
        Name - the name of the variable to match on
        Value - the value of the variable to match
        DisplayIndex - 0-based value signifying which visually displayed row or column should show the corresonding cell
        Returns:
        true if there was a matching variable found
      • GetVariableFromContext

        public java.lang.Object GetVariableFromContext​(java.lang.String MatchName,
                                                       java.lang.Object MatchValue,
                                                       java.lang.String LookupName)
        Searches all UI elements in the current menu until it finds one that has a variable with the specified name matching the specified value. Once it finds this UI element, it then does a lookup of the other specified variable in that UI element's context and returns that value
        Parameters:
        MatchName - the name of the variable to match
        MatchValue - the value of the variable to match on
        LookupName - the variable to lookup in the matching context
        Returns:
        the value of the variable
        Since:
        7.0
      • GetVisibilityForVariable

        public boolean GetVisibilityForVariable​(java.lang.String MatchName,
                                                java.lang.Object MatchValue)
        Searches all UI elements in the current menu until it finds one that has a variable with the specified name matching the specified value. Once it finds this UI element, it will return true if that UI element is currently visible and false otherwise
        Parameters:
        MatchName - the name of the variable to match
        MatchValue - the value of the variable to match on
        Returns:
        true if the found component is visible, false otherwise
        Since:
        7.0
      • GetUIComponentForVariable

        public java.lang.Object GetUIComponentForVariable​(java.lang.String MatchName,
                                                          java.lang.Object MatchValue)
        Searches all UI elements in the current menu until it finds one that has a variable with the specified name matching the specified value. It then returns on Object representing that UI component. The search method prefers visible components over hidden ones.
        Parameters:
        MatchName - the name of the variable to match
        MatchValue - the value of the variable to match on
        Returns:
        the UI component with the specified variable set
        Since:
        7.0
      • GetUIComponentContext

        public java.lang.Object GetUIComponentContext()
        Returns the UI component that this execution originated from. For 'green' process chains; this will correspond to the UI component that received the event. For 'blue' UI chains; this will correspond to the UI component who's conditionality is being determined or who's data is being evaluated. This will be null if there is no UI context; such as for non-UI hooks and calls made from Java directly.
        Returns:
        the UIComponent that corresponds to the UI context used for the current evaluation, null if there is no context
        Since:
        7.0
      • SetFocusToUIComponent

        public boolean SetFocusToUIComponent​(java.lang.Object UIComponent)
        Sets focus in the specified UI component. The UIComponent must be focusable for this to succeed
        Parameters:
        UIComponent - the specified UIComponent, can be retrieved using GetUIComponentForVariable API call
        Returns:
        true if setting the focus in the specified component succeeded, false otherwise
        Since:
        7.0
      • GetTableFocusedVisibleRow

        public int GetTableFocusedVisibleRow​(java.lang.Object UIComponent)
        Gets the row number that currently has focus in the specified table. The argument may be the table itself; or a component between the table and the focused component.
        Parameters:
        UIComponent - the specified UIComponent, can be retrieved using GetUIComponentForVariable API call
        Returns:
        the row number (1-based) which is currently focused in the table, -1 is returned if the value can't be resolved
        Since:
        7.0
      • GetTableFocusedVisibleColumn

        public int GetTableFocusedVisibleColumn​(java.lang.Object UIComponent)
        Gets the column number that currently has focus in the specified table. The argument may be the table itself; or a component between the table and the focused component.
        Parameters:
        UIComponent - the specified UIComponent, can be retrieved using GetUIComponentForVariable API call
        Returns:
        the column number (1-based) which is currently focused in the table, -1 is returned if the value can't be resolved
        Since:
        7.0
      • GetTableFocusedVisiblePosition

        public int GetTableFocusedVisiblePosition​(java.lang.Object UIComponent)
        Gets the visible table position that currently has focus in the specified table. The argument may be the table itself; or a component between the table and the focused component. This starts counting from the first component which is currently visible in the table.
        Parameters:
        UIComponent - the specified UIComponent, can be retrieved using GetUIComponentForVariable API call
        Returns:
        the visible position (1-based) which is currently focused in the table, -1 is returned if the value can't be resolved
        Since:
        7.0
      • GetTableFocusedPosition

        public int GetTableFocusedPosition​(java.lang.Object UIComponent)
        Gets the table position that currently has focus in the specified table. The argument may be the table itself; or a component between the table and the focused component. This is the equivalent of the "TableRow" variable for the currently focused table cell; which is the cell's index in the data backing the table.
        Parameters:
        UIComponent - the specified UIComponent, can be retrieved using GetUIComponentForVariable API call
        Returns:
        the position (1-based) which is currently focused in the table, -1 is returned if the value can't be resolved
        Since:
        7.0
      • GetDataFromTableFocusedOffset

        public java.lang.Object GetDataFromTableFocusedOffset​(java.lang.Object UIComponent,
                                                              int Offset,
                                                              boolean WrapIndex)
        Gets the data value for the table that is used for the cell at the specified position relative to what is currently focused for the table. The UIComponent should either be the table itself; or it should have the desired table as an ancestor of it. Position values are zero-based; and may be negative. If WrapIndex is false then positions greater then the size of the table's data or less than zero will return null; otherwise they will be mod'd to return a value within the range of the data.
        Parameters:
        UIComponent - the specified UIComponent, can be retrieved using GetUIComponentForVariable API call
        Offset - the offset of the cell who's table data should be returned; relative to the current focused position (last focused if not currently focused)
        WrapIndex - true if offsets that fall outside of the size of the data should be wrapped so that they return a data value
        Returns:
        the value of the table data at the specified offset
        Since:
        7.0
      • GetDataFromTableVisiblePosition

        public java.lang.Object GetDataFromTableVisiblePosition​(java.lang.Object UIComponent,
                                                                int Offset,
                                                                boolean WrapIndex)
        Gets the data value for the table that is used for the cell at the specified position relative to what is currently visible for the table. The UIComponent should either be the table itself; or it should have the desired table as an ancestor of it. Offset values are zero-based; and may be negative. If WrapIndex is false then positions greater then the size of the table's data or less than zero will return null; otherwise they will be mod'd to return a value within the range of the data.
        Parameters:
        UIComponent - the specified UIComponent, can be retrieved using GetUIComponentForVariable API call
        Offset - the offset of the cell who's table data should be returned; relative to the first visible position
        WrapIndex - true if offsets that fall outside of the size of the data should be wrapped so that they return a data value
        Returns:
        the value of the table data at the specified offset
        Since:
        7.0
      • IsTableTransitionToNext

        public boolean IsTableTransitionToNext​(java.lang.Object UIComponent)
        Returns true if the specified table argument (or the first table parent of the argument) is on the leading edge of a transition to a cell after the current one. It could be a page event, or a moving a single unit. Right and Down directionality is considered to be 'next'. This can be used to trigger effects that relate to navigation occurring in a table. This will only be true for a single rendering pass on the leading edge of the transition. Focus will be moved before this becomes true. If effect animations are disabled; this will always return false.
        Parameters:
        UIComponent - the specified UIComponent, can be retrieved using GetUIComponentForVariable API call
        Returns:
        true if the table is currently transitioning in the next direction
        Since:
        7.0
      • IsTableTransitionToPrevious

        public boolean IsTableTransitionToPrevious​(java.lang.Object UIComponent)
        Returns true if the specified table argument (or the first table parent of the argument) is on the leading edge of a transition to a cell before the current one. It could be a page event, or a moving a single unit. Left and Up directionality is considered to be 'previous'. This can be used to trigger effects that relate to navigation occurring in a table. This will only be true for a single rendering pass on the leading edge of the transition. Focus will be moved before this becomes true. If effect animations are disabled; this will always return false.
        Parameters:
        UIComponent - the specified UIComponent, can be retrieved using GetUIComponentForVariable API call
        Returns:
        true if the table is currently transitioning in the previous direction
        Since:
        7.0
      • IsTransitioningToMenu

        public boolean IsTransitioningToMenu​(java.lang.String MenuName)
        Returns true if the specified menu name matches the name of the menu widget that the UI is in the process of transitioning to. This will only be true during the processing of MenuUnloaded effects. If a null argument is given; then this is true in the case that any menu transition is about to occur. The name match is case-insensitive.
        Parameters:
        MenuName - the name of the menu to test to see if we're transitioning to; null if it matches any menu name
        Returns:
        true if the specified menu name matches the name of the menu widget that the UI is in the process of transitioning to, false otherwise
        Since:
        7.0
      • IsTransitioningFromMenu

        public boolean IsTransitioningFromMenu​(java.lang.String MenuName)
        Returns true if the specified menu name matches the name of the menu widget for the previously loaded menu. The name match is case-insensitive. Unlike IsTransitioningToMenu, this is true even after the transition is complete. A null argument always returns false.
        Parameters:
        MenuName - the name of the menu to test to see if it was the previously loaded menu
        Returns:
        true if the specified menu name matches the name of the menu widget for the previously loaded menu, false otherwise
        Since:
        7.0
      • IsTransitioningToMenus

        public boolean IsTransitioningToMenus​(java.lang.String[] MenuNames)
        Returns true if one of the specified menu name matches the name of the menu widget that the UI is in the process of transitioning to. This will only be true during the processing of MenuUnloaded effects. If a null argument or empty list is given; then this is true in the case that any menu transition is about to occur. The name match is case-insensitive.
        Parameters:
        MenuNames - the names of the menu to test to see if we're transitioning to; null or empty list if it matches any menu name
        Returns:
        true if one of the specified menu name matches the name of the menu widget that the UI is in the process of transitioning to, false otherwise
        Since:
        8.0
      • IsTransitioningFromMenus

        public boolean IsTransitioningFromMenus​(java.lang.String[] MenuNames)
        Returns true if one of the specified menu names matches the name of the menu widget for the previously loaded menu. The name match is case-insensitive. Unlike IsTransitioningToMenus, this is true even after the transition is complete. A null argument or empty list always returns false.
        Parameters:
        MenuNames - the names of the menus to test to see if it was the previously loaded menu
        Returns:
        true if one of the specified menu names matches the name of the menu widget for the previously loaded menu, false otherwise
        Since:
        8.0
      • GetTextForUIComponent

        public java.lang.String GetTextForUIComponent​(java.lang.Object UIComponent)
        Gets the value displayed for the textual component of the specified UI object. If its not a Text component; then its children will be searched depth-first until one is found and then that will be used for the return value.
        Parameters:
        UIComponent - the specified UIComponent, can be retrieved using GetUIComponentForVariable API call
        Returns:
        the text value displayed by the argument itself; or if its not a text component then the value displayed by the first text child of the component; null if neither condition is met
        Since:
        7.0
      • GetUIComponentLastFocusedChild

        public java.lang.Object GetUIComponentLastFocusedChild​(java.lang.Object UIComponent)
        If the specified component currently has a focused child; that child's UI object will be returned. If not, then the last focused child for this component will be returned.
        Parameters:
        UIComponent - the specified UIComponent, can be retrieved using GetUIComponentForVariable API call
        Returns:
        the currently focused child UI object for the specified component if it exists; otherwise the last focused child UI object for the specified component
        Since:
        7.0
      • GetUIComponentPositionX

        public int GetUIComponentPositionX​(java.lang.Object UIComponent)
        Returns the X position in pixels in the UI of the specified UI component. This will be a value relative to the overall UI; not its parent.
        Parameters:
        UIComponent - the specified UIComponent, can be retrieved using GetUIComponentForVariable API call
        Returns:
        the X position in pixels relative to the overall UI of the specified component
        Since:
        7.0
      • GetUIComponentPositionY

        public int GetUIComponentPositionY​(java.lang.Object UIComponent)
        Returns the Y position in pixels in the UI of the specified UI component. This will be a value relative to the overall UI; not its parent.
        Parameters:
        UIComponent - the specified UIComponent, can be retrieved using GetUIComponentForVariable API call
        Returns:
        the Y position in pixels relative to the overall UI of the specified component
        Since:
        7.0
      • GetUIComponentWidth

        public int GetUIComponentWidth​(java.lang.Object UIComponent)
        Returns the width in pixels in the UI of the specified UI component.
        Parameters:
        UIComponent - the specified UIComponent, can be retrieved using GetUIComponentForVariable API call
        Returns:
        the width in pixels of the specified component
        Since:
        7.0
      • GetUIComponentHeight

        public int GetUIComponentHeight​(java.lang.Object UIComponent)
        Returns the height in pixels in the UI of the specified UI component.
        Parameters:
        UIComponent - the specified UIComponent, can be retrieved using GetUIComponentForVariable API call
        Returns:
        the height in pixels of the specified component
        Since:
        7.0
      • GetUIComponentPositionXf

        public float GetUIComponentPositionXf​(java.lang.Object UIComponent)
        Returns the X position in the UI of the specified UI component. This will be a value relative to the overall UI; not its parent.
        Parameters:
        UIComponent - the specified UIComponent, can be retrieved using GetUIComponentForVariable API call
        Returns:
        the X position relative to the overall UI width of the specified component, this will be a floating point number
        Since:
        8.0
      • GetUIComponentPositionYf

        public float GetUIComponentPositionYf​(java.lang.Object UIComponent)
        Returns the Y position in the UI of the specified UI component. This will be a value relative to the overall UI; not its parent.
        Parameters:
        UIComponent - the specified UIComponent, can be retrieved using GetUIComponentForVariable API call
        Returns:
        the Y position relative to the overall UI height of the specified component, this will be a floating point number
        Since:
        8.0
      • GetUIComponentWidthf

        public int GetUIComponentWidthf​(java.lang.Object UIComponent)
        Returns the width in the UI of the specified UI component relative to the entire UI width.
        Parameters:
        UIComponent - the specified UIComponent, can be retrieved using GetUIComponentForVariable API call
        Returns:
        the width of the specified component relative to the entire UI width, this will be a floating point number
        Since:
        8.0
      • GetUIComponentHeightf

        public float GetUIComponentHeightf​(java.lang.Object UIComponent)
        Returns the height in the UI of the specified UI component relative to the entire UI height.
        Parameters:
        UIComponent - the specified UIComponent, can be retrieved using GetUIComponentForVariable API call
        Returns:
        the height of the specified component relative to the entire UI height, this will be a floating point number
        Since:
        8.0
      • SendEventToUIComponent

        public java.lang.Object SendEventToUIComponent​(java.lang.Object UIComponent,
                                                       java.lang.String Command,
                                                       int RepeatCount)
        Sends an event to a specific UI component for processing. Similar to using the SageCommand() API call, but this version is targeted at a specific component. Normal event processing of cursor navigation, selection, entry events will continue up the hierarchy from the target component if it does not consume it; it will stop at the menu level though and any menu-level default handling for the event will not occur (i.e. media player control, menu navigation, power, etc.).
        Parameters:
        UIComponent - the UIComponent object to target the event at, can be retrieved using GetUIComponentForVariable API call
        Command - the name of the command to send
        RepeatCount - the number of times to send the command
        Returns:
        true if the event was consumed by the target component's hierarchy
        Since:
        7.0
      • GetChildUIComponentForVariable

        public java.lang.Object GetChildUIComponentForVariable​(java.lang.Object UIComponent,
                                                               java.lang.String MatchName,
                                                               java.lang.Object MatchValue)
        Searches all child UI elements in of the specified UIComponent until it finds one that has a variable with the specified name matching the specified value. It then returns on Object representing that UI component
        Parameters:
        UIComponent - the UI component who's children should be searched
        MatchName - the name of the variable to match
        MatchValue - the value of the variable to match on
        Returns:
        the UI component with the specified variable set
        Since:
        7.0
      • GetVariableFromUIComponent

        public java.lang.Object GetVariableFromUIComponent​(java.lang.Object UIComponent,
                                                           java.lang.String VarName)
        Retrieves the variable with the specified name from the context of the passed in UIComponent.
        Parameters:
        UIComponent - the UI component who's variable should be returned
        VarName - the name of the variable to lookup
        Returns:
        the value of the variable
        Since:
        7.0
      • SetVariableForUIComponent

        public void SetVariableForUIComponent​(java.lang.Object UIComponent,
                                              java.lang.String VarName,
                                              java.lang.Object VarValue)
        Sets the variable with the specified name in the context of the passed in UIComponent. This behaves the same way as if an assignment was done to that variable within the passed in UIComponent context within the Studio. This may result in setting the value at a higher level in the hierarchy if the variable is defined above the specified component.
        Parameters:
        UIComponent - the UI component who's context should be used when setting the variable
        VarName - the name of the variable to set
        VarValue - the value to set the variable to
        Since:
        7.1
      • PassiveListen

        public void PassiveListen()
        Should only be used in the Action chain from a Listener Widget. Normally SageTV will stop processing Listeners for an event once the first one is reached. If you use PassiveListen() in the action chain for a Listener then SageTV will not stop processing at the current Listener.
      • GetAiringsThatWontBeRecorded

        public java.util.Vector GetAiringsThatWontBeRecorded​(boolean OnlyUnresolved)
        Returns all of the Airings that the user has requested to record that SageTV will not be recording. This would be due to scheduling conflicts.
        Parameters:
        OnlyUnresolved - if true then only unresolved scheduling conflicts will be returned, if false then all conflicts will be returned
        Returns:
        the list of Airings that will not be recorded due to scheduling conflicts
      • IsClient

        public boolean IsClient()
        Returns true if this is an instance of SageTV Client
        Returns:
        true if this is an instance of SageTV Client, false otherwise
      • IsRemoteUI

        public boolean IsRemoteUI()
        Returns true if this UI is being remoted onto another device such as a media extender. This also returns true for Placeshifter clients.
        Returns:
        true if this UI is being remoted onto another device such as a media extender, false otherwise
        Since:
        4.1
      • IsDesktopUI

        public boolean IsDesktopUI()
        Returns true if this UI is being run in a desktop environment. It may or may not be remoted. This is intended to distinguish Placeshifter clients from Media Extenders since both return true for IsRemoteUI().
        Returns:
        true if this UI is being run in a desktop environment, false otherwise
        Since:
        4.1.10
      • IsTouchUI

        public boolean IsTouchUI()
        Returns true if this UI is being run in a touch environment, such as a phone or tablet.
        Returns:
        true if this UI is being run in a touch environment, false otherwise
        Since:
        9.0.4
      • IsServerUI

        public boolean IsServerUI()
        Returns true if this UI is being run on the same system as the SageTV Server it's connected to. Also returns true for standalone SageTV applications. This indicates the UI should have the ability to configure all 'server' based options. For SageTVClient, you must be connected to the loopback address for this to return true.
        Returns:
        true if this is the main UI for a SageTV Server
        Since:
        5.0.5
      • GetConnectedClients

        public java.lang.String[] GetConnectedClients()
        Returns a list of all the clients that are currently connected to this server.
        Returns:
        a list of all the clients that are currently connected to this server.
      • GetUIContextNames

        public java.lang.String[] GetUIContextNames()
        Returns a list of the names of the different UI contexts that are available. One will be the local context which is the UI for the SageTV app (which doesn't exist in service mode). The other contexts can be UIs that are for remote devices such as media extenders. This context name can then be passed back in using the sage.SageTV.apiUI(String uiContextName, String methodName, Object[] args) call in order to execute an API call from Java within a specific UI context. For media extenders, these names generally correspond to the MAC address of the media extender.
        Returns:
        a list of the UI context names available
        Since:
        4.1
      • GetUIContextName

        public java.lang.String GetUIContextName()
        Returns the name of the UI context that makes the API call. See GetUIContextNames() for more information.
        Returns:
        the UI context name that made this API call, null if there is no UI context
        Since:
        5.1
      • GetRemoteClientVersion

        public java.lang.String GetRemoteClientVersion()
        Returns the version string for this connected remote client
        Returns:
        the version string for this connected remote client, or the empty string if it's undefined or not a remote client
        Since:
        6.4
      • GetRemoteUIType

        public java.lang.String GetRemoteUIType()
        Returns the type of client that is connected on this remote interface
        Returns:
        the type of client that is connected on this remote interface; this can be one of "SD Media Extender", "HD Media Extender", "HD Media Player", "Placeshifter" or "Local"
        Since:
        6.4
      • CreateTimedRecording

        public java.lang.Object CreateTimedRecording​(sage.Channel Channel,
                                                     long StartTime,
                                                     long StopTime,
                                                     java.lang.String Recurrence)
        Creates a new time based recording for SageTV.
        Parameters:
        Channel - the Channel object that this recording should be performed on
        StartTime - the time the recording should begin
        StopTime - the time the recording should end
        Recurrence - the name of the recurrence to use; this can be either Once, Daily, Weekly or Continuous (Continuous as of V6.6) (or a localized version of one of those); OR it can be a combination of any of the following strings to indicate specified days: Su, Mo, Tu, We, Th, Fr, Sa (for example, MoTuWe to do Mondays, Tuesdays and Wednesdays)
        Returns:
        true if the creation of the timed recording succeeded, otherwise a localized error string is returned
      • IsFullScreen

        public boolean IsFullScreen()
        Returns whether or not SageTV is in full screen mode
        Returns:
        true if SageTV is in full screen mode, false otherwise
      • SetFullScreen

        public void SetFullScreen​(boolean FullScreen)
        Sets SageTV to be in full or non-full screen mode
        Parameters:
        FullScreen - true if SageTV should be put into full screen mode, false if it should be put into windowed mode
      • GetServerAddress

        public java.lang.String GetServerAddress()
        Gets the hostname of the SageTV server if this is a client, otherwise it returns the name of the host SageTV is running on
        Returns:
        the hostname of the SageTV server if this is a client, otherwise it returns the name of the host SageTV is running on
      • GetOS

        public java.lang.String GetOS()
        Gets the name of the operating system that is being used.
        Returns:
        the name of the operating system that is being used
      • IsWindowsOS

        public boolean IsWindowsOS()
        Returns true if SageTV is currently running on a Windows operating system.
        Returns:
        true if SageTV is currently running on a Windows operating system, false otherwise
      • IsLinuxOS

        public boolean IsLinuxOS()
        Returns true if SageTV is currently running on a Linux operating system.
        Returns:
        true if SageTV is currently running on a Linux operating system, false otherwise
        Since:
        6.0.20
      • IsMacOS

        public boolean IsMacOS()
        Returns true if SageTV is currently running on a Macintosh operating system.
        Returns:
        true if SageTV is currently running on a Macintosh operating system, false otherwise
        Since:
        6.0.20
      • DVDBurnTheBurnList

        public java.lang.Object DVDBurnTheBurnList​(sage.Playlist BurnList)
        Instructs the DVD burning engine inside SageTV to start prepping the specified Playlist to be burned to a DVD, and then perform the actual burn. NOTE: Currently this is only supported on the Linux operating system
        Parameters:
        BurnList - the Playlist of all of the video files to burn to the DVD
        Returns:
        true if the burn process was successfully started, otherwise a localized error message string is returned
      • DVDCancelBurn

        public void DVDCancelBurn()
        Cancels a previous request that was made to perform DVD burning.
      • DVDGetCurrentBurnStatus

        public java.lang.Object DVDGetCurrentBurnStatus()
        Gets the current status of a previously invoked DVD burning process.
        Returns:
        true if the DVD burning process is completed and was a success, "Error" if it completed and was a failure, otherwise a localized status message indicating progress is returned
      • CDBurnTheBurnList

        public java.lang.Object CDBurnTheBurnList​(sage.Playlist BurnList)
        Instructs the CD burning engine inside SageTV to start prepping the specified Playlist to be burned to a CD, and then perform the actual burn. NOTE: Currently this is only supported on the Linux operating system
        Parameters:
        BurnList - the Playlist of all of the music files to burn to the CD
        Returns:
        true if the burn process was successfully started, otherwise a localized error message string is returned
      • CDCancelBurn

        public void CDCancelBurn()
        Cancels a previous request that was made to perform CD burning.
      • CDGetCurrentBurnStatus

        public java.lang.Object CDGetCurrentBurnStatus()
        Gets the current status of a previously invoked CD burning process.
        Returns:
        true if the CD burning process is completed and was a success, "Error" if it completed and was a failure, otherwise a localized status message indicating progress is returned
      • CDRipToLibrary

        public java.lang.Object CDRipToLibrary​(java.io.File LibraryDir,
                                               java.lang.String BitrateKbps)
        Instructs the CD ripping engine to rip the contents of a CD and encode it in MP3 format and then store it in the music library. NOTE: This is currently only supported on the Linux operating system
        Parameters:
        LibraryDir - the directory that the ripped files should be stored in, if the space on this disk is managed by SageTV it will make room for the files that are to be ripped
        BitrateKbps - the bitrate to use for the audio encoding in kilobits per second
        Returns:
        true if the ripping process was successfully started, otherwise a localized error message string is returned
      • CDCancelRip

        public void CDCancelRip()
        Cancels a previous request that was made to perform CD ripping
      • CDGetCurrentRipStatus

        public java.lang.Object CDGetCurrentRipStatus()
        Gets the current status of a previously invoked CD ripping process.
        Returns:
        true if the CD ripping process is completed and was a success, "Error" if it completed and was a failure, otherwise a localized status message indicating progress is returned
      • StartFileCopy

        public java.lang.Object StartFileCopy​(java.lang.String Filename,
                                              java.lang.String SourceDirectory,
                                              java.io.File DestDirectory)
        Instructs the file transfer engine to copy the specified file(s) from the source directory to the destination directory. If there is no filename specified then the contents of the directory are copied recursively. If the destination directory is within the path of SageTV managed diskspace then the appropriate free space will be cleared on the disk in order for the file copy to succeed. This also works for uploading files from a SageTV client to a SageTV server.
        Parameters:
        Filename - the name of the file in the SourceDirectory to copy, or null if the whole directory should be copied
        SourceDirectory - the source directory for the file copy (smb:// paths are OK)
        DestDirectory - the destination directory for the file copy
        Returns:
        true if the copy process was successfully started, false if the file copy is unable to be performed
      • CancelFileCopy

        public void CancelFileCopy()
        Cancels a previous request that was made to perform a file copy
      • GetFileCopyStatus

        public java.lang.Object GetFileCopyStatus()
        Gets the current status of a previously invoked file copy process.
        Returns:
        true if the file copy process is completed and was a success, "Error" will be the prefix if it was a failure, otherwise a localized status message indicating progress is returned
      • StartFileDownload

        public boolean StartFileDownload​(java.lang.String ServerAddress,
                                         java.lang.String SourceFile,
                                         java.io.File DestFile)
        Instructs the file transfer engine to download the specified file from the server to the local destination file. You may also download from remote http:// or ftp:// addresses; in that case just specify the URL in the ServerAddress argument and leave sourceFile as null. When downloading from http or ftp addresses, the target will be the server's filesystem for remote clients; otherwise it is the local filesystem. When smb:// URLs are specified; they will be access from the server's network for remote clients, otherwise the source will be from the local network. smb:// URLs target download will be the local filesystem. Only one download process is allowed per-UI using the 'FileDownload' API calls. If you wish to handle multiple downloads; then use the 'BackgroundFileDownload' API calls.
        Parameters:
        ServerAddress - the address of the SageTV server to download from, or null if you're using SageTVClient and you want to download from the server you're connected to, or a valid smb, http or ftp URL
        SourceFile - the file path on the server you want to download
        DestFile - the destination file for the file download
        Returns:
        true if the copy process was successfully started, false if the file doesn't exist on the server or it couldn't be contacted
      • StartFileDownload

        public boolean StartFileDownload​(java.lang.String ServerAddress,
                                         java.lang.String SourceFile,
                                         java.io.File DestFile,
                                         java.util.Properties RequestProperties)
        Instructs the file transfer engine to download the specified file from the server to the local destination file. You may also download from remote http:// or ftp:// addresses; in that case just specify the URL in the ServerAddress argument and leave sourceFile as null. When downloading from http or ftp addresses, the target will be the server's filesystem for remote clients; otherwise it is the local filesystem. When smb:// URLs are specified; they will be access from the server's network for remote clients, otherwise the source will be from the local network. smb:// URLs target download will be the local filesystem. Only one download process is allowed per-UI using the 'FileDownload' API calls. If you wish to handle multiple downloads; then use the 'BackgroundFileDownload' API calls.
        Parameters:
        ServerAddress - the address of the SageTV server to download from, or null if you're using SageTVClient and you want to download from the server you're connected to, or a valid smb, http or ftp URL
        SourceFile - the file path on the server you want to download
        DestFile - the destination file for the file download
        RequestProperties - a Properties object that specifies the request properties to use in an HTTP download request, can be null
        Returns:
        true if the copy process was successfully started, false if the file doesn't exist on the server or it couldn't be contacted
        Since:
        9.0
      • StartBackgroundFileDownload

        public boolean StartBackgroundFileDownload​(java.lang.String ServerAddress,
                                                   java.lang.String SourceFile,
                                                   java.io.File DestFile,
                                                   java.util.Properties RequestProperties)
        Instructs the file transfer engine to download the specified file from the server to the local destination file. You may also download from remote http:// or ftp:// addresses; in that case just specify the URL in the ServerAddress argument and leave sourceFile as null. When downloading from http or ftp addresses, the target will be the server's filesystem for remote clients; otherwise it is the local filesystem. When smb:// URLs are specified; they will be access from the server's network for remote clients, otherwise the source will be from the local network. smb:// URLs target download will be the local filesystem. This call is different then the regular StartFileDownload API call because it allows for multiple downloads to occur at the same time. The 'key' for the downloads are the DestFile objects.
        Parameters:
        ServerAddress - the address of the SageTV server to download from, or null if you're using SageTVClient and you want to download from the server you're connected to, or a valid smb, http or ftp URL
        SourceFile - the file path on the server you want to download
        DestFile - the destination file for the file download
        RequestProperties - a Properties object that specifies the request properties to use in an HTTP download request, can be null
        Returns:
        true if the copy process was successfully started, false if the file doesn't exist on the server or it couldn't be contacted
        Since:
        7.0
      • StartCircularFileDownload

        public boolean StartCircularFileDownload​(java.lang.String ServerAddress,
                                                 java.lang.String SourceFile,
                                                 java.io.File DestFile)
        Instructs the file transfer engine to download the specified file from the server to the local destination file. You may also download from remote http:// or ftp:// addresses; in that case just specify the URL in the ServerAddress argument and leave sourceFile as null. When downloading from http or ftp addresses, the target will be the server's filesystem for remote clients; otherwise it is the local filesystem. When smb:// URLs are specified; they will be access from the server's network for remote clients, otherwise the source will be from the local network. smb:// URLs target download will be the local filesystem. The 'Circular' version of this API call will write to a temporary circular file; this is designed for systems with limited storage capacity. This version of the API call may not be used by SageTVClient (if it is; then it will internally switch to the non-circular file method)
        Parameters:
        ServerAddress - the address of the SageTV server to download from, or null if you're using SageTVClient and you want to download from the server you're connected to, or a valid smb, http or ftp URL
        SourceFile - the file path on the server you want to download
        DestFile - the destination file for the file download
        Returns:
        true if the copy process was successfully started, false if the file doesn't exist on the server or it couldn't be contacted
        Since:
        6.4
      • StartCircularFileDownload

        public boolean StartCircularFileDownload​(java.lang.String ServerAddress,
                                                 java.lang.String SourceFile,
                                                 java.io.File DestFile,
                                                 java.util.Properties RequestProperties)
        Instructs the file transfer engine to download the specified file from the server to the local destination file. You may also download from remote http:// or ftp:// addresses; in that case just specify the URL in the ServerAddress argument and leave sourceFile as null. When downloading from http or ftp addresses, the target will be the server's filesystem for remote clients; otherwise it is the local filesystem. When smb:// URLs are specified; they will be access from the server's network for remote clients, otherwise the source will be from the local network. smb:// URLs target download will be the local filesystem. The 'Circular' version of this API call will write to a temporary circular file; this is designed for systems with limited storage capacity. This version of the API call may not be used by SageTVClient (if it is; then it will internally switch to the non-circular file method)
        Parameters:
        ServerAddress - the address of the SageTV server to download from, or null if you're using SageTVClient and you want to download from the server you're connected to, or a valid smb, http or ftp URL
        SourceFile - the file path on the server you want to download
        DestFile - the destination file for the file download
        RequestProperties - a Properties object that specifies the request properties to use in an HTTP download request, can be null
        Returns:
        true if the copy process was successfully started, false if the file doesn't exist on the server or it couldn't be contacted
        Since:
        9.0
      • CancelFileDownload

        public void CancelFileDownload()
        Cancels a previous request that was made to perform a file download
      • CancelBackgroundFileDownload

        public void CancelBackgroundFileDownload​(java.io.File DestFile)
        Cancels a previous request that was made to perform a background file download.
        Parameters:
        DestFile - the destination file specified in the original download request
        Since:
        7.0
      • GetFileDownloadStatus

        public java.lang.Object GetFileDownloadStatus()
        Gets the current status of a previously invoked file download process.
        Returns:
        true if the file download process is completed and was a success, "Error" will be the prefix if it was a failure, otherwise a localized status message indicating progress is returned
      • GetBackgroundFileDownloadStatus

        public java.lang.Object GetBackgroundFileDownloadStatus​(java.io.File DestFile)
        Gets the current status of a previously invoked file background download process.
        Parameters:
        DestFile - the destination file specified in the original download request
        Returns:
        true if the file download process is completed and was a success, "Error" will be the prefix if it was a failure, otherwise a localized status message indicating progress is returned
        Since:
        7.0
      • GetFileDownloadStreamTime

        public long GetFileDownloadStreamTime()
        Gets the current stream time of a previously invoked file download process. This is only valid for when the file being downloaded is an FLV, MP3, MP4 or Quicktime file
        Returns:
        the stream time in milliseconds of the current download; or zero if it doesn't know
        Since:
        6.3
      • IsFileDownloadProgressivePlay

        public boolean IsFileDownloadProgressivePlay()
        Returns whether or not the current file being downloaded can be played back while being downloaded. This is only valid for when the file being downloaded is an FLV, MP3, MP4 or Quicktime file. It will always be true for MP3 & FLV files; and for MP4/Quicktime files it'll be true if the sample section is before the movie data in the file. If this is true and the download stream time is greater than zero; then it's OK to start progressive playback of downloaded media.
        Returns:
        true if the current file being downloaded can potentially be played back while being downloaded, false if it definitely cannot be
        Since:
        6.3
      • GetBackgroundFileDownloadStreamTime

        public long GetBackgroundFileDownloadStreamTime​(java.io.File DestFile)
        Gets the current stream time of a previously invoked file download process. This is only valid for when the file being downloaded is an FLV, MP3, MP4 or Quicktime file
        Parameters:
        DestFile - the destination file specified in the original download request
        Returns:
        the stream time in milliseconds of the current download; or zero if it doesn't know or the download is completed
        Since:
        7.0
      • IsBackgroundFileDownloadProgressivePlay

        public boolean IsBackgroundFileDownloadProgressivePlay​(java.io.File DestFile)
        Returns whether or not the current file being downloaded can be played back while being downloaded. This is only valid for when the file being downloaded is an FLV, MP3, MP4 or Quicktime file. It will always be true for MP3 & FLV files; and for MP4/Quicktime files it'll be true if the sample section is before the movie data in the file. If this is true and the download stream time is greater than zero; then it's OK to start progressive playback of downloaded media.
        Parameters:
        DestFile - the destination file specified in the original download request
        Returns:
        true if the current file being downloaded can potentially be played back while being downloaded, false if it definitely cannot be or is an invalid or completed download
        Since:
        7.0
      • GetBackgroundFileDownloadTotalSize

        public long GetBackgroundFileDownloadTotalSize​(java.io.File DestFile)
        Gets the total size of the specified background download target. This may not always be known in cases where the server does not indicate the specific length of the file.
        Parameters:
        DestFile - the destination file specified in the original download request
        Returns:
        the size in bytes of the remote file being downloaded; zero if the download specified is complete or invalid
        Since:
        7.0
      • SetRemoteEventEncryptionEnabled

        public boolean SetRemoteEventEncryptionEnabled​(boolean EnableEncryption)
        This is used to enable/disable encryption on the event channel for the SageTV MiniClient. The MiniClient is used for the media extenders and for placeshifting. When using a non-local MiniClient connection, or if local MiniClient connections are configured to require authentication; the event channel between the two will start off in an encrypted mode so that a password can be exchanged. This API call can then be used with a false argument to disable encryption of the event channel in order to increase performance. It can also be used to re-enable encryption at a later time if sensitive information is going to be transmitted again.
        Parameters:
        EnableEncryption - true if the MiniClient event channel should start encrypting events, false if it should stop
        Returns:
        true if the MiniClient supports encryption and the operation should succeed, the connection will terminate if it fails
        Since:
        4.1.7
      • CachePlaceshifterLogin

        public void CachePlaceshifterLogin()
        This is used to store an authentication block on the current client that it can use in the future to automatically connect to this server w/out having to login. The channel must be encrypted when this call is made. See the API call SetRemoteEventEncryptionEnabled for more details on that.
        Since:
        6.6
      • CanCachePlaceshifterLogin

        public boolean CanCachePlaceshifterLogin()
        This indicates whether the server and the client both support caching of placeshifter logins.
        Returns:
        true if both the server and client support caching of placeshifter login information
        Since:
        6.6
      • ReloadSystemHooks

        public void ReloadSystemHooks()
        This is a Windows only API call which tells SageTV to unload and then reload any system hooks it has installed. This allows reconfiguration of parameters in the UI and then realization of those changes on the fly.
        Since:
        4.1.13
      • UpdateLocatorServer

        public void UpdateLocatorServer()
        This API call can be used to tell SageTV to do an update with the Locator server right now. It's useful for when you change external network configuration stuff like ports or IPs.
        Since:
        4.1.13
      • GetFullUIWidth

        public int GetFullUIWidth()
        Returns the width in pixels of the user interface for the calling SageTV UI context.
        Returns:
        the width in pixels of the user interface for the calling SageTV UI context
        Since:
        5.1
      • GetFullUIHeight

        public int GetFullUIHeight()
        Returns the height in pixels of the user interface for the calling SageTV UI context.
        Returns:
        the height in pixels of the user interface for the calling SageTV UI context
        Since:
        5.1
      • GetDisplayResolutionWidth

        public int GetDisplayResolutionWidth()
        Returns the width in pixels of the current display resolution set
        Returns:
        the width in pixels of the current display resolution set
        Since:
        5.1
      • GetDisplayResolutionHeight

        public int GetDisplayResolutionHeight()
        Returns the height in pixels of the current display resolution set
        Returns:
        the height in pixels of the current display resolution set
        Since:
        5.1
      • GetDisplayResolution

        public java.lang.String GetDisplayResolution()
        Returns a string describing the current display resolution set
        Returns:
        a string describing the current display resolution set
        Since:
        6.3
      • GetDisplayResolutionOptions

        public java.lang.String[] GetDisplayResolutionOptions()
        Returns a list of the possible display resolutions. This is currently only used on media extender devices that have adjustable output resolution
        Returns:
        an array of the display resolution names that can be used, null if this change is not supported
        Since:
        6.0
      • GetDisplayResolutionDetails

        public java.lang.String GetDisplayResolutionDetails​(java.lang.String Resolution)
        Returns the detailed format description for the specific resolution returned from GetDisplayResolutionOptions() NOTE: This API call is only valid on embedded platforms.
        Parameters:
        Resolution - the resolution to get the details for
        Returns:
        a the detailed format description for a specific Resolution
        Since:
        6.4
      • GetPreferredDisplayResolutions

        public java.lang.String[] GetPreferredDisplayResolutions()
        Returns a list of the preferred display resolutions. This is currently only used on media extender devices that have adjustable output resolution. This information is obtained from the HDMI/DVI connector
        Returns:
        a list of the preferred display resolutions
        Since:
        6.3
      • SetDisplayResolution

        public void SetDisplayResolution​(java.lang.String Resolution)
        Sets the current output display resolution. This is currently only used on media extender devices that have adjustable output resolution.
        Parameters:
        Resolution - this must be a value from GetDisplayResolutionOptions() and should be the new desired output resolution
        Since:
        6.0
      • DiscoverSageTVServers

        public java.lang.String[] DiscoverSageTVServers​(long Timeout)
        Returns a list of the SageTV servers on the network. Each item will be "name;IP address"
        Parameters:
        Timeout - the timeout for the discovery process in milliseconds
        Returns:
        an array of the SageTV servers on the network. Each item will be "name;IP address"
        Since:
        6.3
      • IsEmbeddedSystem

        public boolean IsEmbeddedSystem()
        Returns true if running on an 'embedded' platform. This will be true for the standalone environment on products like the HD300 and false otherwise. Used for making STVs that have different options based on whether they're on a PC vs. embedded system.
        Returns:
        true if running on an embedded system, false otherwise
        Since:
        7.0
      • IsEmbeddedServer

        public boolean IsEmbeddedServer()
        Returns true if running on an 'embedded' platform in standalone mode or running as a SageTV Client that is connected to a server running on an embedded platform. This will be true for the standalone environment on products like the HD300 and false otherwise. Used for making STVs that have different options based on whether they're on a PC vs. embedded system.
        Returns:
        true if running against an embedded server, false otherwise
        Since:
        7.1
      • IsPVR

        public boolean IsPVR()
        Returns true if running on a system or connected to a server that has PVR functionality. Used for making STVs that have different options based on whether or not PVR functionality is available. Even if no capture devices are configured and the system is PVR capable, this will still return true.
        Returns:
        true if PVR is available, false otherwise
        Since:
        7.1
      • GetHotplugStorageMap

        public java.util.Map GetHotplugStorageMap()
        Returns a map of name->file for any hotplug storage devies on the system. The names are user-presentable and the path is the java.io.File root which corresponds to the root of that device. NOTE: This is only valid on embedded platforms.
        Returns:
        a Map of name->file for hotplugged storage devices
        Since:
        6.4
      • IsDoingLibraryImportScan

        public boolean IsDoingLibraryImportScan()
        Returns true if the server is currently scanning the import directories for new files
        Returns:
        true if the server is currently scanning the import directories for new files
        Since:
        6.6
      • SwitchEmbeddedModeTo

        public void SwitchEmbeddedModeTo​(java.lang.String NewMode)
        Executes a predefined application in the context of an embedded client. This is used for launching things like Netflix, YouTube Leanback and also specifying alternate modes the embedded client can exit into.
        Parameters:
        NewMode - the name of the application
        Since:
        8.0
      • PrepareForFirmwareLoad

        public void PrepareForFirmwareLoad()
        Prepares the device for a firmware download & flash. This internally will stop the library importing process, empty all of the database tables, clear the UI caches, and then force a complete garbage collection. NOTE: This is only valid on embedded platforms.
        Since:
        7.0
      • AreScreenshotsSupported

        public boolean AreScreenshotsSupported()
        Returns true if it's possible to take screenshots of the UI using the API on this UI client
        Returns:
        true if it's possible to take screenshots of the UI using the API on this UI client
        Since:
        8.0
      • SaveScreenshotToFile

        public boolean SaveScreenshotToFile​(java.io.File FilePath)
        Takes a screenshot of the current UI and saves it to the specified file in PNG format. This is only supported on clients that return true to the API call AreScreenshotsSupported().
        Parameters:
        FilePath - the file path to save the screenshot to (should have a .png file extension)
        Returns:
        true if the screenshot was successfully saved to the specified file, false otherwise
        Since:
        8.0
      • GetEmbeddedPanel

        public java.awt.Panel GetEmbeddedPanel()
        Gets a java.awt.Panel which can be used for embedding Java UI elements directly into SageTV
        Returns:
        a java.awt.Panel object which can be sized, made visible and have children added to it
      • SetEmbeddedPanelBounds

        public void SetEmbeddedPanelBounds​(float x,
                                           float y,
                                           float width,
                                           float height)
        Sets the bounding region to be used for the embedded panel. These are floating point numbers relative to the total size of the UI.
        Parameters:
        x - the relative X position (0.0-1.0)
        y - the relative Y position (0.0-1.0)
        width - the relative width (0.0-1.0)
        height - the relative height (0.0-1.0)
        Since:
        6.4
      • IsClientDisconnected

        public boolean IsClientDisconnected()
        Returns true if this is an instance of SageTVClient (or a remote client connected via SageTVClient) and there is currently not a connection to the server. This should be used during startup to go to the server connection lost menu for remote clients connected through SageTVClient (SageTVClient itself will do it automatically).
        Returns:
        true if the SageTVClient connection is currently disconnected
        Since:
        8.0
      • GetClientServerConnectionProgress

        public java.lang.String GetClientServerConnectionProgress()
        Returns a string describing the state of the client/server connection process. NOTE: This is only useful on embedded with a fat client setup.
        Returns:
        a string describing the state of the client/server connection process, null if this cannot be determined properly
        Since:
        8.0
      • GetEPGUpdateState

        public java.lang.String GetEPGUpdateState()
        Returns a string describing the state of the epg system.
        Returns:
        a string describing the Epg state one of: [Idle, Maintenance, Updating]
        Since:
        8.1
      • IsSDEPGServiceAvailable

        public boolean IsSDEPGServiceAvailable()
        Returns true if the Schedules Direct EPG service is available. This is determined by trying to communicate with Schedules Direct if an unexpired token is present. If no token currently exists or it is expired, a new token will be acquired. If the token is unable to be obtained for any reason, the service is considered unavailable.
        Returns:
        true if the Schedules Direct EPG service is configured and able to authenticate, false otherwise
        Since:
        9.0