forked from GodotSteam/GodotSteam
-
Notifications
You must be signed in to change notification settings - Fork 0
/
godotsteam.h
1389 lines (1268 loc) · 76.3 KB
/
godotsteam.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
#ifndef GODOTSTEAM_H
#define GODOTSTEAM_H
// Turn off MSVC-only warning about strcpy
#ifdef _MSC_VER
#define _CRT_SECURE_NO_WARNINGS 1
#pragma warning(disable : 4996)
#pragma warning(disable : 4828)
#endif
// Include INT types header
#include <inttypes.h>
// Include Steamworks API headers
#include "steam/steam_api_flat.h"
#include "steam/steamnetworkingfakeip.h"
#include "steam/isteamdualsense.h"
// Include Godot headers
#include "core/object/object.h"
#include "core/object/ref_counted.h"
#include "core/variant/dictionary.h"
#include "scene/main/scene_tree.h"
#include "scene/resources/texture.h"
// Include GodotSteam headers
#include "godotsteam_constants.h"
#include "godotsteam_enums.h"
// Include some system headers
#include "map"
class Steam : public Object,
ISteamMatchmakingServerListResponse,
ISteamMatchmakingPingResponse,
ISteamMatchmakingPlayersResponse,
ISteamMatchmakingRulesResponse {
GDCLASS(Steam, Object);
public:
static Steam *get_singleton();
Steam();
~Steam();
// STEAMWORKS FUNCTIONS
// Main
String get_godotsteam_version() const { return godotsteam_version; }
uint32_t getSteamID32(uint64_t steam_id);
bool isAnonAccount(uint64_t steam_id);
bool isAnonUserAccount(uint64_t steam_id);
bool isChatAccount(uint64_t steam_id);
bool isClanAccount(uint64_t steam_id);
bool isConsoleUserAccount(uint64_t steam_id);
bool isIndividualAccount(uint64_t steam_id);
bool isLobby(uint64_t steam_id);
bool isSteamRunning();
bool restartAppIfNecessary(uint32 app_id);
Dictionary steamInit(bool retrieve_stats = false, uint32_t app_id = 0, bool embed_callbacks = false);
Dictionary steamInitEx(bool retrieve_stats = false, uint32_t app_id = 0, bool embed_callbacks = false);
void steamShutdown();
uint32 get_browser_handle() const { return browser_handle; }
uint32_t get_current_app_id() const { return current_app_id; }
uint64_t get_current_clan_id() const { return current_clan_id; }
uint64_t get_current_steam_id() const { return current_steam_id; }
int32 get_inventory_handle() const { return inventory_handle; }
uint64_t get_inventory_update_handle() const { return inventory_update_handle; }
uint64_t get_leaderboard_handle() const { return leaderboard_handle; }
int get_leaderboard_details_max() const { return leaderboard_details_max; }
Array get_leaderboard_entries() const { return leaderboard_entries_array; }
uint64_t get_server_list_request() const { return (uint64)server_list_request; }
void set_browser_handle(uint32 new_browser_handle){ browser_handle = new_browser_handle; }
void set_current_app_id(uint32_t new_current_app_id){ current_app_id = new_current_app_id; }
void set_current_clan_id(uint64_t new_current_clan_id){ current_clan_id = new_current_clan_id; }
void set_current_steam_id(uint64_t new_current_steam_id){ current_steam_id = new_current_steam_id; }
void set_inventory_handle(int32 new_inventory_handle){ inventory_handle = new_inventory_handle; }
void set_inventory_update_handle(uint64_t new_inventory_update_handle){ inventory_update_handle = new_inventory_update_handle; }
void set_leaderboard_details_max(int new_leaderboard_details_max) {
if (new_leaderboard_details_max > k_cLeaderboardDetailsMax || new_leaderboard_details_max < 0) {
new_leaderboard_details_max = k_cLeaderboardDetailsMax;
}
leaderboard_details_max = new_leaderboard_details_max;
}
void set_leaderboard_entries(Array new_leaderboard_entries) { leaderboard_entries_array = new_leaderboard_entries; }
void set_leaderboard_handle(uint64_t new_leaderboard_handle){ leaderboard_handle = new_leaderboard_handle; }
void set_server_list_request(uint64_t new_server_list_request){ server_list_request = (HServerListRequest)new_server_list_request; }
// Apps
int getAppBuildId();
Dictionary getAppInstallDir(uint32_t app_id);
uint64_t getAppOwner();
String getAvailableGameLanguages();
Dictionary getBetaInfo();
String getCurrentBetaName();
String getCurrentGameLanguage();
int32 getDLCCount();
Array getDLCData();
Dictionary getDLCDataByIndex(uint32_t this_dlc_index);
Dictionary getDLCDownloadProgress(uint32_t dlc_id);
uint32_t getEarliestPurchaseUnixTime(uint32_t app_id);
void getFileDetails(const String &filename);
Array getInstalledDepots(uint32_t app_id);
String getLaunchCommandLine();
String getLaunchQueryParam(const String &key);
Dictionary getNumBetas();
void installDLC(uint32_t dlc_id);
bool isAppInstalled(uint32_t app_id);
bool isCybercafe();
bool isDLCInstalled(uint32_t dlc_id);
bool isLowViolence();
bool isSubscribed();
bool isSubscribedApp(uint32_t app_id);
bool isSubscribedFromFamilySharing();
bool isSubscribedFromFreeWeekend();
Dictionary isTimedTrial();
bool isVACBanned();
bool markContentCorrupt(bool missing_files_only);
bool setActiveBeta(String beta_name);
bool setDLCContext(uint32_t app_id);
void uninstallDLC(uint32_t dlc_id);
// Friends
void activateGameOverlay(const String &type);
void activateGameOverlayInviteDialog(uint64_t steam_id);
void activateGameOverlayInviteDialogConnectString(const String &connect_string);
void activateGameOverlayToStore(uint32_t app_id = 0);
void activateGameOverlayToUser(const String &type, uint64_t steam_id);
void activateGameOverlayToWebPage(const String &url);
void clearRichPresence();
bool closeClanChatWindowInSteam(uint64_t chat_id);
void downloadClanActivityCounts(uint64_t clan_id, int clans_to_request);
void enumerateFollowingList(uint32 start_index);
uint64_t getChatMemberByIndex(uint64_t clan_id, int user);
Dictionary getClanActivityCounts(uint64_t clan_id);
uint64_t getClanByIndex(int clan_index);
int getClanChatMemberCount(uint64_t clan_id);
Dictionary getClanChatMessage(uint64_t chat_id, int message);
int getClanCount();
String getClanName(uint64_t clan_id);
uint64_t getClanOfficerByIndex(uint64_t clan_id, int officer);
int getClanOfficerCount(uint64_t clan_id);
uint64_t getClanOwner(uint64_t clan_id);
String getClanTag(uint64_t clan_id);
uint64_t getCoplayFriend(int friend_number);
int getCoplayFriendCount();
void getFollowerCount(uint64_t steam_id);
uint64_t getFriendByIndex(int friend_number, BitField<FriendFlags> friend_flags);
uint32 getFriendCoplayGame(uint64_t friend_id);
int getFriendCoplayTime(uint64_t friend_id);
int getFriendCount(BitField<FriendFlags> friend_flags = FRIEND_FLAG_ALL);
int getFriendCountFromSource(uint64_t source_id);
uint64_t getFriendFromSourceByIndex(uint64_t source_id, int friend_number);
Dictionary getFriendGamePlayed(uint64_t steam_id);
Dictionary getFriendMessage(uint64_t friend_id, int message);
String getFriendPersonaName(uint64_t steam_id);
String getFriendPersonaNameHistory(uint64_t steam_id, int name_history);
PersonaState getFriendPersonaState(uint64_t steam_id);
FriendRelationship getFriendRelationship(uint64_t steam_id);
String getFriendRichPresence(uint64_t friend_id, const String &key);
int getFriendRichPresenceKeyCount(uint64_t friend_id);
String getFriendRichPresenceKeyByIndex(uint64_t friend_id, int key);
int getFriendsGroupCount();
int16 getFriendsGroupIDByIndex(int16 friend_group);
int getFriendsGroupMembersCount(int16 friend_group);
Array getFriendsGroupMembersList(int16 friend_group, int member_count);
String getFriendsGroupName(int16 friend_group);
int getFriendSteamLevel(uint64_t steam_id);
int getLargeFriendAvatar(uint64_t steam_id);
int getMediumFriendAvatar(uint64_t steam_id);
String getPersonaName();
PersonaState getPersonaState();
void getPlayerAvatar(int size = 2, uint64_t steam_id = 0);
String getPlayerNickname(uint64_t steam_id);
String getProfileItemPropertyString(uint64_t steam_id, CommunityProfileItemType item_type, CommunityProfileItemProperty item_property);
uint32 getProfileItemPropertyInt(uint64_t steam_id, CommunityProfileItemType item_type, CommunityProfileItemProperty item_property);
Array getRecentPlayers();
int getSmallFriendAvatar(uint64_t steam_id);
Array getUserFriendsGroups();
uint32 getUserRestrictions();
Array getUserSteamFriends();
Array getUserSteamGroups();
bool hasEquippedProfileItem(uint64_t steam_id, CommunityProfileItemType item_type);
bool hasFriend(uint64_t steam_id, BitField<FriendFlags> friend_flags);
bool inviteUserToGame(uint64_t friend_id, const String &connect_string);
bool isClanChatAdmin(uint64_t chat_id, uint64_t steam_id);
bool isClanPublic(uint64_t clan_id);
bool isClanOfficialGameGroup(uint64_t clan_id);
bool isClanChatWindowOpenInSteam(uint64_t chat_id);
void isFollowing(uint64_t steam_id);
bool isUserInSource(uint64_t steam_id, uint64_t source_id);
void joinClanChatRoom(uint64_t clan_id);
bool leaveClanChatRoom(uint64_t clan_id);
bool openClanChatWindowInSteam(uint64_t chat_id);
bool registerProtocolInOverlayBrowser(const String &protocol);
bool replyToFriendMessage(uint64_t steam_id, const String &message);
void requestClanOfficerList(uint64_t clan_id);
void requestEquippedProfileItems(uint64_t steam_id);
void requestFriendRichPresence(uint64_t friend_id);
bool requestUserInformation(uint64_t steam_id, bool require_name_only);
bool sendClanChatMessage(uint64_t chat_id, const String &text);
void setInGameVoiceSpeaking(uint64_t steam_id, bool speaking);
bool setListenForFriendsMessages(bool intercept);
void setPersonaName(const String &name);
void setPlayedWith(uint64_t steam_id);
bool setRichPresence(const String &key, const String &value);
// Game Search
int addGameSearchParams(const String &key, const String &values);
int searchForGameWithLobby(uint64_t lobby_id, int player_min, int player_max);
int searchForGameSolo(int player_min, int player_max);
int acceptGame();
int declineGame();
String retrieveConnectionDetails(uint64_t host_id);
int endGameSearch();
int setGameHostParams(const String &key, const String &value);
int setConnectionDetails(const String &details, int connection_details);
int requestPlayersForGame(int player_min, int player_max, int max_team_size);
int hostConfirmGameStart(uint64_t game_id);
int cancelRequestPlayersForGame();
int submitPlayerResult(uint64_t game_id, uint64_t player_id, PlayerResult player_result);
int endGame(uint64_t game_id);
// HTML Surface
void addHeader(const String &key, const String &value, uint32 this_handle = 0);
void allowStartRequest(bool allowed, uint32 this_handle = 0);
void copyToClipboard(uint32 this_handle = 0);
void createBrowser(const String &user_agent = "", const String &user_css = "");
void executeJavascript(const String &javascript, uint32 this_handle = 0);
void find(const String &search, bool currently_in_find, bool reverse, uint32 this_handle = 0);
void getLinkAtPosition(int x, int y, uint32 this_handle = 0);
void goBack(uint32 this_handle = 0);
void goForward(uint32 this_handle = 0);
bool htmlInit();
void jsDialogResponse(bool result, uint32 this_handle = 0);
void keyChar(uint32 unicode_char, BitField<HTMLKeyModifiers> key_modifiers, uint32 this_handle = 0);
void keyDown(uint32 native_key_code, BitField<HTMLKeyModifiers> key_modifiers, uint32 this_handle = 0);
void keyUp(uint32 native_key_code, BitField<HTMLKeyModifiers> key_modifiers, uint32 this_handle = 0);
void loadURL(const String &url, const String &post_data, uint32 this_handle = 0);
void mouseDoubleClick(HTMLMouseButton mouse_button, uint32 this_handle = 0);
void mouseDown(HTMLMouseButton mouse_button, uint32 this_handle = 0);
void mouseMove(int x, int y, uint32 this_handle = 0);
void mouseUp(HTMLMouseButton mouse_button, uint32 this_handle = 0);
void mouseWheel(int32 delta, uint32 this_handle = 0);
void pasteFromClipboard(uint32 this_handle = 0);
void reload(uint32 this_handle = 0);
void removeBrowser(uint32 this_handle = 0);
void setBackgroundMode(bool background_mode, uint32 this_handle = 0);
void setCookie(const String &hostname, const String &key, const String &value, const String &path, uint32 expires, bool secure, bool http_only);
void setHorizontalScroll(uint32 absolute_pixel_scroll, uint32 this_handle = 0);
void setKeyFocus(bool has_key_focus, uint32 this_handle = 0);
void setPageScaleFactor(float zoom, int point_x, int point_y, uint32 this_handle = 0);
void setSize(uint32 width, uint32 height, uint32 this_handle = 0);
void setVerticalScroll(uint32 absolute_pixel_scroll, uint32 this_handle = 0);
bool htmlShutdown();
void stopFind(uint32 this_handle = 0);
void stopLoad(uint32 this_handle = 0);
void viewSource(uint32 this_handle = 0);
// HTTP
uint32_t createCookieContainer(bool allow_responses_to_modify);
uint32_t createHTTPRequest(HTTPMethod request_method, const String &absolute_url);
bool deferHTTPRequest(uint32 request_handle);
float getHTTPDownloadProgressPct(uint32 request_handle);
bool getHTTPRequestWasTimedOut(uint32 request_handle);
PackedByteArray getHTTPResponseBodyData(uint32 request_handle, uint32 buffer_size);
uint32 getHTTPResponseBodySize(uint32 request_handle);
uint32 getHTTPResponseHeaderSize(uint32 request_handle, const String &header_name);
PackedByteArray getHTTPResponseHeaderValue(uint32 request_handle, const String &header_name, uint32 buffer_size);
PackedByteArray getHTTPStreamingResponseBodyData(uint32 request_handle, uint32 offset, uint32 buffer_size);
bool prioritizeHTTPRequest(uint32 request_handle);
bool releaseCookieContainer(uint32 cookie_handle);
bool releaseHTTPRequest(uint32 request_handle);
bool sendHTTPRequest(uint32 request_handle);
bool sendHTTPRequestAndStreamResponse(uint32 request_handle);
bool setHTTPCookie(uint32 cookie_handle, const String &host, const String &url, const String &cookie);
bool setHTTPRequestAbsoluteTimeoutMS(uint32 request_handle, uint32 milliseconds);
bool setHTTPRequestContextValue(uint32 request_handle, uint64_t context_value);
bool setHTTPRequestCookieContainer(uint32 request_handle, uint32 cookie_handle);
bool setHTTPRequestGetOrPostParameter(uint32 request_handle, const String &name, const String &value);
bool setHTTPRequestHeaderValue(uint32 request_handle, const String &header_name, const String &header_value);
bool setHTTPRequestNetworkActivityTimeout(uint32 request_handle, uint32 timeout_seconds);
bool setHTTPRequestRawPostBody(uint32 request_handle, const String &content_type, const String &body);
bool setHTTPRequestRequiresVerifiedCertificate(uint32 request_handle, bool require_verified_certificate);
bool setHTTPRequestUserAgentInfo(uint32 request_handle, const String &user_agent_info);
// Input
void activateActionSet(uint64_t input_handle, uint64_t action_set_handle);
void activateActionSetLayer(uint64_t input_handle, uint64_t action_set_layer_handle);
void deactivateActionSetLayer(uint64_t input_handle, uint64_t action_set_handle);
void deactivateAllActionSetLayers(uint64_t input_handle);
void enableDeviceCallbacks();
void enableActionEventCallbacks();
uint64_t getActionSetHandle(const String &action_set_name);
InputActionOrigin getActionOriginFromXboxOrigin(uint64_t input_handle, int origin);
Array getActiveActionSetLayers(uint64_t input_handle);
Dictionary getAnalogActionData(uint64_t input_handle, uint64_t analog_action_handle);
uint64_t getAnalogActionHandle(const String &action_name);
Array getAnalogActionOrigins(uint64_t input_handle, uint64_t action_set_handle, uint64_t analog_action_handle);
Array getConnectedControllers();
uint64_t getControllerForGamepadIndex(int index);
uint64_t getCurrentActionSet(uint64_t input_handle);
Array getDeviceBindingRevision(uint64_t input_handle);
Dictionary getDigitalActionData(uint64_t input_handle, uint64_t digital_action_handle);
uint64_t getDigitalActionHandle(const String &action_name);
Array getDigitalActionOrigins(uint64_t input_handle, uint64_t action_set_handle, uint64_t digital_action_handle);
int getGamepadIndexForController(uint64_t input_handle);
String getGlyphForActionOrigin(InputActionOrigin origin);
String getGlyphForXboxOrigin(int origin);
String getGlyphPNGForActionOrigin(InputActionOrigin origin, InputGlyphSize size, uint32 flags);
String getGlyphSVGForActionOrigin(InputActionOrigin origin, uint32 flags);
InputType getInputTypeForHandle(uint64_t input_handle);
Dictionary getMotionData(uint64_t input_handle);
int getRemotePlaySessionID(uint64_t input_handle);
uint16 getSessionInputConfigurationSettings();
String getStringForActionOrigin(InputActionOrigin origin);
String getStringForAnalogActionName(uint64_t action_handle);
String getStringForDigitalActionName(uint64_t action_handle);
String getStringForXboxOrigin(int origin);
void inputActionEventCallback(SteamInputActionEvent_t *call_data);
bool inputInit(bool explicitly_call_runframe = false);
bool inputShutdown();
bool newDataAvailable();
void runFrame(bool reserved_value = true);
void setDualSenseTriggerEffect(uint64_t input_handle, int parameter_index, int trigger_mask, SCEPadTriggerEffectMode effect_mode, int position, int amplitude, int frequency);
bool setInputActionManifestFilePath(const String &manifest_path);
void setLEDColor(uint64_t input_handle, int color_r, int color_g, int color_b, int flags);
bool showBindingPanel(uint64_t input_handle);
void stopAnalogActionMomentum(uint64_t input_handle, uint64_t action);
int translateActionOrigin(InputType destination_input, InputActionOrigin source_origin);
void triggerHapticPulse(uint64_t input_handle, int target_pad, int duration);
void triggerRepeatedHapticPulse(uint64_t input_handle, int target_pad, int duration, int offset, int repeat, int flags);
void triggerSimpleHapticEvent(uint64_t input_handle, int haptic_location, uint8 intensity, const String &gain_db, uint8 other_intensity, const String &other_gain_db);
void triggerVibration(uint64_t input_handle, uint16_t left_speed, uint16_t right_speed);
void triggerVibrationExtended(uint64_t input_handle, uint16_t left_speed, uint16_t right_speed, uint16_t left_trigger_speed, uint16_t right_trigger_speed);
bool waitForData(bool wait_forever, uint32 timeout);
// Inventory
int32 addPromoItem(uint32 item);
int32 addPromoItems(PackedInt64Array items);
bool checkResultSteamID(uint64_t steam_id_expected, int32 this_inventory_handle = 0);
int32 consumeItem(uint64_t item_consume, uint32 quantity);
int32 deserializeResult(PackedByteArray buffer);
void destroyResult(int32 this_inventory_handle = 0);
int32 exchangeItems(const PackedInt64Array output_items, const PackedInt32Array output_quantity, const PackedInt64Array input_items, const PackedInt32Array input_quantity);
int32 generateItems(const PackedInt64Array items, const PackedInt32Array quantity);
int32 getAllItems();
String getItemDefinitionProperty(uint32 definition, const String &name);
int32 getItemsByID(const PackedInt64Array id_array);
Dictionary getItemPrice(uint32 definition);
Array getItemsWithPrices();
String getResultItemProperty(uint32 index, const String &name, int32 this_inventory_handle = 0);
Array getResultItems(int32 this_inventory_handle = 0);
Result getResultStatus(int32 this_inventory_handle = 0);
uint32 getResultTimestamp(int32 this_inventory_handle = 0);
int32 grantPromoItems();
bool loadItemDefinitions();
void requestEligiblePromoItemDefinitionsIDs(uint64_t steam_id);
void requestPrices();
PackedByteArray serializeResult(int32 this_inventory_handle = 0);
void startPurchase(const PackedInt64Array items, const PackedInt32Array quantity);
int32 transferItemQuantity(uint64_t item_id, uint32 quantity, uint64_t item_destination, bool split);
int32 triggerItemDrop(uint32 definition);
void startUpdateProperties();
int32 submitUpdateProperties(uint64_t this_inventory_update_handle = 0);
bool removeProperty(uint64_t item_id, const String &name, uint64_t this_inventory_update_handle = 0);
bool setPropertyString(uint64_t item_id, const String &name, const String &value, uint64_t this_inventory_update_handle = 0);
bool setPropertyBool(uint64_t item_id, const String &name, bool value, uint64_t this_inventory_update_handle = 0);
bool setPropertyInt(uint64_t item_id, const String &name, uint64_t value, uint64_t this_inventory_update_handle = 0);
bool setPropertyFloat(uint64_t item_id, const String &name, float value, uint64_t this_inventory_update_handle = 0);
// Matchmaking
int addFavoriteGame(String ip, uint16 port, uint16 query_port, uint32 flags, uint32 last_played);
void addRequestLobbyListDistanceFilter(LobbyDistanceFilter distance_filter);
void addRequestLobbyListFilterSlotsAvailable(int slots_available);
void addRequestLobbyListNearValueFilter(const String &key_to_match, int value_to_be_close_to);
void addRequestLobbyListNumericalFilter(const String &key_to_match, int value_to_match, LobbyComparison comparison_type);
void addRequestLobbyListResultCountFilter(int max_results);
void addRequestLobbyListStringFilter(const String &key_to_match, const String &value_to_match, LobbyComparison comparison_type);
void createLobby(LobbyType lobby_type, int max_members);
bool deleteLobbyData(uint64_t steam_lobby_id, const String &key);
Dictionary getAllLobbyData(uint64_t steam_lobby_id);
Array getFavoriteGames();
String getLobbyData(uint64_t steam_lobby_id, const String &key);
Dictionary getLobbyGameServer(uint64_t steam_lobby_id);
uint64_t getLobbyMemberByIndex(uint64_t steam_lobby_id, int member);
String getLobbyMemberData(uint64_t steam_lobby_id, uint64_t steam_id_user, const String &key);
int getLobbyMemberLimit(uint64_t steam_lobby_id);
uint64_t getLobbyOwner(uint64_t steam_lobby_id);
int getNumLobbyMembers(uint64_t steam_lobby_id);
bool inviteUserToLobby(uint64_t steam_lobby_id, uint64_t steam_id_invitee);
void joinLobby(uint64_t steam_lobby_id);
void leaveLobby(uint64_t steam_lobby_id);
bool removeFavoriteGame(uint32 app_id, String ip, uint16 port, uint16 query_port, uint32 flags);
bool requestLobbyData(uint64_t steam_lobby_id);
void requestLobbyList();
bool sendLobbyChatMsg(uint64_t steam_lobby_id, const String &message_body);
bool setLobbyData(uint64_t steam_lobby_id, const String &key, const String &value);
void setLobbyGameServer(uint64_t steam_lobby_id, const String &server_ip = "0", uint16 server_port = 0, uint64_t steam_id_game_server = 0);
bool setLobbyJoinable(uint64_t steam_lobby_id, bool joinable);
void setLobbyMemberData(uint64_t steam_lobby_id, const String &key, const String &value);
bool setLobbyMemberLimit(uint64_t steam_lobby_id, int max_members);
bool setLobbyOwner(uint64_t steam_lobby_id, uint64_t steam_id_new_owner);
bool setLobbyType(uint64_t steam_lobby_id, LobbyType lobby_type);
// Matchmaking Servers
void cancelQuery(uint64_t this_server_list_request = 0);
void cancelServerQuery(int server_query);
int getServerCount(uint64_t this_server_list_request = 0);
Dictionary getServerDetails(int server, uint64_t this_server_list_request = 0);
bool isRefreshing(uint64_t this_server_list_request = 0);
int pingServer(const String &ip, uint16 port);
int playerDetails(const String &ip, uint16 port);
void refreshQuery(uint64_t this_server_list_request = 0);
void refreshServer(int server, uint64_t this_server_list_request = 0);
void releaseRequest(uint64_t this_server_list_request = 0);
uint64_t requestFavoritesServerList(uint32 app_id, Array filters);
uint64_t requestFriendsServerList(uint32 app_id, Array filters);
uint64_t requestHistoryServerList(uint32 app_id, Array filters);
uint64_t requestInternetServerList(uint32 app_id, Array filters);
uint64_t requestLANServerList(uint32 app_id);
uint64_t requestSpectatorServerList(uint32 app_id, Array filters);
int serverRules(const String &ip, uint16 port);
// Music
bool musicIsEnabled();
bool musicIsPlaying();
AudioPlaybackStatus getPlaybackStatus();
float musicGetVolume();
void musicPause();
void musicPlay();
void musicPlayNext();
void musicPlayPrev();
void musicSetVolume(float volume);
// Music Remote
bool activationSuccess(bool activate);
bool isCurrentMusicRemote();
bool currentEntryDidChange();
bool currentEntryIsAvailable(bool available);
bool currentEntryWillChange();
bool deregisterSteamMusicRemote();
bool enableLooped(bool loop);
bool enablePlaylists(bool playlists);
bool enablePlayNext(bool next);
bool enablePlayPrevious(bool previous);
bool enableQueue(bool queue);
bool enableShuffled(bool shuffle);
bool playlistDidChange();
bool playlistWillChange();
bool queueDidChange();
bool queueWillChange();
bool registerSteamMusicRemote(const String &name);
bool resetPlaylistEntries();
bool resetQueueEntries();
bool setCurrentPlaylistEntry(int id);
bool setCurrentQueueEntry(int id);
bool setDisplayName(const String &name);
bool setPlaylistEntry(int id, int position, const String &entry_text);
bool setPNGIcon64x64(PackedByteArray icon);
bool setQueueEntry(int id, int position, const String &entry_text);
bool updateCurrentEntryCoverArt(PackedByteArray art);
bool updateCurrentEntryElapsedSeconds(int seconds);
bool updateCurrentEntryText(const String &text);
bool updateLooped(bool looped);
bool updatePlaybackStatus(AudioPlaybackStatus status);
bool updateShuffled(bool shuffle);
bool updateVolume(float volume);
// Networking
bool acceptP2PSessionWithUser(uint64_t remote_steam_id);
bool allowP2PPacketRelay(bool allow);
bool closeP2PChannelWithUser(uint64_t remote_steam_id, int channel);
bool closeP2PSessionWithUser(uint64_t remote_steam_id);
Dictionary getP2PSessionState(uint64_t remote_steam_id);
uint32_t getAvailableP2PPacketSize(int channel = 0);
Dictionary readP2PPacket(uint32_t packet, int channel = 0);
bool sendP2PPacket(uint64_t remote_steam_id, const PackedByteArray data, P2PSend send_type, int channel = 0);
// Networking Messages
bool acceptSessionWithUser(uint64_t remote_steam_id);
bool closeChannelWithUser(uint64_t remote_steam_id, int channel);
bool closeSessionWithUser(uint64_t remote_steam_id);
Dictionary getSessionConnectionInfo(uint64_t remote_steam_id, bool get_connection, bool get_status);
Array receiveMessagesOnChannel(int channel, int max_messages);
int sendMessageToUser(uint64_t remote_steam_id, const PackedByteArray data, int flags, int channel);
// Networking Sockets
int acceptConnection(uint32 connection_handle);
bool beginAsyncRequestFakeIP(int num_ports);
bool closeConnection(uint32 peer, int reason, const String &debug_message, bool linger);
bool closeListenSocket(uint32 socket);
int configureConnectionLanes(uint32 connection, uint32 lanes, Array priorities, Array weights);
uint32 connectP2P(uint64_t remote_steam_id, int virtual_port, Dictionary config_options);
uint32 connectByIPAddress(String ip_address_with_port, Dictionary config_options);
uint32 connectToHostedDedicatedServer(uint64_t remote_steam_id, int virtual_port, Dictionary config_options);
void createFakeUDPPort(int fake_server_port);
uint32 createHostedDedicatedServerListenSocket(int virtual_port, Dictionary config_options);
uint32 createListenSocketIP(String ip_address, Dictionary config_options);
uint32 createListenSocketP2P(int virtual_port, Dictionary config_options);
uint32 createListenSocketP2PFakeIP(int fake_port, Dictionary config_options);
uint32 createPollGroup();
Dictionary createSocketPair(bool loopback, uint64_t remote_steam_id1, uint64_t remote_steam_id2);
bool destroyPollGroup(uint32 poll_group);
// int findRelayAuthTicketForServer(int port); <------ Uses datagram relay structs which were removed from base SDK
int flushMessagesOnConnection(uint32 connection_handle);
NetworkingAvailability getAuthenticationStatus();
Dictionary getCertificateRequest();
Dictionary getConnectionInfo(uint32 connection_handle);
String getConnectionName(uint32 peer);
Dictionary getConnectionRealTimeStatus(uint32 connection_handle, int lanes, bool get_status = true);
uint64_t getConnectionUserData(uint32 peer);
Dictionary getDetailedConnectionStatus(uint32 connection_handle);
Dictionary getFakeIP(int first_port = 0);
// int getGameCoordinatorServerLogin(const String& app_data); <------ Uses datagram relay structs which were removed from base SDK
// int getHostedDedicatedServerAddress(); <------ Uses datagram relay structs which were removed from base SDK
uint32 getHostedDedicatedServerPOPId();
uint16 getHostedDedicatedServerPort();
String getListenSocketAddress(uint32 socket, bool with_port = true);
Dictionary getRemoteFakeIPForConnection(uint32 connection);
NetworkingAvailability initAuthentication();
Array receiveMessagesOnConnection(uint32 connection, int max_messages);
Array receiveMessagesOnPollGroup(uint32 poll_group, int max_messages);
// Dictionary receivedRelayAuthTicket(); <------ Uses datagram relay structs which were removed from base SDK
void resetIdentity(uint64_t remote_steam_id);
void runNetworkingCallbacks();
// Array sendMessages(Array messages, uint32 connection_handle, int flags); <------ Currently does not compile on Windows but does on Linux
Dictionary sendMessageToConnection(uint32 connection_handle, const PackedByteArray data, int flags);
Dictionary setCertificate(const PackedByteArray &certificate);
bool setConnectionPollGroup(uint32 connection_handle, uint32 poll_group);
void setConnectionName(uint32 peer, const String &name);
// Networking Utils
bool checkPingDataUpToDate(float max_age_in_seconds);
String convertPingLocationToString(PackedByteArray location);
int estimatePingTimeBetweenTwoLocations(PackedByteArray location1, PackedByteArray location2);
int estimatePingTimeFromLocalHost(PackedByteArray location);
Dictionary getConfigValue(NetworkingConfigValue config_value, NetworkingConfigScope scope_type, uint32_t connection_handle);
Dictionary getConfigValueInfo(NetworkingConfigValue config_value);
int getDirectPingToPOP(uint32 pop_id);
Dictionary getLocalPingLocation();
uint64_t getLocalTimestamp();
Dictionary getPingToDataCenter(uint32 pop_id);
int getPOPCount();
Array getPOPList();
NetworkingAvailability getRelayNetworkStatus();
void initRelayNetworkAccess();
Dictionary parsePingLocationString(const String &location_string);
bool setConnectionConfigValueFloat(uint32 connection, NetworkingConfigValue config, float value);
bool setConnectionConfigValueInt32(uint32 connection, NetworkingConfigValue config, int32 value);
bool setConnectionConfigValueString(uint32 connection, NetworkingConfigValue config, const String &value);
// bool setConfigValue(NetworkingConfigValue setting, NetworkingConfigScope scope_type, uint32_t connection_handle, NetworkingConfigDataType data_type, auto value);
bool setGlobalConfigValueFloat(NetworkingConfigValue config, float value);
bool setGlobalConfigValueInt32(NetworkingConfigValue config, int32 value);
bool setGlobalConfigValueString(NetworkingConfigValue config, const String &value);
// Parental Settings
bool isAppBlocked(uint32 app_id);
bool isAppInBlockList(uint32 app_id);
bool isFeatureBlocked(ParentalFeature feature);
bool isFeatureInBlockList(ParentalFeature feature);
bool isParentalLockEnabled();
bool isParentalLockLocked();
// Parties
void cancelReservation(uint64_t beacon_id, uint64_t steam_id);
void changeNumOpenSlots(uint64_t beacon_id, uint32 open_slots);
void createBeacon(uint32 open_slots, uint64_t location_id, PartyBeaconLocationType type, const String &connect_string, const String &beacon_metadata);
bool destroyBeacon(uint64_t beacon_id);
Array getAvailableBeaconLocations(uint32 max);
uint64_t getBeaconByIndex(uint32 index);
Dictionary getBeaconDetails(uint64_t beacon_id);
String getBeaconLocationData(uint64_t location_id, PartyBeaconLocationType location_type, PartyBeaconLocationData location_data);
uint32 getNumActiveBeacons();
void joinParty(uint64_t beacon_id);
void onReservationCompleted(uint64_t beacon_id, uint64_t steam_id);
// Remote Play
uint32 getSessionCount();
uint32 getSessionID(uint32 index);
uint64_t getSessionSteamID(uint32 session_id);
String getSessionClientName(uint32 session_id);
int getSessionClientFormFactor(uint32 session_id);
Dictionary getSessionClientResolution(uint32 session_id);
bool sendRemotePlayTogetherInvite(uint64_t friend_id);
bool startRemotePlayTogether(bool show_overlay = true);
// Remote Storage
bool beginFileWriteBatch();
bool endFileWriteBatch();
bool fileDelete(const String &file);
bool fileExists(const String &file);
bool fileForget(const String &file);
bool filePersisted(const String &file);
Dictionary fileRead(const String &file, int32_t data_to_read);
void fileReadAsync(const String &file, uint32 offset, uint32_t data_to_read);
void fileShare(const String &file);
bool fileWrite(const String &file, PackedByteArray data, int32 size = 0);
void fileWriteAsync(const String &file, PackedByteArray data, int32 size = 0);
bool fileWriteStreamCancel(uint64_t write_handle);
bool fileWriteStreamClose(uint64_t write_handle);
uint64_t fileWriteStreamOpen(const String &file);
bool fileWriteStreamWriteChunk(uint64_t write_handle, PackedByteArray data);
int32 getCachedUGCCount();
uint64_t getCachedUGCHandle(int32 content);
int32_t getFileCount();
Dictionary getFileNameAndSize(int file);
int32_t getFileSize(const String &file);
int64_t getFileTimestamp(const String &file);
Dictionary getLocalFileChange(int file);
uint32_t getLocalFileChangeCount();
Dictionary getQuota();
Dictionary getSyncPlatforms(const String &file);
Dictionary getUGCDetails(uint64_t content);
Dictionary getUGCDownloadProgress(uint64_t content);
bool isCloudEnabledForAccount();
bool isCloudEnabledForApp();
void setCloudEnabledForApp(bool enabled);
bool setSyncPlatforms(const String &file, int platform);
void ugcDownload(uint64_t content, uint32 priority);
void ugcDownloadToLocation(uint64_t content, const String &location, uint32 priority);
PackedByteArray ugcRead(uint64_t content, int32 data_size, uint32 offset, UGCReadAction action);
// Screenshots
uint32_t addScreenshotToLibrary(const String &filename, const String &thumbnail_filename, int width, int height);
uint32_t addVRScreenshotToLibrary(VRScreenshotType type, const String &filename, const String &vr_filename);
void hookScreenshots(bool hook);
bool isScreenshotsHooked();
bool setLocation(uint32_t screenshot, const String &location);
bool tagPublishedFile(uint32_t screenshot, uint64_t file_id);
bool tagUser(uint32_t screenshot, uint64_t steam_id);
void triggerScreenshot();
uint32_t writeScreenshot(const PackedByteArray &rgb, int width, int height);
// Timeline
void addGamePhaseTag(const String &tag_name, const String &tag_icon, const String &tag_group, uint32 priority );
uint64_t addInstantaneousTimelineEvent(const String &title, const String &description, const String &icon, uint32 icon_priority, float start_offset_seconds, TimelineEventClipPriority possible_clip = TIMELINE_EVENT_CLIP_PRIORITY_NONE);
uint64_t addRangeTimelineEvent(const String &title, const String &description, const String &icon, uint32 icon_priority, float start_offset_seconds, float duration, TimelineEventClipPriority possible_clip = TIMELINE_EVENT_CLIP_PRIORITY_NONE);
void clearTimelineTooltip(float time_delta);
void doesEventRecordingExist(uint64_t this_event);
void doesGamePhaseRecordingExist(const String &phase_id);
void endGamePhase();
void endRangeTimelineEvent(uint64_t this_event, float end_offset_seconds);
void openOverlayToGamePhase(const String &phase_id);
void openOverlayToTimelineEvent(const uint64_t this_event);
void removeTimelineEvent(uint64_t this_event );
void setGamePhaseAttribute(const String &attribute_group, const String &attribute_value, uint32 priority);
void setGamePhaseID(const String &phase_id);
void setTimelineGameMode(TimelineGameMode mode);
void setTimelineTooltip(String description, float time_delta);
void startGamePhase();
uint64_t startRangeTimelineEvent(const String &title, const String &description, const String &icon, uint32 priority, float start_offset_seconds, TimelineEventClipPriority possible_clip = TIMELINE_EVENT_CLIP_PRIORITY_NONE);
void updateRangeTimelineEvent(uint64_t this_event, const String &title, const String &description, const String &icon, uint32 priority, TimelineEventClipPriority possible_clip = TIMELINE_EVENT_CLIP_PRIORITY_NONE);
// UGC
void addAppDependency(uint64_t published_file_id, uint32_t app_id);
bool addContentDescriptor(uint64_t update_handle, int descriptor_id);
void addDependency(uint64_t published_file_id, uint64_t child_published_file_id);
bool addExcludedTag(uint64_t query_handle, const String &tag_name);
bool addItemKeyValueTag(uint64_t query_handle, const String &key, const String &value);
bool addItemPreviewFile(uint64_t query_handle, const String &preview_file, ItemPreviewType type);
bool addItemPreviewVideo(uint64_t query_handle, const String &video_id);
void addItemToFavorites(uint32_t app_id, uint64_t published_file_id);
bool addRequiredKeyValueTag(uint64_t query_handle, const String &key, const String &value);
bool addRequiredTag(uint64_t query_handle, const String &tag_name);
bool addRequiredTagGroup(uint64_t query_handle, Array tag_array);
bool initWorkshopForGameServer(uint32_t workshop_depot_id, String folder);
void createItem(uint32 app_id, WorkshopFileType file_type);
uint64_t createQueryAllUGCRequest(UGCQuery query_type, UGCMatchingUGCType matching_type, uint32_t creator_id, uint32_t consumer_id, uint32 page);
uint64_t createQueryUGCDetailsRequest(Array published_file_id);
uint64_t createQueryUserUGCRequest(uint64_t steam_id, UserUGCList list_type, UGCMatchingUGCType matching_ugc_type, UserUGCListSortOrder sort_order, uint32_t creator_id, uint32_t consumer_id, uint32 page);
void deleteItem(uint64_t published_file_id);
bool downloadItem(uint64_t published_file_id, bool high_priority);
Dictionary getItemDownloadInfo(uint64_t published_file_id);
Dictionary getItemInstallInfo(uint64_t published_file_id);
uint32 getItemState(uint64_t published_file_id);
Dictionary getItemUpdateProgress(uint64_t update_handle);
uint32 getNumSubscribedItems();
uint32 getNumSupportedGameVersions(uint64_t query_handle, uint32 index);
Dictionary getQueryUGCAdditionalPreview(uint64_t query_handle, uint32 index, uint32 preview_index);
Dictionary getQueryUGCChildren(uint64_t query_handle, uint32 index, uint32_t child_count);
Dictionary getQueryUGCContentDescriptors(uint64_t query_handle, uint32 index, uint32_t max_entries);
Dictionary getQueryUGCKeyValueTag(uint64_t query_handle, uint32 index, uint32 key_value_tag_index);
String getQueryUGCMetadata(uint64_t query_handle, uint32 index);
uint32 getQueryUGCNumAdditionalPreviews(uint64_t query_handle, uint32 index);
uint32 getQueryUGCNumKeyValueTags(uint64_t query_handle, uint32 index);
uint32 getQueryUGCNumTags(uint64_t query_handle, uint32 index);
String getQueryUGCPreviewURL(uint64_t query_handle, uint32 index);
Dictionary getQueryUGCResult(uint64_t query_handle, uint32 index);
Dictionary getQueryUGCStatistic(uint64_t query_handle, uint32 index, ItemStatistic stat_type);
String getQueryUGCTag(uint64_t query_handle, uint32 index, uint32 tag_index);
String getQueryUGCTagDisplayName(uint64_t query_handle, uint32 index, uint32 tag_index);
Array getSubscribedItems();
Dictionary getSupportedGameVersionData(uint64_t query_handle, uint32 index, uint32 version_index);
Array getUserContentDescriptorPreferences(uint32 max_entries);
void getUserItemVote(uint64_t published_file_id);
bool releaseQueryUGCRequest(uint64_t query_handle);
void removeAppDependency(uint64_t published_file_id, uint32_t app_id);
bool removeContentDescriptor(uint64_t update_handle, int descriptor_id);
void removeDependency(uint64_t published_file_id, uint64_t child_published_file_id);
void removeItemFromFavorites(uint32_t app_id, uint64_t published_file_id);
bool removeItemKeyValueTags(uint64_t update_handle, const String &key);
bool removeItemPreview(uint64_t update_handle, uint32 index);
void sendQueryUGCRequest(uint64_t update_handle);
bool setAdminQuery(uint64_t update_handle, bool admin_query);
bool setAllowCachedResponse(uint64_t update_handle, uint32 max_age_seconds);
bool setCloudFileNameFilter(uint64_t update_handle, const String &match_cloud_filename);
bool setItemContent(uint64_t update_handle, const String &content_folder);
bool setItemDescription(uint64_t update_handle, const String &description);
bool setItemMetadata(uint64_t update_handle, const String &ugc_metadata);
bool setItemPreview(uint64_t update_handle, const String &preview_file);
bool setItemTags(uint64_t update_handle, Array tag_array, bool allow_admin_tags = false);
bool setItemTitle(uint64_t update_handle, const String &title);
bool setItemUpdateLanguage(uint64_t update_handle, const String &language);
bool setItemVisibility(uint64_t update_handle, RemoteStoragePublishedFileVisibility visibility);
bool setLanguage(uint64_t query_handle, const String &language);
bool setMatchAnyTag(uint64_t query_handle, bool match_any_tag);
bool setRankedByTrendDays(uint64_t query_handle, uint32 days);
bool setRequiredGameVersions(uint64_t query_handle, String game_branch_min, String game_branch_max);
bool setReturnAdditionalPreviews(uint64_t query_handle, bool return_additional_previews);
bool setReturnChildren(uint64_t query_handle, bool return_children);
bool setReturnKeyValueTags(uint64_t query_handle, bool return_key_value_tags);
bool setReturnLongDescription(uint64_t query_handle, bool return_long_description);
bool setReturnMetadata(uint64_t query_handle, bool return_metadata);
bool setReturnOnlyIDs(uint64_t query_handle, bool return_only_ids);
bool setReturnPlaytimeStats(uint64_t query_handle, uint32 days);
bool setReturnTotalOnly(uint64_t query_handle, bool return_total_only);
bool setSearchText(uint64_t query_handle, const String &search_text);
void setUserItemVote(uint64_t published_file_id, bool vote_up);
uint64_t startItemUpdate(uint32_t app_id, uint64_t file_id);
void startPlaytimeTracking(Array published_file_ids);
void stopPlaytimeTracking(Array published_file_ids);
void stopPlaytimeTrackingForAllItems();
void getAppDependencies(uint64_t published_file_id);
void submitItemUpdate(uint64_t update_handle, const String &change_note);
void subscribeItem(uint64_t published_file_id);
void suspendDownloads(bool suspend);
void unsubscribeItem(uint64_t published_file_id);
bool updateItemPreviewFile(uint64_t update_handle, uint32 index, const String &preview_file);
bool updateItemPreviewVideo(uint64_t update_handle, uint32 index, const String &video_id);
bool showWorkshopEULA();
void getWorkshopEULAStatus();
bool setTimeCreatedDateRange(uint64_t update_handle, uint32 start, uint32 end);
bool setTimeUpdatedDateRange(uint64_t update_handle, uint32 start, uint32 end);
// Users
void advertiseGame(const String &server_ip, int port);
BeginAuthSessionResult beginAuthSession(PackedByteArray ticket, int ticket_size, uint64_t steam_id);
void cancelAuthTicket(uint32_t auth_ticket);
Dictionary decompressVoice(const PackedByteArray &voice, uint32 sample_rate, uint32 buffer_size_override = 20480);
void endAuthSession(uint64_t steam_id);
Dictionary getAuthSessionTicket(uint64_t remote_steam_id = 0);
uint32 getAuthTicketForWebApi(const String &service_identity = "");
Dictionary getAvailableVoice();
// Dictionary getDecompressedVoice(uint32 buffer_in_size_override = 0, uint32 buffer_out_size_override = 20480, uint32 sample_rate_override = 0);
void getDurationControl();
Dictionary getEncryptedAppTicket();
int getGameBadgeLevel(int series, bool foil);
int getPlayerSteamLevel();
uint64_t getSteamID();
Dictionary getVoice(uint32 buffer_size_override = 0);
uint32 getVoiceOptimalSampleRate();
Dictionary initiateGameConnection(uint64_t server_id, String server_ip, uint16 server_port, bool secure);
bool isBehindNAT();
bool isPhoneIdentifying();
bool isPhoneRequiringVerification();
bool isPhoneVerified();
bool isTwoFactorEnabled();
bool loggedOn();
void requestEncryptedAppTicket(const String &secret);
void requestStoreAuthURL(const String &redirect);
void startVoiceRecording();
bool setDurationControlOnlineState(int new_state);
void stopVoiceRecording();
void terminateGameConnection(String server_ip, uint16 server_port);
int userHasLicenseForApp(uint64_t steam_id, uint32_t app_id);
// User Stats
void attachLeaderboardUGC(uint64_t ugc_handle, uint64_t this_leaderboard = 0);
bool clearAchievement(const String &achievement_name);
void downloadLeaderboardEntries(int start, int end, LeaderboardDataRequest type = LeaderboardDataRequest(k_ELeaderboardDataRequestGlobal), uint64_t this_leaderboard = 0);
void downloadLeaderboardEntriesForUsers(Array users_id, uint64_t this_leaderboard = 0);
void findLeaderboard(const String &leaderboard_name);
void findOrCreateLeaderboard(const String &leaderboard_name, LeaderboardSortMethod sort_method, LeaderboardDisplayType display_type);
Dictionary getAchievement(const String &achievement_name);
Dictionary getAchievementAchievedPercent(const String &achievement_name);
Dictionary getAchievementAndUnlockTime(const String &achievement_name);
String getAchievementDisplayAttribute(const String &achievement_name, const String &key);
int getAchievementIcon(const String &achievement_name);
String getAchievementName(uint32_t achievement);
Dictionary getAchievementProgressLimitsInt(const String &achievement_name);
Dictionary getAchievementProgressLimitsFloat(const String &achievement_name);
uint64_t getGlobalStatInt(const String &stat_name);
double getGlobalStatFloat(const String &stat_name);
PackedInt64Array getGlobalStatIntHistory(const String &stat_name);
PackedFloat64Array getGlobalStatFloatHistory(const String &stat_name);
Dictionary getLeaderboardDisplayType(uint64_t this_leaderboard = 0);
int getLeaderboardEntryCount(uint64_t this_leaderboard = 0);
String getLeaderboardName(uint64_t this_leaderboard = 0);
Dictionary getLeaderboardSortMethod(uint64_t this_leaderboard = 0);
Dictionary getMostAchievedAchievementInfo();
Dictionary getNextMostAchievedAchievementInfo(int iterator);
uint32_t getNumAchievements();
void getNumberOfCurrentPlayers();
float getStatFloat(const String &stat_name);
int getStatInt(const String &stat_name);
Dictionary getUserAchievement(uint64_t steam_id, const String &name);
Dictionary getUserAchievementAndUnlockTime(uint64_t steam_id, const String &name);
float getUserStatFloat(uint64_t steam_id, const String &name);
int getUserStatInt(uint64_t steam_id, const String &name);
bool indicateAchievementProgress(const String &name, int current_progress, int max_progress);
void requestGlobalAchievementPercentages();
void requestGlobalStats(int history_days);
void requestUserStats(uint64_t steam_id);
bool resetAllStats(bool achievements_too = true);
bool setAchievement(const String &name);
bool setStatFloat(const String &name, float value);
bool setStatInt(const String &name, int value);
bool storeStats();
bool updateAvgRateStat(const String &name, float this_session, double session_length);
void uploadLeaderboardScore(int score, bool keep_best = false, PackedInt32Array details = PackedInt32Array(), uint64_t this_leaderboard = 0);
// Utils
bool dismissFloatingGamepadTextInput();
bool dismissGamepadTextInput();
String filterText(TextFilteringContext context, uint64_t steam_id, const String &message);
String getAPICallFailureReason();
uint32_t getAppID();
int getCurrentBatteryPower();
Dictionary getImageRGBA(int image);
Dictionary getImageSize(int image);
uint32 getIPCCallCount();
String getIPCountry();
int getSecondsSinceAppActive();
int getSecondsSinceComputerActive();
int getServerRealTime();
String getSteamUILanguage();
bool initFilterText();
Dictionary isAPICallCompleted();
bool isOverlayEnabled();
bool isSteamChinaLauncher();
bool isSteamInBigPictureMode();
bool isSteamRunningInVR();
bool isSteamRunningOnSteamDeck();
bool isVRHeadsetStreamingEnabled();
bool overlayNeedsPresent();
void setGameLauncherMode(bool mode);
void setOverlayNotificationInset(int horizontal, int vertical);
void setOverlayNotificationPosition(int pos);
void setVRHeadsetStreamingEnabled(bool enabled);
bool showFloatingGamepadTextInput(FloatingGamepadTextInputMode input_mode, int text_field_x_position, int text_field_y_position, int text_field_width, int text_field_height);
bool showGamepadTextInput(GamepadTextInputMode input_mode, GamepadTextInputLineMode line_input_mode, const String &description, uint32 max_text, const String &preset_text);
void startVRDashboard();
// Video
void getOPFSettings(uint32_t app_id);
String getOPFStringForApp(uint32_t app_id);
void getVideoURL(uint32_t app_id);
Dictionary isBroadcasting();
// PROPERTIES
// Friends
uint64_t current_clan_id = 0;
// HTML Surface
uint32 browser_handle = 0;
// Inventory
SteamInventoryResult_t inventory_handle = 0;
SteamInventoryUpdateHandle_t inventory_update_handle = 0;
// User
uint64_t current_steam_id = 0;
// User Stats
int leaderboard_details_max = LEADERBOARD_DETAIL_MAX;
Array leaderboard_entries_array;
SteamLeaderboard_t leaderboard_handle = 0;
// Utils
uint32_t current_app_id = 0;
protected:
static void _bind_methods();
static Steam *singleton;
private:
// Main
String godotsteam_version = "4.12";
bool is_init_success;
bool were_callbacks_embedded;
const SteamNetworkingConfigValue_t *convert_config_options(Dictionary config_options);
CSteamID createSteamID(uint64_t steam_id, AccountType account_type = AccountType(-1));
SteamNetworkingIdentity getIdentityFromSteamID(uint64_t steam_id);
uint32 getIPFromSteamIP(SteamNetworkingIPAddr this_address);
uint32 getIPFromString(String ip_string);
uint64_t getSteamIDFromIdentity(SteamNetworkingIdentity this_identity);
SteamNetworkingIPAddr getSteamIPFromInt(uint32 ip_integer);
SteamNetworkingIPAddr getSteamIPFromString(String ip_string);
String getStringFromIP(uint32 ip_address);
String getStringFromSteamIP(SteamNetworkingIPAddr this_address);
// Matchmaking Servers
HServerListRequest server_list_request;
ISteamMatchmakingServerListResponse *server_list_response = this;
ISteamMatchmakingPingResponse *ping_response = this;
ISteamMatchmakingPlayersResponse *players_response = this;
ISteamMatchmakingRulesResponse *rules_response = this;
Dictionary gameServerItemToDictionary(gameserveritem_t *server_item);
// Networking Sockets
uint64_t networking_microseconds = 0;
// SteamDatagramHostedAddress hosted_address;
// PackedByteArray routing_blob;
// SteamDatagramRelayAuthTicket relay_auth_ticket;
// Utils
uint64_t api_handle = 0;
// Run the Steamworks API callbacks /////
void run_callbacks() {
SteamAPI_RunCallbacks();
}
// STEAM CALLBACKS
// Apps
STEAM_CALLBACK(Steam, dlc_installed, DlcInstalled_t, callbackDLCInstalled);
STEAM_CALLBACK(Steam, file_details_result, FileDetailsResult_t, callbackFileDetailsResult);
STEAM_CALLBACK(Steam, new_launch_url_parameters, NewUrlLaunchParameters_t, callbackNewLaunchURLParameters);
STEAM_CALLBACK(Steam, timed_trial_status, TimedTrialStatus_t, callbackTimedTrialStatus);
// Friends
STEAM_CALLBACK(Steam, avatar_loaded, AvatarImageLoaded_t, callbackAvatarLoaded);
STEAM_CALLBACK(Steam, avatar_image_loaded, AvatarImageLoaded_t, callbackAvatarImageLoaded);
STEAM_CALLBACK(Steam, clan_activity_downloaded, DownloadClanActivityCountsResult_t, callbackClanActivityDownloaded);
STEAM_CALLBACK(Steam, friend_rich_presence_update, FriendRichPresenceUpdate_t, callbackFriendRichPresenceUpdate);
STEAM_CALLBACK(Steam, connected_chat_join, GameConnectedChatJoin_t, callbackConnectedChatJoin);
STEAM_CALLBACK(Steam, connected_chat_leave, GameConnectedChatLeave_t, callbackConnectedChatLeave);
STEAM_CALLBACK(Steam, connected_clan_chat_message, GameConnectedClanChatMsg_t, callbackConnectedClanChatMessage);
STEAM_CALLBACK(Steam, connected_friend_chat_message, GameConnectedFriendChatMsg_t, callbackConnectedFriendChatMessage);
STEAM_CALLBACK(Steam, join_requested, GameLobbyJoinRequested_t, callbackJoinRequested);
STEAM_CALLBACK(Steam, overlay_toggled, GameOverlayActivated_t, callbackOverlayToggled);
STEAM_CALLBACK(Steam, join_game_requested, GameRichPresenceJoinRequested_t, callbackJoinGameRequested);
STEAM_CALLBACK(Steam, change_server_requested, GameServerChangeRequested_t, callbackChangeServerRequested);
STEAM_CALLBACK(Steam, join_clan_chat_complete, JoinClanChatRoomCompletionResult_t, callbackJoinClanChatComplete);
STEAM_CALLBACK(Steam, persona_state_change, PersonaStateChange_t, callbackPersonaStateChange);
STEAM_CALLBACK(Steam, name_changed, SetPersonaNameResponse_t, callbackNameChanged);
STEAM_CALLBACK(Steam, overlay_browser_protocol, OverlayBrowserProtocolNavigation_t, callbackOverlayBrowserProtocol);
STEAM_CALLBACK(Steam, unread_chat_messages_changed, UnreadChatMessagesChanged_t, callbackUnreadChatMessagesChanged);
STEAM_CALLBACK(Steam, equipped_profile_items_changed, EquippedProfileItemsChanged_t, callbackEquippedProfileItemsChanged);
// Game Search
STEAM_CALLBACK(Steam, search_for_game_progress, SearchForGameProgressCallback_t, callbackSearchForGameProgress);
STEAM_CALLBACK(Steam, search_for_game_result, SearchForGameResultCallback_t, callbackSearchForGameResult);
STEAM_CALLBACK(Steam, request_players_for_game_progress, RequestPlayersForGameProgressCallback_t, callbackRequestPlayersForGameProgress);
STEAM_CALLBACK(Steam, request_players_for_game_result, RequestPlayersForGameResultCallback_t, callbackRequestPlayersForGameResult);
STEAM_CALLBACK(Steam, request_players_for_game_final_result, RequestPlayersForGameFinalResultCallback_t, callbackRequestPlayersForGameFinalResult);
STEAM_CALLBACK(Steam, submit_player_result, SubmitPlayerResultResultCallback_t, callbackSubmitPlayerResult);
STEAM_CALLBACK(Steam, end_game_result, EndGameResultCallback_t, callbackEndGameResult);
// HTML Surface
STEAM_CALLBACK(Steam, html_can_go_backandforward, HTML_CanGoBackAndForward_t, callbackHTMLCanGoBackandforward);
STEAM_CALLBACK(Steam, html_changed_title, HTML_ChangedTitle_t, callbackHTMLChangedTitle);
STEAM_CALLBACK(Steam, html_close_browser, HTML_CloseBrowser_t, callbackHTMLCloseBrowser);
STEAM_CALLBACK(Steam, html_file_open_dialog, HTML_FileOpenDialog_t, callbackHTMLFileOpenDialog);
STEAM_CALLBACK(Steam, html_finished_request, HTML_FinishedRequest_t, callbackHTMLFinishedRequest);
STEAM_CALLBACK(Steam, html_hide_tooltip, HTML_HideToolTip_t, callbackHTMLHideTooltip);
STEAM_CALLBACK(Steam, html_horizontal_scroll, HTML_HorizontalScroll_t, callbackHTMLHorizontalScroll);
STEAM_CALLBACK(Steam, html_js_alert, HTML_JSAlert_t, callbackHTMLJSAlert);
STEAM_CALLBACK(Steam, html_js_confirm, HTML_JSConfirm_t, callbackHTMLJSConfirm);
STEAM_CALLBACK(Steam, html_link_at_position, HTML_LinkAtPosition_t, callbackHTMLLinkAtPosition);
STEAM_CALLBACK(Steam, html_needs_paint, HTML_NeedsPaint_t, callbackHTMLNeedsPaint);
STEAM_CALLBACK(Steam, html_new_window, HTML_NewWindow_t, callbackHTMLNewWindow);
STEAM_CALLBACK(Steam, html_open_link_in_new_tab, HTML_OpenLinkInNewTab_t, callbackHTMLOpenLinkInNewTab);
STEAM_CALLBACK(Steam, html_search_results, HTML_SearchResults_t, callbackHTMLSearchResults);
STEAM_CALLBACK(Steam, html_set_cursor, HTML_SetCursor_t, callbackHTMLSetCursor);
STEAM_CALLBACK(Steam, html_show_tooltip, HTML_ShowToolTip_t, callbackHTMLShowTooltip);
STEAM_CALLBACK(Steam, html_start_request, HTML_StartRequest_t, callbackHTMLStartRequest);
STEAM_CALLBACK(Steam, html_status_text, HTML_StatusText_t, callbackHTMLStatusText);
STEAM_CALLBACK(Steam, html_update_tooltip, HTML_UpdateToolTip_t, callbackHTMLUpdateTooltip);
STEAM_CALLBACK(Steam, html_url_changed, HTML_URLChanged_t, callbackHTMLURLChanged);
STEAM_CALLBACK(Steam, html_vertical_scroll, HTML_VerticalScroll_t, callbackHTMLVerticalScroll);
// HTTP
STEAM_CALLBACK(Steam, http_request_completed, HTTPRequestCompleted_t, callbackHTTPRequestCompleted);
STEAM_CALLBACK(Steam, http_request_data_received, HTTPRequestDataReceived_t, callbackHTTPRequestDataReceived);
STEAM_CALLBACK(Steam, http_request_headers_received, HTTPRequestHeadersReceived_t, callbackHTTPRequestHeadersReceived);