From 19733b44fa2862d0629d5dbfff0389bba79007d7 Mon Sep 17 00:00:00 2001 From: Alexander von Gluck IV Date: Sun, 12 Apr 2020 08:35:37 -0500 Subject: [PATCH] kits/bluetooth: Style cleanup, add additional vendors Change-Id: I33ac709fe1dc759bf9b98fe94bd1820278ef33d4 Reviewed-on: https://review.haiku-os.org/c/haiku/+/2471 Reviewed-by: waddlesplash --- src/kits/bluetooth/CommandManager.cpp | 142 +-- src/kits/bluetooth/CompanyIdentifiers.h | 1150 ++++++++++++++++++ src/kits/bluetooth/DeviceClass.cpp | 32 +- src/kits/bluetooth/DiscoveryAgent.cpp | 18 +- src/kits/bluetooth/DiscoveryListener.cpp | 6 +- src/kits/bluetooth/KitSupport.cpp | 14 +- src/kits/bluetooth/KitSupport.h | 4 +- src/kits/bluetooth/LocalDevice.cpp | 8 +- src/kits/bluetooth/RemoteDevice.cpp | 6 +- src/kits/bluetooth/UI/ConnectionIncoming.cpp | 5 +- src/kits/bluetooth/UI/PincodeWindow.cpp | 8 +- 11 files changed, 1257 insertions(+), 136 deletions(-) create mode 100644 src/kits/bluetooth/CompanyIdentifiers.h diff --git a/src/kits/bluetooth/CommandManager.cpp b/src/kits/bluetooth/CommandManager.cpp index 513383e00f..2feab60c47 100644 --- a/src/kits/bluetooth/CommandManager.cpp +++ b/src/kits/bluetooth/CommandManager.cpp @@ -4,13 +4,17 @@ * All rights reserved. Distributed under the terms of the MIT License. */ -#include "CommandManager.h" +#include "CommandManager.h" #include #include -inline void* buildCommand(uint8 ogf, uint8 ocf, void** param, size_t psize, +#include "CompanyIdentifiers.h" + + +inline void* +buildCommand(uint8 ogf, uint8 ocf, void** param, size_t psize, size_t* outsize) { CALLED(); @@ -73,7 +77,8 @@ NonParameterCommandRequest(uint8 ofg, uint8 ocf, int32* result, hci_id hId, #endif -void* buildReset(size_t* outsize) +void* +buildReset(size_t* outsize) { CALLED(); return buildCommand(OGF_CONTROL_BASEBAND, OCF_RESET, @@ -81,7 +86,8 @@ void* buildReset(size_t* outsize) } -void* buildReadLocalName(size_t* outsize) +void* +buildReadLocalName(size_t* outsize) { CALLED(); return buildCommand(OGF_CONTROL_BASEBAND, OCF_READ_LOCAL_NAME, @@ -89,7 +95,8 @@ void* buildReadLocalName(size_t* outsize) } -void* buildReadClassOfDevice(size_t* outsize) +void* +buildReadClassOfDevice(size_t* outsize) { CALLED(); return buildCommand(OGF_CONTROL_BASEBAND, OCF_READ_CLASS_OF_DEV, @@ -97,7 +104,8 @@ void* buildReadClassOfDevice(size_t* outsize) } -void* buildReadScan(size_t* outsize) +void* +buildReadScan(size_t* outsize) { CALLED(); return buildCommand(OGF_CONTROL_BASEBAND, OCF_READ_SCAN_ENABLE, @@ -105,7 +113,8 @@ void* buildReadScan(size_t* outsize) } -void* buildWriteScan(uint8 scanmode, size_t* outsize) +void* +buildWriteScan(uint8 scanmode, size_t* outsize) { CALLED(); struct hci_write_scan_enable* param; @@ -126,7 +135,8 @@ void* buildWriteScan(uint8 scanmode, size_t* outsize) #endif -void* buildRemoteNameRequest(bdaddr_t bdaddr, uint8 pscan_rep_mode, +void* +buildRemoteNameRequest(bdaddr_t bdaddr, uint8 pscan_rep_mode, uint16 clock_offset, size_t* outsize) { CALLED(); @@ -144,7 +154,8 @@ void* buildRemoteNameRequest(bdaddr_t bdaddr, uint8 pscan_rep_mode, } -void* buildInquiry(uint32 lap, uint8 length, uint8 num_rsp, size_t* outsize) +void* +buildInquiry(uint32 lap, uint8 length, uint8 num_rsp, size_t* outsize) { CALLED(); struct hci_cp_inquiry* param; @@ -164,14 +175,16 @@ void* buildInquiry(uint32 lap, uint8 length, uint8 num_rsp, size_t* outsize) } -void* buildInquiryCancel(size_t* outsize) +void* +buildInquiryCancel(size_t* outsize) { CALLED(); return buildCommand(OGF_LINK_CONTROL, OCF_INQUIRY_CANCEL, NULL, 0, outsize); } -void* buildPinCodeRequestReply(bdaddr_t bdaddr, uint8 length, char pincode[16], +void* +buildPinCodeRequestReply(bdaddr_t bdaddr, uint8 length, char pincode[16], size_t* outsize) { CALLED(); @@ -193,7 +206,8 @@ void* buildPinCodeRequestReply(bdaddr_t bdaddr, uint8 length, char pincode[16], } -void* buildPinCodeRequestNegativeReply(bdaddr_t bdaddr, size_t* outsize) +void* +buildPinCodeRequestNegativeReply(bdaddr_t bdaddr, size_t* outsize) { CALLED(); struct hci_cp_pin_code_neg_reply* param; @@ -211,13 +225,14 @@ void* buildPinCodeRequestNegativeReply(bdaddr_t bdaddr, size_t* outsize) } -void* buildAcceptConnectionRequest(bdaddr_t bdaddr, uint8 role, size_t* outsize) +void* +buildAcceptConnectionRequest(bdaddr_t bdaddr, uint8 role, size_t* outsize) { CALLED(); struct hci_cp_accept_conn_req* param; void* command = buildCommand(OGF_LINK_CONTROL, OCF_ACCEPT_CONN_REQ, - (void**) ¶m, sizeof(struct hci_cp_accept_conn_req), outsize); + (void**) ¶m, sizeof(struct hci_cp_accept_conn_req), outsize); if (command != NULL) { param->bdaddr = bdaddr; @@ -228,14 +243,15 @@ void* buildAcceptConnectionRequest(bdaddr_t bdaddr, uint8 role, size_t* outsize) } -void* buildRejectConnectionRequest(bdaddr_t bdaddr, size_t* outsize) +void* +buildRejectConnectionRequest(bdaddr_t bdaddr, size_t* outsize) { CALLED(); struct hci_cp_reject_conn_req* param; void* command = buildCommand(OGF_LINK_CONTROL, OCF_REJECT_CONN_REQ, - (void**)¶m, sizeof(struct hci_cp_reject_conn_req), - outsize); + (void**)¶m, sizeof(struct hci_cp_reject_conn_req), + outsize); if (command != NULL) { param->bdaddr = bdaddr; @@ -249,7 +265,9 @@ void* buildRejectConnectionRequest(bdaddr_t bdaddr, size_t* outsize) #pragma mark - INFORMATIONAL_PARAM - #endif -void* buildReadLocalVersionInformation(size_t* outsize) + +void* +buildReadLocalVersionInformation(size_t* outsize) { CALLED(); return buildCommand(OGF_INFORMATIONAL_PARAM, OCF_READ_LOCAL_VERSION, @@ -257,7 +275,8 @@ void* buildReadLocalVersionInformation(size_t* outsize) } -void* buildReadBufferSize(size_t* outsize) +void* +buildReadBufferSize(size_t* outsize) { CALLED(); return buildCommand(OGF_INFORMATIONAL_PARAM, OCF_READ_BUFFER_SIZE, @@ -265,7 +284,8 @@ void* buildReadBufferSize(size_t* outsize) } -void* buildReadBdAddr(size_t* outsize) +void* +buildReadBdAddr(size_t* outsize) { CALLED(); return buildCommand(OGF_INFORMATIONAL_PARAM, OCF_READ_BD_ADDR, @@ -273,88 +293,6 @@ void* buildReadBdAddr(size_t* outsize) } -const char* bluetoothManufacturers[] = { - "Ericsson Technology Licensing", - "Nokia Mobile Phones", - "Intel Corp.", - "IBM Corp.", - "Toshiba Corp.", - "3Com", - "Microsoft", - "Lucent", - "Motorola", - "Infineon Technologies AG", - "Cambridge Silicon Radio", - "Silicon Wave", - "Digianswer A/S", - "Texas Instruments Inc.", - "Parthus Technologies Inc.", - "Broadcom Corporation", - "Mitel Semiconductor", - "Widcomm, Inc.", - "Zeevo, Inc.", - "Atmel Corporation", - "Mitsubishi Electric Corporation", - "RTX Telecom A/S", - "KC Technology Inc.", - "Newlogic", - "Transilica, Inc.", - "Rohde & Schwartz GmbH & Co. KG", - "TTPCom Limited", - "Signia Technologies, Inc.", - "Conexant Systems Inc.", - "Qualcomm", - "Inventel", - "AVM Berlin", - "BandSpeed, Inc.", - "Mansella Ltd", - "NEC Corporation", - "WavePlus Technology Co., Ltd.", - "Alcatel", - "Philips Semiconductors", - "C Technologies", - "Open Interface", - "R F Micro Devices", - "Hitachi Ltd", - "Symbol Technologies, Inc.", - "Tenovis", - "Macronix International Co. Ltd.", - "GCT Semiconductor", - "Norwood Systems", - "MewTel Technology Inc.", - "ST Microelectronics", - "Synopsys", - "Red-M (Communications) Ltd", - "Commil Ltd", - "Computer Access Technology Corporation (CATC)", - "Eclipse (HQ EspaƱa) S.L.", - "Renesas Technology Corp.", - "Mobilian Corporation", - "Terax", - "Integrated System Solution Corp.", - "Matsushita Electric Industrial Co., Ltd.", - "Gennum Corporation", - "Research In Motion", - "IPextreme, Inc.", - "Systems and Chips, Inc", - "Bluetooth SIG, Inc", - "Seiko Epson Corporation", - "Integrated Silicon Solution Taiwain, Inc.", - "CONWISE Technology Corporation Ltd", - "PARROT SA", - "Socket Communications", - "Atheros Communications, Inc.", - "MediaTek, Inc.", - "Bluegiga", /* (tentative) */ - "Marvell Technology Group Ltd.", - "3DSP Corporation", - "Accel Semiconductor Ltd.", - "Continental Automotive Systems", - "Apple, Inc.", - "Staccato Communications, Inc." -}; - - const char* linkControlCommands[] = { "Inquiry", "Inquiry Cancel", diff --git a/src/kits/bluetooth/CompanyIdentifiers.h b/src/kits/bluetooth/CompanyIdentifiers.h new file mode 100644 index 0000000000..85233aad54 --- /dev/null +++ b/src/kits/bluetooth/CompanyIdentifiers.h @@ -0,0 +1,1150 @@ +/* + * Copyright 2008 Oliver Ruiz Dorantes, oliver.ruiz.dorantes_at_gmail.com + * Copyright 2008 Mika Lindqvist + * Copyright 2019-2020 Haiku, Inc. + * All rights reserved. Distributed under the terms of the MIT License. + * + * Authors: + * Alexander von Gluck IV + */ + + +// https://www.bluetooth.com/specifications/assigned-numbers/company-identifiers + +const char* bluetoothManufacturers[] = { + "Ericsson Technology Licensing", + "Nokia Mobile Phones", + "Intel Corp.", + "IBM Corp.", + "Toshiba Corp.", + "3Com", + "Microsoft", + "Lucent", + "Motorola", + "Infineon Technologies AG", + "Cambridge Silicon Radio", + "Silicon Wave", + "Digianswer A/S", + "Texas Instruments Inc.", + "Parthus Technologies Inc.", + "Broadcom Corporation", + "Mitel Semiconductor", + "Widcomm, Inc.", + "Zeevo, Inc.", + "Atmel Corporation", + "Mitsubishi Electric Corporation", + "RTX Telecom A/S", + "KC Technology Inc.", + "Newlogic", + "Transilica, Inc.", + "Rohde & Schwarz GmbH & Co. KG", + "TTPCom Limited", + "Signia Technologies, Inc.", + "Conexant Systems Inc.", + "Qualcomm", + "Inventel", + "AVM Berlin", + "BandSpeed, Inc.", + "Mansella Ltd", + "NEC Corporation", + "WavePlus Technology Co., Ltd.", + "Alcatel", + "NXP Semiconductors (formerly Philips Semiconductors)", + "C Technologies", + "Open Interface", + "R F Micro Devices", + "Hitachi Ltd", + "Symbol Technologies, Inc.", + "Tenovis", + "Macronix International Co. Ltd.", + "GCT Semiconductor", + "Norwood Systems", + "MewTel Technology Inc.", + "ST Microelectronics", + "Synopsys, Inc.", + "Red-M (Communications) Ltd", + "Commil Ltd", + "Computer Access Technology Corporation (CATC)", + "Eclipse (HQ Espana) S.L.", + "Renesas Electronics Corporation", + "Mobilian Corporation", + "Terax", + "Integrated System Solution Corp.", + "Matsushita Electric Industrial Co., Ltd.", + "Gennum Corporation", + "BlackBerry Limited (formerly Research In Motion)", + "IPextreme, Inc.", + "Systems and Chips, Inc", + "Bluetooth SIG, Inc", + "Seiko Epson Corporation", + "Integrated Silicon Solution Taiwan, Inc.", + "CONWISE Technology Corporation Ltd", + "PARROT SA", + "Socket Mobile", + "Atheros Communications, Inc.", + "MediaTek, Inc.", + "Bluegiga", + "Marvell Technology Group Ltd.", + "3DSP Corporation", + "Accel Semiconductor Ltd.", + "Continental Automotive Systems", + "Apple, Inc.", + "Staccato Communications, Inc.", + "Avago Technologies", + "APT Ltd.", + "SiRF Technology, Inc.", + "Tzero Technologies, Inc.", + "J&M Corporation", + "Free2move AB", + "3DiJoy Corporation", + "Plantronics, Inc.", + "Sony Ericsson Mobile Communications", + "Harman International Industries, Inc.", + "Vizio, Inc.", + "Nordic Semiconductor ASA", + "EM Microelectronic-Marin SA", + "Ralink Technology Corporation", + "Belkin International, Inc.", + "Realtek Semiconductor Corporation", + "Stonestreet One, LLC", + "Wicentric, Inc.", + "RivieraWaves S.A.S", + "RDA Microelectronics", + "Gibson Guitars", + "MiCommand Inc.", + "Band XI International, LLC", + "Hewlett-Packard Company", + "9Solutions Oy", + "GN Netcom A/S", + "General Motors", + "A&D Engineering, Inc.", + "MindTree Ltd.", + "Polar Electro OY", + "Beautiful Enterprise Co., Ltd.", + "BriarTek, Inc", + "Summit Data Communications, Inc.", + "Sound ID", + "Monster, LLC", + "connectBlue AB", + "ShangHai Super Smart Electronics Co. Ltd.", + "Group Sense Ltd.", + "Zomm, LLC", + "Samsung Electronics Co. Ltd.", + "Creative Technology Ltd.", + "Laird Technologies", + "Nike, Inc.", + "lesswire AG", + "MStar Semiconductor, Inc.", + "Hanlynn Technologies", + "A & R Cambridge", + "Seers Technology Co., Ltd.", + "Sports Tracking Technologies Ltd.", + "Autonet Mobile", + "DeLorme Publishing Company, Inc.", + "WuXi Vimicro", + "Sennheiser Communications A/S", + "TimeKeeping Systems, Inc.", + "Ludus Helsinki Ltd.", + "BlueRadios, Inc.", + "Equinux AG", + "Garmin International, Inc.", + "Ecotest", + "GN ReSound A/S", + "Jawbone", + "Topcon Positioning Systems, LLC", + "Gimbal Inc. (formerly Qualcomm Labs, Inc. and Qualcomm Retail Solutions, Inc.)", + "Zscan Software", + "Quintic Corp", + "Telit Wireless Solutions GmbH (formerly Stollmann E+V GmbH)", + "Funai Electric Co., Ltd.", + "Advanced PANMOBIL systems GmbH & Co. KG", + "ThinkOptics, Inc.", + "Universal Electronics, Inc.", + "Airoha Technology Corp.", + "NEC Lighting, Ltd.", + "ODM Technology, Inc.", + "ConnecteDevice Ltd.", + "zero1.tv GmbH", + "i.Tech Dynamic Global Distribution Ltd.", + "Alpwise", + "Jiangsu Toppower Automotive Electronics Co., Ltd.", + "Colorfy, Inc.", + "Geoforce Inc.", + "Bose Corporation", + "Suunto Oy", + "Kensington Computer Products Group", + "SR-Medizinelektronik", + "Vertu Corporation Limited", + "Meta Watch Ltd.", + "LINAK A/S", + "OTL Dynamics LLC", + "Panda Ocean Inc.", + "Visteon Corporation", + "ARP Devices Limited", + "Magneti Marelli S.p.A", + "CAEN RFID srl", + "Ingenieur-Systemgruppe Zahn GmbH", + "Green Throttle Games", + "Peter Systemtechnik GmbH", + "Omegawave Oy", + "Cinetix", + "Passif Semiconductor Corp", + "Saris Cycling Group, Inc", + "Bekey A/S", + "Clarinox Technologies Pty. Ltd.", + "BDE Technology Co., Ltd.", + "Swirl Networks", + "Meso international", + "TreLab Ltd", + "Qualcomm Innovation Center, Inc. (QuIC)", + "Johnson Controls, Inc.", + "Starkey Laboratories Inc.", + "S-Power Electronics Limited", + "Ace Sensor Inc", + "Aplix Corporation", + "AAMP of America", + "Stalmart Technology Limited", + "AMICCOM Electronics Corporation", + "Shenzhen Excelsecu Data Technology Co.,Ltd", + "Geneq Inc.", + "adidas AG", + "LG Electronics", + "Onset Computer Corporation", + "Selfly BV", + "Quuppa Oy.", + "GeLo Inc", + "Evluma", + "MC10", + "Binauric SE", + "Beats Electronics", + "Microchip Technology Inc.", + "Elgato Systems GmbH", + "ARCHOS SA", + "Dexcom, Inc.", + "Polar Electro Europe B.V.", + "Dialog Semiconductor B.V.", + "Taixingbang Technology (HK) Co,. LTD.", + "Kawantech", + "Austco Communication Systems", + "Timex Group USA, Inc.", + "Qualcomm Technologies, Inc.", + "Qualcomm Connected Experiences, Inc.", + "Voyetra Turtle Beach", + "txtr GmbH", + "Biosentronics", + "Procter & Gamble", + "Hosiden Corporation", + "Muzik LLC", + "Misfit Wearables Corp", + "Google", + "Danlers Ltd", + "Semilink Inc", + "inMusic Brands, Inc", + "L.S. Research Inc.", + "Eden Software Consultants Ltd.", + "Freshtemp", + "KS Technologies", + "ACTS Technologies", + "Vtrack Systems", + "Nielsen-Kellerman Company", + "Server Technology Inc.", + "BioResarch Associates", + "Jolly Logic, LLC", + "Above Average Outcomes, Inc.", + "Bitsplitters GmbH", + "PayPal, Inc.", + "Witron Technology Limited", + "Morse Project Inc.", + "Kent Displays Inc.", + "Nautilus Inc.", + "Smartifier Oy", + "Elcometer Limited", + "VSN Technologies, Inc.", + "AceUni Corp., Ltd.", + "StickNFind", + "Crystal Code AB", + "KOUKAAM a.s.", + "Delphi Corporation", + "ValenceTech Limited", + "Stanley Black and Decker", + "Typo Products, LLC", + "TomTom International BV", + "Fugoo, Inc.", + "Keiser Corporation", + "Bang & Olufsen S/A", + "PLUS Location Systems Pty Ltd", + "Ubiquitous Computing Technology Corporation", + "Innovative Yachtter Solutions", + "William Demant Holding A/S", + "Chicony Electronics Co., Ltd.", + "Atus BV", + "Codegate Ltd", + "ERi, Inc", + "Transducers Direct, LLC", + "Fujitsu Ten LImited", + "Audi AG", + "HiSilicon Technologies Col, Ltd.", + "Nippon Seiki Co., Ltd.", + "Steelseries ApS", + "Visybl Inc.", + "Openbrain Technologies, Co., Ltd.", + "Xensr", + "e.solutions", + "10AK Technologies", + "Wimoto Technologies Inc", + "Radius Networks, Inc.", + "Wize Technology Co., Ltd.", + "Qualcomm Labs, Inc.", + "Aruba Networks", + "Baidu", + "Arendi AG", + "Skoda Auto a.s.", + "Volkwagon AG", + "Porsche AG", + "Sino Wealth Electronic Ltd.", + "AirTurn, Inc.", + "Kinsa, Inc", + "HID Global", + "SEAT es", + "Promethean Ltd.", + "Salutica Allied Solutions", + "GPSI Group Pty Ltd", + "Nimble Devices Oy", + "Changzhou Yongse Infotech Co., Ltd.", + "SportIQ", + "TEMEC Instruments B.V.", + "Sony Corporation", + "ASSA ABLOY", + "Clarion Co. Inc.", + "Warehouse Innovations", + "Cypress Semiconductor", + "MADS Inc", + "Blue Maestro Limited", + "Resolution Products, Ltd.", + "Aireware LLC", + "Seed Labs, Inc. (formerly ETC sp. z.o.o.)", + "Prestigio Plaza Ltd.", + "NTEO Inc.", + "Focus Systems Corporation", + "Tencent Holdings Ltd.", + "Allegion", + "Murata Manufacturing Co., Ltd.", + "WirelessWERX", + "Nod, Inc.", + "B&B Manufacturing Company", + "Alpine Electronics (China) Co., Ltd", + "FedEx Services", + "Grape Systems Inc.", + "Bkon Connect", + "Lintech GmbH", + "Novatel Wireless", + "Ciright", + "Mighty Cast, Inc.", + "Ambimat Electronics", + "Perytons Ltd.", + "Tivoli Audio, LLC", + "Master Lock", + "Mesh-Net Ltd", + "HUIZHOU DESAY SV AUTOMOTIVE CO., LTD.", + "Tangerine, Inc.", + "B&W Group Ltd.", + "Pioneer Corporation", + "OnBeep", + "Vernier Software & Technology", + "ROL Ergo", + "Pebble Technology", + "NETATMO", + "Accumulate AB", + "Anhui Huami Information Technology Co., Ltd.", + "Inmite s.r.o.", + "ChefSteps, Inc.", + "micas AG", + "Biomedical Research Ltd.", + "Pitius Tec S.L.", + "Estimote, Inc.", + "Unikey Technologies, Inc.", + "Timer Cap Co.", + "AwoX", + "yikes", + "MADSGlobalNZ Ltd.", + "PCH International", + "Qingdao Yeelink Information Technology Co., Ltd.", + "Milwaukee Tool (Formally Milwaukee Electric Tools)", + "MISHIK Pte Ltd", + "Bayer HealthCare", + "Spicebox LLC", + "emberlight", + "Cooper-Atkins Corporation", + "Qblinks", + "MYSPHERA", + "LifeScan Inc", + "Volantic AB", + "Podo Labs, Inc", + "Roche Diabetes Care AG", + "Amazon Fulfillment Service", + "Connovate Technology Private Limited", + "Kocomojo, LLC", + "EveryKey LLC", + "Dynamic Controls", + "SentriLock", + "I-SYST inc.", + "CASIO COMPUTER CO., LTD.", + "LAPIS Semiconductor Co., Ltd.", + "Telemonitor, Inc.", + "taskit GmbH", + "Daimler AG", + "BatAndCat", + "BluDotz Ltd", + "XTel ApS", + "Gigaset Communications GmbH", + "Gecko Health Innovations, Inc.", + "HOP Ubiquitous", + "Walt Disney", + "Nectar", + "bel'apps LLC", + "CORE Lighting Ltd", + "Seraphim Sense Ltd", + "Unico RBC", + "Physical Enterprises Inc.", + "Able Trend Technology Limited", + "Konica Minolta, Inc.", + "Wilo SE", + "Extron Design Services", + "Fitbit, Inc.", + "Fireflies Systems", + "Intelletto Technologies Inc.", + "FDK CORPORATION", + "Cloudleaf, Inc", + "Maveric Automation LLC", + "Acoustic Stream Corporation", + "Zuli", + "Paxton Access Ltd", + "WiSilica Inc.", + "VENGIT Korltolt Felelssg Trsasg", + "SALTO SYSTEMS S.L.", + "TRON Forum (formerly T-Engine Forum)", + "CUBETECH s.r.o.", + "Cokiya Incorporated", + "CVS Health", + "Ceruus", + "Strainstall Ltd", + "Channel Enterprises (HK) Ltd.", + "FIAMM", + "GIGALANE.CO.,LTD", + "EROAD", + "Mine Safety Appliances", + "Icon Health and Fitness", + "Asandoo GmbH", + "ENERGOUS CORPORATION", + "Taobao", + "Canon Inc.", + "Geophysical Technology Inc.", + "Facebook, Inc.", + "Nipro Diagnostics, Inc.", + "FlightSafety International", + "Earlens Corporation", + "Sunrise Micro Devices, Inc.", + "Star Micronics Co., Ltd.", + "Netizens Sp. z o.o.", + "Nymi Inc.", + "Nytec, Inc.", + "Trineo Sp. z o.o.", + "Nest Labs Inc.", + "LM Technologies Ltd", + "General Electric Company", + "i+D3 S.L.", + "HANA Micron", + "Stages Cycling LLC", + "Cochlear Bone Anchored Solutions AB", + "SenionLab AB", + "Syszone Co., Ltd", + "Pulsate Mobile Ltd.", + "Hong Kong HunterSun Electronic Limited", + "pironex GmbH", + "BRADATECH Corp.", + "Transenergooil AG", + "Bunch", + "DME Microelectronics", + "Bitcraze AB", + "HASWARE Inc.", + "Abiogenix Inc.", + "Poly-Control ApS", + "Avi-on", + "Laerdal Medical AS", + "Fetch My Pet", + "Sam Labs Ltd.", + "Chengdu Synwing Technology Ltd", + "HOUWA SYSTEM DESIGN, k.k.", + "BSH", + "Primus Inter Pares Ltd", + "August Home, Inc", + "Gill Electronics", + "Sky Wave Design", + "Newlab S.r.l.", + "ELAD srl", + "G-wearables inc.", + "Squadrone Systems Inc.", + "Code Corporation", + "Savant Systems LLC", + "Logitech International SA", + "Innblue Consulting", + "iParking Ltd.", + "Koninklijke Philips Electronics N.V.", + "Minelab Electronics Pty Limited", + "Bison Group Ltd.", + "Widex A/S", + "Jolla Ltd", + "Lectronix, Inc.", + "Caterpillar Inc", + "Freedom Innovations", + "Dynamic Devices Ltd", + "Technology Solutions (UK) Ltd", + "IPS Group Inc.", + "STIR", + "Sano, Inc.", + "Advanced Application Design, Inc.", + "AutoMap LLC", + "Spreadtrum Communications Shanghai Ltd", + "CuteCircuit LTD", + "Valeo Service", + "Fullpower Technologies, Inc.", + "KloudNation", + "Zebra Technologies Corporation", + "Itron, Inc.", + "The University of Tokyo", + "UTC Fire and Security", + "Cool Webthings Limited", + "DJO Global", + "Gelliner Limited", + "Anyka (Guangzhou) Microelectronics Technology Co, LTD", + "Medtronic Inc.", + "Gozio Inc.", + "Form Lifting, LLC", + "Wahoo Fitness, LLC", + "Kontakt Micro-Location Sp. z o.o.", + "Radio Systems Corporation", + "Freescale Semiconductor, Inc.", + "Verifone Systems Pte Ltd. Taiwan Branch", + "AR Timing", + "Rigado LLC", + "Kemppi Oy", + "Tapcentive Inc.", + "Smartbotics Inc.", + "Otter Products, LLC", + "STEMP Inc.", + "LumiGeek LLC", + "InvisionHeart Inc.", + "Macnica Inc.", + "Jaguar Land Rover Limited", + "CoroWare Technologies, Inc", + "Simplo Technology Co., LTD", + "Omron Healthcare Co., LTD", + "Comodule GMBH", + "ikeGPS", + "Telink Semiconductor Co. Ltd", + "Interplan Co., Ltd", + "Wyler AG", + "IK Multimedia Production srl", + "Lukoton Experience Oy", + "MTI Ltd", + "Tech4home, Lda", + "Hiotech AB", + "DOTT Limited", + "Blue Speck Labs, LLC", + "Cisco Systems, Inc", + "Mobicomm Inc", + "Edamic", + "Goodnet, Ltd", + "Luster Leaf Products Inc", + "Manus Machina BV", + "Mobiquity Networks Inc", + "Praxis Dynamics", + "Philip Morris Products S.A.", + "Comarch SA", + "Nestl Nespresso S.A.", + "Merlinia A/S", + "LifeBEAM Technologies", + "Twocanoes Labs, LLC", + "Muoverti Limited", + "Stamer Musikanlagen GMBH", + "Tesla Motors", + "Pharynks Corporation", + "Lupine", + "Siemens AG", + "Huami (Shanghai) Culture Communication CO., LTD", + "Foster Electric Company, Ltd", + "ETA SA", + "x-Senso Solutions Kft", + "Shenzhen SuLong Communication Ltd", + "FengFan (BeiJing) Technology Co, Ltd", + "Qrio Inc", + "Pitpatpet Ltd", + "MSHeli s.r.l.", + "Trakm8 Ltd", + "JIN CO, Ltd", + "Alatech Tehnology", + "Beijing CarePulse Electronic Technology Co, Ltd", + "Awarepoint", + "ViCentra B.V.", + "Raven Industries", + "WaveWare Technologies Inc.", + "Argenox Technologies", + "Bragi GmbH", + "16Lab Inc", + "Masimo Corp", + "Iotera Inc", + "Endress+Hauser", + "ACKme Networks, Inc.", + "FiftyThree Inc.", + "Parker Hannifin Corp", + "Transcranial Ltd", + "Uwatec AG", + "Orlan LLC", + "Blue Clover Devices", + "M-Way Solutions GmbH", + "Microtronics Engineering GmbH", + "Schneider Schreibgerte GmbH", + "Sapphire Circuits LLC", + "Lumo Bodytech Inc.", + "UKC Technosolution", + "Xicato Inc.", + "Playbrush", + "Dai Nippon Printing Co., Ltd.", + "G24 Power Limited", + "AdBabble Local Commerce Inc.", + "Devialet SA", + "ALTYOR", + "University of Applied Sciences Valais/Haute Ecole Valaisanne", + "Five Interactive, LLC dba Zendo", + "NetEaseHangzhouNetwork co.Ltd.", + "Lexmark International Inc.", + "Fluke Corporation", + "Yardarm Technologies", + "SensaRx", + "SECVRE GmbH", + "Glacial Ridge Technologies", + "Identiv, Inc.", + "DDS, Inc.", + "SMK Corporation", + "Schawbel Technologies LLC", + "XMI Systems SA", + "Cerevo", + "Torrox GmbH & Co KG", + "Gemalto", + "DEKA Research & Development Corp.", + "Domster Tadeusz Szydlowski", + "Technogym SPA", + "FLEURBAEY BVBA", + "Aptcode Solutions", + "LSI ADL Technology", + "Animas Corp", + "Alps Electric Co., Ltd.", + "OCEASOFT", + "Motsai Research", + "Geotab", + "E.G.O. Elektro-Gertebau GmbH", + "bewhere inc", + "Johnson Outdoors Inc", + "steute Schaltgerate GmbH & Co. KG", + "Ekomini inc.", + "DEFA AS", + "Aseptika Ltd", + "HUAWEI Technologies Co., Ltd. ( )", + "HabitAware, LLC", + "ruwido austria gmbh", + "ITEC corporation", + "StoneL", + "Sonova AG", + "Maven Machines, Inc.", + "Synapse Electronics", + "Standard Innovation Inc.", + "RF Code, Inc.", + "Wally Ventures S.L.", + "Willowbank Electronics Ltd", + "SK Telecom", + "Jetro AS", + "Code Gears LTD", + "NANOLINK APS", + "IF, LLC", + "RF Digital Corp", + "Church & Dwight Co., Inc", + "Multibit Oy", + "CliniCloud Inc", + "SwiftSensors", + "Blue Bite", + "ELIAS GmbH", + "Sivantos GmbH", + "Petzl", + "storm power ltd", + "EISST Ltd", + "Inexess Technology Simma KG", + "Currant, Inc.", + "C2 Development, Inc.", + "Blue Sky Scientific, LLC", + "ALOTTAZS LABS, LLC", + "Kupson spol. s r.o.", + "Areus Engineering GmbH", + "Impossible Camera GmbH", + "InventureTrack Systems", + "LockedUp", + "Itude", + "Pacific Lock Company", + "Tendyron Corporation ( )", + "Robert Bosch GmbH", + "Illuxtron international B.V.", + "miSport Ltd.", + "Chargelib", + "Doppler Lab", + "BBPOS Limited", + "RTB Elektronik GmbH & Co. KG", + "Rx Networks, Inc.", + "WeatherFlow, Inc.", + "Technicolor USA Inc.", + "Bestechnic(Shanghai),Ltd", + "Raden Inc", + "JouZen Oy", + "CLABER S.P.A.", + "Hyginex, Inc.", + "HANSHIN ELECTRIC RAILWAY CO.,LTD.", + "Schneider Electric", + "Oort Technologies LLC", + "Chrono Therapeutics", + "Rinnai Corporation", + "Swissprime Technologies AG", + "Koha.,Co.Ltd", + "Genevac Ltd", + "Chemtronics", + "Seguro Technology Sp. z o.o.", + "Redbird Flight Simulations", + "Dash Robotics", + "LINE Corporation", + "Guillemot Corporation", + "Techtronic Power Tools Technology Limited", + "Wilson Sporting Goods", + "Lenovo (Singapore) Pte Ltd. ( )", + "Ayatan Sensors", + "Electronics Tomorrow Limited", + "VASCO Data Security International, Inc.", + "PayRange Inc.", + "ABOV Semiconductor", + "AINA-Wireless Inc.", + "Eijkelkamp Soil & Water", + "BMA ergonomics b.v.", + "Teva Branded Pharmaceutical Products R&D, Inc.", + "Anima", + "3M", + "Empatica Srl", + "Afero, Inc.", + "Powercast Corporation", + "Secuyou ApS", + "OMRON Corporation", + "Send Solutions", + "NIPPON SYSTEMWARE CO.,LTD.", + "Neosfar", + "Fliegl Agrartechnik GmbH", + "Gilvader", + "Digi International Inc (R)", + "DeWalch Technologies, Inc.", + "Flint Rehabilitation Devices, LLC", + "Samsung SDS Co., Ltd.", + "Blur Product Development", + "University of Michigan", + "Victron Energy BV", + "NTT docomo", + "Carmanah Technologies Corp.", + "Bytestorm Ltd.", + "Espressif Incorporated ( () )", + "Unwire", + "Connected Yard, Inc.", + "American Music Environments", + "Sensogram Technologies, Inc.", + "Fujitsu Limited", + "Ardic Technology", + "Delta Systems, Inc", + "HTC Corporation", + "Citizen Holdings Co., Ltd.", + "SMART-INNOVATION.inc", + "Blackrat Software", + "The Idea Cave, LLC", + "GoPro, Inc.", + "AuthAir, Inc", + "Vensi, Inc.", + "Indagem Tech LLC", + "Intemo Technologies", + "DreamVisions co., Ltd.", + "Runteq Oy Ltd", + "IMAGINATION TECHNOLOGIES LTD", + "CoSTAR TEchnologies", + "Clarius Mobile Health Corp.", + "Shanghai Frequen Microelectronics Co., Ltd.", + "Uwanna, Inc.", + "Lierda Science & Technology Group Co., Ltd.", + "Silicon Laboratories", + "World Moto Inc.", + "Giatec Scientific Inc.", + "Loop Devices, Inc", + "IACA electronique", + "Martians Inc", + "Swipp ApS", + "Life Laboratory Inc.", + "FUJI INDUSTRIAL CO.,LTD.", + "Surefire, LLC", + "Dolby Labs", + "Ellisys", + "Magnitude Lighting Converters", + "Hilti AG", + "Devdata S.r.l.", + "Deviceworx", + "Shortcut Labs", + "SGL Italia S.r.l.", + "PEEQ DATA", + "Ducere Technologies Pvt Ltd", + "DiveNav, Inc.", + "RIIG AI Sp. z o.o.", + "Thermo Fisher Scientific", + "AG Measurematics Pvt. Ltd.", + "CHUO Electronics CO., LTD.", + "Aspenta International", + "Eugster Frismag AG", + "Amber wireless GmbH", + "HQ Inc", + "Lab Sensor Solutions", + "Enterlab ApS", + "Eyefi, Inc.", + "MetaSystem S.p.A.", + "SONO ELECTRONICS. CO., LTD", + "Jewelbots", + "Compumedics Limited", + "Rotor Bike Components", + "Astro, Inc.", + "Amotus Solutions", + "Healthwear Technologies (Changzhou)Ltd", + "Essex Electronics", + "Grundfos A/S", + "Eargo, Inc.", + "Electronic Design Lab", + "ESYLUX", + "NIPPON SMT.CO.,Ltd", + "BM innovations GmbH", + "indoormap", + "OttoQ Inc", + "North Pole Engineering", + "3flares Technologies Inc.", + "Electrocompaniet A.S.", + "Mul-T-Lock", + "Corentium AS", + "Enlighted Inc", + "GISTIC", + "AJP2 Holdings, LLC", + "COBI GmbH", + "Blue Sky Scientific, LLC", + "Appception, Inc.", + "Courtney Thorne Limited", + "Virtuosys", + "TPV Technology Limited", + "Monitra SA", + "Automation Components, Inc.", + "Letsense s.r.l.", + "Etesian Technologies LLC", + "GERTEC BRASIL LTDA.", + "Drekker Development Pty. Ltd.", + "Whirl Inc", + "Locus Positioning", + "Acuity Brands Lighting, Inc", + "Prevent Biometrics", + "Arioneo", + "VersaMe", + "Vaddio", + "Libratone A/S", + "HM Electronics, Inc.", + "TASER International, Inc.", + "SafeTrust Inc.", + "Heartland Payment Systems", + "Bitstrata Systems Inc.", + "Pieps GmbH", + "iRiding(Xiamen)Technology Co.,Ltd.", + "Alpha Audiotronics, Inc.", + "TOPPAN FORMS CO.,LTD.", + "Sigma Designs, Inc.", + "Spectrum Brands, Inc.", + "Polymap Wireless", + "MagniWare Ltd.", + "Novotec Medical GmbH", + "Medicom Innovation Partner a/s", + "Matrix Inc.", + "Eaton Corporation", + "KYS", + "Naya Health, Inc.", + "Acromag", + "Insulet Corporation", + "Wellinks Inc.", + "ON Semiconductor", + "FREELAP SA", + "Favero Electronics Srl", + "BioMech Sensor LLC", + "BOLTT Sports technologies Private limited", + "Saphe International", + "Metormote AB", + "littleBits", + "SetPoint Medical", + "BRControls Products BV", + "Zipcar", + "AirBolt Pty Ltd", + "KeepTruckin Inc", + "Motiv, Inc.", + "Wazombi Labs O", + "ORBCOMM", + "Nixie Labs, Inc.", + "AppNearMe Ltd", + "Holman Industries", + "Expain AS", + "Electronic Temperature Instruments Ltd", + "Plejd AB", + "Propeller Health", + "Shenzhen iMCO Electronic Technology Co.,Ltd", + "Algoria", + "Apption Labs Inc.", + "Cronologics Corporation", + "MICRODIA Ltd.", + "lulabytes S.L.", + "Nestec S.A.", + "LLC MEGA - F service", + "Sharp Corporation", + "Precision Outcomes Ltd", + "Kronos Incorporated", + "OCOSMOS Co., Ltd.", + "Embedded Electronic Solutions Ltd. dba e2Solutions", + "Aterica Inc.", + "BluStor PMC, Inc.", + "Kapsch TrafficCom AB", + "ActiveBlu Corporation", + "Kohler Mira Limited", + "Noke", + "Appion Inc.", + "Resmed Ltd", + "Crownstone B.V.", + "Xiaomi Inc.", + "INFOTECH s.r.o.", + "Thingsquare AB", + "T&D", + "LAVAZZA S.p.A.", + "Netclearance Systems, Inc.", + "SDATAWAY", + "BLOKS GmbH", + "LEGO System A/S", + "Thetatronics Ltd", + "Nikon Corporation", + "NeST", + "South Silicon Valley Microelectronics", + "ALE International", + "CareView Communications, Inc.", + "SchoolBoard Limited", + "Molex Corporation", + "IVT Wireless Limited", + "Alpine Labs LLC", + "Candura Instruments", + "SmartMovt Technology Co., Ltd", + "Token Zero Ltd", + "ACE CAD Enterprise Co., Ltd. (ACECAD)", + "Medela, Inc", + "AeroScout", + "Esrille Inc.", + "THINKERLY SRL", + "Exon Sp. z o.o.", + "Meizu Technology Co., Ltd.", + "Smablo LTD", + "XiQ", + "Allswell Inc.", + "Comm-N-Sense Corp DBA Verigo", + "VIBRADORM GmbH", + "Otodata Wireless Network Inc.", + "Propagation Systems Limited", + "Midwest Instruments & Controls", + "Alpha Nodus, inc.", + "petPOMM, Inc", + "Mattel", + "Airbly Inc.", + "A-Safe Limited", + "FREDERIQUE CONSTANT SA", + "Maxscend Microelectronics Company Limited", + "Abbott Diabetes Care", + "ASB Bank Ltd", + "amadas", + "Applied Science, Inc.", + "iLumi Solutions Inc.", + "Arch Systems Inc.", + "Ember Technologies, Inc.", + "Snapchat Inc", + "Casambi Technologies Oy", + "Pico Technology Inc.", + "St. Jude Medical, Inc.", + "Intricon", + "Structural Health Systems, Inc.", + "Avvel International", + "Gallagher Group", + "In2things Automation Pvt. Ltd.", + "SYSDEV Srl", + "Vonkil Technologies Ltd", + "Wynd Technologies, Inc.", + "CONTRINEX S.A.", + "MIRA, Inc.", + "Watteam Ltd", + "Density Inc.", + "IOT Pot India Private Limited", + "Sigma Connectivity AB", + "PEG PEREGO SPA", + "Wyzelink Systems Inc.", + "Yota Devices LTD", + "FINSECUR", + "Zen-Me Labs Ltd", + "3IWare Co., Ltd.", + "EnOcean GmbH", + "Instabeat, Inc", + "Nima Labs", + "Andreas Stihl AG & Co. KG", + "Nathan Rhoades LLC", + "Grob Technologies, LLC", + "Actions (Zhuhai) Technology Co., Limited", + "SPD Development Company Ltd", + "Sensoan Oy", + "Qualcomm Life Inc", + "Chip-ing AG", + "ffly4u", + "IoT Instruments Oy", + "TRUE Fitness Technology", + "Reiner Kartengeraete GmbH & Co. KG.", + "SHENZHEN LEMONJOY TECHNOLOGY CO., LTD.", + "Hello Inc.", + "Evollve Inc.", + "Jigowatts Inc.", + "BASIC MICRO.COM,INC.", + "CUBE TECHNOLOGIES", + "foolography GmbH", + "CLINK", + "Hestan Smart Cooking Inc.", + "WindowMaster A/S", + "Flowscape AB", + "PAL Technologies Ltd", + "WHERE, Inc.", + "Iton Technology Corp.", + "Owl Labs Inc.", + "Rockford Corp.", + "Becon Technologies Co.,Ltd.", + "Vyassoft Technologies Inc", + "Nox Medical", + "Kimberly-Clark", + "Trimble Navigation Ltd.", + "Littelfuse", + "Withings", + "i-developer IT Beratung UG", + "", + "Sears Holdings Corporation", + "Gantner Electronic GmbH", + "Authomate Inc", + "Vertex International, Inc.", + "Airtago", + "Swiss Audio SA", + "ToGetHome Inc.", + "AXIS", + "Openmatics", + "Jana Care Inc.", + "Senix Corporation", + "NorthStar Battery Company, LLC", + "SKF (U.K.) Limited", + "CO-AX Technology, Inc.", + "Fender Musical Instruments", + "Luidia Inc", + "SEFAM", + "Wireless Cables Inc", + "Lightning Protection International Pty Ltd", + "Uber Technologies Inc", + "SODA GmbH", + "Fatigue Science", + "Alpine Electronics Inc.", + "Novalogy LTD", + "Friday Labs Limited", + "OrthoAccel Technologies", + "WaterGuru, Inc.", + "Benning Elektrotechnik und Elektronik GmbH & Co. KG", + "Dell Computer Corporation", + "Kopin Corporation", + "TecBakery GmbH", + "Backbone Labs, Inc.", + "DELSEY SA", + "Chargifi Limited", + "Trainesense Ltd.", + "Unify Software and Solutions GmbH & Co. KG", + "Husqvarna AB", + "Focus fleet and fuel management inc", + "SmallLoop, LLC", + "Prolon Inc.", + "BD Medical", + "iMicroMed Incorporated", + "Ticto N.V.", + "Meshtech AS", + "MemCachier Inc.", + "Danfoss A/S", + "SnapStyk Inc.", + "Amyway Corporation", + "Silk Labs, Inc.", + "Pillsy Inc.", + "Hatch Baby, Inc.", + "Blocks Wearables Ltd.", + "Drayson Technologies (Europe) Limited", + "eBest IOT Inc.", + "Helvar Ltd", + "Radiance Technologies", + "Nuheara Limited", + "Appside co., ltd.", + "DeLaval", + "Coiler Corporation", + "Thermomedics, Inc.", + "Tentacle Sync GmbH", + "Valencell, Inc.", + "iProtoXi Oy", + "SECOM CO., LTD.", + "Tucker International LLC", + "Metanate Limited", + "Kobian Canada Inc.", + "NETGEAR, Inc.", + "Fabtronics Australia Pty Ltd", + "Grand Centrix GmbH", + "1UP USA.com llc", + "SHIMANO INC.", + "Nain Inc.", + "LifeStyle Lock, LLC", + "VEGA Grieshaber KG", + "Xtrava Inc.", + "TTS Tooltechnic Systems AG & Co. KG", + "Teenage Engineering AB", + "Tunstall Nordic AB", + "Svep Design Center AB", + "GreenPeak Technologies BV", + "Sphinx Electronics GmbH & Co KG", + "Atomation", + "Nemik Consulting Inc", + "RF INNOVATION", + "Mini Solution Co., Ltd.", + "Lumenetix, Inc", + "2048450 Ontario Inc", + "SPACEEK LTD", + "Delta T Corporation", + "Boston Scientific Corporation", + "Nuviz, Inc.", + "Real Time Automation, Inc.", + "Kolibree", + "vhf elektronik GmbH", + "Bonsai Systems GmbH", + "Fathom Systems Inc.", + "Bellman & Symfon", + "International Forte Group LLC", + "CycleLabs Solutions inc.", + "Codenex Oy", + "Kynesim Ltd", + "Palago AB", + "INSIGMA INC.", + "PMD Solutions", + "Qingdao Realtime Technology Co., Ltd.", + "BEGA Gantenbrink-Leuchten KG", + "Pambor Ltd." +}; diff --git a/src/kits/bluetooth/DeviceClass.cpp b/src/kits/bluetooth/DeviceClass.cpp index 7eb3c4857b..1de2f54825 100644 --- a/src/kits/bluetooth/DeviceClass.cpp +++ b/src/kits/bluetooth/DeviceClass.cpp @@ -20,12 +20,17 @@ void DeviceClass::GetServiceClass(BString& serviceClass) { CALLED(); - static const char *services[] = { B_TRANSLATE_MARK("Positioning"), - B_TRANSLATE_MARK("Networking"), B_TRANSLATE_MARK("Rendering"), - B_TRANSLATE_MARK("Capturing"), B_TRANSLATE_MARK("Object transfer"), - B_TRANSLATE_MARK("Audio"), B_TRANSLATE_MARK("Telephony"), - B_TRANSLATE_MARK("Information") }; - + static const char *services[] = { + B_TRANSLATE_MARK("Positioning"), + B_TRANSLATE_MARK("Networking"), + B_TRANSLATE_MARK("Rendering"), + B_TRANSLATE_MARK("Capturing"), + B_TRANSLATE_MARK("Object transfer"), + B_TRANSLATE_MARK("Audio"), + B_TRANSLATE_MARK("Telephony"), + B_TRANSLATE_MARK("Information") + }; + if (ServiceClass() != 0) { bool first = true; @@ -50,11 +55,16 @@ void DeviceClass::GetMajorDeviceClass(BString& majorClass) { CALLED(); - static const char *major_devices[] = { B_TRANSLATE_MARK("Miscellaneous"), - B_TRANSLATE_MARK("Computer"), B_TRANSLATE_MARK("Phone"), - B_TRANSLATE_MARK("LAN access"), B_TRANSLATE_MARK("Audio/Video"), - B_TRANSLATE_MARK("Peripheral"), B_TRANSLATE_MARK("Imaging"), - B_TRANSLATE_MARK("Uncategorized") }; + static const char *major_devices[] = { + B_TRANSLATE_MARK("Miscellaneous"), + B_TRANSLATE_MARK("Computer"), + B_TRANSLATE_MARK("Phone"), + B_TRANSLATE_MARK("LAN access"), + B_TRANSLATE_MARK("Audio/Video"), + B_TRANSLATE_MARK("Peripheral"), + B_TRANSLATE_MARK("Imaging"), + B_TRANSLATE_MARK("Uncategorized") + }; if (MajorDeviceClass() >= sizeof(major_devices) / sizeof(*major_devices)) majorClass << B_TRANSLATE("Invalid device class!\n"); diff --git a/src/kits/bluetooth/DiscoveryAgent.cpp b/src/kits/bluetooth/DiscoveryAgent.cpp index ab092eafc1..78423bb8ae 100644 --- a/src/kits/bluetooth/DiscoveryAgent.cpp +++ b/src/kits/bluetooth/DiscoveryAgent.cpp @@ -3,6 +3,7 @@ * All rights reserved. Distributed under the terms of the MIT License. */ + #include #include #include @@ -18,6 +19,7 @@ #include "KitSupport.h" + namespace Bluetooth { @@ -42,7 +44,8 @@ DiscoveryAgent::StartInquiry(int accessCode, DiscoveryListener* listener) status_t -DiscoveryAgent::StartInquiry(uint32 accessCode, DiscoveryListener* listener, bigtime_t secs) +DiscoveryAgent::StartInquiry(uint32 accessCode, DiscoveryListener* listener, + bigtime_t secs) { CALLED(); size_t size; @@ -68,12 +71,14 @@ DiscoveryAgent::StartInquiry(uint32 accessCode, DiscoveryListener* listener, big request.AddInt32("hci_id", fLocalDevice->ID()); - startInquiryCommand = buildInquiry(accessCode, secs, BT_MAX_RESPONSES, &size); + startInquiryCommand = buildInquiry(accessCode, secs, BT_MAX_RESPONSES, + &size); // For stating the inquiry request.AddData("raw command", B_ANY_TYPE, startInquiryCommand, size); - request.AddInt16("eventExpected", HCI_EVENT_CMD_STATUS); - request.AddInt16("opcodeExpected", PACK_OPCODE(OGF_LINK_CONTROL, OCF_INQUIRY)); + request.AddInt16("eventExpected", HCI_EVENT_CMD_STATUS); + request.AddInt16("opcodeExpected", + PACK_OPCODE(OGF_LINK_CONTROL, OCF_INQUIRY)); // For getting each discovered message request.AddInt16("eventExpected", HCI_EVENT_INQUIRY_RESULT); @@ -113,7 +118,8 @@ DiscoveryAgent::CancelInquiry(DiscoveryListener* listener) cancelInquiryCommand = buildInquiryCancel(&size); request.AddData("raw command", B_ANY_TYPE, cancelInquiryCommand, size); request.AddInt16("eventExpected", HCI_EVENT_CMD_STATUS); - request.AddInt16("opcodeExpected", PACK_OPCODE(OGF_LINK_CONTROL, OCF_INQUIRY_CANCEL)); + request.AddInt16("opcodeExpected", + PACK_OPCODE(OGF_LINK_CONTROL, OCF_INQUIRY_CANCEL)); if (fMessenger->SendMessage(&request, &reply) == B_OK) { if (reply.FindInt8("status", &bt_status ) == B_OK ) { @@ -148,4 +154,4 @@ DiscoveryAgent::~DiscoveryAgent() } -} +} /* End namespace Bluetooth */ diff --git a/src/kits/bluetooth/DiscoveryListener.cpp b/src/kits/bluetooth/DiscoveryListener.cpp index c8cf32e6d9..5f174ed2ca 100644 --- a/src/kits/bluetooth/DiscoveryListener.cpp +++ b/src/kits/bluetooth/DiscoveryListener.cpp @@ -1,10 +1,9 @@ /* * Copyright 2007 Oliver Ruiz Dorantes, oliver.ruiz.dorantes_at_gmail.com - * * All rights reserved. Distributed under the terms of the MIT License. - * */ + #include #include #include @@ -18,6 +17,7 @@ #include + namespace Bluetooth { @@ -156,4 +156,4 @@ DiscoveryListener::DiscoveryListener() Run(); } -} +} /* end namespace Bluetooth */ diff --git a/src/kits/bluetooth/KitSupport.cpp b/src/kits/bluetooth/KitSupport.cpp index da9eef1136..be4ea125b0 100644 --- a/src/kits/bluetooth/KitSupport.cpp +++ b/src/kits/bluetooth/KitSupport.cpp @@ -1,9 +1,9 @@ /* * Copyright 2008 Oliver Ruiz Dorantes, oliver.ruiz.dorantes_at_gmail.com - * * All rights reserved. Distributed under the terms of the MIT License. - * */ + + #include #include #include @@ -12,7 +12,9 @@ #include "KitSupport.h" -BMessenger* _RetrieveBluetoothMessenger(void) + +BMessenger* +_RetrieveBluetoothMessenger(void) { CALLED(); // Fix/review: leaking memory here @@ -26,14 +28,16 @@ BMessenger* _RetrieveBluetoothMessenger(void) } -uint8 GetInquiryTime() +uint8 +GetInquiryTime() { CALLED(); return BT_DEFAULT_INQUIRY_TIME; } -void SetInquiryTime(uint8 time) +void +SetInquiryTime(uint8 time) { CALLED(); ((void)(time)); diff --git a/src/kits/bluetooth/KitSupport.h b/src/kits/bluetooth/KitSupport.h index 0bd8d1c07a..df27b01955 100644 --- a/src/kits/bluetooth/KitSupport.h +++ b/src/kits/bluetooth/KitSupport.h @@ -5,12 +5,14 @@ #ifndef KITSUPPORT_H #define KITSUPPORT_H + #include + BMessenger* _RetrieveBluetoothMessenger(void); uint8 GetInquiryTime(); void SetInquiryTime(uint8 time); -#endif +#endif diff --git a/src/kits/bluetooth/LocalDevice.cpp b/src/kits/bluetooth/LocalDevice.cpp index 886254629f..384febd05d 100644 --- a/src/kits/bluetooth/LocalDevice.cpp +++ b/src/kits/bluetooth/LocalDevice.cpp @@ -5,6 +5,7 @@ * All rights reserved. Distributed under the terms of the MIT License. */ + #include #include @@ -215,6 +216,7 @@ struct authentication_t { uint8 param; }; + status_t LocalDevice::SetAuthentication(bool authentication) { @@ -424,7 +426,8 @@ LocalDevice::_ReadBufferSize() { int8 bt_status = BT_ERROR; - BluetoothCommand<> BufferSize(OGF_INFORMATIONAL_PARAM, OCF_READ_BUFFER_SIZE); + BluetoothCommand<> BufferSize(OGF_INFORMATIONAL_PARAM, + OCF_READ_BUFFER_SIZE); BMessage request(BT_MSG_HANDLE_SIMPLE_REQUEST); @@ -501,6 +504,7 @@ struct pageTimeout_t { uint16 param; }; + status_t LocalDevice::_ReadTimeouts() { @@ -624,4 +628,4 @@ LocalDevice::~LocalDevice() } -} +} /* end namespace Bluetooth */ diff --git a/src/kits/bluetooth/RemoteDevice.cpp b/src/kits/bluetooth/RemoteDevice.cpp index bbd8fcfe5d..b078fc5ab3 100644 --- a/src/kits/bluetooth/RemoteDevice.cpp +++ b/src/kits/bluetooth/RemoteDevice.cpp @@ -4,6 +4,7 @@ * All rights reserved. Distributed under the terms of the MIT License. */ + #include #include #include @@ -24,15 +25,18 @@ #include "KitSupport.h" + #undef B_TRANSLATION_CONTEXT #define B_TRANSLATION_CONTEXT "RemoteDevice" namespace Bluetooth { + // TODO: Check headers for valid/reserved ranges static const uint16 invalidConnectionHandle = 0xF000; + bool RemoteDevice::IsTrustedDevice(void) { @@ -344,4 +348,4 @@ RemoteDevice::GetDeviceClass() return fDeviceClass; } -} +} /* end namespace Bluetooth */ diff --git a/src/kits/bluetooth/UI/ConnectionIncoming.cpp b/src/kits/bluetooth/UI/ConnectionIncoming.cpp index c955726edf..c4ac1961a1 100644 --- a/src/kits/bluetooth/UI/ConnectionIncoming.cpp +++ b/src/kits/bluetooth/UI/ConnectionIncoming.cpp @@ -1,10 +1,9 @@ /* * Copyright 2007-2008 Oliver Ruiz Dorantes, oliver.ruiz.dorantes_at_gmail.com - * * All rights reserved. Distributed under the terms of the MIT License. - * */ + #include @@ -81,4 +80,4 @@ bool ConnectionIncoming::QuitRequested() } -} +} /* end namespace Bluetooth */ diff --git a/src/kits/bluetooth/UI/PincodeWindow.cpp b/src/kits/bluetooth/UI/PincodeWindow.cpp index e2757df6c3..37d386c715 100644 --- a/src/kits/bluetooth/UI/PincodeWindow.cpp +++ b/src/kits/bluetooth/UI/PincodeWindow.cpp @@ -3,6 +3,7 @@ * All rights reserved. Distributed under the terms of the MIT License. */ + #include #include #include @@ -35,6 +36,7 @@ #define V_SEPARATION 10 #define BD_ADDR_LABEL "BD_ADDR: " + static const uint32 skMessageAcceptButton = 'acCp'; static const uint32 skMessageCancelButton = 'mVch'; @@ -46,6 +48,7 @@ namespace Bluetooth { #pragma mark - #endif + PincodeWindow::PincodeWindow(bdaddr_t address, hci_id hid) : BWindow(BRect(800, 200, 900, 300), "Pincode request", B_FLOATING_WINDOW, @@ -85,7 +88,8 @@ PincodeWindow::InitUI() fRemoteInfo = new BStringView("bdaddr","BD_ADDR: "); // TODO: Pincode cannot be more than 16 bytes - fPincodeText = new BTextControl("pincode TextControl", "PIN code:", "5555", NULL); + fPincodeText = new BTextControl("pincode TextControl", "PIN code:", + "5555", NULL); fAcceptButton = new BButton("fAcceptButton", "Pair", new BMessage(skMessageAcceptButton)); @@ -200,4 +204,4 @@ void PincodeWindow::SetBDaddr(BString address) } -} +} /* end namespace Bluetooth */