Canorus  0.0
md.h
Go to the documentation of this file.
1 /*
2  * File: md.h
3  *
4  * Copyright (C) 1999 Steve Ratcliffe
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License version 2 as
8  * published by the Free Software Foundation.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  *
16  *
17  */
18 
19 /* Defines for md_walk() */
20 #define MD_WALK_ALL 1 /* Include all elements including deleted, hidden*/
21 
22 /* Defines for walk callback flags */
23 #define MD_WALK_START 0x001 /* This is a start element */
24 #define MD_WALK_END 0x002 /* This is the end of an element */
25 #define MD_WALK_EMPTY (MD_WALK_START|MD_WALK_END) /* Empty element */
26 
27 /* Typedef for md_walk callback function */
28 typedef void (*walkFunc)(struct element *, void *, int);
29 
30 
31 /*
32  * Structure to keep track of the position on each track that
33  * is being merged.
34  */
35 struct sequenceState {
36  int nmerge; /* Number of tracks in trackPos to merge */
37  struct trackPos *track_ptrs; /* Position pointers */
38  struct rootElement *root; /* Root to be returned first */
39  unsigned long endtime; /* End time */
40 };
41 struct trackPos {
42  int len; /* Total length of this container element */
43  int count; /* Current position count */
44  struct element **currel; /* Pointer to current position */
45 };
46 
47 void md_walk(struct containerElement *c, walkFunc fn, void *arg, int flags);
48 int iscontainer(struct element *el);
50 struct element *md_sequence_next(struct sequenceState *seq);
51 void md_sequence_end(struct sequenceState *seq);
52 unsigned long md_sequence_end_time(struct sequenceState *seq);
trackPos::count
int count
Definition: md.h:43
iscontainer
int iscontainer(struct element *el)
containerElement
Definition: elements.h:37
trackPos::currel
struct element ** currel
Definition: md.h:44
sequenceState::root
struct rootElement * root
Definition: md.h:38
md_sequence_next
struct element * md_sequence_next(struct sequenceState *seq)
sequenceState::endtime
unsigned long endtime
Definition: md.h:39
trackPos
Definition: md.h:41
sequenceState::nmerge
int nmerge
Definition: md.h:36
md_sequence_end_time
unsigned long md_sequence_end_time(struct sequenceState *seq)
md_sequence_end
void md_sequence_end(struct sequenceState *seq)
walkFunc
void(* walkFunc)(struct element *, void *, int)
Definition: md.h:28
md_sequence_init
struct sequenceState * md_sequence_init(struct rootElement *root)
rootElement
Definition: elements.h:45
md_walk
void md_walk(struct containerElement *c, walkFunc fn, void *arg, int flags)
trackPos::len
int len
Definition: md.h:42
element
Definition: elements.h:28
sequenceState::track_ptrs
struct trackPos * track_ptrs
Definition: md.h:37
sequenceState
Definition: md.h:35