sc_inventory_v1_2.snapshot_layout
Copy a coherent bounded logical-port observation into caller-owned metadata and entries. Initialize sizes; provide 1..128 entries with stride 96..4096 and disjoint aligned buffers. COMPLETE distinguishes an empty layout from unavailable; TRUNCATED or LIMITED never represents a complete observation. Domain and layout keys scope stable port identities; entity ids and epochs are transient.
Signature
Section titled “Signature”sco_result (*)(sco_plugin *, sc_inventory_layout_snapshot *, sc_inventory_layout_entry *, uint32_t, uint32_t)Service and availability
Section titled “Service and availability”| Property | Value |
|---|---|
| Symbol | sc_inventory_v1_2.snapshot_layout |
| Record ID | sc-inventory-v1-2-snapshot-layout |
| Service | game.inventory |
| Table | sc_inventory_v1_2 |
| Version macro | SC_INVENTORY_SERVICE_VERSION_1_2 |
| Packed table version | 65538 |
| Since / availability | size >= 24; 1.2 |
| Complete member extent (x64 bytes) | 24 |
| Table size (x64 bytes) | 24 |
Parameters and buffers
Section titled “Parameters and buffers”sco_result (*snapshot_layout)(sco_plugin* self, sc_inventory_layout_snapshot* out, sc_inventory_layout_entry* entries, uint32_t entry_stride, uint32_t capacity);
Copy a coherent bounded logical-port observation into caller-owned metadata and entries. Initialize sizes; provide 1..128 entries with stride 96..4096 and disjoint aligned buffers. COMPLETE distinguishes an empty layout from unavailable; TRUNCATED or LIMITED never represents a complete observation. Domain and layout keys scope stable port identities; entity ids and epochs are transient.
Results and failures
Section titled “Results and failures”OK copied, BAD_ARG invalid owner or buffers, TOO_MANY exceeded published limits, WRONG_THREAD, UNAVAILABLE absent or incoherent source, CRASHED contained backend fault. Valid disjoint outputs remain unchanged on refusal.
Absent capability
Section titled “Absent capability”game.inventory.layout defaults OFF; no production native layout producer is installed.
Ownership
Section titled “Ownership”Caller owns all buffers; provider copies known prefixes, preserves sizes and tails, and retains no output pointers.
Thread affinity
Section titled “Thread affinity”Game thread only.
Callback context
Section titled “Callback context”Host-owned admission and snapshot callbacks run synchronously; no plugin callback.
Reentrancy
Section titled “Reentrancy”Nested observations are refused. Owner and service lifetime are rechecked after each callback.
Cleanup and cancellation
Section titled “Cleanup and cancellation”Stop withdraws the service and clears the host producer.
Language mappings
Section titled “Language mappings”Status labels are copied verbatim from the catalogue: direct is native access; typed-wrapper is wrapper-backed; restricted is a subset/adaptation; unsupported means no supported route is established. No status implies universal safety.
| Language | Catalogue status | Source evidence / wrapper tokens |
|---|---|---|
| c | direct | include/sc_inventory.h(*snapshot_layout) |
| cpp | typed-wrapper | include/scosdk/game/inventory_layout.hpptable_->snapshot_layout(self_, &copied, entries.data(), sizeof(entries[0]), capacity) |
| csharp | typed-wrapper | sdk/csharp/Sco.Sdk/Game/InventoryLayout.cs_table->snapshot_layout(_plugin.SelfPtr, &info, entries, (uint)sizeof(ScInventoryLayoutEntry), 128) |
| lua | typed-wrapper | plugins/lua/sco_lua_game.cinventory->snapshot_layout(self, &snapshot, entries, sizeof(entries[0]), SC_INVENTORY_LAYOUT_MAX_PORTS) |
Examples
Section titled “Examples”None identified in the catalogue; this is not proof none can exist.
- tests/abi_game_inventory.c
- tests/test_inventory_layout.cpp
- sdk/csharp/Sco.Sdk.Tests/GameFakeHost.cs
- tests/game_contracts/lua_cases.inc
ABI pins prove layout, not semantic behavior or a live game session.