From 57c89c85fab1eb1b46809f1607457bf41f16bf6d Mon Sep 17 00:00:00 2001 From: hathach Date: Sat, 14 Oct 2017 23:45:58 +0700 Subject: [PATCH] adding HAP Char --- libraries/BLEHomekit/BLEHomekit.h | 2 +- libraries/BLEHomekit/HAPCharacteristic.cpp | 38 ++++++++++++++++ libraries/BLEHomekit/HAPCharacteristic.h | 43 +++++++++++++++++++ libraries/BLEHomekit/{HapUuid.h => HAPUuid.h} | 2 +- libraries/BLEHomekit/HapAccessoryInfo.cpp | 2 +- 5 files changed, 84 insertions(+), 3 deletions(-) create mode 100644 libraries/BLEHomekit/HAPCharacteristic.cpp create mode 100644 libraries/BLEHomekit/HAPCharacteristic.h rename libraries/BLEHomekit/{HapUuid.h => HAPUuid.h} (99%) diff --git a/libraries/BLEHomekit/BLEHomekit.h b/libraries/BLEHomekit/BLEHomekit.h index df14c9ff..8a305bf8 100644 --- a/libraries/BLEHomekit/BLEHomekit.h +++ b/libraries/BLEHomekit/BLEHomekit.h @@ -36,7 +36,7 @@ #ifndef BLEHOMEKIT_H_ #define BLEHOMEKIT_H_ -#include "HapUuid.h" +#include "HAPUuid.h" #include "HapAccessoryInfo.h" enum diff --git a/libraries/BLEHomekit/HAPCharacteristic.cpp b/libraries/BLEHomekit/HAPCharacteristic.cpp new file mode 100644 index 00000000..71708567 --- /dev/null +++ b/libraries/BLEHomekit/HAPCharacteristic.cpp @@ -0,0 +1,38 @@ +/**************************************************************************/ +/*! + @file HAPCharacteristic.cpp + @author hathach + + @section LICENSE + + Software License Agreement (BSD License) + + Copyright (c) 2017, Adafruit Industries (adafruit.com) + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 3. Neither the name of the copyright holders nor the + names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ''AS IS'' AND ANY + EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ +/**************************************************************************/ + + + diff --git a/libraries/BLEHomekit/HAPCharacteristic.h b/libraries/BLEHomekit/HAPCharacteristic.h new file mode 100644 index 00000000..dc53f4e5 --- /dev/null +++ b/libraries/BLEHomekit/HAPCharacteristic.h @@ -0,0 +1,43 @@ +/**************************************************************************/ +/*! + @file HAPCharacteristic.h + @author hathach + + @section LICENSE + + Software License Agreement (BSD License) + + Copyright (c) 2017, Adafruit Industries (adafruit.com) + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 3. Neither the name of the copyright holders nor the + names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ''AS IS'' AND ANY + EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ +/**************************************************************************/ +#ifndef HAPCHARACTERISTIC_H_ +#define HAPCHARACTERISTIC_H_ + +#include + +class HAPCharacteristic + +#endif /* HAPCHARACTERISTIC_H_ */ diff --git a/libraries/BLEHomekit/HapUuid.h b/libraries/BLEHomekit/HAPUuid.h similarity index 99% rename from libraries/BLEHomekit/HapUuid.h rename to libraries/BLEHomekit/HAPUuid.h index 6567e614..59337e7a 100644 --- a/libraries/BLEHomekit/HapUuid.h +++ b/libraries/BLEHomekit/HAPUuid.h @@ -1,6 +1,6 @@ /**************************************************************************/ /*! - @file HapUuid.h + @file HAPUuid.h @author hathach @section LICENSE diff --git a/libraries/BLEHomekit/HapAccessoryInfo.cpp b/libraries/BLEHomekit/HapAccessoryInfo.cpp index 44632879..8fafd2bc 100644 --- a/libraries/BLEHomekit/HapAccessoryInfo.cpp +++ b/libraries/BLEHomekit/HapAccessoryInfo.cpp @@ -35,7 +35,7 @@ /**************************************************************************/ #include -#include "HapUuid.h" +#include "HAPUuid.h" #include "HapAccessoryInfo.h" HAPAccessoryInfo::HAPAccessoryInfo(void)