-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlibsane_wrapper_impl.cc
70 lines (54 loc) · 2.06 KB
/
libsane_wrapper_impl.cc
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
// Copyright 2023 The ChromiumOS Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "lorgnette/libsane_wrapper_impl.h"
namespace lorgnette {
std::unique_ptr<LibsaneWrapper> LibsaneWrapperImpl::Create() {
return std::unique_ptr<LibsaneWrapper>(new LibsaneWrapperImpl());
}
SANE_Status LibsaneWrapperImpl::sane_init(SANE_Int* version_code,
SANE_Auth_Callback authorize) {
return ::sane_init(version_code, authorize);
}
void LibsaneWrapperImpl::sane_exit(void) {
::sane_exit();
}
SANE_Status LibsaneWrapperImpl::sane_get_devices(
const SANE_Device*** device_list, SANE_Bool local_only) {
return ::sane_get_devices(device_list, local_only);
}
SANE_Status LibsaneWrapperImpl::sane_open(SANE_String_Const name,
SANE_Handle* h) {
return ::sane_open(name, h);
}
void LibsaneWrapperImpl::sane_close(SANE_Handle h) {
::sane_close(h);
}
const SANE_Option_Descriptor* LibsaneWrapperImpl::sane_get_option_descriptor(
SANE_Handle h, SANE_Int n) {
return ::sane_get_option_descriptor(h, n);
}
SANE_Status LibsaneWrapperImpl::sane_control_option(
SANE_Handle h, SANE_Int n, SANE_Action a, void* v, SANE_Int* i) {
return ::sane_control_option(h, n, a, v, i);
}
SANE_Status LibsaneWrapperImpl::sane_get_parameters(SANE_Handle h,
SANE_Parameters* p) {
return ::sane_get_parameters(h, p);
}
SANE_Status LibsaneWrapperImpl::sane_start(SANE_Handle h) {
return ::sane_start(h);
}
SANE_Status LibsaneWrapperImpl::sane_read(SANE_Handle h,
SANE_Byte* buf,
SANE_Int maxlen,
SANE_Int* len) {
return ::sane_read(h, buf, maxlen, len);
}
void LibsaneWrapperImpl::sane_cancel(SANE_Handle h) {
::sane_cancel(h);
}
SANE_Status LibsaneWrapperImpl::sane_set_io_mode(SANE_Handle h, SANE_Bool m) {
return ::sane_set_io_mode(h, m);
}
} // namespace lorgnette