aboutsummaryrefslogtreecommitdiff
path: root/h-client
diff options
context:
space:
mode:
authorAntonio Gallo <tonicucoz@gmail.com>2011-05-05 13:29:20 +0000
committerAntonio Gallo <tonicucoz@gmail.com>2011-05-05 13:29:20 +0000
commit7dbd7dc987eb70a663c9e26f8f6a5de3671c08a1 (patch)
tree51a9cb1135642431fa216c2782dace080beb5fb1 /h-client
parent02e4de3572a5ae9370bf55b4ee4ee8a4aacf418b (diff)
h-client:added device icons and classes
Diffstat (limited to 'h-client')
-rw-r--r--h-client/credits.txt20
-rw-r--r--h-client/hlibrary.py83
-rwxr-xr-xh-client/img/devices/big/3G-card.pngbin0 -> 2789 bytes
-rwxr-xr-xh-client/img/devices/big/acquisition-card.pngbin0 -> 4273 bytes
-rwxr-xr-xh-client/img/devices/big/bluetooth.pngbin0 -> 3027 bytes
-rw-r--r--h-client/img/devices/big/fingerprint-reader.pngbin0 -> 4669 bytes
-rwxr-xr-xh-client/img/devices/big/scanner.pngbin0 -> 2327 bytes
-rwxr-xr-xh-client/img/devices/big/webcam.pngbin0 -> 3441 bytes
-rwxr-xr-xh-client/img/devices/small/3G-card.pngbin0 -> 1123 bytes
-rwxr-xr-xh-client/img/devices/small/acquisition-card.pngbin0 -> 4075 bytes
-rwxr-xr-xh-client/img/devices/small/bluetooth.pngbin0 -> 1046 bytes
-rw-r--r--h-client/img/devices/small/fingerprint-reader.pngbin0 -> 1314 bytes
-rwxr-xr-xh-client/img/devices/small/scanner.pngbin0 -> 856 bytes
-rwxr-xr-xh-client/img/devices/small/webcam.pngbin0 -> 1236 bytes
14 files changed, 102 insertions, 1 deletions
diff --git a/h-client/credits.txt b/h-client/credits.txt
index c272430..53d35a4 100644
--- a/h-client/credits.txt
+++ b/h-client/credits.txt
@@ -6,17 +6,37 @@ img/devices/small/unknown.png
img/devices/small/soundcard.png
img/devices/small/wifi.png
img/devices/small/printer.png
+img/devices/small/scanner.png
+img/devices/small/webcam.png
+img/devices/small/bluetooth.png
img/devices/big/unknown.png
img/devices/big/soundcard.png
img/devices/big/wifi.png
img/devices/big/printer.png
+img/devices/big/scanner.png
+img/devices/big/webcam.png
+img/devices/big/bluetooth.png
icons taken from the Crystal Projects icons (http://www.everaldo.com/crystal/?action=downloads), licensed under the LGPL license
img/devices/small/videocard.png
+img/devices/small/3G-card.png
+img/devices/small/acquisition-card.png.png
img/devices/big/videocard.png
+img/devices/big/3G-card.png
+img/devices/big/acquisition-card.png.png
+
+
+
+Fingerprint icons:
+
+The fingerprint icons (listed below) are a derived work from a wikipedia fingerprint icon (http://en.wikipedia.org/wiki/File:Fingerprint_picture.svg) licensed under Creative Commons Attribution-Share Alike 3.0 Unported (http://creativecommons.org/licenses/by-sa/3.0/deed.en)
+img/devices/small/fingerprint-reader.png
+img/devices/big/fingerprint-reader.png
+
+
Libraries:
diff --git a/h-client/hlibrary.py b/h-client/hlibrary.py
index 389eff3..7f9d900 100644
--- a/h-client/hlibrary.py
+++ b/h-client/hlibrary.py
@@ -314,6 +314,85 @@ class Printer(Device):
self._post['compatibility'] = self._howItWorks
self._post['subtype'] = self._subtype
+class Scanner(Device):
+
+ def __init__(self):
+ super(Scanner, self).__init__()
+ self._type = 'scanner'
+ self._howItWorks = 'C-None'
+ self._interfaces = ['not-specified','USB','Serial','Parallel','Firewire','SCSI','Ethernet']
+ self._howItWorksOptions = ['A-Full','B-Partial','C-None']
+ self._icon = 'scanner.png'
+
+ def setPost(self):
+ super(Scanner, self).setPost()
+ self._post['compatibility'] = self._howItWorks
+
+class Threegcard(Device):
+
+ def __init__(self):
+ super(Threegcard, self).__init__()
+ self._type = '3G-card'
+ self._howItWorks = 'no'
+ self._interfaces = ['not-specified','USB','PCI','PCI-E','mini-PCI','mini-PCI-E','ExpressCard','PC-Card']
+ self._icon = '3G-card.png'
+
+ def setPost(self):
+ super(Threegcard, self).setPost()
+ self._post['wifi_works'] = self._howItWorks
+
+class Webcam(Device):
+
+ def __init__(self):
+ super(Webcam, self).__init__()
+ self._type = 'webcam'
+ self._howItWorks = 'no'
+ self._interfaces = ['not-specified','USB','Firewire','Parallel','Wifi','Serial']
+ self._icon = 'webcam.png'
+
+ def setPost(self):
+ super(Webcam, self).setPost()
+ self._post['webcam_works'] = self._howItWorks
+
+class Bluetooth(Device):
+
+ def __init__(self):
+ super(Bluetooth, self).__init__()
+ self._type = 'bluetooth'
+ self._howItWorks = 'no'
+ self._interfaces = ['not-specified','USB','PCI','PCI-E','mini-PCI','mini-PCI-E','ExpressCard','PC-Card']
+ self._icon = 'bluetooth.png'
+
+ def setPost(self):
+ super(Bluetooth, self).setPost()
+ self._post['bluetooth_works'] = self._howItWorks
+
+class Acquisitioncard(Device):
+
+ def __init__(self):
+ super(Acquisitioncard, self).__init__()
+ self._type = 'acquisition-card'
+ self._howItWorks = 'no'
+ self._interfaces = ['not-specified','USB','PCI','PCI-E','mini-PCI','mini-PCI-E','ExpressCard','PC-Card','Firewire','Parallel','Serial']
+ self._icon = 'acquisition-card.png'
+
+ def setPost(self):
+ super(Acquisitioncard, self).setPost()
+ self._post['compatibility'] = self._howItWorks
+
+class Fingerprintreader(Device):
+
+ def __init__(self):
+ super(Fingerprintreader, self).__init__()
+ self._type = 'fingerprint-reader'
+ self._howItWorks = 'no'
+ self._interfaces = ['not-specified','USB','PCI','PCI-E','mini-PCI','mini-PCI-E','ExpressCard','PC-Card','Firewire','Parallel','Serial']
+ self._icon = 'fingerprint-reader.png'
+
+ def setPost(self):
+ super(Fingerprintreader, self).setPost()
+ self._post['fingerprint_works'] = self._howItWorks
+
class Unknown(Device):
def __init__(self):
@@ -755,12 +834,14 @@ class Client:
if code.hasChildNodes():
if (code.childNodes[0].data == vendorid_productid):
+
+
modelName = device.getElementsByTagName("model_name")[0].childNodes[0].data.encode('utf-8')
interface = device.getElementsByTagName("interface")[0].childNodes[0].data.encode('utf-8')
distribution = device.getElementsByTagName("distribution")[0].childNodes[0].data.encode('utf-8')
idDevice = device.getElementsByTagName("id")[0].childNodes[0].data.encode('utf-8')
- if deviceType == 'printer':
+ if deviceType == 'printer' or deviceType == 'scanner':
works = device.getElementsByTagName("compatibility")[0].childNodes[0].data.encode('utf-8')
#set the subtype
diff --git a/h-client/img/devices/big/3G-card.png b/h-client/img/devices/big/3G-card.png
new file mode 100755
index 0000000..4ae2ba5
--- /dev/null
+++ b/h-client/img/devices/big/3G-card.png
Binary files differ
diff --git a/h-client/img/devices/big/acquisition-card.png b/h-client/img/devices/big/acquisition-card.png
new file mode 100755
index 0000000..d39e18a
--- /dev/null
+++ b/h-client/img/devices/big/acquisition-card.png
Binary files differ
diff --git a/h-client/img/devices/big/bluetooth.png b/h-client/img/devices/big/bluetooth.png
new file mode 100755
index 0000000..8f755b9
--- /dev/null
+++ b/h-client/img/devices/big/bluetooth.png
Binary files differ
diff --git a/h-client/img/devices/big/fingerprint-reader.png b/h-client/img/devices/big/fingerprint-reader.png
new file mode 100644
index 0000000..ba0e754
--- /dev/null
+++ b/h-client/img/devices/big/fingerprint-reader.png
Binary files differ
diff --git a/h-client/img/devices/big/scanner.png b/h-client/img/devices/big/scanner.png
new file mode 100755
index 0000000..4501fcf
--- /dev/null
+++ b/h-client/img/devices/big/scanner.png
Binary files differ
diff --git a/h-client/img/devices/big/webcam.png b/h-client/img/devices/big/webcam.png
new file mode 100755
index 0000000..696bc13
--- /dev/null
+++ b/h-client/img/devices/big/webcam.png
Binary files differ
diff --git a/h-client/img/devices/small/3G-card.png b/h-client/img/devices/small/3G-card.png
new file mode 100755
index 0000000..97da84a
--- /dev/null
+++ b/h-client/img/devices/small/3G-card.png
Binary files differ
diff --git a/h-client/img/devices/small/acquisition-card.png b/h-client/img/devices/small/acquisition-card.png
new file mode 100755
index 0000000..d4d2595
--- /dev/null
+++ b/h-client/img/devices/small/acquisition-card.png
Binary files differ
diff --git a/h-client/img/devices/small/bluetooth.png b/h-client/img/devices/small/bluetooth.png
new file mode 100755
index 0000000..c0b3f06
--- /dev/null
+++ b/h-client/img/devices/small/bluetooth.png
Binary files differ
diff --git a/h-client/img/devices/small/fingerprint-reader.png b/h-client/img/devices/small/fingerprint-reader.png
new file mode 100644
index 0000000..5593419
--- /dev/null
+++ b/h-client/img/devices/small/fingerprint-reader.png
Binary files differ
diff --git a/h-client/img/devices/small/scanner.png b/h-client/img/devices/small/scanner.png
new file mode 100755
index 0000000..d7b57e0
--- /dev/null
+++ b/h-client/img/devices/small/scanner.png
Binary files differ
diff --git a/h-client/img/devices/small/webcam.png b/h-client/img/devices/small/webcam.png
new file mode 100755
index 0000000..8a0b339
--- /dev/null
+++ b/h-client/img/devices/small/webcam.png
Binary files differ