RokuECP 0.2.0
 
Loading...
Searching...
No Matches
rokuecp.h
Go to the documentation of this file.
1
19#ifndef ROKUECP_H
20#define ROKUECP_H
21
22#include <stdbool.h>
23#include <stdint.h>
24#include <wchar.h>
25
27typedef struct {
28 char name[121];
29 char location[61];
30 char url[30];
31 char model[31];
32 char serial[14];
33 bool isTV;
34 bool isOn;
35 bool isLimited;
40 char resolution[8];
41 char macAddress[18];
42 char softwareVersion[10];
44
46typedef struct {
47 char id[8];
48 char name[8];
49 char type[14];
50 char network[25];
52 unsigned long frequency;
54
56typedef struct {
57 char title[112];
58 char description[256];
59 char rating[15];
60 bool hasCC;
62
81
83typedef struct {
84 char id[14];
85 char name[31];
86 char type[5];
87 char version[22];
88} RokuApp;
89
91typedef struct {
92 const unsigned char* data;
93 unsigned long size;
95
97typedef struct {
98 enum {
99 MOVIE,
100 SHOW,
101 PERSON,
102 APP,
103 GAME,
104 NONE
105 } type;
107 char tmsID[15];
108 unsigned short season;
111 char providerIDs[14][8];
113
115typedef struct {
116 char appID[14];
117 char contentID[256];
118 enum {
119 FILM,
120 SERIES,
121 SEASON,
122 EPISODE,
123 SHORT_FORM_VIDEO,
124 TV_SPECIAL,
125 NO_TYPE
126 } mediaType;
127 const char** otherParamNames;
128 const char** otherParamValues;
131
141int findRokuDevices(const char* interface, size_t maxDevices, size_t urlStringSize, char* deviceList[]);
142
151int getRokuDevice(const char* url, RokuDevice* device);
152
163int rokuSendKey(const RokuDevice* device, const char* key);
164
178int getRokuTVChannels(const RokuDevice* device, int maxChannels, RokuTVChannel channelList[]);
179
191int getActiveRokuTVChannel(const RokuDevice* device, RokuExtTVChannel* channel);
192
199int launchRokuTVChannel(const RokuDevice* device, const RokuTVChannel* channel);
200
213int getRokuApps(const RokuDevice* device, int maxApps, RokuApp appList[]);
214
223int getActiveRokuApp(const RokuDevice* device, RokuApp* app);
224
231int launchRokuApp(const RokuDevice* device, const RokuAppLaunchParams* params);
232
241int getRokuAppIcon(const RokuDevice* device, const RokuApp* app, RokuAppIcon* icon);
242
251int sendCustomRokuInput(const RokuDevice* device, size_t params, const char* names[], const char* values[]);
252
261int rokuSearch(const RokuDevice* device, const char* keyword, const RokuSearchParams* params);
262
271int rokuTypeString(const RokuDevice* device, const wchar_t* string);
272
273#endif //ROKUECP_H
int findRokuDevices(const char *interface, size_t maxDevices, size_t urlStringSize, char *deviceList[])
Find Roku devices on the network using SSDP.
Definition rokuecp.c:158
int getRokuAppIcon(const RokuDevice *device, const RokuApp *app, RokuAppIcon *icon)
Get a given app's icon.
Definition rokuecp.c:676
int getRokuApps(const RokuDevice *device, int maxApps, RokuApp appList[])
Get a list of apps on a given Roku device.
Definition rokuecp.c:487
int rokuSearch(const RokuDevice *device, const char *keyword, const RokuSearchParams *params)
Run search for a movie, TV show, person, or app.
Definition rokuecp.c:726
int launchRokuApp(const RokuDevice *device, const RokuAppLaunchParams *params)
Launch a given app on a given Roku device.
Definition rokuecp.c:608
int launchRokuTVChannel(const RokuDevice *device, const RokuTVChannel *channel)
Launch a given Live TV channel on a given Roku device.
Definition rokuecp.c:470
int getActiveRokuApp(const RokuDevice *device, RokuApp *app)
Get the current active app on a given Roku device.
Definition rokuecp.c:550
int rokuSendKey(const RokuDevice *device, const char *key)
Send a keypress to a Roku Device, emulating the press of a button on a Roku Remote.
Definition rokuecp.c:256
int rokuTypeString(const RokuDevice *device, const wchar_t *string)
Send Unicode string to Roku device as a series of keyboard keypresses.
Definition rokuecp.c:798
int getActiveRokuTVChannel(const RokuDevice *device, RokuExtTVChannel *channel)
Get either the current or last active TV channel on a given Roku device.
Definition rokuecp.c:356
int sendCustomRokuInput(const RokuDevice *device, size_t params, const char *names[], const char *values[])
Send custom input to the currently active app on a given Roku device.
Definition rokuecp.c:699
int getRokuDevice(const char *url, RokuDevice *device)
Get information about a Roku Device from its ECP URL.
Definition rokuecp.c:187
int getRokuTVChannels(const RokuDevice *device, int maxChannels, RokuTVChannel channelList[])
Get a list of TV channels accessible from a given Roku device.
Definition rokuecp.c:283
A Roku channel (app) icon.
Definition rokuecp.h:91
unsigned long size
number of bytes pointed to by the data attribute
Definition rokuecp.h:93
const unsigned char * data
pointer to icon data
Definition rokuecp.h:92
Parameters for Roku app launch command.
Definition rokuecp.h:115
const char ** otherParamValues
Array of values for these extra parameters.
Definition rokuecp.h:128
const char ** otherParamNames
Array of names for other parameters to pass to app.
Definition rokuecp.h:127
size_t numOtherParams
Number of extra parameters.
Definition rokuecp.h:129
Information about a Roku channel (app).
Definition rokuecp.h:83
Information about a Roku Device.
Definition rokuecp.h:27
bool hasHeadphoneSupport
true if the device supports Private Listening
Definition rokuecp.h:38
bool developerMode
true if the device has developer mode enabled
Definition rokuecp.h:36
bool isLimited
true if the device's "Control by mobile apps" setting is "Limited"
Definition rokuecp.h:35
bool isTV
true if the device is a Roku TV
Definition rokuecp.h:33
bool isOn
true if the device is currently powered on
Definition rokuecp.h:34
bool hasSearchSupport
true if the device has search support
Definition rokuecp.h:37
bool headphonesConnected
true if the device is currently in Private Listening mode
Definition rokuecp.h:39
Extended information about a TV channel.
Definition rokuecp.h:67
bool isActive
true if the channel is currently playing on the TV.
Definition rokuecp.h:73
RokuTVProgram program
The currently playing program.
Definition rokuecp.h:75
int8_t signalStrength
Signal strength in dB.
Definition rokuecp.h:79
uint8_t signalQuality
Signal quality level from 0-100.
Definition rokuecp.h:78
bool signalReceived
false if there is currently no signal
Definition rokuecp.h:76
RokuTVChannel channel
Base channel info.
Definition rokuecp.h:68
Information about a Roku search to be performed.
Definition rokuecp.h:97
bool autoSelect
true if the first result should automatically be selected
Definition rokuecp.h:109
unsigned short season
season of the show to search for
Definition rokuecp.h:108
bool includeUnavailable
true if results that are unavailable in your region should still be included
Definition rokuecp.h:106
bool autoLaunch
true if the first provider in providerIDs with a result found should be launched automatically
Definition rokuecp.h:110
Information about a TV channel on a Roku device.
Definition rokuecp.h:46
uint8_t physicalChannel
integer physical RF channel number (2-69)
Definition rokuecp.h:51
unsigned long frequency
integer channel frequency in Hz (54-806 million)
Definition rokuecp.h:52
Information about a TV program on a Roku device.
Definition rokuecp.h:56
bool hasCC
true if the program has closed captions available
Definition rokuecp.h:60