--- /dev/null
+++ b/src/device.h
@@ -0,0 +1,37 @@
+#ifndef __DEVICE_H__
+#define __DEVICE_H__
+
+class Device
+{
+protected:
+	Device();
+	~Device();
+public:
+
+	virtual unsigned int getBrightness() = 0;
+	virtual void setBrightness(unsigned int brightness) = 0;
+
+	virtual unsigned int getGamma() = 0;
+	virtual void setGamma(unsigned int gamma) = 0;
+
+	virtual unsigned int getVolume() = 0;
+	virtual void setVolume(unsigned int volume) = 0;
+
+	virtual unsigned int getCpuClock() = 0;
+	virtual void setCpuClock(unsigned int clock) = 0;
+
+	virtual void setTVOut(bool enabled) = 0;
+	virtual bool geteTVOut() = 0;
+
+	unsigned int getCapabilities() = 0;
+
+	enum {
+		CAP_BRIGHTNESS	= 1 << 0,
+		CAP_GAMMA	= 1 << 1,
+		CAP_VOLUME	= 1 << 2,
+		CAP_CPUCLOCK	= 1 << 3,
+		CAP_TVOUT	= 1 << 4,
+	};
+};
+
+#endif
diff --git a/src/linuxdevice.cpp b/src/linuxdevice.cpp
new file mode 100644
index 0000000..9dc52c6
--- /dev/null
+++ b/src/linuxdevice.cpp
@@ -0,0 +1,80 @@
+#include <linuxdevice.h>
+
+LinuxDevice::LinuxDevice()
+{
+    soundType = SOUND_ALSA;
+}
+
+unsigned int LinuxDevice::getFileValue(const std::string &filePath)
+{
+	unsigned int value = 0;
+	if (filePath.size() == 0)
+		return 0;
+
+	std::ifstream in(filePath, std::ios_base::in);
+	if (in.is_open()) {
+		in >> value;
+		in.close();
+	}
+
+    return value;
+}
+
+void LinuxDevice::setFileValue(const std::string &filePath, unsigned int value)
+{
+	std::ofstream out(filePath, std::ios_base::out);
+	if (out.is_open()) {
+		out << value;
+		out.close();
+	}
+}
+
+unsigned int LinuxDevice::getBrightness()
+{
+	unsigned int brightness;
+
+	brightness = getFileValue(brightnessPath);
+
+	brightness *= 100;
+	brightness /= maxBrightness;
+
+    return brightness;
+}
+
+void LinuxDevice::setBrightness(unsigned int brightness)
+{
+	if (backlightPath.size() == 0)
+		return 0;
+
+	brightness *= maxBrightness;
+	brightness /= 100;
+
+	setFileValue(backlightPath, brightness);
+}
+
+unsigned int LinuxDevice::getGamma()
+{
+    return 0;
+}
+
+void LinuxDevice::setGamma(unsigned int)
+{
+}
+
+unsigned int LinuxDevice::getCpuClock()
+{
+    return 0;
+}
+
+void LinuxDevice::setCpuClock(unsigned int)
+{
+}
+
+unsigned int LinuxDevice::getCapabilities()
+{
+    unsigned int caps = CAP_VOLUME;
+    if (backlightPath.size() != 0)
+		caps |= CAP_BRIGHTNESS;
+    if (gammaPath.size() != 0)
+		caps |= CAP_GAMMA;
+}
diff --git a/src/linuxdevice.h b/src/linuxdevice.h
new file mode 100644
index 0000000..1889fb9
--- /dev/null
+++ b/src/linuxdevice.h
@@ -0,0 +1,40 @@
+#ifndef __LINUXDEVICE_H__
+#define __LINUXDEVICE_H__
+
+#include <string>
+
+#include "device.h"
+
+class LinuxDevice : public Device
+{
+public:
+	virtual unsigned int getBrightness();
+	virtual void setBrightness(unsigned int brightness);
+
+	virtual unsigned int getGamma();
+	virtual void setGamma(unsigned int gamma);
+
+	virtual unsigned int getVolume();
+	virtual void setVolume(unsigned int volume);
+
+	virtual unsigned int getCpuClock();
+	virtual void setCpuClock(unsigned int clock);
+
+	virtual void setTVOut(bool enabled);
+	virtual bool geteTVOut();
+
+	enum SoundType {
+		SOUND_ALSA,
+		SOUND_OSS,
+	};
+
+private:
+	std::string backlightPath;
+	std::string gammaPath;
+
+	unsigned int maxBrightness;
+
+	SoundType soundType;
+};
+
+#endif
-- 
1.5.6.5

