libUPnP  1.8.4
tv_device.h
Go to the documentation of this file.
1 #ifndef UPNP_TV_DEVICE_H
2 #define UPNP_TV_DEVICE_H
3 
4 /**************************************************************************
5  *
6  * Copyright (c) 2000-2003 Intel Corporation
7  * All rights reserved.
8  *
9  * Redistribution and use in source and binary forms, with or without
10  * modification, are permitted provided that the following conditions are met:
11  *
12  * - Redistributions of source code must retain the above copyright notice,
13  * this list of conditions and the following disclaimer.
14  * - Redistributions in binary form must reproduce the above copyright notice,
15  * this list of conditions and the following disclaimer in the documentation
16  * and/or other materials provided with the distribution.
17  * - Neither name of Intel Corporation nor the names of its contributors
18  * may be used to endorse or promote products derived from this software
19  * without specific prior written permission.
20  *
21  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
24  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR
25  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
26  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
27  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
28  * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
29  * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
30  * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
31  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32  *
33  **************************************************************************/
34 
47 #include <stdio.h>
48 #include <signal.h>
49 
50 #ifdef __cplusplus
51 extern "C" {
52 #endif
53 
54 #include "sample_util.h"
55 
56 #include "ithread.h"
57 #include "upnp.h"
58 
59 #include <stdlib.h>
60 #include <string.h>
61 
63 #define MAX_COLOR 10
64 #define MIN_COLOR 1
65 
67 #define MAX_BRIGHTNESS 10
68 #define MIN_BRIGHTNESS 1
69 
71 #define POWER_ON 1
72 #define POWER_OFF 0
73 
75 #define MAX_TINT 10
76 #define MIN_TINT 1
77 
79 #define MAX_VOLUME 10
80 #define MIN_VOLUME 1
81 
83 #define MAX_CONTRAST 10
84 #define MIN_CONTRAST 1
85 
87 #define MAX_CHANNEL 100
88 #define MIN_CHANNEL 1
89 
91 #define TV_SERVICE_SERVCOUNT 2
92 
94 #define TV_SERVICE_CONTROL 0
95 
97 #define TV_SERVICE_PICTURE 1
98 
100 #define TV_CONTROL_VARCOUNT 3
101 
103 #define TV_CONTROL_POWER 0
104 
106 #define TV_CONTROL_CHANNEL 1
107 
109 #define TV_CONTROL_VOLUME 2
110 
112 #define TV_PICTURE_VARCOUNT 4
113 
115 #define TV_PICTURE_COLOR 0
116 
118 #define TV_PICTURE_TINT 1
119 
121 #define TV_PICTURE_CONTRAST 2
122 
124 #define TV_PICTURE_BRIGHTNESS 3
125 
127 #define TV_MAX_VAL_LEN 5
128 
130 #define TV_MAXACTIONS 12
131 
133 #define TV_MAXVARS TV_PICTURE_VARCOUNT
134 
145 typedef int (*upnp_action)(
147  IXML_Document *request,
149  IXML_Document **out,
151  const char **errorString);
152 
154 struct TvService {
156  char UDN[NAME_SIZE];
158  char ServiceId[NAME_SIZE];
160  char ServiceType[NAME_SIZE];
162  const char *VariableName[TV_MAXVARS];
171 };
172 
174 extern struct TvService tv_service_table[];
175 
178 
183 extern ithread_mutex_t TVDevMutex;
184 
191 int SetActionTable(
193  int serviceType,
195  struct TvService *out);
196 
207  char *DescDocURL);
208 
217  const UpnpSubscriptionRequest *sr_event);
218 
227  UpnpStateVarRequest *cgv_event);
228 
237  UpnpActionRequest *ca_event);
238 
252  Upnp_EventType,
254  const void *Event,
256  void *Cookie);
257 
268  unsigned int service,
272  int variable,
274  char *value);
275 
276 /* Control Service Actions */
277 
281 int TvDevicePowerOn(
283  IXML_Document *in,
285  IXML_Document **out,
287  const char **errorString);
288 
292 int TvDevicePowerOff(
294  IXML_Document *in,
296  IXML_Document **out,
298  const char **errorString);
299 
307  IXML_Document *in,
309  IXML_Document **out,
311  const char **errorString);
312 
318  IXML_Document *in,
320  IXML_Document **out,
322  const char **errorString);
323 
329  IXML_Document *in,
331  IXML_Document **out,
333  const char **errorString);
334 
342  IXML_Document *in,
344  IXML_Document **out,
346  const char **errorString);
347 
353  IXML_Document *in,
355  IXML_Document **out,
357  const char **errorString);
358 
364  IXML_Document *in,
366  IXML_Document **out,
368  const char **errorString);
369 
370 /*Picture Service Actions */
371 
377 int TvDeviceSetColor(
379  IXML_Document *in,
381  IXML_Document **out,
383  const char **errorString);
384 
390  IXML_Document *in,
392  IXML_Document **out,
394  const char **errorString);
395 
401  IXML_Document *in,
403  IXML_Document **out,
405  const char **errorString);
406 
412 int TvDeviceSetTint(
414  IXML_Document *in,
416  IXML_Document **out,
418  const char **errorString);
419 
425  IXML_Document *in,
427  IXML_Document **out,
429  const char **errorString);
430 
436  IXML_Document *in,
438  IXML_Document **out,
440  const char **errorString);
441 
449  IXML_Document *in,
451  IXML_Document **out,
453  const char **errorString);
454 
460  IXML_Document *in,
462  IXML_Document **out,
464  const char **errorString);
465 
471  IXML_Document *in,
473  IXML_Document **out,
475  const char **errorString);
476 
484  IXML_Document *in,
486  IXML_Document **out,
488  const char **errorString);
489 
495  IXML_Document *in,
497  IXML_Document **out,
499  const char **errorString);
500 
506  IXML_Document *in,
508  IXML_Document **out,
510  const char **errorString);
511 
516 int TvDeviceStart(
519  char *ip_address,
522  unsigned short port,
525  const char *desc_doc_name,
528  const char *web_dir_path,
530  print_string pfun,
532  int combo);
533 
537 int TvDeviceStop(void);
538 
545 void *TvDeviceCommandLoop(void *args);
546 
561 int device_main(int argc, char *argv[]);
562 
563 #ifdef __cplusplus
564 }
565 #endif
566 
571 #endif /* UPNP_TV_DEVICE_H */
UPNP_DISCOVERY_SEARCH_RESULT
@ UPNP_DISCOVERY_SEARCH_RESULT
Definition: Callback.h:63
UPNP_EVENT_SUBSCRIPTION_REQUEST
@ UPNP_EVENT_SUBSCRIPTION_REQUEST
Definition: Callback.h:83
IncrementBrightness
static int IncrementBrightness(int incr, IXML_Document *in, IXML_Document **out, const char **errorString)
Increment the brightness. Read the current brightness from the state table, add the increment,...
Definition: tv_device.c:1199
UPNP_CONTROL_ACTION_REQUEST
@ UPNP_CONTROL_ACTION_REQUEST
Definition: Callback.h:25
UpnpRegisterRootDevice
int UpnpRegisterRootDevice(const char *DescUrl, Upnp_FunPtr Callback, const void *Cookie, UpnpDevice_Handle *Hnd)
Registers a device application with the UPnP Library.
Definition: upnpapi.c:763
TV_MAXVARS
#define TV_MAXVARS
Definition: tv_device.h:133
SampleUtil_PrintEvent
int SampleUtil_PrintEvent(Upnp_EventType EventType, const void *Event)
Prints callback event structure details.
Definition: sample_util.c:317
UpnpAcceptSubscription
int UpnpAcceptSubscription(UpnpDevice_Handle Hnd, const char *DevID, const char *ServID, const char **VarName, const char **NewVal, int cVariables, const Upnp_SID SubsId)
Accepts a subscription request and sends out the current state of the eventable variables for a servi...
Definition: upnpapi.c:2380
tv_service_table
struct TvService tv_service_table[]
Definition: tv_device.c:70
SampleUtil_GetFirstDocumentItem
char * SampleUtil_GetFirstDocumentItem(IXML_Document *doc, const char *item)
Given a document node, this routine searches for the first element named by the input string item,...
Definition: sample_util.c:192
TvService::ActionNames
const char * ActionNames[12]
Definition: tv_device.h:166
UpnpDownloadXmlDoc
int UpnpDownloadXmlDoc(const char *url, IXML_Document **xmlDoc)
Downloads an XML document specified in a URL.
Definition: upnpapi.c:3190
TvDeviceIncreaseTint
int TvDeviceIncreaseTint(IXML_Document *in, IXML_Document **out, const char **errorString)
Increase tint.
UPNP_CONTROL_GET_VAR_REQUEST
@ UPNP_CONTROL_GET_VAR_REQUEST
Definition: Callback.h:36
UpnpAcceptSubscriptionExt
int UpnpAcceptSubscriptionExt(UpnpDevice_Handle Hnd, const char *DevID, const char *ServID, IXML_Document *PropSet, const Upnp_SID SubsId)
Similar to UpnpAcceptSubscription() except that it takes a DOM document for the variables to event ra...
Definition: upnpapi.c:2459
TvDeviceDecreaseTint
int TvDeviceDecreaseTint(IXML_Document *in, IXML_Document **out, const char **errorString)
Decrease tint.
UPNP_EVENT_RENEWAL_COMPLETE
@ UPNP_EVENT_RENEWAL_COMPLETE
Definition: Callback.h:93
UPNP_E_INVALID_PARAM
#define UPNP_E_INVALID_PARAM
One or more of the parameters passed to the function is not valid.
Definition: upnp.h:110
print_string
void(* print_string)(const char *string,...)
Prototype for displaying strings. All printing done by the device, control point, and sample util,...
Definition: sample_util.h:162
SetServiceTable
static int SetServiceTable(int serviceType, const char *UDN, const char *serviceId, const char *serviceTypeS, struct TvService *out)
Initializes the service table for the specified service.
Definition: tv_device.c:112
UPNP_EVENT_UNSUBSCRIBE_COMPLETE
@ UPNP_EVENT_UNSUBSCRIBE_COMPLETE
Definition: Callback.h:103
tvc_varname
const char * tvc_varname[]
Definition: tv_device.c:54
TvDeviceCallbackEventHandler
int TvDeviceCallbackEventHandler(Upnp_EventType EventType, const void *Event, void *Cookie)
The callback handler registered with the SDK while registering root device.
Definition: tv_device.c:1265
TvDeviceIncreaseChannel
int TvDeviceIncreaseChannel(IXML_Document *in, IXML_Document **out, const char **errorString)
Increase the channel.
Definition: tv_device.c:670
MAX_CHANNEL
#define MAX_CHANNEL
Definition: tv_device.c:106
_IXML_Document
Data structure representing the DOM Document.
Definition: ixml.h:198
TvDeviceHandleSubscriptionRequest
int TvDeviceHandleSubscriptionRequest(const UpnpSubscriptionRequest *sr_event)
Called during a subscription request callback.
Definition: tv_device.c:291
TvService::VariableStrVal
char * VariableStrVal[4]
Definition: tv_device.h:164
SampleUtil_Initialize
int SampleUtil_Initialize(print_string print_function)
Initializes the sample util. Must be called before any sample util functions. May be called multiple ...
Definition: sample_util.c:62
UpnpGetServerPort
unsigned short UpnpGetServerPort(void)
Returns the internal server IPv4 UPnP listening port.
Definition: upnpapi.c:659
TV_SERVICE_SERVCOUNT
#define TV_SERVICE_SERVCOUNT
Definition: tv_device.h:91
TvDeviceStart
int TvDeviceStart(char *ip_address, unsigned short port, const char *desc_doc_name, const char *web_dir_path, print_string pfun, int combo)
Initializes the UPnP Sdk, registers the device, and sends out advertisements.
Definition: tv_device.c:1301
TvDeviceSetContrast
int TvDeviceSetContrast(IXML_Document *in, IXML_Document **out, const char **errorString)
Change the contrast, update the TvDevice picture service state table, and notify all subscribed contr...
MAX_VOLUME
#define MAX_VOLUME
Definition: tv_device.c:98
TvDeviceStateTableInit
int TvDeviceStateTableInit(char *DescDocURL)
Initialize the device state table for this TvDevice, pulling identifier info from the description Doc...
Definition: tv_device.c:219
IncrementContrast
static int IncrementContrast(int incr, IXML_Document *in, IXML_Document **out, const char **errorString)
Increment the contrast. Read the current contrast from the state table, add the increment,...
Definition: tv_device.c:1089
TvDeviceIncreaseContrast
int TvDeviceIncreaseContrast(IXML_Document *in, IXML_Document **out, const char **errorString)
Increase the contrast.
Definition: tv_device.c:1143
TV_CONTROL_VARCOUNT
#define TV_CONTROL_VARCOUNT
Definition: tv_device.h:100
TV_CONTROL_POWER
#define TV_CONTROL_POWER
Definition: tv_device.h:103
UpnpAddToActionResponse
EXPORT_SPEC int UpnpAddToActionResponse(IXML_Document **ActionResponse, const char *ActionName, const char *ServType, const char *ArgName, const char *ArgVal)
Creates an action response packet based on its output parameters (status variable name and value pair...
Definition: upnptools.c:398
IncrementVolume
static int IncrementVolume(int incr, IXML_Document *in, IXML_Document **out, const char **errorString)
Increment the volume. Read the current volume from the state table, add the increment,...
Definition: tv_device.c:719
UPNP_DISCOVERY_SEARCH_TIMEOUT
@ UPNP_DISCOVERY_SEARCH_TIMEOUT
Definition: Callback.h:68
TvService::actions
upnp_action actions[12]
Definition: tv_device.h:168
TV_PICTURE_CONTRAST
#define TV_PICTURE_CONTRAST
Definition: tv_device.h:121
UpnpInit2
int UpnpInit2(const char *IfName, unsigned short DestPort)
Initializes the Linux SDK for UPnP Devices (IPv4 or IPv6).
Definition: upnpapi.c:460
UPNP_E_SUCCESS
#define UPNP_E_SUCCESS
The operation completed successfully.
Definition: upnp.h:97
POWER_ON
#define POWER_ON
Definition: tv_device.c:90
UpnpUnRegisterRootDevice
int UpnpUnRegisterRootDevice(UpnpDevice_Handle Hnd)
Unregisters a root device registered with UpnpRegisterRootDevice, UpnpRegisterRootDevice2,...
Definition: upnpapi.c:1226
TvDeviceDecreaseChannel
int TvDeviceDecreaseChannel(IXML_Document *in, IXML_Document **out, const char **errorString)
Decrease the channel.
Definition: tv_device.c:664
UPNP_EVENT_RECEIVED
@ UPNP_EVENT_RECEIVED
Definition: Callback.h:88
upnp.h
TvDeviceIncreaseVolume
int TvDeviceIncreaseVolume(IXML_Document *in, IXML_Document **out, const char **errorString)
Increase the volume.
Definition: tv_device.c:773
tvp_varname
const char * tvp_varname[]
Definition: tv_device.c:61
UPNP_CONTROL_GET_VAR_COMPLETE
@ UPNP_CONTROL_GET_VAR_COMPLETE
Definition: Callback.h:41
TvDeviceSetTint
int TvDeviceSetTint(IXML_Document *in, IXML_Document **out, const char **errorString)
Change the tint, update the TvDevice picture service state table, and notify all subscribed control p...
Definition: tv_device.c:892
TvDevicePowerOn
int TvDevicePowerOn(IXML_Document *in, IXML_Document **out, const char **errorString)
Turn the power on.
Definition: tv_device.c:530
TvDeviceDecreaseBrightness
int TvDeviceDecreaseBrightness(IXML_Document *in, IXML_Document **out, const char **errorString)
Decrease brightnesss.
Definition: tv_device.c:1259
ixmlDocument_free
EXPORT_SPEC void ixmlDocument_free(IXML_Document *doc)
Frees a Document object and all Nodes associated with it.
Definition: document.c:54
TV_CONTROL_CHANNEL
#define TV_CONTROL_CHANNEL
Definition: tv_device.h:106
TvDeviceDecreaseVolume
int TvDeviceDecreaseVolume(IXML_Document *in, IXML_Document **out, const char **errorString)
Decrease the volume.
Definition: tv_device.c:779
TvDeviceHandleActionRequest
int TvDeviceHandleActionRequest(UpnpActionRequest *ca_event)
Called during an action request callback.
Definition: tv_device.c:395
TV_CONTROL_VOLUME
#define TV_CONTROL_VOLUME
Definition: tv_device.h:109
TvService::VariableCount
int VariableCount
Definition: tv_device.h:170
UPNP_DISCOVERY_ADVERTISEMENT_BYEBYE
@ UPNP_DISCOVERY_ADVERTISEMENT_BYEBYE
Definition: Callback.h:57
TvService::ServiceType
char ServiceType[NAME_SIZE]
Definition: tv_device.h:160
TvDeviceSetColor
int TvDeviceSetColor(IXML_Document *in, IXML_Document **out, const char **errorString)
Change the color, update the TvDevice picture service state table, and notify all subscribed control ...
Definition: tv_device.c:785
tv_device.h
tv_service_table
struct TvService tv_service_table[2]
Definition: tv_device.c:70
UpnpString_get_String
const char * UpnpString_get_String(const UpnpString *p)
Returns the pointer to char.
Definition: UpnpString.c:159
default_advr_expire
int default_advr_expire
Definition: tv_device.c:67
TV_SERVICE_PICTURE
#define TV_SERVICE_PICTURE
Definition: tv_device.h:97
TvService::VariableName
const char * VariableName[4]
Definition: tv_device.h:162
UpnpNotify
int UpnpNotify(UpnpDevice_Handle, const char *DevID, const char *ServID, const char **VarName, const char **NewVal, int cVariables)
Sends out an event change notification to all control points subscribed to a particular service.
Definition: upnpapi.c:2279
TvDeviceSetBrightness
int TvDeviceSetBrightness(IXML_Document *in, IXML_Document **out, const char **errorString)
Change the brightness, update the TvDevice picture service state table, and notify all subscribed con...
Definition: tv_device.c:1155
sample_util.h
TvDeviceStop
int TvDeviceStop(void)
Stops the device. Uninitializes the sdk.
Definition: tv_device.c:1378
TV_PICTURE_BRIGHTNESS
#define TV_PICTURE_BRIGHTNESS
Definition: tv_device.h:124
UPNP_E_INVALID_DESC
#define UPNP_E_INVALID_DESC
The description document passed to UpnpRegisterRootDevice, UpnpRegisterRootDevice2 UpnpRegisterRootDe...
Definition: upnp.h:143
TV_PICTURE_COLOR
#define TV_PICTURE_COLOR
Definition: tv_device.h:115
SampleUtil_Print
int SampleUtil_Print(const char *fmt,...)
Function emulating printf that ultimately calls the registered print function with the formatted stri...
Definition: sample_util.c:634
linux_print
void linux_print(const char *format,...)
Prints a string to standard out.
Definition: sample_util.c:666
TvDeviceSetChannel
int TvDeviceSetChannel(IXML_Document *in, IXML_Document **out, const char **errorString)
Change the channel, update the TvDevice control service state table, and notify all subscribed contro...
Definition: tv_device.c:575
UpnpSendAdvertisement
int UpnpSendAdvertisement(UpnpDevice_Handle Hnd, int Exp)
Sends out the discovery announcements for all devices and services for a device.
Definition: upnpapi.c:1638
SampleUtil_FindAndParseService
int SampleUtil_FindAndParseService(IXML_Document *DescDoc, const char *location, const char *serviceType, char **serviceId, char **eventURL, char **controlURL)
This routine finds the first occurance of a service in a DOM representation of a description document...
Definition: sample_util.c:550
ithread.h
upnp_action
int(* upnp_action)(IXML_Document *request, IXML_Document **out, const char **errorString)
Prototype for all actions. For each action that a service implements, there is a corresponding functi...
Definition: tv_device.h:145
UpnpDevice_Handle
int UpnpDevice_Handle
Returned when a device application registers with UpnpRegisterRootDevice, UpnpRegisterRootDevice2,...
Definition: upnp.h:436
SetActionTable
int SetActionTable(int serviceType, struct TvService *out)
Initializes the action table for the specified service.
Definition: tv_device.c:164
TV_MAXACTIONS
#define TV_MAXACTIONS
Definition: tv_device.h:130
UpnpGetServerIpAddress
char * UpnpGetServerIpAddress(void)
Returns the local IPv4 listening ip address.
Definition: upnpapi.c:679
TvService::UDN
char UDN[NAME_SIZE]
Definition: tv_device.h:156
UpnpCreatePropertySet
EXPORT_SPEC IXML_Document * UpnpCreatePropertySet(int NumArg, const char *Arg,...)
Creates a property set message packet.
Definition: upnptools.c:409
TvDeviceSetVolume
int TvDeviceSetVolume(IXML_Document *in, IXML_Document **out, const char **errorString)
Change the volume, update the TvDevice control service state table, and notify all subscribed control...
Definition: tv_device.c:676
UpnpAddToPropertySet
EXPORT_SPEC int UpnpAddToPropertySet(IXML_Document **PropSet, const char *ArgName, const char *ArgVal)
Can be used when an application needs to transfer the status of many variables at once.
Definition: upnptools.c:458
UPNP_EVENT_SUBSCRIBE_COMPLETE
@ UPNP_EVENT_SUBSCRIBE_COMPLETE
Definition: Callback.h:98
TvService::ServiceId
char ServiceId[NAME_SIZE]
Definition: tv_device.h:158
UPNP_CONTROL_ACTION_COMPLETE
@ UPNP_CONTROL_ACTION_COMPLETE
Definition: Callback.h:30
device_main
int device_main(int argc, char *argv[])
Main entry point for tv device application.
Definition: tv_device.c:1418
UpnpNotifyExt
int UpnpNotifyExt(UpnpDevice_Handle, const char *DevID, const char *ServID, IXML_Document *PropSet)
Similar to UpnpNotify except that it takes a DOM document for the event rather than an array of strin...
Definition: upnpapi.c:2333
UPNP_DISCOVERY_ADVERTISEMENT_ALIVE
@ UPNP_DISCOVERY_ADVERTISEMENT_ALIVE
Definition: Callback.h:51
TvDeviceHandleGetVarRequest
int TvDeviceHandleGetVarRequest(UpnpStateVarRequest *cgv_event)
Called during a get variable request callback.
Definition: tv_device.c:348
UPNP_E_INTERNAL_ERROR
#define UPNP_E_INTERNAL_ERROR
Generic error code for internal conditions not covered by other error codes.
Definition: upnp.h:376
TvDeviceIncreaseColor
int TvDeviceIncreaseColor(IXML_Document *in, IXML_Document **out, const char **errorString)
Increase the color.
Definition: tv_device.c:886
TV_PICTURE_TINT
#define TV_PICTURE_TINT
Definition: tv_device.h:118
MAX_CONTRAST
#define MAX_CONTRAST
Definition: tv_device.c:102
TvDevicePowerOff
int TvDevicePowerOff(IXML_Document *in, IXML_Document **out, const char **errorString)
Turn the power off.
Definition: tv_device.c:553
MAX_COLOR
#define MAX_COLOR
Definition: tv_device.c:82
TvDeviceCommandLoop
void * TvDeviceCommandLoop(void *args)
Function that receives commands from the user at the command prompt during the lifetime of the device...
Definition: tv_device.c:1388
TvDeviceDecreaseColor
int TvDeviceDecreaseColor(IXML_Document *in, IXML_Document **out, const char **errorString)
Decrease the color.
Definition: tv_device.c:880
TvDeviceSetServiceTableVar
int TvDeviceSetServiceTableVar(unsigned int service, int variable, char *value)
Update the TvDevice service state table, and notify all subscribed control points of the updated stat...
Definition: tv_device.c:472
TV_SERVICE_CONTROL
#define TV_SERVICE_CONTROL
Definition: tv_device.h:94
UpnpFinish
int UpnpFinish(void)
Initializes the OpenSSL library, and the OpenSSL context for use with pupnp.
Definition: upnpapi.c:585
TVDevMutex
ithread_mutex_t TVDevMutex
Definition: tv_device.c:79
UpnpSetWebServerRootDir
int UpnpSetWebServerRootDir(const char *rootDir)
Sets the document root directory for the internal web server.
TvDeviceDecreaseContrast
int TvDeviceDecreaseContrast(IXML_Document *in, IXML_Document **out, const char **errorString)
Decrease the contrast.
Definition: tv_device.c:1149
TvDeviceIncreaseBrightness
int TvDeviceIncreaseBrightness(IXML_Document *in, IXML_Document **out, const char **errorString)
Increase brightnesss.
Definition: tv_device.c:1253
device_handle
UpnpDevice_Handle device_handle
Definition: tv_device.c:73
TvDeviceSetPower
static int TvDeviceSetPower(int on)
Turn the power on/off, update the TvDevice control service state table, and notify all subscribed con...
Definition: tv_device.c:509
MAX_TINT
#define MAX_TINT
Definition: tv_device.c:94
TV_PICTURE_VARCOUNT
#define TV_PICTURE_VARCOUNT
Definition: tv_device.h:112
IncrementColor
static int IncrementColor(int incr, IXML_Document *in, IXML_Document **out, const char **errorString)
Increment the color. Read the current color from the state table, add the increment,...
Definition: tv_device.c:828
TV_MAX_VAL_LEN
#define TV_MAX_VAL_LEN
Definition: tv_device.h:127
MAX_BRIGHTNESS
#define MAX_BRIGHTNESS
Definition: tv_device.c:86
TvService
Definition: tv_device.h:154
SampleUtil_Finish
int SampleUtil_Finish()
Releases Resources held by sample util.
Definition: sample_util.c:92