4 * Copyright 2002-2003 AVM Computersysteme Vertriebs GmbH
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
26 #define __NO_CAPIUTILS__
32 #include <sys/types.h>
36 #ifdef HAVE_LINUX_CAPI_H
37 # include <linux/capi.h>
44 static NTSTATUS
capi_register( void *args
)
46 struct register_params
*params
= args
;
48 return capi20_register( params
->maxLogicalConnection
, params
->maxBDataBlocks
, params
->maxBDataLen
,
49 (unsigned int *)params
->pApplID
);
52 static NTSTATUS
capi_release( void *args
)
54 struct release_params
*params
= args
;
56 return capi20_release( params
->ApplID
);
59 static NTSTATUS
capi_put_message( void *args
)
61 struct put_message_params
*params
= args
;
63 return capi20_put_message( params
->ApplID
, params
->pCAPIMessage
);
66 static NTSTATUS
capi_get_message( void *args
)
68 struct get_message_params
*params
= args
;
70 /* FIXME: allocate buffers based on capi_register sizes and copy returned data */
71 return capi20_get_message( params
->ApplID
, (unsigned char **)params
->ppCAPIMessage
);
74 static NTSTATUS
capi_waitformessage( void *args
)
76 struct waitformessage_params
*params
= args
;
78 return capi20_waitformessage( params
->ApplID
, NULL
);
81 static NTSTATUS
capi_get_manufacturer( void *args
)
83 struct get_manufacturer_params
*params
= args
;
85 return capi20_get_manufacturer( 0, (unsigned char *)params
->SzBuffer
) ? 0 : 0x1108;
88 static NTSTATUS
capi_get_version( void *args
)
90 struct get_version_params
*params
= args
;
91 unsigned int version
[4];
93 if (!capi20_get_version( 0, (unsigned char *)version
)) return 0x1108;
94 *params
->pCAPIMajor
= version
[0];
95 *params
->pCAPIMinor
= version
[1];
96 *params
->pManufacturerMajor
= version
[2];
97 *params
->pManufacturerMinor
= version
[3];
101 static NTSTATUS
capi_get_serial_number( void *args
)
103 struct get_serial_number_params
*params
= args
;
105 return capi20_get_serial_number( 0, (unsigned char*)params
->SzBuffer
) ? 0 : 0x1108;
108 static NTSTATUS
capi_get_profile( void *args
)
110 struct get_profile_params
*params
= args
;
112 return capi20_get_profile( params
->CtlrNr
, params
->SzBuffer
);
115 static NTSTATUS
capi_isinstalled( void *args
)
117 return capi20_isinstalled();
120 unixlib_entry_t __wine_unix_call_funcs
[] =
127 capi_get_manufacturer
,
129 capi_get_serial_number
,