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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 34cd7307210203562c7780105ae99214371fea14
4
- data.tar.gz: 4088ab02a044dd1bef3b60ae94df0d60ec877bab
3
+ metadata.gz: 25e7b20ee6bcbfa7627de7f237087851579de82d
4
+ data.tar.gz: 38f3f714068336a5746c49aa0bc5d57c091a0606
5
5
  SHA512:
6
- metadata.gz: 417a3bddec8125acbf6062fc3e2eaf520bc5edec63cc7738d984d658f631717eede00e3566f5880968e7019a0129912764c41d45cce1d8d7990ab53e28c9cd6f
7
- data.tar.gz: a0dce5abd9b4729299ab70d5c4316408f68c95e8ad02722ca5d993e3221fa0e0abab5aeb66e6cf3efc48730a82b3c8d591e196bd6fd86179c638d8c94e1eac1d
6
+ metadata.gz: 9b9b61c74cec8182b71b35dedd36999a580bb320c2ec4badfa307fc0f3e36cfde4949e920b0c7f33ec4f38d99d790083af08b395018bffc47a5ba32f6d6b5850
7
+ data.tar.gz: 303714067ff33867ffb740bca452b9fa0a63869ab1bb5d45d823635f4fbbfdcee33ac6713ce0548be334784b5e18850e64d313ce2836bf30ca576249feefa901
data/README.md CHANGED
@@ -10,6 +10,8 @@ Installation
10
10
 
11
11
  gem install krpc
12
12
 
13
+ or install the latest pre-release version (if [available](https://rubygems.org/gems/krpc/versions)): `gem install krpc --pre`
14
+
13
15
  Basic usage
14
16
  -------
15
17
 
@@ -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 :PROCEDURE_CALL, 200
121
- value :STREAM, 201
122
- value :STATUS, 202
123
- value :SERVICES, 203
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
@@ -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><summary>Gets a status message from the server containing information including the server’s version string and performance statistics.</summary></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><summary>Returns 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.</summary></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: [PB::Parameter.new(name: 'call', type: PB::Type.new(code: :PROCEDURE_CALL))],
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><summary>Add a streaming request and return its identifier.</summary></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><summary>Remove a streaming request.</summary></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><summary>A list of RPC clients that are currently connected to the server.\nEach entry in the list is a clients identifier, name and address.</summary></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><summary>Get the current game scene.</summary></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
@@ -18,6 +18,7 @@ module KRPC
18
18
  BYTES: Array
19
19
  }
20
20
  PROTOBUF_TO_RUBY_MESSAGE_TYPES = {
21
+ EVENT: PB::Event,
21
22
  PROCEDURE_CALL: PB::ProcedureCall,
22
23
  STREAM: PB::Stream,
23
24
  STATUS: PB::Status,
@@ -4,7 +4,7 @@ module KRPC
4
4
  MAJOR = 0
5
5
  MINOR = 4
6
6
  PATCH = 0
7
- LABEL = 'beta3'
7
+ LABEL = nil
8
8
  end
9
9
 
10
10
  VERSION = ([Version::MAJOR, Version::MINOR, Version::PATCH, Version::LABEL].compact * '.').freeze
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.beta3
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-09-23 00:00:00.000000000 Z
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: 1.3.1
179
+ version: '0'
180
180
  requirements: []
181
181
  rubyforge_project:
182
182
  rubygems_version: 2.6.8