lib/qubitro-mqtt/client.rb in qubitro-mqtt-0.0.6 vs lib/qubitro-mqtt/client.rb in qubitro-mqtt-0.0.7

- old
+ new

@@ -33,15 +33,15 @@ attr_accessor :client_id # Number of seconds to wait for acknowledgement packets (default is 5 seconds) attr_accessor :ack_timeout - # Username to authenticate to the server with - attr_accessor :username + # Device ID to authenticate to the server with + attr_accessor :deviceId - # Password to authenticate to the server with - attr_accessor :password + # Device Token to authenticate to the server with + attr_accessor :deviceToken # The topic that the Will message is published to attr_accessor :will_topic # Contents of message that is sent by server when client disconnect @@ -66,12 +66,12 @@ :version => '3.1.1', :keep_alive => 15, :clean_session => true, :client_id => nil, :ack_timeout => 5, - :username => nil, - :password => nil, + :deviceId => nil, + :deviceToken => nil, :will_topic => nil, :will_payload => nil, :will_qos => 0, :will_retain => false, :ssl => false @@ -250,12 +250,12 @@ packet = MQTT::Packet::Connect.new( :version => @version, :clean_session => @clean_session, :keep_alive => @keep_alive, :client_id => @client_id, - :username => @username, - :password => @password, + :deviceId => @deviceId, + :deviceToken => @deviceToken, :will_topic => @will_topic, :will_payload => @will_payload, :will_qos => @will_qos, :will_retain => @will_retain ) @@ -577,11 +577,11 @@ end { :host => uri.host, :port => uri.port || nil, - :username => uri.user ? URI.unescape(uri.user) : nil, - :password => uri.password ? URI.unescape(uri.password) : nil, + :deviceId => uri.user ? URI.unescape(uri.user) : nil, + :deviceToken => uri.password ? URI.unescape(uri.password) : nil, :ssl => ssl } end def next_packet_id