krpc 0.4.0.beta3 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -0
- data/lib/krpc/krpc.pb.rb +9 -4
- data/lib/krpc/service.rb +27 -7
- data/lib/krpc/types.rb +1 -0
- data/lib/krpc/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 25e7b20ee6bcbfa7627de7f237087851579de82d
|
4
|
+
data.tar.gz: 38f3f714068336a5746c49aa0bc5d57c091a0606
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9b9b61c74cec8182b71b35dedd36999a580bb320c2ec4badfa307fc0f3e36cfde4949e920b0c7f33ec4f38d99d790083af08b395018bffc47a5ba32f6d6b5850
|
7
|
+
data.tar.gz: 303714067ff33867ffb740bca452b9fa0a63869ab1bb5d45d823635f4fbbfdcee33ac6713ce0548be334784b5e18850e64d313ce2836bf30ca576249feefa901
|
data/README.md
CHANGED
data/lib/krpc/krpc.pb.rb
CHANGED
@@ -117,10 +117,11 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
117
117
|
value :BYTES, 9
|
118
118
|
value :CLASS, 100
|
119
119
|
value :ENUMERATION, 101
|
120
|
-
value :
|
121
|
-
value :
|
122
|
-
value :
|
123
|
-
value :
|
120
|
+
value :EVENT, 200
|
121
|
+
value :PROCEDURE_CALL, 201
|
122
|
+
value :STREAM, 202
|
123
|
+
value :STATUS, 203
|
124
|
+
value :SERVICES, 204
|
124
125
|
value :TUPLE, 300
|
125
126
|
value :LIST, 301
|
126
127
|
value :SET, 302
|
@@ -145,6 +146,9 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
145
146
|
add_message "krpc.schema.Stream" do
|
146
147
|
optional :id, :uint64, 1
|
147
148
|
end
|
149
|
+
add_message "krpc.schema.Event" do
|
150
|
+
optional :stream, :message, 1, "krpc.schema.Stream"
|
151
|
+
end
|
148
152
|
add_message "krpc.schema.Status" do
|
149
153
|
optional :version, :string, 1
|
150
154
|
optional :bytes_read, :uint64, 2
|
@@ -198,6 +202,7 @@ module KRPC
|
|
198
202
|
Dictionary = Google::Protobuf::DescriptorPool.generated_pool.lookup("krpc.schema.Dictionary").msgclass
|
199
203
|
DictionaryEntry = Google::Protobuf::DescriptorPool.generated_pool.lookup("krpc.schema.DictionaryEntry").msgclass
|
200
204
|
Stream = Google::Protobuf::DescriptorPool.generated_pool.lookup("krpc.schema.Stream").msgclass
|
205
|
+
Event = Google::Protobuf::DescriptorPool.generated_pool.lookup("krpc.schema.Event").msgclass
|
201
206
|
Status = Google::Protobuf::DescriptorPool.generated_pool.lookup("krpc.schema.Status").msgclass
|
202
207
|
end
|
203
208
|
end
|
data/lib/krpc/service.rb
CHANGED
@@ -75,28 +75,35 @@ module KRPC
|
|
75
75
|
|
76
76
|
include_rpc_method 'KRPC', 'GetStatus',
|
77
77
|
return_type: PB::Type.new(code: :STATUS),
|
78
|
-
xmldoc: "<doc
|
78
|
+
xmldoc: "<doc>\n<summary>\nReturns some information about the server, such as the version.\n</summary>\n</doc>",
|
79
79
|
**opts
|
80
80
|
include_rpc_method 'KRPC', 'GetServices',
|
81
81
|
return_type: PB::Type.new(code: :SERVICES),
|
82
|
-
xmldoc: "<doc
|
82
|
+
xmldoc: "<doc>\n<summary>\nReturns information on all services, procedures, classes, properties etc. provided by the server.\nCan be used by client libraries to automatically create functionality such as stubs.\n</summary>\n</doc>",
|
83
83
|
**opts
|
84
84
|
include_rpc_method 'KRPC', 'AddStream',
|
85
|
-
params: [
|
85
|
+
params: [
|
86
|
+
PB::Parameter.new(name: 'call', type: PB::Type.new(code: :PROCEDURE_CALL)),
|
87
|
+
PB::Parameter.new(name: 'start', type: PB::Type.new(code: :BOOL), default_value: "\x01")
|
88
|
+
],
|
86
89
|
return_type: PB::Type.new(code: :STREAM),
|
87
|
-
xmldoc: "<doc
|
90
|
+
xmldoc: "<doc>\n<summary>\nAdd a streaming request and return its identifier.\n</summary>\n</doc>",
|
91
|
+
**opts
|
92
|
+
include_rpc_method 'KRPC', 'StartStream',
|
93
|
+
params: [PB::Parameter.new(name: 'id', type: PB::Type.new(code: :UINT64))],
|
94
|
+
xmldoc: "<doc>\n<summary>\nStart a previously added streaming request.\n</summary>\n</doc>",
|
88
95
|
**opts
|
89
96
|
include_rpc_method 'KRPC', 'RemoveStream',
|
90
97
|
params: [PB::Parameter.new(name: 'id', type: PB::Type.new(code: :UINT64))],
|
91
|
-
xmldoc: "<doc
|
98
|
+
xmldoc: "<doc>\n<summary>\nRemove a streaming request.\n</summary>\n</doc>",
|
92
99
|
**opts
|
93
100
|
include_rpc_method 'KRPC', 'get_Clients',
|
94
101
|
return_type: PB::Type.new(code: :LIST, types: [PB::Type.new(code: :TUPLE, types: [PB::Type.new(code: :BYTES), PB::Type.new(code: :STRING), PB::Type.new(code: :STRING)])]),
|
95
|
-
xmldoc: "<doc
|
102
|
+
xmldoc: "<doc>\n<summary>\nA list of RPC clients that are currently connected to the server.\nEach entry in the list is a clients identifier, name and address.\n</summary>\n</doc>",
|
96
103
|
**opts
|
97
104
|
include_rpc_method 'KRPC', 'get_CurrentGameScene',
|
98
105
|
return_type: PB::Type.new(code: :ENUMERATION, service: 'Core', name: 'GameScene'),
|
99
|
-
xmldoc: "<doc
|
106
|
+
xmldoc: "<doc>\n<summary>\nGet the current game scene.\n</summary>\n</doc>",
|
100
107
|
**opts
|
101
108
|
include_rpc_method 'KRPC', 'GetClientID',
|
102
109
|
return_type: PB::Type.new(code: :BYTES),
|
@@ -106,6 +113,19 @@ module KRPC
|
|
106
113
|
return_type: PB::Type.new(code: :STRING),
|
107
114
|
xmldoc: "<doc>\n<summary>\nReturns the name of the current client.\nThis is an empty string if the client has no name.\n</summary>\n</doc>",
|
108
115
|
**opts
|
116
|
+
include_rpc_method 'KRPC', 'get_Paused',
|
117
|
+
return_type: PB::Type.new(code: :BOOL),
|
118
|
+
xmldoc: "<doc>\n<summary>\nWhether the game is paused.\n</summary>\n</doc>",
|
119
|
+
**opts
|
120
|
+
include_rpc_method 'KRPC', 'set_Paused',
|
121
|
+
params: [PB::Parameter.new(name: 'value', type: PB::Type.new(code: :BOOL))],
|
122
|
+
xmldoc: "<doc>\n<summary>\nWhether the game is paused.\n</summary>\n</doc>",
|
123
|
+
**opts
|
124
|
+
include_rpc_method 'KRPC', 'AddEvent',
|
125
|
+
params: [PB::Parameter.new(name: 'expression', type: PB::Type.new(code: :CLASS, service: 'KRPC', name: 'Expression'))],
|
126
|
+
return_type: PB::Type.new(code: :EVENT),
|
127
|
+
xmldoc: "<doc>\n<summary>\nCreate an event from a server side expression.\n</summary>\n</doc>",
|
128
|
+
**opts
|
109
129
|
end
|
110
130
|
end
|
111
131
|
end
|
data/lib/krpc/types.rb
CHANGED
data/lib/krpc/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: krpc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.0
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tomasz Więch
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-10-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: google-protobuf
|
@@ -174,9 +174,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
174
174
|
version: 2.1.0
|
175
175
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
176
176
|
requirements:
|
177
|
-
- - "
|
177
|
+
- - ">="
|
178
178
|
- !ruby/object:Gem::Version
|
179
|
-
version:
|
179
|
+
version: '0'
|
180
180
|
requirements: []
|
181
181
|
rubyforge_project:
|
182
182
|
rubygems_version: 2.6.8
|