-
Notifications
You must be signed in to change notification settings - Fork 28
/
API.txt
766 lines (640 loc) · 31.2 KB
/
API.txt
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
//--------------------------------//
// FRESteamWorks API description //
//--------------------------------//
// This document describes the public API of FRESteamWorks.
// Each AS3 function prototype below contains some information in the comments
// above it:
// - the corresponding Steamworks API function in the format
// ISteamInterface#FunctionName(args), if applicable (if only a function name
// is show, the interface is listed at the top of the current block)
// "..." in the argument list means the argument is handled by FRESteamWorks
// - a default return value (denoted by @default value), returned in case the
// API call fails (e.g. when the API couldn't be initialized, or when the
// Linux APIWrapper binary isn't running)
// - a description of the return value, if it differs from that of the
// corresponding Steamworks API function (or no such function exists)
// - a description of the arguments, if they differ from the native function's
// arguments, or if their values are restricted to certain constants
// - any events the function might generate, including what the event's
// "response" property is set to (in general, response = SteamResults.OK
// means the API call was successful and any other value means it failed,
// but there are some exceptions). "response = m_eFoo" means that the event's
// response property is set to the value of m_eFoo of the underlying native
// event
// - additional information (e.g. what events to listen for before calling the
// function)
/********************************/
/* General Steamworks functions */
/********************************/
// SteamAPI_Init()
// @default false
// @event RESPONSE_OnUserStatsReceived, response = m_eResult
public function init():Boolean
// SteamAPI_Shutdown()
// @nogen
// Call this function when shutting down your application.
public function dispose():void
// SteamAPI_RunCallbacks()
// @default false
// This function is automatically called every 100 ms after the API was
// successfuly initialized.
public function runCallbacks():Boolean
// ISteamUser#GetSteamID()
// @default "0"
public function getUserID():String
// ISteamUtils#GetAppID()
// @default 0
public function getAppID():uint
// ISteamApps#GetAvailableGameLanguages()
// @default ""
public function getAvailableGameLanguages():String
// ISteamApps#GetCurrentGameLanguage()
// @default ""
public function getCurrentGameLanguage():String
// ISteamFriends#GetPersonaName()
// @default ""
public function getPersonaName():String
// SteamAPI_RestartAppIfNecessary(appID)
// @default false
// Must be called before init()
// If using a non-default path for the APIWrapper binary on Linux, call
// startProcess(path:String) first
public function restartAppIfNecessary(appID:uint):Boolean
/************************/
/* Stats / Achievements */
/************************/
// ISteamUserStats
// RequestCurrentStats()
// @default false
// @event RESPONSE_OnUserStatsReceived, response = m_eResult
public function requestStats():Boolean
// SetAchievement(name)
// @default false
// @event RESPONSE_OnUserStatsStored, response = m_eResult
// @event RESPONSE_OnAchievementStored, response = SteamResults.OK
public function setAchievement(name:String):Boolean
// ClearAchievement(name)
// @default false
// @event RESPONSE_OnUserStatsStored, response = m_eResult
public function clearAchievement(name:String):Boolean
// GetAchievement(name)
// @default false
// somewhat poorly named ...
public function isAchievement(name:String):Boolean
// IndicateAchievementProgress(name, currentProgress, maxProgress)
// @default false
public function indicateAchievementProgress(name:String, currentProgress:int, maxProgress:int):Boolean
// GetStat(name, int*)
// @default 0
public function getStatInt(name:String):int
// GetStat(name, float*)
// @default 0
public function getStatFloat(name:String):Number
// SetStat(name, int*)
// @default false
public function setStatInt(name:String, value:int):Boolean
// SetStat(name, float*)
// @default false
public function setStatFloat(name:String, value:Number):Boolean
// StoreStats()
// @default false
// @event RESPONSE_OnUserStatsStored, response = m_eResult
public function storeStats():Boolean
// ResetAllStats(achievementsToo)
// @default false
// @event RESPONSE_OnUserStatsStored, response = m_eResult
// calls StoreStats() afterwards, return value is the return value of that call
public function resetAllStats(achievementsToo:Boolean):Boolean
// RequestGlobalStats(days)
// @default false
// @event RESPONSE_OnGlobalStatsReceived, response = m_eResult
public function requestGlobalStats(historyDays:int):Boolean
// GetGlobalStat(name, int*)
// @default 0
// Returns the value as a Number, as AS3 doesn't have an int64 type. This can
// lead to inaccurate values being returned, if the value can not be accurately
// described by a double (i.e. is larger than 2^53).
public function getGlobalStatInt(name:String):Number
// GetGlobalStat(name, float*)
// @default 0
public function getGlobalStatFloat(name:String):Number
// GetGlobalStatHistory(name, int64*, days)
// @default []
// This is returned as an Array of Numbers, see above.
public function getGlobalStatHistoryInt(name:String, days:int):Array
// GetGlobalStatHistory(name, float*, days)
// @default []
public function getGlobalStatHistoryFloat(name:String, days:int):Array
/****************/
/* Leaderboards */
/****************/
// ISteamUserStats
// FindLeaderboard(name)
// @default false
// @event RESPONSE_OnFindLeaderboard
// - response = SteamResults.OK if m_bLeaderboardFound is true
// - response = SteamResults.Fail otherwise
// If response = OK, call findLeaderboardResult to get the leaderboard handle.
public function findLeaderboard(name:String):Boolean
// FindOrCreateLeaderboard(name, sortMethod, displayType)
// @default false
// @arg sortMethod should be one of the UserStatsConstants.SORTMETHOD_* constants
// @arg displayType should be one of the UserStatsConstants.DISPLAYTYPE_* constants
// See FindLeaderboard.
public function findOrCreateLeaderboard(name:String, sortMethod:uint, displayType:uint):Boolean
// @default "0"
// Returns the SteamLeaderboard_t m_hSteamLeaderboard of the leaderboard
// returned by a successful call (i.e. response = OK of the corresponding
// event) to findLeaderboard or findOrCreateLeaderboard, or "0" if no such call
// was made.
public function findLeaderboardResult():String
// GetLeaderboardName(handle)
// @default ""
// @arg handle is a leaderbard handle returned by find(OrCreate)Leaderboard()
// handle is the value returned by findLeaderboardResult()
public function getLeaderboardName(handle:String):String
// GetLeaderboardEntryCount(handle)
// @default 0
// @arg handle is a leaderbard handle returned by find(OrCreate)Leaderboard()
public function getLeaderboardEntryCount(handle:String):int
// GetLeaderboardSortMethod(handle)
// @default UserStatsConstants.SORTMETHOD_None
// @arg handle is a leaderbard handle returned by find(OrCreate)Leaderboard()
// Returns one of the UserStatsConstants.SORTMETHOD_* constants.
public function getLeaderboardSortMethod(handle:String):uint
// GetLeaderboardDisplayType(handle)
// @default UserStatsConstants.DISPLAYTYPE_None
// @arg handle is a leaderbard handle returned by find(OrCreate)Leaderboard()
// Returns one of the UserStatsConstants.DISPLAYTYPE_* constants.
public function getLeaderboardDisplayType(handle:String):uint
// UploadLeaderboardScore(handle, method, score, details, details.length)
// @default false
// @arg handle is a leaderbard handle returned by find(OrCreate)Leaderboard()
// @arg method should be one of the UserStatsConstants.UPLOADSCOREMETHOD_* constants
// @arg details should be an Array of ints
// @event RESPONSE_OnUploadLeaderboardScore
// - response = SteamResults.OK if m_bSuccess is true
// - response = SteamResults.Fail otherwise
// If response = OK, call uploadLeaderboardScoreResult to get the corresponding
// result object.
public function uploadLeaderboardScore(handle:String, method:uint, score:int, details:Array = null):Boolean
// @default null
// Returns the UploadLeaderboardScoreResult object corresponding to the most
// recent successful call to uploadLeaderboardScore, or null if no such call
// was made.
public function uploadLeaderboardScoreResult():UploadLeaderboardScoreResult
// DownloadLeaderboardEntries(handle, request, rangeStart, rangeEnd)
// @default false
// @arg handle is a leaderbard handle returned by find(OrCreate)Leaderboard()
// @arg request should be one of the UserStatsConstants_DATAREQUEST_* constants
// @event RESPONSE_OnDownloadLeaderboardEntries
// - response = SteamResults.OK if m_cEntryCount was greater than 0
// - response = SteamResults.Fail otherwise
// If response = OK, call downloadLeaderboardEntriesResult to get the
// corresponding entries leaderboard entries.
public function downloadLeaderboardEntries(handle:String, request:uint = UserStatsConstants.DATAREQUEST_GlobalAroundUser, rangeStart:int = -4, rangeEnd:int = 5):Boolean
// @default []
// Returns an Array of LeaderboardEntry objects corresponding to the most recent
// succesfull call to downloadLeaderboardEntries call by calling
// GetDownloadLeaderboardEntry(..., numDetails)
// for each entry, or an empty array if no succesfull call to
// downloadLeaderboardEntries was made.
public function downloadLeaderboardEntriesResult(numDetails:int = 0):Array
/**************************/
/* Cloud / Remote Storage */
/**************************/
// ISteamRemoteStorage
// GetFileCount()
// @default 0
public function getFileCount():int
// GetFileSize(name)
// @default 0
public function getFileSize(name:String):int
// FileExists(name)
// @default false
public function fileExists(name:String):Boolean
// FileWrite(name, data, data.length)
// @default false
public function fileWrite(name:String, data:ByteArray):Boolean
// FileRead(name, ...)
// @default false
// The data read by the API call is written into the "data" ByteArray passed.
// Any potential data in that ByteArray is cleared before reading the file into
// it.
public function fileRead(name:String, data:ByteArray):Boolean
// FileDelete(name)
// @default false
public function fileDelete(name:String):Boolean
// FileShare(name)
// @default false
// @event RESPONSE_OnFileShared event, response = m_eResult
// If response = SteamResults.OK, call fileShareResult to get the file handle of
// the shared file.
public function fileShare(name:String):Boolean
// @default WorkshopConstants.UGCHANDLE_Invalid
// Returns the corresponding file handle of the last file that was successfuly
// shared with a call to fileShare(), or WorkshopConstants.UGCHANDLE_Invalid if
// no such call was made.
public function fileShareResult():String
// IsCloudEnabledForApp()
// @default false
public function isCloudEnabledForApp():Boolean
// SetCloudEnabledForApp(enabled)
// @default false
// The return value is that of IsCloudEnabledForApp() called afterwards.
public function setCloudEnabledForApp(enabled:Boolean):Boolean
// GetQuota(...)
// @default []
// Returns an Array containing two strings, total and available bytes count, in that order.
public function getQuota():Array
/******************/
/* UGC / Workshop */
/******************/
// ISteamUGC
// UGCDownload(handle, priority)
// @default false
// @arg handle is a UGC handle obtained from fileShareResult() or FileDetailsResult
// @event RESPONSE_OnUGCDownload, response = m_eResult.
// Call getUGCDownloadResult to get the corresponding DownloadUGCResult object.
public function UGCDownload(handle:String, priority:uint):Boolean
// UGCRead(handle, data, size, offset, k_EUGCRead_ContinueReadingUntilFinished)
// @default false
// @arg handle is a UGC handle (see UGCDownload for details)
// Reads the file contents into the data ByteArray after clearing it first.
public function UGCRead(handle:String, size:int, offset:uint, data:ByteArray):Boolean
// GetUGCDownloadProgress(handle, ...)
// @arg handle is a UGC handle (see UGCDownload for details)
// @default []
// Returns as an Array containing two ints, bytesDownloaded and bytesExpected,
// in that order.
public function getUGCDownloadProgress(handle:String):Array
// @default null
// @arg handle is a UGC handle (see UGCDownload for details)
// Returns a DownloadUGCResult corresponding to the last successful call to
// UGCDownload(handle), or null if no such call was made.
// Since one such result is stored per file handle, it's safe to call
// UGCDownload on multiple files at the same time.
public function getUGCDownloadResult(handle:String):DownloadUGCResult
// PublishWorkshopFile(name, preview, appId, title, description, visibility, tags, fileType)
// @default false
// @arg visibility should be one of the WorkshopConstants.VISIBILITY_* constants
// @arg tags should be an Array of Strings, or null.
// @arg fileType should be one of the WorkshopConstants.FILETYPE_* constants
// @event RESPONSE_OnPublishWorkshopFile, response = m_eResult
// If response = SteamResult.OK, call publishWorkshopFileResult to get the
// corresponding published file id.
public function publishWorkshopFile(name:String, preview:String, appId:uint, title:String, description:String, visibility:uint, tags:Array, fileType:uint):Boolean
// @default WorkshopConstants.PUBLISHEDFILEID_Invalid
// Returns the file id of the last file successfuly shared with a call to
// publishWorkshopFile, or WorkshopConstants.PUBLISHEDFILEID_Invalid if no such
// call was made.
public function publishWorkshopFileResult():String
// DeletePublishedFile(file)
// @default false
// @arg file is a published file id returned by publishWorkshopFileResult() or
// obtained by enumerating the workshop
// @event RESPONSE_OnDeletePublishedFile, response = m_eResult
// indicating successful deletion of the file.
public function deletePublishedFile(file:String):Boolean
// GetPublishedFileDetails(file, maxAge)
// @default false
// @arg file is a published file id (see deletePublishedFile for details)
// @event RESPONSE_OnGetPublishedFileDetails, response = m_eResult
// If response = SteamResults.OK, call getPublishedFileDetailsResult to get the
// corresponding FileDetailsResult object.
public function getPublishedFileDetails(file:String, maxAge:uint = 0):Boolean
// @default null
// @arg file is a published file id (see deletePublishedFile for details)
// Returns the FileDetailsResult corresponding to the last successful call to
// getPublishedFileDetails(file), or null otherwise.
// Since one such object is stored per file, it's safe to call
// getPublishedFileDetails for multiple files at once.
public function getPublishedFileDetailsResult(file:String):FileDetailsResult
// EnumerateUserPublishedFiles(startIndex)
// @default false
// @event RESPONSE_OnEnumerateUserPublishedFiles, response = m_eResult
// If the call was successful, call enumerateUserPublishedFilesResult to get
// the corresponding UserFilesResult object.
public function enumerateUserPublishedFiles(startIndex:uint):Boolean
// @default null
// Returns a UserFilesResult object corresponding to the last successful call
// to enumerateUserPublishedFiles, or null if no such call was made.
public function enumerateUserPublishedFilesResult():UserFilesResult
// EnumeratePublishedWorkshopFiles(type, start, count, days, tags, userTags)
// @default false
// @arg type should be one of the WorkshopConstants.ENUMTYPE_* constants
// @arg tags and userTags should be Arrays of Strings, or null
// @event RESPONSE_OnEnumeratePublishedWorkshopFiles, response = m_eResult
// If the call was successful, call enumeratePublishedWorkshopFilesResult to
// get the corresponding WorkshopFilesResult object.
public function enumeratePublishedWorkshopFiles(type:uint, start:uint, count:uint, days:uint, tags:Array, userTags:Array):Boolean
// @default null
// Returns a WorkshopFilesResult object corresponding to the last successful
// call to enumeratePublishedWorkshopFilesResult, or null if no such call was made.
public function enumeratePublishedWorkshopFilesResult():WorkshopFilesResult
// EnumerateUserSubscribedFiles(startIndex)
// @default false
// @event RESPONSE_OnEnumerateUserSubscribedFiles, response = m_eResult
// If the call was successful, call enumerateUserSubscribedFilesResult to get
// the corresponding SubscribedFilesResult object.
public function enumerateUserSubscribedFiles(startIndex:uint):Boolean
// @default null
// Returns a SubscribedFilesResult object corresponding to the last successful
// call to enumerateUserSubscribedFiles, or null if no such call was made.
public function enumerateUserSubscribedFilesResult():SubscribedFilesResult
// EnumerateUserSharedWorkshopFiles(steamID, start, required, excluded)
// @default false
// @arg required and excluded should be Arrays of Strings, or null
// @event RESPONSE_OnEnumerateUserSharedWorkshopFiles, response = m_eResult
// If the call was successful, call
// enumerateUserSharedWorkshopFilesResult to get the corresponding UserFilesResult
// object.
public function enumerateUserSharedWorkshopFiles(steamID:String, start:uint, required:Array, excluded:Array):Boolean
// @default null
// Returns a UserFilesResult object corresponding to the last successful
// call to enumerateUserSharedWorkshopFiles, or null if no such call was made.
public function enumerateUserSharedWorkshopFilesResult():UserFilesResult
// EnumeratePublishedFilesByUserAction(action, startIndex)
// @default false
// @arg action should be one of the WorkshopConstants.FILEACTION_* constants
// @event RESPONSE_OnEnumeratePublishedFilesByUserAction, response = m_eResult
// If the call was successful, call
// enumerateUserSharedWorkshopFilesResult to get the corresponding
// FilesByUserActionResult object.
public function enumeratePublishedFilesByUserAction(action:uint, startIndex:uint):Boolean
// @default null
// Returns a FilesByUserActionResult object corresponding to the last successful
// call to enumeratePublishedFilesByUserAction, or null if no such call was made.
public function enumeratePublishedFilesByUserActionResult():FilesByUserActionResult
// SubscribePublishedFile(file)
// @default false
// @arg file is a published file id (see deletePublishedFile for details)
// Generates a RESPONSE_OnSubscribePublishedFile event with response = m_eResult.
public function subscribePublishedFile(file:String):Boolean
// UnsubscribePublishedFile(file)
// @default false
// @arg file is a published file id (see deletePublishedFile for details)
// Generates a RESPONSE_OnUnsubscribePublishedFile event with response = m_eResult.
public function unsubscribePublishedFile(file:String):Boolean
// CreatePublishedFileUpdateRequest(file)
// @default WorkshopConstants.FILEUPDATEHANDLE_Invalid
// @arg file is a published file id (see deletePublishedFile for details)
public function createPublishedFileUpdateRequest(file:String):String
// UpdatePublishedFileFile(handle, file)
// @default false
// @arg handle is a update request handle returned by createPublishedFileUpdateRequest
public function updatePublishedFileFile(handle:String, file:String):Boolean
// UpdatePublishedFilePreviewFile(handle, preview)
// @default false
// @arg handle is a update request handle returned by createPublishedFileUpdateRequest
public function updatePublishedFilePreviewFile(handle:String, preview:String):Boolean
// UpdatePublishedFileTitle(handle, title)
// @default false
// @arg handle is a update request handle returned by createPublishedFileUpdateRequest
public function updatePublishedFileTitle(handle:String, title:String):Boolean
// UpdatePublishedFileDescription(handle, description)
// @default false
// @arg handle is a update request handle returned by createPublishedFileUpdateRequest
public function updatePublishedFileDescription(handle:String, description:String):Boolean
// UpdatePublishedFileSetChangeDescription(handle, changeDesc)
// @default false
// @arg handle is a update request handle returned by createPublishedFileUpdateRequest
public function updatePublishedFileSetChangeDescription(handle:String, changeDesc:String):Boolean
// UpdatePublishedFileVisibility(handle, visibility)
// @default false
// @arg handle is a update request handle returned by createPublishedFileUpdateRequest
// @arg visibility should be one of the WorkshopConstants.VISIBILITY_* constants
public function updatePublishedFileVisibility(handle:String, visibility:uint):Boolean
// UpdatePublishedFileTags(handle, tags)
// @default false
// @arg handle is a update request handle returned by createPublishedFileUpdateRequest
// @arg tags should be an Array of Strings
public function updatePublishedFileTags(handle:String, tags:Array):Boolean
// CommitPublishedFileUpdate(handle)
// @default false
// @arg handle is a update request handle returned by createPublishedFileUpdateRequest
// @event RESPONSE_OnCommitPublishedFileUpdate, response = m_eResult
public function commitPublishedFileUpdate(handle:String):Boolean
// GetPublishedItemVoteDetails(file)
// @default false
// @event RESPONSE_OnGetPublishedItemVoteDetails, response = m_eResult
// If the call was successful, call enumerateUserSharedWorkshopFilesResult to
// get the corresponding UserFilesResult object.
public function getPublishedItemVoteDetails(file:String):Boolean
// @default null
// Returns a ItemVoteDetailsResult object corresponding to the last successful
// call to getPublishedItemVoteDetails, or null if no such call was made.
public function getPublishedItemVoteDetailsResult():ItemVoteDetailsResult
// GetUserPublishedItemVoteDetails(file)
// @default false
// @arg file is a published file id (see deletePublishedFile for details)
// @event RESPONSE_OnGetUserPublishedItemVoteDetails, response = m_eResult
// If the call was successful, call enumerateUserSharedWorkshopFilesResult to
// get the corresponding UserVoteDetails object.
public function getUserPublishedItemVoteDetails(file:String):Boolean
// @default null
// Returns a UserVoteDetails object corresponding to the last successful call
// to getUserPublishedItemVoteDetails, or null if no such call was made.
public function getUserPublishedItemVoteDetailsResult():UserVoteDetails
// UpdateUserPublishedItemVote(file, upvote)
// @default false
// @arg file is a published file id (see deletePublishedFile for details)
// @event RESPONSE_OnUpdateUserPublishedItemVote, response = m_eResult
public function updateUserPublishedItemVote(file:String, upvote:Boolean):Boolean
// SetUserPublishedFileAction(file, action)
// @default false
// @arg file is a published file id (see deletePublishedFile for details)
// @arg action should be one one of the WorkshopConstants.FILEACTION_* constants.
// @event RESPONSE_OnSetUserPublishedFileAction, response = m_eResult
public function setUserPublishedFileAction(file:String, action:uint):Boolean
/***********/
/* Friends */
/***********/
// ISteamFriends
// GetFriendCount(flags)
// @default 0
// @arg flags is a combination (bitwise OR) of the FriendConstants.FRIENDFLAG_*
// constants.
public function getFriendCount(flags:uint):int
// GetFriendByIndex(index, flags)
// @default "0"
// For a description of flags, see getFriendCount.
public function getFriendByIndex(index:int, flags:uint):String
// GetFriendPersonaName(id)
// @default ""
public function getFriendPersonaName(id:String):String
// GetSmallFriendAvatar(id)
// @default null
// Returns friend small avatar bitmap data
public function getSmallFriendAvatar(id:String):BitmapData
// GetMediumFriendAvatar(id)
// @default null
// Returns friend medium avatar bitmap data
public function getMediumFriendAvatar(id:String):BitmapData
/******************************/
/* Authentication & Ownership */
/******************************/
// ISteamUser
// GetAuthSessionTicket(...)
// @default UserConstants.AUTHTICKET_Invalid
// @event RESPONSE_OnGetAuthSessionTicketResponse event
// - response = m_eAuthSessionResponse (one of the UserConstants.SESSION_* constants)
// The session ticket will be written to the passed ByteArray, after clearing
// it first.
// Returns the return value of GetAuthSessionTicket() (the ticket handle), or
// UserConstants.AUTHTICKET_Invalid on failure.
// If response = UserConstants.SESSION_OK, call getAuthSessionTicketResult to
// get the actual valid ticket handle.
public function getAuthSessionTicket(ticket:ByteArray):uint
// @default UserConstants.AUTHTICKET_Invalid
// Returns the ticket handle of the last successful call to getAuthSessionTicket
// that could be validated, or UserConstants.AUTHTICKET_Invalid if no such call
// was made.
public function getAuthSessionTicketResult():uint
// BeginAuthSession(ticket, ticket.length, steamID)
// @default UserConstants.BEGINAUTH_InvalidTicket
// @event RESPONSE_OnValidateAuthTicketResponse
// - response = m_eAuthSessionResponse (one of the UserConstants.SESSION_* constants)
// Returns the return value of BeginAuthSession as one of the
// UserConstants.BEGINAUTH_* constants, or UserConstants.BEGINAUTH_InvalidTicket
// on failure.
public function beginAuthSession(ticket:ByteArray, steamID:String):int
// EndAuthSession(steamID)
// @default false
public function endAuthSession(steamID:String):Boolean
// CancelAUthTicket(handle)
// @default false
public function cancelAuthTicket(ticketHandle:uint):Boolean
// UserHasLicenseForApp(steamID, appID)
// @default UserConstants.LICENSE_NoAuth
// Returns the return value of UserHasLicenseForApp as one of the
// UserConstants.LICENSE_* constants, or UserConstants.LICENSE_NoAuth on failure.
// Only call this after receiving a RESPONSE_OnValidateAuthTicketResponse event
// with response = USerConstants.SESSION_OK.
public function userHasLicenseForApp(steamID:String, appID:uint):int
// RequestEncryptedAppTicket(dataToInclude, dataToIncludeLength);
// @default false
// @event RESPONSE_OnEncryptedAppTicketResponse, response = m_eResult
// Requests an application ticket encrypted with the secret "encrypted app ticket key".
// You can pass your own secret data ByteArray which will be encrypted into the ticket.
// If response = SteamResults.OK, call GetEncryptedAppTicket to get the ticket data.
public function requestEncryptedAppTicket(secretData:ByteArray):Boolean
// GetEncryptedAppTicket(...)
// @default false
// The encrypted app ticket will be written to the passed ByteArray, after clearing it first.
public function getEncryptedAppTicket(ticket:ByteArray):Boolean
/***********/
/* Overlay */
/***********/
// ISteamFriends
// A RESPONSE_OnGameOverlayActivated is fired whenever the user manually
// triggers the Steam overlay, with
// - response = SteamResults.OK if the overlay was enabled
// - response = SteamResults.Fail if it was disabled
// ActivateGameOverlay(dialog)
// @default false
// @event RESPONSE_OnGameOverlayActivated, response = SteamResults.OK
// For a list of valid dialog names, see the Steamworks documentation.
public function activateGameOverlay(dialog:String):Boolean
// ActivateGameOverlayToUser(dialog, steamId)
// @default false
// @event RESPONSE_OnGameOverlayActivated, response = SteamResults.OK
public function activateGameOverlayToUser(dialog:String, steamId:String):Boolean
// ActivateGameOverlayToWebPage(url)
// @default false
// @event RESPONSE_OnGameOverlayActivated, response = SteamResults.OK
public function activateGameOverlayToWebPage(url:String):Boolean
// ActivateGameOverlayToStore(appId, flag)
// @default false
// @arg flag should be one of the FriendConstants.STOREFLAG_* constants.
// @event RESPONSE_OnGameOverlayActivated, response = SteamResults.OK
public function activateGameOverlayToStore(appId:uint, flag:uint):Boolean
// ActivateGameOverlayInviteDialog(steamIdLobby)
// @default false
// @event RESPONSE_OnGameOverlayActivated, response = SteamResults.OK
public function activateGameOverlayInviteDialog(steamIdLobby:String):Boolean
// IsOverlayEnabled()
// @default false
public function isOverlayEnabled():Boolean
// ISteamUtils#SetOverlayNotificationPosition(position)
// @default false
// @arg position should be one of the UtilsConstants.OVERLAYPOSITION_* constants.
public function setOverlayNotificationPosition(position:uint):Boolean
/***********************/
/* DLC / subscriptions */
/***********************/
// ISteamApps
// BIsSubscribedApp(appId)
// @default false
public function isSubscribedApp(appId:uint):Boolean
// BIsDLCInstalled(appId)
// @default false
public function isDLCInstalled(appId:uint):Boolean
// GetDLCCount()
// @default 0
public function getDLCCount():int
// InstallDLC(appId)
// @default false
// @event RESPONSE_OnDLCInstalled, response = SteamResults.OK
public function installDLC(appId:uint):Boolean
// UninstallDLC(appId)
// @default false
public function uninstallDLC(appId:uint):Boolean
// @default 0
// Returns the app id of the DLC that was just installed, or 0 if no DLC was
// installed. Call this whenever receiving a RESPONSE_OnDLCInstalled event.
public function DLCInstalledResult():uint
/********************/
/* Microtransaction */
/********************/
// @default null
// Returns a MicroTxnAuthorizationResponse object which was generated by
// receiving a microtransaction authorization callback. Note that each such
// object is only returned once by this function. If no unreturned microtransaction
// authorization response are left, this function returns null.
//
// Call this whenever receiving a RESPONSE_OnMicroTxnAuthorizationResponse event.
// The event's response property indicates if the transaction was successful,
// (SteamResults.OK if m_bAuthorized is true, else SteamResults.Fail), but
// regardless of the value, a response object is created.
//
// On Linux, this event can never be fired (since the overlay does not work on
// Linux, the only way to do microtransactions on Linux is through web-based
// purchasing), so microTxnResult() always returns null.
//
// A usage pattern for this function might look like this:
// public function handleSteamEvent(e:SteamEvent):void {
// if (e.req_type == SteamConstants.RESPONSE_OnMicroTxnAuthorizationResponse) {
// var microTxnResult:MicroTxnAuthorizationResponse;
// while ((microTxnResult = Steamworks.microTxnResult()) != null) {
// if (microTxnResult.authorized)
// handleSuccessfulOrder(microTxnResult.orderID);
// }
// }
// }
public function microTxnResult():MicroTxnAuthorizationResponse
/**********************************/
/* Other non-Steamworks functions */
/**********************************/
// @default ""
// Returns the value of the environment variable with the given name as returned
// by std::getenv() or the empty String, if getenv() returned a null pointer.
public function getEnv(name:String):String
// @default false
// Sets (or overwrites) the environment variable with the given name to value.
// Returns true on success and false on failure.
// Note that on Linux, this only affects the environment of the APIWrapper
// process, not the AIR process itself.
public function setEnv(name:String, value:String):Boolean
// The Steam overlay requires the application to constantly redraw the screen
// when the overlay is triggered to display the fade in/out animation. However,
// under some circumstances, the Adobe AIR runtime doesn't do this, causing the
// overlay to get stuck during fade in/out. To work around this problem, call
// this function, which adds a constantly "rotating" pixel to the stage as soon
// as the overlay is triggered, forcing AIR to redraw.
// @arg container The display object container to add the pixel to (usually stage)
// @arg alwaysVisible If the pixel should stay visible, even if the overlay
// currently isn't up
// @arg color The pixel's color
// @nogen
public function addOverlayWorkaround(container:DisplayObjectContainer, alwaysVisible:Boolean = false, color:uint = 0x000000):void