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 23 class BluetoothSettingsView : public BView { 24 public: 25 BluetoothSettingsView(const char* name); 26 virtual ~BluetoothSettingsView(); 27 28 virtual void AttachedToWindow(); 29 virtual void MessageReceived(BMessage* message); 30 31 32 private: 33 void _BuildConnectionPolicy(); 34 void _BuildClassMenu(); 35 void _BuildLocalDevicesMenu(); 36 bool _SetDeviceClass(uint8 major, uint8 minor, 37 uint16 service); 38 void _MarkLocalDevice(LocalDevice* lDevice); 39 40 protected: 41 BluetoothSettings fSettings; 42 43 float fDivider; 44 45 BMenuField* fPolicyMenuField; 46 BPopUpMenu* fPolicyMenu; 47 BMenuField* fClassMenuField; 48 BPopUpMenu* fClassMenu; 49 BMenuField* fLocalDevicesMenuField; 50 BPopUpMenu* fLocalDevicesMenu; 51 52 ExtendedLocalDeviceView* fExtDeviceView; 53 54 BSlider* fInquiryTimeControl; 55 56 }; 57 58 #endif // BLUETOOTH_SETTINGS_VIEW_H 59