00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef _BLUETOOTH_ANNOUNCE_H_
00018 #define _BLUETOOTH_ANNOUNCE_H_
00019
00020 #ifndef DTN_CONFIG_STATE
00021 #error "MUST INCLUDE dtn-config.h before including this file"
00022 #endif
00023
00024 #ifdef OASYS_BLUETOOTH_ENABLED
00025
00026 #include <oasys/bluez/BluetoothSDP.h>
00027 #include "Announce.h"
00028
00029 namespace dtn {
00030
00036 class BluetoothAnnounce : public Announce
00037 {
00038 public:
00043 size_t format_advertisement(u_char*,size_t);
00044
00045 void reset_interval() { ::gettimeofday(&data_sent_,0); }
00046
00047 virtual ~BluetoothAnnounce() {}
00048
00049 protected:
00050 friend class Announce;
00051
00052 BluetoothAnnounce();
00053
00054 bool configure(const std::string& name, ConvergenceLayer* cl,
00055 int argc, const char* argv[]);
00056
00057 bdaddr_t cl_addr_;
00058 u_int8_t cl_channel_;
00059 oasys::BluetoothServiceRegistration sdp_reg_;
00060 };
00061
00062 }
00063
00064 #endif // OASYS_BLUETOOTH_ENABLED
00065 #endif // _BLUETOOTH_ANNOUNCE_H_