Struct steamworks::UGC
source · pub struct UGC<Manager> { /* private fields */ }
Implementations§
source§impl<Manager> UGC<Manager>
impl<Manager> UGC<Manager>
sourcepub fn suspend_downloads(&self, suspend: bool)
pub fn suspend_downloads(&self, suspend: bool)
Suspends or resumes all workshop downloads
sourcepub fn create_item<F>(&self, app_id: AppId, file_type: FileType, cb: F)
pub fn create_item<F>(&self, app_id: AppId, file_type: FileType, cb: F)
Creates a workshop item
sourcepub fn start_item_update(
&self,
app_id: AppId,
file_id: PublishedFileId
) -> UpdateHandle<Manager>
pub fn start_item_update( &self, app_id: AppId, file_id: PublishedFileId ) -> UpdateHandle<Manager>
Starts an item update process
sourcepub fn subscribe_item<F>(&self, published_file_id: PublishedFileId, cb: F)
pub fn subscribe_item<F>(&self, published_file_id: PublishedFileId, cb: F)
Subscribes to a workshop item
pub fn unsubscribe_item<F>(&self, published_file_id: PublishedFileId, cb: F)
sourcepub fn subscribed_items(&self) -> Vec<PublishedFileId>
pub fn subscribed_items(&self) -> Vec<PublishedFileId>
Gets the publisher file IDs of all currently subscribed items.
pub fn item_state(&self, item: PublishedFileId) -> ItemState
pub fn item_download_info(&self, item: PublishedFileId) -> Option<(u64, u64)>
pub fn item_install_info(&self, item: PublishedFileId) -> Option<InstallInfo>
pub fn download_item(&self, item: PublishedFileId, high_priority: bool) -> bool
sourcepub fn query_all(
&self,
query_type: UGCQueryType,
item_type: UGCType,
appids: AppIDs,
page: u32
) -> Result<QueryHandle<Manager>, CreateQueryError>
pub fn query_all( &self, query_type: UGCQueryType, item_type: UGCType, appids: AppIDs, page: u32 ) -> Result<QueryHandle<Manager>, CreateQueryError>
Queries a paged list of all workshop items.
sourcepub fn query_user(
&self,
account: AccountId,
list_type: UserList,
item_type: UGCType,
sort_order: UserListOrder,
appids: AppIDs,
page: u32
) -> Result<QueryHandle<Manager>, CreateQueryError>
pub fn query_user( &self, account: AccountId, list_type: UserList, item_type: UGCType, sort_order: UserListOrder, appids: AppIDs, page: u32 ) -> Result<QueryHandle<Manager>, CreateQueryError>
Queries a list of workshop itmes, related to a user in some way (Ex. user’s subscriptions, favorites, upvoted, …)
pub fn query_items( &self, items: Vec<PublishedFileId> ) -> Result<QueryHandle<Manager>, CreateQueryError>
pub fn query_item( &self, item: PublishedFileId ) -> Result<QueryHandle<Manager>, CreateQueryError>
sourcepub fn delete_item<F>(&self, published_file_id: PublishedFileId, cb: F)
pub fn delete_item<F>(&self, published_file_id: PublishedFileId, cb: F)
DELETES the item from the Steam Workshop.
source§impl UGC<ServerManager>
impl UGC<ServerManager>
sourcepub fn init_for_game_server(
&self,
workshop_depot: DepotId_t,
folder: &str
) -> bool
pub fn init_for_game_server( &self, workshop_depot: DepotId_t, folder: &str ) -> bool
Initialize this UGC interface for a Steam game server.
You should pass in the Workshop depot, you can find this on SteamDB. It’s usually just the app ID.
The folder is a path to the directory where you wish for this game server to store UGC content.
true
upon success; otherwise, false
if the calling user is not a game server or if the workshop is currently updating its content.