C# Класс Steamworks.SteamFriends

Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
ActivateGameOverlay ( string pchDialog ) : void

activates the game overlay, with an optional dialog to open

valid options are "Friends", "Community", "Players", "Settings", "OfficialGameGroup", "Stats", "Achievements"

ActivateGameOverlayInviteDialog ( CSteamID steamIDLobby ) : void

activates game overlay to open the invite dialog. Invitations will be sent for the provided lobby.

ActivateGameOverlayToStore ( AppId_t nAppID, EOverlayToStoreFlag eFlag ) : void

activates game overlay to store page for app

ActivateGameOverlayToUser ( string pchDialog, CSteamID steamID ) : void

activates game overlay to a specific place

valid options are

"steamid" - opens the overlay web browser to the specified user or groups profile

"chat" - opens a chat window to the specified user, or joins the group chat

"jointrade" - opens a window to a Steam Trading session that was started with the ISteamEconomy/StartTrade Web API

"stats" - opens the overlay web browser to the specified user's stats

"achievements" - opens the overlay web browser to the specified user's achievements

"friendadd" - opens the overlay in minimal mode prompting the user to add the target user as a friend

"friendremove" - opens the overlay in minimal mode prompting the user to remove the target friend

"friendrequestaccept" - opens the overlay in minimal mode prompting the user to accept an incoming friend invite

"friendrequestignore" - opens the overlay in minimal mode prompting the user to ignore an incoming friend invite

ActivateGameOverlayToWebPage ( string pchURL ) : void

activates game overlay web browser directly to the specified URL

full address with protocol type is required, e.g. http://www.steamgames.com/

ClearRichPresence ( ) : void
CloseClanChatWindowInSteam ( CSteamID steamIDClanChat ) : bool
DownloadClanActivityCounts ( CSteamID psteamIDClans, int cClansToRequest ) : SteamAPICall_t

for clans a user is a member of, they will have reasonably up-to-date information, but for others you'll have to download the info to have the latest

EnumerateFollowingList ( uint unStartIndex ) : SteamAPICall_t
GetChatMemberByIndex ( CSteamID steamIDClan, int iUser ) : CSteamID
GetClanActivityCounts ( CSteamID steamIDClan, int &pnOnline, int &pnInGame, int &pnChatting ) : bool

returns the most recent information we have about what's happening in a clan

GetClanByIndex ( int iClan ) : CSteamID
GetClanChatMemberCount ( CSteamID steamIDClan ) : int
GetClanChatMessage ( CSteamID steamIDClanChat, int iMessage, string &prgchText, int cchTextMax, EChatEntryType &peChatEntryType, CSteamID &psteamidChatter ) : int
GetClanCount ( ) : int

clan (group) iteration and access functions

GetClanName ( CSteamID steamIDClan ) : string
GetClanOfficerByIndex ( CSteamID steamIDClan, int iOfficer ) : CSteamID

returns the steamID of a clan officer, by index, of range [0,GetClanOfficerCount)

GetClanOfficerCount ( CSteamID steamIDClan ) : int

returns the number of officers in a clan (including the owner)

GetClanOwner ( CSteamID steamIDClan ) : CSteamID

iteration of clan officers - can only be done when a RequestClanOfficerList() call has completed

returns the steamID of the clan owner

GetClanTag ( CSteamID steamIDClan ) : string
GetCoplayFriend ( int iCoplayFriend ) : CSteamID
GetCoplayFriendCount ( ) : int

recently-played-with friends iteration

this iterates the entire list of users recently played with, across games

GetFriendCoplayTime() returns as a unix time

GetFollowerCount ( CSteamID steamID ) : SteamAPICall_t

following apis

GetFriendByIndex ( int iFriend, EFriendFlags iFriendFlags ) : CSteamID

returns the steamID of a user

iFriend is a index of range [0, GetFriendCount())

iFriendsFlags must be the same value as used in GetFriendCount()

the returned CSteamID can then be used by all the functions below to access details about the user

GetFriendCoplayGame ( CSteamID steamIDFriend ) : AppId_t
GetFriendCoplayTime ( CSteamID steamIDFriend ) : int
GetFriendCount ( EFriendFlags iFriendFlags ) : int

friend iteration

takes a set of k_EFriendFlags, and returns the number of users the client knows about who meet that criteria

then GetFriendByIndex() can then be used to return the id's of each of those users

GetFriendCountFromSource ( CSteamID steamIDSource ) : int

iterators for getting users in a chat room, lobby, game server or clan

note that large clans that cannot be iterated by the local user

note that the current user must be in a lobby to retrieve CSteamIDs of other users in that lobby

steamIDSource can be the steamID of a group, game server, lobby or chat room

GetFriendFromSourceByIndex ( CSteamID steamIDSource, int iFriend ) : CSteamID
GetFriendGamePlayed ( CSteamID steamIDFriend, FriendGameInfo_t &pFriendGameInfo ) : bool

returns true if the friend is actually in a game, and fills in pFriendGameInfo with an extra details

GetFriendMessage ( CSteamID steamIDFriend, int iMessageID, string &pvData, int cubData, EChatEntryType &peChatEntryType ) : int
GetFriendPersonaName ( CSteamID steamIDFriend ) : string

returns the name another user - guaranteed to not be NULL.

same rules as GetFriendPersonaState() apply as to whether or not the user knowns the name of the other user

note that on first joining a lobby, chat room or game server the local user will not known the name of the other users automatically; that information will arrive asyncronously

GetFriendPersonaNameHistory ( CSteamID steamIDFriend, int iPersonaName ) : string

accesses old friends names - returns an empty string when their are no more items in the history

GetFriendPersonaState ( CSteamID steamIDFriend ) : EPersonaState

returns the current status of the specified user

this will only be known by the local user if steamIDFriend is in their friends list; on the same game server; in a chat room or lobby; or in a small group with the local user

GetFriendRelationship ( CSteamID steamIDFriend ) : EFriendRelationship

returns a relationship to a user

GetFriendRichPresence ( CSteamID steamIDFriend, string pchKey ) : string
GetFriendRichPresenceKeyByIndex ( CSteamID steamIDFriend, int iKey ) : string
GetFriendRichPresenceKeyCount ( CSteamID steamIDFriend ) : int
GetFriendSteamLevel ( CSteamID steamIDFriend ) : int

friends steam level

GetFriendsGroupCount ( ) : int

friend grouping (tag) apis

returns the number of friends groups

GetFriendsGroupIDByIndex ( int iFG ) : FriendsGroupID_t

returns the friends group ID for the given index (invalid indices return k_FriendsGroupID_Invalid)

GetFriendsGroupMembersCount ( FriendsGroupID_t friendsGroupID ) : int

returns the number of members in a given friends group

GetFriendsGroupMembersList ( FriendsGroupID_t friendsGroupID, CSteamID pOutSteamIDMembers, int nMembersCount ) : void

gets up to nMembersCount members of the given friends group, if fewer exist than requested those positions' SteamIDs will be invalid

GetFriendsGroupName ( FriendsGroupID_t friendsGroupID ) : string

returns the name for the given friends group (NULL in the case of invalid friends group IDs)

GetLargeFriendAvatar ( CSteamID steamIDFriend ) : int

gets the large (184x184) avatar of the current user, which is a handle to be used in IClientUtils::GetImageRGBA(), or 0 if none set

returns -1 if this image has yet to be loaded, in this case wait for a AvatarImageLoaded_t callback and then call this again

GetMediumFriendAvatar ( CSteamID steamIDFriend ) : int

gets the medium (64x64) avatar of the current user, which is a handle to be used in IClientUtils::GetImageRGBA(), or 0 if none set

GetPersonaName ( ) : string

returns the local players name - guaranteed to not be NULL.

this is the same name as on the users community profile page

this is stored in UTF-8 format

like all the other interface functions that return a char *, it's important that this pointer is not saved

off; it will eventually be free'd or re-allocated

GetPersonaState ( ) : EPersonaState

gets the status of the current user

GetPlayerNickname ( CSteamID steamIDPlayer ) : string

Returns nickname the current user has set for the specified player. Returns NULL if the no nickname has been set for that player.

GetSmallFriendAvatar ( CSteamID steamIDFriend ) : int

gets the small (32x32) avatar of the current user, which is a handle to be used in IClientUtils::GetImageRGBA(), or 0 if none set

GetUserRestrictions ( ) : uint

if current user is chat restricted, he can't send or receive any text/voice chat messages.

the user can't see custom avatars. But the user can be online and send/recv game invites.

a chat restricted user can't add friends or join any groups.

HasFriend ( CSteamID steamIDFriend, EFriendFlags iFriendFlags ) : bool

returns true if the specified user meets any of the criteria specified in iFriendFlags

iFriendFlags can be the union (binary or, |) of one or more k_EFriendFlags values

InviteUserToGame ( CSteamID steamIDFriend, string pchConnectString ) : bool

rich invite support

if the target accepts the invite, the pchConnectString gets added to the command-line for launching the game

if the game is already running, a GameRichPresenceJoinRequested_t callback is posted containing the connect string

invites can only be sent to friends

IsClanChatAdmin ( CSteamID steamIDClanChat, CSteamID steamIDUser ) : bool
IsClanChatWindowOpenInSteam ( CSteamID steamIDClanChat ) : bool

interact with the Steam (game overlay / desktop)

IsFollowing ( CSteamID steamID ) : SteamAPICall_t
IsUserInSource ( CSteamID steamIDUser, CSteamID steamIDSource ) : bool

returns true if the local user can see that steamIDUser is a member or in steamIDSource

JoinClanChatRoom ( CSteamID steamIDClan ) : SteamAPICall_t

chat interface for games

this allows in-game access to group (clan) chats from in the game

the behavior is somewhat sophisticated, because the user may or may not be already in the group chat from outside the game or in the overlay

use ActivateGameOverlayToUser( "chat", steamIDClan ) to open the in-game overlay version of the chat

LeaveClanChatRoom ( CSteamID steamIDClan ) : bool
OpenClanChatWindowInSteam ( CSteamID steamIDClanChat ) : bool
ReplyToFriendMessage ( CSteamID steamIDFriend, string pchMsgToSend ) : bool
RequestClanOfficerList ( CSteamID steamIDClan ) : SteamAPICall_t

requests information about a clan officer list

when complete, data is returned in ClanOfficerListResponse_t call result

this makes available the calls below

you can only ask about clans that a user is a member of

note that this won't download avatars automatically; if you get an officer,

and no avatar image is available, call RequestUserInformation( steamID, false ) to download the avatar

RequestFriendRichPresence ( CSteamID steamIDFriend ) : void

Requests rich presence for a specific user.

RequestUserInformation ( CSteamID steamIDUser, bool bRequireNameOnly ) : bool

requests information about a user - persona name & avatar

if bRequireNameOnly is set, then the avatar of a user isn't downloaded

- it's a lot slower to download avatars and churns the local cache, so if you don't need avatars, don't request them

if returns true, it means that data is being requested, and a PersonaStateChanged_t callback will be posted when it's retrieved

if returns false, it means that we already have all the details about that user, and functions can be called immediately

SendClanChatMessage ( CSteamID steamIDClanChat, string pchText ) : bool
SetInGameVoiceSpeaking ( CSteamID steamIDUser, bool bSpeaking ) : void

User is in a game pressing the talk button (will suppress the microphone for all voice comms from the Steam friends UI)

SetListenForFriendsMessages ( bool bInterceptEnabled ) : bool

peer-to-peer chat interception

this is so you can show P2P chats inline in the game

SetPersonaName ( string pchPersonaName ) : SteamAPICall_t

Sets the player name, stores it on the server and publishes the changes to all friends who are online.

Changes take place locally immediately, and a PersonaStateChange_t is posted, presuming success.

The final results are available through the return value SteamAPICall_t, using SetPersonaNameResponse_t.

If the name change fails to happen on the server, then an additional global PersonaStateChange_t will be posted

to change the name back, in addition to the SetPersonaNameResponse_t callback.

SetPlayedWith ( CSteamID steamIDUserPlayedWith ) : void

Mark a target user as 'played with'. This is a client-side only feature that requires that the calling user is

in game

SetRichPresence ( string pchKey, string pchValue ) : bool

Rich Presence data is automatically shared between friends who are in the same game

Each user has a set of Key/Value pairs

Note the following limits: k_cchMaxRichPresenceKeys, k_cchMaxRichPresenceKeyLength, k_cchMaxRichPresenceValueLength

There are two magic keys:

"status" - a UTF-8 string that will show up in the 'view game info' dialog in the Steam friends list

"connect" - a UTF-8 string that contains the command-line for how a friend can connect to a game

GetFriendRichPresence() returns an empty string "" if no value is set

SetRichPresence() to a NULL or an empty string deletes the key

You can iterate the current set of keys for a friend with GetFriendRichPresenceKeyCount()

and GetFriendRichPresenceKeyByIndex() (typically only used for debugging)

Описание методов

ActivateGameOverlay() публичный статический Метод

activates the game overlay, with an optional dialog to open

valid options are "Friends", "Community", "Players", "Settings", "OfficialGameGroup", "Stats", "Achievements"

public static ActivateGameOverlay ( string pchDialog ) : void
pchDialog string
Результат void

ActivateGameOverlayInviteDialog() публичный статический Метод

activates game overlay to open the invite dialog. Invitations will be sent for the provided lobby.

public static ActivateGameOverlayInviteDialog ( CSteamID steamIDLobby ) : void
steamIDLobby CSteamID
Результат void

ActivateGameOverlayToStore() публичный статический Метод

activates game overlay to store page for app

public static ActivateGameOverlayToStore ( AppId_t nAppID, EOverlayToStoreFlag eFlag ) : void
nAppID AppId_t
eFlag EOverlayToStoreFlag
Результат void

ActivateGameOverlayToUser() публичный статический Метод

activates game overlay to a specific place

valid options are

"steamid" - opens the overlay web browser to the specified user or groups profile

"chat" - opens a chat window to the specified user, or joins the group chat

"jointrade" - opens a window to a Steam Trading session that was started with the ISteamEconomy/StartTrade Web API

"stats" - opens the overlay web browser to the specified user's stats

"achievements" - opens the overlay web browser to the specified user's achievements

"friendadd" - opens the overlay in minimal mode prompting the user to add the target user as a friend

"friendremove" - opens the overlay in minimal mode prompting the user to remove the target friend

"friendrequestaccept" - opens the overlay in minimal mode prompting the user to accept an incoming friend invite

"friendrequestignore" - opens the overlay in minimal mode prompting the user to ignore an incoming friend invite

public static ActivateGameOverlayToUser ( string pchDialog, CSteamID steamID ) : void
pchDialog string
steamID CSteamID
Результат void

ActivateGameOverlayToWebPage() публичный статический Метод

activates game overlay web browser directly to the specified URL

full address with protocol type is required, e.g. http://www.steamgames.com/

public static ActivateGameOverlayToWebPage ( string pchURL ) : void
pchURL string
Результат void

ClearRichPresence() публичный статический Метод

public static ClearRichPresence ( ) : void
Результат void

CloseClanChatWindowInSteam() публичный статический Метод

public static CloseClanChatWindowInSteam ( CSteamID steamIDClanChat ) : bool
steamIDClanChat CSteamID
Результат bool

DownloadClanActivityCounts() публичный статический Метод

for clans a user is a member of, they will have reasonably up-to-date information, but for others you'll have to download the info to have the latest

public static DownloadClanActivityCounts ( CSteamID psteamIDClans, int cClansToRequest ) : SteamAPICall_t
psteamIDClans CSteamID
cClansToRequest int
Результат SteamAPICall_t

EnumerateFollowingList() публичный статический Метод

public static EnumerateFollowingList ( uint unStartIndex ) : SteamAPICall_t
unStartIndex uint
Результат SteamAPICall_t

GetChatMemberByIndex() публичный статический Метод

public static GetChatMemberByIndex ( CSteamID steamIDClan, int iUser ) : CSteamID
steamIDClan CSteamID
iUser int
Результат CSteamID

GetClanActivityCounts() публичный статический Метод

returns the most recent information we have about what's happening in a clan

public static GetClanActivityCounts ( CSteamID steamIDClan, int &pnOnline, int &pnInGame, int &pnChatting ) : bool
steamIDClan CSteamID
pnOnline int
pnInGame int
pnChatting int
Результат bool

GetClanByIndex() публичный статический Метод

public static GetClanByIndex ( int iClan ) : CSteamID
iClan int
Результат CSteamID

GetClanChatMemberCount() публичный статический Метод

public static GetClanChatMemberCount ( CSteamID steamIDClan ) : int
steamIDClan CSteamID
Результат int

GetClanChatMessage() публичный статический Метод

public static GetClanChatMessage ( CSteamID steamIDClanChat, int iMessage, string &prgchText, int cchTextMax, EChatEntryType &peChatEntryType, CSteamID &psteamidChatter ) : int
steamIDClanChat CSteamID
iMessage int
prgchText string
cchTextMax int
peChatEntryType EChatEntryType
psteamidChatter CSteamID
Результат int

GetClanCount() публичный статический Метод

clan (group) iteration and access functions

public static GetClanCount ( ) : int
Результат int

GetClanName() публичный статический Метод

public static GetClanName ( CSteamID steamIDClan ) : string
steamIDClan CSteamID
Результат string

GetClanOfficerByIndex() публичный статический Метод

returns the steamID of a clan officer, by index, of range [0,GetClanOfficerCount)

public static GetClanOfficerByIndex ( CSteamID steamIDClan, int iOfficer ) : CSteamID
steamIDClan CSteamID
iOfficer int
Результат CSteamID

GetClanOfficerCount() публичный статический Метод

returns the number of officers in a clan (including the owner)

public static GetClanOfficerCount ( CSteamID steamIDClan ) : int
steamIDClan CSteamID
Результат int

GetClanOwner() публичный статический Метод

iteration of clan officers - can only be done when a RequestClanOfficerList() call has completed

returns the steamID of the clan owner

public static GetClanOwner ( CSteamID steamIDClan ) : CSteamID
steamIDClan CSteamID
Результат CSteamID

GetClanTag() публичный статический Метод

public static GetClanTag ( CSteamID steamIDClan ) : string
steamIDClan CSteamID
Результат string

GetCoplayFriend() публичный статический Метод

public static GetCoplayFriend ( int iCoplayFriend ) : CSteamID
iCoplayFriend int
Результат CSteamID

GetCoplayFriendCount() публичный статический Метод

recently-played-with friends iteration

this iterates the entire list of users recently played with, across games

GetFriendCoplayTime() returns as a unix time

public static GetCoplayFriendCount ( ) : int
Результат int

GetFollowerCount() публичный статический Метод

following apis

public static GetFollowerCount ( CSteamID steamID ) : SteamAPICall_t
steamID CSteamID
Результат SteamAPICall_t

GetFriendByIndex() публичный статический Метод

returns the steamID of a user

iFriend is a index of range [0, GetFriendCount())

iFriendsFlags must be the same value as used in GetFriendCount()

the returned CSteamID can then be used by all the functions below to access details about the user

public static GetFriendByIndex ( int iFriend, EFriendFlags iFriendFlags ) : CSteamID
iFriend int
iFriendFlags EFriendFlags
Результат CSteamID

GetFriendCoplayGame() публичный статический Метод

public static GetFriendCoplayGame ( CSteamID steamIDFriend ) : AppId_t
steamIDFriend CSteamID
Результат AppId_t

GetFriendCoplayTime() публичный статический Метод

public static GetFriendCoplayTime ( CSteamID steamIDFriend ) : int
steamIDFriend CSteamID
Результат int

GetFriendCount() публичный статический Метод

friend iteration

takes a set of k_EFriendFlags, and returns the number of users the client knows about who meet that criteria

then GetFriendByIndex() can then be used to return the id's of each of those users

public static GetFriendCount ( EFriendFlags iFriendFlags ) : int
iFriendFlags EFriendFlags
Результат int

GetFriendCountFromSource() публичный статический Метод

iterators for getting users in a chat room, lobby, game server or clan

note that large clans that cannot be iterated by the local user

note that the current user must be in a lobby to retrieve CSteamIDs of other users in that lobby

steamIDSource can be the steamID of a group, game server, lobby or chat room

public static GetFriendCountFromSource ( CSteamID steamIDSource ) : int
steamIDSource CSteamID
Результат int

GetFriendFromSourceByIndex() публичный статический Метод

public static GetFriendFromSourceByIndex ( CSteamID steamIDSource, int iFriend ) : CSteamID
steamIDSource CSteamID
iFriend int
Результат CSteamID

GetFriendGamePlayed() публичный статический Метод

returns true if the friend is actually in a game, and fills in pFriendGameInfo with an extra details

public static GetFriendGamePlayed ( CSteamID steamIDFriend, FriendGameInfo_t &pFriendGameInfo ) : bool
steamIDFriend CSteamID
pFriendGameInfo FriendGameInfo_t
Результат bool

GetFriendMessage() публичный статический Метод

public static GetFriendMessage ( CSteamID steamIDFriend, int iMessageID, string &pvData, int cubData, EChatEntryType &peChatEntryType ) : int
steamIDFriend CSteamID
iMessageID int
pvData string
cubData int
peChatEntryType EChatEntryType
Результат int

GetFriendPersonaName() публичный статический Метод

returns the name another user - guaranteed to not be NULL.

same rules as GetFriendPersonaState() apply as to whether or not the user knowns the name of the other user

note that on first joining a lobby, chat room or game server the local user will not known the name of the other users automatically; that information will arrive asyncronously

public static GetFriendPersonaName ( CSteamID steamIDFriend ) : string
steamIDFriend CSteamID
Результат string

GetFriendPersonaNameHistory() публичный статический Метод

accesses old friends names - returns an empty string when their are no more items in the history

public static GetFriendPersonaNameHistory ( CSteamID steamIDFriend, int iPersonaName ) : string
steamIDFriend CSteamID
iPersonaName int
Результат string

GetFriendPersonaState() публичный статический Метод

returns the current status of the specified user

this will only be known by the local user if steamIDFriend is in their friends list; on the same game server; in a chat room or lobby; or in a small group with the local user

public static GetFriendPersonaState ( CSteamID steamIDFriend ) : EPersonaState
steamIDFriend CSteamID
Результат EPersonaState

GetFriendRelationship() публичный статический Метод

returns a relationship to a user

public static GetFriendRelationship ( CSteamID steamIDFriend ) : EFriendRelationship
steamIDFriend CSteamID
Результат EFriendRelationship

GetFriendRichPresence() публичный статический Метод

public static GetFriendRichPresence ( CSteamID steamIDFriend, string pchKey ) : string
steamIDFriend CSteamID
pchKey string
Результат string

GetFriendRichPresenceKeyByIndex() публичный статический Метод

public static GetFriendRichPresenceKeyByIndex ( CSteamID steamIDFriend, int iKey ) : string
steamIDFriend CSteamID
iKey int
Результат string

GetFriendRichPresenceKeyCount() публичный статический Метод

public static GetFriendRichPresenceKeyCount ( CSteamID steamIDFriend ) : int
steamIDFriend CSteamID
Результат int

GetFriendSteamLevel() публичный статический Метод

friends steam level

public static GetFriendSteamLevel ( CSteamID steamIDFriend ) : int
steamIDFriend CSteamID
Результат int

GetFriendsGroupCount() публичный статический Метод

friend grouping (tag) apis

returns the number of friends groups

public static GetFriendsGroupCount ( ) : int
Результат int

GetFriendsGroupIDByIndex() публичный статический Метод

returns the friends group ID for the given index (invalid indices return k_FriendsGroupID_Invalid)

public static GetFriendsGroupIDByIndex ( int iFG ) : FriendsGroupID_t
iFG int
Результат FriendsGroupID_t

GetFriendsGroupMembersCount() публичный статический Метод

returns the number of members in a given friends group

public static GetFriendsGroupMembersCount ( FriendsGroupID_t friendsGroupID ) : int
friendsGroupID FriendsGroupID_t
Результат int

GetFriendsGroupMembersList() публичный статический Метод

gets up to nMembersCount members of the given friends group, if fewer exist than requested those positions' SteamIDs will be invalid

public static GetFriendsGroupMembersList ( FriendsGroupID_t friendsGroupID, CSteamID pOutSteamIDMembers, int nMembersCount ) : void
friendsGroupID FriendsGroupID_t
pOutSteamIDMembers CSteamID
nMembersCount int
Результат void

GetFriendsGroupName() публичный статический Метод

returns the name for the given friends group (NULL in the case of invalid friends group IDs)

public static GetFriendsGroupName ( FriendsGroupID_t friendsGroupID ) : string
friendsGroupID FriendsGroupID_t
Результат string

GetLargeFriendAvatar() публичный статический Метод

gets the large (184x184) avatar of the current user, which is a handle to be used in IClientUtils::GetImageRGBA(), or 0 if none set

returns -1 if this image has yet to be loaded, in this case wait for a AvatarImageLoaded_t callback and then call this again

public static GetLargeFriendAvatar ( CSteamID steamIDFriend ) : int
steamIDFriend CSteamID
Результат int

GetMediumFriendAvatar() публичный статический Метод

gets the medium (64x64) avatar of the current user, which is a handle to be used in IClientUtils::GetImageRGBA(), or 0 if none set

public static GetMediumFriendAvatar ( CSteamID steamIDFriend ) : int
steamIDFriend CSteamID
Результат int

GetPersonaName() публичный статический Метод

returns the local players name - guaranteed to not be NULL.

this is the same name as on the users community profile page

this is stored in UTF-8 format

like all the other interface functions that return a char *, it's important that this pointer is not saved

off; it will eventually be free'd or re-allocated

public static GetPersonaName ( ) : string
Результат string

GetPersonaState() публичный статический Метод

gets the status of the current user

public static GetPersonaState ( ) : EPersonaState
Результат EPersonaState

GetPlayerNickname() публичный статический Метод

Returns nickname the current user has set for the specified player. Returns NULL if the no nickname has been set for that player.

public static GetPlayerNickname ( CSteamID steamIDPlayer ) : string
steamIDPlayer CSteamID
Результат string

GetSmallFriendAvatar() публичный статический Метод

gets the small (32x32) avatar of the current user, which is a handle to be used in IClientUtils::GetImageRGBA(), or 0 if none set

public static GetSmallFriendAvatar ( CSteamID steamIDFriend ) : int
steamIDFriend CSteamID
Результат int

GetUserRestrictions() публичный статический Метод

if current user is chat restricted, he can't send or receive any text/voice chat messages.

the user can't see custom avatars. But the user can be online and send/recv game invites.

a chat restricted user can't add friends or join any groups.

public static GetUserRestrictions ( ) : uint
Результат uint

HasFriend() публичный статический Метод

returns true if the specified user meets any of the criteria specified in iFriendFlags

iFriendFlags can be the union (binary or, |) of one or more k_EFriendFlags values

public static HasFriend ( CSteamID steamIDFriend, EFriendFlags iFriendFlags ) : bool
steamIDFriend CSteamID
iFriendFlags EFriendFlags
Результат bool

InviteUserToGame() публичный статический Метод

rich invite support

if the target accepts the invite, the pchConnectString gets added to the command-line for launching the game

if the game is already running, a GameRichPresenceJoinRequested_t callback is posted containing the connect string

invites can only be sent to friends

public static InviteUserToGame ( CSteamID steamIDFriend, string pchConnectString ) : bool
steamIDFriend CSteamID
pchConnectString string
Результат bool

IsClanChatAdmin() публичный статический Метод

public static IsClanChatAdmin ( CSteamID steamIDClanChat, CSteamID steamIDUser ) : bool
steamIDClanChat CSteamID
steamIDUser CSteamID
Результат bool

IsClanChatWindowOpenInSteam() публичный статический Метод

interact with the Steam (game overlay / desktop)

public static IsClanChatWindowOpenInSteam ( CSteamID steamIDClanChat ) : bool
steamIDClanChat CSteamID
Результат bool

IsFollowing() публичный статический Метод

public static IsFollowing ( CSteamID steamID ) : SteamAPICall_t
steamID CSteamID
Результат SteamAPICall_t

IsUserInSource() публичный статический Метод

returns true if the local user can see that steamIDUser is a member or in steamIDSource

public static IsUserInSource ( CSteamID steamIDUser, CSteamID steamIDSource ) : bool
steamIDUser CSteamID
steamIDSource CSteamID
Результат bool

JoinClanChatRoom() публичный статический Метод

chat interface for games

this allows in-game access to group (clan) chats from in the game

the behavior is somewhat sophisticated, because the user may or may not be already in the group chat from outside the game or in the overlay

use ActivateGameOverlayToUser( "chat", steamIDClan ) to open the in-game overlay version of the chat

public static JoinClanChatRoom ( CSteamID steamIDClan ) : SteamAPICall_t
steamIDClan CSteamID
Результат SteamAPICall_t

LeaveClanChatRoom() публичный статический Метод

public static LeaveClanChatRoom ( CSteamID steamIDClan ) : bool
steamIDClan CSteamID
Результат bool

OpenClanChatWindowInSteam() публичный статический Метод

public static OpenClanChatWindowInSteam ( CSteamID steamIDClanChat ) : bool
steamIDClanChat CSteamID
Результат bool

ReplyToFriendMessage() публичный статический Метод

public static ReplyToFriendMessage ( CSteamID steamIDFriend, string pchMsgToSend ) : bool
steamIDFriend CSteamID
pchMsgToSend string
Результат bool

RequestClanOfficerList() публичный статический Метод

requests information about a clan officer list

when complete, data is returned in ClanOfficerListResponse_t call result

this makes available the calls below

you can only ask about clans that a user is a member of

note that this won't download avatars automatically; if you get an officer,

and no avatar image is available, call RequestUserInformation( steamID, false ) to download the avatar

public static RequestClanOfficerList ( CSteamID steamIDClan ) : SteamAPICall_t
steamIDClan CSteamID
Результат SteamAPICall_t

RequestFriendRichPresence() публичный статический Метод

Requests rich presence for a specific user.

public static RequestFriendRichPresence ( CSteamID steamIDFriend ) : void
steamIDFriend CSteamID
Результат void

RequestUserInformation() публичный статический Метод

requests information about a user - persona name & avatar

if bRequireNameOnly is set, then the avatar of a user isn't downloaded

- it's a lot slower to download avatars and churns the local cache, so if you don't need avatars, don't request them

if returns true, it means that data is being requested, and a PersonaStateChanged_t callback will be posted when it's retrieved

if returns false, it means that we already have all the details about that user, and functions can be called immediately

public static RequestUserInformation ( CSteamID steamIDUser, bool bRequireNameOnly ) : bool
steamIDUser CSteamID
bRequireNameOnly bool
Результат bool

SendClanChatMessage() публичный статический Метод

public static SendClanChatMessage ( CSteamID steamIDClanChat, string pchText ) : bool
steamIDClanChat CSteamID
pchText string
Результат bool

SetInGameVoiceSpeaking() публичный статический Метод

User is in a game pressing the talk button (will suppress the microphone for all voice comms from the Steam friends UI)

public static SetInGameVoiceSpeaking ( CSteamID steamIDUser, bool bSpeaking ) : void
steamIDUser CSteamID
bSpeaking bool
Результат void

SetListenForFriendsMessages() публичный статический Метод

peer-to-peer chat interception

this is so you can show P2P chats inline in the game

public static SetListenForFriendsMessages ( bool bInterceptEnabled ) : bool
bInterceptEnabled bool
Результат bool

SetPersonaName() публичный статический Метод

Sets the player name, stores it on the server and publishes the changes to all friends who are online.

Changes take place locally immediately, and a PersonaStateChange_t is posted, presuming success.

The final results are available through the return value SteamAPICall_t, using SetPersonaNameResponse_t.

If the name change fails to happen on the server, then an additional global PersonaStateChange_t will be posted

to change the name back, in addition to the SetPersonaNameResponse_t callback.

public static SetPersonaName ( string pchPersonaName ) : SteamAPICall_t
pchPersonaName string
Результат SteamAPICall_t

SetPlayedWith() публичный статический Метод

Mark a target user as 'played with'. This is a client-side only feature that requires that the calling user is

in game

public static SetPlayedWith ( CSteamID steamIDUserPlayedWith ) : void
steamIDUserPlayedWith CSteamID
Результат void

SetRichPresence() публичный статический Метод

Rich Presence data is automatically shared between friends who are in the same game

Each user has a set of Key/Value pairs

Note the following limits: k_cchMaxRichPresenceKeys, k_cchMaxRichPresenceKeyLength, k_cchMaxRichPresenceValueLength

There are two magic keys:

"status" - a UTF-8 string that will show up in the 'view game info' dialog in the Steam friends list

"connect" - a UTF-8 string that contains the command-line for how a friend can connect to a game

GetFriendRichPresence() returns an empty string "" if no value is set

SetRichPresence() to a NULL or an empty string deletes the key

You can iterate the current set of keys for a friend with GetFriendRichPresenceKeyCount()

and GetFriendRichPresenceKeyByIndex() (typically only used for debugging)

public static SetRichPresence ( string pchKey, string pchValue ) : bool
pchKey string
pchValue string
Результат bool