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

📄 obexsender.hh

📁 It s a tool designed to extract as much information as possible from Bluetooth devices without the r
💻 HH
字号:
/* -*- c++ -*- ---------------------------------------------------------------   Copyright (C) 2005, SWECO, All Rights Reserved.   OBEX message sender implementation, based on Pontus Fuchs's obex code   <pontus.fuchs@tactel.se>   $Id$   Author: Zsolt Molnar (Zsolt.Molnar@ieee.org)   ---------------------------------------------------------------------------*/#ifndef __OBEXSENDER_HH__#define __OBEXSENDER_HH__#include <pthread.h>#include <map>#include "base.hh"#include "IError.hh"#include "IOBEXSender.hh"#define OS_BUSY_WAIT_TIME 1   // second#ifdef _cplusplusextern "C" {#endifclass OBEXSender : virtual public IOBEXSender {public:	typedef map<pthread_t, int> _tErrMap;	static _tErrMap _errMap;public:	OBEXSender();	virtual ~OBEXSender() {};	virtual tSendState send(const string& aFileName, const string& aTitle);	virtual void setPort(const string& aPort) {_port = aPort;};private:	string _port;	static pthread_mutex_t _mapMutex;	static bool _isInit;	#ifdef __TEST__public:		bool test(const Device& dev);#endif // #ifdef __TEST__};// Errors// No target device setclass OBEXSender_NoTargetError : virtual public IError {public:		OBEXSender_NoTargetError() {};	virtual ~OBEXSender_NoTargetError() {};	virtual void print(ostream& aStream) 		{			aStream << "OBEXSender: no push target device set";		};		virtual tType getType() {return FATAL;};};// File not foundclass OBEXSender_NoFileError : virtual public IError {public:		OBEXSender_NoFileError(const string& aFileName) : _fname(aFileName) {};	virtual ~OBEXSender_NoFileError() {};	virtual void print(ostream& aStream) 		{			aStream << "OBEXSender: Message file \"" << _fname 					<< "\" is not found";		};		virtual tType getType() {return RECOVERABLE;};private:	string _fname;};#ifdef _cplusplus}#endifextern "C" {    // For error related communication with obex_socket	int* __eebt_getErrLocation(const pthread_t aThread);}#endif /* #ifndef __OBEXSENDER_HH__ */   

⌨️ 快捷键说明

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