druzy-protocol 0.0.2 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 106c765ba8473825b573f620679d362d459e83f9
4
- data.tar.gz: c965940fd139b4484d33db7cedca2b327208c5ed
3
+ metadata.gz: 539b9e733fb595056bb3f421452ad09b85b5b170
4
+ data.tar.gz: 59e0261aff526a962e7e3fb7918f67ff1762ef42
5
5
  SHA512:
6
- metadata.gz: 20c6487044df78e7d85979a8b9bca7686b68de9204d2c9e5960e4202a25ec5398eccd79eab9500cee7d12fff25a85fb89ebd61c0a273c70aef045e6e9bd78fdd
7
- data.tar.gz: 4386ceaecb620809bf8e60a014737e0364ce7518ff2b4b28929153d883d71c3f566bdcf267fd3bc0f4d1a1374d87c03336a9867aa052259a5f3cecf73cbe36e9
6
+ metadata.gz: b7023e03259b8ef4675662c4f0e5a19c3ee4624f5e8737eed6acdb4ea9a098b2b6736d7a02ee3e8bc3ea0874db093efb3b8faa733ea1cac1290a962d22e7d97b
7
+ data.tar.gz: 263d5c47419794c2cd19762b304cfcdae9861c796d0eb85b4f03df66c8ecd298f417f358df3b9ae5f4145fd551b05456e1727d8fee33c8ecb6f52ce15b84fd17
@@ -0,0 +1,42 @@
1
+ module Druzy
2
+ module Protocol
3
+
4
+ class Device
5
+ attr_reader :identifier, :protocol, :name, :icon
6
+
7
+ def initialize(identifier,protocol,name,icon)
8
+ @identifier=identifier
9
+ @protocol=protocol
10
+ @name=name
11
+ @icon=icon
12
+ end
13
+ end
14
+
15
+ class Renderer < Device
16
+ attr_accessor :duration, :time_position, :volume, :volume_min, :volume_max, :mute
17
+ def initialize(identifier, protocol, name, icon, duration=Time.at(0).utc, time_position=Time.at(0).utc,volume=100,volume_min=0,volume_max=100,mute=false)
18
+ super(identifier,protocol,name,icon)
19
+ @duration=duration
20
+ @time_position=time_position
21
+ @volume=volume
22
+ @volume_min=volume_min
23
+ @volume_max=volume_max
24
+ @mute=mute
25
+
26
+ end
27
+
28
+ def play
29
+ end
30
+
31
+ def pause
32
+ end
33
+
34
+ def stop
35
+ end
36
+
37
+ def send(file)
38
+ end
39
+ end
40
+
41
+ end
42
+ end
@@ -1,5 +1,5 @@
1
1
  module Druzy
2
2
  module Protocol
3
- VERSION = "0.0.2"
3
+ VERSION = "1.0.0"
4
4
  end
5
5
  end
@@ -1,4 +1,5 @@
1
1
  require 'druzy/protocol/version'
2
+ require 'druzy/protocol/device'
2
3
 
3
4
  module Druzy
4
5
  module Protocol
@@ -6,9 +7,11 @@ module Druzy
6
7
  class Discoverer
7
8
  @@discoverers=[]
8
9
  @@plugin_dir=File.dirname(__FILE__)+'/protocol/plugin/'
10
+ #@@plugin_dir="/usr/lib/ruby/vendor_ruby/druzy"+"/protocol/plugin/"
9
11
 
10
12
  def self.get_discoverers
11
13
  Dir[File.join(@@plugin_dir, '*.rb')].each {|file| require "druzy/protocol/plugin/"+File.basename(file,"*.rb")}
14
+ return @@discoverers
12
15
  end
13
16
 
14
17
  def self.inherited(klass)
@@ -28,9 +31,6 @@ module Druzy
28
31
  def restart_discoverer
29
32
  end
30
33
  end
31
-
32
- class Device
33
-
34
- end
34
+
35
35
  end
36
36
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: druzy-protocol
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonathan Le Greneur
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-03-31 00:00:00.000000000 Z
11
+ date: 2016-04-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -46,6 +46,7 @@ extensions: []
46
46
  extra_rdoc_files: []
47
47
  files:
48
48
  - lib/druzy/protocol.rb
49
+ - lib/druzy/protocol/device.rb
49
50
  - lib/druzy/protocol/version.rb
50
51
  homepage: https://github.com/druzy/ruby-druzy-protocol
51
52
  licenses: