⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sdp_parser.h

📁 linux系统下的关于蓝牙模块的源代码!十分的经典的程序!
💻 H
字号:
/* * sdp_parser.h -- Exported functions from the file sdp_parser.c * * Copyright (C) 2000, 2001  Axis Communications AB * * Author: Mats Friden <mats.friden@axis.com> * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program 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 General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA. * * Exceptionally, Axis Communications AB grants discretionary and * conditional permissions for additional use of the text contained * in the company's release of the AXIS OpenBT Stack under the * provisions set forth hereunder. * * Provided that, if you use the AXIS OpenBT Stack with other files, * that do not implement functionality as specified in the Bluetooth * System specification, to produce an executable, this does not by * itself cause the resulting executable to be covered by the GNU * General Public License. Your use of that executable is in no way * restricted on account of using the AXIS OpenBT Stack code with it. * * This exception does not however invalidate any other reasons why * the executable file might be covered by the provisions of the GNU * General Public License. * * $Id: sdp_parser.h,v 1.7 2001/09/19 09:49:16 pkj Exp $ * */#ifndef SDP_PARSER_H#define SDP_PARSER_H/****************** INCLUDE FILES SECTION ***********************************//****************** CONSTANT AND MACRO SECTION ******************************/#define SDP_XML_FILE "/etc/sdp.xml"#ifndef BTD_USERSTACK#define SDP_PROC_FILE "/proc/sdp_srv"#else#define SDP_PROC_FILE "/tmp/sdp_sock"#endif#ifndef TRUE#define TRUE 1#endif#ifndef FALSE#define FALSE 0#endif#define MIN(a,b) ((a) < (b) ? (a) : (b))#define MAX(a,b) ((a) > (b) ? (a) : (b))#define CHAR2INT10(c1,c0) (((unsigned int)((c1) & 0x03) << 8) + \			   (unsigned int)((c0) & 0xff))#define CHAR2INT12(c1,c0) (((unsigned int)((c1) & 0x0f) << 8) + \			   (unsigned int)((c0) & 0xff))#define CHAR2INT16(c1,c0) (((unsigned int)((c1) & 0xff) << 8) + \			   (unsigned int)((c0) & 0xff))#define CHAR2INT32(c3,c2,c1,c0) (((unsigned int)((c3) & 0xff) << 24) + \				 ((unsigned int)((c2) & 0xff) << 16) + \				 ((unsigned int)((c1) & 0xff) << 8) + \				 (unsigned int)((c0) &0xff))#define SDP_INVALID_SDP_VERSION           0x0001#define SDP_INVALID_SERVICE_RECORD_HANDLE 0x0002#define SDP_INVALID_REQUEST_SYNTAX        0x0003#define SDP_INVALID_PDU_SIZE              0x0004#define SDP_INVALID_CONTINUATION_STATE    0x0005#define SDP_INSUFFICIENT_RESOURCES        0x0006/****************** TYPE DEFINITION SECTION *********************************/typedef struct data_struct {  unsigned short l2cap_mtu;  unsigned short sdp_con_id;  unsigned short len;  unsigned char data[0];} __attribute__ ((packed)) data_struct;/****************** EXPORTED FUNCTION DECLARATION SECTION *******************/void write2stack(int sdp_con_id, char *data, int len);#endif/****************** END OF FILE sdp_parser.h ********************************/

⌨️ 快捷键说明

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