summaryrefslogtreecommitdiff
path: root/ScanService.mdwn
blob: 6a49f75ee19f14d503fc62d812ee40c0a7399ba8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48

{i} This page state about a scanner service in freedesktop. This document was started off a discussion at xdg mailing list : [[http://lists.freedesktop.org/archives/xdg/2007-January/009074.html|http://lists.freedesktop.org/archives/xdg/2007-January/009074.html]] 


## Goals

* Monitor buttons 
* Share devices 
These feature imply that the software own the device handle, this is why the software expose acquisition API. 

* Acquire image 

## Achievement

This can be done through a dbus system wide daemon. 


## DBus API

This is a rough draft of an API -- [[EtienneBersac|EtienneBersac]] 2007-01-28 22:21:45 

* device_list [[GetDeviceList|GetDeviceList]] 
* string [[GetDeviceInfo|GetDeviceInfo]] (device) 
* option_list [[GetDeviceOptions|GetDeviceOptions]] (device) 
* [[ShareDevice|ShareDevice]] (device, boolean) 
* job [[StartScan|StartScan]] (device, settings) 
* [[StopScan|StopScan]] (job) 
* [[GetImage|GetImage]] (job) 
/!\ How to monitor ? How to get buttons events ? How should the image be transferred back to the client? 

* A file descriptor or device node might be one way for transferring the image quickly (sending it directly over D-BUS definitely wouldn't work). 
Signals : 

* device-plugged (device) 
* device-unplugged 
* button-pressed (device, button) 
* job-done (job) 

## Scanner access

Scanner access is done through the famous SANE library. Hope that HAL & SANE will work better together in the future in order to get devices from HAL. 


## Sharing

SANE has a net scanning protocol. However, it shows some limitation (basically, it's too slow for huge image). What to do ? 

* It would be nice to come up with a new protocol for this like the D-BUS one, maybe with some kind of compression, like bzip2.  I wouldn't worry about breaking compatibility. -- [[DonaldStraney|DonaldStraney]]