File: types.swg

package info (click to toggle)
libdevice-cdio-perl 2.0.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster
  • size: 2,852 kB
  • sloc: ansic: 14,413; perl: 4,795; makefile: 19; sh: 3
file content (60 lines) | stat: -rw-r--r-- 2,007 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
/* -*- c -*-
  Copyright (C) 2006, 2008, 2011 Rocky Bernstein <rocky@cpan.org>

  This program is free software: you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation, either version 3 of the License, or
  (at your option) any later version.

  This program 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 General Public License for more details.

  You should have received a copy of the GNU General Public License
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/

/* 
   Various typedef's "constant"s/variables

   Many of these are documented more fully in libcdio's <cdio/types.h>
   I'm not sure why, but including that directly will not allow
   SWIG to understand say that a lsn_t is an int.
*/

%include "inttypes.i"

#ifdef NEED_LONG
#define LONG long
#else 
#define LONG
#endif

#define uint32_t LONG unsigned int
#define uint16_t LONG unsigned int
#define int32_t  LONG int
#define uint8_t  unsigned char

typedef long int my_ssize_t;
typedef unsigned int driver_id_t;
typedef int lsn_t;
typedef int lba_t;
typedef unsigned int track_t;
typedef long int driver_return_code_t;
typedef long int ssize_t;
typedef unsigned int cdio_drive_read_cap_t;
typedef unsigned int cdio_drive_write_cap_t;
typedef unsigned int cdio_drive_misc_cap_t;

%constant long int VERSION_NUM = LIBCDIO_VERSION_NUM;

%constant long int INVALID_LBA = CDIO_INVALID_LBA;
%constant long int INVALID_LSN = CDIO_INVALID_LSN;

/* More documentation on the below is in cdio/sector.h */
%constant long int CD_FRAMESIZE      = CDIO_CD_FRAMESIZE;
%constant long int CD_FRAMESIZE_RAW  = CDIO_CD_FRAMESIZE_RAW;
%constant long int ISO_BLOCKSIZE     = CDIO_CD_FRAMESIZE;
%constant long int M2F2_SECTOR_SIZE  = M2F2_SECTOR_SIZE; 
%constant long int M2RAW_SECTOR_SIZE = M2RAW_SECTOR_SIZE;