/*
 *              Copyright (C) 2005, BroadOn Communications Corp.
 *
 * These coded instructions, statements, and computer programs contain
 * unpublished  proprietary information of BroadOn Communications Corp.,
 * and  are protected by Federal copyright law. They may not be disclosed
 * to  third  parties or copied or duplicated in any form, in whole or in
 * part, without the prior written consent of BroadOn Communications Corp.
 *
 */

#ifndef SHELL_CMD_H
#define SHELL_CMD_H

#define USB_BUF_SIZE      16384
#define USB_BIG_BUF_SIZE  (480*1024) 
#define MAX_PATH_SIZE     2048
#define MAX_CMD_SIZE      64

extern u8 *usbBuf0, *usbBuf1, *shellPwd, *shellTmp, *shellTmp1;
IOSMessageQueueId usbMq;
IOSResourceRequest *usbReq1, *usbReq2;

int proceedShellCmd(int fd);
IOSError reliableRead(IOSFd fd, u8* buf, int len);

IOSError shellCD(IOSFd fd, int plen);
IOSError shellDiag(IOSFd fd, char type, int param);
IOSError shellFormat();
IOSError shellLs(IOSFd fd, int plen, u8 *buf, int *retLen);
IOSError shellMkdir(IOSFd fd, int plen);
IOSError shellRm(IOSFd fd, int plen);
IOSError shellMv(IOSFd fd, int plen);
IOSError shellPut(IOSFd fd, int plen);
IOSError shellGet(IOSFd fd, int plen);
IOSError shellLaunch(IOSFd fd, int plen);
IOSError shellCp(IOSFd fd, int plen);
IOSError shellCmdCp(u8 *path, u8 *nPath);
IOSError shellWriteboot(IOSFd fd, int boot, int bootLen);
IOSError shellReadboot(IOSFd fd, int boot);
IOSError shellImport(IOSFd fd, int plen);
int shellReadId(IOSFd fd, u8 *buf);
IOSError shellProgId(IOSFd fd, int plen);
IOSError shellUsage(u32 flags);

IOSError shellKpTest(int wh);
IOSError shellKpReadTest(char *d);

IOSError shellGetDate(char *d);
IOSError shellSetDate(char *d);

//ESError import(const char* name);

#ifdef SPRINTF
int usbPrintf(char *msg, ...);
#else
int usbPrintf(char *msg);
#endif

#endif
