ds_ctrl.c 16.2 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
/*
 * Copyright 2000 Corel Corporation
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
16
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
17 18
 */

19 20 21 22 23
#include "config.h"

#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif
24 25
#include <stdlib.h>
#include "twain.h"
26
#include "sane_i.h"
27 28 29 30 31
#include "wine/debug.h"

WINE_DEFAULT_DEBUG_CHANNEL(twain);

/* DG_CONTROL/DAT_CAPABILITY/MSG_GET */
32
TW_UINT16 SANE_CapabilityGet (pTW_IDENTITY pOrigin, TW_MEMREF pData)
33 34 35
{
    TW_UINT16 twRC = TWRC_SUCCESS, twCC = TWCC_SUCCESS;
    pTW_CAPABILITY pCapability = (pTW_CAPABILITY) pData;
36

37
    TRACE("DG_CONTROL/DAT_CAPABILITY/MSG_GET\n");
38

39
    if (activeDS.currentState < 4 || activeDS.currentState > 7)
40 41
    {
        twRC = TWRC_FAILURE;
42
        activeDS.twCC = TWCC_SEQERROR;
43 44 45
    }
    else
    {
46
        twCC = SANE_SaneCapability (pCapability, MSG_GET);
47
        twRC = (twCC == TWCC_SUCCESS)?TWRC_SUCCESS:TWRC_FAILURE;
48
        activeDS.twCC = twCC;
49 50 51 52 53 54
    }

    return twRC;
}

/* DG_CONTROL/DAT_CAPABILITY/MSG_GETCURRENT */
55
TW_UINT16 SANE_CapabilityGetCurrent (pTW_IDENTITY pOrigin, TW_MEMREF pData)
56 57 58 59 60 61
{
    TW_UINT16 twRC = TWRC_SUCCESS, twCC = TWCC_SUCCESS;
    pTW_CAPABILITY pCapability = (pTW_CAPABILITY) pData;

    TRACE("DG_CONTROL/DAT_CAPABILITY/MSG_GETCURRENT\n");

62
    if (activeDS.currentState < 4 || activeDS.currentState > 7)
63 64
    {
        twRC = TWRC_FAILURE;
65
        activeDS.twCC = TWCC_SEQERROR;
66 67 68
    }
    else
    {
69
        twCC = SANE_SaneCapability (pCapability, MSG_GETCURRENT);
70
        twRC = (twCC == TWCC_SUCCESS)?TWRC_SUCCESS:TWRC_FAILURE;
71
        activeDS.twCC = twCC;
72
    }
73 74 75 76 77

    return twRC;
}

/* DG_CONTROL/DAT_CAPABILITY/MSG_GETDEFAULT */
78
TW_UINT16 SANE_CapabilityGetDefault (pTW_IDENTITY pOrigin, TW_MEMREF pData)
79 80 81 82 83 84
{
    TW_UINT16 twRC = TWRC_SUCCESS, twCC = TWCC_SUCCESS;
    pTW_CAPABILITY pCapability = (pTW_CAPABILITY) pData;

    TRACE("DG_CONTROL/DAT_CAPABILITY/MSG_GETDEFAULT\n");

85
    if (activeDS.currentState < 4 || activeDS.currentState > 7)
86 87
    {
        twRC = TWRC_FAILURE;
88
        activeDS.twCC = TWCC_SEQERROR;
89 90 91
    }
    else
    {
92
        twCC = SANE_SaneCapability (pCapability, MSG_GETDEFAULT);
93
        twRC = (twCC == TWCC_SUCCESS)?TWRC_SUCCESS:TWRC_FAILURE;
94
        activeDS.twCC = twCC;
95 96 97 98 99 100
    }

    return twRC;
}

/* DG_CONTROL/DAT_CAPABILITY/MSG_QUERYSUPPORT */
101 102
TW_UINT16 SANE_CapabilityQuerySupport (pTW_IDENTITY pOrigin,
                                        TW_MEMREF pData)
103 104 105 106 107 108 109
{
    FIXME ("stub!\n");

    return TWRC_FAILURE;
}

/* DG_CONTROL/DAT_CAPABILITY/MSG_RESET */
110
TW_UINT16 SANE_CapabilityReset (pTW_IDENTITY pOrigin, 
111 112 113 114 115 116 117
                                 TW_MEMREF pData)
{
    TW_UINT16 twRC = TWRC_SUCCESS, twCC = TWCC_SUCCESS;
    pTW_CAPABILITY pCapability = (pTW_CAPABILITY) pData;

    TRACE("DG_CONTROL/DAT_CAPABILITY/MSG_RESET\n");

118
    if (activeDS.currentState < 4 || activeDS.currentState > 7)
119 120
    {
        twRC = TWRC_FAILURE;
121
        activeDS.twCC = TWCC_SEQERROR;
122 123 124
    }
    else
    {
125
        twCC = SANE_SaneCapability (pCapability, MSG_RESET);
126
        twRC = (twCC == TWCC_SUCCESS)?TWRC_SUCCESS:TWRC_FAILURE;
127
        activeDS.twCC = twCC;
128 129 130 131 132 133
    }

    return twRC;
}

/* DG_CONTROL/DAT_CAPABILITY/MSG_SET */
134
TW_UINT16 SANE_CapabilitySet (pTW_IDENTITY pOrigin, 
135 136 137 138 139 140 141
                               TW_MEMREF pData)
{
    TW_UINT16 twRC = TWRC_SUCCESS, twCC = TWCC_SUCCESS;
    pTW_CAPABILITY pCapability = (pTW_CAPABILITY) pData;

    TRACE ("DG_CONTROL/DAT_CAPABILITY/MSG_SET\n");

142
    if (activeDS.currentState != 4)
143 144
    {
        twRC = TWRC_FAILURE;
145
        activeDS.twCC = TWCC_SEQERROR;
146 147 148
    }
    else
    {
149
        twCC = SANE_SaneCapability (pCapability, MSG_SET);
150
        twRC = (twCC == TWCC_SUCCESS)?TWRC_SUCCESS:TWRC_FAILURE;
151
        activeDS.twCC = twCC;
152 153 154 155 156
    }
    return twRC;
}

/* DG_CONTROL/DAT_CUSTOMDSDATA/MSG_GET */
157
TW_UINT16 SANE_CustomDSDataGet (pTW_IDENTITY pOrigin, 
158 159 160 161 162 163 164 165
                                TW_MEMREF pData)
{
    FIXME ("stub!\n");

    return TWRC_FAILURE;
}

/* DG_CONTROL/DAT_CUSTOMDSDATA/MSG_SET */
166
TW_UINT16 SANE_CustomDSDataSet (pTW_IDENTITY pOrigin, 
167 168 169 170 171 172 173 174
                                 TW_MEMREF pData)
{
    FIXME ("stub!\n");

    return TWRC_FAILURE;
}

/* DG_CONTROL/DAT_FILESYSTEM/MSG_AUTOMATICCAPTUREDIRECTORY */
175 176
TW_UINT16 SANE_AutomaticCaptureDirectory (pTW_IDENTITY pOrigin,
                                           
177 178 179 180 181 182 183 184
                                           TW_MEMREF pData)
{
    FIXME ("stub!\n");

    return TWRC_FAILURE;
}

/* DG_CONTROL/DAT_FILESYSTEM/MSG_CHANGEDIRECTORY */
185
TW_UINT16 SANE_ChangeDirectory (pTW_IDENTITY pOrigin, 
186 187 188 189 190 191 192 193
                                 TW_MEMREF pData)
{
    FIXME ("stub!\n");

    return TWRC_FAILURE;
}

/* DG_CONTROL/DAT_FILESYSTEM/MSG_COPY */
194
TW_UINT16 SANE_FileSystemCopy (pTW_IDENTITY pOrigin, 
195 196 197 198 199 200 201 202
                                TW_MEMREF pData)
{
    FIXME ("stub!\n");

    return TWRC_FAILURE;
}

/* DG_CONTROL/DAT_FILESYSTEM/MSG_CREATEDIRECTORY */
203
TW_UINT16 SANE_CreateDirectory (pTW_IDENTITY pOrigin, 
204 205 206 207 208 209 210 211
                                 TW_MEMREF pData)
{
    FIXME ("stub!\n");

    return TWRC_FAILURE;
}

/* DG_CONTROL/DAT_FILESYSTEM/MSG_DELETE */
212
TW_UINT16 SANE_FileSystemDelete (pTW_IDENTITY pOrigin, 
213 214 215 216 217 218 219 220
                                  TW_MEMREF pData)
{
    FIXME ("stub!\n");

    return TWRC_FAILURE;
}

/* DG_CONTROL/DAT_FILESYSTEM/MSG_FORMATMEDIA */
221
TW_UINT16 SANE_FormatMedia (pTW_IDENTITY pOrigin, 
222 223 224 225 226 227 228 229
                             TW_MEMREF pData)
{
    FIXME ("stub!\n");

    return TWRC_FAILURE;
}

/* DG_CONTROL/DAT_FILESYSTEM/MSG_GETCLOSE */
230
TW_UINT16 SANE_FileSystemGetClose (pTW_IDENTITY pOrigin, 
231 232 233 234 235 236 237 238
                                    TW_MEMREF pData)
{
    FIXME ("stub!\n");

    return TWRC_FAILURE;
}

/* DG_CONTROL/DAT_FILESYSTEM/MSG_GETFIRSTFILE */
239 240
TW_UINT16 SANE_FileSystemGetFirstFile (pTW_IDENTITY pOrigin,
                                        
241 242 243 244 245 246 247 248
                                        TW_MEMREF pData)
{
    FIXME ("stub!\n");

    return TWRC_FAILURE;
}

/* DG_CONTROL/DAT_FILESYSTEM/MSG_GETINFO */
249
TW_UINT16 SANE_FileSystemGetInfo (pTW_IDENTITY pOrigin, 
250 251 252 253 254 255 256 257
                                   TW_MEMREF pData)
{
    FIXME ("stub!\n");

    return TWRC_FAILURE;
}

/* DG_CONTROL/DAT_FILESYSTEM/MSG_GETNEXTFILE */
258 259
TW_UINT16 SANE_FileSystemGetNextFile (pTW_IDENTITY pOrigin,
                                       
260 261 262 263 264 265 266 267
                                       TW_MEMREF pData)
{
    FIXME ("stub!\n");

    return TWRC_FAILURE;
}

/* DG_CONTROL/DAT_FILESYSTEM/MSG_RENAME */
268
TW_UINT16 SANE_FileSystemRename (pTW_IDENTITY pOrigin, 
269 270 271 272 273 274 275 276
                                  TW_MEMREF pData)
{
    FIXME ("stub!\n");

    return TWRC_FAILURE;
}

/* DG_CONTROL/DAT_EVENT/MSG_PROCESSEVENT */
277
TW_UINT16 SANE_ProcessEvent (pTW_IDENTITY pOrigin, 
278 279 280 281 282 283 284
                              TW_MEMREF pData)
{
    TW_UINT16 twRC = TWRC_SUCCESS;
    pTW_EVENT pEvent = (pTW_EVENT) pData;

    TRACE("DG_CONTROL/DAT_EVENT/MSG_PROCESSEVENT\n");

285
    if (activeDS.currentState < 5 || activeDS.currentState > 7)
286 287
    {
        twRC = TWRC_FAILURE;
288
        activeDS.twCC = TWCC_SEQERROR;
289 290 291
    }
    else
    {
292
        if (activeDS.pendingEvent.TWMessage != MSG_NULL)
293
        {
294 295
            pEvent->TWMessage = activeDS.pendingEvent.TWMessage;
            activeDS.pendingEvent.TWMessage = MSG_NULL;
296
            twRC = TWRC_NOTDSEVENT;
297 298 299 300 301 302
        }
        else
        {
            pEvent->TWMessage = MSG_NULL;  /* no message to the application */
            twRC = TWRC_NOTDSEVENT;
        }
303
        activeDS.twCC = TWCC_SUCCESS;
304 305 306 307 308 309
    }

    return twRC;
}

/* DG_CONTROL/DAT_PASSTHRU/MSG_PASSTHRU */
310
TW_UINT16 SANE_PassThrough (pTW_IDENTITY pOrigin, 
311 312 313 314 315 316 317 318
                             TW_MEMREF pData)
{
    FIXME ("stub!\n");

    return TWRC_FAILURE;
}

/* DG_CONTROL/DAT_PENDINGXFERS/MSG_ENDXFER */
319
TW_UINT16 SANE_PendingXfersEndXfer (pTW_IDENTITY pOrigin, 
320 321 322 323 324 325 326
                                     TW_MEMREF pData)
{
    TW_UINT16 twRC = TWRC_SUCCESS;
    pTW_PENDINGXFERS pPendingXfers = (pTW_PENDINGXFERS) pData;

    TRACE("DG_CONTROL/DAT_PENDINGXFERS/MSG_ENDXFER\n");

327
    if (activeDS.currentState != 6 && activeDS.currentState != 7)
328 329
    {
        twRC = TWRC_FAILURE;
330
        activeDS.twCC = TWCC_SEQERROR;
331 332 333 334 335 336
    }
    else
    {
        if (pPendingXfers->Count != 0)
        {
            pPendingXfers->Count --;
337
            activeDS.currentState = 6;
338 339 340
        }
        else
        {
341
            activeDS.currentState = 5;
342
            /* Notify the application that it can close the data source */
343
            activeDS.pendingEvent.TWMessage = MSG_CLOSEDSREQ;
344 345
        }
        twRC = TWRC_SUCCESS;
346
        activeDS.twCC = TWCC_SUCCESS;
347 348 349 350 351 352
    }

    return twRC;
}

/* DG_CONTROL/DAT_PENDINGXFERS/MSG_GET */
353
TW_UINT16 SANE_PendingXfersGet (pTW_IDENTITY pOrigin, 
354 355 356 357 358 359 360
                                 TW_MEMREF pData)
{
    TW_UINT16 twRC = TWRC_SUCCESS;
    pTW_PENDINGXFERS pPendingXfers = (pTW_PENDINGXFERS) pData;

    TRACE("DG_CONTROL/DAT_PENDINGXFERS/MSG_GET\n");

361
    if (activeDS.currentState < 4 || activeDS.currentState > 7)
362 363
    {
        twRC = TWRC_FAILURE;
364
        activeDS.twCC = TWCC_SEQERROR;
365 366 367 368 369 370
    }
    else
    {
        /* FIXME: we shouldn't return 1 here */
        pPendingXfers->Count = 1;
        twRC = TWRC_SUCCESS;
371
        activeDS.twCC = TWCC_SUCCESS;
372 373 374 375 376 377
    }

    return twRC;
}

/* DG_CONTROL/DAT_PENDINGXFERS/MSG_RESET */
378
TW_UINT16 SANE_PendingXfersReset (pTW_IDENTITY pOrigin, 
379 380 381 382 383 384 385
                                   TW_MEMREF pData)
{
    TW_UINT16 twRC = TWRC_SUCCESS;
    pTW_PENDINGXFERS pPendingXfers = (pTW_PENDINGXFERS) pData;

    TRACE("DG_CONTROL/DAT_PENDINGXFERS/MSG_RESET\n");

386
    if (activeDS.currentState != 6)
387 388
    {
        twRC = TWRC_FAILURE;
389
        activeDS.twCC = TWCC_SEQERROR;
390 391 392 393
    }
    else
    {
        pPendingXfers->Count = 0;
394
        activeDS.currentState = 5;
395
        twRC = TWRC_SUCCESS;
396
        activeDS.twCC = TWCC_SUCCESS;
397 398 399 400 401 402
    }

    return twRC;
}

/* DG_CONTROL/DAT_PENDINGXFERS/MSG_STOPFEEDER */
403 404
TW_UINT16 SANE_PendingXfersStopFeeder (pTW_IDENTITY pOrigin,
                                        TW_MEMREF pData)
405 406 407 408 409 410 411
{
    FIXME ("stub!\n");

    return TWRC_FAILURE;
}

/* DG_CONTROL/DAT_SETUPFILEXFER/MSG_GET */
412
TW_UINT16 SANE_SetupFileXferGet (pTW_IDENTITY pOrigin, 
413 414 415 416 417 418 419 420
                                  TW_MEMREF pData)
{
    FIXME ("stub!\n");

    return TWRC_FAILURE;
}

/* DG_CONTROL/DAT_SETUPXFER/MSG_GETDEFAULT */
421
TW_UINT16 SANE_SetupFileXferGetDefault (pTW_IDENTITY pOrigin, 
422 423 424 425 426 427 428 429 430
                                         TW_MEMREF pData)
{
    FIXME ("stub!\n");

    return TWRC_FAILURE;
}


/* DG_CONTROL/DAT_SETUPFILEXFER/MSG_RESET */
431
TW_UINT16 SANE_SetupFileXferReset (pTW_IDENTITY pOrigin, 
432 433 434 435 436 437 438 439
                                    TW_MEMREF pData)
{
    FIXME ("stub!\n");

    return TWRC_FAILURE;
}

/* DG_CONTROL/DAT_SETUPFILEXFER/MSG_SET */
440
TW_UINT16 SANE_SetupFileXferSet (pTW_IDENTITY pOrigin, 
441 442 443 444 445 446 447 448
                                  TW_MEMREF pData)
{
    FIXME ("stub!\n");

    return TWRC_FAILURE;
}

/* DG_CONTROL/DAT_SETUPFILEXFER2/MSG_GET */
449
TW_UINT16 SANE_SetupFileXfer2Get (pTW_IDENTITY pOrigin, 
450 451 452 453 454 455 456 457
                                   TW_MEMREF pData)
{
    FIXME ("stub!\n");

    return TWRC_FAILURE;
}

/* DG_CONTROL/DAT_SETUPFILEXFER2/MSG_GETDEFAULT */
458
TW_UINT16 SANE_SetupFileXfer2GetDefault (pTW_IDENTITY pOrigin, 
459 460 461 462 463 464 465 466
                                         TW_MEMREF pData)
{
    FIXME ("stub!\n");

    return TWRC_FAILURE;
}

/* DG_CONTROL/DAT_SETUPFILEXFER2/MSG_RESET */
467
TW_UINT16 SANE_SetupFileXfer2Reset (pTW_IDENTITY pOrigin, 
468 469 470 471 472 473 474 475
                                  TW_MEMREF pData)
{
    FIXME ("stub!\n");

    return TWRC_FAILURE;
}

/* DG_CONTROL/DAT_SETUPFILEXFER2/MSG_SET */
476
TW_UINT16 SANE_SetupFileXfer2Set (pTW_IDENTITY pOrigin, 
477 478 479 480 481 482 483 484
                                  TW_MEMREF pData)
{
    FIXME ("stub!\n");

    return TWRC_FAILURE;
}

/* DG_CONTROL/DAT_SETUPMEMXFER/MSG_GET */
485
TW_UINT16 SANE_SetupMemXferGet (pTW_IDENTITY pOrigin, 
486 487
                                  TW_MEMREF pData)
{
488
#ifndef SONAME_LIBSANE
489
    return TWRC_FAILURE;
490 491 492 493
#else
    pTW_SETUPMEMXFER  pSetupMemXfer = (pTW_SETUPMEMXFER)pData;

    TRACE("DG_CONTROL/DAT_SETUPMEMXFER/MSG_GET\n");
494
    if (activeDS.sane_param_valid)
495
    {
496 497 498
        pSetupMemXfer->MinBufSize = activeDS.sane_param.bytes_per_line;
        pSetupMemXfer->MaxBufSize = activeDS.sane_param.bytes_per_line * 8;
        pSetupMemXfer->Preferred = activeDS.sane_param.bytes_per_line * 2;
499 500 501 502 503 504 505 506 507 508 509
    }
    else
    {
        /* Guessing */
        pSetupMemXfer->MinBufSize = 2000;
        pSetupMemXfer->MaxBufSize = 8000;
        pSetupMemXfer->Preferred = 4000;
    }

    return TWRC_SUCCESS;
#endif
510 511 512
}

/* DG_CONTROL/DAT_STATUS/MSG_GET */
513
TW_UINT16 SANE_GetDSStatus (pTW_IDENTITY pOrigin, 
514 515 516 517 518
                             TW_MEMREF pData)
{
    pTW_STATUS pSourceStatus = (pTW_STATUS) pData;

    TRACE ("DG_CONTROL/DAT_STATUS/MSG_GET\n");
519 520 521 522
    pSourceStatus->ConditionCode = activeDS.twCC;
    /* Reset the condition code */
    activeDS.twCC = TWCC_SUCCESS;
    return TWRC_SUCCESS;
523 524 525
}

/* DG_CONTROL/DAT_USERINTERFACE/MSG_DISABLEDS */
526 527
TW_UINT16 SANE_DisableDSUserInterface (pTW_IDENTITY pOrigin,
                                        TW_MEMREF pData)
528 529 530 531 532
{
    TW_UINT16 twRC = TWRC_SUCCESS;

    TRACE ("DG_CONTROL/DAT_USERINTERFACE/MSG_DISABLEDS\n");

533
    if (activeDS.currentState != 5)
534 535
    {
        twRC = TWRC_FAILURE;
536
        activeDS.twCC = TWCC_SEQERROR;
537 538 539
    }
    else
    {
540
        activeDS.currentState = 4;
541
        twRC = TWRC_SUCCESS;
542
        activeDS.twCC = TWCC_SUCCESS;
543 544 545 546 547 548
    }

    return twRC;
}

/* DG_CONTROL/DAT_USERINTERFACE/MSG_ENABLEDS */
549 550
TW_UINT16 SANE_EnableDSUserInterface (pTW_IDENTITY pOrigin,
                                       TW_MEMREF pData)
551 552 553
{
    TW_UINT16 twRC = TWRC_SUCCESS;
    pTW_USERINTERFACE pUserInterface = (pTW_USERINTERFACE) pData;
554

555
    TRACE ("DG_CONTROL/DAT_USERINTERFACE/MSG_ENABLEDS\n");
556

557
    if (activeDS.currentState != 4)
558 559
    {
        twRC = TWRC_FAILURE;
560 561
        activeDS.twCC = TWCC_SEQERROR;
	FIXME("sequence error %d\n", activeDS.currentState);
562 563 564
    }
    else
    {
565
        activeDS.hwndOwner = pUserInterface->hParent;
566 567
        if (pUserInterface->ShowUI)
        {
568
            BOOL rc;
569 570 571
            activeDS.currentState = 5; /* Transitions to state 5 */
		FIXME("showing UI\n");
            rc = DoScannerUI();
572 573
            if (!rc)
            {
574
                activeDS.pendingEvent.TWMessage = MSG_CLOSEDSREQ;
575
            }
576
#ifdef SONAME_LIBSANE
577 578
            else
            {
579
                psane_get_parameters (activeDS.deviceHandle, &activeDS.sane_param);
580
                activeDS.sane_param_valid = TRUE;
581 582
            }
#endif
583 584 585 586
        }
        else
        {
            /* no UI will be displayed, so source is ready to transfer data */
587 588
            activeDS.pendingEvent.TWMessage = MSG_XFERREADY;
            activeDS.currentState = 6; /* Transitions to state 6 directly */
589
        }
590

591
        activeDS.hwndOwner = pUserInterface->hParent;
592
        twRC = TWRC_SUCCESS;
593
        activeDS.twCC = TWCC_SUCCESS;
594 595 596 597 598 599
    }

    return twRC;
}

/* DG_CONTROL/DAT_USERINTERFACE/MSG_ENABLEDSUIONLY */
600
TW_UINT16 SANE_EnableDSUIOnly (pTW_IDENTITY pOrigin, 
601 602 603 604 605 606
                                TW_MEMREF pData)
{
    TW_UINT16 twRC = TWRC_SUCCESS;

    TRACE("DG_CONTROL/DAT_USERINTERFACE/MSG_ENABLEDSUIONLY\n");

607
    if (activeDS.currentState != 4)
608 609
    {
        twRC = TWRC_FAILURE;
610
        activeDS.twCC = TWCC_SEQERROR;
611 612 613 614 615
    }
    else
    {
        /* FIXME: we should replace xscanimage with our own UI */
        system ("xscanimage");
616
        activeDS.currentState = 5;
617
        twRC = TWRC_SUCCESS;
618
        activeDS.twCC = TWCC_SUCCESS;
619 620 621 622 623 624
    }

    return twRC;
}

/* DG_CONTROL/DAT_XFERGROUP/MSG_GET */
625
TW_UINT16 SANE_XferGroupGet (pTW_IDENTITY pOrigin, 
626 627 628 629 630 631 632 633
                              TW_MEMREF pData)
{
    FIXME ("stub!\n");

    return TWRC_FAILURE;
}

/* DG_CONTROL/DAT_XFERGROUP/MSG_SET */
634
TW_UINT16 SANE_XferGroupSet (pTW_IDENTITY pOrigin, 
635 636 637 638 639 640
                                  TW_MEMREF pData)
{
    FIXME ("stub!\n");

    return TWRC_FAILURE;
}