BluetoothClient.h

Go to the documentation of this file.
00001 #ifndef _OASYS_BT_CLIENT_H_
00002 #define _OASYS_BT_CLIENT_H_
00003 
00004 #include <config.h> 
00005 #ifdef OASYS_BLUETOOTH_ENABLED
00006 
00007 #include "BluetoothSocket.h"
00008 #include "../io/IOClient.h"
00009 
00010 namespace oasys {
00011 
00015 class BluetoothClient : public BluetoothSocket, public IOClient {
00016 public:
00017     BluetoothClient(int socktype, BluetoothSocket::proto_t proto,
00018                     const char* logbase, Notifier* intr=0);
00019     BluetoothClient(int socktype, BluetoothSocket::proto_t proto, int fd,
00020                     bdaddr_t remote_addr, u_int8_t remote_channel,
00021                     const char* logbase,Notifier* intr=0);
00022     virtual ~BluetoothClient();
00023     
00024     // Virtual from IOClient
00025     virtual int read(char* bp, size_t len);
00026     virtual int write(const char* bp, size_t len);
00027     virtual int readv(const struct iovec* iov, int iovcnt);
00028     virtual int writev(const struct iovec* iov, int iovcnt);
00029     
00030     virtual int readall(char* bp, size_t len);
00031     virtual int writeall(const char* bp, size_t len);
00032     virtual int readvall(const struct iovec* iov, int iovcnt);
00033     virtual int writevall(const struct iovec* iov, int iovcnt);
00034     
00035     virtual int timeout_read(char* bp, size_t len, int timeout_ms);
00036     virtual int timeout_readv(const struct iovec* iov, int iovcnt,
00037                               int timeout_ms);
00038     virtual int timeout_readall(char* bp, size_t len, int timeout_ms);
00039     virtual int timeout_readvall(const struct iovec* iov, int iovcnt,
00040                                  int timeout_ms);
00041 
00042     virtual int timeout_write(const char* bp, size_t len, int timeout_ms);
00043     virtual int timeout_writev(const struct iovec* iov, int iovcnt,
00044                                int timeout_ms);
00045     virtual int timeout_writeall(const char* bp, size_t len, int timeout_ms);
00046     virtual int timeout_writevall(const struct iovec* iov, int iovcnt,
00047                                   int timeout_ms);
00048 
00049     virtual int get_nonblocking(bool *nonblockingp);
00050     virtual int set_nonblocking(bool nonblocking);
00051 };
00052 
00053 } // namespace oasys
00054 
00055 #endif /* OASYS_BLUETOOTH_ENABLED */
00056 #endif /* _OASYS_BT_CLIENT_H_ */

Generated on Fri Dec 22 14:47:57 2006 for DTN Reference Implementation by  doxygen 1.5.1