From 1e598166446edd12daa519488aedfe7ced2004e2 Mon Sep 17 00:00:00 2001 From: Matthias Ringwald Date: Thu, 21 Jan 2016 14:42:13 +0100 Subject: [PATCH] ble: ancs_client_lib -> ancs_client, example: ancs_client -> ancs_client_demo --- doc/manual/update_apis.py | 2 +- example/embedded/Makefile.inc | 12 ++++++------ .../embedded/{ancs_client.c => ancs_client_demo.c} | 6 +++--- .../{ancs_client.gatt => ancs_client_demo.gatt} | 0 port/arduino/Makefile | 2 +- port/arduino/examples/ANCS/ANCS.ino | 2 +- port/libusb/.gitignore | 4 ++-- port/posix-cc2564b/.gitignore | 4 ++-- port/posix-csr/.gitignore | 4 ++-- port/posix-h4/.gitignore | 4 ++-- port/posix-stlc2500d/.gitignore | 4 ++-- port/posix-tc35661/.gitignore | 4 ++-- port/posix-wl183x/.gitignore | 4 ++-- src/ble/{ancs_client_lib.c => ancs_client.c} | 2 +- src/ble/{ancs_client_lib.h => ancs_client.h} | 4 ++-- tool/update_copyright.py | 2 +- 16 files changed, 30 insertions(+), 30 deletions(-) rename example/embedded/{ancs_client.c => ancs_client_demo.c} (98%) rename example/embedded/{ancs_client.gatt => ancs_client_demo.gatt} (100%) rename src/ble/{ancs_client_lib.c => ancs_client.c} (99%) rename src/ble/{ancs_client_lib.h => ancs_client.h} (97%) diff --git a/doc/manual/update_apis.py b/doc/manual/update_apis.py index 9411e5d7a..21a2fb529 100755 --- a/doc/manual/update_apis.py +++ b/doc/manual/update_apis.py @@ -9,7 +9,7 @@ class State: # [file_name, api_title, api_label] apis = [ ["src/ble/ad_parser.h", "BLE Advertisements Parser", "advParser"], - ["src/ble/ancs_client_lib.h", "BLE ANCS Client", "ancsClient"], + ["src/ble/ancs_client.h", "BLE ANCS Client", "ancsClient"], ["src/ble/att_db_util.h", "BLE ATT Database", "attDb"], ["src/ble/att_server.h", "BLE ATT Server", "attServer"], ["src/ble/gatt_client.h", "BLE GATT Client", "gattClient"], diff --git a/example/embedded/Makefile.inc b/example/embedded/Makefile.inc index d20c51700..bda4d9031 100644 --- a/example/embedded/Makefile.inc +++ b/example/embedded/Makefile.inc @@ -56,7 +56,7 @@ PAN += \ pan.c \ EXAMPLES = \ - ancs_client \ + ancs_client_demo \ gap_dedicated_bonding \ gap_inquiry \ gap_inquiry_and_bond \ @@ -75,7 +75,7 @@ EXAMPLES = \ hsp_hs_test \ EXAMPLES_USING_LE = \ - ancs_client \ + ancs_client_demo \ gatt_battery_query \ gatt_browser \ le_counter \ @@ -101,7 +101,7 @@ ${BTSTACK_ROOT}/src/btstack_version.h: # compile .gatt descriptions profile.h: profile.gatt python ${BTSTACK_ROOT}/tool/compile-gatt.py $< $@ -ancs_client.h: ancs_client.gatt +ancs_client_demo.h: ancs_client_demo.gatt python ${BTSTACK_ROOT}/tool/compile-gatt.py $< $@ spp_and_le_counter.h: spp_and_le_counter.gatt python ${BTSTACK_ROOT}/tool/compile-gatt.py $< $@ @@ -156,8 +156,8 @@ gatt_browser: ${CORE_OBJ} ${COMMON_OBJ} ${ATT_OBJ} ${GATT_CLIENT_OBJ} ${SM_REAL_ gatt_battery_query: ${CORE_OBJ} ${COMMON_OBJ} ${ATT_OBJ} ${GATT_CLIENT_OBJ} ${SM_REAL_OBJ} gatt_battery_query.c ${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@ -ancs_client: ancs_client.h ${CORE_OBJ} ${COMMON_OBJ} ${ATT_OBJ} ${GATT_SERVER_OBJ} ${GATT_CLIENT_OBJ} ${SM_REAL_OBJ} ancs_client_lib.c ancs_client.c - ${CC} $(filter-out ancs_client.h,$^) ${CFLAGS} ${LDFLAGS} -o $@ +ancs_client_demo: ancs_client_demo.h ${CORE_OBJ} ${COMMON_OBJ} ${ATT_OBJ} ${GATT_SERVER_OBJ} ${GATT_CLIENT_OBJ} ${SM_REAL_OBJ} ancs_client.c ancs_client_demo.c + ${CC} $(filter-out ancs_client_demo.h,$^) ${CFLAGS} ${LDFLAGS} -o $@ led_counter: ${CORE_OBJ} ${COMMON_OBJ} led_counter.c ${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@ @@ -172,7 +172,7 @@ clean: rm -f ${EXAMPLES} rm -f *.o *.out *.hex rm -f ${BTSTACK_ROOT}/src/btstack_version.h - rm -f ancs_client.h profile.h spp_and_le_counter.h + rm -f ancs_client_demo.h profile.h spp_and_le_counter.h rm -rf *.dSYM rm -rf ${BTSTACK_ROOT}/ble/*.o rm -rf ${BTSTACK_ROOT}/src/*.o diff --git a/example/embedded/ancs_client.c b/example/embedded/ancs_client_demo.c similarity index 98% rename from example/embedded/ancs_client.c rename to example/embedded/ancs_client_demo.c index 0534e40bb..17792e594 100644 --- a/example/embedded/ancs_client.c +++ b/example/embedded/ancs_client_demo.c @@ -61,15 +61,15 @@ #include "hci_dump.h" #include "l2cap.h" -#include "ble/ancs_client_lib.h" +#include "ble/ancs_client.h" #include "ble/att.h" #include "ble/att_server.h" #include "ble/gatt_client.h" #include "ble/le_device_db.h" #include "ble/sm.h" -// ancs client profile -#include "ancs_client.h" +// ancs client demo profile +#include "ancs_client_demo.h" const uint8_t adv_data[] = { // Flags general discoverable diff --git a/example/embedded/ancs_client.gatt b/example/embedded/ancs_client_demo.gatt similarity index 100% rename from example/embedded/ancs_client.gatt rename to example/embedded/ancs_client_demo.gatt diff --git a/port/arduino/Makefile b/port/arduino/Makefile index 1b371a11b..87eaf8276 100644 --- a/port/arduino/Makefile +++ b/port/arduino/Makefile @@ -12,7 +12,7 @@ ARCHIVE=btstack-arduino-${VERSION}.zip SRC_FILES = btstack_memory.c btstack_linked_list.c btstack_memory_pool.c run_loop.c SRC_FILES += hci_dump.c hci.c hci_cmd.c btstack_util.c l2cap.c BLE_FILES = ad_parser.c att.c att_server.c att_dispatch.c att_db_util.c le_device_db_memory.c gatt_client.c -BLE_FILES += sm.c ancs_client_lib.h ancs_client_lib.c +BLE_FILES += sm.c ancs_client.h ancs_client.c PORT_FILES = btstack-config.h bsp_arduino_em9301.cpp BTstack.cpp BTstack.h EMBEDDED_FILES = btstack_run_loop_embedded.c hci_transport_h4_embedded.c diff --git a/port/arduino/examples/ANCS/ANCS.ino b/port/arduino/examples/ANCS/ANCS.ino index cd4f71fac..0f1386d11 100644 --- a/port/arduino/examples/ANCS/ANCS.ino +++ b/port/arduino/examples/ANCS/ANCS.ino @@ -2,7 +2,7 @@ #include #include "ble/att_server.h" #include "ble/gatt_client.h" -#include "ancs_client_lib.h" +#include "ancs_client.h" #include "ble/sm.h" #include diff --git a/port/libusb/.gitignore b/port/libusb/.gitignore index 05c3cc477..8b4708729 100644 --- a/port/libusb/.gitignore +++ b/port/libusb/.gitignore @@ -1,5 +1,5 @@ -ancs_client -ancs_client.h +ancs_client_demo +ancs_client_demo.h ble_central_test ble_peripheral_test bnep_test diff --git a/port/posix-cc2564b/.gitignore b/port/posix-cc2564b/.gitignore index 1ba85a5d3..5791dc9c3 100644 --- a/port/posix-cc2564b/.gitignore +++ b/port/posix-cc2564b/.gitignore @@ -1,5 +1,5 @@ -ancs_client -ancs_client.h +ancs_client_demo +ancs_client_demo.h ble_central_test ble_peripheral ble_peripheral_sm_minimal diff --git a/port/posix-csr/.gitignore b/port/posix-csr/.gitignore index 506c45d91..5d44e3316 100644 --- a/port/posix-csr/.gitignore +++ b/port/posix-csr/.gitignore @@ -1,5 +1,5 @@ -ancs_client -ancs_client.h +ancs_client_demo +ancs_client_demo.h ble_central_test ble_peripheral ble_peripheral_sm_minimal diff --git a/port/posix-h4/.gitignore b/port/posix-h4/.gitignore index 1ba85a5d3..5791dc9c3 100644 --- a/port/posix-h4/.gitignore +++ b/port/posix-h4/.gitignore @@ -1,5 +1,5 @@ -ancs_client -ancs_client.h +ancs_client_demo +ancs_client_demo.h ble_central_test ble_peripheral ble_peripheral_sm_minimal diff --git a/port/posix-stlc2500d/.gitignore b/port/posix-stlc2500d/.gitignore index 8f62b0d6e..fb31501e8 100644 --- a/port/posix-stlc2500d/.gitignore +++ b/port/posix-stlc2500d/.gitignore @@ -1,5 +1,5 @@ -ancs_client -ancs_client.h +ancs_client_demo +ancs_client_demo.h ble_central_test ble_peripheral ble_peripheral_sm_minimal diff --git a/port/posix-tc35661/.gitignore b/port/posix-tc35661/.gitignore index 8f62b0d6e..fb31501e8 100644 --- a/port/posix-tc35661/.gitignore +++ b/port/posix-tc35661/.gitignore @@ -1,5 +1,5 @@ -ancs_client -ancs_client.h +ancs_client_demo +ancs_client_demo.h ble_central_test ble_peripheral ble_peripheral_sm_minimal diff --git a/port/posix-wl183x/.gitignore b/port/posix-wl183x/.gitignore index 4acaa2654..c213aea99 100644 --- a/port/posix-wl183x/.gitignore +++ b/port/posix-wl183x/.gitignore @@ -1,5 +1,5 @@ -ancs_client -ancs_client.h +ancs_client_demo +ancs_client_demo.h ble_central_test ble_peripheral ble_peripheral_sm_minimal diff --git a/src/ble/ancs_client_lib.c b/src/ble/ancs_client.c similarity index 99% rename from src/ble/ancs_client_lib.c rename to src/ble/ancs_client.c index 1b4c406f1..65d9c4a2d 100644 --- a/src/ble/ancs_client_lib.c +++ b/src/ble/ancs_client.c @@ -45,7 +45,7 @@ #include "btstack_run_loop.h" #include "classic/sdp_util.h" -#include "ancs_client_lib.h" +#include "ancs_client.h" #include "ble/att.h" #include "btstack_debug.h" diff --git a/src/ble/ancs_client_lib.h b/src/ble/ancs_client.h similarity index 97% rename from src/ble/ancs_client_lib.h rename to src/ble/ancs_client.h index 55de59499..fcb071f8d 100644 --- a/src/ble/ancs_client_lib.h +++ b/src/ble/ancs_client.h @@ -35,8 +35,8 @@ * */ -#ifndef __ANCS_CLIENT_LIB_H -#define __ANCS_CLIENT_LIB_H +#ifndef __ANCS_CLIENT_H +#define __ANCS_CLIENT_H #if defined __cplusplus extern "C" { diff --git a/tool/update_copyright.py b/tool/update_copyright.py index fbbf39122..855082440 100644 --- a/tool/update_copyright.py +++ b/tool/update_copyright.py @@ -46,7 +46,7 @@ copyrighters = ["BlueKitchen", "Matthias Ringwald"] ignoreFolders = ["cpputest", "test", "msp-exp430f5438-cc2564b", "msp430f5229lp-cc2564b", "ez430-rf2560", "ios", "chipset/cc256x", "docs", "mtk"] ignoreFiles = ["ant_cmds.h", "rijndael.c", "btstack-config.h", "btstack_version.h", "profile.h", "bluetoothdrv.h", - "ancs_client.h", "spp_and_le_counter.h", "bluetoothdrv-stub.c", "minimal_peripheral.c", "BTstackDaemonRespawn.c"] + "ancs_client_demo.h", "spp_and_le_counter.h", "bluetoothdrv-stub.c", "minimal_peripheral.c", "BTstackDaemonRespawn.c"] class State: SearchStartComment = 0