2 * AtmoConnection.h: generic/abstract class defining all methods for the
3 * communication with the hardware
5 * See the README.txt file for copyright information and how to reach the author(s).
9 #ifndef _AtmoConnection_h_
10 #define _AtmoConnection_h_
15 #include "AtmoConfig.h"
16 #include "AtmoChannelAssignment.h"
18 #if defined(_ATMO_VLC_PLUGIN_)
19 # include <vlc_common.h>
20 # include <vlc_threads.h>
28 CAtmoConfig *m_pAtmoConfig;
30 #if defined(_ATMO_VLC_PLUGIN_)
31 vlc_mutex_t m_AccessConnection;
33 CRITICAL_SECTION m_AccessConnection;
36 int *m_ChannelAssignment;
37 int m_NumAssignedChannels;
44 CAtmoConnection(CAtmoConfig *cfg);
45 virtual ~CAtmoConnection(void);
46 virtual ATMO_BOOL OpenConnection() = 0;
47 virtual void CloseConnection() {};
48 virtual ATMO_BOOL isOpen(void) { return false; }
50 virtual ATMO_BOOL SendData(pColorPacket data) = 0;
52 virtual ATMO_BOOL setChannelColor(int /*channel*/, tRGBColor /*color*/)
54 virtual ATMO_BOOL setChannelValues(int /*num*/,unsigned char * /*values*/)
57 virtual ATMO_BOOL HardwareWhiteAdjust(int /*global_gamma*/,
58 int /*global_contrast*/,
60 int /*contrast_green*/,
61 int /*contrast_blue*/,
65 ATMO_BOOL /*storeToEeprom*/)
68 #if !defined(_ATMO_VLC_PLUGIN_)
69 virtual ATMO_BOOL ShowConfigDialog(HINSTANCE hInst, HWND parent, CAtmoConfig *cfg);
72 virtual void SetChannelAssignment(CAtmoChannelAssignment *ca);
74 virtual int getNumChannels() { return 0; }
75 virtual char *getChannelName(int /*ch*/) { return NULL; }
77 virtual const char *getDevicePath() { return "none"; }
79 virtual ATMO_BOOL CreateDefaultMapping(CAtmoChannelAssignment * /*ca*/)