IRTrans.h
Go to the documentation of this file.
00001 #ifdef WIN32
00002 
00003 #include <winsock2.h>
00004 #include <windows.h>
00005 
00006 #endif
00007 
00008 #ifdef LINUX
00009 
00010 #include <sys/types.h>
00011 #include <sys/socket.h>
00012 #include <netinet/in.h>
00013 #include <sys/un.h>
00014 #include <arpa/inet.h>
00015 #include <sys/stat.h>
00016 #include <errno.h>
00017 #include <netdb.h>
00018 #include <signal.h>
00019 #define closesocket close
00020 
00021 #endif
00022 
00023 
00024 #include <stdio.h>
00025 
00026 #include "remote.h"
00027 #include "network.h"
00028 #include "errcode.h"
00029 
00030 
00031 #ifdef WIN32
00032 
00033 #ifdef IRTRANSDLL_EXPORTS
00034 #define IRTRANSDLL_API __declspec(dllexport)
00035 #else
00036 #ifdef  __cplusplus
00037 #define IRTRANSDLL_API extern "C" __declspec(dllimport)
00038 #else
00039 #define IRTRANSDLL_API __declspec(dllimport)
00040 #endif
00041 #endif
00042 
00043 #else
00044 
00045 #define IRTRANSDLL_API
00046 
00047 #endif
00048 
00049 
00050 IRTRANSDLL_API int ConnectIRTransServer (char host[],SOCKET *sock);
00051 IRTRANSDLL_API void DisconnectIRTransServer (SOCKET serv);
00052 IRTRANSDLL_API NETWORKSTATUS *LearnRepeatIRCode (SOCKET serv, char rem[],char com[],unsigned short timeout);
00053 IRTRANSDLL_API NETWORKSTATUS *SendRemoteCommand (SOCKET serv, char rem[],char com[],int mask,int LEDSel,int bus);
00054 IRTRANSDLL_API NETWORKRECV *ReceiveIR (SOCKET serv);
00055 IRTRANSDLL_API NETWORKSTATUS *ReloadIRDatabase (SOCKET serv);
00056 IRTRANSDLL_API int GetDeviceStatus (SOCKET serv, void *result);
00057 IRTRANSDLL_API int GetDeviceStatusExN (SOCKET serv, int offset,void *result);
00058 IRTRANSDLL_API NETWORKSTATUS *SendRemoteCommandEx (SOCKET serv, char rem[],char com[],word mask,byte LEDSel,byte bus);
00059 IRTRANSDLL_API NETWORKSTATUS *SendCCFCommand (SOCKET serv, char ccfstr[],byte repeat,word mask,byte LEDSel,byte bus);
00060 IRTRANSDLL_API NETWORKSTATUS *SendCCFCommandLong (SOCKET serv, char ccfstr[],byte repeat,word mask,byte LEDSel,byte bus);
00061 IRTRANSDLL_API int GetRemotes (SOCKET serv,int16_t offset,REMOTEBUFFER *rem);
00062 IRTRANSDLL_API int GetCommands (SOCKET serv,char rem[],int16_t offset,COMMANDBUFFER *com);
00063 IRTRANSDLL_API NETWORKSTATUS *LearnIRCode (SOCKET serv, char rem[],char com[],unsigned short timeout);
00064 IRTRANSDLL_API NETWORKSTATUS *LearnRawIRCode (SOCKET serv, char rem[],char com[],unsigned short timeout);
00065 IRTRANSDLL_API NETWORKSTATUS *LearnIRCodeEx (SOCKET serv, char rem[],char com[],unsigned short timeout,byte ir_timeout);
00066 IRTRANSDLL_API NETWORKSTATUS *LearnRawIRCodeEx (SOCKET serv, char rem[],char com[],unsigned short timeout,byte ir_timeout);
00067 IRTRANSDLL_API int GetBuslist (SOCKET serv,int16_t offset,BUSBUFFER *rem);
00068 
00069 
00070 
00071 IRTRANSDLL_API NETWORKSTATUS *SetTimerEntry (SOCKET serv,byte num,byte mode,byte year,byte month,byte day,byte weekday,byte hour,byte min,
00072                                                                                          byte ledsel,word targetmask,byte remote[],byte command[],byte bus);
00073 
00074 /**********************************************************
00075 Set Timer Parameter:
00076 
00077 serv:           IRTrans Server conncection
00078 num:            Timer Number (0-3)
00079 mode:           Timer Mode
00080                                 TIMER_OFF
00081                                 TIMER_ONCE
00082                                 TIMER_REPEAT
00083 year:           Year
00084 month:          Month
00085 day:            Day
00086 Weekday:        Weekday
00087                                 WD_SUNDAY                                       
00088                                 WD_MONDAY       
00089                                 WD_TUESDAY      
00090                                 WD_WEDNESDAY
00091                                 WD_THURSDAY     
00092                                 WD_FRIDAY       
00093                                 WD_SATURDAY     
00094 hour:           Hour
00095 min:            Minute
00096 ledsel:         LED Select      
00097                                 INTERNAL_LEDS
00098                                 EXTERNAL_LEDS
00099                                 SEND_ACTION (Send Action to IP Clients instead of sending IR Codes
00100 targetmask:     Targetmask for IRTrans serial bus (0 if unused)
00101 remote:         Timer Remotecontrol
00102 command:        Timer Remotecommand
00103 bus:            Bus number of the IRTrans device (0-254), 0 for the first device
00104 
00105 For all unused Time parameters (year,month,day,hour,minute,weekday) use TIMER_UNUSED
00106 
00107 ***********************************************************/
00108 
00109 #define WD_SUNDAY               0
00110 #define WD_MONDAY               1
00111 #define WD_TUESDAY              2
00112 #define WD_WEDNESDAY    3
00113 #define WD_THURSDAY             4
00114 #define WD_FRIDAY               5
00115 #define WD_SATURDAY             6
00116 
00117 #define TIMER_UNUSED    0xff
00118 #define SEND_ACTION             128
00119 #define TIMER_OFF               1
00120 #define TIMER_ONCE              2
00121 #define TIMER_REPEAT    4


ir_drivers
Author(s): Raul Perula-Martinez
autogenerated on Thu Apr 2 2015 03:06:05