tv_ctrlpt.c File Reference
Sample Code
`#include "tv_ctrlpt.h"`
`#include "upnp.h"`
`#include "posix_overwrites.h"`
Include dependency graph for tv_ctrlpt.c:

## Data Structures

struct | cmdloop_commands

## Control Point Sample Module

enum | cmdloop_tvcmds { PRTHELP = 0 , PRTFULLHELP , POWON , POWOFF , SETCHAN , SETVOL , SETCOL , SETTINT , SETCONT , SETBRT , CTRLACTION , PICTACTION , CTRLGETVAR , PICTGETVAR , PRTDEV , LSTDEV , REFRESH , EXITCMD }
ithread_mutex_t | DeviceListMutex
UpnpClient_Handle | ctrlpt_handle = -1
const char | TvDeviceType [] = "urn:schemas-upnp-org:device:tvdevice:1"
const char * | TvServiceName [] = {"Control", "Picture"}
const char * | TvVarName [2][4]
char | TvVarCount [2]
int | default_timeout = 1801
struct TvDeviceNode * | GlobalDeviceList = NULL
static int | TvCtrlPointTimerLoopRun = 1
| Function that runs in its own thread and monitors advertisement and subscription timeouts for devices in the global device list.
struct cmdloop_commands | cmdloop_commands
static struct cmdloop_commands | cmdloop_cmdlist []
int | TvCtrlPointDeleteNode (struct TvDeviceNode *node)
int | TvCtrlPointRemoveDevice (const char *UDN)
int | TvCtrlPointRemoveAll (void)
int | TvCtrlPointRefresh (void)
int | TvCtrlPointGetVar (int service, int devnum, const char *varname)
int | TvCtrlPointGetPower (int devnum)
int | TvCtrlPointGetChannel (int devnum)
int | TvCtrlPointGetVolume (int devnum)
int | TvCtrlPointGetColor (int devnum)
int | TvCtrlPointGetTint (int devnum)
int | TvCtrlPointGetContrast (int devnum)
int | TvCtrlPointGetBrightness (int devnum)
int | TvCtrlPointSendAction (int service, int devnum, const char *actionname, const char **param_name, char **param_val, int param_count)
int | TvCtrlPointSendActionNumericArg (int devnum, int service, const char *actionName, const char *paramName, int paramValue)
int | TvCtrlPointSendPowerOn (int devnum)
int | TvCtrlPointSendPowerOff (int devnum)
int | TvCtrlPointSendSetChannel (int devnum, int channel)
int | TvCtrlPointSendSetVolume (int devnum, int volume)
int | TvCtrlPointSendSetColor (int devnum, int color)
int | TvCtrlPointSendSetTint (int devnum, int tint)
int | TvCtrlPointSendSetContrast (int devnum, int contrast)
int | TvCtrlPointSendSetBrightness (int devnum, int brightness)
int | TvCtrlPointGetDevice (int devnum, struct TvDeviceNode **devnode)
int | TvCtrlPointPrintList ()
int | TvCtrlPointPrintDevice (int devnum)
void | TvCtrlPointAddDevice (IXML_Document *DescDoc, const char *location, int expires)
void | TvStateUpdate ( char *UDN, int Service, IXML_Document *ChangedVariables, char **State)
| Update a Tv state table. Called when an event is received.
void | TvCtrlPointHandleEvent (const char *sid, int evntkey, IXML_Document *changes)
void | TvCtrlPointHandleSubscribeUpdate (const char *eventURL, const Upnp_SID sid, int timeout)
void | TvCtrlPointHandleGetVar (const char *controlURL, const char *varName, const DOMString varValue)
int | TvCtrlPointCallbackEventHandler (Upnp_EventType EventType, const void *Event, void *Cookie)
void | TvCtrlPointVerifyTimeouts ( int incr)
| Checks the advertisement each device in the global device list.
void * | TvCtrlPointTimerLoop (void *args)
int | TvCtrlPointStart (char *iface, state_update updateFunctionPtr, int combo)
| Call this function to initialize the UPnP library and start the TV Control Point. This function creates a timer thread and provides a callback handler to process any UPnP events that are received.
int | TvCtrlPointStop (void)
void | TvCtrlPointPrintShortHelp (void)
| Print help info for this application.
void | TvCtrlPointPrintLongHelp (void)
| Print long help info for this application.
void | TvCtrlPointPrintCommands (void)
void * | TvCtrlPointCommandLoop (void *args)
| Function that receives commands from the user at the command prompt during the lifetime of the device, and calls the appropriate functions for those commands.
int | TvCtrlPointProcessCommand (char *cmdline)