add_integer: remove callback parameter
[vlc/asuraparaju-public.git] / modules / video_filter / atmo / AtmoMultiConnection.h
blob0ffd754fa933f88638899212b458323d30bf1a11
1 /*
2 * AtmoMultiConnection.h: Class for communication with up to 4 - 4 channel classic atmolight controllers
3 * so you can built a cheap solution for having up to 16 channels, but you need four comports or
4 * USB Adapters
6 * See the README.txt file for copyright information and how to reach the author(s).
8 * $Id$
9 */
11 #ifndef _AtmoMultiConnection_h_
12 #define _AtmoMultiConnection_h_
14 #include "AtmoDefs.h"
15 #include "AtmoConnection.h"
16 #include "AtmoConfig.h"
18 #if defined(WIN32)
19 # include <windows.h>
20 #endif
23 class CAtmoMultiConnection : public CAtmoConnection
25 private:
26 HANDLE m_hComports[4];
27 unsigned char m_output[4 * 4 * 3];
29 #if defined(WIN32)
30 DWORD m_dwLastWin32Error;
31 public:
32 DWORD getLastError() { return m_dwLastWin32Error; }
33 #endif
36 on windows devName is COM1 COM2 etc.
37 on linux devname my be /dev/ttyS0 or /dev/ttyUSB0
39 HANDLE OpenDevice(char *devName);
40 ATMO_BOOL internal_HardwareWhiteAdjust(HANDLE hComport,int global_gamma,
41 int global_contrast,
42 int contrast_red,
43 int contrast_green,
44 int contrast_blue,
45 int gamma_red,
46 int gamma_green,
47 int gamma_blue,
48 ATMO_BOOL storeToEeprom);
50 ATMO_BOOL internal_SendData(HANDLE hComport, unsigned char *colorData);
52 public:
53 CAtmoMultiConnection(CAtmoConfig *cfg);
54 virtual ~CAtmoMultiConnection(void);
56 virtual ATMO_BOOL OpenConnection();
58 virtual void CloseConnection();
60 virtual ATMO_BOOL isOpen(void);
62 virtual ATMO_BOOL SendData(pColorPacket data);
64 virtual ATMO_BOOL setChannelColor(int channel, tRGBColor color);
65 virtual ATMO_BOOL setChannelValues(int numValues,unsigned char *channel_values);
67 virtual ATMO_BOOL HardwareWhiteAdjust(int global_gamma,
68 int global_contrast,
69 int contrast_red,
70 int contrast_green,
71 int contrast_blue,
72 int gamma_red,
73 int gamma_green,
74 int gamma_blue,
75 ATMO_BOOL storeToEeprom);
77 virtual int getNumChannels();
78 virtual const char *getDevicePath() { return "multiatmo"; }
80 #if !defined(_ATMO_VLC_PLUGIN_)
81 virtual char *getChannelName(int ch);
82 virtual ATMO_BOOL ShowConfigDialog(HINSTANCE hInst, HWND parent, CAtmoConfig *cfg);
83 #endif
85 virtual ATMO_BOOL CreateDefaultMapping(CAtmoChannelAssignment *ca);
88 #endif