Mostly minor fixes up until version 0.8.10.
[irreco.git] / irtrans / shlib / src / IRTransDLL.h
blob636213050e9a9470b7d244ea46deb083338d0ab6
1 #ifdef WIN32
3 #include <winsock2.h>
4 #include <windows.h>
6 #endif
8 #ifdef LINUX
10 #include <sys/types.h>
11 #include <sys/socket.h>
12 #include <netinet/in.h>
13 #include <sys/un.h>
14 #include <arpa/inet.h>
15 #include <sys/stat.h>
16 #include <errno.h>
17 #include <netdb.h>
18 #include <signal.h>
19 typedef int SOCKET;
20 typedef void* WSAEVENT;
21 #define closesocket close
23 #endif
26 #include <stdio.h>
28 #include "remote.h"
29 #include "network.h"
30 #include "errcode.h"
33 #ifdef WIN32
35 #ifdef IRTRANSDLL_EXPORTS
36 #define IRTRANSDLL_API __declspec(dllexport)
37 #else
38 #ifdef __cplusplus
39 #define IRTRANSDLL_API extern "C" __declspec(dllimport)
40 #else
41 #define IRTRANSDLL_API __declspec(dllimport)
42 #endif
43 #endif
45 #else
47 #define IRTRANSDLL_API
49 #endif
51 IRTRANSDLL_API int ConnectIRTransServer (char host[],SOCKET *sock);
52 IRTRANSDLL_API void DisconnectIRTransServer (SOCKET serv);
53 IRTRANSDLL_API NETWORKSTATUS *LearnIRCode (SOCKET serv, char rem[],char com[],unsigned short timeout);
54 IRTRANSDLL_API NETWORKSTATUS *LearnRepeatIRCode (SOCKET serv, char rem[],char com[],unsigned short timeout);
55 IRTRANSDLL_API NETWORKSTATUS *SendRemoteCommand (SOCKET serv, char rem[],char com[],int mask,int LEDSel,int bus);
56 IRTRANSDLL_API NETWORKRECV *ReceiveIR (SOCKET serv);
57 IRTRANSDLL_API NETWORKSTATUS *ReloadIRDatabase (SOCKET serv);
58 IRTRANSDLL_API int GetDeviceStatus (SOCKET serv, void *result);