/* Generated by Ctran from tlvfile.cat */
#define TLVFILE_G
#ifndef APPMAN_G
#include <appman.g>
#endif
#ifndef P_FILE_H
#include <p_file.h>
#endif
#ifndef P_SERIAL_H
#include <p_serial.h>
#endif
#ifndef P_MODEM_H
#include <p_modem.h>
#endif
/* Class Numbers */
#define C_BFILE 45
#define C_TLVFILE 46
#define C_TLVDATA 47
#define C_SERFILE 48
#define C_PRINT 49
#define C_SERIAL 50
/* Method Numbers */
#define O_TD_SAVE_ITEM 5
#define O_TD_SENSE_ITEM 9
#define O_FL_SET_BUF_LEN 3
#define O_FL_SENSE_REC 12
#define O_FL_REPLACE 13
#define O_FL_DELREC 8
#define O_TD_SET_ITEM 8
#define O_TD_SAVE 2
#define O_TD_OPEN 1
#define O_FI_OPEN 5
#define O_FL_SET_REC 11
#define O_FL_WRITE_REC 7
#define O_SR_FLUSH 10
#define O_TD_LOAD_ITEM 4
#define O_FI_CLOSE 1
#define O_TD_SET_FILE 7
#define O_TD_CHANGED 3
#define O_FI_READ 2
#define O_FL_SENSE_DATA 4
#define O_FL_REWIND 6
#define O_SR_CONTROL 11
#define O_FL_COUNT 9
#define O_SR_SENSE 9
#define O_SR_ENQUIRE 12
#define O_TD_RESET 6
#define O_SR_GRAB 13
#define O_PR_GET_DATA 6
#define O_FL_READ_BY_TYPE 10
#define O_SR_TEST 7
#define O_SR_SET 8
#define O_SR_WRITE 6
/* Constants for bfile */
#define OP_BFILE_ID_SIZE 16
/* Types for bfile */
typedef struct
{
char fid[OP_BFILE_ID_SIZE];
unsigned short int vers;
unsigned short int offset;
unsigned short int rtvers;
} OP_BFILE_FSIG;
/* Property of bfile */
typedef struct {
unsigned char *pcb;
unsigned char *rbuf;
unsigned short int rlen;
unsigned short int offset;
} PRS_BFILE;
typedef struct pr_bfile
{
PRS_ROOT root;
PRS_BFILE bfile;
} PR_BFILE;
/* Constants for tlvfile */
#define TLV_TYPE_UNKNOWN 0x10
#define TLV_TYPE_INVALID 0x0f
#define TLV_TYPE_DELETED 0x00
#define TLV_TYPE_NORMAL 0x01
#define TLV_TYPE_FIELDS 0x02
#define TLV_TYPE_SHIFT 12
#define TLV_TYPE_MASK 0xf000
/* Types for tlvfile */
typedef struct
{
OP_BFILE_FSIG fsig;
unsigned short int types;
} OP_TLVFILE;
typedef struct
{
unsigned char *buf;
unsigned int len;
int type;
} OP_TLV_REC;
/* Property of tlvfile */
typedef struct {
unsigned short int typmask;
unsigned short int hdlen;
unsigned short int hdtype;
unsigned long int pos;
unsigned long int fpos;
} PRS_TLVFILE;
typedef struct pr_tlvfile
{
PRS_ROOT root;
PRS_BFILE bfile;
PRS_TLVFILE tlvfile;
} PR_TLVFILE;
/* Types for tlvdata */
typedef struct
{
OP_TLVFILE tlvfile;
char ext[6];
} PR_TLVDATA_CHARS;
/* Property of tlvdata */
typedef struct {
PR_TLVFILE *tlv;
unsigned short int cl_tlv;
unsigned short int changed;
short int index;
short int tmask;
char name[P_FNAMESIZE];
} PRS_TLVDATA;
typedef struct pr_tlvdata
{
PRS_ROOT root;
PRS_TLVDATA tlvdata;
} PR_TLVDATA;
/* Constants for serfile */
#define TE_MASK_SERIAL 0x0001
#define TE_MASK_MODEM 0x0002
#define TE_MASK_FILE 0x0004
#define TY_SERFILE_SERIAL 1
#define OBSOLETE_SERFILE_MODEM 2
#define TY_SERFILE_FILE 3
#define TY_SERFILE_NEW_MODEM 4
#define TY_SERFILE_SERDVR 5
#define TY_SERFILE_LNKDVR 6
#define TE_XMDM_NONE 3
#define TE_DIAL_PULSE 1
#define TE_DIAL_TONE 2
#define TE_MODEM_300 0x01
#define TE_MODEM_1200 0x02
#define TE_MODEM_2400 0x03
#define TE_MODEM_4800 0x04
#define TE_MODEM_9600 0x05
#define TE_MODEM_19200 0x06
#define MAX_DEVICE_NAME 10
#define MAX_MODEM_CMD 40
/* Types for serfile */
typedef struct
{
P_SRCHAR ch;
char port[P_MAXDEVNAME+2];
} PF_SERIAL;
typedef struct
{
P_MDMCHR mch;
unsigned char phone[25];
unsigned char auto_dial;
unsigned char mdmdvr[MAX_DEVICE_NAME];
unsigned char mdmcmd[MAX_MODEM_CMD];
unsigned char spare[16];
} PF_MODEM;
typedef struct
{
unsigned short int protocol;
} PF_FILE;
typedef struct
{
P_SRCHAR ch;
unsigned char serdvr[MAX_DEVICE_NAME];
unsigned char spare[16];
} PF_SERDVR;
typedef struct
{
unsigned char masdvr[MAX_DEVICE_NAME];
unsigned char lnkdvr[MAX_DEVICE_NAME];
unsigned char spare[16];
} PF_LNKDVR;
/* Property of serfile */
typedef struct {
PF_SERIAL serial;
PF_MODEM modem;
PF_FILE file;
PF_LNKDVR lnkdvr;
PF_SERDVR serdvr;
} PRS_SERFILE;
typedef struct pr_serfile
{
PRS_ROOT root;
PRS_TLVDATA tlvdata;
PRS_SERFILE serfile;
} PR_SERFILE;
/* Constants for print */
#define PRINT_DATA 0x0
#define PRINT_LINE 0x1
#define PRINT_FINISH 0x8
/* Types for print */
typedef struct
{
unsigned char *buf;
unsigned short int len;
unsigned short int status;
} PRINT_STATE;
/* Property of print */
typedef struct {
PRINT_STATE state;
unsigned char crlf[2];
} PRS_PRINT;
typedef struct pr_print
{
PRS_ROOT root;
PRS_ACTIVE active;
PRS_PRINT print;
} PR_PRINT;
/* Constants for serial */
#define READ_QUEUED 0x01
#define WRITE_QUEUED 0x02
/* Property of serial */
typedef struct {
unsigned short int flags;
short int rstat;
short int wstat;
unsigned short int rlen;
unsigned char *rbuf;
unsigned short int wlen;
unsigned char *wbuf;
unsigned short int rsize;
unsigned short int wsize;
} PRS_SERIAL;
typedef struct pr_serial
{
PRS_ROOT root;
PRS_ACTIVE active;
PRS_SERIAL serial;
} PR_SERIAL;
