| 1 |
/* -*- c -*- |
| 2 |
Copyright (C) 2006, 2008, 2011 Rocky Bernstein <[email protected]> |
| 3 |
|
| 4 |
This program is free software: you can redistribute it and/or modify |
| 5 |
it under the terms of the GNU General Public License as published by |
| 6 |
the Free Software Foundation, either version 3 of the License, or |
| 7 |
(at your option) any later version. |
| 8 |
|
| 9 |
This program is distributed in the hope that it will be useful, |
| 10 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 |
GNU General Public License for more details. |
| 13 |
|
| 14 |
You should have received a copy of the GNU General Public License |
| 15 |
along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 16 |
*/ |
| 17 |
|
| 18 |
/* |
| 19 |
Various typedef's "constant"s/variables |
| 20 |
|
| 21 |
Many of these are documented more fully in libcdio's <cdio/types.h> |
| 22 |
I'm not sure why, but including that directly will not allow |
| 23 |
SWIG to understand say that a lsn_t is an int. |
| 24 |
*/ |
| 25 |
|
| 26 |
%include "inttypes.i" |
| 27 |
|
| 28 |
#ifdef NEED_LONG |
| 29 |
#define LONG long |
| 30 |
#else |
| 31 |
#define LONG |
| 32 |
#endif |
| 33 |
|
| 34 |
#define uint32_t LONG unsigned int |
| 35 |
#define uint16_t LONG unsigned int |
| 36 |
#define int32_t LONG int |
| 37 |
#define uint8_t unsigned char |
| 38 |
|
| 39 |
typedef long int my_ssize_t; |
| 40 |
typedef unsigned int driver_id_t; |
| 41 |
typedef int lsn_t; |
| 42 |
typedef int lba_t; |
| 43 |
typedef unsigned int track_t; |
| 44 |
typedef long int driver_return_code_t; |
| 45 |
typedef long int ssize_t; |
| 46 |
typedef unsigned int cdio_drive_read_cap_t; |
| 47 |
typedef unsigned int cdio_drive_write_cap_t; |
| 48 |
typedef unsigned int cdio_drive_misc_cap_t; |
| 49 |
|
| 50 |
%constant long int VERSION_NUM = LIBCDIO_VERSION_NUM; |
| 51 |
|
| 52 |
%constant long int INVALID_LBA = CDIO_INVALID_LBA; |
| 53 |
%constant long int INVALID_LSN = CDIO_INVALID_LSN; |
| 54 |
|
| 55 |
/* More documentation on the below is in cdio/sector.h */ |
| 56 |
%constant long int CD_FRAMESIZE = CDIO_CD_FRAMESIZE; |
| 57 |
%constant long int CD_FRAMESIZE_RAW = CDIO_CD_FRAMESIZE_RAW; |
| 58 |
%constant long int ISO_BLOCKSIZE = CDIO_CD_FRAMESIZE; |
| 59 |
%constant long int M2F2_SECTOR_SIZE = M2F2_SECTOR_SIZE; |
| 60 |
%constant long int M2RAW_SECTOR_SIZE = M2RAW_SECTOR_SIZE; |