Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
333ef6a0
Commit
333ef6a0
authored
Feb 09, 2009
by
Jeremy White
Committed by
Alexandre Julliard
Feb 10, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sane.ds: More correctly stub CAP_XFERCOUNT, and tests.
parent
25d5953c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
45 additions
and
5 deletions
+45
-5
capability.c
dlls/sane.ds/capability.c
+42
-4
dsm.c
dlls/twain_32/tests/dsm.c
+3
-1
No files found.
dlls/sane.ds/capability.c
View file @
333ef6a0
...
...
@@ -125,7 +125,7 @@ static TW_UINT16 msg_get_enum(pTW_CAPABILITY pCapability, const TW_UINT32 *value
static
TW_UINT16
TWAIN_GetSupportedCaps
(
pTW_CAPABILITY
pCapability
)
{
TW_ARRAY
*
a
;
static
const
UINT16
supported_caps
[]
=
{
CAP_SUPPORTEDCAPS
,
ICAP_XFERMECH
};
static
const
UINT16
supported_caps
[]
=
{
CAP_SUPPORTEDCAPS
,
CAP_XFERCOUNT
,
ICAP_XFERMECH
};
pCapability
->
hContainer
=
GlobalAlloc
(
0
,
FIELD_OFFSET
(
TW_ARRAY
,
ItemList
[
sizeof
(
supported_caps
)]
));
pCapability
->
ConType
=
TWON_ARRAY
;
...
...
@@ -195,6 +195,46 @@ static TW_UINT16 SANE_ICAPXferMech (pTW_CAPABILITY pCapability, TW_UINT16 action
}
/* CAP_XFERCOUNT */
static
TW_UINT16
SANE_CAPXferCount
(
pTW_CAPABILITY
pCapability
,
TW_UINT16
action
)
{
TW_UINT32
val
;
TW_UINT16
twCC
=
TWCC_BADCAP
;
TRACE
(
"CAP_XFERCOUNT
\n
"
);
switch
(
action
)
{
case
MSG_QUERYSUPPORT
:
twCC
=
set_onevalue
(
pCapability
,
TWTY_INT32
,
TWQC_GET
|
TWQC_SET
|
TWQC_GETDEFAULT
|
TWQC_GETCURRENT
|
TWQC_RESET
);
break
;
case
MSG_GET
:
twCC
=
set_onevalue
(
pCapability
,
TWTY_INT16
,
-
1
);
FIXME
(
"Partial Stub: Reporting only support for transfer all
\n
"
);
break
;
case
MSG_SET
:
twCC
=
msg_set
(
pCapability
,
&
val
);
if
(
twCC
==
TWCC_SUCCESS
)
FIXME
(
"Partial Stub: XFERCOUNT set to %d, but ignored
\n
"
,
val
);
break
;
case
MSG_GETDEFAULT
:
twCC
=
set_onevalue
(
pCapability
,
TWTY_INT16
,
-
1
);
break
;
case
MSG_RESET
:
/* .. fall through intentional .. */
case
MSG_GETCURRENT
:
twCC
=
set_onevalue
(
pCapability
,
TWTY_INT16
,
-
1
);
break
;
}
return
twCC
;
}
TW_UINT16
SANE_SaneCapability
(
pTW_CAPABILITY
pCapability
,
TW_UINT16
action
)
{
TW_UINT16
twCC
=
TWCC_CAPUNSUPPORTED
;
...
...
@@ -211,9 +251,7 @@ TW_UINT16 SANE_SaneCapability (pTW_CAPABILITY pCapability, TW_UINT16 action)
break
;
case
CAP_XFERCOUNT
:
/* This is a required capability that every source needs to
support but we haven't implemented it yet. */
twCC
=
TWCC_SUCCESS
;
twCC
=
SANE_CAPXferCount
(
pCapability
,
action
);
break
;
case
ICAP_XFERMECH
:
...
...
dlls/twain_32/tests/dsm.c
View file @
333ef6a0
...
...
@@ -309,8 +309,10 @@ static void test_single_source(TW_IDENTITY *appid, TW_IDENTITY *source)
/* For Twain 1.6, all sources must support: */
ok
(
capabilities
[
CAP_SUPPORTEDCAPS
],
"CAP_SUPPORTEDCAPS not supported
\n
"
);
todo_wine
ok
(
capabilities
[
CAP_XFERCOUNT
],
"CAP_XFERCOUNT not supported
\n
"
);
if
(
capabilities
[
CAP_XFERCOUNT
])
test_onevalue_cap
(
appid
,
source
,
CAP_XFERCOUNT
,
TWTY_INT16
,
TWQC_GET
|
TWQC_SET
|
TWQC_GETDEFAULT
|
TWQC_GETCURRENT
|
TWQC_RESET
);
todo_wine
ok
(
capabilities
[
CAP_UICONTROLLABLE
],
"CAP_UICONTROLLABLE not supported
\n
"
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment