sane.ds: Rearrange function position to avoid the need for forward function declarations.
This commit is contained in:
parent
c739edf6aa
commit
25d5953cd8
|
@ -31,43 +31,6 @@
|
||||||
|
|
||||||
WINE_DEFAULT_DEBUG_CHANNEL(twain);
|
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)
|
static TW_UINT16 get_onevalue(pTW_CAPABILITY pCapability, TW_UINT16 *type, TW_UINT32 *value)
|
||||||
{
|
{
|
||||||
if (pCapability->hContainer)
|
if (pCapability->hContainer)
|
||||||
|
@ -230,3 +193,37 @@ static TW_UINT16 SANE_ICAPXferMech (pTW_CAPABILITY pCapability, TW_UINT16 action
|
||||||
}
|
}
|
||||||
return twCC;
|
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;
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue