Commit 25d5953c authored by Jeremy White's avatar Jeremy White Committed by Alexandre Julliard

sane.ds: Rearrange function position to avoid the need for forward function declarations.

parent c739edf6
......@@ -31,43 +31,6 @@
WINE_DEFAULT_DEBUG_CHANNEL(twain);
static TW_UINT16 SANE_ICAPXferMech (pTW_CAPABILITY pCapability, TW_UINT16 action);
static TW_UINT16 TWAIN_GetSupportedCaps(pTW_CAPABILITY pCapability);
TW_UINT16 SANE_SaneCapability (pTW_CAPABILITY pCapability, TW_UINT16 action)
{
TW_UINT16 twCC = TWCC_CAPUNSUPPORTED;
TRACE("capability=%d action=%d\n", pCapability->Cap, action);
switch (pCapability->Cap)
{
case CAP_SUPPORTEDCAPS:
if (action == MSG_GET)
twCC = TWAIN_GetSupportedCaps(pCapability);
else
twCC = TWCC_BADVALUE;
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;
break;
case ICAP_XFERMECH:
twCC = SANE_ICAPXferMech (pCapability, action);
break;
default:
twCC = TWRC_FAILURE;
}
return twCC;
}
static TW_UINT16 get_onevalue(pTW_CAPABILITY pCapability, TW_UINT16 *type, TW_UINT32 *value)
{
if (pCapability->hContainer)
......@@ -230,3 +193,37 @@ static TW_UINT16 SANE_ICAPXferMech (pTW_CAPABILITY pCapability, TW_UINT16 action
}
return twCC;
}
TW_UINT16 SANE_SaneCapability (pTW_CAPABILITY pCapability, TW_UINT16 action)
{
TW_UINT16 twCC = TWCC_CAPUNSUPPORTED;
TRACE("capability=%d action=%d\n", pCapability->Cap, action);
switch (pCapability->Cap)
{
case CAP_SUPPORTEDCAPS:
if (action == MSG_GET)
twCC = TWAIN_GetSupportedCaps(pCapability);
else
twCC = TWCC_BADVALUE;
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;
break;
case ICAP_XFERMECH:
twCC = SANE_ICAPXferMech (pCapability, action);
break;
default:
twCC = TWRC_FAILURE;
}
return twCC;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment