1313 < a title ="Classes Reference "> </ a >
1414 < header >
1515 < div class ="content-wrapper ">
16- < p > < a href ="index.html "> RxBluetoothKit Docs</ a > (82 % documented)</ p >
16+ < p > < a href ="index.html "> RxBluetoothKit Docs</ a > (78 % documented)</ p >
1717 < p class ="header-right "> < a href ="https://github.com/Polidea/RxBluetoothKit "> < img src ="img/gh.png "/> View on GitHub</ a > </ p >
1818 </ div >
1919 </ header >
6565 < li class ="nav-group-task ">
6666 < a href ="Enums/BluetoothState.html "> BluetoothState</ a >
6767 </ li >
68+ < li class ="nav-group-task ">
69+ < a href ="Enums/StartAdvertisingResult.html "> StartAdvertisingResult</ a >
70+ </ li >
6871 </ ul >
6972 </ li >
7073 < li class ="nav-group-name ">
7174 < a href ="Extensions.html "> Extensions</ a >
7275 < ul class ="nav-group-tasks ">
76+ < li class ="nav-group-task ">
77+ < a href ="Extensions/PeripheralManager.html "> PeripheralManager</ a >
78+ </ li >
7379 < li class ="nav-group-task ">
7480 < a href ="Extensions/Reactive.html "> Reactive</ a >
7581 </ li >
104110 < li class ="nav-group-task ">
105111 < a href ="Protocols/DescriptorIdentifier.html "> DescriptorIdentifier</ a >
106112 </ li >
113+ < li class ="nav-group-task ">
114+ < a href ="Protocols/ManagerType.html "> ManagerType</ a >
115+ </ li >
107116 < li class ="nav-group-task ">
108117 < a href ="Protocols/ServiceIdentifier.html "> ServiceIdentifier</ a >
109118 </ li >
115124 < li class ="nav-group-task ">
116125 < a href ="Structs/AdvertisementData.html "> AdvertisementData</ a >
117126 </ li >
127+ < li class ="nav-group-task ">
128+ < a href ="Structs/CentralManagerRestoredState.html "> CentralManagerRestoredState</ a >
129+ </ li >
130+ < li class ="nav-group-task ">
131+ < a href ="Structs/PeripheralManagerRestoredState.html "> PeripheralManagerRestoredState</ a >
132+ </ li >
118133 < li class ="nav-group-task ">
119134 < a href ="Structs/RestoredState.html "> RestoredState</ a >
120135 </ li >
126141 < li class ="nav-group-task ">
127142 < a href ="Typealiases.html#/s:14RxBluetoothKit19DisconnectionReasona "> DisconnectionReason</ a >
128143 </ li >
144+ < li class ="nav-group-task ">
145+ < a href ="Typealiases.html#/s:14RxBluetoothKit32OnWillRestoreCentralManagerStatea "> OnWillRestoreCentralManagerState</ a >
146+ </ li >
147+ < li class ="nav-group-task ">
148+ < a href ="Typealiases.html#/s:14RxBluetoothKit35OnWillRestorePeripheralManagerStatea "> OnWillRestorePeripheralManagerState</ a >
149+ </ li >
129150 < li class ="nav-group-task ">
130151 < a href ="Typealiases.html#/s:14RxBluetoothKit18OnWillRestoreStatea "> OnWillRestoreState</ a >
131152 </ li >
153+ < li class ="nav-group-task ">
154+ < a href ="Typealiases.html#/s:14RxBluetoothKit25RestoredAdvertisementDataa "> RestoredAdvertisementData</ a >
155+ </ li >
132156 </ ul >
133157 </ li >
134158 </ ul >
@@ -161,15 +185,18 @@ <h1>Classes</h1>
161185You can start using this class by discovering available services of nearby peripherals. Before calling any
162186public < code > CentralManager</ code > ‘s functions you should make sure that Bluetooth is turned on and powered on. It can be done
163187by calling and observing returned value of < code > observeState()</ code > and then chaining it with < code > scanForPeripherals(_:options:)</ code > :</ p >
164- < pre class ="highlight swift "> < code > < span class ="n "> centralManager</ span > < span class ="o "> .</ span > < span class ="n "> observeState</ span >
188+ < pre class ="highlight swift "> < code > < span class ="k " > let </ span > < span class =" nv " > disposable </ span > < span class =" o " > = </ span > < span class =" n "> centralManager</ span > < span class ="o "> .</ span > < span class ="n "> observeState</ span >
165189 < span class ="o "> .</ span > < span class ="nf "> startWith</ span > < span class ="p "> (</ span > < span class ="n "> centralManager</ span > < span class ="o "> .</ span > < span class ="n "> state</ span > < span class ="p "> )</ span >
166190 < span class ="o "> .</ span > < span class ="n "> filter</ span > < span class ="p "> {</ span > < span class ="nv "> $0</ span > < span class ="o "> ==</ span > < span class ="o "> .</ span > < span class ="n "> poweredOn</ span > < span class ="p "> }</ span >
167191 < span class ="o "> .</ span > < span class ="nf "> take</ span > < span class ="p "> (</ span > < span class ="mi "> 1</ span > < span class ="p "> )</ span >
168192 < span class ="o "> .</ span > < span class ="n "> flatMap</ span > < span class ="p "> {</ span > < span class ="n "> centralManager</ span > < span class ="o "> .</ span > < span class ="nf "> scanForPeripherals</ span > < span class ="p "> (</ span > < span class ="kc "> nil</ span > < span class ="p "> )</ span > < span class ="p "> }</ span >
169193</ code > </ pre >
170194
171195< p > As a result you will receive < code > < a href ="Classes/ScannedPeripheral.html "> ScannedPeripheral</ a > </ code > which contains < code > < a href ="Classes/Peripheral.html "> Peripheral</ a > </ code > object, < code > < a href ="Structs/AdvertisementData.html "> AdvertisementData</ a > </ code > and
172- peripheral’s RSSI registered during discovery. You can then < code > establishConnection(_:options:)</ code > and do other operations.</ p >
196+ peripheral’s RSSI registered during discovery. You can then < code > establishConnection(_:options:)</ code > and do other operations.
197+ You can also simply stop scanning with just disposing it:</ p >
198+ < pre class ="highlight swift "> < code > < span class ="n "> disposable</ span > < span class ="o "> .</ span > < span class ="nf "> dispose</ span > < span class ="p "> ()</ span >
199+ </ code > </ pre >
173200< div class ="aside aside-seealso ">
174201 < p class ="aside-title "> Seealso</ p >
175202 < code > < a href ="Classes/Peripheral.html "> Peripheral</ a > </ code >
@@ -182,12 +209,12 @@ <h1>Classes</h1>
182209 < h4 > Declaration</ h4 >
183210 < div class ="language ">
184211 < p class ="aside-title "> Swift</ p >
185- < pre class ="highlight swift "> < code > < span class ="kd "> public</ span > < span class ="kd "> class</ span > < span class ="kt "> CentralManager</ span > </ code > </ pre >
212+ < pre class ="highlight swift "> < code > < span class ="kd "> public</ span > < span class ="kd "> class</ span > < span class ="kt "> CentralManager</ span > < span class =" p " > : </ span > < span class =" kt " > < a href =" Protocols/ManagerType.html " > ManagerType </ a > </ span > < /code > </ pre >
186213
187214 </ div >
188215 </ div >
189216 < div class ="slightly-smaller ">
190- < a href ="https://github.com/Polidea/RxBluetoothKit/tree/5.0.2 /Source/CentralManager.swift#L25-L326 "> Show on GitHub</ a >
217+ < a href ="https://github.com/Polidea/RxBluetoothKit/tree/5.1.0 /Source/CentralManager.swift#L27-L307 "> Show on GitHub</ a >
191218 </ div >
192219 </ section >
193220 </ div >
@@ -222,7 +249,7 @@ <h4>Declaration</h4>
222249 </ div >
223250 </ div >
224251 < div class ="slightly-smaller ">
225- < a href ="https://github.com/Polidea/RxBluetoothKit/tree/5.0.2 /Source/Characteristic.swift#L8-L182 "> Show on GitHub</ a >
252+ < a href ="https://github.com/Polidea/RxBluetoothKit/tree/5.1.0 /Source/Characteristic.swift#L6-L180 "> Show on GitHub</ a >
226253 </ div >
227254 </ section >
228255 </ div >
@@ -259,7 +286,7 @@ <h4>Declaration</h4>
259286 </ div >
260287 </ div >
261288 < div class ="slightly-smaller ">
262- < a href ="https://github.com/Polidea/RxBluetoothKit/tree/5.0.2 /Source/Descriptor.swift#L8-L104 "> Show on GitHub</ a >
289+ < a href ="https://github.com/Polidea/RxBluetoothKit/tree/5.1.0 /Source/Descriptor.swift#L8-L104 "> Show on GitHub</ a >
263290 </ div >
264291 </ section >
265292 </ div >
@@ -294,7 +321,7 @@ <h4>Declaration</h4>
294321 </ div >
295322 </ div >
296323 < div class ="slightly-smaller ">
297- < a href ="https://github.com/Polidea/RxBluetoothKit/tree/5.0.2 /Source/Logging.swift#L6-L95 "> Show on GitHub</ a >
324+ < a href ="https://github.com/Polidea/RxBluetoothKit/tree/5.1.0 /Source/Logging.swift#L6-L95 "> Show on GitHub</ a >
298325 </ div >
299326 </ section >
300327 </ div >
@@ -330,7 +357,7 @@ <h4>Declaration</h4>
330357 </ div >
331358 </ div >
332359 < div class ="slightly-smaller ">
333- < a href ="https://github.com/Polidea/RxBluetoothKit/tree/5.0.2 /Source/Peripheral.swift#L10-L856 "> Show on GitHub</ a >
360+ < a href ="https://github.com/Polidea/RxBluetoothKit/tree/5.1.0 /Source/Peripheral.swift#L10-L856 "> Show on GitHub</ a >
334361 </ div >
335362 </ section >
336363 </ div >
@@ -366,7 +393,7 @@ <h4>Declaration</h4>
366393 </ div >
367394 </ div >
368395 < div class ="slightly-smaller ">
369- < a href ="https://github.com/Polidea/RxBluetoothKit/tree/5.0.2 /Source/ScannedPeripheral.swift#L6-L22 "> Show on GitHub</ a >
396+ < a href ="https://github.com/Polidea/RxBluetoothKit/tree/5.1.0 /Source/ScannedPeripheral.swift#L6-L22 "> Show on GitHub</ a >
370397 </ div >
371398 </ section >
372399 </ div >
@@ -401,7 +428,7 @@ <h4>Declaration</h4>
401428 </ div >
402429 </ div >
403430 < div class ="slightly-smaller ">
404- < a href ="https://github.com/Polidea/RxBluetoothKit/tree/5.0.2 /Source/Service.swift#L7-L82 "> Show on GitHub</ a >
431+ < a href ="https://github.com/Polidea/RxBluetoothKit/tree/5.1.0 /Source/Service.swift#L6-L81 "> Show on GitHub</ a >
405432 </ div >
406433 </ section >
407434 </ div >
@@ -411,7 +438,7 @@ <h4>Declaration</h4>
411438 </ section >
412439 </ section >
413440 < section id ="footer ">
414- < p > © 2018 < a class ="link " href ="https://polidea.com " target ="_blank " rel ="external "> Polidea</ a > . All rights reserved. (Last updated: 2018-05-07 )</ p >
441+ < p > © 2018 < a class ="link " href ="https://polidea.com " target ="_blank " rel ="external "> Polidea</ a > . All rights reserved. (Last updated: 2018-05-25 )</ p >
415442 < p > Generated by < a class ="link " href ="https://github.com/realm/jazzy " target ="_blank " rel ="external "> jazzy ♪♫ v0.9.1</ a > , a < a class ="link " href ="http://realm.io " target ="_blank " rel ="external "> Realm</ a > project.</ p >
416443 </ section >
417444 </ article >
0 commit comments