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 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157
|
/*
$Id$
Copyright (C) 2000, 2005 Herbert Valerio Riedel <hvr@gnu.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 2 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, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef __VCD_PBC_H__
#define __VCD_PBC_H__
#include <libvcd/types.h>
/* Private includes */
#include "data_structures.h"
#include "util.h"
#include "vcd.h"
typedef enum {
PBC_INVALID = 0,
PBC_PLAYLIST,
PBC_SELECTION,
PBC_END
} pbc_type_t;
typedef struct psd_area_t pbc_area_t; /* fixme */
#define pbc_area_t_SIZEOF struct_psd_area_t_SIZEOF
static inline pbc_area_t *
vcd_pbc_area_new (uint8_t x1, uint8_t y1, uint8_t x2, uint8_t y2)
{
pbc_area_t *_new_area = calloc(1, sizeof (pbc_area_t));
_new_area->x1 = x1;
_new_area->y1 = y1;
_new_area->x2 = x2;
_new_area->y2 = y2;
return _new_area;
}
/* typedef struct _pbc_t pbc_t; */
struct _pbc_t {
pbc_type_t type;
char *id;
bool rejected;
/* pbc ref check */
bool referenced;
/* used for play/selection lists */
char *prev_id;
char *next_id;
char *retn_id;
/* used for play lists */
double playing_time;
int wait_time;
int auto_pause_time;
CdioList_t *item_id_list; /* char */
/* used for selection lists */
enum selection_type_t {
_SEL_NORMAL = 0,
_SEL_MULTI_DEF,
_SEL_MULTI_DEF_NO_NUM
} selection_type;
pbc_area_t *prev_area;
pbc_area_t *next_area;
pbc_area_t *return_area;
pbc_area_t *default_area; /* depends on selection_type */
CdioList_t *select_area_list; /* pbc_area_t */
unsigned bsn;
char *default_id;
char *timeout_id;
int timeout_time;
unsigned loop_count;
bool jump_delayed;
char *item_id;
CdioList_t *select_id_list; /* char */
/* used for end lists */
char *image_id;
unsigned next_disc;
/* computed values */
unsigned lid;
unsigned offset;
unsigned offset_ext;
};
enum item_type_t {
ITEM_TYPE_NOTFOUND = 0,
ITEM_TYPE_NOOP,
ITEM_TYPE_TRACK,
ITEM_TYPE_ENTRY,
ITEM_TYPE_SEGMENT,
ITEM_TYPE_PBC
};
/* functions */
pbc_t *
vcd_pbc_new (pbc_type_t type);
pbc_t *
_vcd_pbc_init (pbc_t *p_pbc);
void
vcd_pbc_destroy (pbc_t *p_pbc);
unsigned
_vcd_pbc_lid_lookup (const VcdObj_t *p_obj, const char item_id[]);
enum item_type_t
_vcd_pbc_lookup (const VcdObj_t *p_obj, const char item_id[]);
uint16_t
_vcd_pbc_pin_lookup (const VcdObj_t *p_obj, const char item_id[]);
unsigned
_vcd_pbc_list_calc_size (const pbc_t *_pbc, bool b_extended);
bool
_vcd_pbc_finalize (VcdObj_t *p_obj);
bool
_vcd_pbc_available (const VcdObj_t *p_obj);
uint16_t
_vcd_pbc_max_lid (const VcdObj_t *p_obj);
void
_vcd_pbc_node_write (const VcdObj_t *p_obj, const pbc_t *_pbc, void *p_buf,
bool b_extended);
void
_vcd_pbc_check_unreferenced (const VcdObj_t *p_obj);
#endif /* __VCD_PBC_H__ */
|