summaryrefslogtreecommitdiff
path: root/plugins/MirandaG15/src/LCDFramework/CLCDConnection.h
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/MirandaG15/src/LCDFramework/CLCDConnection.h')
-rw-r--r--plugins/MirandaG15/src/LCDFramework/CLCDConnection.h74
1 files changed, 74 insertions, 0 deletions
diff --git a/plugins/MirandaG15/src/LCDFramework/CLCDConnection.h b/plugins/MirandaG15/src/LCDFramework/CLCDConnection.h
new file mode 100644
index 0000000000..099f850ec9
--- /dev/null
+++ b/plugins/MirandaG15/src/LCDFramework/CLCDConnection.h
@@ -0,0 +1,74 @@
+#ifndef _CLCDCONNECTION_H_
+#define _CLCDCONNECTION_H_
+
+#include "CLCDDevice.h"
+
+#define TYPE_LOGITECH 0
+
+#define CONNECTED 1
+#define DISCONNECTED 0
+
+class CLCDConnection
+{
+protected:
+ bool m_bReconnect;
+
+public:
+ // returns the connection type
+ virtual int GetConnectionType()=0;
+
+ // returns a pointer to a vector of LCDDevices
+ virtual CLCDDevice* GetAttachedDevice(int iIndex);
+ // returns a pointer to the current device
+ virtual CLCDDevice* GetConnectedDevice();
+
+ // Initializes the connection to the LCD
+ virtual bool Initialize(tstring strAppletName,bool bAutostart = false, bool bConfigDialog = false);
+
+ // Connects to the specified LCD
+ virtual bool Connect(int iIndex = 0);
+ // Connects to the specified LCD
+ virtual bool Disconnect();
+
+ // toggles the automatic reconnection
+ void SetReconnect(bool bSet);
+
+ // Closes the connection with the LCD
+ virtual bool Shutdown();
+ // Update function
+ virtual bool Update();
+ // Draws the specified bitmap on the LCD
+ virtual bool Draw();
+ // Hides the applet
+ virtual bool HideApplet();
+
+ // returns the connections state
+ virtual int GetConnectionState();
+
+ // returns the id of the specified button
+ virtual int GetButtonId(int iButton);
+ // Returns the state of the specified Button
+ virtual bool GetButtonState(int iButton);
+ // Temporarily brings the applet to foreground
+ virtual void SetAlert(bool bAlert);
+ // Activates the applet on the LCD
+ virtual void SetAsForeground(bool bSetAsForeground);
+ // returns wether the applet is currently activated
+ virtual bool IsForeground();
+
+ // Returns the display size
+ virtual SIZE GetDisplaySize();
+ // Returns the number of buttons for the display
+ virtual int GetButtonCount();
+ // Returns the number of available colors
+ virtual int GetColorCount();
+
+ // Get the pointer to the pixel buffer
+ virtual PBYTE GetPixelBuffer();
+
+public:
+ CLCDConnection();
+ virtual ~CLCDConnection();
+};
+
+#endif \ No newline at end of file