-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdocumentation.lisp
981 lines (691 loc) · 28.3 KB
/
documentation.lisp
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
(in-package #:org.shirakumo.fraf.steamworks)
;; c-object.lisp
(docs:define-docs
(type c-object
"Low-level wrapper object for a C-land resource.
See HANDLE")
(function handle
"Accesses the handle of the c-object.
This could either be a foreign memory pointer, or some other kind of
structure that serves as the identifier for the foreign object.
See C-OBJECT")
(type c-registered-object
"A foreign object that is registered on the Lisp-side.
This means that, given the HANDLE of the object, you will be able to
retrieve it again using POINTER->OBJECT. As the name implies, this
requires the handle to be a foreign-memory pointer.
See POINTER->OBJECT")
(function pointer->object
"Translates a foreign pointer or address to the associated lisp object, if any.
This is a SETFable place. If set to NIL, the association with the
pointer is removed. Note that this hash table is /not/ weak, meaning
that it will cause objects to be retained if they are associated. If
the associated C resource the pointer is pointing to is freed, you
MUST set its value of this function to NIL to allow the corresponding
lisp object to be freed as well.
See C-REGISTERED-OBJECT")
(type c-managed-object
"A foreign object that may be managed by the Lisp GC.
When subclassing, you must provide implementations for the generic
functions ALLOCATE-HANDLE and FREE-HANDLE-FUNCTION.
If an instance of this object is passed :FREE-ON-GC T as initargs,
then the following sections apply:
When the lisp-side object is deallocated by the garbage collector,
the associated C object is freed as well, using whatever means
appropriate to do so. This ensures that there is no memory leakage.
Note that this will /not/ recognise if the associated C object is
freed on the C side or by means that are not the GC or the FREE
function. If this should happen, the Lisp object will refer to
an illegal handle, possibly leading to the corruption of your system
down the road.
Despite these objects being managed by the GC, it is unpredictable
when the system will collect your object and it is thus advisable to
still manually call FREE when it is known that the object won't be
used any longer.
If :FREE-ON-GC NIL is passed, then the referenced C object must be
freed manually, either directly or through FREE.
See ALLOCATE-HANDLE
See FREE-HANDLE-FUNCTION
See FREE
See WITH-C-OBJECTS")
(function allocate-handle
"Allocate the C-side object and return a fresh handle.
This function is called as part of the initialisation sequence
of C-MANAGED-OBJECTs. You should implement a method specialised
on your subclass and perform whatever fetching or allocating
necessary, then return the handle to be used.
You may specify additional keyword arguments that will be passed
along from the make-instance initargs.
See C-MANAGED-OBJECT")
(function free-handle-function
"Construct a destructor function for the given instance and handle.
The returned function MUST NOT hold a reference to the instance,
neither directly nor transitively. It is advised to retrieve all
necessary information for the destructor, and then create a
closure that only refers to that information.
The returned function may be used as a finalizer.
See C-MANAGED-OBJECT")
(function free
"Frees the associated C object.
After FREE is invoked, the HANDLE will be set to NIL and the
Lisp object becomes effectively useless. Any further attempt
to use the object in any way leads to undefined consequences,
except for calling FREE again, which is guaranteed to be safe.
See C-MANAGED-OBJECT")
(function with-c-objects
"Lexically binds new variables and frees their values upon exit.
This is like LET with automated free on unwind.
Note that if you change the value of a binding established by
this construct, upon unwinding only the original values of the
bindings are freed.
See FREE"))
;; c-support.lisp
(docs:define-docs
(function callback-type-id
"Returns the SteamWorks internal callback ID for the given callback type.
This signals an error if the callback does not exist.")
(function function-callresult
"Returns the associated callresult structure type for the given function.
This signals an error if the given function does not initiate
a callresult."))
;; callback-class.lisp
(docs:define-docs
(type response-object
"Class used to represent callback response results as used in the steam matchmaking servers interface.
See STATUS
See RESPONSE-FAILED
See RESPONSE-COMPLETED")
(function status
"Returns the current status of the object
The returned value is a keyword describing the current status.
For a RESPONSE-OBJECT, the status can be one of
:PENDING :FAILED :COMPLETE
See RESPONSE-OBJECT
See SERVER-QUERY
See INVENTORY-RESULT
See STEAMMUSIC")
(function response-failed
"Function called when it is known the callback request has failed.
This sets the STATUS of the RESPONSE-OBJECT and can be used
to attempt and respond to the failure somehow.
See RESPONSE-OBJECT")
(function response-completed
"Function called when ti is known the callback request has completed.
This sets the STATUS of the RESPONSE-OBJECT and can be used
to attempt and respond to it.
See RESPONSE-OBJECT")
(type results-response-object
"Superclass for a response that accumulates results it receives.
See RESPONSE-OBJECT
See RESULTS")
(function results
"Returns the list of accumulated results of the response.
See RESULTS-RESPONSE-OBJECT"))
;; callback.lisp
(docs:define-docs
(function global-callback
"Accessor for a globally registered callback.
The key must be a symbol naming the callback.
The value must be a list composed of a symbol and a function.
The symbol must name the struct-type to register the callback on.
The function must be a function of one argument: the callback struct
instance.
Callbacks registered through this mechanism will be instantiated and
registered when steamworks is initialised.
See REMOVE-GLOBAL-CALLBACK
See DEFINE-CALLBACK")
(function remove-global-callback
"Removes the global callback tied to the given name.
See GLOBAL-CALLBACK")
(function define-callback
"Defines a new global callback function.
STRUCT-TYPE should either be a symbol naming the struct-type to
register the callback for, or a list of the struct-type and the name
of the callback. When no name is explicitly given, the name is the
same as the struct-type.
RESULT will be bound to the callback result instance, which must be of
the same type as the given struct-type. SLOTS may be a list of
bindings to slots to establish. Each binding may either be the name of
a slot, or a list of a variable name and a slot name. If no variable
name is given, it is the same as the slot name.
Note that the slot names are automatically interned to the
ORG.SHIRAKUMO.FRAF.STEAMWORKS.CFFI package, so there is no need to
prefix the package.
See GLOBAL-CALLBACK
See REMOVE-GLOBAL-CALLBACK")
(function struct-type
"Accessor to the struct-type that the callback is registered on.
See CALLBACK")
(function callback
"Function called when a callback is triggered.
CALLBACK is a specific callback instance.
PARAMETER is the callback struct instance.
FAILED, if passed, indicates whether the callback failed. In that
case the PARAMETER may not be passed a useful value.
API-CALL, if passed, identifies the api-call that initiated the
callback.
See CALLBACK (type)")
(type callback
"Base class for global callbacks.
Global callbacks are callbacks from the SteamWorks API that may be
triggered at any time, even without an API call to initiate the
callback. When this callback is triggered, the CALLBACK function is
called.
Note that while this is a C-MANAGED-OBJECT, FREE-ON-GC is /not/ set
to T by default.
See C-REGISTERED-OBJECT
See C-MANAGED-OBJECT
See CALLBACK (function)")
(type closure-callback
"A global callback that invokes a closure on callback.
This allows easy runtime callback construction without having to
register a new class.
See CALLBACK (type)
See CLOSURE")
(function closure
"Returns the closure to invoke on callback.
The closure must take a single argument, the callback structure.
This structure may be NIL if the callback failed. Otherwise it must
be of the type registered as the STRUCT-TYPE.
See CLOSURE-CALLBACK
See CLOSURE-CALLRESULT")
(type callresult
"A one-time callresult that is tied to a specific API call.
Callresults are callbacks in the SteamWorks API that are tied to a
specific callresult token or handle. When creating an instance of this
class you must pass the token as returned by the API call function as
the :TOKEN initarg.
Note that while this is a C-MANAGED-OBJECT, FREE-ON-GC is /not/ set
to T by default. This is to prevent the object being freed before the
callresult hits.
See C-REGISTERED-OBJECT
See C-MANAGED-OBJECT
See MAYBE-RESULT
See RESULT
See TOKEN
See POLL-FOR-RESULT
See WITH-CALL-RESULT")
(function token
"Returns the specific callresult token the callresult is registered for.
This token cannot be re-used.
See CALLRESULT")
(function maybe-result
"If the callresult is ready, return the result structure.
See RESULT
See CALLRESULT")
(function result
"Returns the callresult structure.
If the callresult is not yet ready, an error of type API-CALL-FAILED
is signalled.
See CALLRESULT")
(type closure-callresult
"A callresult that invokes a closure on callback.
See CALLRESULT
See CLOSURE")
(function poll-for-result
"Polls for the callresult structure for the given type and handle.
This constructs a new closure-callresult, then repeatedly calls
MAYBE-RESULT with a pause of PAUSE between each try. Once MAYBE-RESULT
returns successfully, the result structure is returned.
This effectively turns the asynchronous callresult into a synchronous
operation.
See CLOSURE-CALLRESULT
See WITH-CALL-RESULT")
(function with-call-result
"Constructs the appropriate callresult structure for the SteamWorks API call.
METHOD must be a SteamWorks API function name that returns a
callresult handle. INTERFACE must be the instance of the respective
interface. RESULT will be bound to the result structure when the
callresult completes.
If POLL is non-NIL (at compile-time), WITH-CALL-RESULT becomes
synchronous and will block the current thread until the callresult
completes. The BODY is then invoked with the result bound. POLL
may also be set to a real number, designating the number of seconds to
wait between polling attempts.
If POLL is NIL, the body is bound as the callresult's closure, and the
callresult instance is returned instead. The body may then be invoked
at any time when the callresult completes. However, this can only
happen when RUN-CALLBACKS is invoked. In this case, you must also make
sure to call FREE on the returned callresult when you are done with
it.
See FREE
See POLL-FOR-RESULT
See RUN-CALLBACKS"))
;; conditions.lisp
(docs:define-docs
(type steamworks-condition
"Superclass for all steamworks related conditions.")
(type argument-missing
"Error signalled when a required argument is missing.
See ARGUMENT")
(function argument
"Returns the argument that was missing from the call.
See ARGUMENT-MISSING")
(type api-call-failed
"Error signalled when a call to a SteamWorks API fails.
See API-CALL
See ERROR-CODE")
(function api-call
"Returns the name of the API call that failed, if known.
See API-CALL-FAILED")
(function error-code
"Returns an error code or failure explanation for why the call failed, if known.
See API-CALL-FAILED")
(type string-too-long
"Error signalled when a string is too long for an API call.
Typically string length in the SteamWorks API is measured in UTF-8
octets rather than characters, so the length limit can be difficult to
estimate from random user input.
See OVERSIZED-STRING
See OCTET-LIMIT")
(function oversized-string
"Returns the oversized string that caused the error.
See STRING-TOO-LONG")
(function octet-limit
"Returns the maximum number of octets allowed for the API call, if known.
See STRING-TOO-LONG")
(type no-such-callback
"Error signalled when an inexistent callback is referenced.
See CALLBACK-NAME")
(function callback-name
"Returns the name of the callback that does not exist.
See NO-SUCH-CALLBACK")
(type no-such-file
"Error signalled when a file is referenced that does not exist.
See FILE-HANDLE")
(function file-handle
"Returns the name or pathname of the file that does not exist.
See NO-SUCH-FILE
See NOT-AN-IMAGE-FILE
See PATHNAME-NOT-A-DIRECTORY")
(type no-such-user
"Error signalled when a user is referenced that does not exist.
See USER-HANDLE")
(function user-handle
"The handle/reference to the inexistent user.
See NO-SUCH-USER")
(type buffer-too-short
"Error signalled when a data buffer is not long enough to receive the data.
See REQUIRED-BYTES")
(function required-bytes
"Returns the number of octets that are required to hold the data.
See BUFFER-TOO-SHORT")
(type voice-data-corrupted
"Warning signalled when the voice data could not be decoded as it is corrupted.")
(type interface-creation-failed
"Error signalled when the creation of a SteamWorks interface
failed.
See INTERFACE-NAME")
(function interface-name
"Returns the name of the interface that failed to be created, if
known.
See INTERFACE-CREATION-FAILED")
(type not-an-image-file
"Error signalled when a file does not designate a required image file.
See FILE-HANDLE")
(type string-malformed
"Error signalled when a string is malformed for an API.
This may be if the string has a bad structure, or contains illegal
characters that the API can't deal with.
See MALFORMED-STRING")
(function malformed-string
"Returns the malformed string that the API can't process.
See STRING-MALFORMED")
(type pathname-not-a-directory
"Error signalled when a pathname does not designate a required
directory.
See FILE-HANDLE")
(type too-many-requests
"Error signalled when a function would invoke too many API calls at once.
See REQUEST-LIMIT")
(function request-limit
"Returns the maximum number of requests that can be sent.
See TOO-MANY-REQUESTS")
(type workshop-agreement-not-accepted
"Warning signalled if the user should accept the Steam Workshop agreement.")
(type file-seeking-impossible
"Error signalled when a seeking parameter is passed, but the file cannot be seeked.")
(type request-denied
"Error signalled when an API request was denied due to insufficient permissions.")
(type cannot-set-member-data-for-others
"Error signalled when an attempt is made to set user data for users other than the local one.")
(type steamworks-not-initialized
"Error signalled when a SteamWorks operation is attempted to be performed, but the API is not yet initialised.")
(type steamworks-already-initialized
"Error signalled when the SteamWorks API is attempted to be initialised again, but an old instance is still present.")
(type initialization-failed
"Error signalled when the SteamWorks API initialisation fails.
This usually happens when Steam is not running in the background
or the APP-ID file is not properly set up.")
(type user-stats-not-ready
"Warning signalled when the stats for the current user are not yet known.
This can be a problem, as other stats fetch requests must occur
after the current user stats are known.")
(type low-level-not-loaded
"Error signalled when the library has not yet been properly set up.
Please read the documentation on how to properly set up the
library."))
;; interface.lisp
(docs:define-docs
(type interface
"Superclass for all SteamWorks interface classes.
An interface will cache instances of objects related to it in order to
preserve object identity over instances that designate the same object
on the Steam side.
See C-OBJECT
See ENSURE-IFACE-OBJ
See INTERFACE-OBJECT (function)
See REMOVE-INTERFACE-OBJECT
See GET-INTERFACE-HANDLE
See GET-INTERFACE-HANDLE*
See CALL-WITH
See DEFINE-INTERFACE-METHOD
See DEFINE-INTERFACE-SUBMETHOD
See INTERFACE-OBJECT (type)
See INTERFACE (function)
See STEAMWORKS (function)")
(function ensure-iface-obj
"Ensures the given object is either returned from cache or created and stored.
The initargs HANDLE and INTERFACE must be passed.
See INTERFACE-OBJECT")
(function interface
"Returns the interface instance of the given name.
The container argument may be T for the global SteamWorks instance, or
another interface instance, or another interface-object instance.
If the interface does not exist, NIL is returned instead.
See INTERFACE (type)")
(function interface-object
"Accesses the interface object tied to the given handle.
See INTERFACE (type)
See REMOVE-INTERFACE-OBJECT")
(function remove-interface-object
"Removes the interface object tied to the given handle.
See INTERFACE (type)
See INTERFACE-OBJECT (function)")
(function get-interface-handle
"Returns the handle for an interface using the given SteamWorks function and args.
If the interface creation fails, an error of type
INTERFACE-CREATION-FAILED is signalled.")
(function get-interface-handle*
"Same as GET-INTERFACE-HANDLE but uses the common arguments.
Uses the SteamWorks USER, and PIPE, and the VERSION as arguments.
See GET-INTERFACE-HANDLE")
(function call-with
"Shorthand function to call the given function of the given interface.
See INTERFACE
See HANDLE")
(function define-interface-method
"Shorthand to define an interface method.
INTERFACE may either be the name of the interface to bind to, or a
list of that name and the function used to retrieve the interface's
handle.
METHOD should be the name of the lisp generic function to add a method
to.
CALL must be a list describing the API function and its arguments. If
the METHOD is a SETF function, the API function must be the second
item in the list, otherwise the first. The rest should be the
arguments of the method definition, which will be passed to the API
function in order, with the interface handle as the first argument.
If TRANSFORM is given, it should be a body of forms with RESULT bound
to the return value of the API function call. The return value of this
body is then returned from the method. Otherwise, if the METHOD is a
setf function, the first argument is returned again, and otherwise
RESULT is returned verbatim.
See INTERFACE (type)
See DEFINE-INTERFACE-SUBMETHOD")
(function define-interface-submethod
"Shorthand to define a method on an interface-object.
SUB may either be the name of the interface-object class to bind to,
or a list of that name and the function used to retrieve the
interface's handle.
METHOD should be the name of the lisp generic function to add a method
to.
CALL must be a list describing the API function and its arguments. If
the METHOD is a SETF function, the API function must be the second
item in the list, otherwise the first. The rest should be the
arguments of the method definition, which will be passed to the API
function in order, with the interface handle and the interface-object
handle as the first two arguments.
If TRANSFORM is given, it should be a body of forms with RESULT bound
to the return value of the API function call. The return value of this
body is then returned from the method. Otherwise, if the METHOD is a
setf function, the first argument is returned again, and otherwise
RESULT is returned verbatim.
See INTERFACE-OBJECT (type)
See DEFINE-INTERFACE-METHOD")
(type interface-object
"Superclass for classes representing SteamWorks objects tied to a certain interface.
See INTERFACE (type)
See IFACE
See IFACE*")
(function iface
"Returns the interface instance the object is tied to.
See INTERFACE-OBJECT")
(function iface*
"Returns the handle of the interface instance the object is tied
to.
See IFACE
See INTERFACE-OBJECT"))
;; steamapps.lisp
(docs:define-docs)
;; steamclient.lisp
(docs:define-docs)
;; steamcontroller.lisp
(docs:define-docs)
;; steamfriends.lisp
(docs:define-docs)
;; steamgameserver.lisp
(docs:define-docs)
;; steamhtmlsurface.lisp
(docs:define-docs)
;; steamhttp.lisp
(docs:define-docs)
;; steaminventory.lisp
(docs:define-docs)
;; steammatchmaking.lisp
(docs:define-docs)
;; steammusic.lisp
(docs:define-docs)
;; steammusicremote.lisp
(docs:define-docs)
;; steamnetworking.lisp
(docs:define-docs)
;; steamparties.lisp
(docs:define-docs)
;; steamremotestorage.lisp
(docs:define-docs)
;; steamscreenshots.lisp
(docs:define-docs)
;; steamuser.lisp
(docs:define-docs)
;; steamuserstats.lisp
(docs:define-docs)
;; steamutils.lisp
(docs:define-docs)
;; steamvideo.lisp
(docs:define-docs)
;; steamworks.lisp
(docs:define-docs
(variable *default-interfaces*
"A list of class-names of interfaces that are instantiated when a steamworks-client is created.
The interfaces are created in the order of this list.
By default this list does not contain any interfaces that need
explicit initialisation and finalisation.
See CREATE-INTERFACES")
(variable *default-server-interfaces*
"A list of class-names of interfaces that are instantiated when a steamworks-server is created.
The interfaces are created in the order of this list.
By default this list does not contain any interfaces that need
explicit initialisation and finalisation, or are only useful for
clients.
See CREATE-INTERFACES")
(function steamworks
"Returns the global SteamWorks instance.
If a container is given, it will return the reference stored in that
container, otherwise it will return the global instance. If no global
instance exists, an error of type STEAMWORKS-NOT-INITIALIZED is
signalled.
See STEAMWORKS (type)")
(type pipe
"Wrapper for a Steam Pipe.
What this pipe is or does isn't described by the documentation.
It seems to only be used to retrieve interfaces. Thus, consider it
internal.
See C-OBJECT")
(type user
"Wrapper for a Steam User.
What this user is or does isn't described by the documentation.
It seems to only be used to retrieve interfaces. Thus, consider it
internal.
You probably want the FRIEND class instead.
See C-OBJECT
See PIPE (function)
See FRIEND")
(function pipe
"Returns the pipe object to this object.
See PIPE (type)
See USER (type)
See STEAMWORKS (type)")
(type steamworks
"Representation of the SteamWorks API connection.
An instance of this object represents the connection to the SteamWorks
API. There can only ever be one connection at a time per process, and
thus only one instance of this class should exist at one time.
Attempting to create multiple instances will signal an error of type
STEAMWORKS-ALREADY-INITIALIZED. This error is continuable, however you
should be very sure that you know what you're doing when invoking
CONTINUE.
You should NOT create an instance of this class directly. See
STEAMWORKS-CLIENT and STEAMWORKS-SERVER instead.
When you are about to shut down your application, or want to
explicitly shut down the connection to the SteamWorks API, you should
call FREE on the current instance.
Other than for holding the references to the interfaces, you should
not need direct access to an instance of this class.
You may pass the :INTERFACES initarg to specify which interfaces to
create and which versions thereof. See CREATE-INTERFACES for more.
You may pass the :APP-ID initarg to specify your game's App ID. If
there is no steam_appid.txt file next to your executable, it will
create one in a temporary directory and change the current working
directory there so that Steam may find it. This is done to avoid
development situations where the implementation executable may be
located in places that cannot be written to under normal
circumstances.
See *DEFAULT-INTERFACES*
See USER
See PIPE
See STEAMWORKS-CLIENT
See STEAMWORKS-SERVER
See FREE
See STEAMWORKS (function)
See CREATE-INTERFACES
See INTERFACE (function)
See LIST-INTERFACES
See RUN-CALLBACKS")
(function user
"Returns the user instance associated with the given instance.
In the case of STEAMWORKS, it is an actual USER instance. Otherwise,
it should be a FRIEND instance.
See STEAMWORKS (type)
See AUTH-SESSION
See P2P-SESSION")
(function create-interfaces
"Creates instances of the requested interfaces and stores them in the steamworks client.
INTERFACES should be a list, where each item is either the name or
class of an interface to create, or a list of the name or class and a
requested version string. If no explicit version is passed, the
default version is used, which should be the latest version that has
been crawled from the steamworks API sources.
It is heavily recommended that you explicitly specify the versions of
the interfaces, fixed to the ones taken at the time of initial
development. This should ensure that updates to the SteamWorks SDK do
not change behaviour of your application.
Note that by default it is safe to call this function multiple times
throughout the lifetime of your application. Existing interfaces will
not be re-allocated or removed, only new ones are added.
Returns a list of the newly created interfaces.
You may add methods to this function in order to place hard
constraints on which interfaces are created and how.
You may pass T as the argument to use the default SteamWorks instance.
See STEAMWORKS (type)
See STEAMWORKS (function)")
(function list-interfaces
"Returns a fresh list of the currently active SteamWorks interface instances.
You may pass T as the argument to use the default SteamWorks instance.
See STEAMWORKS (type)")
(type steamworks-client
"Represents a SteamWorks client connection.
This is typically what you want to run when you are distributing a
standalone game.
If the initialisation of the SteamWorks API fails, an error of type
INITIALIZATION-FAILED is signalled, with a RESTART restart active.
Invoking this restart will restart the application through Steam,
which may be desired for deployed applications. When invoking that
restart, you should pass your game's APP-ID as the first argument, and
may pass a process exit code as the second argument.
See STEAMWORKS (type)")
(function run-callbacks
"Runs all pending callbacks synchronously.
This will cause CALLBACK functions to be invoked in the same thread.
You should call this function regularly in order to keep up with
events coming in from Steam. Please see the documentation for further
explanation of callbacks and their behaviour.
You may pass T as the argument to use the default SteamWorks instance.
See STEAMWORKS (type)")
(type steamworks-server
"Represents a SteamWorks server connection.
This is typically what you want to run when you are distributing a
game server host application that integrates with the steam
matchmaking and lobby systems.
You must pass the following initargs:
- :app-id The AppID of your game.
- :ip-address The IP address to bind to, \"0.0.0.0\" to broadcast
on all interfaces.
- :steam-port The local port used to talk to the Steam servers.
- :game-port The port to listen on for new client connections.
- :query-port The port to listen on for server browser queries and
pings.
- :server-mode What level of authentication to require from players.
- :version-string A version string for your server, to identify
outdated servers.
- :server-depot The depot id of your game.
- :directory The directory name of your game.
If the initialisation fails, an error of type API-CALL-FAILED is
signalled.
Unlike the STEAMWORKS-CLIENT, this by default uses the
*DEFAULT-SERVER-INTERFACES* variable to determine which interfaces to
initialise.
See *DEFAULT-SERVER-INTERFACES*
See STEAMWORKS (type)
See IP-ADDRESS
See STEAM-PORT
See GAME-PORT
See QUERY-PORT
See SERVER-MODE
See VERSION-STRING
See SERVER-DEPOT")
(function ip-address
"Returns the IP address as a v4-formatted string.
See STEAMWORKS-SERVER")
(function steam-port
"Returns the local port used for communication with the steam servers.
See STEAMWORKS-SERVER")
(function game-port
"Returns the port used to listen to for new game connections.
See STEAMWORKS-SERVER")
(function query-port
"Returns the port used to listen for browser queries and pings.
See STEAMWORKS-SERVER")
(function server-mode
"Returns the authentication level required for the server.
See STEAMWORKS-SERVER")
(function version-string
"Returns the version string the server is currently running.
See STEAMWORKS-SERVER")
(function server-depot
"Returns the depot ID of the game.
See STEAMWORKS-SERVER"))
;; steamworkshop.lisp
(docs:define-docs)
;; toolkit.lisp
(docs:define-docs)