Commit 83d4dac8 authored by Jeremy White's avatar Jeremy White Committed by Alexandre Julliard

sane.ds: Remove large chunks of stubbed optional functionality; if it's…

sane.ds: Remove large chunks of stubbed optional functionality; if it's optional, we don't have to support it, and it is not a stub.
parent a3bfa00c
......@@ -174,126 +174,6 @@ TW_UINT16 SANE_CapabilitySet (pTW_IDENTITY pOrigin,
return twRC;
}
/* DG_CONTROL/DAT_CUSTOMDSDATA/MSG_GET */
TW_UINT16 SANE_CustomDSDataGet (pTW_IDENTITY pOrigin,
TW_MEMREF pData)
{
FIXME ("stub!\n");
return TWRC_FAILURE;
}
/* DG_CONTROL/DAT_CUSTOMDSDATA/MSG_SET */
TW_UINT16 SANE_CustomDSDataSet (pTW_IDENTITY pOrigin,
TW_MEMREF pData)
{
FIXME ("stub!\n");
return TWRC_FAILURE;
}
/* DG_CONTROL/DAT_FILESYSTEM/MSG_AUTOMATICCAPTUREDIRECTORY */
TW_UINT16 SANE_AutomaticCaptureDirectory (pTW_IDENTITY pOrigin,
TW_MEMREF pData)
{
FIXME ("stub!\n");
return TWRC_FAILURE;
}
/* DG_CONTROL/DAT_FILESYSTEM/MSG_CHANGEDIRECTORY */
TW_UINT16 SANE_ChangeDirectory (pTW_IDENTITY pOrigin,
TW_MEMREF pData)
{
FIXME ("stub!\n");
return TWRC_FAILURE;
}
/* DG_CONTROL/DAT_FILESYSTEM/MSG_COPY */
TW_UINT16 SANE_FileSystemCopy (pTW_IDENTITY pOrigin,
TW_MEMREF pData)
{
FIXME ("stub!\n");
return TWRC_FAILURE;
}
/* DG_CONTROL/DAT_FILESYSTEM/MSG_CREATEDIRECTORY */
TW_UINT16 SANE_CreateDirectory (pTW_IDENTITY pOrigin,
TW_MEMREF pData)
{
FIXME ("stub!\n");
return TWRC_FAILURE;
}
/* DG_CONTROL/DAT_FILESYSTEM/MSG_DELETE */
TW_UINT16 SANE_FileSystemDelete (pTW_IDENTITY pOrigin,
TW_MEMREF pData)
{
FIXME ("stub!\n");
return TWRC_FAILURE;
}
/* DG_CONTROL/DAT_FILESYSTEM/MSG_FORMATMEDIA */
TW_UINT16 SANE_FormatMedia (pTW_IDENTITY pOrigin,
TW_MEMREF pData)
{
FIXME ("stub!\n");
return TWRC_FAILURE;
}
/* DG_CONTROL/DAT_FILESYSTEM/MSG_GETCLOSE */
TW_UINT16 SANE_FileSystemGetClose (pTW_IDENTITY pOrigin,
TW_MEMREF pData)
{
FIXME ("stub!\n");
return TWRC_FAILURE;
}
/* DG_CONTROL/DAT_FILESYSTEM/MSG_GETFIRSTFILE */
TW_UINT16 SANE_FileSystemGetFirstFile (pTW_IDENTITY pOrigin,
TW_MEMREF pData)
{
FIXME ("stub!\n");
return TWRC_FAILURE;
}
/* DG_CONTROL/DAT_FILESYSTEM/MSG_GETINFO */
TW_UINT16 SANE_FileSystemGetInfo (pTW_IDENTITY pOrigin,
TW_MEMREF pData)
{
FIXME ("stub!\n");
return TWRC_FAILURE;
}
/* DG_CONTROL/DAT_FILESYSTEM/MSG_GETNEXTFILE */
TW_UINT16 SANE_FileSystemGetNextFile (pTW_IDENTITY pOrigin,
TW_MEMREF pData)
{
FIXME ("stub!\n");
return TWRC_FAILURE;
}
/* DG_CONTROL/DAT_FILESYSTEM/MSG_RENAME */
TW_UINT16 SANE_FileSystemRename (pTW_IDENTITY pOrigin,
TW_MEMREF pData)
{
FIXME ("stub!\n");
return TWRC_FAILURE;
}
/* DG_CONTROL/DAT_EVENT/MSG_PROCESSEVENT */
TW_UINT16 SANE_ProcessEvent (pTW_IDENTITY pOrigin,
TW_MEMREF pData)
......@@ -322,15 +202,6 @@ TW_UINT16 SANE_ProcessEvent (pTW_IDENTITY pOrigin,
return twRC;
}
/* DG_CONTROL/DAT_PASSTHRU/MSG_PASSTHRU */
TW_UINT16 SANE_PassThrough (pTW_IDENTITY pOrigin,
TW_MEMREF pData)
{
FIXME ("stub!\n");
return TWRC_FAILURE;
}
/* DG_CONTROL/DAT_PENDINGXFERS/MSG_ENDXFER */
TW_UINT16 SANE_PendingXfersEndXfer (pTW_IDENTITY pOrigin,
TW_MEMREF pData)
......@@ -451,88 +322,6 @@ TW_UINT16 SANE_PendingXfersReset (pTW_IDENTITY pOrigin,
#endif
}
/* DG_CONTROL/DAT_PENDINGXFERS/MSG_STOPFEEDER */
TW_UINT16 SANE_PendingXfersStopFeeder (pTW_IDENTITY pOrigin,
TW_MEMREF pData)
{
FIXME ("stub!\n");
return TWRC_FAILURE;
}
/* DG_CONTROL/DAT_SETUPFILEXFER/MSG_GET */
TW_UINT16 SANE_SetupFileXferGet (pTW_IDENTITY pOrigin,
TW_MEMREF pData)
{
FIXME ("stub!\n");
return TWRC_FAILURE;
}
/* DG_CONTROL/DAT_SETUPXFER/MSG_GETDEFAULT */
TW_UINT16 SANE_SetupFileXferGetDefault (pTW_IDENTITY pOrigin,
TW_MEMREF pData)
{
FIXME ("stub!\n");
return TWRC_FAILURE;
}
/* DG_CONTROL/DAT_SETUPFILEXFER/MSG_RESET */
TW_UINT16 SANE_SetupFileXferReset (pTW_IDENTITY pOrigin,
TW_MEMREF pData)
{
FIXME ("stub!\n");
return TWRC_FAILURE;
}
/* DG_CONTROL/DAT_SETUPFILEXFER/MSG_SET */
TW_UINT16 SANE_SetupFileXferSet (pTW_IDENTITY pOrigin,
TW_MEMREF pData)
{
FIXME ("stub!\n");
return TWRC_FAILURE;
}
/* DG_CONTROL/DAT_SETUPFILEXFER2/MSG_GET */
TW_UINT16 SANE_SetupFileXfer2Get (pTW_IDENTITY pOrigin,
TW_MEMREF pData)
{
FIXME ("stub!\n");
return TWRC_FAILURE;
}
/* DG_CONTROL/DAT_SETUPFILEXFER2/MSG_GETDEFAULT */
TW_UINT16 SANE_SetupFileXfer2GetDefault (pTW_IDENTITY pOrigin,
TW_MEMREF pData)
{
FIXME ("stub!\n");
return TWRC_FAILURE;
}
/* DG_CONTROL/DAT_SETUPFILEXFER2/MSG_RESET */
TW_UINT16 SANE_SetupFileXfer2Reset (pTW_IDENTITY pOrigin,
TW_MEMREF pData)
{
FIXME ("stub!\n");
return TWRC_FAILURE;
}
/* DG_CONTROL/DAT_SETUPFILEXFER2/MSG_SET */
TW_UINT16 SANE_SetupFileXfer2Set (pTW_IDENTITY pOrigin,
TW_MEMREF pData)
{
FIXME ("stub!\n");
return TWRC_FAILURE;
}
/* DG_CONTROL/DAT_SETUPMEMXFER/MSG_GET */
TW_UINT16 SANE_SetupMemXferGet (pTW_IDENTITY pOrigin,
TW_MEMREF pData)
......
......@@ -31,51 +31,6 @@
WINE_DEFAULT_DEBUG_CHANNEL(twain);
/* DG_IMAGE/DAT_CIECOLOR/MSG_GET */
TW_UINT16 SANE_CIEColorGet (pTW_IDENTITY pOrigin,
TW_MEMREF pData)
{
FIXME ("stub!\n");
return TWRC_FAILURE;
}
/* DG_IMAGE/DAT_EXTIMAGEINFO/MSG_GET */
TW_UINT16 SANE_ExtImageInfoGet (pTW_IDENTITY pOrigin,
TW_MEMREF pData)
{
FIXME ("stub!\n");
return TWRC_FAILURE;
}
/* DG_IMAGE/DAT_GRAYRESPONSE/MSG_RESET */
TW_UINT16 SANE_GrayResponseReset (pTW_IDENTITY pOrigin,
TW_MEMREF pData)
{
FIXME ("stub!\n");
return TWRC_FAILURE;
}
/* DG_IMAGE/DAT_GRAYRESPONSE/MSG_SET */
TW_UINT16 SANE_GrayResponseSet (pTW_IDENTITY pOrigin,
TW_MEMREF pData)
{
FIXME ("stub!\n");
return TWRC_FAILURE;
}
/* DG_IMAGE/DAT_IMAGEFILEXFER/MSG_GET */
TW_UINT16 SANE_ImageFileXferGet (pTW_IDENTITY pOrigin,
TW_MEMREF pData)
{
FIXME ("stub!\n");
return TWRC_FAILURE;
}
/* DG_IMAGE/DAT_IMAGEINFO/MSG_GET */
TW_UINT16 SANE_ImageInfoGet (pTW_IDENTITY pOrigin,
TW_MEMREF pData)
......@@ -530,94 +485,3 @@ TW_UINT16 SANE_ImageNativeXferGet (pTW_IDENTITY pOrigin,
return twRC;
#endif
}
/* DG_IMAGE/DAT_JPEGCOMPRESSION/MSG_GET */
TW_UINT16 SANE_JPEGCompressionGet (pTW_IDENTITY pOrigin,
TW_MEMREF pData)
{
FIXME ("stub!\n");
return TWRC_FAILURE;
}
/* DG_IMAGE/DAT_JPEGCOMPRESSION/MSG_GETDEFAULT */
TW_UINT16 SANE_JPEGCompressionGetDefault (pTW_IDENTITY pOrigin,
TW_MEMREF pData)
{
FIXME ("stub!\n");
return TWRC_FAILURE;
}
/* DG_IMAGE/DAT_JPEGCOMPRESSION/MSG_RESET */
TW_UINT16 SANE_JPEGCompressionReset (pTW_IDENTITY pOrigin,
TW_MEMREF pData)
{
FIXME ("stub!\n");
return TWRC_FAILURE;
}
/* DG_IMAGE/DAT_JPEGCOMPRESSION/MSG_SET */
TW_UINT16 SANE_JPEGCompressionSet (pTW_IDENTITY pOrigin,
TW_MEMREF pData)
{
FIXME ("stub!\n");
return TWRC_FAILURE;
}
/* DG_IMAGE/DAT_PALETTE8/MSG_GET */
TW_UINT16 SANE_Palette8Get (pTW_IDENTITY pOrigin,
TW_MEMREF pData)
{
FIXME ("stub!\n");
return TWRC_FAILURE;
}
/* DG_IMAGE/DAT_PALETTE8/MSG_GETDEFAULT */
TW_UINT16 SANE_Palette8GetDefault (pTW_IDENTITY pOrigin,
TW_MEMREF pData)
{
FIXME ("stub!\n");
return TWRC_FAILURE;
}
/* DG_IMAGE/DAT_PALETTE8/MSG_RESET */
TW_UINT16 SANE_Palette8Reset (pTW_IDENTITY pOrigin,
TW_MEMREF pData)
{
FIXME ("stub!\n");
return TWRC_FAILURE;
}
/* DG_IMAGE/DAT_PALETTE8/MSG_SET */
TW_UINT16 SANE_Palette8Set (pTW_IDENTITY pOrigin,
TW_MEMREF pData)
{
FIXME ("stub!\n");
return TWRC_FAILURE;
}
/* DG_IMAGE/DAT_RGBRESPONSE/MSG_RESET */
TW_UINT16 SANE_RGBResponseReset (pTW_IDENTITY pOrigin,
TW_MEMREF pData)
{
FIXME ("stub!\n");
return TWRC_FAILURE;
}
/* DG_IMAGE/DAT_RGBRESPONSE/MSG_SET */
TW_UINT16 SANE_RGBResponseSet (pTW_IDENTITY pOrigin,
TW_MEMREF pData)
{
FIXME ("stub!\n");
return TWRC_FAILURE;
}
......@@ -189,65 +189,6 @@ static TW_UINT16 SANE_SourceControlHandler (
twRC = TWRC_FAILURE;
activeDS.twCC = TWCC_CAPBADOPERATION;
FIXME("unrecognized opertion triplet\n");
}
break;
case DAT_CUSTOMDSDATA:
switch (MSG)
{
case MSG_GET:
twRC = SANE_CustomDSDataGet (pOrigin, pData);
break;
case MSG_SET:
twRC = SANE_CustomDSDataSet (pOrigin, pData);
break;
default:
activeDS.twCC = TWCC_CAPBADOPERATION;
twRC = TWRC_FAILURE;
break;
}
break;
case DAT_FILESYSTEM:
switch (MSG)
{
/*case MSG_AUTOMATICCAPTUREDIRECTORY:
twRC = SANE_AutomaticCaptureDirectory
(pOrigin, pData);
break;*/
case MSG_CHANGEDIRECTORY:
twRC = SANE_ChangeDirectory (pOrigin, pData);
break;
/*case MSG_COPY:
twRC = SANE_FileSystemCopy (pOrigin, pData);
break;*/
case MSG_CREATEDIRECTORY:
twRC = SANE_CreateDirectory (pOrigin, pData);
break;
case MSG_DELETE:
twRC = SANE_FileSystemDelete (pOrigin, pData);
break;
case MSG_FORMATMEDIA:
twRC = SANE_FormatMedia (pOrigin, pData);
break;
case MSG_GETCLOSE:
twRC = SANE_FileSystemGetClose (pOrigin, pData);
break;
case MSG_GETFIRSTFILE:
twRC = SANE_FileSystemGetFirstFile (pOrigin, pData);
break;
case MSG_GETINFO:
twRC = SANE_FileSystemGetInfo (pOrigin, pData);
break;
case MSG_GETNEXTFILE:
twRC = SANE_FileSystemGetNextFile (pOrigin, pData);
break;
case MSG_RENAME:
twRC = SANE_FileSystemRename (pOrigin, pData);
break;
default:
activeDS.twCC = TWCC_CAPBADOPERATION;
twRC = TWRC_FAILURE;
break;
}
break;
......@@ -262,16 +203,6 @@ static TW_UINT16 SANE_SourceControlHandler (
}
break;
case DAT_PASSTHRU:
if (MSG == MSG_PASSTHRU)
twRC = SANE_PassThrough (pOrigin, pData);
else
{
activeDS.twCC = TWCC_CAPBADOPERATION;
twRC = TWRC_FAILURE;
}
break;
case DAT_PENDINGXFERS:
switch (MSG)
{
......@@ -284,54 +215,12 @@ static TW_UINT16 SANE_SourceControlHandler (
case MSG_RESET:
twRC = SANE_PendingXfersReset (pOrigin, pData);
break;
/*case MSG_STOPFEEDER:
twRC = SANE_PendingXfersStopFeeder (pOrigin, pData);
break;*/
default:
activeDS.twCC = TWCC_CAPBADOPERATION;
twRC = TWRC_FAILURE;
}
break;
case DAT_SETUPFILEXFER:
switch (MSG)
{
case MSG_GET:
twRC = SANE_SetupFileXferGet (pOrigin, pData);
break;
case MSG_GETDEFAULT:
twRC = SANE_SetupFileXferGetDefault (pOrigin, pData);
break;
case MSG_RESET:
twRC = SANE_SetupFileXferReset (pOrigin, pData);
break;
case MSG_SET:
twRC = SANE_SetupFileXferSet (pOrigin, pData);
break;
default:
activeDS.twCC = TWCC_CAPBADOPERATION;
twRC = TWRC_FAILURE;
break;
}
break;
/*case DAT_SETUPFILEXFER2:
switch (MSG)
{
case MSG_GET:
twRC = SANE_SetupFileXfer2Get (pOrigin, pData);
break;
case MSG_GETDEFAULT:
twRC = SANE_SetupFileXfer2GetDefault (pOrigin, pData);
break;
case MSG_RESET:
twRC = SANE_SetupFileXfer2Reset (pOrigin, pData);
break;
case MSG_SET:
twRC = SANE_SetupFileXfer2Set (pOrigin, pData);
break;
}
break;*/
case DAT_SETUPMEMXFER:
if (MSG == MSG_GET)
twRC = SANE_SetupMemXferGet (pOrigin, pData);
......@@ -388,7 +277,7 @@ static TW_UINT16 SANE_SourceControlHandler (
break;
default:
WARN("code unknown: %d\n", DAT);
WARN("code unsupported: %d\n", DAT);
activeDS.twCC = TWCC_CAPUNSUPPORTED;
twRC = TWRC_FAILURE;
break;
......@@ -408,52 +297,6 @@ static TW_UINT16 SANE_ImageGroupHandler (
switch (DAT)
{
case DAT_CIECOLOR:
if (MSG == MSG_GET)
twRC = SANE_CIEColorGet (pOrigin, pData);
else
{
activeDS.twCC = TWCC_CAPBADOPERATION;
twRC = TWRC_FAILURE;
}
break;
case DAT_EXTIMAGEINFO:
if (MSG == MSG_GET)
twRC = SANE_ExtImageInfoGet (pOrigin, pData);
else
{
activeDS.twCC = TWCC_CAPBADOPERATION;
twRC = TWRC_FAILURE;
}
break;
case DAT_GRAYRESPONSE:
switch (MSG)
{
case MSG_RESET:
twRC = SANE_GrayResponseReset (pOrigin, pData);
break;
case MSG_SET:
twRC = SANE_GrayResponseSet (pOrigin, pData);
break;
default:
twRC = TWRC_FAILURE;
activeDS.twCC = TWCC_CAPBADOPERATION;
WARN("unrecognized operation triplet\n");
break;
}
break;
case DAT_IMAGEFILEXFER:
if (MSG == MSG_GET)
twRC = SANE_ImageFileXferGet (pOrigin, pData);
else
{
activeDS.twCC = TWCC_CAPBADOPERATION;
twRC = TWRC_FAILURE;
}
break;
case DAT_IMAGEINFO:
if (MSG == MSG_GET)
twRC = SANE_ImageInfoGet (pOrigin, pData);
......@@ -507,72 +350,11 @@ static TW_UINT16 SANE_ImageGroupHandler (
}
break;
case DAT_JPEGCOMPRESSION:
switch (MSG)
{
case MSG_GET:
twRC = SANE_JPEGCompressionGet (pOrigin, pData);
break;
case MSG_GETDEFAULT:
twRC = SANE_JPEGCompressionGetDefault (pOrigin, pData);
break;
case MSG_RESET:
twRC = SANE_JPEGCompressionReset (pOrigin, pData);
break;
case MSG_SET:
twRC = SANE_JPEGCompressionSet (pOrigin, pData);
break;
default:
twRC = TWRC_FAILURE;
activeDS.twCC = TWCC_CAPBADOPERATION;
WARN("unrecognized operation triplet\n");
break;
}
break;
case DAT_PALETTE8:
switch (MSG)
{
case MSG_GET:
twRC = SANE_Palette8Get (pOrigin, pData);
break;
case MSG_GETDEFAULT:
twRC = SANE_Palette8GetDefault (pOrigin, pData);
break;
case MSG_RESET:
twRC = SANE_Palette8Reset (pOrigin, pData);
break;
case MSG_SET:
twRC = SANE_Palette8Set (pOrigin, pData);
break;
default:
twRC = TWRC_FAILURE;
activeDS.twCC = TWCC_CAPBADOPERATION;
WARN("unrecognized operation triplet\n");
}
break;
case DAT_RGBRESPONSE:
switch (MSG)
{
case MSG_RESET:
twRC = SANE_RGBResponseReset (pOrigin, pData);
break;
case MSG_SET:
twRC = SANE_RGBResponseSet (pOrigin, pData);
break;
default:
twRC = TWRC_FAILURE;
activeDS.twCC = TWCC_CAPBADOPERATION;
WARN("unrecognized operation triplet\n");
break;
}
break;
default:
twRC = TWRC_FAILURE;
activeDS.twCC = TWCC_CAPUNSUPPORTED;
WARN("unrecognized DG type %d\n", DAT);
WARN("unsupported DG type %d\n", DAT);
break;
}
return twRC;
}
......
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