1 // 2 // Copyright (C) 2015 Google, Inc. 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 17 #pragma once 18 19 #include <stdio.h> 20 #include <stdbool.h> 21 #include <string.h> 22 23 #include <base/logging.h> 24 #include <hardware/bluetooth.h> 25 #include <hardware/bt_gatt.h> 26 #include <hardware/bt_pan.h> 27 #include <hardware/bt_sock.h> 28 #include <base/macros.h> 29 30 namespace sl4n { 31 const char kCmdStr[] = "cmd"; 32 const char kDeviceNameStr[] = "deviceName"; 33 const char kErrorStr[] = "error"; 34 const char kFailStr[] = "fail"; 35 const char kInvalidParamStr[] = "Invalid parameter"; 36 const char kMethodStr[] = "method"; 37 const char kParamsStr[] = "params"; 38 const char kResultStr[] = "result"; 39 const char kStatusStr[] = "status"; 40 const char kSuccessStr[] = "success"; 41 const char kTagStr[] = "SL4N"; 42 const int kFailedCounterInt = -1; 43 } 44 45 namespace sl4n_ble { 46 const int kAdvSettingsModeLowPowerInt = 0; 47 const int kAdvSettingsModeBalancedInt = 1; 48 const int kAdvSettingsModeLowLatencyInt = 2; 49 50 const int kAdvSettingsTxPowerLevelUltraLowInt = 0; 51 const int kAdvSettingsTxPowerLevelLowInt = 1; 52 const int kAdvSettingsTxPowerLevelMediumInt = 2; 53 const int kAdvSettingsTxPowerLevelHighInt = 3; 54 } 55 56 namespace sl4n_error_codes { 57 const int kFailInt = 0; 58 const int kPassInt = 1; 59 } 60