1use crate::messages::*;
2#[cfg(feature = "reflection")]
3use protobuf::MessageFull;
4pub struct Stubs<TChannel: crate::Channel> {
6 channel: TChannel,
7}
8impl<TChannel: crate::Channel> From<TChannel> for Stubs<TChannel> {
9 fn from(channel: TChannel) -> Self {
11 Self { channel }
12 }
13}
14impl<TChannel: crate::Channel> Stubs<TChannel> {
15 pub fn core(&mut self) -> crate::stubs::Core<TChannel> {
17 crate::stubs::Core::new(&mut self.channel)
18 }
19 pub fn remote_fortress_reader(
21 &mut self,
22 ) -> crate::stubs::RemoteFortressReader<TChannel> {
23 crate::stubs::RemoteFortressReader::new(&mut self.channel)
24 }
25 pub fn isoworldremote(&mut self) -> crate::stubs::Isoworldremote<TChannel> {
27 crate::stubs::Isoworldremote::new(&mut self.channel)
28 }
29 pub fn rename(&mut self) -> crate::stubs::Rename<TChannel> {
31 crate::stubs::Rename::new(&mut self.channel)
32 }
33}
34#[cfg(feature = "reflection")]
35impl<TChannel: crate::Channel> crate::reflection::StubReflection for Stubs<TChannel> {
36 fn list_methods() -> Vec<crate::reflection::RemoteProcedureDescriptor> {
37 let mut methods = Vec::new();
38 methods.extend(Core::<TChannel>::list_methods());
39 methods.extend(Core::<TChannel>::list_methods());
40 methods.extend(Core::<TChannel>::list_methods());
41 methods.extend(Core::<TChannel>::list_methods());
42 methods
43 }
44}
45pub struct Core<'a, TChannel: crate::Channel> {
47 pub channel: &'a mut TChannel,
49}
50impl<'a, TChannel: crate::Channel> Core<'a, TChannel> {
51 pub fn new(channel: &'a mut TChannel) -> Self {
53 Self { channel }
54 }
55 pub fn bind_method(
57 &mut self,
58 request: CoreBindRequest,
59 ) -> Result<crate::Reply<CoreBindReply>, TChannel::TError> {
60 let _response: crate::Reply<CoreBindReply> = self
61 .channel
62 .request("".to_string(), "BindMethod".to_string(), request)?;
63 Ok(_response)
64 }
65 pub fn core_resume(&mut self) -> Result<crate::Reply<i32>, TChannel::TError> {
67 let request = EmptyMessage::new();
68 let _response: crate::Reply<IntMessage> = self
69 .channel
70 .request("".to_string(), "CoreResume".to_string(), request)?;
71 let _response = crate::Reply {
72 reply: _response.value(),
73 fragments: _response.fragments,
74 };
75 Ok(_response)
76 }
77 pub fn core_suspend(&mut self) -> Result<crate::Reply<i32>, TChannel::TError> {
79 let request = EmptyMessage::new();
80 let _response: crate::Reply<IntMessage> = self
81 .channel
82 .request("".to_string(), "CoreSuspend".to_string(), request)?;
83 let _response = crate::Reply {
84 reply: _response.value(),
85 fragments: _response.fragments,
86 };
87 Ok(_response)
88 }
89 pub fn get_df_version(&mut self) -> Result<crate::Reply<String>, TChannel::TError> {
91 let request = EmptyMessage::new();
92 let _response: crate::Reply<StringMessage> = self
93 .channel
94 .request("".to_string(), "GetDFVersion".to_string(), request)?;
95 let _response = crate::Reply {
96 reply: _response.value().to_string(),
97 fragments: _response.fragments,
98 };
99 Ok(_response)
100 }
101 pub fn get_version(&mut self) -> Result<crate::Reply<String>, TChannel::TError> {
103 let request = EmptyMessage::new();
104 let _response: crate::Reply<StringMessage> = self
105 .channel
106 .request("".to_string(), "GetVersion".to_string(), request)?;
107 let _response = crate::Reply {
108 reply: _response.value().to_string(),
109 fragments: _response.fragments,
110 };
111 Ok(_response)
112 }
113 pub fn get_world_info(
115 &mut self,
116 ) -> Result<crate::Reply<GetWorldInfoOut>, TChannel::TError> {
117 let request = EmptyMessage::new();
118 let _response: crate::Reply<GetWorldInfoOut> = self
119 .channel
120 .request("".to_string(), "GetWorldInfo".to_string(), request)?;
121 Ok(_response)
122 }
123 pub fn list_enums(
125 &mut self,
126 ) -> Result<crate::Reply<ListEnumsOut>, TChannel::TError> {
127 let request = EmptyMessage::new();
128 let _response: crate::Reply<ListEnumsOut> = self
129 .channel
130 .request("".to_string(), "ListEnums".to_string(), request)?;
131 Ok(_response)
132 }
133 pub fn list_job_skills(
135 &mut self,
136 ) -> Result<crate::Reply<ListJobSkillsOut>, TChannel::TError> {
137 let request = EmptyMessage::new();
138 let _response: crate::Reply<ListJobSkillsOut> = self
139 .channel
140 .request("".to_string(), "ListJobSkills".to_string(), request)?;
141 Ok(_response)
142 }
143 pub fn list_materials(
145 &mut self,
146 request: ListMaterialsIn,
147 ) -> Result<crate::Reply<ListMaterialsOut>, TChannel::TError> {
148 let _response: crate::Reply<ListMaterialsOut> = self
149 .channel
150 .request("".to_string(), "ListMaterials".to_string(), request)?;
151 Ok(_response)
152 }
153 pub fn list_squads(
155 &mut self,
156 request: ListSquadsIn,
157 ) -> Result<crate::Reply<ListSquadsOut>, TChannel::TError> {
158 let _response: crate::Reply<ListSquadsOut> = self
159 .channel
160 .request("".to_string(), "ListSquads".to_string(), request)?;
161 Ok(_response)
162 }
163 pub fn list_units(
165 &mut self,
166 request: ListUnitsIn,
167 ) -> Result<crate::Reply<ListUnitsOut>, TChannel::TError> {
168 let _response: crate::Reply<ListUnitsOut> = self
169 .channel
170 .request("".to_string(), "ListUnits".to_string(), request)?;
171 Ok(_response)
172 }
173 pub fn run_command(
175 &mut self,
176 request: CoreRunCommandRequest,
177 ) -> Result<crate::Reply<()>, TChannel::TError> {
178 let _response: crate::Reply<EmptyMessage> = self
179 .channel
180 .request("".to_string(), "RunCommand".to_string(), request)?;
181 let _response = crate::Reply {
182 reply: (),
183 fragments: _response.fragments,
184 };
185 Ok(_response)
186 }
187 pub fn run_lua(
189 &mut self,
190 request: CoreRunLuaRequest,
191 ) -> Result<crate::Reply<StringListMessage>, TChannel::TError> {
192 let _response: crate::Reply<StringListMessage> = self
193 .channel
194 .request("".to_string(), "RunLua".to_string(), request)?;
195 Ok(_response)
196 }
197 pub fn set_unit_labors(
199 &mut self,
200 request: SetUnitLaborsIn,
201 ) -> Result<crate::Reply<()>, TChannel::TError> {
202 let _response: crate::Reply<EmptyMessage> = self
203 .channel
204 .request("".to_string(), "SetUnitLabors".to_string(), request)?;
205 let _response = crate::Reply {
206 reply: (),
207 fragments: _response.fragments,
208 };
209 Ok(_response)
210 }
211}
212#[cfg(feature = "reflection")]
213impl<TChannel: crate::Channel> crate::reflection::StubReflection for Core<'_, TChannel> {
214 fn list_methods() -> Vec<crate::reflection::RemoteProcedureDescriptor> {
215 vec![
216 crate ::reflection::RemoteProcedureDescriptor { name : "BindMethod"
217 .to_string(), plugin_name : "".to_string(), input_type :
218 CoreBindRequest::descriptor().full_name().to_string(), output_type :
219 CoreBindReply::descriptor().full_name().to_string(), }, crate
220 ::reflection::RemoteProcedureDescriptor { name : "CoreResume".to_string(),
221 plugin_name : "".to_string(), input_type : EmptyMessage::descriptor()
222 .full_name().to_string(), output_type : IntMessage::descriptor().full_name()
223 .to_string(), }, crate ::reflection::RemoteProcedureDescriptor { name :
224 "CoreSuspend".to_string(), plugin_name : "".to_string(), input_type :
225 EmptyMessage::descriptor().full_name().to_string(), output_type :
226 IntMessage::descriptor().full_name().to_string(), }, crate
227 ::reflection::RemoteProcedureDescriptor { name : "GetDFVersion".to_string(),
228 plugin_name : "".to_string(), input_type : EmptyMessage::descriptor()
229 .full_name().to_string(), output_type : StringMessage::descriptor()
230 .full_name().to_string(), }, crate ::reflection::RemoteProcedureDescriptor {
231 name : "GetVersion".to_string(), plugin_name : "".to_string(), input_type :
232 EmptyMessage::descriptor().full_name().to_string(), output_type :
233 StringMessage::descriptor().full_name().to_string(), }, crate
234 ::reflection::RemoteProcedureDescriptor { name : "GetWorldInfo".to_string(),
235 plugin_name : "".to_string(), input_type : EmptyMessage::descriptor()
236 .full_name().to_string(), output_type : GetWorldInfoOut::descriptor()
237 .full_name().to_string(), }, crate ::reflection::RemoteProcedureDescriptor {
238 name : "ListEnums".to_string(), plugin_name : "".to_string(), input_type :
239 EmptyMessage::descriptor().full_name().to_string(), output_type :
240 ListEnumsOut::descriptor().full_name().to_string(), }, crate
241 ::reflection::RemoteProcedureDescriptor { name : "ListJobSkills".to_string(),
242 plugin_name : "".to_string(), input_type : EmptyMessage::descriptor()
243 .full_name().to_string(), output_type : ListJobSkillsOut::descriptor()
244 .full_name().to_string(), }, crate ::reflection::RemoteProcedureDescriptor {
245 name : "ListMaterials".to_string(), plugin_name : "".to_string(), input_type
246 : ListMaterialsIn::descriptor().full_name().to_string(), output_type :
247 ListMaterialsOut::descriptor().full_name().to_string(), }, crate
248 ::reflection::RemoteProcedureDescriptor { name : "ListSquads".to_string(),
249 plugin_name : "".to_string(), input_type : ListSquadsIn::descriptor()
250 .full_name().to_string(), output_type : ListSquadsOut::descriptor()
251 .full_name().to_string(), }, crate ::reflection::RemoteProcedureDescriptor {
252 name : "ListUnits".to_string(), plugin_name : "".to_string(), input_type :
253 ListUnitsIn::descriptor().full_name().to_string(), output_type :
254 ListUnitsOut::descriptor().full_name().to_string(), }, crate
255 ::reflection::RemoteProcedureDescriptor { name : "RunCommand".to_string(),
256 plugin_name : "".to_string(), input_type :
257 CoreRunCommandRequest::descriptor().full_name().to_string(), output_type :
258 EmptyMessage::descriptor().full_name().to_string(), }, crate
259 ::reflection::RemoteProcedureDescriptor { name : "RunLua".to_string(),
260 plugin_name : "".to_string(), input_type : CoreRunLuaRequest::descriptor()
261 .full_name().to_string(), output_type : StringListMessage::descriptor()
262 .full_name().to_string(), }, crate ::reflection::RemoteProcedureDescriptor {
263 name : "SetUnitLabors".to_string(), plugin_name : "".to_string(), input_type
264 : SetUnitLaborsIn::descriptor().full_name().to_string(), output_type :
265 EmptyMessage::descriptor().full_name().to_string(), },
266 ]
267 }
268}
269pub struct RemoteFortressReader<'a, TChannel: crate::Channel> {
271 pub channel: &'a mut TChannel,
273}
274impl<'a, TChannel: crate::Channel> RemoteFortressReader<'a, TChannel> {
275 pub fn new(channel: &'a mut TChannel) -> Self {
277 Self { channel }
278 }
279 pub fn check_hashes(&mut self) -> Result<crate::Reply<()>, TChannel::TError> {
281 let request = EmptyMessage::new();
282 let _response: crate::Reply<EmptyMessage> = self
283 .channel
284 .request(
285 "RemoteFortressReader".to_string(),
286 "CheckHashes".to_string(),
287 request,
288 )?;
289 let _response = crate::Reply {
290 reply: (),
291 fragments: _response.fragments,
292 };
293 Ok(_response)
294 }
295 pub fn copy_screen(
297 &mut self,
298 ) -> Result<crate::Reply<ScreenCapture>, TChannel::TError> {
299 let request = EmptyMessage::new();
300 let _response: crate::Reply<ScreenCapture> = self
301 .channel
302 .request(
303 "RemoteFortressReader".to_string(),
304 "CopyScreen".to_string(),
305 request,
306 )?;
307 Ok(_response)
308 }
309 pub fn get_block_list(
311 &mut self,
312 request: BlockRequest,
313 ) -> Result<crate::Reply<BlockList>, TChannel::TError> {
314 let _response: crate::Reply<BlockList> = self
315 .channel
316 .request(
317 "RemoteFortressReader".to_string(),
318 "GetBlockList".to_string(),
319 request,
320 )?;
321 Ok(_response)
322 }
323 pub fn get_building_def_list(
325 &mut self,
326 ) -> Result<crate::Reply<BuildingList>, TChannel::TError> {
327 let request = EmptyMessage::new();
328 let _response: crate::Reply<BuildingList> = self
329 .channel
330 .request(
331 "RemoteFortressReader".to_string(),
332 "GetBuildingDefList".to_string(),
333 request,
334 )?;
335 Ok(_response)
336 }
337 pub fn get_creature_raws(
339 &mut self,
340 ) -> Result<crate::Reply<CreatureRawList>, TChannel::TError> {
341 let request = EmptyMessage::new();
342 let _response: crate::Reply<CreatureRawList> = self
343 .channel
344 .request(
345 "RemoteFortressReader".to_string(),
346 "GetCreatureRaws".to_string(),
347 request,
348 )?;
349 Ok(_response)
350 }
351 pub fn get_game_validity(&mut self) -> Result<crate::Reply<bool>, TChannel::TError> {
353 let request = EmptyMessage::new();
354 let _response: crate::Reply<SingleBool> = self
355 .channel
356 .request(
357 "RemoteFortressReader".to_string(),
358 "GetGameValidity".to_string(),
359 request,
360 )?;
361 let _response = crate::Reply {
362 reply: _response.Value(),
363 fragments: _response.fragments,
364 };
365 Ok(_response)
366 }
367 pub fn get_growth_list(
369 &mut self,
370 ) -> Result<crate::Reply<MaterialList>, TChannel::TError> {
371 let request = EmptyMessage::new();
372 let _response: crate::Reply<MaterialList> = self
373 .channel
374 .request(
375 "RemoteFortressReader".to_string(),
376 "GetGrowthList".to_string(),
377 request,
378 )?;
379 Ok(_response)
380 }
381 pub fn get_item_list(
383 &mut self,
384 ) -> Result<crate::Reply<MaterialList>, TChannel::TError> {
385 let request = EmptyMessage::new();
386 let _response: crate::Reply<MaterialList> = self
387 .channel
388 .request(
389 "RemoteFortressReader".to_string(),
390 "GetItemList".to_string(),
391 request,
392 )?;
393 Ok(_response)
394 }
395 pub fn get_language(&mut self) -> Result<crate::Reply<Language>, TChannel::TError> {
397 let request = EmptyMessage::new();
398 let _response: crate::Reply<Language> = self
399 .channel
400 .request(
401 "RemoteFortressReader".to_string(),
402 "GetLanguage".to_string(),
403 request,
404 )?;
405 Ok(_response)
406 }
407 pub fn get_map_info(&mut self) -> Result<crate::Reply<MapInfo>, TChannel::TError> {
409 let request = EmptyMessage::new();
410 let _response: crate::Reply<MapInfo> = self
411 .channel
412 .request(
413 "RemoteFortressReader".to_string(),
414 "GetMapInfo".to_string(),
415 request,
416 )?;
417 Ok(_response)
418 }
419 pub fn get_material_list(
421 &mut self,
422 ) -> Result<crate::Reply<MaterialList>, TChannel::TError> {
423 let request = EmptyMessage::new();
424 let _response: crate::Reply<MaterialList> = self
425 .channel
426 .request(
427 "RemoteFortressReader".to_string(),
428 "GetMaterialList".to_string(),
429 request,
430 )?;
431 Ok(_response)
432 }
433 pub fn get_partial_creature_raws(
435 &mut self,
436 request: ListRequest,
437 ) -> Result<crate::Reply<CreatureRawList>, TChannel::TError> {
438 let _response: crate::Reply<CreatureRawList> = self
439 .channel
440 .request(
441 "RemoteFortressReader".to_string(),
442 "GetPartialCreatureRaws".to_string(),
443 request,
444 )?;
445 Ok(_response)
446 }
447 pub fn get_partial_plant_raws(
449 &mut self,
450 request: ListRequest,
451 ) -> Result<crate::Reply<PlantRawList>, TChannel::TError> {
452 let _response: crate::Reply<PlantRawList> = self
453 .channel
454 .request(
455 "RemoteFortressReader".to_string(),
456 "GetPartialPlantRaws".to_string(),
457 request,
458 )?;
459 Ok(_response)
460 }
461 pub fn get_pause_state(&mut self) -> Result<crate::Reply<bool>, TChannel::TError> {
463 let request = EmptyMessage::new();
464 let _response: crate::Reply<SingleBool> = self
465 .channel
466 .request(
467 "RemoteFortressReader".to_string(),
468 "GetPauseState".to_string(),
469 request,
470 )?;
471 let _response = crate::Reply {
472 reply: _response.Value(),
473 fragments: _response.fragments,
474 };
475 Ok(_response)
476 }
477 pub fn get_plant_list(
479 &mut self,
480 request: BlockRequest,
481 ) -> Result<crate::Reply<PlantList>, TChannel::TError> {
482 let _response: crate::Reply<PlantList> = self
483 .channel
484 .request(
485 "RemoteFortressReader".to_string(),
486 "GetPlantList".to_string(),
487 request,
488 )?;
489 Ok(_response)
490 }
491 pub fn get_plant_raws(
493 &mut self,
494 ) -> Result<crate::Reply<PlantRawList>, TChannel::TError> {
495 let request = EmptyMessage::new();
496 let _response: crate::Reply<PlantRawList> = self
497 .channel
498 .request(
499 "RemoteFortressReader".to_string(),
500 "GetPlantRaws".to_string(),
501 request,
502 )?;
503 Ok(_response)
504 }
505 pub fn get_region_maps(
507 &mut self,
508 ) -> Result<crate::Reply<RegionMaps>, TChannel::TError> {
509 let request = EmptyMessage::new();
510 let _response: crate::Reply<RegionMaps> = self
511 .channel
512 .request(
513 "RemoteFortressReader".to_string(),
514 "GetRegionMaps".to_string(),
515 request,
516 )?;
517 Ok(_response)
518 }
519 pub fn get_region_maps_new(
521 &mut self,
522 ) -> Result<crate::Reply<RegionMaps>, TChannel::TError> {
523 let request = EmptyMessage::new();
524 let _response: crate::Reply<RegionMaps> = self
525 .channel
526 .request(
527 "RemoteFortressReader".to_string(),
528 "GetRegionMapsNew".to_string(),
529 request,
530 )?;
531 Ok(_response)
532 }
533 pub fn get_reports(&mut self) -> Result<crate::Reply<Status>, TChannel::TError> {
535 let request = EmptyMessage::new();
536 let _response: crate::Reply<Status> = self
537 .channel
538 .request(
539 "RemoteFortressReader".to_string(),
540 "GetReports".to_string(),
541 request,
542 )?;
543 Ok(_response)
544 }
545 pub fn get_side_menu(
547 &mut self,
548 ) -> Result<crate::Reply<SidebarState>, TChannel::TError> {
549 let request = EmptyMessage::new();
550 let _response: crate::Reply<SidebarState> = self
551 .channel
552 .request(
553 "RemoteFortressReader".to_string(),
554 "GetSideMenu".to_string(),
555 request,
556 )?;
557 Ok(_response)
558 }
559 pub fn get_tiletype_list(
561 &mut self,
562 ) -> Result<crate::Reply<TiletypeList>, TChannel::TError> {
563 let request = EmptyMessage::new();
564 let _response: crate::Reply<TiletypeList> = self
565 .channel
566 .request(
567 "RemoteFortressReader".to_string(),
568 "GetTiletypeList".to_string(),
569 request,
570 )?;
571 Ok(_response)
572 }
573 pub fn get_unit_list(&mut self) -> Result<crate::Reply<UnitList>, TChannel::TError> {
575 let request = EmptyMessage::new();
576 let _response: crate::Reply<UnitList> = self
577 .channel
578 .request(
579 "RemoteFortressReader".to_string(),
580 "GetUnitList".to_string(),
581 request,
582 )?;
583 Ok(_response)
584 }
585 pub fn get_unit_list_inside(
587 &mut self,
588 request: BlockRequest,
589 ) -> Result<crate::Reply<UnitList>, TChannel::TError> {
590 let _response: crate::Reply<UnitList> = self
591 .channel
592 .request(
593 "RemoteFortressReader".to_string(),
594 "GetUnitListInside".to_string(),
595 request,
596 )?;
597 Ok(_response)
598 }
599 pub fn get_version_info(
601 &mut self,
602 ) -> Result<crate::Reply<VersionInfo>, TChannel::TError> {
603 let request = EmptyMessage::new();
604 let _response: crate::Reply<VersionInfo> = self
605 .channel
606 .request(
607 "RemoteFortressReader".to_string(),
608 "GetVersionInfo".to_string(),
609 request,
610 )?;
611 Ok(_response)
612 }
613 pub fn get_view_info(&mut self) -> Result<crate::Reply<ViewInfo>, TChannel::TError> {
615 let request = EmptyMessage::new();
616 let _response: crate::Reply<ViewInfo> = self
617 .channel
618 .request(
619 "RemoteFortressReader".to_string(),
620 "GetViewInfo".to_string(),
621 request,
622 )?;
623 Ok(_response)
624 }
625 pub fn get_world_map(&mut self) -> Result<crate::Reply<WorldMap>, TChannel::TError> {
627 let request = EmptyMessage::new();
628 let _response: crate::Reply<WorldMap> = self
629 .channel
630 .request(
631 "RemoteFortressReader".to_string(),
632 "GetWorldMap".to_string(),
633 request,
634 )?;
635 Ok(_response)
636 }
637 pub fn get_world_map_center(
639 &mut self,
640 ) -> Result<crate::Reply<WorldMap>, TChannel::TError> {
641 let request = EmptyMessage::new();
642 let _response: crate::Reply<WorldMap> = self
643 .channel
644 .request(
645 "RemoteFortressReader".to_string(),
646 "GetWorldMapCenter".to_string(),
647 request,
648 )?;
649 Ok(_response)
650 }
651 pub fn get_world_map_new(
653 &mut self,
654 ) -> Result<crate::Reply<WorldMap>, TChannel::TError> {
655 let request = EmptyMessage::new();
656 let _response: crate::Reply<WorldMap> = self
657 .channel
658 .request(
659 "RemoteFortressReader".to_string(),
660 "GetWorldMapNew".to_string(),
661 request,
662 )?;
663 Ok(_response)
664 }
665 pub fn jump_command(
667 &mut self,
668 request: MoveCommandParams,
669 ) -> Result<crate::Reply<()>, TChannel::TError> {
670 let _response: crate::Reply<EmptyMessage> = self
671 .channel
672 .request(
673 "RemoteFortressReader".to_string(),
674 "JumpCommand".to_string(),
675 request,
676 )?;
677 let _response = crate::Reply {
678 reply: (),
679 fragments: _response.fragments,
680 };
681 Ok(_response)
682 }
683 pub fn menu_query(
685 &mut self,
686 ) -> Result<crate::Reply<MenuContents>, TChannel::TError> {
687 let request = EmptyMessage::new();
688 let _response: crate::Reply<MenuContents> = self
689 .channel
690 .request(
691 "RemoteFortressReader".to_string(),
692 "MenuQuery".to_string(),
693 request,
694 )?;
695 Ok(_response)
696 }
697 pub fn misc_move_command(
699 &mut self,
700 request: MiscMoveParams,
701 ) -> Result<crate::Reply<()>, TChannel::TError> {
702 let _response: crate::Reply<EmptyMessage> = self
703 .channel
704 .request(
705 "RemoteFortressReader".to_string(),
706 "MiscMoveCommand".to_string(),
707 request,
708 )?;
709 let _response = crate::Reply {
710 reply: (),
711 fragments: _response.fragments,
712 };
713 Ok(_response)
714 }
715 pub fn move_command(
717 &mut self,
718 request: MoveCommandParams,
719 ) -> Result<crate::Reply<()>, TChannel::TError> {
720 let _response: crate::Reply<EmptyMessage> = self
721 .channel
722 .request(
723 "RemoteFortressReader".to_string(),
724 "MoveCommand".to_string(),
725 request,
726 )?;
727 let _response = crate::Reply {
728 reply: (),
729 fragments: _response.fragments,
730 };
731 Ok(_response)
732 }
733 pub fn movement_select_command(
735 &mut self,
736 value: i32,
737 ) -> Result<crate::Reply<()>, TChannel::TError> {
738 let mut request = IntMessage::new();
739 request.set_value(value);
740 let _response: crate::Reply<EmptyMessage> = self
741 .channel
742 .request(
743 "RemoteFortressReader".to_string(),
744 "MovementSelectCommand".to_string(),
745 request,
746 )?;
747 let _response = crate::Reply {
748 reply: (),
749 fragments: _response.fragments,
750 };
751 Ok(_response)
752 }
753 pub fn pass_keyboard_event(
755 &mut self,
756 request: KeyboardEvent,
757 ) -> Result<crate::Reply<()>, TChannel::TError> {
758 let _response: crate::Reply<EmptyMessage> = self
759 .channel
760 .request(
761 "RemoteFortressReader".to_string(),
762 "PassKeyboardEvent".to_string(),
763 request,
764 )?;
765 let _response = crate::Reply {
766 reply: (),
767 fragments: _response.fragments,
768 };
769 Ok(_response)
770 }
771 pub fn reset_map_hashes(&mut self) -> Result<crate::Reply<()>, TChannel::TError> {
773 let request = EmptyMessage::new();
774 let _response: crate::Reply<EmptyMessage> = self
775 .channel
776 .request(
777 "RemoteFortressReader".to_string(),
778 "ResetMapHashes".to_string(),
779 request,
780 )?;
781 let _response = crate::Reply {
782 reply: (),
783 fragments: _response.fragments,
784 };
785 Ok(_response)
786 }
787 pub fn send_dig_command(
789 &mut self,
790 request: DigCommand,
791 ) -> Result<crate::Reply<()>, TChannel::TError> {
792 let _response: crate::Reply<EmptyMessage> = self
793 .channel
794 .request(
795 "RemoteFortressReader".to_string(),
796 "SendDigCommand".to_string(),
797 request,
798 )?;
799 let _response = crate::Reply {
800 reply: (),
801 fragments: _response.fragments,
802 };
803 Ok(_response)
804 }
805 pub fn set_pause_state(
807 &mut self,
808 value: bool,
809 ) -> Result<crate::Reply<()>, TChannel::TError> {
810 let mut request = SingleBool::new();
811 request.set_Value(value);
812 let _response: crate::Reply<EmptyMessage> = self
813 .channel
814 .request(
815 "RemoteFortressReader".to_string(),
816 "SetPauseState".to_string(),
817 request,
818 )?;
819 let _response = crate::Reply {
820 reply: (),
821 fragments: _response.fragments,
822 };
823 Ok(_response)
824 }
825 pub fn set_side_menu(
827 &mut self,
828 request: SidebarCommand,
829 ) -> Result<crate::Reply<()>, TChannel::TError> {
830 let _response: crate::Reply<EmptyMessage> = self
831 .channel
832 .request(
833 "RemoteFortressReader".to_string(),
834 "SetSideMenu".to_string(),
835 request,
836 )?;
837 let _response = crate::Reply {
838 reply: (),
839 fragments: _response.fragments,
840 };
841 Ok(_response)
842 }
843}
844#[cfg(feature = "reflection")]
845impl<TChannel: crate::Channel> crate::reflection::StubReflection
846for RemoteFortressReader<'_, TChannel> {
847 fn list_methods() -> Vec<crate::reflection::RemoteProcedureDescriptor> {
848 vec![
849 crate ::reflection::RemoteProcedureDescriptor { name : "CheckHashes"
850 .to_string(), plugin_name : "RemoteFortressReader".to_string(), input_type :
851 EmptyMessage::descriptor().full_name().to_string(), output_type :
852 EmptyMessage::descriptor().full_name().to_string(), }, crate
853 ::reflection::RemoteProcedureDescriptor { name : "CopyScreen".to_string(),
854 plugin_name : "RemoteFortressReader".to_string(), input_type :
855 EmptyMessage::descriptor().full_name().to_string(), output_type :
856 ScreenCapture::descriptor().full_name().to_string(), }, crate
857 ::reflection::RemoteProcedureDescriptor { name : "GetBlockList".to_string(),
858 plugin_name : "RemoteFortressReader".to_string(), input_type :
859 BlockRequest::descriptor().full_name().to_string(), output_type :
860 BlockList::descriptor().full_name().to_string(), }, crate
861 ::reflection::RemoteProcedureDescriptor { name : "GetBuildingDefList"
862 .to_string(), plugin_name : "RemoteFortressReader".to_string(), input_type :
863 EmptyMessage::descriptor().full_name().to_string(), output_type :
864 BuildingList::descriptor().full_name().to_string(), }, crate
865 ::reflection::RemoteProcedureDescriptor { name : "GetCreatureRaws"
866 .to_string(), plugin_name : "RemoteFortressReader".to_string(), input_type :
867 EmptyMessage::descriptor().full_name().to_string(), output_type :
868 CreatureRawList::descriptor().full_name().to_string(), }, crate
869 ::reflection::RemoteProcedureDescriptor { name : "GetGameValidity"
870 .to_string(), plugin_name : "RemoteFortressReader".to_string(), input_type :
871 EmptyMessage::descriptor().full_name().to_string(), output_type :
872 SingleBool::descriptor().full_name().to_string(), }, crate
873 ::reflection::RemoteProcedureDescriptor { name : "GetGrowthList".to_string(),
874 plugin_name : "RemoteFortressReader".to_string(), input_type :
875 EmptyMessage::descriptor().full_name().to_string(), output_type :
876 MaterialList::descriptor().full_name().to_string(), }, crate
877 ::reflection::RemoteProcedureDescriptor { name : "GetItemList".to_string(),
878 plugin_name : "RemoteFortressReader".to_string(), input_type :
879 EmptyMessage::descriptor().full_name().to_string(), output_type :
880 MaterialList::descriptor().full_name().to_string(), }, crate
881 ::reflection::RemoteProcedureDescriptor { name : "GetLanguage".to_string(),
882 plugin_name : "RemoteFortressReader".to_string(), input_type :
883 EmptyMessage::descriptor().full_name().to_string(), output_type :
884 Language::descriptor().full_name().to_string(), }, crate
885 ::reflection::RemoteProcedureDescriptor { name : "GetMapInfo".to_string(),
886 plugin_name : "RemoteFortressReader".to_string(), input_type :
887 EmptyMessage::descriptor().full_name().to_string(), output_type :
888 MapInfo::descriptor().full_name().to_string(), }, crate
889 ::reflection::RemoteProcedureDescriptor { name : "GetMaterialList"
890 .to_string(), plugin_name : "RemoteFortressReader".to_string(), input_type :
891 EmptyMessage::descriptor().full_name().to_string(), output_type :
892 MaterialList::descriptor().full_name().to_string(), }, crate
893 ::reflection::RemoteProcedureDescriptor { name : "GetPartialCreatureRaws"
894 .to_string(), plugin_name : "RemoteFortressReader".to_string(), input_type :
895 ListRequest::descriptor().full_name().to_string(), output_type :
896 CreatureRawList::descriptor().full_name().to_string(), }, crate
897 ::reflection::RemoteProcedureDescriptor { name : "GetPartialPlantRaws"
898 .to_string(), plugin_name : "RemoteFortressReader".to_string(), input_type :
899 ListRequest::descriptor().full_name().to_string(), output_type :
900 PlantRawList::descriptor().full_name().to_string(), }, crate
901 ::reflection::RemoteProcedureDescriptor { name : "GetPauseState".to_string(),
902 plugin_name : "RemoteFortressReader".to_string(), input_type :
903 EmptyMessage::descriptor().full_name().to_string(), output_type :
904 SingleBool::descriptor().full_name().to_string(), }, crate
905 ::reflection::RemoteProcedureDescriptor { name : "GetPlantList".to_string(),
906 plugin_name : "RemoteFortressReader".to_string(), input_type :
907 BlockRequest::descriptor().full_name().to_string(), output_type :
908 PlantList::descriptor().full_name().to_string(), }, crate
909 ::reflection::RemoteProcedureDescriptor { name : "GetPlantRaws".to_string(),
910 plugin_name : "RemoteFortressReader".to_string(), input_type :
911 EmptyMessage::descriptor().full_name().to_string(), output_type :
912 PlantRawList::descriptor().full_name().to_string(), }, crate
913 ::reflection::RemoteProcedureDescriptor { name : "GetRegionMaps".to_string(),
914 plugin_name : "RemoteFortressReader".to_string(), input_type :
915 EmptyMessage::descriptor().full_name().to_string(), output_type :
916 RegionMaps::descriptor().full_name().to_string(), }, crate
917 ::reflection::RemoteProcedureDescriptor { name : "GetRegionMapsNew"
918 .to_string(), plugin_name : "RemoteFortressReader".to_string(), input_type :
919 EmptyMessage::descriptor().full_name().to_string(), output_type :
920 RegionMaps::descriptor().full_name().to_string(), }, crate
921 ::reflection::RemoteProcedureDescriptor { name : "GetReports".to_string(),
922 plugin_name : "RemoteFortressReader".to_string(), input_type :
923 EmptyMessage::descriptor().full_name().to_string(), output_type :
924 Status::descriptor().full_name().to_string(), }, crate
925 ::reflection::RemoteProcedureDescriptor { name : "GetSideMenu".to_string(),
926 plugin_name : "RemoteFortressReader".to_string(), input_type :
927 EmptyMessage::descriptor().full_name().to_string(), output_type :
928 SidebarState::descriptor().full_name().to_string(), }, crate
929 ::reflection::RemoteProcedureDescriptor { name : "GetTiletypeList"
930 .to_string(), plugin_name : "RemoteFortressReader".to_string(), input_type :
931 EmptyMessage::descriptor().full_name().to_string(), output_type :
932 TiletypeList::descriptor().full_name().to_string(), }, crate
933 ::reflection::RemoteProcedureDescriptor { name : "GetUnitList".to_string(),
934 plugin_name : "RemoteFortressReader".to_string(), input_type :
935 EmptyMessage::descriptor().full_name().to_string(), output_type :
936 UnitList::descriptor().full_name().to_string(), }, crate
937 ::reflection::RemoteProcedureDescriptor { name : "GetUnitListInside"
938 .to_string(), plugin_name : "RemoteFortressReader".to_string(), input_type :
939 BlockRequest::descriptor().full_name().to_string(), output_type :
940 UnitList::descriptor().full_name().to_string(), }, crate
941 ::reflection::RemoteProcedureDescriptor { name : "GetVersionInfo"
942 .to_string(), plugin_name : "RemoteFortressReader".to_string(), input_type :
943 EmptyMessage::descriptor().full_name().to_string(), output_type :
944 VersionInfo::descriptor().full_name().to_string(), }, crate
945 ::reflection::RemoteProcedureDescriptor { name : "GetViewInfo".to_string(),
946 plugin_name : "RemoteFortressReader".to_string(), input_type :
947 EmptyMessage::descriptor().full_name().to_string(), output_type :
948 ViewInfo::descriptor().full_name().to_string(), }, crate
949 ::reflection::RemoteProcedureDescriptor { name : "GetWorldMap".to_string(),
950 plugin_name : "RemoteFortressReader".to_string(), input_type :
951 EmptyMessage::descriptor().full_name().to_string(), output_type :
952 WorldMap::descriptor().full_name().to_string(), }, crate
953 ::reflection::RemoteProcedureDescriptor { name : "GetWorldMapCenter"
954 .to_string(), plugin_name : "RemoteFortressReader".to_string(), input_type :
955 EmptyMessage::descriptor().full_name().to_string(), output_type :
956 WorldMap::descriptor().full_name().to_string(), }, crate
957 ::reflection::RemoteProcedureDescriptor { name : "GetWorldMapNew"
958 .to_string(), plugin_name : "RemoteFortressReader".to_string(), input_type :
959 EmptyMessage::descriptor().full_name().to_string(), output_type :
960 WorldMap::descriptor().full_name().to_string(), }, crate
961 ::reflection::RemoteProcedureDescriptor { name : "JumpCommand".to_string(),
962 plugin_name : "RemoteFortressReader".to_string(), input_type :
963 MoveCommandParams::descriptor().full_name().to_string(), output_type :
964 EmptyMessage::descriptor().full_name().to_string(), }, crate
965 ::reflection::RemoteProcedureDescriptor { name : "MenuQuery".to_string(),
966 plugin_name : "RemoteFortressReader".to_string(), input_type :
967 EmptyMessage::descriptor().full_name().to_string(), output_type :
968 MenuContents::descriptor().full_name().to_string(), }, crate
969 ::reflection::RemoteProcedureDescriptor { name : "MiscMoveCommand"
970 .to_string(), plugin_name : "RemoteFortressReader".to_string(), input_type :
971 MiscMoveParams::descriptor().full_name().to_string(), output_type :
972 EmptyMessage::descriptor().full_name().to_string(), }, crate
973 ::reflection::RemoteProcedureDescriptor { name : "MoveCommand".to_string(),
974 plugin_name : "RemoteFortressReader".to_string(), input_type :
975 MoveCommandParams::descriptor().full_name().to_string(), output_type :
976 EmptyMessage::descriptor().full_name().to_string(), }, crate
977 ::reflection::RemoteProcedureDescriptor { name : "MovementSelectCommand"
978 .to_string(), plugin_name : "RemoteFortressReader".to_string(), input_type :
979 IntMessage::descriptor().full_name().to_string(), output_type :
980 EmptyMessage::descriptor().full_name().to_string(), }, crate
981 ::reflection::RemoteProcedureDescriptor { name : "PassKeyboardEvent"
982 .to_string(), plugin_name : "RemoteFortressReader".to_string(), input_type :
983 KeyboardEvent::descriptor().full_name().to_string(), output_type :
984 EmptyMessage::descriptor().full_name().to_string(), }, crate
985 ::reflection::RemoteProcedureDescriptor { name : "ResetMapHashes"
986 .to_string(), plugin_name : "RemoteFortressReader".to_string(), input_type :
987 EmptyMessage::descriptor().full_name().to_string(), output_type :
988 EmptyMessage::descriptor().full_name().to_string(), }, crate
989 ::reflection::RemoteProcedureDescriptor { name : "SendDigCommand"
990 .to_string(), plugin_name : "RemoteFortressReader".to_string(), input_type :
991 DigCommand::descriptor().full_name().to_string(), output_type :
992 EmptyMessage::descriptor().full_name().to_string(), }, crate
993 ::reflection::RemoteProcedureDescriptor { name : "SetPauseState".to_string(),
994 plugin_name : "RemoteFortressReader".to_string(), input_type :
995 SingleBool::descriptor().full_name().to_string(), output_type :
996 EmptyMessage::descriptor().full_name().to_string(), }, crate
997 ::reflection::RemoteProcedureDescriptor { name : "SetSideMenu".to_string(),
998 plugin_name : "RemoteFortressReader".to_string(), input_type :
999 SidebarCommand::descriptor().full_name().to_string(), output_type :
1000 EmptyMessage::descriptor().full_name().to_string(), },
1001 ]
1002 }
1003}
1004pub struct Isoworldremote<'a, TChannel: crate::Channel> {
1006 pub channel: &'a mut TChannel,
1008}
1009impl<'a, TChannel: crate::Channel> Isoworldremote<'a, TChannel> {
1010 pub fn new(channel: &'a mut TChannel) -> Self {
1012 Self { channel }
1013 }
1014 pub fn get_embark_info(
1016 &mut self,
1017 request: MapRequest,
1018 ) -> Result<crate::Reply<MapReply>, TChannel::TError> {
1019 let _response: crate::Reply<MapReply> = self
1020 .channel
1021 .request(
1022 "isoworldremote".to_string(),
1023 "GetEmbarkInfo".to_string(),
1024 request,
1025 )?;
1026 Ok(_response)
1027 }
1028 pub fn get_embark_tile(
1030 &mut self,
1031 request: TileRequest,
1032 ) -> Result<crate::Reply<EmbarkTile>, TChannel::TError> {
1033 let _response: crate::Reply<EmbarkTile> = self
1034 .channel
1035 .request(
1036 "isoworldremote".to_string(),
1037 "GetEmbarkTile".to_string(),
1038 request,
1039 )?;
1040 Ok(_response)
1041 }
1042 pub fn get_raw_names(
1044 &mut self,
1045 request: MapRequest,
1046 ) -> Result<crate::Reply<RawNames>, TChannel::TError> {
1047 let _response: crate::Reply<RawNames> = self
1048 .channel
1049 .request("isoworldremote".to_string(), "GetRawNames".to_string(), request)?;
1050 Ok(_response)
1051 }
1052}
1053#[cfg(feature = "reflection")]
1054impl<TChannel: crate::Channel> crate::reflection::StubReflection
1055for Isoworldremote<'_, TChannel> {
1056 fn list_methods() -> Vec<crate::reflection::RemoteProcedureDescriptor> {
1057 vec![
1058 crate ::reflection::RemoteProcedureDescriptor { name : "GetEmbarkInfo"
1059 .to_string(), plugin_name : "isoworldremote".to_string(), input_type :
1060 MapRequest::descriptor().full_name().to_string(), output_type :
1061 MapReply::descriptor().full_name().to_string(), }, crate
1062 ::reflection::RemoteProcedureDescriptor { name : "GetEmbarkTile".to_string(),
1063 plugin_name : "isoworldremote".to_string(), input_type :
1064 TileRequest::descriptor().full_name().to_string(), output_type :
1065 EmbarkTile::descriptor().full_name().to_string(), }, crate
1066 ::reflection::RemoteProcedureDescriptor { name : "GetRawNames".to_string(),
1067 plugin_name : "isoworldremote".to_string(), input_type :
1068 MapRequest::descriptor().full_name().to_string(), output_type :
1069 RawNames::descriptor().full_name().to_string(), },
1070 ]
1071 }
1072}
1073pub struct Rename<'a, TChannel: crate::Channel> {
1075 pub channel: &'a mut TChannel,
1077}
1078impl<'a, TChannel: crate::Channel> Rename<'a, TChannel> {
1079 pub fn new(channel: &'a mut TChannel) -> Self {
1081 Self { channel }
1082 }
1083 pub fn rename_building(
1085 &mut self,
1086 request: RenameBuildingIn,
1087 ) -> Result<crate::Reply<()>, TChannel::TError> {
1088 let _response: crate::Reply<EmptyMessage> = self
1089 .channel
1090 .request("rename".to_string(), "RenameBuilding".to_string(), request)?;
1091 let _response = crate::Reply {
1092 reply: (),
1093 fragments: _response.fragments,
1094 };
1095 Ok(_response)
1096 }
1097 pub fn rename_squad(
1099 &mut self,
1100 request: RenameSquadIn,
1101 ) -> Result<crate::Reply<()>, TChannel::TError> {
1102 let _response: crate::Reply<EmptyMessage> = self
1103 .channel
1104 .request("rename".to_string(), "RenameSquad".to_string(), request)?;
1105 let _response = crate::Reply {
1106 reply: (),
1107 fragments: _response.fragments,
1108 };
1109 Ok(_response)
1110 }
1111 pub fn rename_unit(
1113 &mut self,
1114 request: RenameUnitIn,
1115 ) -> Result<crate::Reply<()>, TChannel::TError> {
1116 let _response: crate::Reply<EmptyMessage> = self
1117 .channel
1118 .request("rename".to_string(), "RenameUnit".to_string(), request)?;
1119 let _response = crate::Reply {
1120 reply: (),
1121 fragments: _response.fragments,
1122 };
1123 Ok(_response)
1124 }
1125}
1126#[cfg(feature = "reflection")]
1127impl<TChannel: crate::Channel> crate::reflection::StubReflection
1128for Rename<'_, TChannel> {
1129 fn list_methods() -> Vec<crate::reflection::RemoteProcedureDescriptor> {
1130 vec![
1131 crate ::reflection::RemoteProcedureDescriptor { name : "RenameBuilding"
1132 .to_string(), plugin_name : "rename".to_string(), input_type :
1133 RenameBuildingIn::descriptor().full_name().to_string(), output_type :
1134 EmptyMessage::descriptor().full_name().to_string(), }, crate
1135 ::reflection::RemoteProcedureDescriptor { name : "RenameSquad".to_string(),
1136 plugin_name : "rename".to_string(), input_type : RenameSquadIn::descriptor()
1137 .full_name().to_string(), output_type : EmptyMessage::descriptor()
1138 .full_name().to_string(), }, crate ::reflection::RemoteProcedureDescriptor {
1139 name : "RenameUnit".to_string(), plugin_name : "rename".to_string(),
1140 input_type : RenameUnitIn::descriptor().full_name().to_string(), output_type
1141 : EmptyMessage::descriptor().full_name().to_string(), },
1142 ]
1143 }
1144}