line.c 30 KB
Newer Older
1 2 3 4
/*
 * TAPI32 line services
 *
 * Copyright 1999  Andreas Mohr
5 6 7 8 9 10 11 12 13 14 15 16 17 18
 *
 * 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
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
19 20 21 22
 */

#include <string.h>
#include <stdlib.h>
23
#include <stdarg.h>
24
#include <stdio.h>
25
#include "windef.h"
26
#include "winbase.h"
27 28
#include "winreg.h"
#include "winerror.h"
29
#include "tapi.h"
30
#include "wine/debug.h"
31

32
WINE_DEFAULT_DEBUG_CHANNEL(tapi);
33

34 35 36
/***********************************************************************
 *		lineAccept (TAPI32.@)
 */
37 38
DWORD WINAPI lineAccept(HCALL hCall, LPCSTR lpsUserUserInfo, DWORD dwSize)
{
39
    FIXME("(%p, %s, %ld): stub.\n", hCall, lpsUserUserInfo, dwSize);
40 41 42
    return 1;
}

43 44 45
/***********************************************************************
 *		lineAddProvider (TAPI32.@)
 */
46 47
DWORD WINAPI lineAddProvider(LPCSTR lpszProviderName, HWND hwndOwner, LPDWORD lpdwPermanentProviderID)
{
48
    FIXME("(%s, %p, %p): stub.\n", lpszProviderName, hwndOwner, lpdwPermanentProviderID);
49
    return 1;
50
}
51

52 53 54
/***********************************************************************
 *		lineAddToConference (TAPI32.@)
 */
55 56
DWORD WINAPI lineAddToConference(HCALL hConfCall, HCALL hConsultCall)
{
57
    FIXME("(%p, %p): stub.\n", hConfCall, hConsultCall);
58 59 60
    return 1;
}

61 62 63
/***********************************************************************
 *		lineAnswer (TAPI32.@)
 */
64 65
DWORD WINAPI lineAnswer(HCALL hCall, LPCSTR lpsUserUserInfo, DWORD dwSize)
{
66
    FIXME("(%p, %s, %ld): stub.\n", hCall, lpsUserUserInfo, dwSize);
67
    return 1;
68
}
69

70 71 72
/***********************************************************************
 *		lineBlindTransfer (TAPI32.@)
 */
73 74
DWORD WINAPI lineBlindTransfer(HCALL hCall, LPCSTR lpszDestAddress, DWORD dwCountryCode)
{
75
    FIXME("(%p, %s, %08lx): stub.\n", hCall, lpszDestAddress, dwCountryCode);
76
    return 1;
77
}
78

79 80 81
/***********************************************************************
 *		lineClose (TAPI32.@)
 */
82 83
DWORD WINAPI lineClose(HLINE hLine)
{
84
    FIXME("(%p): stub.\n", hLine);
85
    return 0;
86
}
87

88 89 90
/***********************************************************************
 *		lineCompleteCall (TAPI32.@)
 */
91 92
DWORD WINAPI lineCompleteCall(HCALL hCall, LPDWORD lpdwCompletionID, DWORD dwCompletionMode, DWORD dwMessageID)
{
93
    FIXME("(%p, %p, %08lx, %08lx): stub.\n", hCall, lpdwCompletionID, dwCompletionMode, dwMessageID);
94
    return 1;
95
}
96

97 98 99
/***********************************************************************
 *		lineCompleteTransfer (TAPI32.@)
 */
100 101
DWORD WINAPI lineCompleteTransfer(HCALL hCall, HCALL hConsultCall, LPHCALL lphConfCall, DWORD dwTransferMode)
{
102
    FIXME("(%p, %p, %p, %08lx): stub.\n", hCall, hConsultCall, lphConfCall, dwTransferMode);
103 104 105
    return 1;
}

106 107 108
/***********************************************************************
 *		lineConfigDialog (TAPI32.@)
 */
109 110
DWORD WINAPI lineConfigDialog(DWORD dwDeviceID, HWND hwndOwner, LPCSTR lpszDeviceClass)
{
111
    FIXME("(%08lx, %p, %s): stub.\n", dwDeviceID, hwndOwner, lpszDeviceClass);
112
    return 0;
113
}
114

115 116 117
/***********************************************************************
 *		lineConfigDialogEdit (TAPI32.@)
 */
118 119
DWORD WINAPI lineConfigDialogEdit(DWORD dwDeviceID, HWND hwndOwner, LPCSTR lpszDeviceClass, LPVOID const lpDeviceConfigIn, DWORD dwSize, LPVARSTRING lpDeviceConfigOut)
{
120
    FIXME("stub.\n");
121
    return 0;
122
}
123

124 125 126
/***********************************************************************
 *		lineConfigProvider (TAPI32.@)
 */
127 128
DWORD WINAPI lineConfigProvider(HWND hwndOwner, DWORD dwPermanentProviderID)
{
129
    FIXME("(%p, %08lx): stub.\n", hwndOwner, dwPermanentProviderID);
130 131 132
    return 0;
}

133 134 135
/***********************************************************************
 *		lineDeallocateCall (TAPI32.@)
 */
136 137
DWORD WINAPI lineDeallocateCall(HCALL hCall)
{
138
    FIXME("(%p): stub.\n", hCall);
139 140 141
    return 0;
}

142 143 144
/***********************************************************************
 *		lineDevSpecific (TAPI32.@)
 */
145 146
DWORD WINAPI lineDevSpecific(HLINE hLine, DWORD dwAddressId, HCALL hCall, LPVOID lpParams, DWORD dwSize)
{
147
    FIXME("(%p, %08lx, %p, %p, %ld): stub.\n", hLine, dwAddressId, hCall, lpParams, dwSize);
148
    return 1;
149
}
150

151 152 153
/***********************************************************************
 *		lineDevSpecificFeature (TAPI32.@)
 */
154 155
DWORD WINAPI lineDevSpecificFeature(HLINE hLine, DWORD dwFeature, LPVOID lpParams, DWORD dwSize)
{
156
    FIXME("(%p, %08lx, %p, %ld): stub.\n", hLine, dwFeature, lpParams, dwSize);
157 158 159
    return 1;
}

160 161 162
/***********************************************************************
 *		lineDial (TAPI32.@)
 */
163 164
DWORD WINAPI lineDial(HCALL hCall, LPCSTR lpszDestAddress, DWORD dwCountryCode)
{
165
    FIXME("(%p, %s, %08lx): stub.\n", hCall, lpszDestAddress, dwCountryCode);
166 167
    return 1;
}
168 169 170

/***********************************************************************
 *		lineDrop (TAPI32.@)
171
 */
172 173
DWORD WINAPI lineDrop(HCALL hCall, LPCSTR lpsUserUserInfo, DWORD dwSize)
{
174
    FIXME("(%p, %s, %08lx): stub.\n", hCall, lpsUserUserInfo, dwSize);
175 176 177
    return 1;
}

178 179 180
/***********************************************************************
 *		lineForward (TAPI32.@)
 */
181 182
DWORD WINAPI lineForward(HLINE hLine, DWORD bAllAddress, DWORD dwAdressID, LPLINEFORWARDLIST lpForwardList, DWORD dwNumRingsNoAnswer, LPHCALL lphConsultCall, LPLINECALLPARAMS lpCallParams)
{
183
    FIXME("stub.\n");
184
    return 1;
185 186 187 188
}

/***********************************************************************
 *		lineGatherDigits (TAPI32.@)
189
 */
190 191
DWORD WINAPI lineGatherDigits(HCALL hCall, DWORD dwDigitModes, LPSTR lpsDigits, DWORD dwNumDigits, LPCSTR lpszTerminationDigits, DWORD dwFirstDigitTimeout, DWORD dwInterDigitTimeout)
{
192
    FIXME("stub.\n");
193 194 195
    return 0;
}

196 197 198
/***********************************************************************
 *		lineGenerateDigits (TAPI32.@)
 */
199 200
DWORD WINAPI lineGenerateDigits(HCALL hCall, DWORD dwDigitModes, LPCSTR lpszDigits, DWORD dwDuration)
{
201
    FIXME("(%p, %08lx, %s, %ld): stub.\n", hCall, dwDigitModes, lpszDigits, dwDuration);
202 203 204
    return 0;
}

205 206 207
/***********************************************************************
 *		lineGenerateTone (TAPI32.@)
 */
208 209
DWORD WINAPI lineGenerateTone(HCALL hCall, DWORD dwToneMode, DWORD dwDuration, DWORD dwNumTones, LPLINEGENERATETONE lpTones)
{
210
    FIXME("(%p, %08lx, %ld, %ld, %p): stub.\n", hCall, dwToneMode, dwDuration, dwNumTones, lpTones);
211
    return 0;
212
}
213

214 215 216
/***********************************************************************
 *		lineGetAddressCaps (TAPI32.@)
 */
217 218
DWORD WINAPI lineGetAddressCaps(HLINEAPP hLineApp, DWORD dwDeviceID, DWORD dwAddressID, DWORD dwAPIVersion, DWORD dwExtVersion, LPLINEADDRESSCAPS lpAddressCaps)
{
219
    FIXME("(%p, %08lx, %08lx, %08lx, %08lx, %p): stub.\n", hLineApp, dwDeviceID, dwAddressID, dwAPIVersion, dwExtVersion, lpAddressCaps);
220 221 222
    return 0;
}

223 224 225
/***********************************************************************
 *		lineGetAddressID (TAPI32.@)
 */
226 227
DWORD WINAPI lineGetAddressID(HLINE hLine, LPDWORD lpdwAddressID, DWORD dwAddressMode, LPCSTR lpsAddress, DWORD dwSize)
{
228
    FIXME("%p, %p, %08lx, %s, %ld): stub.\n", hLine, lpdwAddressID, dwAddressMode, lpsAddress, dwSize);
229 230 231
    return 0;
}

232 233 234
/***********************************************************************
 *		lineGetAddressStatus (TAPI32.@)
 */
235 236
DWORD WINAPI lineGetAddressStatus(HLINE hLine, DWORD dwAddressID, LPLINEADDRESSSTATUS lpAddressStatus)
{
237
    FIXME("(%p, %08lx, %p): stub.\n", hLine, dwAddressID, lpAddressStatus);
238
    return 0;
239
}
240

241 242 243
/***********************************************************************
 *		lineGetAppPriority (TAPI32.@)
 */
244 245
DWORD WINAPI lineGetAppPriority(LPCSTR lpszAppFilename, DWORD dwMediaMode, LPLINEEXTENSIONID const lpExtensionID, DWORD dwRequestMode, LPVARSTRING lpExtensionName, LPDWORD lpdwPriority)
{
246
    FIXME("(%s, %08lx, %p, %08lx, %p, %p): stub.\n", lpszAppFilename, dwMediaMode, lpExtensionID, dwRequestMode, lpExtensionName, lpdwPriority);
247
    return 0;
248
}
249

250 251 252
/***********************************************************************
 *		lineGetCallInfo (TAPI32.@)
 */
253 254
DWORD WINAPI lineGetCallInfo(HCALL hCall, LPLINECALLINFO lpCallInfo)
{
255
    FIXME("(%p, %p): stub.\n", hCall, lpCallInfo);
256 257 258
    return 0;
}

259 260 261
/***********************************************************************
 *		lineGetCallStatus (TAPI32.@)
 */
262 263
DWORD WINAPI lineGetCallStatus(HCALL hCall, LPLINECALLSTATUS lpCallStatus)
{
264
    FIXME("(%p, %p): stub.\n", hCall, lpCallStatus);
265 266 267
    return 0;
}

268 269 270
/***********************************************************************
 *		lineGetConfRelatedCalls (TAPI32.@)
 */
271 272
DWORD WINAPI lineGetConfRelatedCalls(HCALL hCall, LPLINECALLLIST lpCallList)
{
273
    FIXME("(%p, %p): stub.\n", hCall, lpCallList);
274
    return 0;
275
}
276

277 278 279 280 281
typedef struct tagTAPI_CountryInfo
{
    DWORD  dwCountryID;
    DWORD  dwCountryCode;
    LPSTR  lpCountryName;
282 283 284
    LPSTR  lpSameAreaRule;
    LPSTR  lpLongDistanceRule;
    LPSTR  lpInternationalRule;
285 286
} TAPI_CountryInfo;

287 288 289
/***********************************************************************
 *		lineGetCountry (TAPI32.@)
 */
290 291
DWORD WINAPI lineGetCountry(DWORD dwCountryID, DWORD dwAPIVersion, LPLINECOUNTRYLIST lpLineCountryList)
{
292
    DWORD dwAvailSize, dwOffset, i, num_countries, max_subkey_len;
293
    LPLINECOUNTRYENTRY lpLCE;
294 295
    HKEY hkey;
    char *subkey_name;
296

297 298 299 300 301 302
    if(!lpLineCountryList) {
	TRACE("(%08lx, %08lx, %p): stub. Returning LINEERR_INVALPOINTER\n",
	      dwCountryID, dwAPIVersion, lpLineCountryList);
        return LINEERR_INVALPOINTER;
    }

303
    TRACE("(%08lx, %08lx, %p(%ld)): stub.\n",
304 305
	  dwCountryID, dwAPIVersion, lpLineCountryList,
	  lpLineCountryList->dwTotalSize);
306

307 308 309 310 311 312
    if(RegOpenKeyA(HKEY_LOCAL_MACHINE,
		   "Software\\Microsoft\\Windows\\CurrentVersion\\Telephony\\Country List",
		   &hkey) != ERROR_SUCCESS)
        return LINEERR_INIFILECORRUPT;


313 314 315 316 317 318 319 320
    dwAvailSize = lpLineCountryList->dwTotalSize;
    dwOffset = sizeof (LINECOUNTRYLIST);

    if(dwAvailSize<dwOffset)
        return LINEERR_STRUCTURETOOSMALL;

    memset(lpLineCountryList, 0, dwAvailSize);

321
    lpLineCountryList->dwTotalSize         = dwAvailSize;
322 323 324 325 326 327 328
    lpLineCountryList->dwUsedSize          = dwOffset;
    lpLineCountryList->dwNumCountries      = 0;
    lpLineCountryList->dwCountryListSize   = 0;
    lpLineCountryList->dwCountryListOffset = dwOffset;

    lpLCE = (LPLINECOUNTRYENTRY)(&lpLineCountryList[1]);

329 330 331 332 333 334 335 336 337 338 339 340 341 342
    if(RegQueryInfoKeyA(hkey, NULL, NULL, NULL, &num_countries, &max_subkey_len,
			NULL, NULL, NULL, NULL, NULL, NULL) != ERROR_SUCCESS) {
        RegCloseKey(hkey);
        return LINEERR_STRUCTURETOOSMALL;
    }

    if(dwCountryID)
        dwOffset = sizeof (LINECOUNTRYENTRY);
    else
        dwOffset += num_countries * sizeof (LINECOUNTRYENTRY);

    max_subkey_len++;
    subkey_name = HeapAlloc(GetProcessHeap(), 0, max_subkey_len);
    for(i = 0; i < num_countries; i++)
343
    {
344 345
        DWORD len, size, size_int, size_long, size_name, size_same;
	HKEY hsubkey;
346

347 348 349 350 351
	if(RegEnumKeyA(hkey, i, subkey_name, max_subkey_len) !=
	   ERROR_SUCCESS)
	    continue;

        if(dwCountryID && (atoi(subkey_name) != dwCountryID))
352 353
            continue;

354 355 356 357 358 359 360 361 362 363 364 365 366 367
	if(RegOpenKeyA(hkey, subkey_name, &hsubkey) != ERROR_SUCCESS)
	    continue;

	RegQueryValueExA(hsubkey, "InternationalRule", NULL, NULL,
			 NULL, &size_int);
        len  = size_int;

	RegQueryValueExA(hsubkey, "LongDistanceRule", NULL, NULL,
			 NULL, &size_long);
        len += size_long;

	RegQueryValueExA(hsubkey, "Name", NULL, NULL,
			 NULL, &size_name);
        len += size_name;
368

369 370 371 372 373
	RegQueryValueExA(hsubkey, "SameAreaRule", NULL, NULL,
			 NULL, &size_same);
        len += size_same;

        if(dwAvailSize < (dwOffset+len))
374
        {
375 376 377 378
            dwOffset += len;
	    RegCloseKey(hsubkey);
	    if(dwCountryID)
		break;
379 380 381 382
            continue;
        }

        lpLineCountryList->dwNumCountries++;
383 384
        lpLineCountryList->dwCountryListSize += sizeof (LINECOUNTRYENTRY);
        lpLineCountryList->dwUsedSize += len + sizeof (LINECOUNTRYENTRY);
385

386 387
	if(dwCountryID)
	    i = 0;
388

389 390 391 392
        lpLCE[i].dwCountryID = atoi(subkey_name);
	size = sizeof(DWORD);
	RegQueryValueExA(hsubkey, "CountryCode", NULL, NULL,
			 (BYTE*)&lpLCE[i].dwCountryCode, &size);
393

394 395 396 397
	lpLCE[i].dwNextCountryID = 0;
        
	if(i > 0)
            lpLCE[i-1].dwNextCountryID = lpLCE[i].dwCountryID;
398 399

        /* add country name */
400
        lpLCE[i].dwCountryNameSize = size_name;
401
        lpLCE[i].dwCountryNameOffset = dwOffset;
402 403 404 405
	RegQueryValueExA(hsubkey, "Name", NULL, NULL,
			 ((LPSTR)lpLineCountryList)+dwOffset,
			 &size_name);
        dwOffset += size_name;
406 407

        /* add Same Area Rule */
408
        lpLCE[i].dwSameAreaRuleSize = size_same;
409
        lpLCE[i].dwSameAreaRuleOffset = dwOffset;
410 411 412 413
	RegQueryValueExA(hsubkey, "SameAreaRule", NULL, NULL,
			 ((LPSTR)lpLineCountryList)+dwOffset,
			 &size_same);
        dwOffset += size_same;
414 415

        /* add Long Distance Rule */
416
        lpLCE[i].dwLongDistanceRuleSize = size_long;
417
        lpLCE[i].dwLongDistanceRuleOffset = dwOffset;
418 419 420 421
	RegQueryValueExA(hsubkey, "LongDistanceRule", NULL, NULL,
			 ((LPSTR)lpLineCountryList)+dwOffset,
			 &size_long);
        dwOffset += size_long;
422 423

        /* add Long Distance Rule */
424
        lpLCE[i].dwInternationalRuleSize = size_int;
425
        lpLCE[i].dwInternationalRuleOffset = dwOffset;
426 427 428 429 430 431 432 433 434 435
	RegQueryValueExA(hsubkey, "InternationalRule", NULL, NULL,
			 ((LPSTR)lpLineCountryList)+dwOffset,
			 &size_int);
        dwOffset += size_int;
	RegCloseKey(hsubkey);

        TRACE("Added country %s at %p\n", (LPSTR)lpLineCountryList + lpLCE[i].dwCountryNameOffset,
	      &lpLCE[i]);

	if(dwCountryID) break;
436 437 438 439 440 441
    }

    lpLineCountryList->dwNeededSize = dwOffset;

    TRACE("%ld available %ld required\n", dwAvailSize, dwOffset);

442 443 444
    HeapFree(GetProcessHeap(), 0, subkey_name);
    RegCloseKey(hkey);

445 446 447
    return 0;
}

448 449 450
/***********************************************************************
 *		lineGetDevCaps (TAPI32.@)
 */
451 452
DWORD WINAPI lineGetDevCaps(HLINEAPP hLineApp, DWORD dwDeviceID, DWORD dwAPIVersion, DWORD dwExtVersion, LPLINEDEVCAPS lpLineDevCaps)
{
453
    FIXME("(%p, %08lx, %08lx, %08lx, %p): stub.\n", hLineApp, dwDeviceID, dwAPIVersion, dwExtVersion, lpLineDevCaps);
454
    return 0;
455
}
456

457 458 459
/***********************************************************************
 *		lineGetDevConfig (TAPI32.@)
 */
460 461
DWORD WINAPI lineGetDevConfig(DWORD dwDeviceID, LPVARSTRING lpDeviceConfig, LPCSTR lpszDeviceClass)
{
462
    FIXME("(%08lx, %p, %s): stub.\n", dwDeviceID, lpDeviceConfig, lpszDeviceClass);
463 464 465
    return 0;
}

466 467 468
/***********************************************************************
 *		lineGetID (TAPI32.@)
 */
469 470
DWORD WINAPI lineGetID(HLINE hLine, DWORD dwAddressID, HCALL hCall, DWORD dwSelect, LPVARSTRING lpDeviceID, LPCSTR lpszDeviceClass)
{
471
    FIXME("(%p, %08lx, %p, %08lx, %p, %s): stub.\n", hLine, dwAddressID, hCall, dwSelect, lpDeviceID, lpszDeviceClass);
472 473 474
    return 0;
}

475 476 477
/***********************************************************************
 *		lineGetIcon (TAPI32.@)
 */
478 479
DWORD WINAPI lineGetIcon(DWORD dwDeviceID, LPCSTR lpszDeviceClass, HICON *lphIcon)
{
480
    FIXME("(%08lx, %s, %p): stub.\n", dwDeviceID, lpszDeviceClass, lphIcon);
481
    return 0;
482
}
483

484 485 486
/***********************************************************************
 *		lineGetLineDevStatus (TAPI32.@)
 */
487 488
DWORD WINAPI lineGetLineDevStatus(HLINE hLine, LPLINEDEVSTATUS lpLineDevStatus)
{
489
    FIXME("(%p, %p): stub.\n", hLine, lpLineDevStatus);
490
    return 0;
491
}
492

493 494 495
/***********************************************************************
 *		lineGetNewCalls (TAPI32.@)
 */
496 497
DWORD WINAPI lineGetNewCalls(HLINE hLine, DWORD dwAddressID, DWORD dwSelect, LPLINECALLLIST lpCallList)
{
498
    FIXME("(%p, %08lx, %08lx, %p): stub.\n", hLine, dwAddressID, dwSelect, lpCallList);
499 500 501
    return 0;
}

502 503 504
/***********************************************************************
 *		lineGetNumRings (TAPI32.@)
 */
505 506
DWORD WINAPI lineGetNumRings(HLINE hLine, DWORD dwAddressID, LPDWORD lpdwNumRings)
{
507
    FIXME("(%p, %08lx, %p): stub.\n", hLine, dwAddressID, lpdwNumRings);
508 509 510
    return 0;
}

511 512 513
/***********************************************************************
 *		lineGetProviderList (TAPI32.@)
 */
514 515
DWORD WINAPI lineGetProviderList(DWORD dwAPIVersion, LPLINEPROVIDERLIST lpProviderList)
{
516
    FIXME("(%08lx, %p): stub.\n", dwAPIVersion, lpProviderList);
517
    return 0;
518
}
519

520 521 522
/***********************************************************************
 *		lineGetRequest (TAPI32.@)
 */
523 524
DWORD WINAPI lineGetRequest(HLINEAPP hLineApp, DWORD dwRequestMode, LPVOID lpRequestBuffer)
{
525
    FIXME("%p, %08lx, %p): stub.\n", hLineApp, dwRequestMode, lpRequestBuffer);
526
    return 0;
527
}
528

529 530 531
/***********************************************************************
 *		lineGetStatusMessages (TAPI32.@)
 */
532 533
DWORD WINAPI lineGetStatusMessages(HLINE hLine, LPDWORD lpdwLineStatus, LPDWORD lpdwAddressStates)
{
534
    FIXME("(%p, %p, %p): stub.\n", hLine, lpdwLineStatus, lpdwAddressStates);
535
    return 0;
536
}
537

538 539 540
/***********************************************************************
 *		lineGetTranslateCaps (TAPI32.@)
 */
541 542
DWORD WINAPI lineGetTranslateCaps(HLINEAPP hLineApp, DWORD dwAPIVersion, LPLINETRANSLATECAPS lpTranslateCaps)
{
543
    FIXME("(%p, %08lx, %p): stub.\n", hLineApp, dwAPIVersion, lpTranslateCaps);
544 545
    if(lpTranslateCaps->dwTotalSize >= sizeof(DWORD))
        memset(&lpTranslateCaps->dwNeededSize, 0, lpTranslateCaps->dwTotalSize - sizeof(DWORD));
546 547 548
    return 0;
}

549 550 551
/***********************************************************************
 *		lineHandoff (TAPI32.@)
 */
552 553
DWORD WINAPI lineHandoff(HCALL hCall, LPCSTR lpszFileName, DWORD dwMediaMode)
{
554
    FIXME("(%p, %s, %08lx): stub.\n", hCall, lpszFileName, dwMediaMode);
555
    return 0;
556
}
557

558 559 560
/***********************************************************************
 *		lineHold (TAPI32.@)
 */
561 562
DWORD WINAPI lineHold(HCALL hCall)
{
563
    FIXME("(%p): stub.\n", hCall);
564
    return 1;
565
}
566

567 568 569
/***********************************************************************
 *		lineInitialize (TAPI32.@)
 */
570 571 572 573 574 575 576
DWORD WINAPI lineInitialize(
  LPHLINEAPP lphLineApp,
  HINSTANCE hInstance,
  LINECALLBACK lpfnCallback,
  LPCSTR lpszAppName,
  LPDWORD lpdwNumDevs)
{
577
    FIXME("(%p, %p, %p, %s, %p): stub.\n", lphLineApp, hInstance,
578
	  lpfnCallback, debugstr_a(lpszAppName), lpdwNumDevs);
579 580 581
    return 0;
}

582 583 584
/***********************************************************************
 *		lineMakeCall (TAPI32.@)
 */
585 586
DWORD WINAPI lineMakeCall(HLINE hLine, LPHCALL lphCall, LPCSTR lpszDestAddress, DWORD dwCountryCode, LPLINECALLPARAMS lpCallParams)
{
587
    FIXME("(%p, %p, %s, %08lx, %p): stub.\n", hLine, lphCall, lpszDestAddress, dwCountryCode, lpCallParams);
588 589 590
    return 1;
}

591 592 593
/***********************************************************************
 *		lineMonitorDigits (TAPI32.@)
 */
594 595
DWORD WINAPI lineMonitorDigits(HCALL hCall, DWORD dwDigitModes)
{
596
    FIXME("(%p, %08lx): stub.\n", hCall, dwDigitModes);
597 598 599
    return 0;
}

600 601 602
/***********************************************************************
 *		lineMonitorMedia (TAPI32.@)
 */
603 604
DWORD WINAPI lineMonitorMedia(HCALL hCall, DWORD dwMediaModes)
{
605
    FIXME("(%p, %08lx): stub.\n", hCall, dwMediaModes);
606
    return 0;
607
}
608

609 610 611
/***********************************************************************
 *		lineMonitorTones (TAPI32.@)
 */
612 613
DWORD WINAPI lineMonitorTones(HCALL hCall, LPLINEMONITORTONE lpToneList, DWORD dwNumEntries)
{
614
    FIXME("(%p, %p, %08lx): stub.\n", hCall, lpToneList, dwNumEntries);
615
    return 0;
616
}
617

618 619 620
/***********************************************************************
 *		lineNegotiateAPIVersion (TAPI32.@)
 */
621 622 623 624 625 626 627 628 629
DWORD WINAPI lineNegotiateAPIVersion(
  HLINEAPP hLineApp,
  DWORD dwDeviceID,
  DWORD dwAPILowVersion,
  DWORD dwAPIHighVersion,
  LPDWORD lpdwAPIVersion,
  LPLINEEXTENSIONID lpExtensionID
)
{
630
    FIXME("(%p, %ld, %ld, %ld, %p, %p): stub.\n", hLineApp, dwDeviceID,
631
	  dwAPILowVersion, dwAPIHighVersion, lpdwAPIVersion, lpExtensionID);
632 633 634 635
    *lpdwAPIVersion = dwAPIHighVersion;
    return 0;
}

636 637 638
/***********************************************************************
 *		lineNegotiateExtVersion (TAPI32.@)
 */
639 640
DWORD WINAPI lineNegotiateExtVersion(HLINEAPP hLineApp, DWORD dwDeviceID, DWORD dwAPIVersion, DWORD dwExtLowVersion, DWORD dwExtHighVersion, LPDWORD lpdwExtVersion)
{
641
    FIXME("stub.\n");
642 643 644
    return 0;
}

645 646 647
/***********************************************************************
 *		lineOpen (TAPI32.@)
 */
648 649
DWORD WINAPI lineOpen(HLINEAPP hLineApp, DWORD dwDeviceID, LPHLINE lphLine, DWORD dwAPIVersion, DWORD dwExtVersion, DWORD dwCallbackInstance, DWORD dwPrivileges, DWORD dwMediaModes, LPLINECALLPARAMS lpCallParams)
{
650
    FIXME("stub.\n");
651 652 653
    return 0;
}

654 655 656
/***********************************************************************
 *		linePark (TAPI32.@)
 */
657 658
DWORD WINAPI linePark(HCALL hCall, DWORD dwParkMode, LPCSTR lpszDirAddress, LPVARSTRING lpNonDirAddress)
{
659
    FIXME("(%p, %08lx, %s, %p): stub.\n", hCall, dwParkMode, lpszDirAddress, lpNonDirAddress);
660
    return 1;
661
}
662

663 664 665
/***********************************************************************
 *		linePickup (TAPI32.@)
 */
666 667
DWORD WINAPI linePickup(HLINE hLine, DWORD dwAddressID, LPHCALL lphCall, LPCSTR lpszDestAddress, LPCSTR lpszGroupID)
{
668
    FIXME("(%p, %08lx, %p, %s, %s): stub.\n", hLine, dwAddressID, lphCall, lpszDestAddress, lpszGroupID);
669
    return 1;
670
}
671

672 673 674
/***********************************************************************
 *		linePrepareAddToConference (TAPI32.@)
 */
675 676
DWORD WINAPI linePrepareAddToConference(HCALL hConfCall, LPHCALL lphConsultCall, LPLINECALLPARAMS lpCallParams)
{
677
    FIXME("(%p, %p, %p): stub.\n", hConfCall, lphConsultCall, lpCallParams);
678
    return 1;
679
}
680

681 682
/***********************************************************************
 *		lineRedirect (TAPI32.@)
683 684 685 686 687 688
 */
DWORD WINAPI lineRedirect(
  HCALL hCall,
  LPCSTR lpszDestAddress,
  DWORD  dwCountryCode) {

689
  FIXME(": stub.\n");
690 691 692
  return 1;
}

693 694 695
/***********************************************************************
 *		lineRegisterRequestRecipient (TAPI32.@)
 */
696 697
DWORD WINAPI lineRegisterRequestRecipient(HLINEAPP hLineApp, DWORD dwRegistrationInstance, DWORD dwRequestMode, DWORD dwEnable)
{
698
    FIXME("(%p, %08lx, %08lx, %08lx): stub.\n", hLineApp, dwRegistrationInstance, dwRequestMode, dwEnable);
699 700 701
    return 1;
}

702 703 704
/***********************************************************************
 *		lineReleaseUserUserInfo (TAPI32.@)
 */
705 706
DWORD WINAPI lineReleaseUserUserInfo(HCALL hCall)
{
707
    FIXME("(%p): stub.\n", hCall);
708
    return 1;
709
}
710

711 712 713
/***********************************************************************
 *		lineRemoveFromConference (TAPI32.@)
 */
714 715
DWORD WINAPI lineRemoveFromConference(HCALL hCall)
{
716
    FIXME("(%p): stub.\n", hCall);
717 718 719
    return 1;
}

720 721 722
/***********************************************************************
 *		lineRemoveProvider (TAPI32.@)
 */
723 724
DWORD WINAPI lineRemoveProvider(DWORD dwPermanentProviderID, HWND hwndOwner)
{
725
    FIXME("(%08lx, %p): stub.\n", dwPermanentProviderID, hwndOwner);
726
    return 1;
727
}
728

729 730 731
/***********************************************************************
 *		lineSecureCall (TAPI32.@)
 */
732 733
DWORD WINAPI lineSecureCall(HCALL hCall)
{
734
    FIXME("(%p): stub.\n", hCall);
735 736 737
    return 1;
}

738 739 740
/***********************************************************************
 *		lineSendUserUserInfo (TAPI32.@)
 */
741 742
DWORD WINAPI lineSendUserUserInfo(HCALL hCall, LPCSTR lpsUserUserInfo, DWORD dwSize)
{
743
    FIXME("(%p, %s, %08lx): stub.\n", hCall, lpsUserUserInfo, dwSize);
744 745 746
    return 1;
}

747 748 749
/***********************************************************************
 *		lineSetAppPriority (TAPI32.@)
 */
750 751
DWORD WINAPI lineSetAppPriority(LPCSTR lpszAppFilename, DWORD dwMediaMode, LPLINEEXTENSIONID const lpExtensionID, DWORD dwRequestMode, LPCSTR lpszExtensionName, DWORD dwPriority)
{
752
    FIXME("(%s, %08lx, %p, %08lx, %s, %08lx): stub.\n", lpszAppFilename, dwMediaMode, lpExtensionID, dwRequestMode, lpszExtensionName, dwPriority);
753 754 755
    return 0;
}

756 757 758
/***********************************************************************
 *		lineSetAppSpecific (TAPI32.@)
 */
759 760
DWORD WINAPI lineSetAppSpecific(HCALL hCall, DWORD dwAppSpecific)
{
761
    FIXME("(%p, %08lx): stub.\n", hCall, dwAppSpecific);
762 763 764
    return 0;
}

765 766 767
/***********************************************************************
 *		lineSetCallParams (TAPI32.@)
 */
768 769
DWORD WINAPI lineSetCallParams(HCALL hCall, DWORD dwBearerMode, DWORD dwMinRate, DWORD dwMaxRate, LPLINEDIALPARAMS lpDialParams)
{
770
    FIXME("(%p, %08lx, %08lx, %08lx, %p): stub.\n", hCall, dwBearerMode, dwMinRate, dwMaxRate, lpDialParams);
771 772 773
    return 1;
}

774 775 776
/***********************************************************************
 *		lineSetCallPrivilege (TAPI32.@)
 */
777 778
DWORD WINAPI lineSetCallPrivilege(HCALL hCall, DWORD dwCallPrivilege)
{
779
    FIXME("(%p, %08lx): stub.\n", hCall, dwCallPrivilege);
780
    return 0;
781 782
}

783 784 785
/***********************************************************************
 *		lineSetCurrentLocation (TAPI32.@)
 */
786 787
DWORD WINAPI lineSetCurrentLocation(HLINEAPP hLineApp, DWORD dwLocation)
{
788
    FIXME("(%p, %08lx): stub.\n", hLineApp, dwLocation);
789 790 791
    return 0;
}

792 793 794
/***********************************************************************
 *		lineSetDevConfig (TAPI32.@)
 */
795 796
DWORD WINAPI lineSetDevConfig(DWORD dwDeviceID, LPVOID lpDeviceConfig, DWORD dwSize, LPCSTR lpszDeviceClass)
{
797
    FIXME("(%08lx, %p, %08lx, %s): stub.\n", dwDeviceID, lpDeviceConfig, dwSize, lpszDeviceClass);
798 799 800
    return 0;
}

801 802 803
/***********************************************************************
 *		lineSetMediaControl (TAPI32.@)
 */
804 805 806 807 808 809 810 811 812
DWORD WINAPI lineSetMediaControl(
HLINE hLine,
DWORD dwAddressID,
HCALL hCall,
DWORD dwSelect,
LPLINEMEDIACONTROLDIGIT const lpDigitList,
DWORD dwDigitNumEntries,
LPLINEMEDIACONTROLMEDIA const lpMediaList,
DWORD dwMediaNumEntries,
813
LPLINEMEDIACONTROLTONE const lpToneList,
814 815 816 817
DWORD dwToneNumEntries,
LPLINEMEDIACONTROLCALLSTATE const lpCallStateList,
DWORD dwCallStateNumEntries)
{
818
    FIXME(": stub.\n");
819 820 821
    return 0;
}

822 823 824
/***********************************************************************
 *		lineSetMediaMode (TAPI32.@)
 */
825 826
DWORD WINAPI lineSetMediaMode(HCALL hCall, DWORD dwMediaModes)
{
827
    FIXME("(%p, %08lx): stub.\n", hCall, dwMediaModes);
828
    return 0;
829
}
830

831 832 833
/***********************************************************************
 *		lineSetNumRings (TAPI32.@)
 */
834 835
DWORD WINAPI lineSetNumRings(HLINE hLine, DWORD dwAddressID, DWORD dwNumRings)
{
836
    FIXME("(%p, %08lx, %08lx): stub.\n", hLine, dwAddressID, dwNumRings);
837
    return 0;
838 839
}

840 841 842
/***********************************************************************
 *		lineSetStatusMessages (TAPI32.@)
 */
843 844
DWORD WINAPI lineSetStatusMessages(HLINE hLine, DWORD dwLineStates, DWORD dwAddressStates)
{
845
    FIXME("(%p, %08lx, %08lx): stub.\n", hLine, dwLineStates, dwAddressStates);
846
    return 0;
847 848
}

849 850 851
/***********************************************************************
 *		lineSetTerminal (TAPI32.@)
 */
852 853
DWORD WINAPI lineSetTerminal(HLINE hLine, DWORD dwAddressID, HCALL hCall, DWORD dwSelect, DWORD dwTerminalModes, DWORD dwTerminalID, DWORD bEnable)
{
854
    FIXME("(%p, %08lx, %p, %08lx, %08lx, %08lx, %08lx): stub.\n", hLine, dwAddressID, hCall, dwSelect, dwTerminalModes, dwTerminalID, bEnable);
855
    return 1;
856
}
857

858 859 860
/***********************************************************************
 *		lineSetTollList (TAPI32.@)
 */
861 862
DWORD WINAPI lineSetTollList(HLINEAPP hLineApp, DWORD dwDeviceID, LPCSTR lpszAddressIn, DWORD dwTollListOption)
{
863
    FIXME("(%p, %08lx, %s, %08lx): stub.\n", hLineApp, dwDeviceID, lpszAddressIn, dwTollListOption);
864
    return 0;
865 866
}

867 868 869
/***********************************************************************
 *		lineSetupConference (TAPI32.@)
 */
870 871
DWORD WINAPI lineSetupConference(HCALL hCall, HLINE hLine, LPHCALL lphConfCall, LPHCALL lphConsultCall, DWORD dwNumParties, LPLINECALLPARAMS lpCallParams)
{
872
    FIXME("(%p, %p, %p, %p, %08lx, %p): stub.\n", hCall, hLine, lphConfCall, lphConsultCall, dwNumParties, lpCallParams);
873 874 875
    return 1;
}

876 877 878
/***********************************************************************
 *		lineSetupTransfer (TAPI32.@)
 */
879 880
DWORD WINAPI lineSetupTransfer(HCALL hCall, LPHCALL lphConsultCall, LPLINECALLPARAMS lpCallParams)
{
881
    FIXME("(%p, %p, %p): stub.\n", hCall, lphConsultCall, lpCallParams);
882
    return 1;
883
}
884

885 886 887
/***********************************************************************
 *		lineShutdown (TAPI32.@)
 */
888 889
DWORD WINAPI lineShutdown(HLINEAPP hLineApp)
{
890
    FIXME("(%p): stub.\n", hLineApp);
891 892 893
    return 0;
}

894 895 896
/***********************************************************************
 *		lineSwapHold (TAPI32.@)
 */
897 898
DWORD WINAPI lineSwapHold(HCALL hActiveCall, HCALL hHeldCall)
{
899
    FIXME("(active: %p, held: %p): stub.\n", hActiveCall, hHeldCall);
900 901 902
    return 1;
}

903 904 905
/***********************************************************************
 *		lineTranslateAddress (TAPI32.@)
 */
906 907
DWORD WINAPI lineTranslateAddress(HLINEAPP hLineApp, DWORD dwDeviceID, DWORD dwAPIVersion, LPCSTR lpszAddressIn, DWORD dwCard, DWORD dwTranslateOptions, LPLINETRANSLATEOUTPUT lpTranslateOutput)
{
908
    FIXME("(%p, %08lx, %08lx, %s, %08lx, %08lx, %p): stub.\n", hLineApp, dwDeviceID, dwAPIVersion, lpszAddressIn, dwCard, dwTranslateOptions, lpTranslateOutput);
909 910 911
    return 0;
}

912 913 914
/***********************************************************************
 *		lineTranslateDialog (TAPI32.@)
 */
915 916
DWORD WINAPI lineTranslateDialog(HLINEAPP hLineApp, DWORD dwDeviceID, DWORD dwAPIVersion, HWND hwndOwner, LPCSTR lpszAddressIn)
{
917
    FIXME("(%p, %08lx, %08lx, %p, %s): stub.\n", hLineApp, dwDeviceID, dwAPIVersion, hwndOwner, lpszAddressIn);
918 919 920
    return 0;
}

921 922 923
/***********************************************************************
 *		lineUncompleteCall (TAPI32.@)
 */
924 925
DWORD WINAPI lineUncompleteCall(HLINE hLine, DWORD dwCompletionID)
{
926
    FIXME("(%p, %08lx): stub.\n", hLine, dwCompletionID);
927 928 929
    return 1;
}

930 931 932
/***********************************************************************
 *		lineUnhold (TAPI32.@)
 */
933
DWORD WINAPI lineUnhold(HCALL hCall)
934
{
935
    FIXME("(%p): stub.\n", hCall);
936 937 938
    return 1;
}

939 940 941
/***********************************************************************
 *		lineUnpark (TAPI32.@)
 */
942 943
DWORD WINAPI lineUnpark(HLINE hLine, DWORD dwAddressID, LPHCALL lphCall, LPCSTR lpszDestAddress)
{
944
    FIXME("(%p, %08lx, %p, %s): stub.\n", hLine, dwAddressID, lphCall, lpszDestAddress);
945
    return 1;
946
}