2009-10-08 22:18:54 +00:00
|
|
|
//
|
|
|
|
// BTInquiryViewController.h
|
|
|
|
//
|
|
|
|
// Created by Matthias Ringwald on 10/8/09.
|
|
|
|
//
|
|
|
|
|
|
|
|
#import <UIKit/UIKit.h>
|
|
|
|
|
2009-10-11 21:16:00 +00:00
|
|
|
#include <btstack/hci_cmds.h> // for HCI_STATE
|
2009-10-08 22:18:54 +00:00
|
|
|
|
2009-10-18 17:38:11 +00:00
|
|
|
@class BTDevice;
|
|
|
|
@protocol BTInquiryDelegate;
|
|
|
|
|
2009-10-08 22:18:54 +00:00
|
|
|
typedef enum {
|
|
|
|
kInquiryInactive,
|
|
|
|
kInquiryActive,
|
|
|
|
kInquiryRemoteName
|
|
|
|
} InquiryState;
|
|
|
|
|
|
|
|
@interface BTInquiryViewController : UITableViewController {
|
|
|
|
NSMutableArray *devices;
|
2009-10-11 21:16:00 +00:00
|
|
|
HCI_STATE bluetoothState;
|
2009-10-08 22:18:54 +00:00
|
|
|
InquiryState inquiryState;
|
|
|
|
UIActivityIndicatorView *deviceActivity;
|
2009-10-11 21:16:00 +00:00
|
|
|
UIActivityIndicatorView *bluetoothActivity;
|
|
|
|
UIFont * deviceNameFont;
|
|
|
|
UIFont * macAddressFont;
|
2009-10-18 17:38:11 +00:00
|
|
|
id<BTInquiryDelegate> delegate;
|
2009-10-08 22:18:54 +00:00
|
|
|
}
|
2009-10-11 21:16:00 +00:00
|
|
|
- (void) setBluetoothState:(HCI_STATE)state;
|
|
|
|
- (void) setInquiryState:(InquiryState)state;
|
|
|
|
- (InquiryState) inquiryState;
|
|
|
|
- (HCI_STATE) bluetoothState;
|
2009-10-08 22:18:54 +00:00
|
|
|
@property (nonatomic, retain) NSMutableArray *devices;
|
2009-10-18 17:38:11 +00:00
|
|
|
@property (nonatomic, retain) id<BTInquiryDelegate> delegate;
|
|
|
|
@end
|
|
|
|
|
|
|
|
@protocol BTInquiryDelegate
|
|
|
|
-(void) deviceChoosen:(BTInquiryViewController *) inqView device:(BTDevice*) device;
|
2009-10-08 22:18:54 +00:00
|
|
|
@end
|