opp_file.h
来自「AMLOGIC DPF source code」· C头文件 代码 · 共 42 行
H
42 行
#ifndef __BTOPP_FILE_H
#define __BTOPP_FILE_H
#include "../bt_api.h"
#define file_malloc bt_malloc
#define file_free bt_free
#define BT_OPP_BUFFER_SIZE (BT_OBEX_MTU*10)
#define BT_OPP_TIMEOUT (OS_TICKS_PER_SEC*30)
typedef struct _BTOpp_File
{
BT_OPP_Handle_t handle;
link_buff_head_t *link_buf;
char *file_name;
unsigned long file_length;
long file_offset;
link_buff_t *cur_lkb;
long cur_lkb_offset;
long cur_buf_used;
unsigned long read_ahead_len;
bt_request_t read_req;
int read_pending;
} BTOpp_File_t;
extern link_buff_head_t *bt_opp_get_file_asyn(BT_OPP_Handle_t opp_handle, char *file_name, obex_file_cb_t obex_file_cb);
extern void bt_opp_set_finish_flag(BT_OPP_Handle_t opp_handle, int finish_flag);
extern int bt_opp_transfer_receiving(BT_OPP_Handle_t opp_handle);
extern int bt_opp_transfer_suspend(BT_OPP_Handle_t opp_handle);
extern int bt_opp_transfer_resume(BT_OPP_Handle_t opp_handle);
extern int bt_opp_transfer_abort(BT_OPP_Handle_t opp_handle);
BTOpp_File_t *btopp_file_open(char *name, unsigned arg, unsigned context);
int btopp_file_close(BTOpp_File_t *opp_file);
int btopp_file_get_data(BTOpp_File_t *opp_file, void *buf, unsigned size);
int btopp_file_seek(BTOpp_File_t *opp_file, long offset, int fromwhere);
#endif //__BTOPP_FILE_H
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?