ftp_server.h

来自「test ftp server code for bluetooth」· C头文件 代码 · 共 73 行

H
73
字号
/****************************************************************************
Copyright (C) Cambridge Silicon Radio Ltd. 2004-2006
Part of BlueLab 3.6.2-release

FILE NAME
    ftp_server.h
    
DESCRIPTION
    Main header file for an FTP Server application.
*/

#ifndef FTPSERVER_H_
#define FTPSERVER_H_

#include <stream.h>

/* Button to shutdown the FTP Server */
#define BUTTON_SHUTDOWN (1<<3)

/* PSKEY to store the maximum packet size */
#define PSKEY_MAX_PACKET 10

/* Default maximum size of packet that this server can support */
#define FTPS_MAX_PACKET_SIZE 255

/* DEBUG Print support */
#ifdef FTPS_SVR_DEBUG
	#include <stdio.h>
	#define SVR_DEBUG(x) {printf("FTP: "); printf x;}
#else
	#define SVR_DEBUG(x)
#endif

#ifdef FTPS_CON_DEBUG
	#include <stdio.h>
	#define CON_DEBUG(x) {printf("CON: "); printf x;}
#else
	#define CON_DEBUG(x)
#endif

#if defined(FTPS_CON_DEBUG) || defined(FTPS_SVR_DEBUG) || defined(FTPS_GEN_DEBUG)
	#include <stdio.h>
	#define GEN_DEBUG(x) {printf x;}
#else
	#define GEN_DEBUG(x)
#endif

static const char folderFile[] = {"_dir.xml"};

typedef struct 
{
	TaskData FtpTask;
	FTPS *session;

	bool connected;
	bool shutdown;

	uint16 pktSize;

	Source fileSrc;
	FILE_INDEX currentDir;
} tFTPState;

typedef struct 
{
	TaskData ConTask;
} tMainState;

void ftp_initTask(tFTPState *state);

#endif /* FTPSERVER_H_ */

⌨️ 快捷键说明

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