AtmoConnection.h

Go to the documentation of this file.
00001 /*
00002  * AtmoConnection.h: generic/abstract class defining all methods for the
00003  * communication with the hardware
00004  *
00005  * See the README.txt file for copyright information and how to reach the author(s).
00006  *
00007  * $Id: 6f788008652182bd89a9aec9b93a1a2b3e61701e $
00008  */
00009 #ifndef _AtmoConnection_h_
00010 #define _AtmoConnection_h_
00011 
00012 #include <stdlib.h>
00013 
00014 #include "AtmoDefs.h"
00015 #include "AtmoConfig.h"
00016 #include "AtmoChannelAssignment.h"
00017 
00018 #if defined(_ATMO_VLC_PLUGIN_)
00019 #   include <vlc_common.h>
00020 #   include <vlc_threads.h>
00021 #else
00022 #   include <windows.h>
00023 #endif
00024 
00025 class CAtmoConnection
00026 {
00027 protected:
00028     CAtmoConfig *m_pAtmoConfig;
00029 
00030 #if defined(_ATMO_VLC_PLUGIN_)
00031     vlc_mutex_t m_AccessConnection;
00032 #else
00033     CRITICAL_SECTION m_AccessConnection;
00034 #endif
00035 
00036     int *m_ChannelAssignment;
00037     int m_NumAssignedChannels;
00038 
00039 protected:
00040     void Lock();
00041     void Unlock();
00042 
00043 public:
00044     CAtmoConnection(CAtmoConfig *cfg);
00045     virtual ~CAtmoConnection(void);
00046     virtual ATMO_BOOL OpenConnection() { return false; }
00047     virtual void CloseConnection() {};
00048     virtual ATMO_BOOL isOpen(void) { return false; }
00049 
00050     virtual ATMO_BOOL SendData(pColorPacket data) { return false; }
00051 
00052     virtual ATMO_BOOL setChannelColor(int channel, tRGBColor color) { return false; }
00053     virtual ATMO_BOOL setChannelValues(int numValues,unsigned char *channel_values) { return false; }
00054 
00055     virtual ATMO_BOOL HardwareWhiteAdjust(int global_gamma,
00056                                           int global_contrast,
00057                                           int contrast_red,
00058                                           int contrast_green,
00059                                           int contrast_blue,
00060                                           int gamma_red,
00061                                           int gamma_green,
00062                                           int gamma_blue,
00063                                           ATMO_BOOL storeToEeprom) { return false; }
00064 
00065 #if !defined(_ATMO_VLC_PLUGIN_)
00066     virtual ATMO_BOOL ShowConfigDialog(HINSTANCE hInst, HWND parent, CAtmoConfig *cfg);
00067 #endif
00068 
00069     virtual void SetChannelAssignment(CAtmoChannelAssignment *ca);
00070 
00071     virtual int getNumChannels() { return 0; }
00072     virtual char *getChannelName(int ch) { return NULL; }
00073 
00074     virtual const char *getDevicePath() { return "none"; }
00075 
00076     virtual ATMO_BOOL CreateDefaultMapping(CAtmoChannelAssignment *ca) { return false; }
00077 
00078 };
00079 
00080 #endif

Generated on Tue May 25 08:04:59 2010 for VLC by  doxygen 1.5.6