summaryrefslogtreecommitdiffstats
path: root/src/BluetoothEvent.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/BluetoothEvent.cpp')
-rw-r--r--src/BluetoothEvent.cpp29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/BluetoothEvent.cpp b/src/BluetoothEvent.cpp
new file mode 100644
index 00000000..4a92880f
--- /dev/null
+++ b/src/BluetoothEvent.cpp
@@ -0,0 +1,29 @@
+#include "BluetoothEvent.hpp"
+
+void BluetoothEvent::generic_callback(BluetoothObject &object, void *data)
+{
+}
+
+BluetoothEvent::BluetoothEvent(BluetoothType type, std::string *name,
+ std::string *identifier, BluetoothObject *parent,
+ BluetoothCallback cb, void *data)
+{
+ this->type = type;
+ if (name != NULL)
+ this->name = new std::string(*name);
+ else
+ this->name = NULL;
+
+ if (identifier != NULL)
+ this->identifier = new std::string(*identifier);
+ else
+ this->identifier = NULL;
+
+ if (parent != NULL)
+ this->parent = parent->clone();
+ else
+ this->parent = NULL;
+
+ this->cb = cb;
+ this->data = data;
+}