📄 upnp_z256_ctrlpt.h
字号:
/////////////////////////////////////////////////////////////////////////////// Copyright (c) 2000 Intel Corporation // All rights reserved. //// Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are met: //// * Redistributions of source code must retain the above copyright notice, // this list of conditions and the following disclaimer. // * Redistributions in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation // and/or other materials provided with the distribution. // * Neither name of Intel Corporation nor the names of its contributors // may be used to endorse or promote products derived from this software // without specific prior written permission.// // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY // OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.///////////////////////////////////////////////////////////////////////////////// $Revision: 1.1.1.3 $// $Date: 2001/06/15 00:21:09 $//#ifndef UPNP_TV_CTRLPT_H#define UPNP_TV_CTRLPT_H#include <stdio.h>#include <pthread.h>#include <stdlib.h>#include <signal.h>#include <unistd.h>#include <string.h>#include "upnp.h"#include "upnptools.h"#include "sample_util.h"#define Z256_SERVICE_SERVCOUNT 1 /*#define Z256_SERVICE_SERVCOUNT 2*/#define Z256_SERVICE_CONTROL 0#define Z256_SERVICE_PICTURE 1#define Z256_CONTROL_VARCOUNT 1/*#define Z256_CONTROL_VARCOUNT 3*/#define Z256_CONTROL_POWER 0#define Z256_CONTROL_CHANNEL 1#define Z256_CONTROL_VOLUME 2#define Z256_PICTURE_VARCOUNT 4#define Z256_PICTURE_COLOR 0#define Z256_PICTURE_TINT 1#define Z256_PICTURE_CONTRAST 2#define Z256_PICTURE_BRIGHTNESS 3#define Z256_MAX_VAL_LEN 5/* This should be the maximum VARCOUNT from above */#define Z256_MAXVARS Z256_PICTURE_VARCOUNTextern char Z256DeviceType[];extern char *Z256ServiceType[];extern char *Z256ServiceName[];extern char *Z256VarName[][];extern char Z256VarCount[];struct z256_service { char ServiceId[NAME_SIZE]; char ServiceType[NAME_SIZE]; char *VariableStrVal[Z256_MAXVARS]; char EventURL[NAME_SIZE]; char ControlURL[NAME_SIZE]; char SID[NAME_SIZE];};extern struct Z256DeviceNode *GlobalDeviceList;struct Z256Device { char UDN[250]; char DescDocURL[250]; char FriendlyName[250]; char PresURL[250]; int AdvrTimeOut; struct z256_service Z256Service[Z256_SERVICE_SERVCOUNT];};struct Z256DeviceNode { struct Z256Device device; struct Z256DeviceNode *next;};extern pthread_mutex_t DeviceListMutex;extern UpnpClient_Handle ctrlpt_handle;int Z256CtrlPointPrintHelp();int Z256CtrlPointDeleteNode(struct Z256DeviceNode*);int Z256CtrlPointRemoveDevice(char*);int Z256CtrlPointRemoveAll();int Z256CtrlPointRefresh();int Z256CtrlPointGetVar(int, int, char*);int Z256CtrlPointSendAction(int, int, char *, char **, char **, int);int Z256CtrlPointSendSetChannel(int, int);int Z256CtrlPointSendSetVolume(int, int);int Z256CtrlPointSendSetColor(int, int);int Z256CtrlPointSendSetTint(int, int);int Z256CtrlPointSendSetContrast(int, int);int Z256CtrlPointSendSetBrightness(int, int);int Z256CtrlPointGetDevice(int, struct Z256DeviceNode **);int Z256CtrlPointPrintList();int Z256CtrlPointPrintDevice(int);void Z256CtrlPointAddDevice (Upnp_Document, char *, int); void Z256StateUpdate(int, Upnp_Document, char **);void Z256CtrlPointHandleEvent(Upnp_SID, int, Upnp_Document); void Z256CtrlPointHandleSubscribeUpdate(char *, Upnp_SID, int); int Z256CtrlPointCallbackEventHandler(Upnp_EventType, void *, void *);void Z256CtrlPointVerifyTimeouts(int);void Z256CtrlPointPrintCommands();void* Z256CtrlPointCommandLoop(void*);#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -