15738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project/****************************************************************************** 25738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project * 35738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project * Copyright (C) 2009-2012 Broadcom Corporation 45738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project * 55738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project * Licensed under the Apache License, Version 2.0 (the "License"); 65738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project * you may not use this file except in compliance with the License. 75738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project * You may obtain a copy of the License at: 85738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project * 95738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project * http://www.apache.org/licenses/LICENSE-2.0 105738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project * 115738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project * Unless required by applicable law or agreed to in writing, software 125738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project * distributed under the License is distributed on an "AS IS" BASIS, 135738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 145738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project * See the License for the specific language governing permissions and 155738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project * limitations under the License. 165738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project * 175738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project ******************************************************************************/ 185738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project 195738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project/******************************************************************************* 205738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project * 215738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project * Filename: btif_config.h 225738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project * 235738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project * Description: Bluetooth configuration Interface 245738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project * 255738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project *******************************************************************************/ 265738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project 275738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#ifndef BTIF_CONFIG_H 285738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#define BTIF_CONFIG_H 295738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project 305738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#ifdef __cplusplus 315738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#include <stdint.h> 325738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern "C" { 335738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#endif 345738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project 355738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project/******************************************************************************* 365738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project** Constants & Macros 375738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project********************************************************************************/ 385738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project 395738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#define BTIF_CFG_TYPE_INVALID 0 405738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#define BTIF_CFG_TYPE_STR 1 415738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#define BTIF_CFG_TYPE_INT (1 << 1) 425738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#define BTIF_CFG_TYPE_BIN (1 << 2) 435738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#define BTIF_CFG_TYPE_VOLATILE (1 << 15) 445738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project 455738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project 465738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project/******************************************************************************* 475738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project** Functions 485738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project********************************************************************************/ 495738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project 505738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectint btif_config_init(); 515738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project 525738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectint btif_config_exist(const char* section, const char* key, const char* name); 535738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectint btif_config_get_int(const char* section, const char* key, const char* name, int* value); 545738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectint btif_config_set_int(const char* section, const char* key, const char* name, int value); 555738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectint btif_config_get_str(const char* section, const char* key, const char* name, char* value, int* bytes); 565738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectint btif_config_set_str(const char* section, const char* key, const char* name, const char* value); 575738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project 585738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectint btif_config_get(const char* section, const char* key, const char* name, char* value, int* bytes, int* type); 595738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectint btif_config_set(const char* section, const char* key, const char* name, const char* value, int bytes, int type); 605738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project 615738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectint btif_config_remove(const char* section, const char* key, const char* name); 627939ed0c9a50c769e9e648a2d7751e0894b485edzzyint btif_config_filter_remove(const char* section, const char* filter[], int filter_count, int max_allowed); 635738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project 645738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectshort btif_config_next_key(short current_key_pos, const char* section, char * key_name, int* key_name_bytes); 655738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectshort btif_config_next_value(short pos, const char* section, const char* key, char* value_name, int* value_name_bytes); 665738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project 675738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projecttypedef void (*btif_config_enum_callback)(void* user_data, const char* section, const char* key, const char* name, 685738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project const char* value, int bytes, int type); 695738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectint btif_config_enum(btif_config_enum_callback cb, void* user_data); 705738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project 715738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectint btif_config_save(); 725738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectvoid btif_config_flush(); 735738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project 745738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#ifdef __cplusplus 755738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project} 765738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#endif 775738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project 785738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#endif 79