Skip to main content

dfhack_proto/generated/stubs/
mod.rs

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