1 /* 2 * Copyright 2008-2009, Oliver Ruiz Dorantes, <oliver.ruiz.dorantes@gmail.com> 3 * Copyright 2012-2013, Tri-Edge AI, <triedgeai@gmail.com> 4 * 5 * All rights reserved. Distributed under the terms of the MIT License. 6 */ 7 8 #ifndef BLUETOOTH_SETTINGS_VIEW_H 9 #define BLUETOOTH_SETTINGS_VIEW_H 10 11 #include "BluetoothSettings.h" 12 13 #include <View.h> 14 15 class BluetoothSettings; 16 class ExtendedLocalDeviceView; 17 18 class BBox; 19 class BMenuField; 20 class BPopUpMenu; 21 class BSlider; 22 class BOptionPopUp; 23 24 class BluetoothSettingsView : public BView { 25 public: 26 BluetoothSettingsView(const char* name); 27 virtual ~BluetoothSettingsView(); 28 29 virtual void AttachedToWindow(); 30 virtual void MessageReceived(BMessage* message); 31 32 33 private: 34 void _BuildLocalDevicesMenu(); 35 bool _SetDeviceClass(uint8 major, uint8 minor, 36 uint16 service); 37 void _MarkLocalDevice(LocalDevice* lDevice); 38 int _GetClassForMenu(); 39 40 protected: 41 BluetoothSettings fSettings; 42 43 float fDivider; 44 45 BOptionPopUp* fPolicyMenu; 46 BOptionPopUp* fClassMenu; 47 BMenuField* fLocalDevicesMenuField; 48 BPopUpMenu* fLocalDevicesMenu; 49 50 ExtendedLocalDeviceView* fExtDeviceView; 51 52 BSlider* fInquiryTimeControl; 53 54 }; 55 56 #endif // BLUETOOTH_SETTINGS_VIEW_H 57