|
| NymphCastClient () |
|
void | setClientId (std::string id) |
|
void | setApplicationCallback (AppMessageFunction function) |
|
void | setStatusUpdateCallback (StatusUpdateFunction function) |
|
std::string | getApplicationList (uint32_t handle) |
|
std::string | sendApplicationMessage (uint32_t handle, std::string appId, std::string message) |
|
std::string | loadResource (uint32_t handle, std::string appId, std::string name) |
|
std::vector< NymphCastRemote > | findServers () |
|
std::vector< NymphCastRemote > | findShares () |
|
bool | connectServer (std::string ip, uint32_t &handle) |
|
bool | disconnectServer (uint32_t handle) |
|
std::vector< NymphMediaFile > | getShares (NymphCastRemote mediaserver) |
|
bool | playShare (NymphMediaFile file, std::vector< NymphCastRemote > receivers) |
|
bool | addSlaves (uint32_t handle, std::vector< NymphCastRemote > remotes) |
|
bool | castFile (uint32_t handle, std::string filename) |
|
bool | castUrl (uint32_t handle, std::string url) |
|
uint8_t | volumeSet (uint32_t handle, uint8_t volume) |
|
uint8_t | volumeUp (uint32_t handle) |
|
uint8_t | volumeDown (uint32_t handle) |
|
uint8_t | playbackStart (uint32_t handle) |
|
uint8_t | playbackStop (uint32_t handle) |
|
uint8_t | playbackPause (uint32_t handle) |
|
uint8_t | playbackRewind (uint32_t handle) |
|
uint8_t | playbackForward (uint32_t handle) |
|
uint8_t | playbackSeek (uint32_t handle, uint64_t location) |
|
uint8_t | playbackSeek (uint32_t handle, uint8_t percentage) |
|
NymphPlaybackStatus | playbackStatus (uint32_t handle) |
|
◆ NymphCastClient()
NymphCastClient::NymphCastClient |
( |
| ) |
|
Initialise the remote client instance with default settings.
◆ addSlaves()
bool NymphCastClient::addSlaves |
( |
uint32_t |
handle, |
|
|
std::vector< NymphCastRemote > |
remotes |
|
) |
| |
Configure a Master remote to use the provided Slave remotes for synchronous playback of content.
- Parameters
-
handle | The handle for the remote server. |
remotes | Vector of remotes to configure as Slaves. |
- Returns
- True if the operation succeeded.
◆ castFile()
bool NymphCastClient::castFile |
( |
uint32_t |
handle, |
|
|
std::string |
filename |
|
) |
| |
Stream file to remote. Use the provided file path to open the media file and stream its contents to the remote.
- Parameters
-
handle | The handle for the remote server. |
filename | The (relative) path to the media file. |
- Returns
- True if the operation succeeded.
◆ castUrl()
bool NymphCastClient::castUrl |
( |
uint32_t |
handle, |
|
|
std::string |
url |
|
) |
| |
Send the provided URL to the remote, which will attempt to play back any media content found.
- Parameters
-
handle | The handle for the remote server. |
url | URL to play back from. |
- Returns
- True if the operation succeeded.
◆ connectServer()
bool NymphCastClient::connectServer |
( |
std::string |
ip, |
|
|
uint32_t & |
handle |
|
) |
| |
Attempt to connect to the specified remote NymphCast server.
- Parameters
-
ip | The IP address of the target server. |
handle | The new handle for the remote server. |
- Returns
- True if the operation succeeded.
◆ disconnectServer()
bool NymphCastClient::disconnectServer |
( |
uint32_t |
handle | ) |
|
Disconnect from the remote server.
- Parameters
-
handle | The handle for the remote server. |
- Returns
- True if the operation succeeded.
◆ findServers()
Find remote NymphCast servers using a NyanSD query.
- Returns
- A vector with any found remotes.
◆ findShares()
Find any NymphCast Media Servers on the network using a NyanSD query.
- Returns
- Vector containing any found media server instances.
◆ getApplicationList()
std::string NymphCastClient::getApplicationList |
( |
uint32_t |
handle | ) |
|
Obtain a list of application available on the remote.
- Parameters
-
handle | The handle for the remote server. |
- Returns
- A string containing the application list, separated by newlines (
).
◆ getShares()
Attempt to obtain the list of shared media files from a NymphCast Media Server.
- Parameters
-
mediaserver | Information on the target media server instance. |
- Returns
- Vector with the list of available files, if successful.
◆ loadResource()
std::string NymphCastClient::loadResource |
( |
uint32_t |
handle, |
|
|
std::string |
appId, |
|
|
std::string |
name |
|
) |
| |
Load a specific resource from a remote application. E.g. an image.
- Parameters
-
handle | The handle for the remote server. |
appId | ID of the remote application. |
name | The name of the resource. |
- Returns
- A string containing the (binary) data, if successful.
◆ playbackForward()
uint8_t NymphCastClient::playbackForward |
( |
uint32_t |
handle | ) |
|
Forward playback on the remote.
- Parameters
-
handle | The handle for the remote server. |
- Returns
- 0 if the operation succeeded.
◆ playbackPause()
uint8_t NymphCastClient::playbackPause |
( |
uint32_t |
handle | ) |
|
Pause playback on the remote.
- Parameters
-
handle | The handle for the remote server. |
- Returns
- 0 if the operation succeeded.
◆ playbackRewind()
uint8_t NymphCastClient::playbackRewind |
( |
uint32_t |
handle | ) |
|
Rewind playback on the remote.
- Parameters
-
handle | The handle for the remote server. |
- Returns
- 0 if the operation succeeded.
◆ playbackSeek() [1/2]
uint8_t NymphCastClient::playbackSeek |
( |
uint32_t |
handle, |
|
|
uint64_t |
location |
|
) |
| |
Seek to specific byte offset in the file.
- Parameters
-
handle | The handle for the remote server. |
location | New offset in the file, in bytes. |
- Returns
- 0 if the operation succeeded.
◆ playbackSeek() [2/2]
uint8_t NymphCastClient::playbackSeek |
( |
uint32_t |
handle, |
|
|
uint8_t |
percentage |
|
) |
| |
Seek to percentage of the media file length.
- Parameters
-
handle | The handle for the remote server. |
percentage | New percentage in the file of media length. |
- Returns
- 0 if the operation succeeded.
◆ playbackStart()
uint8_t NymphCastClient::playbackStart |
( |
uint32_t |
handle | ) |
|
Start or resume playback on the remote.
- Parameters
-
handle | The handle for the remote server. |
- Returns
- 0 if the operation succeeded.
◆ playbackStatus()
Request the playback status from the remote.
- Parameters
-
handle | The handle for the remote server. |
- Returns
- A NymphPlaybackStatus struct with playback information.
◆ playbackStop()
uint8_t NymphCastClient::playbackStop |
( |
uint32_t |
handle | ) |
|
Stop playback on the remote.
- Parameters
-
handle | The handle for the remote server. |
- Returns
- 0 if the operation succeeded.
◆ playShare()
Instruct a Media Server instance to play back a specific shared file on the target remote servers.
If multiple receivers are specified, the first one becomes the Master receiver, with the remaining receivers configured as Slave receivers to that one Master receiver. This allows for synchronous playback.
- Parameters
-
file | Definition of the shared |
receivers | Vector of remote servers to play the content back on. |
- Returns
- True if the operation succeeded.
◆ sendApplicationMessage()
std::string NymphCastClient::sendApplicationMessage |
( |
uint32_t |
handle, |
|
|
std::string |
appId, |
|
|
std::string |
message |
|
) |
| |
Send a string to an application on the remote.
- Parameters
-
handle | The handle for the remote server. |
appId | ID of the remote application. |
message | Message to send to the remote application. |
- Returns
- String with any response from the remote.
◆ setApplicationCallback()
void NymphCastClient::setApplicationCallback |
( |
AppMessageFunction |
function | ) |
|
Set the callback to call when a remote application sends data.
- Parameters
-
function | The callback function. |
◆ setClientId()
void NymphCastClient::setClientId |
( |
std::string |
id | ) |
|
Set the callback to call when a remote application sends data.
- Parameters
-
◆ setStatusUpdateCallback()
void NymphCastClient::setStatusUpdateCallback |
( |
StatusUpdateFunction |
function | ) |
|
Set callback to call when the remote sends a status update on e.g. playback.
- Parameters
-
function | The callback function. |
◆ volumeDown()
uint8_t NymphCastClient::volumeDown |
( |
uint32_t |
handle | ) |
|
Decrease the volume on the remote server.
- Parameters
-
handle | The handle for the remote server. |
- Returns
- 0 if the operation succeeded.
◆ volumeSet()
uint8_t NymphCastClient::volumeSet |
( |
uint32_t |
handle, |
|
|
uint8_t |
volume |
|
) |
| |
Set the volume on the target remote. Volume is set within a range of 0 - 128.
- Parameters
-
handle | The handle for the remote server. |
volume | Target volume level. |
- Returns
- 0 if the operation succeeded.
◆ volumeUp()
uint8_t NymphCastClient::volumeUp |
( |
uint32_t |
handle | ) |
|
Increase the volume on the remote server.
- Parameters
-
handle | The handle for the remote server. |
- Returns
- 0 if the operation succeeded.
The documentation for this class was generated from the following files: