openplacos 0.0.5 → 0.0.6
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.
- data/VERSION +1 -1
- data/lib/openplacos/libdriver.rb +1 -0
- data/lib/openplacos/libplugin.rb +5 -12
- metadata +4 -4
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.6
|
data/lib/openplacos/libdriver.rb
CHANGED
@@ -101,6 +101,7 @@ module Openplacos
|
|
101
101
|
|
102
102
|
def initialize(path_, write_intfs_, read_intfs_) # path name , an array of string of interface wich write methods, an array of
|
103
103
|
@init = ""
|
104
|
+
@input = nil
|
104
105
|
|
105
106
|
(write_intfs_ & read_intfs_).each { |iface|
|
106
107
|
self.add_read_and_write(iface)
|
data/lib/openplacos/libplugin.rb
CHANGED
@@ -20,10 +20,10 @@ require 'dbus-openplacos'
|
|
20
20
|
module Openplacos
|
21
21
|
|
22
22
|
class Plugin
|
23
|
-
attr_reader
|
24
|
-
def initialize
|
23
|
+
attr_reader :opos ,:main ,:config
|
24
|
+
def initialize
|
25
25
|
@server_ready_queue = Queue.new
|
26
|
-
@
|
26
|
+
@id = nil
|
27
27
|
#DBus
|
28
28
|
if(ENV['DEBUG_OPOS'] ) ## Stand for debug
|
29
29
|
@clientbus = DBus::SessionBus.instance
|
@@ -37,11 +37,6 @@ module Openplacos
|
|
37
37
|
@opos.introspect
|
38
38
|
@opos.default_iface = "org.openplacos.plugins"
|
39
39
|
|
40
|
-
@id = @opos.register_plug(@path)[0]
|
41
|
-
puts "My plug ID: "+ @id.to_s
|
42
|
-
@config = @opos.getConfig(@id)[0]
|
43
|
-
@name = @config["name"]
|
44
|
-
|
45
40
|
@opos.on_signal("quit") do
|
46
41
|
self.quit
|
47
42
|
end
|
@@ -53,23 +48,21 @@ module Openplacos
|
|
53
48
|
end
|
54
49
|
|
55
50
|
def run
|
51
|
+
@id = @opos.register
|
56
52
|
@main = DBus::Main.new
|
57
53
|
@main << @clientbus
|
58
|
-
@opos.plugin_is_ready(@name, @id)
|
59
54
|
@main.run
|
60
55
|
end
|
61
56
|
|
62
57
|
def quit
|
63
58
|
@main.quit
|
64
|
-
puts "Quitting"
|
65
|
-
Process.exit!
|
66
59
|
end
|
67
60
|
|
68
61
|
def nonblock_run
|
62
|
+
@id = @opos.register
|
69
63
|
@mainthread = Thread.new{
|
70
64
|
@main = DBus::Main.new
|
71
65
|
@main << @clientbus
|
72
|
-
@opos.plugin_is_ready(@name, @id)
|
73
66
|
@main.run
|
74
67
|
}
|
75
68
|
if not @opos.is_server_ready[0]
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: openplacos
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 19
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 6
|
10
|
+
version: 0.0.6
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Openplacos Team
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-
|
18
|
+
date: 2011-05-07 00:00:00 +02:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|