dsc.h

来自「AMLOGIC DPF source code」· C头文件 代码 · 共 107 行

H
107
字号
#ifndef _DSC_H_
#define _DSC_H_

#define MAX_PRINT_FILES		16

/*----------- Message to UI -----------------*/
#define PM_CONNECT		1
#define PM_DISCONNECT	2
#define PM_WAITING		3
#define PM_PRINTING	4
#define PM_PROGRESS	5
#define PM_FINISHED		6
#define PM_WARNING		7
#define PM_ERROR		8
#define PM_FILEERROR	9

/* Message arguments */
#define PFINISH_NORMAL	0x1001
#define PFINISH_ABORT	0x1002
#define PFINISH_CANCEL	0x1003
#define PFINISH_NOFIN	0x1004

#define PERR_UNKNOWN	0x1010
#define PERR_ERROR		0x1011
#define PERR_TIMEOUT	0x1021
#define PERR_NOMEM		0x1022
#define PERR_NOCONN	0x1023
#define PERR_PRINTING	0x1024
#define PERR_BUSY		0x1025
#define PERR_OPEN		0x1026
#define PERR_READ		0x1027
#define PERR_WRITE		0x1028

/*-----------------------------------------*/
enum capaType_e {

	CAPA_QUALITIES=0,
	CAPA_PAPERSIZES,		
	CAPA_PAPERTYPES,		
	CAPA_FILETYPES	,			
	CAPA_DATEPRINTS,		
	CAPA_FILENAMEPRINTS,
	CAPA_IMAGEOPTIMIZES,		
	CAPA_LAYOUTS	,		
	CAPA_FIXEDSIZES,	
	CAPA_CROPPINGS,
	CAPA_CNT
};

typedef struct dscPrintInfo_s{
	int 			copies;
	const char *	croppingArea;
	const char * 	filePath;
	const char * 	fileName;
	const char * 	date;
}dscPrintInfo_t;

typedef struct dscPrintMessage_s{
	int		msg;
	int		arg1;
	int		arg2;
	void	*	parg;
}dscPrintMessage_t;

void dscDevDisconnect(void);
void dscDev_reset(void);

int dscStartJob(void *file_set, int num, int is_fixedsize);
int dscAbortJob(void *p1, int p2, int p3);
int dscContinueJob(void *p1, int p2, int p3);
int dscCfgPrintService(void *p1, int p2, int p3);
int dscGetCapability(void *p1, int capability, int p3);
int dscGetDevStatus(void *p1, int p2, int p3);
int dscGetJobStatus(void *p1, int p2, int p3);
int dscShowPrinterCapability(int capa,int item);
int dscSetJobConfigCapa(int capa,int code);

int dscIsPrinterAvailable(void);
int dscIsNewJobOK(void);
int dscIsPrinterIdle(void);
int dscIsCmdError(void);

/*
	PictBridge User Interface
*/

#define NM_PRINTER_CONNECT 			0x031C
#define NM_PRINTER_UN_PLUG			0x031D
#define NM_PRINTER_JOB_START			0x031E
#define NM_PRINTER_JOB_CANCEL			0x031F
#define NM_PRINTER_JOB_END			0x0320
#define NM_PRINTER_JOB_PROCESS		0x0321
#define NM_PRINTER_JOB_ERROR			0x0322

int PrinterIsAvailable(void);
int PrinterNewJobOK(void);
int PrinterIsIdle(void);
	
int PrinterGetPrinterCapability(int capa,int item);
int PrinterChangeJobConfig(int capa,int code);

int PrinterStartPrint(dscPrintInfo_t * pset,int n);
int PrinterAbortPrint(int jobid);
int PrinterContinuePrint(int jobid);

#endif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?