4S Device Communication Module Collection  Version 0.6-SNAPSHOT
Full documentation of the modules in the 4SDC collection (aimed at 4SDC module developers)
bluez.h
Go to the documentation of this file.
1 /*
2  * Copyright 2014-2015 The 4S Foundation (www.4s-online.dk)
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
40 #ifndef BLUEZ_H
41 #define BLUEZ_H
42 
44 #include "FSYS/basemsg.h"
45 #include "FSYS/msgreceiver.h"
46 #include "4SDC/core.h"
47 
48 
49 #if 0
50 class Terminate : public FSYS::BaseMsg {}; // FIXME Temporary - delete-me...
51 
52 
68 class BluezBluetoothModule : public PAL::PHDBluetoothProvider,
69  public FSYS::MsgReceiver<BluezBluetoothModule, Terminate> {
70 
71 public:
72 
83  BluezBluetoothModule();
84 
88  ~BluezBluetoothModule();
89 
101  void receive(Terminate signal);
102 
103 
104 
105  /* ************************************************************ */
106  /* PHDBluetoothProvider (communicating with HDP devices) */
107  /* ************************************************************ */
108 
119  void registerDatatype(uint16_t datatype) noexcept;
120 
131  void unregisterDatatype(uint16_t datatype) noexcept;
132 
144  void sendApduPrimary(std::shared_ptr<PAL::VirtualPHD> device,
145  std::shared_ptr<std::vector<uint8_t> > apdu) noexcept;
146 
157  void sendApduStreaming(std::shared_ptr<PAL::VirtualPHD> device,
158  std::shared_ptr<std::vector<uint8_t> > apdu) noexcept;
159 
169  void disconnect(std::shared_ptr<PAL::VirtualPHD> device) noexcept;
170 
171 private:
172  // The internal parts of this class
173  class PrivateBluez;
174  friend class PrivateBluez;
175  PrivateBluez *privateParts;
176 
177 };
178 
179 #endif // BLUEZ_H
180 #endif
PAL layer interface for personal health device communication.
Contains interface declaration for the FSYS::MsgReceiver class.
Template class allowing other classes to receive messages.
Definition: msgreceiver.h:78
The BaseMsg class is the base class for all messages.
Definition: basemsg.h:54
Interface file for the 4SDC.
STL namespace.
Definition: android.h:45
Contains interface declaration for the FSYS::BaseMsg class.
Bluetooth specialisation of the PersonalHealthDeviceProviderBase.
Definition: personalhealthdevice.h:721