obex.h
来自「sparc硬件平台上的红外协议」· C头文件 代码 · 共 92 行
H
92 行
/* * * OpenOBEX - Free implementation of the Object Exchange protocol * * Copyright (C) 1999-2000 Dag Brattli <dagb@cs.uit.no> * Copyright (C) 1999-2000 Pontus Fuchs <pontus.fuchs@tactel.se> * Copyright (C) 2001-2002 Jean Tourrilhes <jt@hpl.hp.com> * Copyright (C) 2002-2006 Marcel Holtmann <marcel@holtmann.org> * * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * */#ifndef __OBEX_H#define __OBEX_H#include "obex_main.h"#include "types.h"/* Hum... This would need to be autogenerated from configure, * I hate hardcoding version numbers. Jean II */#define OPENOBEX_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))// These are also defined in obex_main.h// They are defined here otherwise any app including it// would require obex_main.h which includes a lot of other // unnecessary stuff.typedef void* obex_th;typedef void* obex_object_th;typedef void (*obex_event_th)(obex_th *handle, obex_object_th *obj, int mode, int event, int obex_cmd, int obex_rsp);#include "obex_const.h"/* * OBEX API */obex_t *OBEX_Init(int transport, obex_event_t eventcb, unsigned int flags);void OBEX_Cleanup(obex_t *self);void OBEX_SetUserData(obex_t *self, void * data);void * OBEX_GetUserData(obex_t *self);int OBEX_TransportDisconnect(obex_t *self);int OBEX_HandleInput(obex_t *self, int timeout);int OBEX_Request(obex_t *self, obex_object_t *object);obex_object_t *OBEX_ObjectNew(obex_t *self, uint8_t cmd);int OBEX_ObjectDelete(obex_t *self, obex_object_t *object);int OBEX_ObjectAddHeader(obex_t *self, obex_object_t *object, uint8_t hi, obex_headerdata_t hv, uint32_t hv_size, unsigned int flags);int OBEX_ObjectGetNextHeader(obex_t *self, obex_object_t *object, uint8_t *hi, obex_headerdata_t *hv, uint32_t *hv_size);int OBEX_ObjectReParseHeaders(obex_t *self, obex_object_t *object);int OBEX_ObjectSetRsp(obex_object_t *object, uint8_t rsp, uint8_t lastrsp);int OBEX_ObjectGetNonHdrData(obex_object_t *object, uint8_t **buffer);int OBEX_ObjectReadStream(obex_t *self, obex_object_t *object, const uint8_t **buf);int OBEX_UnicodeToChar(uint8_t *c, const uint8_t *uc, int size);int OBEX_CharToUnicode(uint8_t *uc, const uint8_t *c, int size);/* * IrOBEX API */ int IrOBEX_ServerRegister(obex_t *self, const char *service); int IrOBEX_TransportConnect(obex_t *self, const char *service);#endif /* __OBEX_H */
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?