~ubuntu-branches/ubuntu/trusty/regionset/trusty

« back to all changes in this revision

Viewing changes to dvd_udf.h

  • Committer: Bazaar Package Importer
  • Author(s): Josselin Mouette
  • Date: 2004-01-04 21:34:31 UTC
  • Revision ID: james.westby@ubuntu.com-20040104213431-citkfxqbf7wggbnr
Tags: upstream-0.1
Import upstream version 0.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Some functions for UDF handling, originally part of dvd_disc_20000215.tar.gz
 
3
 * from convergence.
 
4
 *
 
5
 * cleanups (remove every with a relation to CSS)
 
6
 *   by Mirko D�lle <cooper@linvdr.org>
 
7
 */ 
 
8
#ifndef DVD_UDF_H
 
9
#define DVD_UDF_H
 
10
 
 
11
#define DVD_UDF_VERSION 20000215
 
12
 
 
13
 
 
14
/***********************************************************************************/
 
15
/* The length of one Logical Block of a DVD Video                                  */
 
16
/***********************************************************************************/
 
17
#define DVD_VIDEO_LB_LEN 2048
 
18
 
 
19
/***********************************************************************************/
 
20
/* reads Logical Block of the disc or image                                        */
 
21
/*   lb_number: disc-absolute logical block number                                 */
 
22
/*   block_count: number of 2048 byte blocks to read                               */
 
23
/*   data: pointer to enough allocated memory                                      */
 
24
/*   returns number of read bytes on success, 0 or negative error number on error  */
 
25
/***********************************************************************************/
 
26
int UDFReadLB(unsigned long int lb_number, unsigned int block_count, unsigned char *data);
 
27
 
 
28
/***********************************************************************************/
 
29
/* looks for a file on the UDF disc/imagefile                                      */
 
30
/*   filename: absolute pathname on the UDF filesystem, starting with '/'          */
 
31
/*   filesize will be set to the size of the file in bytes, on success             */
 
32
/*   returns absolute LB number, or 0 on error                                     */
 
33
/***********************************************************************************/
 
34
unsigned long int UDFFindFile(char *filename, unsigned long int *filesize);
 
35
 
 
36
 
 
37
/************************************/
 
38
/* DVD Copy Management:             */
 
39
/* RPC - Region Playback Control    */
 
40
/************************************/
 
41
 
 
42
/***********************************************************************************/
 
43
/* Query RPC status of the drive                                                   */
 
44
/* type: 0=NONE (no drive region setting)                                          */
 
45
/*       1=SET (drive region is set                                                */
 
46
/*       2=LAST CHANCE (drive region is set, only one change remains)              */
 
47
/*       3=PERM (region set permanently, may be reset by vendor)                   */
 
48
/* vra: number of vendor resets available                                          */
 
49
/* ucca: number of user controlled changes available                               */
 
50
/* region_mask: the bit of the drive's region is set to 0, all other 7 bits to 1   */
 
51
/* rpc_scheme: 0=unknown, 1=RPC Phase II, others reserved                          */
 
52
/* returns 0 on success, <0 on error                                               */
 
53
/***********************************************************************************/
 
54
int UDFRPCGet(int *type, int *vra, int *ucca, int *region_mask, int *rpc_scheme);
 
55
 
 
56
/***********************************************************************************/
 
57
/* Set new Region for drive                                                        */
 
58
/* region_mask: the bit of the new drive's region is set to 0, all other 7 bits to 1 */
 
59
/***********************************************************************************/
 
60
int UDFRPCSet(int region_mask);
 
61
 
 
62
/***********************************************************************************/
 
63
/* opens block device or image file                                                */
 
64
/*   filename: path to the DVD ROM block device or to the image file in UDF format */
 
65
/*   returns fileno() of the file on success, or -1 on error                       */
 
66
/***********************************************************************************/
 
67
int UDFOpenDisc(char *filename);
 
68
 
 
69
/***********************************************************************************/
 
70
/* closes previously opened block device or image file                             */
 
71
/*   returns 0 on success, or -1 on error                                          */
 
72
/***********************************************************************************/
 
73
int UDFCloseDisc(void);
 
74
 
 
75
#endif /* DVD_UDF_H */