Edinburgh Speech Tools  2.1-release
EST_rw_status.h File Reference
#include <stdio.h>
#include <errno.h>
Include dependency graph for EST_rw_status.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define make_status_int(STATE, REASON, ERRNO)
 
#define make_read_status(STATE, REASON, ERRNO)   ((EST_read_status)(make_status_int(STATE, REASON, ERRNO)))
 
#define make_write_status(STATE, REASON, ERRNO)   ((EST_write_status)(make_status_int(REASON, STATE, ERRNO)))
 
#define get_rw_state(STATUS)   ((EST_rw_state)((((unsigned int)(STATUS)) >> 24) & 0xff))
 
#define get_rw_reason(STATUS)   ((EST_rw_reason)((((unsigned int)(STATUS)) >> 16) & 0xff))
 
#define get_rw_errno(STATUS)   ((int)((((unsigned int)(STATUS)) >> 0) & 0xff))
 
#define format_ok   read_ok
 
#define wrong_format   read_format_error
 
#define misc_read_error   read_error
 
#define misc_write_error   write_error
 

Enumerations

enum  EST_rw_reason {
  rwr_none =0, rwr_format =1, rwr_existance =2, rwr_permission =3,
  rwr_system =4, rwr_unknown =0xff
}
 
enum  EST_rw_state { rws_ok =0, rws_partial =1, rws_failed =0xff }
 
enum  EST_read_status { read_ok = make_status_int(rws_ok, rwr_none, 0), read_format_error = make_status_int(rws_failed, rwr_format, 0), read_not_found_error = make_status_int(rws_failed, rwr_existance, 0), read_error = make_status_int(rws_failed, rwr_unknown, 0) }
 
enum  EST_write_status { write_ok = make_status_int(rws_ok, rwr_none, 0), write_fail = make_status_int(rws_failed, rwr_unknown, 0), write_error = make_status_int(rws_failed, rwr_unknown, 0), write_partial = make_status_int(rws_partial, rwr_unknown, 0) }
 
enum  EST_connect_status {
  connect_ok = make_status_int(rws_ok, rwr_none, 0), connect_not_found_error = make_status_int(rws_failed, rwr_existance, 0), connect_not_allowed_error = make_status_int(rws_failed, rwr_permission, 0), connect_system_error = make_status_int(rws_failed, rwr_system, 0),
  connect_error = make_status_int(rws_failed, rwr_unknown, 0)
}
 

Macro Definition Documentation

#define make_status_int (   STATE,
  REASON,
  ERRNO 
)
Value:
( ((((unsigned int)(STATE)) & 0xff) <<24) \
| ((((unsigned int)(REASON)) & 0xff) <<16) \
| ((((unsigned int)(ERRNO)) & 0xffff) <<00) \
)
getString int
Definition: EST_item_aux.cc:50

Definition at line 62 of file EST_rw_status.h.

#define make_read_status (   STATE,
  REASON,
  ERRNO 
)    ((EST_read_status)(make_status_int(STATE, REASON, ERRNO)))

Definition at line 68 of file EST_rw_status.h.

#define make_write_status (   STATE,
  REASON,
  ERRNO 
)    ((EST_write_status)(make_status_int(REASON, STATE, ERRNO)))

Definition at line 71 of file EST_rw_status.h.

#define get_rw_state (   STATUS)    ((EST_rw_state)((((unsigned int)(STATUS)) >> 24) & 0xff))

Definition at line 78 of file EST_rw_status.h.

#define get_rw_reason (   STATUS)    ((EST_rw_reason)((((unsigned int)(STATUS)) >> 16) & 0xff))

Definition at line 80 of file EST_rw_status.h.

#define get_rw_errno (   STATUS)    ((int)((((unsigned int)(STATUS)) >> 0) & 0xff))

Definition at line 82 of file EST_rw_status.h.

#define format_ok   read_ok

Definition at line 159 of file EST_rw_status.h.

#define wrong_format   read_format_error

Definition at line 160 of file EST_rw_status.h.

#define misc_read_error   read_error

Definition at line 161 of file EST_rw_status.h.

#define misc_write_error   write_error

Definition at line 162 of file EST_rw_status.h.

Enumeration Type Documentation

Enumerator
rwr_none 
rwr_format 
rwr_existance 
rwr_permission 
rwr_system 
rwr_unknown 

Definition at line 90 of file EST_rw_status.h.

State of rw

Enumerator
rws_ok 

ok

rws_partial 

partial

rws_failed 

failed

Definition at line 100 of file EST_rw_status.h.

Possible outcomes of a file reading operation. More stuff

Enumerator
read_ok 

The file was read in successfully.

read_format_error 

The file exists but is not in the format specified.

read_not_found_error 

The file does not exist.

read_error 

An error occurred while reading.

Definition at line 111 of file EST_rw_status.h.

Possible outcomes of a file writing operation

Enumerator
write_ok 

The file was written successfully.

write_fail 

The file was not written successfully.

write_error 

The file was not written successfully.

write_partial 

A valid file was created, but only some of the requested data is in there.

Definition at line 124 of file EST_rw_status.h.

Possible outcomes of a network connection operation

Enumerator
connect_ok 

Connection made.

connect_not_found_error 

Connection failed.

connect_not_allowed_error 

Connection failed.

connect_system_error 

System failure of some kind.

connect_error 

The file was not written successfully.

Definition at line 136 of file EST_rw_status.h.