Class: Rho::BluetoothManager

Inherits:
Object
  • Object
show all
Defined in:
lib/framework/autocomplete/Rho.rb,
lib/framework/rho/rhobluetooth.rb

Constant Summary collapse

OK =
'OK'
CANCEL =
'CANCEL'
ERROR =
'ERROR'
NOT_FOUND =
'NOT_FOUND'
ROLE_SERVER =
'ROLE_SERVER'
ROLE_CLIENT =
'ROLE_CLIENT'

Class Method Summary collapse

Class Method Details

.create_client_connection_to_device(server_name, callback_url) ⇒ Object

Enumerate near BT devices and check its name for equal with server_name If server_name device founded - make client connection with it and make BluetoothSession



92
93
# File 'lib/framework/rho/rhobluetooth.rb', line 92

def self.create_client_connection_to_device(server_name,callback_url)
end

.create_server_and_wait_for_connection(callback_url) ⇒ Object

make current device discoverable for other wait for client connection from other device after connect BluetoothSession maked



77
78
# File 'lib/framework/rho/rhobluetooth.rb', line 77

def self.create_server_and_wait_for_connection(callback_url)
end

.create_session(role, callback_url) ⇒ Object

show UI for select other device to connect make BluetoothSession with selected device



63
64
# File 'lib/framework/rho/rhobluetooth.rb', line 63

def self.create_session(role,callback_url)
end

.get_device_nameObject



456
457
# File 'lib/framework/autocomplete/Rho.rb', line 456

def self.get_device_name
end

.get_last_errorObject



458
459
# File 'lib/framework/autocomplete/Rho.rb', line 458

def self.get_last_error
end

.is_bluetooth_availableObject



450
451
# File 'lib/framework/autocomplete/Rho.rb', line 450

def self.is_bluetooth_available
end

.off_bluetoothObject



452
453
# File 'lib/framework/autocomplete/Rho.rb', line 452

def self.off_bluetooth
end

.set_device_name(name) ⇒ Object



454
455
# File 'lib/framework/autocomplete/Rho.rb', line 454

def self.set_device_name(name)
end

.stop_current_connection_processObject

stop current connection process started by (before BluetoothSession was created = callabck was executed!): create_server_and_wait_for_connection() or create_client_connection_to_device()



108
109
# File 'lib/framework/rho/rhobluetooth.rb', line 108

def self.stop_current_connection_process
end