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 <hardware/hardware.h>
29 #include <base/macros.h>
30 
31 namespace sl4n {
32 const char kCmdStr[] = "cmd";
33 const char kDeviceNameStr[] = "deviceName";
34 const char kErrorStr[] = "error";
35 const char kFailStr[] = "fail";
36 const char kInvalidParamStr[] = "Invalid parameter";
37 const char kMethodStr[] = "method";
38 const char kParamsStr[] = "params";
39 const char kResultStr[] = "result";
40 const char kStatusStr[] = "status";
41 const char kSuccessStr[] = "success";
42 const char kTagStr[] = "SL4N";
43 const int kFailedCounterInt = -1;
44 }
45 
46 namespace sl4n_ble {
47 const int kAdvSettingsModeLowPowerInt = 0;
48 const int kAdvSettingsModeBalancedInt = 1;
49 const int kAdvSettingsModeLowLatencyInt = 2;
50 
51 const int kAdvSettingsTxPowerLevelUltraLowInt = 0;
52 const int kAdvSettingsTxPowerLevelLowInt = 1;
53 const int kAdvSettingsTxPowerLevelMediumInt = 2;
54 const int kAdvSettingsTxPowerLevelHighInt = 3;
55 }
56 
57 namespace sl4n_error_codes {
58 const int kFailInt = 0;
59 const int kPassInt = 1;
60 }
61