C# Class Steamworks.SteamFriends

Afficher le fichier Open project: rlabrecque/Steamworks.NET Class Usage Examples

Méthodes publiques

Méthode Description
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)

Method Details

ActivateGameOverlay() public static méthode

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
Résultat void

ActivateGameOverlayInviteDialog() public static méthode

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

public static ActivateGameOverlayInviteDialog ( CSteamID steamIDLobby ) : void
steamIDLobby CSteamID
Résultat void

ActivateGameOverlayToStore() public static méthode

activates game overlay to store page for app

public static ActivateGameOverlayToStore ( AppId_t nAppID, EOverlayToStoreFlag eFlag ) : void
nAppID AppId_t
eFlag EOverlayToStoreFlag
Résultat void

ActivateGameOverlayToUser() public static méthode

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
Résultat void

ActivateGameOverlayToWebPage() public static méthode

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
Résultat void

ClearRichPresence() public static méthode

public static ClearRichPresence ( ) : void
Résultat void

CloseClanChatWindowInSteam() public static méthode

public static CloseClanChatWindowInSteam ( CSteamID steamIDClanChat ) : bool
steamIDClanChat CSteamID
Résultat bool

DownloadClanActivityCounts() public static méthode

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
Résultat SteamAPICall_t

EnumerateFollowingList() public static méthode

public static EnumerateFollowingList ( uint unStartIndex ) : SteamAPICall_t
unStartIndex uint
Résultat SteamAPICall_t

GetChatMemberByIndex() public static méthode

public static GetChatMemberByIndex ( CSteamID steamIDClan, int iUser ) : CSteamID
steamIDClan CSteamID
iUser int
Résultat CSteamID

GetClanActivityCounts() public static méthode

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
Résultat bool

GetClanByIndex() public static méthode

public static GetClanByIndex ( int iClan ) : CSteamID
iClan int
Résultat CSteamID

GetClanChatMemberCount() public static méthode

public static GetClanChatMemberCount ( CSteamID steamIDClan ) : int
steamIDClan CSteamID
Résultat int

GetClanChatMessage() public static méthode

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
Résultat int

GetClanCount() public static méthode

clan (group) iteration and access functions

public static GetClanCount ( ) : int
Résultat int

GetClanName() public static méthode

public static GetClanName ( CSteamID steamIDClan ) : string
steamIDClan CSteamID
Résultat string

GetClanOfficerByIndex() public static méthode

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
Résultat CSteamID

GetClanOfficerCount() public static méthode

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

public static GetClanOfficerCount ( CSteamID steamIDClan ) : int
steamIDClan CSteamID
Résultat int

GetClanOwner() public static méthode

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
Résultat CSteamID

GetClanTag() public static méthode

public static GetClanTag ( CSteamID steamIDClan ) : string
steamIDClan CSteamID
Résultat string

GetCoplayFriend() public static méthode

public static GetCoplayFriend ( int iCoplayFriend ) : CSteamID
iCoplayFriend int
Résultat CSteamID

GetCoplayFriendCount() public static méthode

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
Résultat int

GetFollowerCount() public static méthode

following apis

public static GetFollowerCount ( CSteamID steamID ) : SteamAPICall_t
steamID CSteamID
Résultat SteamAPICall_t

GetFriendByIndex() public static méthode

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
Résultat CSteamID

GetFriendCoplayGame() public static méthode

public static GetFriendCoplayGame ( CSteamID steamIDFriend ) : AppId_t
steamIDFriend CSteamID
Résultat AppId_t

GetFriendCoplayTime() public static méthode

public static GetFriendCoplayTime ( CSteamID steamIDFriend ) : int
steamIDFriend CSteamID
Résultat int

GetFriendCount() public static méthode

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
Résultat int

GetFriendCountFromSource() public static méthode

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
Résultat int

GetFriendFromSourceByIndex() public static méthode

public static GetFriendFromSourceByIndex ( CSteamID steamIDSource, int iFriend ) : CSteamID
steamIDSource CSteamID
iFriend int
Résultat CSteamID

GetFriendGamePlayed() public static méthode

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
Résultat bool

GetFriendMessage() public static méthode

public static GetFriendMessage ( CSteamID steamIDFriend, int iMessageID, string &pvData, int cubData, EChatEntryType &peChatEntryType ) : int
steamIDFriend CSteamID
iMessageID int
pvData string
cubData int
peChatEntryType EChatEntryType
Résultat int

GetFriendPersonaName() public static méthode

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
Résultat string

GetFriendPersonaNameHistory() public static méthode

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
Résultat string

GetFriendPersonaState() public static méthode

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
Résultat EPersonaState

GetFriendRelationship() public static méthode

returns a relationship to a user

public static GetFriendRelationship ( CSteamID steamIDFriend ) : EFriendRelationship
steamIDFriend CSteamID
Résultat EFriendRelationship

GetFriendRichPresence() public static méthode

public static GetFriendRichPresence ( CSteamID steamIDFriend, string pchKey ) : string
steamIDFriend CSteamID
pchKey string
Résultat string

GetFriendRichPresenceKeyByIndex() public static méthode

public static GetFriendRichPresenceKeyByIndex ( CSteamID steamIDFriend, int iKey ) : string
steamIDFriend CSteamID
iKey int
Résultat string

GetFriendRichPresenceKeyCount() public static méthode

public static GetFriendRichPresenceKeyCount ( CSteamID steamIDFriend ) : int
steamIDFriend CSteamID
Résultat int

GetFriendSteamLevel() public static méthode

friends steam level

public static GetFriendSteamLevel ( CSteamID steamIDFriend ) : int
steamIDFriend CSteamID
Résultat int

GetFriendsGroupCount() public static méthode

friend grouping (tag) apis

returns the number of friends groups

public static GetFriendsGroupCount ( ) : int
Résultat int

GetFriendsGroupIDByIndex() public static méthode

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

public static GetFriendsGroupIDByIndex ( int iFG ) : FriendsGroupID_t
iFG int
Résultat FriendsGroupID_t

GetFriendsGroupMembersCount() public static méthode

returns the number of members in a given friends group

public static GetFriendsGroupMembersCount ( FriendsGroupID_t friendsGroupID ) : int
friendsGroupID FriendsGroupID_t
Résultat int

GetFriendsGroupMembersList() public static méthode

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
Résultat void

GetFriendsGroupName() public static méthode

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
Résultat string

GetLargeFriendAvatar() public static méthode

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
Résultat int

GetMediumFriendAvatar() public static méthode

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
Résultat int

GetPersonaName() public static méthode

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
Résultat string

GetPersonaState() public static méthode

gets the status of the current user

public static GetPersonaState ( ) : EPersonaState
Résultat EPersonaState

GetPlayerNickname() public static méthode

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
Résultat string

GetSmallFriendAvatar() public static méthode

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
Résultat int

GetUserRestrictions() public static méthode

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
Résultat uint

HasFriend() public static méthode

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
Résultat bool

InviteUserToGame() public static méthode

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
Résultat bool

IsClanChatAdmin() public static méthode

public static IsClanChatAdmin ( CSteamID steamIDClanChat, CSteamID steamIDUser ) : bool
steamIDClanChat CSteamID
steamIDUser CSteamID
Résultat bool

IsClanChatWindowOpenInSteam() public static méthode

interact with the Steam (game overlay / desktop)

public static IsClanChatWindowOpenInSteam ( CSteamID steamIDClanChat ) : bool
steamIDClanChat CSteamID
Résultat bool

IsFollowing() public static méthode

public static IsFollowing ( CSteamID steamID ) : SteamAPICall_t
steamID CSteamID
Résultat SteamAPICall_t

IsUserInSource() public static méthode

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
Résultat bool

JoinClanChatRoom() public static méthode

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
Résultat SteamAPICall_t

LeaveClanChatRoom() public static méthode

public static LeaveClanChatRoom ( CSteamID steamIDClan ) : bool
steamIDClan CSteamID
Résultat bool

OpenClanChatWindowInSteam() public static méthode

public static OpenClanChatWindowInSteam ( CSteamID steamIDClanChat ) : bool
steamIDClanChat CSteamID
Résultat bool

ReplyToFriendMessage() public static méthode

public static ReplyToFriendMessage ( CSteamID steamIDFriend, string pchMsgToSend ) : bool
steamIDFriend CSteamID
pchMsgToSend string
Résultat bool

RequestClanOfficerList() public static méthode

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
Résultat SteamAPICall_t

RequestFriendRichPresence() public static méthode

Requests rich presence for a specific user.

public static RequestFriendRichPresence ( CSteamID steamIDFriend ) : void
steamIDFriend CSteamID
Résultat void

RequestUserInformation() public static méthode

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
Résultat bool

SendClanChatMessage() public static méthode

public static SendClanChatMessage ( CSteamID steamIDClanChat, string pchText ) : bool
steamIDClanChat CSteamID
pchText string
Résultat bool

SetInGameVoiceSpeaking() public static méthode

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
Résultat void

SetListenForFriendsMessages() public static méthode

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
Résultat bool

SetPersonaName() public static méthode

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
Résultat SteamAPICall_t

SetPlayedWith() public static méthode

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
Résultat void

SetRichPresence() public static méthode

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
Résultat bool