Main Page   Data Structures   File List   Data Fields   Globals  

parsetime.h File Reference

Go to the source code of this file.

Enumerations

enum  pt_type { PT_INVALID_FORMAT = -1, PT_FULL_CLOCK = 0, PT_PARTIAL_CLOCK = 1, PT_TIMECOUNT = 2 }
enum  pt_unit {
  PT_NO_UNIT = 0, PT_MILLISECONDS = 1, PT_SECONDS = 2, PT_MINUTES = 3,
  PT_HOURS = 4
}

Functions

mad_timer_t parse_time_mad_time_t (const char *expr)
unsigned long int parse_time_milliseconds (const char *expr)
unsigned long int parse_time_get_dur (const char *start, const char *stop)


Enumeration Type Documentation

enum pt_type
 

Specifies type of time format. Specifies whether a time format is Full-clock, Partial-clock or Timecount.

Enumeration values:
PT_INVALID_FORMAT 
PT_FULL_CLOCK 
PT_PARTIAL_CLOCK 
PT_TIMECOUNT 

Definition at line 43 of file parsetime.h.

Referenced by type().

enum pt_unit
 

Specifies time units.

Enumeration values:
PT_NO_UNIT 
PT_MILLISECONDS 
PT_SECONDS 
PT_MINUTES 
PT_HOURS 

Definition at line 53 of file parsetime.h.


Function Documentation

unsigned long int parse_time_get_dur const char *    start,
const char *    stop
 

Returns the duration in milliseconds from char start- and stop-arguments

Parameters:
const  char *start - start time as a null-terminated string.
const  char *stop - stop time as a null-terminated string.
Returns:
unsigned long int - duration (start to stop) as milliseconds.

Definition at line 472 of file parsetime.c.

References parse_time_milliseconds().

Referenced by audio_play().

mad_timer_t parse_time_mad_time_t const char *    expr
 

Translates valid DAISY time formats to seconds and fractions NOTE: sec. 7.7, (page 41) in ANSI/NISO Z39.86.2005

Parameters:
const  char *expr - time as a null-terminated string.
Returns:
mad_timer_t - returns the time as a mad_timer_t struct.

Definition at line 388 of file parsetime.c.

References convert_mad_timer_t(), parse_full_clock(), parse_partial_clock(), parse_timecount(), PT_FULL_CLOCK, PT_INVALID_FORMAT, PT_PARTIAL_CLOCK, PT_TIMECOUNT, REP_DEBUG, report(), STRLEN, and type().

Referenced by audio_play().

unsigned long int parse_time_milliseconds const char *    expr
 

Translates valid DAISY time formats to milliseconds Note: sec. 7.7, (page 41) in ANSI/NISO Z39.86.2005

Parameters:
const  char *expr - time as a null-terminated string.
Returns:
unsigned long int - time as milliseconds.

Definition at line 430 of file parsetime.c.

References convert_milliseconds_from_time(), parse_full_clock(), parse_partial_clock(), parse_timecount(), PT_FULL_CLOCK, PT_INVALID_FORMAT, PT_PARTIAL_CLOCK, PT_TIMECOUNT, REP_DEBUG, report(), STRLEN, and type().

Referenced by parse_time_get_dur().


Generated on Tue Sep 5 12:14:08 2006 for libdaisy by doxygen1.2.15