//
// XPGLeDiscovery.h
// uEnergy
//
// XPGBatteryProtocol.h
// uEnergy
//
//
// Copyright (C) 2013-2014 CSR Ltd. All Rights Reserved.
//
// Initial development provided by XPG. Customisation and app development services
// available at www.xtremeprog.com
//
#import <Foundation/Foundation.h>
#import "XPGPeripheral.h"
#import <CoreBluetooth/CoreBluetooth.h>
@protocol XPGLeDiscoveryDelegate;
@interface XPGLeDiscovery : NSObject <CBCentralManagerDelegate> {
}
/*!
* @property delegate
*
* @discussion The delegate object that will receive Discovery events.
*
*/
@property (nonatomic, assign) NSObject <XPGLeDiscoveryDelegate> *delegate;
/*!
* @method removeAllFoundXPGPeripherals
*
*
* @discussion Refresh Found <code>XPGPeripheral</code>
*
*/
- (void)removeAllFoundXPGPeripherals;
/*!
* @method foundXPGPeripherals
*
*
* @discussion Return Array of <code>XPGPeripheral</code>
*
* @see XPGLeDiscovery:didDisconnectPeripheral:error:
*/
- (NSMutableArray*)foundXPGPeripherals;
/*!
* @method forgetSavedXPGPeripheral:
* @param peripheral A <code>XPGPeripheral</code>.
*
*
* @discussion forget Saved XPGPeripheral
*
* @see XPGLeDiscovery:didDisconnectPeripheral:error:
*/
- (void)forgetSavedXPGPeripheral:(XPGPeripheral *)peripheral;
/*!
* @method cancelPeripheralConnection:
*
* @param peripheral A <code>XPGPeripheral</code>.
*
* @discussion Cancel a pending connection or a connection to the peripheral.
*
* @see XPGLeDiscovery:didDisconnectPeripheral:error:
*/
- (void)cancelPeripheralConnection:(XPGPeripheral *)peripheral;
/*!
* @method connectPeripheral:
*
* @param peripheral A <code>XPGPeripheral</code>.
*
* @discussion Establish a connection to the peripheral. This method never times out.
* Use -[cancelPeripheralConnection:] to cancel a pending connection.
*
* @see XPGLeDiscovery:didConnectPeripheral:error:
* @see XPGLeDiscovery:didFailToConnectPeripheral:error:
*/
- (void)connectPeripheral:(XPGPeripheral *)peripheral;
/*!
* @method discoverPeripheralsWithServices:peripheralNames
*
* @param serviceUUIDs An array of UUIDs the APP is interested in. Only peripherals that advertise one or more of these services
will be returned. If nil, doesn’t filter peripherals with service UUIDs.
* @param names An array of names the APP is interested in. If nil, doesn’t filter peripherals with names.
* @discussion The relevant delegate callback will be invoked for each discovered peripheral. And the same peripheral
* may invoked the callback more than once in order to update advertising data.
*
* @see XPGLeDiscovery:didDiscoverPeripheral:
*/
- (NSError *)discoverPeripheralsWithServices:(NSArray *)serviceUUIDs peripheralNames:(NSArray *)names;
/**
* saveConnectedPeripheral:withType:
*
* @param xbgPer save XPGPeripheral
* @param type type of XPGPeripheral
*/
- (void)saveConnectedPeripheral:(XPGPeripheral *)xbgPer withType:(NSString *)type;
/*!
* @method getSavedPeripherals
*
* @discussion Return Array of NSString
*
*/
- (NSMutableArray *)getSavedPeripherals;
/**
* getSavedPeripheralsWithType:
*
* @param type Search Type
*
* @return array of SavedPeripherals
*/
- (NSMutableArray *)getSavedPeripheralsWithType:(NSString *)type;
/*!
* @method removeSavedPeripheralAtIndex
*
* @param index the index of Saved Peripheral
*/
- (void)removeSavedPeripheralAtIndex:(NSInteger)index;
/**
* removeSavedPeripheralAtIndex:withType:
*
* @param index the index of Saved Peripheral
* @param type
*/
- (void)removeSavedPeripheralAtIndex:(NSInteger)index withType:(NSString *)type;
/*!
* @method sharedXPGLeDiscoveryWithDelegate:
*
*
* @discussion Initializes or get the XPGLeDiscovery instance ,you must assign the delegate later.
*/
+ (XPGLeDiscovery *)sharedXPGLeDiscovery;
/*!
* @method sharedXPGLeDiscoveryWithDelegate:
*
* @param delegate The delegate to receive XPGLeDiscovery events.
*
* @discussion Initializes or get the XPGLeDiscovery instance with a specified delegate. If you use +[sharedXPGLeDiscovery] to get XPGLeDiscovery instance
* instead this method, you must assign the delegate later.
*/
+ (XPGLeDiscovery *)sharedXPGLeDiscoveryWithDelegate:(NSObject<XPGLeDiscoveryDelegate>*)delegate;
/*!
* @method stopDiscoverPeripherals:
*
* @discussion Stop discovering peripherals.
*/
- (void) stopDiscoverPeripherals;
/*!
* @method version
*
* @discussion Return SDK version.
*/
- (NSString *) version;
@end
@protocol XPGLeDiscoveryDelegate
@optional
/*!
* @method XPGLeDiscovery:didDiscoverPeripheral:
*
* @param manager The XPGLeDiscovery providing this information.
* @param peripheral A <code>XPGPeripheral</code> object.
*
* @discussion Invoked when XPGLeDiscovery discovers a peripheral.
*
* @seealso XPGPeripheral.h
*/
- (void)XPGLeDiscovery: (XPGLeDiscovery *)manager didDiscoverPeripheral:(XPGPeripheral *)peripheral;
/*!
* @method XPGLeDiscovery:didConnectPeripheral:
*
* @param manager The XPGLeDiscovery providing this information.
* @param peripheral The <code>XPGPeripheral</code> that has connected.
*
* @discussion Invoked whenever a connection is successfully created with the peripheral.
*/
- (void)XPGLeDiscovery: (XPGLeDiscovery *)manager didConnectPeripheral:(XPGPeripheral *)peripheral;
/*!
* @method XPGLeDiscovery:didDisconnectPeripheral:error:
*
* @param manager The XPGLeDiscovery providing this information.
* @param peripheral The <code>XPGPeripheral</code> that has connected.
*
* @discussion Invoked whenever a connection is successfully created with the peripheral.
*/
- (void)XPGLeDiscovery: (XPGLeDiscovery *)manager didDisconnectPeripheral:(XPGPeripheral *)peripheral error:(NSError *)error;
/*!
* @method XPGLeDiscovery:didFailToConnectPeripheral:error:
*
* @param manager The XPGLeDiscovery providing this information.
* @param peripheral The <code>XPGPeripheral</code> that has failed to connect
* @param error The cause of the failure.
*
* @discussion Invoked whenever it fails to create a connection with the peripheral.
*/
- (void)XPGLeDiscovery: (XPGLeDiscovery *)manager didFailToConnectPeripheral:(XPGPeripheral *)peripheral error:(NSError *)error;
/*!
* @method XPGLeDiscovery:didErrorReport:error:
*
* @param manager The XPGLeDiscovery providing this information.
* @param error The cause of the failure.
*
* @discussion Invoked whenever XPGLeDiscovery raise an unexpected issue.
*/
- (void)XPGLeDiscovery:(XPGLeDiscovery *)manager didErrorReport:(NSError *)error;
@end
没有合适的资源?快使用搜索试试~ 我知道了~
iOS-App-Source-Code-v1.6.7.4.zip_ios app_ios code
共259个文件
png:120个
h:52个
m:49个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 6 浏览量
2022-09-20
21:44:38
上传
评论
收藏 4.3MB ZIP 举报
温馨提示
an application code base on ios, for bluetooth low energy
资源详情
资源评论
资源推荐
收起资源包目录
iOS-App-Source-Code-v1.6.7.4.zip_ios app_ios code (259个子文件)
contents 5KB
.DS_Store 6KB
.DS_Store 6KB
.DS_Store 6KB
.DS_Store 6KB
.DS_Store 6KB
.DS_Store 6KB
.DS_Store 6KB
XPGLeDiscovery.h 7KB
XPGGlucoseProtocol.h 7KB
XPGRunningProtocol.h 6KB
XPGCyclingProtocol.h 5KB
XPGLeService.h 5KB
XPGThermometerProtocol.h 4KB
XPGDeviceInfoProtocol.h 4KB
XPGBloodPressureProtocol.h 3KB
XPGHeartRateProtocol.h 3KB
CoreDataController.h 2KB
CoreDataConstants.h 2KB
XPGLinkLossProtocol.h 2KB
XPGPeripheral.h 2KB
Glucose.h 2KB
uSecurityViewController.h 2KB
XPGTxPowerProtocol.h 1KB
XPGBatteryProtocol.h 1KB
uConstance.h 1KB
SelectorView.h 1KB
GlucoseContext.h 994B
XPGDataUtilities.h 917B
uRunningViewController.h 887B
uDevicesViewController.h 837B
XPGPhoneAlertProtocol.h 816B
XPGBluetooth.h 807B
uRootViewController.h 803B
uCyclingViewController.h 785B
uGlucoseViewController.h 775B
RootService.h 753B
uBPViewController.h 741B
LeReciver.h 714B
CoreDataManager.h 675B
Temperature.h 666B
uInfoViewController.h 652B
uMainViewController.h 624B
AboutViewController.h 610B
uHRViewController.h 566B
uHTViewController.h 536B
uFunctionViewController.h 521B
AlertViewBlock.h 454B
SettingsViewController.h 427B
uRootNavigationController.h 391B
DevicesCell.h 388B
RunningCell.h 379B
UserGuideViewController.h 377B
LServiceUtility.h 377B
XPGAppDelegate.h 365B
GuideCell.h 364B
MainTitleCell.h 334B
GlucoseContextService.h 286B
GlucoseService.h 263B
CoreDataProtocol.h 238B
uGlucoseViewController.m 21KB
XPGLeDiscovery.m 12KB
uCyclingViewController.m 12KB
CoreDataController.m 11KB
uDevicesViewController.m 10KB
XPGGlucoseProtocol.m 9KB
uRunningViewController.m 9KB
SelectorView.m 8KB
XPGDeviceInfoProtocol.m 7KB
uSecurityViewController.m 7KB
XPGDataUtilities.m 7KB
uRootNavigationController.m 6KB
uMainViewController.m 6KB
uHTViewController.m 6KB
uBPViewController.m 6KB
XPGRunningProtocol.m 5KB
uInfoViewController.m 5KB
XPGCyclingProtocol.m 5KB
LeReciver.m 5KB
uHRViewController.m 5KB
XPGLeService.m 5KB
XPGBloodPressureProtocol.m 4KB
XPGHeartRateProtocol.m 4KB
XPGThermometerProtocol.m 3KB
uRootViewController.m 3KB
XPGAppDelegate.m 3KB
SettingsViewController.m 3KB
UserGuideViewController.m 3KB
XPGPeripheral.m 3KB
CoreDataManager.m 3KB
RootService.m 2KB
AboutViewController.m 2KB
uFunctionViewController.m 2KB
LServiceUtility.m 2KB
XPGLinkLossProtocol.m 1KB
XPGBatteryProtocol.m 1KB
AlertViewBlock.m 1010B
XPGTxPowerProtocol.m 852B
XPGPhoneAlertProtocol.m 776B
Glucose.m 771B
共 259 条
- 1
- 2
- 3
Kinonoyomeo
- 粉丝: 75
- 资源: 1万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论0