Compare commits

..

No commits in common. "f147638f993d804567959bf9193f52ba7eb89190" and "8383f16be7c982498487d508bc9620f88c414a08" have entirely different histories.

30 changed files with 632 additions and 2922 deletions

View File

@ -109,13 +109,6 @@ Build id:
Add a steam_settings\build_id.txt with the build id if the game doesn't show the correct build id and you want the emu to give it the correct one. Add a steam_settings\build_id.txt with the build id if the game doesn't show the correct build id and you want the emu to give it the correct one.
An example can be found in steam_settings.EXAMPLE An example can be found in steam_settings.EXAMPLE
SteamHTTP:
Add a steam_settings\http folder. The folder should contain the domain name and path to the files that will be returned by steamHTTP like so:
For example this url: https://en.wikipedia.org/wiki/Main_Page
Would be: steam_settings\http\en.wikipedia.org\wiki\Main_Page
The Main_Page file would contain the data returned by the steamHTTP api when it tries to access: https://en.wikipedia.org/wiki/Main_Page
An example that was made for payday 2 can be found in steam_settings.EXAMPLE
Support for CPY steam_api(64).dll cracks: See the build in the experimental folder. Support for CPY steam_api(64).dll cracks: See the build in the experimental folder.

View File

@ -22,11 +22,8 @@
static void static void
randombytes(char * const buf, const size_t size) randombytes(char * const buf, const size_t size)
{ {
while (!RtlGenRandom((PVOID) buf, (ULONG) size)) {
PRINT_DEBUG("RtlGenRandom ERROR\n");
Sleep(100);
}
RtlGenRandom((PVOID) buf, (ULONG) size);
} }
std::string get_env_variable(std::string name) std::string get_env_variable(std::string name)

File diff suppressed because it is too large Load Diff

View File

@ -538,8 +538,6 @@ void *Steam_Client::GetISteamGenericInterface( HSteamUser hSteamUser, HSteamPipe
return (void *)(ISteamNetworkingUtils001 *)steam_networking_utils; return (void *)(ISteamNetworkingUtils001 *)steam_networking_utils;
} else if (strcmp(pchVersion, "SteamNetworkingUtils002") == 0) { } else if (strcmp(pchVersion, "SteamNetworkingUtils002") == 0) {
return (void *)(ISteamNetworkingUtils002 *)steam_networking_utils; return (void *)(ISteamNetworkingUtils002 *)steam_networking_utils;
} else if (strcmp(pchVersion, "SteamNetworkingUtils003") == 0) {
return (void *)(ISteamNetworkingUtils003 *)steam_networking_utils;
} else if (strcmp(pchVersion, STEAMNETWORKINGUTILS_INTERFACE_VERSION) == 0) { } else if (strcmp(pchVersion, STEAMNETWORKINGUTILS_INTERFACE_VERSION) == 0) {
return (void *)(ISteamNetworkingUtils *)steam_networking_utils; return (void *)(ISteamNetworkingUtils *)steam_networking_utils;
} else { } else {
@ -938,8 +936,6 @@ ISteamUGC *Steam_Client::GetISteamUGC( HSteamUser hSteamUser, HSteamPipe hSteamP
return (ISteamUGC *)(void *)(ISteamUGC013 *)steam_ugc_temp; return (ISteamUGC *)(void *)(ISteamUGC013 *)steam_ugc_temp;
} else if (strcmp(pchVersion, "STEAMUGC_INTERFACE_VERSION014") == 0) { } else if (strcmp(pchVersion, "STEAMUGC_INTERFACE_VERSION014") == 0) {
return (ISteamUGC *)(void *)(ISteamUGC014 *)steam_ugc_temp; return (ISteamUGC *)(void *)(ISteamUGC014 *)steam_ugc_temp;
} else if (strcmp(pchVersion, "STEAMUGC_INTERFACE_VERSION015") == 0) {
return (ISteamUGC *)(void *)(ISteamUGC015 *)steam_ugc_temp;
} else if (strcmp(pchVersion, STEAMUGC_INTERFACE_VERSION) == 0) { } else if (strcmp(pchVersion, STEAMUGC_INTERFACE_VERSION) == 0) {
return (ISteamUGC *)(void *)(ISteamUGC *)steam_ugc_temp; return (ISteamUGC *)(void *)(ISteamUGC *)steam_ugc_temp;
} else { } else {
@ -1100,8 +1096,6 @@ ISteamInput *Steam_Client::GetISteamInput( HSteamUser hSteamUser, HSteamPipe hSt
return (ISteamInput *)(void *)(ISteamInput001 *)steam_controller; return (ISteamInput *)(void *)(ISteamInput001 *)steam_controller;
} else if (strcmp(pchVersion, "SteamInput002") == 0) { } else if (strcmp(pchVersion, "SteamInput002") == 0) {
return (ISteamInput *)(void *)(ISteamInput002 *)steam_controller; return (ISteamInput *)(void *)(ISteamInput002 *)steam_controller;
} else if (strcmp(pchVersion, "SteamInput005") == 0) {
return (ISteamInput *)(void *)(ISteamInput005 *)steam_controller;
} else if (strcmp(pchVersion, STEAMINPUT_INTERFACE_VERSION) == 0) { } else if (strcmp(pchVersion, STEAMINPUT_INTERFACE_VERSION) == 0) {
return (ISteamInput *)(void *)(ISteamInput *)steam_controller; return (ISteamInput *)(void *)(ISteamInput *)steam_controller;
} else { } else {

View File

@ -102,7 +102,6 @@ public ISteamController007,
public ISteamController, public ISteamController,
public ISteamInput001, public ISteamInput001,
public ISteamInput002, public ISteamInput002,
public ISteamInput005,
public ISteamInput public ISteamInput
{ {
class Settings *settings; class Settings *settings;
@ -563,11 +562,7 @@ ControllerDigitalActionHandle_t GetDigitalActionHandle( const char *pszActionNam
std::transform(upper_action_name.begin(), upper_action_name.end(), upper_action_name.begin(),[](unsigned char c){ return std::toupper(c); }); std::transform(upper_action_name.begin(), upper_action_name.end(), upper_action_name.begin(),[](unsigned char c){ return std::toupper(c); });
auto handle = digital_action_handles.find(upper_action_name); auto handle = digital_action_handles.find(upper_action_name);
if (handle == digital_action_handles.end()) { if (handle == digital_action_handles.end()) return 0;
//apparently GetDigitalActionHandle also works with analog handles
handle = analog_action_handles.find(upper_action_name);
if (handle == analog_action_handles.end()) return 0;
}
PRINT_DEBUG("Steam_Controller::GetDigitalActionHandle %s ret %llu\n", pszActionName, handle->second); PRINT_DEBUG("Steam_Controller::GetDigitalActionHandle %s ret %llu\n", pszActionName, handle->second);
return handle->second; return handle->second;

View File

@ -39,32 +39,9 @@ Steam_Http_Request *Steam_HTTP::get_request(HTTPRequestHandle hRequest)
HTTPRequestHandle Steam_HTTP::CreateHTTPRequest( EHTTPMethod eHTTPRequestMethod, const char *pchAbsoluteURL ) HTTPRequestHandle Steam_HTTP::CreateHTTPRequest( EHTTPMethod eHTTPRequestMethod, const char *pchAbsoluteURL )
{ {
PRINT_DEBUG("CreateHTTPRequest %i %s\n", eHTTPRequestMethod, pchAbsoluteURL); PRINT_DEBUG("CreateHTTPRequest %i %s\n", eHTTPRequestMethod, pchAbsoluteURL);
if (!pchAbsoluteURL) return INVALID_HTTPREQUEST_HANDLE;
std::string url = pchAbsoluteURL;
unsigned url_index = 0;
if (url.rfind("https://", 0) == 0) {
url_index = sizeof("https://") - 1;
} else if (url.rfind("http://", 0) == 0) {
url_index = sizeof("http://") - 1;
}
struct Steam_Http_Request request;
if (url_index) {
if (url[url.size() - 1] == '/') url += "index.html";
std::string file_path = Local_Storage::get_game_settings_path() + "http/" + url.substr(url_index);
unsigned long long file_size = file_size_(file_path);
if (file_size) {
request.response.resize(file_size);
long long read = Local_Storage::get_file_data(file_path, (char *)request.response.data(), file_size, 0);
if (read < 0) read = 0;
if (read != file_size) request.response.resize(read);
}
}
std::lock_guard<std::recursive_mutex> lock(global_mutex);
static HTTPRequestHandle h; static HTTPRequestHandle h;
++h; ++h;
struct Steam_Http_Request request;
request.handle = h; request.handle = h;
request.context_value = 0; request.context_value = 0;
@ -107,7 +84,7 @@ bool Steam_HTTP::SetHTTPRequestNetworkActivityTimeout( HTTPRequestHandle hReques
// return false if the handle is invalid or the request is already sent. // return false if the handle is invalid or the request is already sent.
bool Steam_HTTP::SetHTTPRequestHeaderValue( HTTPRequestHandle hRequest, const char *pchHeaderName, const char *pchHeaderValue ) bool Steam_HTTP::SetHTTPRequestHeaderValue( HTTPRequestHandle hRequest, const char *pchHeaderName, const char *pchHeaderValue )
{ {
PRINT_DEBUG("SetHTTPRequestHeaderValue %s %s\n", pchHeaderName, pchHeaderValue); PRINT_DEBUG("SetHTTPRequestHeaderValue\n");
Steam_Http_Request *request = get_request(hRequest); Steam_Http_Request *request = get_request(hRequest);
if (!request) { if (!request) {
return false; return false;
@ -145,18 +122,12 @@ bool Steam_HTTP::SendHTTPRequest( HTTPRequestHandle hRequest, SteamAPICall_t *pC
return false; return false;
} }
struct HTTPRequestCompleted_t data = {}; struct HTTPRequestCompleted_t data;
data.m_hRequest = request->handle; data.m_hRequest = request->handle;
data.m_ulContextValue = request->context_value; data.m_ulContextValue = request->context_value;
if (request->response.size() == 0) {
data.m_bRequestSuccessful = false; data.m_bRequestSuccessful = false;
data.m_eStatusCode = k_EHTTPStatusCode404NotFound; data.m_eStatusCode = k_EHTTPStatusCode404NotFound;
data.m_unBodySize = request->response.size(); data.m_unBodySize = request->response.size();
} else {
data.m_bRequestSuccessful = true;
data.m_eStatusCode = k_EHTTPStatusCode200OK;
data.m_unBodySize = request->response.size();
}
if (pCallHandle) { if (pCallHandle) {
*pCallHandle = callback_results->addCallResult(data.k_iCallback, &data, sizeof(data), 0.1); *pCallHandle = callback_results->addCallResult(data.k_iCallback, &data, sizeof(data), 0.1);
@ -274,7 +245,6 @@ bool Steam_HTTP::GetHTTPStreamingResponseBodyData( HTTPRequestHandle hRequest, u
bool Steam_HTTP::ReleaseHTTPRequest( HTTPRequestHandle hRequest ) bool Steam_HTTP::ReleaseHTTPRequest( HTTPRequestHandle hRequest )
{ {
PRINT_DEBUG("ReleaseHTTPRequest\n"); PRINT_DEBUG("ReleaseHTTPRequest\n");
std::lock_guard<std::recursive_mutex> lock(global_mutex);
auto c = std::begin(requests); auto c = std::begin(requests);
while (c != std::end(requests)) { while (c != std::end(requests)) {
@ -305,7 +275,7 @@ bool Steam_HTTP::GetHTTPDownloadProgressPct( HTTPRequestHandle hRequest, float *
// parameter will set the content-type header for the request so the server may know how to interpret the body. // parameter will set the content-type header for the request so the server may know how to interpret the body.
bool Steam_HTTP::SetHTTPRequestRawPostBody( HTTPRequestHandle hRequest, const char *pchContentType, uint8 *pubBody, uint32 unBodyLen ) bool Steam_HTTP::SetHTTPRequestRawPostBody( HTTPRequestHandle hRequest, const char *pchContentType, uint8 *pubBody, uint32 unBodyLen )
{ {
PRINT_DEBUG("SetHTTPRequestRawPostBody %s\n", pchContentType); PRINT_DEBUG("SetHTTPRequestRawPostBody\n");
Steam_Http_Request *request = get_request(hRequest); Steam_Http_Request *request = get_request(hRequest);
if (!request) { if (!request) {
return false; return false;

View File

@ -336,7 +336,7 @@ bool CloseChannelWithUser( const SteamNetworkingIdentity &identityRemote, int nL
/// you do not need the corresponding details. Note that sessions time out after a while, /// you do not need the corresponding details. Note that sessions time out after a while,
/// so if a connection fails, or SendMessageToUser returns SendMessageToUser, you cannot wait /// so if a connection fails, or SendMessageToUser returns SendMessageToUser, you cannot wait
/// indefinitely to obtain the reason for failure. /// indefinitely to obtain the reason for failure.
ESteamNetworkingConnectionState GetSessionConnectionInfo( const SteamNetworkingIdentity &identityRemote, SteamNetConnectionInfo_t *pConnectionInfo, SteamNetConnectionRealTimeStatus_t *pQuickStatus ) ESteamNetworkingConnectionState GetSessionConnectionInfo( const SteamNetworkingIdentity &identityRemote, SteamNetConnectionInfo_t *pConnectionInfo, SteamNetworkingQuickConnectionStatus *pQuickStatus )
{ {
PRINT_DEBUG("Steam_Networking_Messages::GetSessionConnectionInfo\n"); PRINT_DEBUG("Steam_Networking_Messages::GetSessionConnectionInfo\n");
std::lock_guard<std::recursive_mutex> lock(global_mutex); std::lock_guard<std::recursive_mutex> lock(global_mutex);
@ -360,7 +360,7 @@ ESteamNetworkingConnectionState GetSessionConnectionInfo( const SteamNetworkingI
} }
if (pQuickStatus) { if (pQuickStatus) {
memset(pQuickStatus, 0, sizeof(SteamNetConnectionRealTimeStatus_t)); memset(pQuickStatus, 0, sizeof(SteamNetworkingQuickConnectionStatus));
pQuickStatus->m_eState = state; pQuickStatus->m_eState = state;
pQuickStatus->m_nPing = 10; //TODO: calculate real numbers? pQuickStatus->m_nPing = 10; //TODO: calculate real numbers?
pQuickStatus->m_flConnectionQualityLocal = 1.0; pQuickStatus->m_flConnectionQualityLocal = 1.0;

View File

@ -900,48 +900,6 @@ bool GetConnectionInfo( HSteamNetConnection hConn, SteamNetConnectionInfo_t *pIn
return true; return true;
} }
/// Returns a small set of information about the real-time state of the connection
/// and the queue status of each lane.
///
/// - pStatus may be NULL if the information is not desired. (E.g. you are only interested
/// in the lane information.)
/// - On entry, nLanes specifies the length of the pLanes array. This may be 0
/// if you do not wish to receive any lane data. It's OK for this to be smaller than
/// the total number of configured lanes.
/// - pLanes points to an array that will receive lane-specific info. It can be NULL
/// if this is not needed.
///
/// Return value:
/// - k_EResultNoConnection - connection handle is invalid or connection has been closed.
/// - k_EResultInvalidParam - nLanes is bad
EResult GetConnectionRealTimeStatus( HSteamNetConnection hConn, SteamNetConnectionRealTimeStatus_t *pStatus, int nLanes, SteamNetConnectionRealTimeLaneStatus_t *pLanes )
{
PRINT_DEBUG("%s %u %p %i %p\n", __FUNCTION__, hConn, pStatus, nLanes, pLanes);
std::lock_guard<std::recursive_mutex> lock(global_mutex);
auto connect_socket = connect_sockets.find(hConn);
if (connect_socket == connect_sockets.end()) return k_EResultNoConnection;
if (pStatus) {
pStatus->m_eState = convert_status(connect_socket->second.status);
pStatus->m_nPing = 10; //TODO: calculate real numbers?
pStatus->m_flConnectionQualityLocal = 1.0;
pStatus->m_flConnectionQualityRemote = 1.0;
//TODO: rest
pStatus->m_flOutPacketsPerSec = 0.0;
pStatus->m_flOutBytesPerSec = 0.0;
pStatus->m_flInPacketsPerSec = 0.0;
pStatus->m_flInBytesPerSec = 0.0;
pStatus->m_cbSentUnackedReliable = 0.0;
pStatus->m_usecQueueTime = 0.0;
//Note some games (volcanoids) might not allocate a struct the whole size of SteamNetworkingQuickConnectionStatus
//keep this in mind in future interface updates
//NOTE: need to implement GetQuickConnectionStatus seperately if this changes.
}
//TODO: lanes
return k_EResultOK;
}
/// Fetch the next available message(s) from the socket, if any. /// Fetch the next available message(s) from the socket, if any.
/// Returns the number of messages returned into your array, up to nMaxMessages. /// Returns the number of messages returned into your array, up to nMaxMessages.
@ -997,7 +955,26 @@ bool GetQuickConnectionStatus( HSteamNetConnection hConn, SteamNetworkingQuickCo
if (!pStats) if (!pStats)
return false; return false;
return GetConnectionRealTimeStatus(hConn, pStats, 0, NULL) == k_EResultOK; std::lock_guard<std::recursive_mutex> lock(global_mutex);
auto connect_socket = connect_sockets.find(hConn);
if (connect_socket == connect_sockets.end()) return false;
pStats->m_eState = convert_status(connect_socket->second.status);
pStats->m_nPing = 10; //TODO: calculate real numbers?
pStats->m_flConnectionQualityLocal = 1.0;
pStats->m_flConnectionQualityRemote = 1.0;
//TODO: rest
pStats->m_flOutPacketsPerSec = 0.0;
pStats->m_flOutBytesPerSec = 0.0;
pStats->m_flInPacketsPerSec = 0.0;
pStats->m_flInBytesPerSec = 0.0;
pStats->m_cbSentUnackedReliable = 0.0;
pStats->m_usecQueueTime = 0.0;
//Note some games (volcanoids) might not allocate a struct the whole size of SteamNetworkingQuickConnectionStatus
//keep this in mind in future interface updates
return true;
} }
@ -1102,85 +1079,6 @@ bool CreateSocketPair( HSteamNetConnection *pOutConnection1, HSteamNetConnection
return true; return true;
} }
/// Configure multiple outbound messages streams ("lanes") on a connection, and
/// control head-of-line blocking between them. Messages within a given lane
/// are always sent in the order they are queued, but messages from different
/// lanes may be sent out of order. Each lane has its own message number
/// sequence. The first message sent on each lane will be assigned the number 1.
///
/// Each lane has a "priority". Lower priority lanes will only be processed
/// when all higher-priority lanes are empty. The magnitudes of the priority
/// values are not relevant, only their sort order. Higher numeric values
/// take priority over lower numeric values.
///
/// Each lane also is assigned a weight, which controls the approximate proportion
/// of the bandwidth that will be consumed by the lane, relative to other lanes
/// of the same priority. (This is assuming the lane stays busy. An idle lane
/// does not build up "credits" to be be spent once a message is queued.)
/// This value is only meaningful as a proportion, relative to other lanes with
/// the same priority. For lanes with different priorities, the strict priority
/// order will prevail, and their weights relative to each other are not relevant.
/// Thus, if a lane has a unique priority value, the weight value for that lane is
/// not relevant.
///
/// Example: 3 lanes, with priorities [ 0, 10, 10 ] and weights [ (NA), 20, 5 ].
/// Messages sent on the first will always be sent first, before messages in the
/// other two lanes. Its weight value is irrelevant, since there are no other
/// lanes with priority=0. The other two lanes will share bandwidth, with the second
/// and third lanes sharing bandwidth using a ratio of approximately 4:1.
/// (The weights [ NA, 4, 1 ] would be equivalent.)
///
/// Notes:
/// - At the time of this writing, some code has performance cost that is linear
/// in the number of lanes, so keep the number of lanes to an absolute minimum.
/// 3 or so is fine; >8 is a lot. The max number of lanes on Steam is 255,
/// which is a very large number and not recommended! If you are compiling this
/// library from source, see STEAMNETWORKINGSOCKETS_MAX_LANES.)
/// - Lane priority values may be any int. Their absolute value is not relevant,
/// only the order matters.
/// - Weights must be positive, and due to implementation details, they are restricted
/// to 16-bit values. The absolute magnitudes don't matter, just the proportions.
/// - Messages sent on a lane index other than 0 have a small overhead on the wire,
/// so for maximum wire efficiency, lane 0 should be the "most common" lane, regardless
/// of priorities or weights.
/// - A connection has a single lane by default. Calling this function with
/// nNumLanes=1 is legal, but pointless, since the priority and weight values are
/// irrelevant in that case.
/// - You may reconfigure connection lanes at any time, however reducing the number of
/// lanes is not allowed.
/// - Reconfiguring lanes might restart any bandwidth sharing balancing. Usually you
/// will call this function once, near the start of the connection, perhaps after
/// exchanging a few messages.
/// - To assign all lanes the same priority, you may use pLanePriorities=NULL.
/// - If you wish all lanes with the same priority to share bandwidth equally (or
/// if no two lanes have the same priority value, and thus priority values are
/// irrelevant), you may use pLaneWeights=NULL
/// - Priorities and weights determine the order that messages are SENT on the wire.
/// There are NO GUARANTEES on the order that messages are RECEIVED! Due to packet
/// loss, out-of-order delivery, and subtle details of packet serialization, messages
/// might still be received slightly out-of-order! The *only* strong guarantee is that
/// *reliable* messages on the *same lane* will be delivered in the order they are sent.
/// - Each host configures the lanes for the packets they send; the lanes for the flow
/// in one direction are completely unrelated to the lanes in the opposite direction.
///
/// Return value:
/// - k_EResultNoConnection - bad hConn
/// - k_EResultInvalidParam - Invalid number of lanes, bad weights, or you tried to reduce the number of lanes
/// - k_EResultInvalidState - Connection is already dead, etc
///
/// See also:
/// SteamNetworkingMessage_t::m_idxLane
EResult ConfigureConnectionLanes( HSteamNetConnection hConn, int nNumLanes, const int *pLanePriorities, const uint16 *pLaneWeights )
{
PRINT_DEBUG("TODO: %s\n", __FUNCTION__);
std::lock_guard<std::recursive_mutex> lock(global_mutex);
auto connect_socket = connect_sockets.find(hConn);
if (connect_socket == connect_sockets.end()) return k_EResultNoConnection;
//TODO
return k_EResultOK;
}
/// Get the identity assigned to this interface. /// Get the identity assigned to this interface.
/// E.g. on Steam, this is the user's SteamID, or for the gameserver interface, the SteamID assigned /// E.g. on Steam, this is the user's SteamID, or for the gameserver interface, the SteamID assigned
/// to the gameserver. Returns false and sets the result to an invalid identity if we don't know /// to the gameserver. Returns false and sets the result to an invalid identity if we don't know
@ -1786,152 +1684,6 @@ bool SetCertificate( const void *pCertificate, int cbCertificate, SteamNetworkin
return false; return false;
} }
/// Reset the identity associated with this instance.
/// Any open connections are closed. Any previous certificates, etc are discarded.
/// You can pass a specific identity that you want to use, or you can pass NULL,
/// in which case the identity will be invalid until you set it using SetCertificate
///
/// NOTE: This function is not actually supported on Steam! It is included
/// for use on other platforms where the active user can sign out and
/// a new user can sign in.
void ResetIdentity( const SteamNetworkingIdentity *pIdentity )
{
PRINT_DEBUG("TODO: %s\n", __FUNCTION__);
}
//
// "FakeIP" system.
//
// A FakeIP is essentially a temporary, arbitrary identifier that
// happens to be a valid IPv4 address. The purpose of this system is to make it
// easy to integrate with existing code that identifies hosts using IPv4 addresses.
// The FakeIP address will never actually be used to send or receive any packets
// on the Internet, it is strictly an identifier.
//
// FakeIP addresses are designed to (hopefully) pass through existing code as
// transparently as possible, while conflicting with "real" addresses that might
// be in use on networks (both the Internet and LANs) in the same code as little
// as possible. At the time this comment is being written, they come from the
// 169.254.0.0/16 range, and the port number will always be >1024. HOWEVER,
// this is subject to change! Do not make assumptions about these addresses,
// or your code might break in the future. In particular, you should use
// functions such as ISteamNetworkingUtils::IsFakeIP to determine if an IP
// address is a "fake" one used by this system.
//
/// Begin asynchronous process of allocating a fake IPv4 address that other
/// peers can use to contact us via P2P. IP addresses returned by this
/// function are globally unique for a given appid.
///
/// nNumPorts is the numbers of ports you wish to reserve. This is useful
/// for the same reason that listening on multiple UDP ports is useful for
/// different types of traffic. Because these allocations come from a global
/// namespace, there is a relatively strict limit on the maximum number of
/// ports you may request. (At the time of this writing, the limit is 4.)
/// The Port assignments are *not* guaranteed to have any particular order
/// or relationship! Do *not* assume they are contiguous, even though that
/// may often occur in practice.
///
/// Returns false if a request was already in progress, true if a new request
/// was started. A SteamNetworkingFakeIPResult_t will be posted when the request
/// completes.
///
/// For gameservers, you *must* call this after initializing the SDK but before
/// beginning login. Steam needs to know in advance that FakeIP will be used.
/// Everywhere your public IP would normally appear (such as the server browser) will be
/// replaced by the FakeIP, and the fake port at index 0. The request is actually queued
/// until the logon completes, so you must not wait until the allocation completes
/// before logging in. Except for trivial failures that can be detected locally
/// (e.g. invalid parameter), a SteamNetworkingFakeIPResult_t callback (whether success or
/// failure) will not be posted until after we have logged in. Furthermore, it is assumed
/// that FakeIP allocation is essential for your application to function, and so failure
/// will not be reported until *several* retries have been attempted. This process may
/// last several minutes. It is *highly* recommended to treat failure as fatal.
///
/// To communicate using a connection-oriented (TCP-style) API:
/// - Server creates a listen socket using CreateListenSocketP2PFakeIP
/// - Client connects using ConnectByIPAddress, passing in the FakeIP address.
/// - The connection will behave mostly like a P2P connection. The identities
/// that appear in SteamNetConnectionInfo_t will be the FakeIP identity until
/// we know the real identity. Then it will be the real identity. If the
/// SteamNetConnectionInfo_t::m_addrRemote is valid, it will be a real IPv4
/// address of a NAT-punched connection. Otherwise, it will not be valid.
///
/// To communicate using an ad-hoc sendto/recv from (UDP-style) API,
/// use CreateFakeUDPPort.
bool BeginAsyncRequestFakeIP( int nNumPorts )
{
PRINT_DEBUG("TODO: %s\n", __FUNCTION__);
return false;
}
/// Return info about the FakeIP and port(s) that we have been assigned,
/// if any. idxFirstPort is currently reserved and must be zero.
/// Make sure and check SteamNetworkingFakeIPResult_t::m_eResult
void GetFakeIP( int idxFirstPort, SteamNetworkingFakeIPResult_t *pInfo )
{
PRINT_DEBUG("TODO: %s\n", __FUNCTION__);
}
/// Create a listen socket that will listen for P2P connections sent
/// to our FakeIP. A peer can initiate connections to this listen
/// socket by calling ConnectByIPAddress.
///
/// idxFakePort refers to the *index* of the fake port requested,
/// not the actual port number. For example, pass 0 to refer to the
/// first port in the reservation. You must call this only after calling
/// BeginAsyncRequestFakeIP. However, you do not need to wait for the
/// request to complete before creating the listen socket.
HSteamListenSocket CreateListenSocketP2PFakeIP( int idxFakePort, int nOptions, const SteamNetworkingConfigValue_t *pOptions )
{
PRINT_DEBUG("TODO: %s\n", __FUNCTION__);
return k_HSteamListenSocket_Invalid;
}
/// If the connection was initiated using the "FakeIP" system, then we
/// we can get an IP address for the remote host. If the remote host had
/// a global FakeIP at the time the connection was established, this
/// function will return that global IP. Otherwise, a FakeIP that is
/// unique locally will be allocated from the local FakeIP address space,
/// and that will be returned.
///
/// The allocation of local FakeIPs attempts to assign addresses in
/// a consistent manner. If multiple connections are made to the
/// same remote host, they *probably* will return the same FakeIP.
/// However, since the namespace is limited, this cannot be guaranteed.
///
/// On failure, returns:
/// - k_EResultInvalidParam: invalid connection handle
/// - k_EResultIPNotFound: This connection wasn't made using FakeIP system
EResult GetRemoteFakeIPForConnection( HSteamNetConnection hConn, SteamNetworkingIPAddr *pOutAddr )
{
PRINT_DEBUG("TODO: %s\n", __FUNCTION__);
return k_EResultNone;
}
/// Get an interface that can be used like a UDP port to send/receive
/// datagrams to a FakeIP address. This is intended to make it easy
/// to port existing UDP-based code to take advantage of SDR.
///
/// idxFakeServerPort refers to the *index* of the port allocated using
/// BeginAsyncRequestFakeIP and is used to create "server" ports. You may
/// call this before the allocation has completed. However, any attempts
/// to send packets will fail until the allocation has succeeded. When
/// the peer receives packets sent from this interface, the from address
/// of the packet will be the globally-unique FakeIP. If you call this
/// function multiple times and pass the same (nonnegative) fake port index,
/// the same object will be returned, and this object is not reference counted.
///
/// To create a "client" port (e.g. the equivalent of an ephemeral UDP port)
/// pass -1. In this case, a distinct object will be returned for each call.
/// When the peer receives packets sent from this interface, the peer will
/// assign a FakeIP from its own locally-controlled namespace.
ISteamNetworkingFakeUDPPort *CreateFakeUDPPort( int idxFakeServerPort )
{
PRINT_DEBUG("TODO: %s\n", __FUNCTION__);
return NULL;
}
// TEMP KLUDGE Call to invoke all queued callbacks. // TEMP KLUDGE Call to invoke all queued callbacks.
// Eventually this function will go away, and callwacks will be ordinary Steamworks callbacks. // Eventually this function will go away, and callwacks will be ordinary Steamworks callbacks.
// You should call this at the same time you call SteamAPI_RunCallbacks and SteamGameServer_RunCallbacks // You should call this at the same time you call SteamAPI_RunCallbacks and SteamGameServer_RunCallbacks
@ -1947,7 +1699,6 @@ void RunCallbacks()
//TODO: timeout unaccepted connections after a few seconds or so //TODO: timeout unaccepted connections after a few seconds or so
} }
void Callback(Common_Message *msg) void Callback(Common_Message *msg)
{ {
if (msg->has_low_level()) { if (msg->has_low_level()) {

View File

@ -20,7 +20,6 @@
class Steam_Networking_Utils : class Steam_Networking_Utils :
public ISteamNetworkingUtils001, public ISteamNetworkingUtils001,
public ISteamNetworkingUtils002, public ISteamNetworkingUtils002,
public ISteamNetworkingUtils003,
public ISteamNetworkingUtils public ISteamNetworkingUtils
{ {
class Settings *settings; class Settings *settings;
@ -276,40 +275,6 @@ void SetDebugOutputFunction( ESteamNetworkingSocketsDebugOutputType eDetailLevel
} }
} }
//
// Fake IP
//
// Useful for interfacing with code that assumes peers are identified using an IPv4 address
//
/// Return true if an IPv4 address is one that might be used as a "fake" one.
/// This function is fast; it just does some logical tests on the IP and does
/// not need to do any lookup operations.
// inline bool IsFakeIPv4( uint32 nIPv4 ) { return GetIPv4FakeIPType( nIPv4 ) > k_ESteamNetworkingFakeIPType_NotFake; }
ESteamNetworkingFakeIPType GetIPv4FakeIPType( uint32 nIPv4 )
{
PRINT_DEBUG("TODO: %s\n", __FUNCTION__);
return k_ESteamNetworkingFakeIPType_NotFake;
}
/// Get the real identity associated with a given FakeIP.
///
/// On failure, returns:
/// - k_EResultInvalidParam: the IP is not a FakeIP.
/// - k_EResultNoMatch: we don't recognize that FakeIP and don't know the corresponding identity.
///
/// FakeIP's used by active connections, or the FakeIPs assigned to local identities,
/// will always work. FakeIPs for recently destroyed connections will continue to
/// return results for a little while, but not forever. At some point, we will forget
/// FakeIPs to save space. It's reasonably safe to assume that you can read back the
/// real identity of a connection very soon after it is destroyed. But do not wait
/// indefinitely.
EResult GetRealIdentityForFakeIP( const SteamNetworkingIPAddr &fakeIP, SteamNetworkingIdentity *pOutRealIdentity )
{
PRINT_DEBUG("TODO: %s\n", __FUNCTION__);
return k_EResultNoMatch;
}
// //
// Set and get configuration values, see ESteamNetworkingConfigValue for individual descriptions. // Set and get configuration values, see ESteamNetworkingConfigValue for individual descriptions.
@ -363,20 +328,10 @@ ESteamNetworkingGetConfigValueResult GetConfigValue( ESteamNetworkingConfigValue
/// Any of the output parameters can be NULL if you do not need that information. /// Any of the output parameters can be NULL if you do not need that information.
bool GetConfigValueInfo( ESteamNetworkingConfigValue eValue, const char **pOutName, ESteamNetworkingConfigDataType *pOutDataType, ESteamNetworkingConfigScope *pOutScope, ESteamNetworkingConfigValue *pOutNextValue ) bool GetConfigValueInfo( ESteamNetworkingConfigValue eValue, const char **pOutName, ESteamNetworkingConfigDataType *pOutDataType, ESteamNetworkingConfigScope *pOutScope, ESteamNetworkingConfigValue *pOutNextValue )
{ {
PRINT_DEBUG("TODO: Steam_Networking_Utils::GetConfigValueInfo old\n"); PRINT_DEBUG("Steam_Networking_Utils::GetConfigValueInfo\n");
//TODO flat api
return false; return false;
} }
/// Get info about a configuration value. Returns the name of the value,
/// or NULL if the value doesn't exist. Other output parameters can be NULL
/// if you do not need them.
const char *GetConfigValueInfo( ESteamNetworkingConfigValue eValue, ESteamNetworkingConfigDataType *pOutDataType, ESteamNetworkingConfigScope *pOutScope )
{
PRINT_DEBUG("TODO: %s\n", __FUNCTION__);
//TODO flat api
return NULL;
}
/// Return the lowest numbered configuration value available in the current environment. /// Return the lowest numbered configuration value available in the current environment.
ESteamNetworkingConfigValue GetFirstConfigValue() ESteamNetworkingConfigValue GetFirstConfigValue()
@ -385,20 +340,6 @@ ESteamNetworkingConfigValue GetFirstConfigValue()
return k_ESteamNetworkingConfig_Invalid; return k_ESteamNetworkingConfig_Invalid;
} }
/// Iterate the list of all configuration values in the current environment that it might
/// be possible to display or edit using a generic UI. To get the first iterable value,
/// pass k_ESteamNetworkingConfig_Invalid. Returns k_ESteamNetworkingConfig_Invalid
/// to signal end of list.
///
/// The bEnumerateDevVars argument can be used to include "dev" vars. These are vars that
/// are recommended to only be editable in "debug" or "dev" mode and typically should not be
/// shown in a retail environment where a malicious local user might use this to cheat.
ESteamNetworkingConfigValue IterateGenericEditableConfigValues( ESteamNetworkingConfigValue eCurrent, bool bEnumerateDevVars )
{
PRINT_DEBUG("TODO: %s\n", __FUNCTION__);
return k_ESteamNetworkingConfig_Invalid;
}
// String conversions. You'll usually access these using the respective // String conversions. You'll usually access these using the respective
// inline methods. // inline methods.
@ -560,13 +501,6 @@ bool SteamNetworkingIPAddr_ParseString( SteamNetworkingIPAddr *pAddr, const char
return valid; return valid;
} }
ESteamNetworkingFakeIPType SteamNetworkingIPAddr_GetFakeIPType( const SteamNetworkingIPAddr &addr )
{
PRINT_DEBUG("TODO: %s\n", __FUNCTION__);
return k_ESteamNetworkingFakeIPType_NotFake;
}
void SteamNetworkingIdentity_ToString( const SteamNetworkingIdentity &identity, char *buf, size_t cbBuf ) void SteamNetworkingIdentity_ToString( const SteamNetworkingIdentity &identity, char *buf, size_t cbBuf )
{ {
PRINT_DEBUG("Steam_Networking_Utils::SteamNetworkingIdentity_ToString\n"); PRINT_DEBUG("Steam_Networking_Utils::SteamNetworkingIdentity_ToString\n");

View File

@ -39,7 +39,6 @@ public ISteamUGC010,
public ISteamUGC012, public ISteamUGC012,
public ISteamUGC013, public ISteamUGC013,
public ISteamUGC014, public ISteamUGC014,
public ISteamUGC015,
public ISteamUGC public ISteamUGC
{ {
class Settings *settings; class Settings *settings;
@ -414,17 +413,6 @@ bool AddRequiredKeyValueTag( UGCQueryHandle_t handle, const char *pKey, const ch
return true; return true;
} }
bool SetTimeCreatedDateRange( UGCQueryHandle_t handle, RTime32 rtStart, RTime32 rtEnd )
{
PRINT_DEBUG("Steam_UGC::SetTimeCreatedDateRange\n");
return true;
}
bool SetTimeUpdatedDateRange( UGCQueryHandle_t handle, RTime32 rtStart, RTime32 rtEnd )
{
PRINT_DEBUG("Steam_UGC::SetTimeUpdatedDateRange\n");
return true;
}
// DEPRECATED - Use CreateQueryUGCDetailsRequest call above instead! // DEPRECATED - Use CreateQueryUGCDetailsRequest call above instead!
SteamAPICall_t RequestUGCDetails( PublishedFileId_t nPublishedFileID, uint32 unMaxAgeSeconds ) SteamAPICall_t RequestUGCDetails( PublishedFileId_t nPublishedFileID, uint32 unMaxAgeSeconds )

View File

@ -1 +0,0 @@
{"access_token":"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","bans":null,"display_name":"","expires_in":3600,"is_comply":true,"jflgs":0,"namespace":"PD2","namespace_roles":null,"permissions":[],"platform_id":"","platform_user_id":"","roles":null,"scope":"account commerce social publishing analytics","token_type":"Bearer","user_id":"","xuid":""}

View File

@ -416,81 +416,6 @@ enum EControllerActionOrigin
k_EControllerActionOrigin_XBoxOne_RightGrip_Upper, k_EControllerActionOrigin_XBoxOne_RightGrip_Upper,
k_EControllerActionOrigin_XBoxOne_Share, k_EControllerActionOrigin_XBoxOne_Share,
// Added in SDK 1.53
k_EControllerActionOrigin_SteamDeck_A,
k_EControllerActionOrigin_SteamDeck_B,
k_EControllerActionOrigin_SteamDeck_X,
k_EControllerActionOrigin_SteamDeck_Y,
k_EControllerActionOrigin_SteamDeck_L1,
k_EControllerActionOrigin_SteamDeck_R1,
k_EControllerActionOrigin_SteamDeck_Menu,
k_EControllerActionOrigin_SteamDeck_View,
k_EControllerActionOrigin_SteamDeck_LeftPad_Touch,
k_EControllerActionOrigin_SteamDeck_LeftPad_Swipe,
k_EControllerActionOrigin_SteamDeck_LeftPad_Click,
k_EControllerActionOrigin_SteamDeck_LeftPad_DPadNorth,
k_EControllerActionOrigin_SteamDeck_LeftPad_DPadSouth,
k_EControllerActionOrigin_SteamDeck_LeftPad_DPadWest,
k_EControllerActionOrigin_SteamDeck_LeftPad_DPadEast,
k_EControllerActionOrigin_SteamDeck_RightPad_Touch,
k_EControllerActionOrigin_SteamDeck_RightPad_Swipe,
k_EControllerActionOrigin_SteamDeck_RightPad_Click,
k_EControllerActionOrigin_SteamDeck_RightPad_DPadNorth,
k_EControllerActionOrigin_SteamDeck_RightPad_DPadSouth,
k_EControllerActionOrigin_SteamDeck_RightPad_DPadWest,
k_EControllerActionOrigin_SteamDeck_RightPad_DPadEast,
k_EControllerActionOrigin_SteamDeck_L2_SoftPull,
k_EControllerActionOrigin_SteamDeck_L2,
k_EControllerActionOrigin_SteamDeck_R2_SoftPull,
k_EControllerActionOrigin_SteamDeck_R2,
k_EControllerActionOrigin_SteamDeck_LeftStick_Move,
k_EControllerActionOrigin_SteamDeck_L3,
k_EControllerActionOrigin_SteamDeck_LeftStick_DPadNorth,
k_EControllerActionOrigin_SteamDeck_LeftStick_DPadSouth,
k_EControllerActionOrigin_SteamDeck_LeftStick_DPadWest,
k_EControllerActionOrigin_SteamDeck_LeftStick_DPadEast,
k_EControllerActionOrigin_SteamDeck_LeftStick_Touch,
k_EControllerActionOrigin_SteamDeck_RightStick_Move,
k_EControllerActionOrigin_SteamDeck_R3,
k_EControllerActionOrigin_SteamDeck_RightStick_DPadNorth,
k_EControllerActionOrigin_SteamDeck_RightStick_DPadSouth,
k_EControllerActionOrigin_SteamDeck_RightStick_DPadWest,
k_EControllerActionOrigin_SteamDeck_RightStick_DPadEast,
k_EControllerActionOrigin_SteamDeck_RightStick_Touch,
k_EControllerActionOrigin_SteamDeck_L4,
k_EControllerActionOrigin_SteamDeck_R4,
k_EControllerActionOrigin_SteamDeck_L5,
k_EControllerActionOrigin_SteamDeck_R5,
k_EControllerActionOrigin_SteamDeck_DPad_Move,
k_EControllerActionOrigin_SteamDeck_DPad_North,
k_EControllerActionOrigin_SteamDeck_DPad_South,
k_EControllerActionOrigin_SteamDeck_DPad_West,
k_EControllerActionOrigin_SteamDeck_DPad_East,
k_EControllerActionOrigin_SteamDeck_Gyro_Move,
k_EControllerActionOrigin_SteamDeck_Gyro_Pitch,
k_EControllerActionOrigin_SteamDeck_Gyro_Yaw,
k_EControllerActionOrigin_SteamDeck_Gyro_Roll,
k_EControllerActionOrigin_SteamDeck_Reserved1,
k_EControllerActionOrigin_SteamDeck_Reserved2,
k_EControllerActionOrigin_SteamDeck_Reserved3,
k_EControllerActionOrigin_SteamDeck_Reserved4,
k_EControllerActionOrigin_SteamDeck_Reserved5,
k_EControllerActionOrigin_SteamDeck_Reserved6,
k_EControllerActionOrigin_SteamDeck_Reserved7,
k_EControllerActionOrigin_SteamDeck_Reserved8,
k_EControllerActionOrigin_SteamDeck_Reserved9,
k_EControllerActionOrigin_SteamDeck_Reserved10,
k_EControllerActionOrigin_SteamDeck_Reserved11,
k_EControllerActionOrigin_SteamDeck_Reserved12,
k_EControllerActionOrigin_SteamDeck_Reserved13,
k_EControllerActionOrigin_SteamDeck_Reserved14,
k_EControllerActionOrigin_SteamDeck_Reserved15,
k_EControllerActionOrigin_SteamDeck_Reserved16,
k_EControllerActionOrigin_SteamDeck_Reserved17,
k_EControllerActionOrigin_SteamDeck_Reserved18,
k_EControllerActionOrigin_SteamDeck_Reserved19,
k_EControllerActionOrigin_SteamDeck_Reserved20,
k_EControllerActionOrigin_Count, // If Steam has added support for new controllers origins will go here. k_EControllerActionOrigin_Count, // If Steam has added support for new controllers origins will go here.
k_EControllerActionOrigin_MaximumPossibleValue = 32767, // Origins are currently a maximum of 16 bits. k_EControllerActionOrigin_MaximumPossibleValue = 32767, // Origins are currently a maximum of 16 bits.
}; };

View File

@ -163,7 +163,7 @@ STEAM_DEFINE_GAMESERVER_INTERFACE_ACCESSOR( ISteamHTTP *, SteamGameServerHTTP, S
struct HTTPRequestCompleted_t struct HTTPRequestCompleted_t
{ {
enum { k_iCallback = k_iSteamHTTPCallbacks + 1 }; enum { k_iCallback = k_iClientHTTPCallbacks + 1 };
// Handle value for the request that has completed. // Handle value for the request that has completed.
HTTPRequestHandle m_hRequest; HTTPRequestHandle m_hRequest;
@ -186,7 +186,7 @@ struct HTTPRequestCompleted_t
struct HTTPRequestHeadersReceived_t struct HTTPRequestHeadersReceived_t
{ {
enum { k_iCallback = k_iSteamHTTPCallbacks + 2 }; enum { k_iCallback = k_iClientHTTPCallbacks + 2 };
// Handle value for the request that has received headers. // Handle value for the request that has received headers.
HTTPRequestHandle m_hRequest; HTTPRequestHandle m_hRequest;
@ -198,7 +198,7 @@ struct HTTPRequestHeadersReceived_t
struct HTTPRequestDataReceived_t struct HTTPRequestDataReceived_t
{ {
enum { k_iCallback = k_iSteamHTTPCallbacks + 3 }; enum { k_iCallback = k_iClientHTTPCallbacks + 3 };
// Handle value for the request that has received data. // Handle value for the request that has received data.
HTTPRequestHandle m_hRequest; HTTPRequestHandle m_hRequest;

View File

@ -429,81 +429,6 @@ enum EInputActionOrigin
k_EInputActionOrigin_PS5_Reserved19, k_EInputActionOrigin_PS5_Reserved19,
k_EInputActionOrigin_PS5_Reserved20, k_EInputActionOrigin_PS5_Reserved20,
// Added in SDK 1.53
k_EInputActionOrigin_SteamDeck_A,
k_EInputActionOrigin_SteamDeck_B,
k_EInputActionOrigin_SteamDeck_X,
k_EInputActionOrigin_SteamDeck_Y,
k_EInputActionOrigin_SteamDeck_L1,
k_EInputActionOrigin_SteamDeck_R1,
k_EInputActionOrigin_SteamDeck_Menu,
k_EInputActionOrigin_SteamDeck_View,
k_EInputActionOrigin_SteamDeck_LeftPad_Touch,
k_EInputActionOrigin_SteamDeck_LeftPad_Swipe,
k_EInputActionOrigin_SteamDeck_LeftPad_Click,
k_EInputActionOrigin_SteamDeck_LeftPad_DPadNorth,
k_EInputActionOrigin_SteamDeck_LeftPad_DPadSouth,
k_EInputActionOrigin_SteamDeck_LeftPad_DPadWest,
k_EInputActionOrigin_SteamDeck_LeftPad_DPadEast,
k_EInputActionOrigin_SteamDeck_RightPad_Touch,
k_EInputActionOrigin_SteamDeck_RightPad_Swipe,
k_EInputActionOrigin_SteamDeck_RightPad_Click,
k_EInputActionOrigin_SteamDeck_RightPad_DPadNorth,
k_EInputActionOrigin_SteamDeck_RightPad_DPadSouth,
k_EInputActionOrigin_SteamDeck_RightPad_DPadWest,
k_EInputActionOrigin_SteamDeck_RightPad_DPadEast,
k_EInputActionOrigin_SteamDeck_L2_SoftPull,
k_EInputActionOrigin_SteamDeck_L2,
k_EInputActionOrigin_SteamDeck_R2_SoftPull,
k_EInputActionOrigin_SteamDeck_R2,
k_EInputActionOrigin_SteamDeck_LeftStick_Move,
k_EInputActionOrigin_SteamDeck_L3,
k_EInputActionOrigin_SteamDeck_LeftStick_DPadNorth,
k_EInputActionOrigin_SteamDeck_LeftStick_DPadSouth,
k_EInputActionOrigin_SteamDeck_LeftStick_DPadWest,
k_EInputActionOrigin_SteamDeck_LeftStick_DPadEast,
k_EInputActionOrigin_SteamDeck_LeftStick_Touch,
k_EInputActionOrigin_SteamDeck_RightStick_Move,
k_EInputActionOrigin_SteamDeck_R3,
k_EInputActionOrigin_SteamDeck_RightStick_DPadNorth,
k_EInputActionOrigin_SteamDeck_RightStick_DPadSouth,
k_EInputActionOrigin_SteamDeck_RightStick_DPadWest,
k_EInputActionOrigin_SteamDeck_RightStick_DPadEast,
k_EInputActionOrigin_SteamDeck_RightStick_Touch,
k_EInputActionOrigin_SteamDeck_L4,
k_EInputActionOrigin_SteamDeck_R4,
k_EInputActionOrigin_SteamDeck_L5,
k_EInputActionOrigin_SteamDeck_R5,
k_EInputActionOrigin_SteamDeck_DPad_Move,
k_EInputActionOrigin_SteamDeck_DPad_North,
k_EInputActionOrigin_SteamDeck_DPad_South,
k_EInputActionOrigin_SteamDeck_DPad_West,
k_EInputActionOrigin_SteamDeck_DPad_East,
k_EInputActionOrigin_SteamDeck_Gyro_Move,
k_EInputActionOrigin_SteamDeck_Gyro_Pitch,
k_EInputActionOrigin_SteamDeck_Gyro_Yaw,
k_EInputActionOrigin_SteamDeck_Gyro_Roll,
k_EInputActionOrigin_SteamDeck_Reserved1,
k_EInputActionOrigin_SteamDeck_Reserved2,
k_EInputActionOrigin_SteamDeck_Reserved3,
k_EInputActionOrigin_SteamDeck_Reserved4,
k_EInputActionOrigin_SteamDeck_Reserved5,
k_EInputActionOrigin_SteamDeck_Reserved6,
k_EInputActionOrigin_SteamDeck_Reserved7,
k_EInputActionOrigin_SteamDeck_Reserved8,
k_EInputActionOrigin_SteamDeck_Reserved9,
k_EInputActionOrigin_SteamDeck_Reserved10,
k_EInputActionOrigin_SteamDeck_Reserved11,
k_EInputActionOrigin_SteamDeck_Reserved12,
k_EInputActionOrigin_SteamDeck_Reserved13,
k_EInputActionOrigin_SteamDeck_Reserved14,
k_EInputActionOrigin_SteamDeck_Reserved15,
k_EInputActionOrigin_SteamDeck_Reserved16,
k_EInputActionOrigin_SteamDeck_Reserved17,
k_EInputActionOrigin_SteamDeck_Reserved18,
k_EInputActionOrigin_SteamDeck_Reserved19,
k_EInputActionOrigin_SteamDeck_Reserved20,
k_EInputActionOrigin_Count, // If Steam has added support for new controllers origins will go here. k_EInputActionOrigin_Count, // If Steam has added support for new controllers origins will go here.
k_EInputActionOrigin_MaximumPossibleValue = 32767, // Origins are currently a maximum of 16 bits. k_EInputActionOrigin_MaximumPossibleValue = 32767, // Origins are currently a maximum of 16 bits.
}; };
@ -577,7 +502,6 @@ enum ESteamInputType
k_ESteamInputType_MobileTouch, // Steam Link App On-screen Virtual Controller k_ESteamInputType_MobileTouch, // Steam Link App On-screen Virtual Controller
k_ESteamInputType_PS3Controller, // Currently uses PS4 Origins k_ESteamInputType_PS3Controller, // Currently uses PS4 Origins
k_ESteamInputType_PS5Controller, // Added in SDK 151 k_ESteamInputType_PS5Controller, // Added in SDK 151
k_ESteamInputType_SteamDeckController, // Added in SDK 153
k_ESteamInputType_Count, k_ESteamInputType_Count,
k_ESteamInputType_MaximumPossibleValue = 255, k_ESteamInputType_MaximumPossibleValue = 255,
}; };
@ -604,24 +528,9 @@ enum ESteamInputLEDFlag
// These values are passed into GetGlyphPNGForActionOrigin // These values are passed into GetGlyphPNGForActionOrigin
enum ESteamInputGlyphSize enum ESteamInputGlyphSize
{ {
k_ESteamInputGlyphSize_Small, // 32x32 pixels k_ESteamInputGlyphSize_Small,
k_ESteamInputGlyphSize_Medium, // 128x128 pixels k_ESteamInputGlyphSize_Medium,
k_ESteamInputGlyphSize_Large, // 256x256 pixels k_ESteamInputGlyphSize_Large,
k_ESteamInputGlyphSize_Count,
};
enum ESteamInputGlyphStyle
{
// Base-styles - cannot mix
ESteamInputGlyphStyle_Knockout = 0x0, // Face buttons will have colored labels/outlines on a knocked out background
// Rest of inputs will have white detail/borders on a knocked out background
ESteamInputGlyphStyle_Light = 0x1, // Black detail/borders on a white background
ESteamInputGlyphStyle_Dark = 0x2, // White detail/borders on a black background
// Modifiers
// Default ABXY/PS equivalent glyphs have a solid fill w/ color matching the physical buttons on the device
ESteamInputGlyphStyle_NeutralColorABXY = 0x10, // ABXY Buttons will match the base style color instead of their normal associated color
ESteamInputGlyphStyle_SolidABXY = 0x20, // ABXY Buttons will have a solid fill
}; };
enum ESteamInputActionEventType enum ESteamInputActionEventType
@ -690,18 +599,16 @@ struct SteamInputActionEvent_t
{ {
InputHandle_t controllerHandle; InputHandle_t controllerHandle;
ESteamInputActionEventType eEventType; ESteamInputActionEventType eEventType;
struct AnalogAction_t { union {
struct {
InputAnalogActionHandle_t actionHandle; InputAnalogActionHandle_t actionHandle;
InputAnalogActionData_t analogActionData; InputAnalogActionData_t analogActionData;
}; } analogAction;
struct DigitalAction_t { struct {
InputDigitalActionHandle_t actionHandle; InputDigitalActionHandle_t actionHandle;
InputDigitalActionData_t digitalActionData; InputDigitalActionData_t digitalActionData;
} digitalAction;
}; };
union {
AnalogAction_t analogAction;
DigitalAction_t digitalAction;
} x;
}; };
#pragma pack( pop ) #pragma pack( pop )
@ -919,7 +826,7 @@ public:
virtual uint16 GetSessionInputConfigurationSettings() = 0; virtual uint16 GetSessionInputConfigurationSettings() = 0;
}; };
#define STEAMINPUT_INTERFACE_VERSION "SteamInput006" #define STEAMINPUT_INTERFACE_VERSION "SteamInput005"
// Global interface accessor // Global interface accessor
inline ISteamInput *SteamInput(); inline ISteamInput *SteamInput();

View File

@ -1,216 +0,0 @@
#ifndef ISTEAMINPUT005_H
#define ISTEAMINPUT005_H
#ifdef STEAM_WIN32
#pragma once
#endif
class ISteamInput005
{
public:
// Init and Shutdown must be called when starting/ending use of this interface.
// if bExplicitlyCallRunFrame is called then you will need to manually call RunFrame
// each frame, otherwise Steam Input will updated when SteamAPI_RunCallbacks() is called
virtual bool Init( bool bExplicitlyCallRunFrame ) = 0;
virtual bool Shutdown() = 0;
// Set the absolute path to the Input Action Manifest file containing the in-game actions
// and file paths to the official configurations. Used in games that bundle Steam Input
// configurations inside of the game depot instead of using the Steam Workshop
virtual bool SetInputActionManifestFilePath( const char *pchInputActionManifestAbsolutePath ) = 0;
// Synchronize API state with the latest Steam Input action data available. This
// is performed automatically by SteamAPI_RunCallbacks, but for the absolute lowest
// possible latency, you call this directly before reading controller state.
// Note: This must be called from somewhere before GetConnectedControllers will
// return any handles
virtual void RunFrame( bool bReservedValue = true ) = 0;
// Waits on an IPC event from Steam sent when there is new data to be fetched from
// the data drop. Returns true when data was recievied before the timeout expires.
// Useful for games with a dedicated input thread
virtual bool BWaitForData( bool bWaitForever, uint32 unTimeout ) = 0;
// Returns true if new data has been received since the last time action data was accessed
// via GetDigitalActionData or GetAnalogActionData. The game will still need to call
// SteamInput()->RunFrame() or SteamAPI_RunCallbacks() before this to update the data stream
virtual bool BNewDataAvailable() = 0;
// Enumerate currently connected Steam Input enabled devices - developers can opt in controller by type (ex: Xbox/Playstation/etc) via
// the Steam Input settings in the Steamworks site or users can opt-in in their controller settings in Steam.
// handlesOut should point to a STEAM_INPUT_MAX_COUNT sized array of InputHandle_t handles
// Returns the number of handles written to handlesOut
virtual int GetConnectedControllers( STEAM_OUT_ARRAY_COUNT( STEAM_INPUT_MAX_COUNT, Receives list of connected controllers ) InputHandle_t *handlesOut ) = 0;
//-----------------------------------------------------------------------------
// CALLBACKS
//-----------------------------------------------------------------------------
// Controller configuration loaded - these callbacks will always fire if you have
// a handler. Note: this is called within either SteamInput()->RunFrame or by SteamAPI_RunCallbacks
STEAM_CALL_BACK( SteamInputConfigurationLoaded_t )
// Enable SteamInputDeviceConnected_t and SteamInputDeviceDisconnected_t callbacks.
// Each controller that is already connected will generate a device connected
// callback when you enable them
virtual void EnableDeviceCallbacks() = 0;
// Controller Connected - provides info about a single newly connected controller
// Note: this is called within either SteamInput()->RunFrame or by SteamAPI_RunCallbacks
STEAM_CALL_BACK( SteamInputDeviceConnected_t )
// Controller Disconnected - provides info about a single disconnected controller
// Note: this is called within either SteamInput()->RunFrame or by SteamAPI_RunCallbacks
STEAM_CALL_BACK( SteamInputDeviceDisconnected_t )
// Enable SteamInputActionEvent_t callbacks. Directly calls your callback function
// for lower latency than standard Steam callbacks. Supports one callback at a time.
// Note: this is called within either SteamInput()->RunFrame or by SteamAPI_RunCallbacks
virtual void EnableActionEventCallbacks( SteamInputActionEventCallbackPointer pCallback ) = 0;
//-----------------------------------------------------------------------------
// ACTION SETS
//-----------------------------------------------------------------------------
// Lookup the handle for an Action Set. Best to do this once on startup, and store the handles for all future API calls.
virtual InputActionSetHandle_t GetActionSetHandle( const char *pszActionSetName ) = 0;
// Reconfigure the controller to use the specified action set (ie 'Menu', 'Walk' or 'Drive')
// This is cheap, and can be safely called repeatedly. It's often easier to repeatedly call it in
// your state loops, instead of trying to place it in all of your state transitions.
virtual void ActivateActionSet( InputHandle_t inputHandle, InputActionSetHandle_t actionSetHandle ) = 0;
virtual InputActionSetHandle_t GetCurrentActionSet( InputHandle_t inputHandle ) = 0;
// ACTION SET LAYERS
virtual void ActivateActionSetLayer( InputHandle_t inputHandle, InputActionSetHandle_t actionSetLayerHandle ) = 0;
virtual void DeactivateActionSetLayer( InputHandle_t inputHandle, InputActionSetHandle_t actionSetLayerHandle ) = 0;
virtual void DeactivateAllActionSetLayers( InputHandle_t inputHandle ) = 0;
// Enumerate currently active layers.
// handlesOut should point to a STEAM_INPUT_MAX_ACTIVE_LAYERS sized array of InputActionSetHandle_t handles
// Returns the number of handles written to handlesOut
virtual int GetActiveActionSetLayers( InputHandle_t inputHandle, STEAM_OUT_ARRAY_COUNT( STEAM_INPUT_MAX_ACTIVE_LAYERS, Receives list of active layers ) InputActionSetHandle_t *handlesOut ) = 0;
//-----------------------------------------------------------------------------
// ACTIONS
//-----------------------------------------------------------------------------
// Lookup the handle for a digital action. Best to do this once on startup, and store the handles for all future API calls.
virtual InputDigitalActionHandle_t GetDigitalActionHandle( const char *pszActionName ) = 0;
// Returns the current state of the supplied digital game action
virtual InputDigitalActionData_t GetDigitalActionData( InputHandle_t inputHandle, InputDigitalActionHandle_t digitalActionHandle ) = 0;
// Get the origin(s) for a digital action within an action set. Returns the number of origins supplied in originsOut. Use this to display the appropriate on-screen prompt for the action.
// originsOut should point to a STEAM_INPUT_MAX_ORIGINS sized array of EInputActionOrigin handles. The EInputActionOrigin enum will get extended as support for new controller controllers gets added to
// the Steam client and will exceed the values from this header, please check bounds if you are using a look up table.
virtual int GetDigitalActionOrigins( InputHandle_t inputHandle, InputActionSetHandle_t actionSetHandle, InputDigitalActionHandle_t digitalActionHandle, STEAM_OUT_ARRAY_COUNT( STEAM_INPUT_MAX_ORIGINS, Receives list of action origins ) EInputActionOrigin *originsOut ) = 0;
// Returns a localized string (from Steam's language setting) for the user-facing action name corresponding to the specified handle
virtual const char *GetStringForDigitalActionName( InputDigitalActionHandle_t eActionHandle ) = 0;
// Lookup the handle for an analog action. Best to do this once on startup, and store the handles for all future API calls.
virtual InputAnalogActionHandle_t GetAnalogActionHandle( const char *pszActionName ) = 0;
// Returns the current state of these supplied analog game action
virtual InputAnalogActionData_t GetAnalogActionData( InputHandle_t inputHandle, InputAnalogActionHandle_t analogActionHandle ) = 0;
// Get the origin(s) for an analog action within an action set. Returns the number of origins supplied in originsOut. Use this to display the appropriate on-screen prompt for the action.
// originsOut should point to a STEAM_INPUT_MAX_ORIGINS sized array of EInputActionOrigin handles. The EInputActionOrigin enum will get extended as support for new controller controllers gets added to
// the Steam client and will exceed the values from this header, please check bounds if you are using a look up table.
virtual int GetAnalogActionOrigins( InputHandle_t inputHandle, InputActionSetHandle_t actionSetHandle, InputAnalogActionHandle_t analogActionHandle, STEAM_OUT_ARRAY_COUNT( STEAM_INPUT_MAX_ORIGINS, Receives list of action origins ) EInputActionOrigin *originsOut ) = 0;
// Get a local path to a PNG file for the provided origin's glyph.
virtual const char *GetGlyphPNGForActionOrigin( EInputActionOrigin eOrigin, ESteamInputGlyphSize eSize, uint32 unFlags ) = 0;
// Get a local path to a SVG file for the provided origin's glyph.
virtual const char *GetGlyphSVGForActionOrigin( EInputActionOrigin eOrigin, uint32 unFlags ) = 0;
// Get a local path to an older, Big Picture Mode-style PNG file for a particular origin
virtual const char *GetGlyphForActionOrigin_Legacy( EInputActionOrigin eOrigin ) = 0;
// Returns a localized string (from Steam's language setting) for the specified origin.
virtual const char *GetStringForActionOrigin( EInputActionOrigin eOrigin ) = 0;
// Returns a localized string (from Steam's language setting) for the user-facing action name corresponding to the specified handle
virtual const char *GetStringForAnalogActionName( InputAnalogActionHandle_t eActionHandle ) = 0;
// Stop analog momentum for the action if it is a mouse action in trackball mode
virtual void StopAnalogActionMomentum( InputHandle_t inputHandle, InputAnalogActionHandle_t eAction ) = 0;
// Returns raw motion data from the specified device
virtual InputMotionData_t GetMotionData( InputHandle_t inputHandle ) = 0;
//-----------------------------------------------------------------------------
// OUTPUTS
//-----------------------------------------------------------------------------
// Trigger a vibration event on supported controllers - Steam will translate these commands into haptic pulses for Steam Controllers
virtual void TriggerVibration( InputHandle_t inputHandle, unsigned short usLeftSpeed, unsigned short usRightSpeed ) = 0;
// Trigger a vibration event on supported controllers including Xbox trigger impulse rumble - Steam will translate these commands into haptic pulses for Steam Controllers
virtual void TriggerVibrationExtended( InputHandle_t inputHandle, unsigned short usLeftSpeed, unsigned short usRightSpeed, unsigned short usLeftTriggerSpeed, unsigned short usRightTriggerSpeed ) = 0;
// Send a haptic pulse, works on Steam Deck and Steam Controller devices
virtual void TriggerSimpleHapticEvent( InputHandle_t inputHandle, EControllerHapticLocation eHapticLocation, uint8 nIntensity, char nGainDB, uint8 nOtherIntensity, char nOtherGainDB ) = 0;
// Set the controller LED color on supported controllers. nFlags is a bitmask of values from ESteamInputLEDFlag - 0 will default to setting a color. Steam will handle
// the behavior on exit of your program so you don't need to try restore the default as you are shutting down
virtual void SetLEDColor( InputHandle_t inputHandle, uint8 nColorR, uint8 nColorG, uint8 nColorB, unsigned int nFlags ) = 0;
// Trigger a haptic pulse on a Steam Controller - if you are approximating rumble you may want to use TriggerVibration instead.
// Good uses for Haptic pulses include chimes, noises, or directional gameplay feedback (taking damage, footstep locations, etc).
virtual void Legacy_TriggerHapticPulse( InputHandle_t inputHandle, ESteamControllerPad eTargetPad, unsigned short usDurationMicroSec ) = 0;
// Trigger a haptic pulse with a duty cycle of usDurationMicroSec / usOffMicroSec, unRepeat times. If you are approximating rumble you may want to use TriggerVibration instead.
// nFlags is currently unused and reserved for future use.
virtual void Legacy_TriggerRepeatedHapticPulse( InputHandle_t inputHandle, ESteamControllerPad eTargetPad, unsigned short usDurationMicroSec, unsigned short usOffMicroSec, unsigned short unRepeat, unsigned int nFlags ) = 0;
//-----------------------------------------------------------------------------
// Utility functions available without using the rest of Steam Input API
//-----------------------------------------------------------------------------
// Invokes the Steam overlay and brings up the binding screen if the user is using Big Picture Mode
// If the user is not in Big Picture Mode it will open up the binding in a new window
virtual bool ShowBindingPanel( InputHandle_t inputHandle ) = 0;
// Returns the input type for a particular handle - unlike EInputActionOrigin which update with Steam and may return unrecognized values
// ESteamInputType will remain static and only return valid values from your SDK version
virtual ESteamInputType GetInputTypeForHandle( InputHandle_t inputHandle ) = 0;
// Returns the associated controller handle for the specified emulated gamepad - can be used with the above 2 functions
// to identify controllers presented to your game over Xinput. Returns 0 if the Xinput index isn't associated with Steam Input
virtual InputHandle_t GetControllerForGamepadIndex( int nIndex ) = 0;
// Returns the associated gamepad index for the specified controller, if emulating a gamepad or -1 if not associated with an Xinput index
virtual int GetGamepadIndexForController( InputHandle_t ulinputHandle ) = 0;
// Returns a localized string (from Steam's language setting) for the specified Xbox controller origin.
virtual const char *GetStringForXboxOrigin( EXboxOrigin eOrigin ) = 0;
// Get a local path to art for on-screen glyph for a particular Xbox controller origin
virtual const char *GetGlyphForXboxOrigin( EXboxOrigin eOrigin ) = 0;
// Get the equivalent ActionOrigin for a given Xbox controller origin this can be chained with GetGlyphForActionOrigin to provide future proof glyphs for
// non-Steam Input API action games. Note - this only translates the buttons directly and doesn't take into account any remapping a user has made in their configuration
virtual EInputActionOrigin GetActionOriginFromXboxOrigin( InputHandle_t inputHandle, EXboxOrigin eOrigin ) = 0;
// Convert an origin to another controller type - for inputs not present on the other controller type this will return k_EInputActionOrigin_None
// When a new input type is added you will be able to pass in k_ESteamInputType_Unknown and the closest origin that your version of the SDK recognized will be returned
// ex: if a Playstation 5 controller was released this function would return Playstation 4 origins.
virtual EInputActionOrigin TranslateActionOrigin( ESteamInputType eDestinationInputType, EInputActionOrigin eSourceOrigin ) = 0;
// Get the binding revision for a given device. Returns false if the handle was not valid or if a mapping is not yet loaded for the device
virtual bool GetDeviceBindingRevision( InputHandle_t inputHandle, int *pMajor, int *pMinor ) = 0;
// Get the Steam Remote Play session ID associated with a device, or 0 if there is no session associated with it
// See isteamremoteplay.h for more information on Steam Remote Play sessions
virtual uint32 GetRemotePlaySessionID( InputHandle_t inputHandle ) = 0;
// Get a bitmask of the Steam Input Configuration types opted in for the current session. Returns ESteamInputConfigurationEnableType values.?
// Note: user can override the settings from the Steamworks Partner site so the returned values may not exactly match your default configuration
virtual uint16 GetSessionInputConfigurationSettings() = 0;
};
#endif //ISTEAMINPUT005_H

View File

@ -387,7 +387,7 @@ STEAM_DEFINE_GAMESERVER_INTERFACE_ACCESSOR( ISteamInventory *, SteamGameServerIn
// always be exactly one callback per handle. // always be exactly one callback per handle.
struct SteamInventoryResultReady_t struct SteamInventoryResultReady_t
{ {
enum { k_iCallback = k_iSteamInventoryCallbacks + 0 }; enum { k_iCallback = k_iClientInventoryCallbacks + 0 };
SteamInventoryResult_t m_handle; SteamInventoryResult_t m_handle;
EResult m_result; EResult m_result;
}; };
@ -402,7 +402,7 @@ struct SteamInventoryResultReady_t
// afterwards; this is an additional notification for your convenience. // afterwards; this is an additional notification for your convenience.
struct SteamInventoryFullUpdate_t struct SteamInventoryFullUpdate_t
{ {
enum { k_iCallback = k_iSteamInventoryCallbacks + 1 }; enum { k_iCallback = k_iClientInventoryCallbacks + 1 };
SteamInventoryResult_t m_handle; SteamInventoryResult_t m_handle;
}; };
@ -413,13 +413,13 @@ struct SteamInventoryFullUpdate_t
// a definition update in order to process results from the server. // a definition update in order to process results from the server.
struct SteamInventoryDefinitionUpdate_t struct SteamInventoryDefinitionUpdate_t
{ {
enum { k_iCallback = k_iSteamInventoryCallbacks + 2 }; enum { k_iCallback = k_iClientInventoryCallbacks + 2 };
}; };
// Returned // Returned
struct SteamInventoryEligiblePromoItemDefIDs_t struct SteamInventoryEligiblePromoItemDefIDs_t
{ {
enum { k_iCallback = k_iSteamInventoryCallbacks + 3 }; enum { k_iCallback = k_iClientInventoryCallbacks + 3 };
EResult m_result; EResult m_result;
CSteamID m_steamID; CSteamID m_steamID;
int m_numEligiblePromoItemDefs; int m_numEligiblePromoItemDefs;
@ -429,7 +429,7 @@ struct SteamInventoryEligiblePromoItemDefIDs_t
// Triggered from StartPurchase call // Triggered from StartPurchase call
struct SteamInventoryStartPurchaseResult_t struct SteamInventoryStartPurchaseResult_t
{ {
enum { k_iCallback = k_iSteamInventoryCallbacks + 4 }; enum { k_iCallback = k_iClientInventoryCallbacks + 4 };
EResult m_result; EResult m_result;
uint64 m_ulOrderID; uint64 m_ulOrderID;
uint64 m_ulTransID; uint64 m_ulTransID;
@ -439,7 +439,7 @@ struct SteamInventoryStartPurchaseResult_t
// Triggered from RequestPrices // Triggered from RequestPrices
struct SteamInventoryRequestPricesResult_t struct SteamInventoryRequestPricesResult_t
{ {
enum { k_iCallback = k_iSteamInventoryCallbacks + 5 }; enum { k_iCallback = k_iClientInventoryCallbacks + 5 };
EResult m_result; EResult m_result;
char m_rgchCurrency[4]; char m_rgchCurrency[4];
}; };

View File

@ -73,12 +73,10 @@ public:
/// ///
/// Returns: /// Returns:
/// - k_EREsultOK on success. /// - k_EREsultOK on success.
/// - k_EResultNoConnection, if the session has failed or was closed by the peer and /// - k_EResultNoConnection will be returned if the session has failed or was closed by the peer,
/// k_nSteamNetworkingSend_AutoRestartBrokenSession was not specified. (You can /// and k_nSteamNetworkingSend_AutoRestartBrokenSession is not used. (You can use
/// use GetSessionConnectionInfo to get the details.) In order to acknowledge the /// GetSessionConnectionInfo to get the details.) In order to acknowledge the broken session
/// broken session and start a new one, you must call CloseSessionWithUser, or you may /// and start a new one, you must call CloseSessionWithUser
/// repeat the call with k_nSteamNetworkingSend_AutoRestartBrokenSession. See
/// k_nSteamNetworkingSend_AutoRestartBrokenSession for more details.
/// - See ISteamNetworkingSockets::SendMessageToConnection for more possible return values /// - See ISteamNetworkingSockets::SendMessageToConnection for more possible return values
virtual EResult SendMessageToUser( const SteamNetworkingIdentity &identityRemote, const void *pubData, uint32 cubData, int nSendFlags, int nRemoteChannel ) = 0; virtual EResult SendMessageToUser( const SteamNetworkingIdentity &identityRemote, const void *pubData, uint32 cubData, int nSendFlags, int nRemoteChannel ) = 0;
@ -122,7 +120,7 @@ public:
/// you do not need the corresponding details. Note that sessions time out after a while, /// you do not need the corresponding details. Note that sessions time out after a while,
/// so if a connection fails, or SendMessageToUser returns k_EResultNoConnection, you cannot wait /// so if a connection fails, or SendMessageToUser returns k_EResultNoConnection, you cannot wait
/// indefinitely to obtain the reason for failure. /// indefinitely to obtain the reason for failure.
virtual ESteamNetworkingConnectionState GetSessionConnectionInfo( const SteamNetworkingIdentity &identityRemote, SteamNetConnectionInfo_t *pConnectionInfo, SteamNetConnectionRealTimeStatus_t *pQuickStatus ) = 0; virtual ESteamNetworkingConnectionState GetSessionConnectionInfo( const SteamNetworkingIdentity &identityRemote, SteamNetConnectionInfo_t *pConnectionInfo, SteamNetworkingQuickConnectionStatus *pQuickStatus ) = 0;
}; };
#define STEAMNETWORKINGMESSAGES_INTERFACE_VERSION "SteamNetworkingMessages002" #define STEAMNETWORKINGMESSAGES_INTERFACE_VERSION "SteamNetworkingMessages002"

View File

@ -11,10 +11,9 @@ struct SteamNetAuthenticationStatus_t;
class ISteamNetworkingConnectionCustomSignaling; class ISteamNetworkingConnectionCustomSignaling;
class ISteamNetworkingCustomSignalingRecvContext; class ISteamNetworkingCustomSignalingRecvContext;
struct SteamNetworkingFakeIPResult_t;
class ISteamNetworkingConnectionSignaling; class ISteamNetworkingConnectionSignaling;
class ISteamNetworkingSignalingRecvContext; class ISteamNetworkingSignalingRecvContext;
class ISteamNetworkingFakeUDPPort;
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
/// Lower level networking API. /// Lower level networking API.
@ -209,7 +208,7 @@ public:
/// WARNING: Be *very careful* when using the value provided in callbacks structs. /// WARNING: Be *very careful* when using the value provided in callbacks structs.
/// Callbacks are queued, and the value that you will receive in your /// Callbacks are queued, and the value that you will receive in your
/// callback is the userdata that was effective at the time the callback /// callback is the userdata that was effective at the time the callback
/// was queued. There are subtle race conditions that can hapen if you /// was queued. There are subtle race conditions that can happen if you
/// don't understand this! /// don't understand this!
/// ///
/// If any incoming messages for this connection are queued, the userdata /// If any incoming messages for this connection are queued, the userdata
@ -340,21 +339,8 @@ public:
virtual bool GetConnectionInfo( HSteamNetConnection hConn, SteamNetConnectionInfo_t *pInfo ) = 0; virtual bool GetConnectionInfo( HSteamNetConnection hConn, SteamNetConnectionInfo_t *pInfo ) = 0;
/// Returns a small set of information about the real-time state of the connection /// Returns a small set of information about the real-time state of the connection
/// and the queue status of each lane. /// Returns false if the connection handle is invalid, or the connection has ended.
/// virtual bool GetQuickConnectionStatus( HSteamNetConnection hConn, SteamNetworkingQuickConnectionStatus *pStats ) = 0;
/// - pStatus may be NULL if the information is not desired. (E.g. you are only interested
/// in the lane information.)
/// - On entry, nLanes specifies the length of the pLanes array. This may be 0
/// if you do not wish to receive any lane data. It's OK for this to be smaller than
/// the total number of configured lanes.
/// - pLanes points to an array that will receive lane-specific info. It can be NULL
/// if this is not needed.
///
/// Return value:
/// - k_EResultNoConnection - connection handle is invalid or connection has been closed.
/// - k_EResultInvalidParam - nLanes is bad
virtual EResult GetConnectionRealTimeStatus( HSteamNetConnection hConn, SteamNetConnectionRealTimeStatus_t *pStatus,
int nLanes, SteamNetConnectionRealTimeLaneStatus_t *pLanes ) = 0;
/// Returns detailed connection stats in text format. Useful /// Returns detailed connection stats in text format. Useful
/// for dumping to a log, etc. /// for dumping to a log, etc.
@ -394,80 +380,6 @@ public:
/// actual bound loopback port. Otherwise, the port will be zero. /// actual bound loopback port. Otherwise, the port will be zero.
virtual bool CreateSocketPair( HSteamNetConnection *pOutConnection1, HSteamNetConnection *pOutConnection2, bool bUseNetworkLoopback, const SteamNetworkingIdentity *pIdentity1, const SteamNetworkingIdentity *pIdentity2 ) = 0; virtual bool CreateSocketPair( HSteamNetConnection *pOutConnection1, HSteamNetConnection *pOutConnection2, bool bUseNetworkLoopback, const SteamNetworkingIdentity *pIdentity1, const SteamNetworkingIdentity *pIdentity2 ) = 0;
/// Configure multiple outbound messages streams ("lanes") on a connection, and
/// control head-of-line blocking between them. Messages within a given lane
/// are always sent in the order they are queued, but messages from different
/// lanes may be sent out of order. Each lane has its own message number
/// sequence. The first message sent on each lane will be assigned the number 1.
///
/// Each lane has a "priority". Lower priority lanes will only be processed
/// when all higher-priority lanes are empty. The magnitudes of the priority
/// values are not relevant, only their sort order. Higher numeric values
/// take priority over lower numeric values.
///
/// Each lane also is assigned a weight, which controls the approximate proportion
/// of the bandwidth that will be consumed by the lane, relative to other lanes
/// of the same priority. (This is assuming the lane stays busy. An idle lane
/// does not build up "credits" to be be spent once a message is queued.)
/// This value is only meaningful as a proportion, relative to other lanes with
/// the same priority. For lanes with different priorities, the strict priority
/// order will prevail, and their weights relative to each other are not relevant.
/// Thus, if a lane has a unique priority value, the weight value for that lane is
/// not relevant.
///
/// Example: 3 lanes, with priorities [ 0, 10, 10 ] and weights [ (NA), 20, 5 ].
/// Messages sent on the first will always be sent first, before messages in the
/// other two lanes. Its weight value is irrelevant, since there are no other
/// lanes with priority=0. The other two lanes will share bandwidth, with the second
/// and third lanes sharing bandwidth using a ratio of approximately 4:1.
/// (The weights [ NA, 4, 1 ] would be equivalent.)
///
/// Notes:
/// - At the time of this writing, some code has performance cost that is linear
/// in the number of lanes, so keep the number of lanes to an absolute minimum.
/// 3 or so is fine; >8 is a lot. The max number of lanes on Steam is 255,
/// which is a very large number and not recommended! If you are compiling this
/// library from source, see STEAMNETWORKINGSOCKETS_MAX_LANES.)
/// - Lane priority values may be any int. Their absolute value is not relevant,
/// only the order matters.
/// - Weights must be positive, and due to implementation details, they are restricted
/// to 16-bit values. The absolute magnitudes don't matter, just the proportions.
/// - Messages sent on a lane index other than 0 have a small overhead on the wire,
/// so for maximum wire efficiency, lane 0 should be the "most common" lane, regardless
/// of priorities or weights.
/// - A connection has a single lane by default. Calling this function with
/// nNumLanes=1 is legal, but pointless, since the priority and weight values are
/// irrelevant in that case.
/// - You may reconfigure connection lanes at any time, however reducing the number of
/// lanes is not allowed.
/// - Reconfiguring lanes might restart any bandwidth sharing balancing. Usually you
/// will call this function once, near the start of the connection, perhaps after
/// exchanging a few messages.
/// - To assign all lanes the same priority, you may use pLanePriorities=NULL.
/// - If you wish all lanes with the same priority to share bandwidth equally (or
/// if no two lanes have the same priority value, and thus priority values are
/// irrelevant), you may use pLaneWeights=NULL
/// - Priorities and weights determine the order that messages are SENT on the wire.
/// There are NO GUARANTEES on the order that messages are RECEIVED! Due to packet
/// loss, out-of-order delivery, and subtle details of packet serialization, messages
/// might still be received slightly out-of-order! The *only* strong guarantee is that
/// *reliable* messages on the *same lane* will be delivered in the order they are sent.
/// - Each host configures the lanes for the packets they send; the lanes for the flow
/// in one direction are completely unrelated to the lanes in the opposite direction.
///
/// Return value:
/// - k_EResultNoConnection - bad hConn
/// - k_EResultInvalidParam - Invalid number of lanes, bad weights, or you tried to reduce the number of lanes
/// - k_EResultInvalidState - Connection is already dead, etc
///
/// See also:
/// SteamNetworkingMessage_t::m_idxLane
virtual EResult ConfigureConnectionLanes( HSteamNetConnection hConn, int nNumLanes, const int *pLanePriorities, const uint16 *pLaneWeights ) = 0;
//
// Identity and authentication
//
/// Get the identity assigned to this interface. /// Get the identity assigned to this interface.
/// E.g. on Steam, this is the user's SteamID, or for the gameserver interface, the SteamID assigned /// E.g. on Steam, this is the user's SteamID, or for the gameserver interface, the SteamID assigned
/// to the gameserver. Returns false and sets the result to an invalid identity if we don't know /// to the gameserver. Returns false and sets the result to an invalid identity if we don't know
@ -782,165 +694,36 @@ public:
/// SteamDatagram_CreateCert. /// SteamDatagram_CreateCert.
virtual bool SetCertificate( const void *pCertificate, int cbCertificate, SteamNetworkingErrMsg &errMsg ) = 0; virtual bool SetCertificate( const void *pCertificate, int cbCertificate, SteamNetworkingErrMsg &errMsg ) = 0;
/// Reset the identity associated with this instance.
/// Any open connections are closed. Any previous certificates, etc are discarded.
/// You can pass a specific identity that you want to use, or you can pass NULL,
/// in which case the identity will be invalid until you set it using SetCertificate
///
/// NOTE: This function is not actually supported on Steam! It is included
/// for use on other platforms where the active user can sign out and
/// a new user can sign in.
virtual void ResetIdentity( const SteamNetworkingIdentity *pIdentity ) = 0;
//
// Misc
//
/// Invoke all callback functions queued for this interface. /// Invoke all callback functions queued for this interface.
/// See k_ESteamNetworkingConfig_Callback_ConnectionStatusChanged, etc /// See k_ESteamNetworkingConfig_Callback_ConnectionStatusChanged, etc
/// ///
/// You don't need to call this if you are using Steam's callback dispatch /// You don't need to call this if you are using Steam's callback dispatch
/// mechanism (SteamAPI_RunCallbacks and SteamGameserver_RunCallbacks). /// mechanism (SteamAPI_RunCallbacks and SteamGameserver_RunCallbacks).
virtual void RunCallbacks() = 0; virtual void RunCallbacks() = 0;
//
// "FakeIP" system.
//
// A FakeIP is essentially a temporary, arbitrary identifier that
// happens to be a valid IPv4 address. The purpose of this system is to make it
// easy to integrate with existing code that identifies hosts using IPv4 addresses.
// The FakeIP address will never actually be used to send or receive any packets
// on the Internet, it is strictly an identifier.
//
// FakeIP addresses are designed to (hopefully) pass through existing code as
// transparently as possible, while conflicting with "real" addresses that might
// be in use on networks (both the Internet and LANs) in the same code as little
// as possible. At the time this comment is being written, they come from the
// 169.254.0.0/16 range, and the port number will always be >1024. HOWEVER,
// this is subject to change! Do not make assumptions about these addresses,
// or your code might break in the future. In particular, you should use
// functions such as ISteamNetworkingUtils::IsFakeIP to determine if an IP
// address is a "fake" one used by this system.
//
/// Begin asynchronous process of allocating a fake IPv4 address that other
/// peers can use to contact us via P2P. IP addresses returned by this
/// function are globally unique for a given appid.
///
/// nNumPorts is the numbers of ports you wish to reserve. This is useful
/// for the same reason that listening on multiple UDP ports is useful for
/// different types of traffic. Because these allocations come from a global
/// namespace, there is a relatively strict limit on the maximum number of
/// ports you may request. (At the time of this writing, the limit is 4.)
/// The Port assignments are *not* guaranteed to have any particular order
/// or relationship! Do *not* assume they are contiguous, even though that
/// may often occur in practice.
///
/// Returns false if a request was already in progress, true if a new request
/// was started. A SteamNetworkingFakeIPResult_t will be posted when the request
/// completes.
///
/// For gameservers, you *must* call this after initializing the SDK but before
/// beginning login. Steam needs to know in advance that FakeIP will be used.
/// Everywhere your public IP would normally appear (such as the server browser) will be
/// replaced by the FakeIP, and the fake port at index 0. The request is actually queued
/// until the logon completes, so you must not wait until the allocation completes
/// before logging in. Except for trivial failures that can be detected locally
/// (e.g. invalid parameter), a SteamNetworkingFakeIPResult_t callback (whether success or
/// failure) will not be posted until after we have logged in. Furthermore, it is assumed
/// that FakeIP allocation is essential for your application to function, and so failure
/// will not be reported until *several* retries have been attempted. This process may
/// last several minutes. It is *highly* recommended to treat failure as fatal.
///
/// To communicate using a connection-oriented (TCP-style) API:
/// - Server creates a listen socket using CreateListenSocketP2PFakeIP
/// - Client connects using ConnectByIPAddress, passing in the FakeIP address.
/// - The connection will behave mostly like a P2P connection. The identities
/// that appear in SteamNetConnectionInfo_t will be the FakeIP identity until
/// we know the real identity. Then it will be the real identity. If the
/// SteamNetConnectionInfo_t::m_addrRemote is valid, it will be a real IPv4
/// address of a NAT-punched connection. Otherwise, it will not be valid.
///
/// To communicate using an ad-hoc sendto/recv from (UDP-style) API,
/// use CreateFakeUDPPort.
virtual bool BeginAsyncRequestFakeIP( int nNumPorts ) = 0;
/// Return info about the FakeIP and port(s) that we have been assigned,
/// if any. idxFirstPort is currently reserved and must be zero.
/// Make sure and check SteamNetworkingFakeIPResult_t::m_eResult
virtual void GetFakeIP( int idxFirstPort, SteamNetworkingFakeIPResult_t *pInfo ) = 0;
/// Create a listen socket that will listen for P2P connections sent
/// to our FakeIP. A peer can initiate connections to this listen
/// socket by calling ConnectByIPAddress.
///
/// idxFakePort refers to the *index* of the fake port requested,
/// not the actual port number. For example, pass 0 to refer to the
/// first port in the reservation. You must call this only after calling
/// BeginAsyncRequestFakeIP. However, you do not need to wait for the
/// request to complete before creating the listen socket.
virtual HSteamListenSocket CreateListenSocketP2PFakeIP( int idxFakePort, int nOptions, const SteamNetworkingConfigValue_t *pOptions ) = 0;
/// If the connection was initiated using the "FakeIP" system, then we
/// we can get an IP address for the remote host. If the remote host had
/// a global FakeIP at the time the connection was established, this
/// function will return that global IP. Otherwise, a FakeIP that is
/// unique locally will be allocated from the local FakeIP address space,
/// and that will be returned.
///
/// The allocation of local FakeIPs attempts to assign addresses in
/// a consistent manner. If multiple connections are made to the
/// same remote host, they *probably* will return the same FakeIP.
/// However, since the namespace is limited, this cannot be guaranteed.
///
/// On failure, returns:
/// - k_EResultInvalidParam: invalid connection handle
/// - k_EResultIPNotFound: This connection wasn't made using FakeIP system
virtual EResult GetRemoteFakeIPForConnection( HSteamNetConnection hConn, SteamNetworkingIPAddr *pOutAddr ) = 0;
/// Get an interface that can be used like a UDP port to send/receive
/// datagrams to a FakeIP address. This is intended to make it easy
/// to port existing UDP-based code to take advantage of SDR.
///
/// idxFakeServerPort refers to the *index* of the port allocated using
/// BeginAsyncRequestFakeIP and is used to create "server" ports. You may
/// call this before the allocation has completed. However, any attempts
/// to send packets will fail until the allocation has succeeded. When
/// the peer receives packets sent from this interface, the from address
/// of the packet will be the globally-unique FakeIP. If you call this
/// function multiple times and pass the same (nonnegative) fake port index,
/// the same object will be returned, and this object is not reference counted.
///
/// To create a "client" port (e.g. the equivalent of an ephemeral UDP port)
/// pass -1. In this case, a distinct object will be returned for each call.
/// When the peer receives packets sent from this interface, the peer will
/// assign a FakeIP from its own locally-controlled namespace.
virtual ISteamNetworkingFakeUDPPort *CreateFakeUDPPort( int idxFakeServerPort ) = 0;
protected: protected:
// ~ISteamNetworkingSockets(); // Silence some warnings // ~ISteamNetworkingSockets(); // Silence some warnings
}; };
#define STEAMNETWORKINGSOCKETS_INTERFACE_VERSION "SteamNetworkingSockets012" #define STEAMNETWORKINGSOCKETS_INTERFACE_VERSION "SteamNetworkingSockets009"
// Global accessors // Global accessors
// Using standalone lib // Using standalone lib
#ifdef STEAMNETWORKINGSOCKETS_STANDALONELIB #ifdef STEAMNETWORKINGSOCKETS_STANDALONELIB
// Standalone lib. // Standalone lib.
static_assert( STEAMNETWORKINGSOCKETS_INTERFACE_VERSION[24] == '2', "Version mismatch" ); static_assert( STEAMNETWORKINGSOCKETS_INTERFACE_VERSION[24] == '9', "Version mismatch" );
STEAMNETWORKINGSOCKETS_INTERFACE ISteamNetworkingSockets *SteamNetworkingSockets_LibV12(); STEAMNETWORKINGSOCKETS_INTERFACE ISteamNetworkingSockets *SteamNetworkingSockets_LibV9();
inline ISteamNetworkingSockets *SteamNetworkingSockets_Lib() { return SteamNetworkingSockets_LibV12(); } inline ISteamNetworkingSockets *SteamNetworkingSockets_Lib() { return SteamNetworkingSockets_LibV9(); }
// If running in context of steam, we also define a gameserver instance. // If running in context of steam, we also define a gameserver instance.
#ifdef STEAMNETWORKINGSOCKETS_STEAM #ifdef STEAMNETWORKINGSOCKETS_STEAM
STEAMNETWORKINGSOCKETS_INTERFACE ISteamNetworkingSockets *SteamGameServerNetworkingSockets_LibV12(); STEAMNETWORKINGSOCKETS_INTERFACE ISteamNetworkingSockets *SteamGameServerNetworkingSockets_LibV9();
inline ISteamNetworkingSockets *SteamGameServerNetworkingSockets_Lib() { return SteamGameServerNetworkingSockets_LibV12(); } inline ISteamNetworkingSockets *SteamGameServerNetworkingSockets_Lib() { return SteamGameServerNetworkingSockets_LibV9(); }
#endif #endif
#ifndef STEAMNETWORKINGSOCKETS_STEAMAPI #ifndef STEAMNETWORKINGSOCKETS_STEAMAPI
inline ISteamNetworkingSockets *SteamNetworkingSockets() { return SteamNetworkingSockets_LibV12(); } inline ISteamNetworkingSockets *SteamNetworkingSockets() { return SteamNetworkingSockets_LibV9(); }
#ifdef STEAMNETWORKINGSOCKETS_STEAM #ifdef STEAMNETWORKINGSOCKETS_STEAM
inline ISteamNetworkingSockets *SteamGameServerNetworkingSockets() { return SteamGameServerNetworkingSockets_LibV12(); } inline ISteamNetworkingSockets *SteamGameServerNetworkingSockets() { return SteamGameServerNetworkingSockets_LibV9(); }
#endif #endif
#endif #endif
#endif #endif

View File

@ -130,7 +130,7 @@ public:
/// currently answer the question for some other reason. /// currently answer the question for some other reason.
/// ///
/// Do you need to be able to do this from a backend/matchmaking server? /// Do you need to be able to do this from a backend/matchmaking server?
/// You are looking for the "game coordinator" library. /// You are looking for the "ticketgen" library.
virtual int EstimatePingTimeBetweenTwoLocations( const SteamNetworkPingLocation_t &location1, const SteamNetworkPingLocation_t &location2 ) = 0; virtual int EstimatePingTimeBetweenTwoLocations( const SteamNetworkPingLocation_t &location1, const SteamNetworkPingLocation_t &location2 ) = 0;
/// Same as EstimatePingTime, but assumes that one location is the local host. /// Same as EstimatePingTime, but assumes that one location is the local host.
@ -241,32 +241,6 @@ public:
/// Steamworks calls from within the handler. /// Steamworks calls from within the handler.
virtual void SetDebugOutputFunction( ESteamNetworkingSocketsDebugOutputType eDetailLevel, FSteamNetworkingSocketsDebugOutput pfnFunc ) = 0; virtual void SetDebugOutputFunction( ESteamNetworkingSocketsDebugOutputType eDetailLevel, FSteamNetworkingSocketsDebugOutput pfnFunc ) = 0;
//
// Fake IP
//
// Useful for interfacing with code that assumes peers are identified using an IPv4 address
//
/// Return true if an IPv4 address is one that might be used as a "fake" one.
/// This function is fast; it just does some logical tests on the IP and does
/// not need to do any lookup operations.
inline bool IsFakeIPv4( uint32 nIPv4 ) { return GetIPv4FakeIPType( nIPv4 ) > k_ESteamNetworkingFakeIPType_NotFake; }
virtual ESteamNetworkingFakeIPType GetIPv4FakeIPType( uint32 nIPv4 ) = 0;
/// Get the real identity associated with a given FakeIP.
///
/// On failure, returns:
/// - k_EResultInvalidParam: the IP is not a FakeIP.
/// - k_EResultNoMatch: we don't recognize that FakeIP and don't know the corresponding identity.
///
/// FakeIP's used by active connections, or the FakeIPs assigned to local identities,
/// will always work. FakeIPs for recently destroyed connections will continue to
/// return results for a little while, but not forever. At some point, we will forget
/// FakeIPs to save space. It's reasonably safe to assume that you can read back the
/// real identity of a connection very soon after it is destroyed. But do not wait
/// indefinitely.
virtual EResult GetRealIdentityForFakeIP( const SteamNetworkingIPAddr &fakeIP, SteamNetworkingIdentity *pOutRealIdentity ) = 0;
// //
// Set and get configuration values, see ESteamNetworkingConfigValue for individual descriptions. // Set and get configuration values, see ESteamNetworkingConfigValue for individual descriptions.
// //
@ -289,7 +263,6 @@ public:
bool SetGlobalCallback_SteamNetConnectionStatusChanged( FnSteamNetConnectionStatusChanged fnCallback ); bool SetGlobalCallback_SteamNetConnectionStatusChanged( FnSteamNetConnectionStatusChanged fnCallback );
bool SetGlobalCallback_SteamNetAuthenticationStatusChanged( FnSteamNetAuthenticationStatusChanged fnCallback ); bool SetGlobalCallback_SteamNetAuthenticationStatusChanged( FnSteamNetAuthenticationStatusChanged fnCallback );
bool SetGlobalCallback_SteamRelayNetworkStatusChanged( FnSteamRelayNetworkStatusChanged fnCallback ); bool SetGlobalCallback_SteamRelayNetworkStatusChanged( FnSteamRelayNetworkStatusChanged fnCallback );
bool SetGlobalCallback_FakeIPResult( FnSteamNetworkingFakeIPResult fnCallback );
bool SetGlobalCallback_MessagesSessionRequest( FnSteamNetworkingMessagesSessionRequest fnCallback ); bool SetGlobalCallback_MessagesSessionRequest( FnSteamNetworkingMessagesSessionRequest fnCallback );
bool SetGlobalCallback_MessagesSessionFailed( FnSteamNetworkingMessagesSessionFailed fnCallback ); bool SetGlobalCallback_MessagesSessionFailed( FnSteamNetworkingMessagesSessionFailed fnCallback );
@ -322,48 +295,41 @@ public:
virtual ESteamNetworkingGetConfigValueResult GetConfigValue( ESteamNetworkingConfigValue eValue, ESteamNetworkingConfigScope eScopeType, intptr_t scopeObj, virtual ESteamNetworkingGetConfigValueResult GetConfigValue( ESteamNetworkingConfigValue eValue, ESteamNetworkingConfigScope eScopeType, intptr_t scopeObj,
ESteamNetworkingConfigDataType *pOutDataType, void *pResult, size_t *cbResult ) = 0; ESteamNetworkingConfigDataType *pOutDataType, void *pResult, size_t *cbResult ) = 0;
/// Get info about a configuration value. Returns the name of the value, /// Returns info about a configuration value. Returns false if the value does not exist.
/// or NULL if the value doesn't exist. Other output parameters can be NULL /// pOutNextValue can be used to iterate through all of the known configuration values.
/// if you do not need them. /// (Use GetFirstConfigValue() to begin the iteration, will be k_ESteamNetworkingConfig_Invalid on the last value)
virtual const char *GetConfigValueInfo( ESteamNetworkingConfigValue eValue, ESteamNetworkingConfigDataType *pOutDataType, /// Any of the output parameters can be NULL if you do not need that information.
ESteamNetworkingConfigScope *pOutScope ) = 0;
/// Iterate the list of all configuration values in the current environment that it might
/// be possible to display or edit using a generic UI. To get the first iterable value,
/// pass k_ESteamNetworkingConfig_Invalid. Returns k_ESteamNetworkingConfig_Invalid
/// to signal end of list.
/// ///
/// The bEnumerateDevVars argument can be used to include "dev" vars. These are vars that /// See k_ESteamNetworkingConfig_EnumerateDevVars for some more info about "dev" variables,
/// are recommended to only be editable in "debug" or "dev" mode and typically should not be /// which are usually excluded from the set of variables enumerated using this function.
/// shown in a retail environment where a malicious local user might use this to cheat. virtual bool GetConfigValueInfo( ESteamNetworkingConfigValue eValue, const char **pOutName, ESteamNetworkingConfigDataType *pOutDataType, ESteamNetworkingConfigScope *pOutScope, ESteamNetworkingConfigValue *pOutNextValue ) = 0;
virtual ESteamNetworkingConfigValue IterateGenericEditableConfigValues( ESteamNetworkingConfigValue eCurrent, bool bEnumerateDevVars ) = 0;
/// Return the lowest numbered configuration value available in the current environment.
virtual ESteamNetworkingConfigValue GetFirstConfigValue() = 0;
//
// String conversions. You'll usually access these using the respective // String conversions. You'll usually access these using the respective
// inline methods. // inline methods.
//
virtual void SteamNetworkingIPAddr_ToString( const SteamNetworkingIPAddr &addr, char *buf, size_t cbBuf, bool bWithPort ) = 0; virtual void SteamNetworkingIPAddr_ToString( const SteamNetworkingIPAddr &addr, char *buf, size_t cbBuf, bool bWithPort ) = 0;
virtual bool SteamNetworkingIPAddr_ParseString( SteamNetworkingIPAddr *pAddr, const char *pszStr ) = 0; virtual bool SteamNetworkingIPAddr_ParseString( SteamNetworkingIPAddr *pAddr, const char *pszStr ) = 0;
virtual ESteamNetworkingFakeIPType SteamNetworkingIPAddr_GetFakeIPType( const SteamNetworkingIPAddr &addr ) = 0;
virtual void SteamNetworkingIdentity_ToString( const SteamNetworkingIdentity &identity, char *buf, size_t cbBuf ) = 0; virtual void SteamNetworkingIdentity_ToString( const SteamNetworkingIdentity &identity, char *buf, size_t cbBuf ) = 0;
virtual bool SteamNetworkingIdentity_ParseString( SteamNetworkingIdentity *pIdentity, const char *pszStr ) = 0; virtual bool SteamNetworkingIdentity_ParseString( SteamNetworkingIdentity *pIdentity, const char *pszStr ) = 0;
protected: protected:
// ~ISteamNetworkingUtils(); // Silence some warnings // ~ISteamNetworkingUtils(); // Silence some warnings
}; };
#define STEAMNETWORKINGUTILS_INTERFACE_VERSION "SteamNetworkingUtils004" #define STEAMNETWORKINGUTILS_INTERFACE_VERSION "SteamNetworkingUtils003"
// Global accessors // Global accessors
// Using standalone lib // Using standalone lib
#ifdef STEAMNETWORKINGSOCKETS_STANDALONELIB #ifdef STEAMNETWORKINGSOCKETS_STANDALONELIB
// Standalone lib // Standalone lib
static_assert( STEAMNETWORKINGUTILS_INTERFACE_VERSION[22] == '4', "Version mismatch" ); static_assert( STEAMNETWORKINGUTILS_INTERFACE_VERSION[22] == '3', "Version mismatch" );
STEAMNETWORKINGSOCKETS_INTERFACE ISteamNetworkingUtils *SteamNetworkingUtils_LibV4(); STEAMNETWORKINGSOCKETS_INTERFACE ISteamNetworkingUtils *SteamNetworkingUtils_LibV3();
inline ISteamNetworkingUtils *SteamNetworkingUtils_Lib() { return SteamNetworkingUtils_LibV4(); } inline ISteamNetworkingUtils *SteamNetworkingUtils_Lib() { return SteamNetworkingUtils_LibV3(); }
#ifndef STEAMNETWORKINGSOCKETS_STEAMAPI #ifndef STEAMNETWORKINGSOCKETS_STEAMAPI
inline ISteamNetworkingUtils *SteamNetworkingUtils() { return SteamNetworkingUtils_LibV4(); } inline ISteamNetworkingUtils *SteamNetworkingUtils() { return SteamNetworkingUtils_LibV3(); }
#endif #endif
#endif #endif
@ -419,8 +385,6 @@ struct SteamRelayNetworkStatus_t
char m_debugMsg[ 256 ]; char m_debugMsg[ 256 ];
}; };
#ifndef API_GEN
/// Utility class for printing a SteamNetworkingIdentity. /// Utility class for printing a SteamNetworkingIdentity.
/// E.g. printf( "Identity is '%s'\n", SteamNetworkingIdentityRender( identity ).c_str() ); /// E.g. printf( "Identity is '%s'\n", SteamNetworkingIdentityRender( identity ).c_str() );
struct SteamNetworkingIdentityRender struct SteamNetworkingIdentityRender
@ -440,8 +404,6 @@ private:
char buf[ SteamNetworkingIPAddr::k_cchMaxString ]; char buf[ SteamNetworkingIPAddr::k_cchMaxString ];
}; };
#endif
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
// //
// Internal stuff // Internal stuff
@ -457,7 +419,6 @@ inline bool ISteamNetworkingUtils::SetConnectionConfigValueString( HSteamNetConn
inline bool ISteamNetworkingUtils::SetGlobalCallback_SteamNetConnectionStatusChanged( FnSteamNetConnectionStatusChanged fnCallback ) { return SetGlobalConfigValuePtr( k_ESteamNetworkingConfig_Callback_ConnectionStatusChanged, (void*)fnCallback ); } inline bool ISteamNetworkingUtils::SetGlobalCallback_SteamNetConnectionStatusChanged( FnSteamNetConnectionStatusChanged fnCallback ) { return SetGlobalConfigValuePtr( k_ESteamNetworkingConfig_Callback_ConnectionStatusChanged, (void*)fnCallback ); }
inline bool ISteamNetworkingUtils::SetGlobalCallback_SteamNetAuthenticationStatusChanged( FnSteamNetAuthenticationStatusChanged fnCallback ) { return SetGlobalConfigValuePtr( k_ESteamNetworkingConfig_Callback_AuthStatusChanged, (void*)fnCallback ); } inline bool ISteamNetworkingUtils::SetGlobalCallback_SteamNetAuthenticationStatusChanged( FnSteamNetAuthenticationStatusChanged fnCallback ) { return SetGlobalConfigValuePtr( k_ESteamNetworkingConfig_Callback_AuthStatusChanged, (void*)fnCallback ); }
inline bool ISteamNetworkingUtils::SetGlobalCallback_SteamRelayNetworkStatusChanged( FnSteamRelayNetworkStatusChanged fnCallback ) { return SetGlobalConfigValuePtr( k_ESteamNetworkingConfig_Callback_RelayNetworkStatusChanged, (void*)fnCallback ); } inline bool ISteamNetworkingUtils::SetGlobalCallback_SteamRelayNetworkStatusChanged( FnSteamRelayNetworkStatusChanged fnCallback ) { return SetGlobalConfigValuePtr( k_ESteamNetworkingConfig_Callback_RelayNetworkStatusChanged, (void*)fnCallback ); }
inline bool ISteamNetworkingUtils::SetGlobalCallback_FakeIPResult( FnSteamNetworkingFakeIPResult fnCallback ) { return SetGlobalConfigValuePtr( k_ESteamNetworkingConfig_Callback_FakeIPResult, (void*)fnCallback ); }
inline bool ISteamNetworkingUtils::SetGlobalCallback_MessagesSessionRequest( FnSteamNetworkingMessagesSessionRequest fnCallback ) { return SetGlobalConfigValuePtr( k_ESteamNetworkingConfig_Callback_MessagesSessionRequest, (void*)fnCallback ); } inline bool ISteamNetworkingUtils::SetGlobalCallback_MessagesSessionRequest( FnSteamNetworkingMessagesSessionRequest fnCallback ) { return SetGlobalConfigValuePtr( k_ESteamNetworkingConfig_Callback_MessagesSessionRequest, (void*)fnCallback ); }
inline bool ISteamNetworkingUtils::SetGlobalCallback_MessagesSessionFailed( FnSteamNetworkingMessagesSessionFailed fnCallback ) { return SetGlobalConfigValuePtr( k_ESteamNetworkingConfig_Callback_MessagesSessionFailed, (void*)fnCallback ); } inline bool ISteamNetworkingUtils::SetGlobalCallback_MessagesSessionFailed( FnSteamNetworkingMessagesSessionFailed fnCallback ) { return SetGlobalConfigValuePtr( k_ESteamNetworkingConfig_Callback_MessagesSessionFailed, (void*)fnCallback ); }
@ -472,17 +433,15 @@ inline bool ISteamNetworkingUtils::SetConfigValueStruct( const SteamNetworkingCo
} }
// How to get helper functions. // How to get helper functions.
#if defined( STEAMNETWORKINGSOCKETS_STATIC_LINK ) || defined(STEAMNETWORKINGSOCKETS_FOREXPORT) || defined( STEAMNETWORKINGSOCKETS_STANDALONELIB ) #if defined( STEAMNETWORKINGSOCKETS_STATIC_LINK ) || defined( STEAMNETWORKINGSOCKETS_STANDALONELIB )
// Call direct to static functions // Call direct to static functions
STEAMNETWORKINGSOCKETS_INTERFACE void SteamNetworkingIPAddr_ToString( const SteamNetworkingIPAddr *pAddr, char *buf, size_t cbBuf, bool bWithPort ); STEAMNETWORKINGSOCKETS_INTERFACE void SteamNetworkingIPAddr_ToString( const SteamNetworkingIPAddr *pAddr, char *buf, size_t cbBuf, bool bWithPort );
STEAMNETWORKINGSOCKETS_INTERFACE bool SteamNetworkingIPAddr_ParseString( SteamNetworkingIPAddr *pAddr, const char *pszStr ); STEAMNETWORKINGSOCKETS_INTERFACE bool SteamNetworkingIPAddr_ParseString( SteamNetworkingIPAddr *pAddr, const char *pszStr );
STEAMNETWORKINGSOCKETS_INTERFACE ESteamNetworkingFakeIPType SteamNetworkingIPAddr_GetFakeIPType( const SteamNetworkingIPAddr *pAddr );
STEAMNETWORKINGSOCKETS_INTERFACE void SteamNetworkingIdentity_ToString( const SteamNetworkingIdentity *pIdentity, char *buf, size_t cbBuf ); STEAMNETWORKINGSOCKETS_INTERFACE void SteamNetworkingIdentity_ToString( const SteamNetworkingIdentity *pIdentity, char *buf, size_t cbBuf );
STEAMNETWORKINGSOCKETS_INTERFACE bool SteamNetworkingIdentity_ParseString( SteamNetworkingIdentity *pIdentity, size_t sizeofIdentity, const char *pszStr ); STEAMNETWORKINGSOCKETS_INTERFACE bool SteamNetworkingIdentity_ParseString( SteamNetworkingIdentity *pIdentity, size_t sizeofIdentity, const char *pszStr );
inline void SteamNetworkingIPAddr::ToString( char *buf, size_t cbBuf, bool bWithPort ) const { SteamNetworkingIPAddr_ToString( this, buf, cbBuf, bWithPort ); } inline void SteamNetworkingIPAddr::ToString( char *buf, size_t cbBuf, bool bWithPort ) const { SteamNetworkingIPAddr_ToString( this, buf, cbBuf, bWithPort ); }
inline bool SteamNetworkingIPAddr::ParseString( const char *pszStr ) { return SteamNetworkingIPAddr_ParseString( this, pszStr ); } inline bool SteamNetworkingIPAddr::ParseString( const char *pszStr ) { return SteamNetworkingIPAddr_ParseString( this, pszStr ); }
inline ESteamNetworkingFakeIPType SteamNetworkingIPAddr::GetFakeIPType() const { return SteamNetworkingIPAddr_GetFakeIPType( this ); }
inline void SteamNetworkingIdentity::ToString( char *buf, size_t cbBuf ) const { SteamNetworkingIdentity_ToString( this, buf, cbBuf ); } inline void SteamNetworkingIdentity::ToString( char *buf, size_t cbBuf ) const { SteamNetworkingIdentity_ToString( this, buf, cbBuf ); }
inline bool SteamNetworkingIdentity::ParseString( const char *pszStr ) { return SteamNetworkingIdentity_ParseString( this, sizeof(*this), pszStr ); } inline bool SteamNetworkingIdentity::ParseString( const char *pszStr ) { return SteamNetworkingIdentity_ParseString( this, sizeof(*this), pszStr ); }
@ -490,7 +449,6 @@ inline bool ISteamNetworkingUtils::SetConfigValueStruct( const SteamNetworkingCo
// Using steamworks SDK - go through SteamNetworkingUtils() // Using steamworks SDK - go through SteamNetworkingUtils()
inline void SteamNetworkingIPAddr::ToString( char *buf, size_t cbBuf, bool bWithPort ) const { SteamNetworkingUtils()->SteamNetworkingIPAddr_ToString( *this, buf, cbBuf, bWithPort ); } inline void SteamNetworkingIPAddr::ToString( char *buf, size_t cbBuf, bool bWithPort ) const { SteamNetworkingUtils()->SteamNetworkingIPAddr_ToString( *this, buf, cbBuf, bWithPort ); }
inline bool SteamNetworkingIPAddr::ParseString( const char *pszStr ) { return SteamNetworkingUtils()->SteamNetworkingIPAddr_ParseString( this, pszStr ); } inline bool SteamNetworkingIPAddr::ParseString( const char *pszStr ) { return SteamNetworkingUtils()->SteamNetworkingIPAddr_ParseString( this, pszStr ); }
inline ESteamNetworkingFakeIPType SteamNetworkingIPAddr::GetFakeIPType() const { return SteamNetworkingUtils()->SteamNetworkingIPAddr_GetFakeIPType( *this ); }
inline void SteamNetworkingIdentity::ToString( char *buf, size_t cbBuf ) const { SteamNetworkingUtils()->SteamNetworkingIdentity_ToString( *this, buf, cbBuf ); } inline void SteamNetworkingIdentity::ToString( char *buf, size_t cbBuf ) const { SteamNetworkingUtils()->SteamNetworkingIdentity_ToString( *this, buf, cbBuf ); }
inline bool SteamNetworkingIdentity::ParseString( const char *pszStr ) { return SteamNetworkingUtils()->SteamNetworkingIdentity_ParseString( this, pszStr ); } inline bool SteamNetworkingIdentity::ParseString( const char *pszStr ) { return SteamNetworkingUtils()->SteamNetworkingIdentity_ParseString( this, pszStr ); }
#else #else

View File

@ -1,308 +0,0 @@
#ifndef ISTEAMNETWORKINGUTILS003
#define ISTEAMNETWORKINGUTILS003
//-----------------------------------------------------------------------------
/// Misc networking utilities for checking the local networking environment
/// and estimating pings.
class ISteamNetworkingUtils003
{
public:
//
// Efficient message sending
//
/// Allocate and initialize a message object. Usually the reason
/// you call this is to pass it to ISteamNetworkingSockets::SendMessages.
/// The returned object will have all of the relevant fields cleared to zero.
///
/// Optionally you can also request that this system allocate space to
/// hold the payload itself. If cbAllocateBuffer is nonzero, the system
/// will allocate memory to hold a payload of at least cbAllocateBuffer bytes.
/// m_pData will point to the allocated buffer, m_cbSize will be set to the
/// size, and m_pfnFreeData will be set to the proper function to free up
/// the buffer.
///
/// If cbAllocateBuffer=0, then no buffer is allocated. m_pData will be NULL,
/// m_cbSize will be zero, and m_pfnFreeData will be NULL. You will need to
/// set each of these.
virtual SteamNetworkingMessage_t *AllocateMessage( int cbAllocateBuffer ) = 0;
//
// Access to Steam Datagram Relay (SDR) network
//
//
// Initialization and status check
//
/// If you know that you are going to be using the relay network (for example,
/// because you anticipate making P2P connections), call this to initialize the
/// relay network. If you do not call this, the initialization will
/// be delayed until the first time you use a feature that requires access
/// to the relay network, which will delay that first access.
///
/// You can also call this to force a retry if the previous attempt has failed.
/// Performing any action that requires access to the relay network will also
/// trigger a retry, and so calling this function is never strictly necessary,
/// but it can be useful to call it a program launch time, if access to the
/// relay network is anticipated.
///
/// Use GetRelayNetworkStatus or listen for SteamRelayNetworkStatus_t
/// callbacks to know when initialization has completed.
/// Typically initialization completes in a few seconds.
///
/// Note: dedicated servers hosted in known data centers do *not* need
/// to call this, since they do not make routing decisions. However, if
/// the dedicated server will be using P2P functionality, it will act as
/// a "client" and this should be called.
inline void InitRelayNetworkAccess();
/// Fetch current status of the relay network.
///
/// SteamRelayNetworkStatus_t is also a callback. It will be triggered on
/// both the user and gameserver interfaces any time the status changes, or
/// ping measurement starts or stops.
///
/// SteamRelayNetworkStatus_t::m_eAvail is returned. If you want
/// more details, you can pass a non-NULL value.
virtual ESteamNetworkingAvailability GetRelayNetworkStatus( SteamRelayNetworkStatus_t *pDetails ) = 0;
//
// "Ping location" functions
//
// We use the ping times to the valve relays deployed worldwide to
// generate a "marker" that describes the location of an Internet host.
// Given two such markers, we can estimate the network latency between
// two hosts, without sending any packets. The estimate is based on the
// optimal route that is found through the Valve network. If you are
// using the Valve network to carry the traffic, then this is precisely
// the ping you want. If you are not, then the ping time will probably
// still be a reasonable estimate.
//
// This is extremely useful to select peers for matchmaking!
//
// The markers can also be converted to a string, so they can be transmitted.
// We have a separate library you can use on your app's matchmaking/coordinating
// server to manipulate these objects. (See steamdatagram_gamecoordinator.h)
/// Return location info for the current host. Returns the approximate
/// age of the data, in seconds, or -1 if no data is available.
///
/// It takes a few seconds to initialize access to the relay network. If
/// you call this very soon after calling InitRelayNetworkAccess,
/// the data may not be available yet.
///
/// This always return the most up-to-date information we have available
/// right now, even if we are in the middle of re-calculating ping times.
virtual float GetLocalPingLocation( SteamNetworkPingLocation_t &result ) = 0;
/// Estimate the round-trip latency between two arbitrary locations, in
/// milliseconds. This is a conservative estimate, based on routing through
/// the relay network. For most basic relayed connections, this ping time
/// will be pretty accurate, since it will be based on the route likely to
/// be actually used.
///
/// If a direct IP route is used (perhaps via NAT traversal), then the route
/// will be different, and the ping time might be better. Or it might actually
/// be a bit worse! Standard IP routing is frequently suboptimal!
///
/// But even in this case, the estimate obtained using this method is a
/// reasonable upper bound on the ping time. (Also it has the advantage
/// of returning immediately and not sending any packets.)
///
/// In a few cases we might not able to estimate the route. In this case
/// a negative value is returned. k_nSteamNetworkingPing_Failed means
/// the reason was because of some networking difficulty. (Failure to
/// ping, etc) k_nSteamNetworkingPing_Unknown is returned if we cannot
/// currently answer the question for some other reason.
///
/// Do you need to be able to do this from a backend/matchmaking server?
/// You are looking for the "ticketgen" library.
virtual int EstimatePingTimeBetweenTwoLocations( const SteamNetworkPingLocation_t &location1, const SteamNetworkPingLocation_t &location2 ) = 0;
/// Same as EstimatePingTime, but assumes that one location is the local host.
/// This is a bit faster, especially if you need to calculate a bunch of
/// these in a loop to find the fastest one.
///
/// In rare cases this might return a slightly different estimate than combining
/// GetLocalPingLocation with EstimatePingTimeBetweenTwoLocations. That's because
/// this function uses a slightly more complete set of information about what
/// route would be taken.
virtual int EstimatePingTimeFromLocalHost( const SteamNetworkPingLocation_t &remoteLocation ) = 0;
/// Convert a ping location into a text format suitable for sending over the wire.
/// The format is a compact and human readable. However, it is subject to change
/// so please do not parse it yourself. Your buffer must be at least
/// k_cchMaxSteamNetworkingPingLocationString bytes.
virtual void ConvertPingLocationToString( const SteamNetworkPingLocation_t &location, char *pszBuf, int cchBufSize ) = 0;
/// Parse back SteamNetworkPingLocation_t string. Returns false if we couldn't understand
/// the string.
virtual bool ParsePingLocationString( const char *pszString, SteamNetworkPingLocation_t &result ) = 0;
/// Check if the ping data of sufficient recency is available, and if
/// it's too old, start refreshing it.
///
/// Please only call this function when you *really* do need to force an
/// immediate refresh of the data. (For example, in response to a specific
/// user input to refresh this information.) Don't call it "just in case",
/// before every connection, etc. That will cause extra traffic to be sent
/// for no benefit. The library will automatically refresh the information
/// as needed.
///
/// Returns true if sufficiently recent data is already available.
///
/// Returns false if sufficiently recent data is not available. In this
/// case, ping measurement is initiated, if it is not already active.
/// (You cannot restart a measurement already in progress.)
///
/// You can use GetRelayNetworkStatus or listen for SteamRelayNetworkStatus_t
/// to know when ping measurement completes.
virtual bool CheckPingDataUpToDate( float flMaxAgeSeconds ) = 0;
//
// List of Valve data centers, and ping times to them. This might
// be useful to you if you are use our hosting, or just need to measure
// latency to a cloud data center where we are running relays.
//
/// Fetch ping time of best available relayed route from this host to
/// the specified data center.
virtual int GetPingToDataCenter( SteamNetworkingPOPID popID, SteamNetworkingPOPID *pViaRelayPoP ) = 0;
/// Get *direct* ping time to the relays at the data center.
virtual int GetDirectPingToPOP( SteamNetworkingPOPID popID ) = 0;
/// Get number of network points of presence in the config
virtual int GetPOPCount() = 0;
/// Get list of all POP IDs. Returns the number of entries that were filled into
/// your list.
virtual int GetPOPList( SteamNetworkingPOPID *list, int nListSz ) = 0;
//
// Misc
//
/// Fetch current timestamp. This timer has the following properties:
///
/// - Monotonicity is guaranteed.
/// - The initial value will be at least 24*3600*30*1e6, i.e. about
/// 30 days worth of microseconds. In this way, the timestamp value of
/// 0 will always be at least "30 days ago". Also, negative numbers
/// will never be returned.
/// - Wraparound / overflow is not a practical concern.
///
/// If you are running under the debugger and stop the process, the clock
/// might not advance the full wall clock time that has elapsed between
/// calls. If the process is not blocked from normal operation, the
/// timestamp values will track wall clock time, even if you don't call
/// the function frequently.
///
/// The value is only meaningful for this run of the process. Don't compare
/// it to values obtained on another computer, or other runs of the same process.
virtual SteamNetworkingMicroseconds GetLocalTimestamp() = 0;
/// Set a function to receive network-related information that is useful for debugging.
/// This can be very useful during development, but it can also be useful for troubleshooting
/// problems with tech savvy end users. If you have a console or other log that customers
/// can examine, these log messages can often be helpful to troubleshoot network issues.
/// (Especially any warning/error messages.)
///
/// The detail level indicates what message to invoke your callback on. Lower numeric
/// value means more important, and the value you pass is the lowest priority (highest
/// numeric value) you wish to receive callbacks for.
///
/// The value here controls the detail level for most messages. You can control the
/// detail level for various subsystems (perhaps only for certain connections) by
/// adjusting the configuration values k_ESteamNetworkingConfig_LogLevel_Xxxxx.
///
/// Except when debugging, you should only use k_ESteamNetworkingSocketsDebugOutputType_Msg
/// or k_ESteamNetworkingSocketsDebugOutputType_Warning. For best performance, do NOT
/// request a high detail level and then filter out messages in your callback. This incurs
/// all of the expense of formatting the messages, which are then discarded. Setting a high
/// priority value (low numeric value) here allows the library to avoid doing this work.
///
/// IMPORTANT: This may be called from a service thread, while we own a mutex, etc.
/// Your output function must be threadsafe and fast! Do not make any other
/// Steamworks calls from within the handler.
virtual void SetDebugOutputFunction( ESteamNetworkingSocketsDebugOutputType eDetailLevel, FSteamNetworkingSocketsDebugOutput pfnFunc ) = 0;
//
// Set and get configuration values, see ESteamNetworkingConfigValue for individual descriptions.
//
// Shortcuts for common cases. (Implemented as inline functions below)
bool SetGlobalConfigValueInt32( ESteamNetworkingConfigValue eValue, int32 val );
bool SetGlobalConfigValueFloat( ESteamNetworkingConfigValue eValue, float val );
bool SetGlobalConfigValueString( ESteamNetworkingConfigValue eValue, const char *val );
bool SetGlobalConfigValuePtr( ESteamNetworkingConfigValue eValue, void *val );
bool SetConnectionConfigValueInt32( HSteamNetConnection hConn, ESteamNetworkingConfigValue eValue, int32 val );
bool SetConnectionConfigValueFloat( HSteamNetConnection hConn, ESteamNetworkingConfigValue eValue, float val );
bool SetConnectionConfigValueString( HSteamNetConnection hConn, ESteamNetworkingConfigValue eValue, const char *val );
//
// Set global callbacks. If you do not want to use Steam's callback dispatch mechanism and you
// want to use the same callback on all (or most) listen sockets and connections, then
// simply install these callbacks first thing, and you are good to go.
// See ISteamNetworkingSockets::RunCallbacks
//
bool SetGlobalCallback_SteamNetConnectionStatusChanged( FnSteamNetConnectionStatusChanged fnCallback );
bool SetGlobalCallback_SteamNetAuthenticationStatusChanged( FnSteamNetAuthenticationStatusChanged fnCallback );
bool SetGlobalCallback_SteamRelayNetworkStatusChanged( FnSteamRelayNetworkStatusChanged fnCallback );
bool SetGlobalCallback_MessagesSessionRequest( FnSteamNetworkingMessagesSessionRequest fnCallback );
bool SetGlobalCallback_MessagesSessionFailed( FnSteamNetworkingMessagesSessionFailed fnCallback );
/// Set a configuration value.
/// - eValue: which value is being set
/// - eScope: Onto what type of object are you applying the setting?
/// - scopeArg: Which object you want to change? (Ignored for global scope). E.g. connection handle, listen socket handle, interface pointer, etc.
/// - eDataType: What type of data is in the buffer at pValue? This must match the type of the variable exactly!
/// - pArg: Value to set it to. You can pass NULL to remove a non-global setting at this scope,
/// causing the value for that object to use global defaults. Or at global scope, passing NULL
/// will reset any custom value and restore it to the system default.
/// NOTE: When setting pointers (e.g. callback functions), do not pass the function pointer directly.
/// Your argument should be a pointer to a function pointer.
virtual bool SetConfigValue( ESteamNetworkingConfigValue eValue, ESteamNetworkingConfigScope eScopeType, intptr_t scopeObj,
ESteamNetworkingConfigDataType eDataType, const void *pArg ) = 0;
/// Set a configuration value, using a struct to pass the value.
/// (This is just a convenience shortcut; see below for the implementation and
/// a little insight into how SteamNetworkingConfigValue_t is used when
/// setting config options during listen socket and connection creation.)
bool SetConfigValueStruct( const SteamNetworkingConfigValue_t &opt, ESteamNetworkingConfigScope eScopeType, intptr_t scopeObj );
/// Get a configuration value.
/// - eValue: which value to fetch
/// - eScopeType: query setting on what type of object
/// - eScopeArg: the object to query the setting for
/// - pOutDataType: If non-NULL, the data type of the value is returned.
/// - pResult: Where to put the result. Pass NULL to query the required buffer size. (k_ESteamNetworkingGetConfigValue_BufferTooSmall will be returned.)
/// - cbResult: IN: the size of your buffer. OUT: the number of bytes filled in or required.
virtual ESteamNetworkingGetConfigValueResult GetConfigValue( ESteamNetworkingConfigValue eValue, ESteamNetworkingConfigScope eScopeType, intptr_t scopeObj,
ESteamNetworkingConfigDataType *pOutDataType, void *pResult, size_t *cbResult ) = 0;
/// Returns info about a configuration value. Returns false if the value does not exist.
/// pOutNextValue can be used to iterate through all of the known configuration values.
/// (Use GetFirstConfigValue() to begin the iteration, will be k_ESteamNetworkingConfig_Invalid on the last value)
/// Any of the output parameters can be NULL if you do not need that information.
///
/// See k_ESteamNetworkingConfig_EnumerateDevVars for some more info about "dev" variables,
/// which are usually excluded from the set of variables enumerated using this function.
virtual bool GetConfigValueInfo( ESteamNetworkingConfigValue eValue, const char **pOutName, ESteamNetworkingConfigDataType *pOutDataType, ESteamNetworkingConfigScope *pOutScope, ESteamNetworkingConfigValue *pOutNextValue ) = 0;
/// Return the lowest numbered configuration value available in the current environment.
virtual ESteamNetworkingConfigValue GetFirstConfigValue() = 0;
// String conversions. You'll usually access these using the respective
// inline methods.
virtual void SteamNetworkingIPAddr_ToString( const SteamNetworkingIPAddr &addr, char *buf, size_t cbBuf, bool bWithPort ) = 0;
virtual bool SteamNetworkingIPAddr_ParseString( SteamNetworkingIPAddr *pAddr, const char *pszStr ) = 0;
virtual void SteamNetworkingIdentity_ToString( const SteamNetworkingIdentity &identity, char *buf, size_t cbBuf ) = 0;
virtual bool SteamNetworkingIdentity_ParseString( SteamNetworkingIdentity *pIdentity, const char *pszStr ) = 0;
protected:
// ~ISteamNetworkingUtils(); // Silence some warnings
};
#endif // ISTEAMNETWORKINGUTILS003

View File

@ -339,20 +339,24 @@ STEAM_DEFINE_USER_INTERFACE_ACCESSOR( ISteamRemoteStorage *, SteamRemoteStorage,
//
// IMPORTANT! k_iClientRemoteStorageCallbacks 1 through 6 are used, see iclientremotestorage.h
//
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// Purpose: The result of a call to FileShare() // Purpose: The result of a call to FileShare()
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
struct RemoteStorageFileShareResult_t struct RemoteStorageFileShareResult_t
{ {
enum { k_iCallback = k_iSteamRemoteStorageCallbacks + 7 }; enum { k_iCallback = k_iClientRemoteStorageCallbacks + 7 };
EResult m_eResult; // The result of the operation EResult m_eResult; // The result of the operation
UGCHandle_t m_hFile; // The handle that can be shared with users and features UGCHandle_t m_hFile; // The handle that can be shared with users and features
char m_rgchFilename[k_cchFilenameMax]; // The name of the file that was shared char m_rgchFilename[k_cchFilenameMax]; // The name of the file that was shared
}; };
// k_iSteamRemoteStorageCallbacks + 8 is deprecated! Do not reuse // k_iClientRemoteStorageCallbacks + 8 is deprecated! Do not reuse
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
@ -360,13 +364,13 @@ struct RemoteStorageFileShareResult_t
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
struct RemoteStoragePublishFileResult_t struct RemoteStoragePublishFileResult_t
{ {
enum { k_iCallback = k_iSteamRemoteStorageCallbacks + 9 }; enum { k_iCallback = k_iClientRemoteStorageCallbacks + 9 };
EResult m_eResult; // The result of the operation. EResult m_eResult; // The result of the operation.
PublishedFileId_t m_nPublishedFileId; PublishedFileId_t m_nPublishedFileId;
bool m_bUserNeedsToAcceptWorkshopLegalAgreement; bool m_bUserNeedsToAcceptWorkshopLegalAgreement;
}; };
// k_iSteamRemoteStorageCallbacks + 10 is deprecated! Do not reuse // k_iClientRemoteStorageCallbacks + 10 is deprecated! Do not reuse
@ -375,7 +379,7 @@ struct RemoteStoragePublishFileResult_t
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
struct RemoteStorageDeletePublishedFileResult_t struct RemoteStorageDeletePublishedFileResult_t
{ {
enum { k_iCallback = k_iSteamRemoteStorageCallbacks + 11 }; enum { k_iCallback = k_iClientRemoteStorageCallbacks + 11 };
EResult m_eResult; // The result of the operation. EResult m_eResult; // The result of the operation.
PublishedFileId_t m_nPublishedFileId; PublishedFileId_t m_nPublishedFileId;
}; };
@ -386,7 +390,7 @@ struct RemoteStorageDeletePublishedFileResult_t
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
struct RemoteStorageEnumerateUserPublishedFilesResult_t struct RemoteStorageEnumerateUserPublishedFilesResult_t
{ {
enum { k_iCallback = k_iSteamRemoteStorageCallbacks + 12 }; enum { k_iCallback = k_iClientRemoteStorageCallbacks + 12 };
EResult m_eResult; // The result of the operation. EResult m_eResult; // The result of the operation.
int32 m_nResultsReturned; int32 m_nResultsReturned;
int32 m_nTotalResultCount; int32 m_nTotalResultCount;
@ -399,7 +403,7 @@ struct RemoteStorageEnumerateUserPublishedFilesResult_t
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
struct RemoteStorageSubscribePublishedFileResult_t struct RemoteStorageSubscribePublishedFileResult_t
{ {
enum { k_iCallback = k_iSteamRemoteStorageCallbacks + 13 }; enum { k_iCallback = k_iClientRemoteStorageCallbacks + 13 };
EResult m_eResult; // The result of the operation. EResult m_eResult; // The result of the operation.
PublishedFileId_t m_nPublishedFileId; PublishedFileId_t m_nPublishedFileId;
}; };
@ -410,7 +414,7 @@ struct RemoteStorageSubscribePublishedFileResult_t
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
struct RemoteStorageEnumerateUserSubscribedFilesResult_t struct RemoteStorageEnumerateUserSubscribedFilesResult_t
{ {
enum { k_iCallback = k_iSteamRemoteStorageCallbacks + 14 }; enum { k_iCallback = k_iClientRemoteStorageCallbacks + 14 };
EResult m_eResult; // The result of the operation. EResult m_eResult; // The result of the operation.
int32 m_nResultsReturned; int32 m_nResultsReturned;
int32 m_nTotalResultCount; int32 m_nTotalResultCount;
@ -431,7 +435,7 @@ struct RemoteStorageEnumerateUserSubscribedFilesResult_t
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
struct RemoteStorageUnsubscribePublishedFileResult_t struct RemoteStorageUnsubscribePublishedFileResult_t
{ {
enum { k_iCallback = k_iSteamRemoteStorageCallbacks + 15 }; enum { k_iCallback = k_iClientRemoteStorageCallbacks + 15 };
EResult m_eResult; // The result of the operation. EResult m_eResult; // The result of the operation.
PublishedFileId_t m_nPublishedFileId; PublishedFileId_t m_nPublishedFileId;
}; };
@ -442,7 +446,7 @@ struct RemoteStorageUnsubscribePublishedFileResult_t
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
struct RemoteStorageUpdatePublishedFileResult_t struct RemoteStorageUpdatePublishedFileResult_t
{ {
enum { k_iCallback = k_iSteamRemoteStorageCallbacks + 16 }; enum { k_iCallback = k_iClientRemoteStorageCallbacks + 16 };
EResult m_eResult; // The result of the operation. EResult m_eResult; // The result of the operation.
PublishedFileId_t m_nPublishedFileId; PublishedFileId_t m_nPublishedFileId;
bool m_bUserNeedsToAcceptWorkshopLegalAgreement; bool m_bUserNeedsToAcceptWorkshopLegalAgreement;
@ -454,7 +458,7 @@ struct RemoteStorageUpdatePublishedFileResult_t
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
struct RemoteStorageDownloadUGCResult_t struct RemoteStorageDownloadUGCResult_t
{ {
enum { k_iCallback = k_iSteamRemoteStorageCallbacks + 17 }; enum { k_iCallback = k_iClientRemoteStorageCallbacks + 17 };
EResult m_eResult; // The result of the operation. EResult m_eResult; // The result of the operation.
UGCHandle_t m_hFile; // The handle to the file that was attempted to be downloaded. UGCHandle_t m_hFile; // The handle to the file that was attempted to be downloaded.
AppId_t m_nAppID; // ID of the app that created this file. AppId_t m_nAppID; // ID of the app that created this file.
@ -469,7 +473,7 @@ struct RemoteStorageDownloadUGCResult_t
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
struct RemoteStorageGetPublishedFileDetailsResult_t struct RemoteStorageGetPublishedFileDetailsResult_t
{ {
enum { k_iCallback = k_iSteamRemoteStorageCallbacks + 18 }; enum { k_iCallback = k_iClientRemoteStorageCallbacks + 18 };
EResult m_eResult; // The result of the operation. EResult m_eResult; // The result of the operation.
PublishedFileId_t m_nPublishedFileId; PublishedFileId_t m_nPublishedFileId;
AppId_t m_nCreatorAppID; // ID of the app that created this file. AppId_t m_nCreatorAppID; // ID of the app that created this file.
@ -496,7 +500,7 @@ struct RemoteStorageGetPublishedFileDetailsResult_t
struct RemoteStorageEnumerateWorkshopFilesResult_t struct RemoteStorageEnumerateWorkshopFilesResult_t
{ {
enum { k_iCallback = k_iSteamRemoteStorageCallbacks + 19 }; enum { k_iCallback = k_iClientRemoteStorageCallbacks + 19 };
EResult m_eResult; EResult m_eResult;
int32 m_nResultsReturned; int32 m_nResultsReturned;
int32 m_nTotalResultCount; int32 m_nTotalResultCount;
@ -512,7 +516,7 @@ struct RemoteStorageEnumerateWorkshopFilesResult_t
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
struct RemoteStorageGetPublishedItemVoteDetailsResult_t struct RemoteStorageGetPublishedItemVoteDetailsResult_t
{ {
enum { k_iCallback = k_iSteamRemoteStorageCallbacks + 20 }; enum { k_iCallback = k_iClientRemoteStorageCallbacks + 20 };
EResult m_eResult; EResult m_eResult;
PublishedFileId_t m_unPublishedFileId; PublishedFileId_t m_unPublishedFileId;
int32 m_nVotesFor; int32 m_nVotesFor;
@ -527,7 +531,7 @@ struct RemoteStorageGetPublishedItemVoteDetailsResult_t
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
struct RemoteStoragePublishedFileSubscribed_t struct RemoteStoragePublishedFileSubscribed_t
{ {
enum { k_iCallback = k_iSteamRemoteStorageCallbacks + 21 }; enum { k_iCallback = k_iClientRemoteStorageCallbacks + 21 };
PublishedFileId_t m_nPublishedFileId; // The published file id PublishedFileId_t m_nPublishedFileId; // The published file id
AppId_t m_nAppID; // ID of the app that will consume this file. AppId_t m_nAppID; // ID of the app that will consume this file.
}; };
@ -537,7 +541,7 @@ struct RemoteStoragePublishedFileSubscribed_t
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
struct RemoteStoragePublishedFileUnsubscribed_t struct RemoteStoragePublishedFileUnsubscribed_t
{ {
enum { k_iCallback = k_iSteamRemoteStorageCallbacks + 22 }; enum { k_iCallback = k_iClientRemoteStorageCallbacks + 22 };
PublishedFileId_t m_nPublishedFileId; // The published file id PublishedFileId_t m_nPublishedFileId; // The published file id
AppId_t m_nAppID; // ID of the app that will consume this file. AppId_t m_nAppID; // ID of the app that will consume this file.
}; };
@ -548,7 +552,7 @@ struct RemoteStoragePublishedFileUnsubscribed_t
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
struct RemoteStoragePublishedFileDeleted_t struct RemoteStoragePublishedFileDeleted_t
{ {
enum { k_iCallback = k_iSteamRemoteStorageCallbacks + 23 }; enum { k_iCallback = k_iClientRemoteStorageCallbacks + 23 };
PublishedFileId_t m_nPublishedFileId; // The published file id PublishedFileId_t m_nPublishedFileId; // The published file id
AppId_t m_nAppID; // ID of the app that will consume this file. AppId_t m_nAppID; // ID of the app that will consume this file.
}; };
@ -559,7 +563,7 @@ struct RemoteStoragePublishedFileDeleted_t
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
struct RemoteStorageUpdateUserPublishedItemVoteResult_t struct RemoteStorageUpdateUserPublishedItemVoteResult_t
{ {
enum { k_iCallback = k_iSteamRemoteStorageCallbacks + 24 }; enum { k_iCallback = k_iClientRemoteStorageCallbacks + 24 };
EResult m_eResult; // The result of the operation. EResult m_eResult; // The result of the operation.
PublishedFileId_t m_nPublishedFileId; // The published file id PublishedFileId_t m_nPublishedFileId; // The published file id
}; };
@ -570,7 +574,7 @@ struct RemoteStorageUpdateUserPublishedItemVoteResult_t
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
struct RemoteStorageUserVoteDetails_t struct RemoteStorageUserVoteDetails_t
{ {
enum { k_iCallback = k_iSteamRemoteStorageCallbacks + 25 }; enum { k_iCallback = k_iClientRemoteStorageCallbacks + 25 };
EResult m_eResult; // The result of the operation. EResult m_eResult; // The result of the operation.
PublishedFileId_t m_nPublishedFileId; // The published file id PublishedFileId_t m_nPublishedFileId; // The published file id
EWorkshopVote m_eVote; // what the user voted EWorkshopVote m_eVote; // what the user voted
@ -578,7 +582,7 @@ struct RemoteStorageUserVoteDetails_t
struct RemoteStorageEnumerateUserSharedWorkshopFilesResult_t struct RemoteStorageEnumerateUserSharedWorkshopFilesResult_t
{ {
enum { k_iCallback = k_iSteamRemoteStorageCallbacks + 26 }; enum { k_iCallback = k_iClientRemoteStorageCallbacks + 26 };
EResult m_eResult; // The result of the operation. EResult m_eResult; // The result of the operation.
int32 m_nResultsReturned; int32 m_nResultsReturned;
int32 m_nTotalResultCount; int32 m_nTotalResultCount;
@ -587,7 +591,7 @@ struct RemoteStorageEnumerateUserSharedWorkshopFilesResult_t
struct RemoteStorageSetUserPublishedFileActionResult_t struct RemoteStorageSetUserPublishedFileActionResult_t
{ {
enum { k_iCallback = k_iSteamRemoteStorageCallbacks + 27 }; enum { k_iCallback = k_iClientRemoteStorageCallbacks + 27 };
EResult m_eResult; // The result of the operation. EResult m_eResult; // The result of the operation.
PublishedFileId_t m_nPublishedFileId; // The published file id PublishedFileId_t m_nPublishedFileId; // The published file id
EWorkshopFileAction m_eAction; // the action that was attempted EWorkshopFileAction m_eAction; // the action that was attempted
@ -595,7 +599,7 @@ struct RemoteStorageSetUserPublishedFileActionResult_t
struct RemoteStorageEnumeratePublishedFilesByUserActionResult_t struct RemoteStorageEnumeratePublishedFilesByUserActionResult_t
{ {
enum { k_iCallback = k_iSteamRemoteStorageCallbacks + 28 }; enum { k_iCallback = k_iClientRemoteStorageCallbacks + 28 };
EResult m_eResult; // The result of the operation. EResult m_eResult; // The result of the operation.
EWorkshopFileAction m_eAction; // the action that was filtered on EWorkshopFileAction m_eAction; // the action that was filtered on
int32 m_nResultsReturned; int32 m_nResultsReturned;
@ -610,7 +614,7 @@ struct RemoteStorageEnumeratePublishedFilesByUserActionResult_t
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
struct RemoteStoragePublishFileProgress_t struct RemoteStoragePublishFileProgress_t
{ {
enum { k_iCallback = k_iSteamRemoteStorageCallbacks + 29 }; enum { k_iCallback = k_iClientRemoteStorageCallbacks + 29 };
double m_dPercentFile; double m_dPercentFile;
bool m_bPreview; bool m_bPreview;
}; };
@ -621,7 +625,7 @@ struct RemoteStoragePublishFileProgress_t
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
struct RemoteStoragePublishedFileUpdated_t struct RemoteStoragePublishedFileUpdated_t
{ {
enum { k_iCallback = k_iSteamRemoteStorageCallbacks + 30 }; enum { k_iCallback = k_iClientRemoteStorageCallbacks + 30 };
PublishedFileId_t m_nPublishedFileId; // The published file id PublishedFileId_t m_nPublishedFileId; // The published file id
AppId_t m_nAppID; // ID of the app that will consume this file. AppId_t m_nAppID; // ID of the app that will consume this file.
uint64 m_ulUnused; // not used anymore uint64 m_ulUnused; // not used anymore
@ -632,7 +636,7 @@ struct RemoteStoragePublishedFileUpdated_t
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
struct RemoteStorageFileWriteAsyncComplete_t struct RemoteStorageFileWriteAsyncComplete_t
{ {
enum { k_iCallback = k_iSteamRemoteStorageCallbacks + 31 }; enum { k_iCallback = k_iClientRemoteStorageCallbacks + 31 };
EResult m_eResult; // result EResult m_eResult; // result
}; };
@ -641,7 +645,7 @@ struct RemoteStorageFileWriteAsyncComplete_t
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
struct RemoteStorageFileReadAsyncComplete_t struct RemoteStorageFileReadAsyncComplete_t
{ {
enum { k_iCallback = k_iSteamRemoteStorageCallbacks + 32 }; enum { k_iCallback = k_iClientRemoteStorageCallbacks + 32 };
SteamAPICall_t m_hFileReadAsync; // call handle of the async read which was made SteamAPICall_t m_hFileReadAsync; // call handle of the async read which was made
EResult m_eResult; // result EResult m_eResult; // result
uint32 m_nOffset; // offset in the file this read was at uint32 m_nOffset; // offset in the file this read was at
@ -653,7 +657,7 @@ struct RemoteStorageFileReadAsyncComplete_t
// to remote session changes // to remote session changes
// Note: only posted if this happens DURING the local app session // Note: only posted if this happens DURING the local app session
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
STEAM_CALLBACK_BEGIN( RemoteStorageLocalFileChange_t, k_iSteamRemoteStorageCallbacks + 33 ) STEAM_CALLBACK_BEGIN( RemoteStorageLocalFileChange_t, k_iClientRemoteStorageCallbacks + 33 )
STEAM_CALLBACK_END( 0 ) STEAM_CALLBACK_END( 0 )
#pragma pack( pop ) #pragma pack( pop )

View File

@ -262,8 +262,6 @@ public:
virtual bool SetMatchAnyTag( UGCQueryHandle_t handle, bool bMatchAnyTag ) = 0; virtual bool SetMatchAnyTag( UGCQueryHandle_t handle, bool bMatchAnyTag ) = 0;
virtual bool SetSearchText( UGCQueryHandle_t handle, const char *pSearchText ) = 0; virtual bool SetSearchText( UGCQueryHandle_t handle, const char *pSearchText ) = 0;
virtual bool SetRankedByTrendDays( UGCQueryHandle_t handle, uint32 unDays ) = 0; virtual bool SetRankedByTrendDays( UGCQueryHandle_t handle, uint32 unDays ) = 0;
virtual bool SetTimeCreatedDateRange( UGCQueryHandle_t handle, RTime32 rtStart, RTime32 rtEnd ) = 0;
virtual bool SetTimeUpdatedDateRange( UGCQueryHandle_t handle, RTime32 rtStart, RTime32 rtEnd ) = 0;
virtual bool AddRequiredKeyValueTag( UGCQueryHandle_t handle, const char *pKey, const char *pValue ) = 0; virtual bool AddRequiredKeyValueTag( UGCQueryHandle_t handle, const char *pKey, const char *pValue ) = 0;
// DEPRECATED - Use CreateQueryUGCDetailsRequest call above instead! // DEPRECATED - Use CreateQueryUGCDetailsRequest call above instead!
@ -371,7 +369,7 @@ public:
virtual SteamAPICall_t GetWorkshopEULAStatus() = 0; virtual SteamAPICall_t GetWorkshopEULAStatus() = 0;
}; };
#define STEAMUGC_INTERFACE_VERSION "STEAMUGC_INTERFACE_VERSION016" #define STEAMUGC_INTERFACE_VERSION "STEAMUGC_INTERFACE_VERSION015"
#ifndef STEAM_API_EXPORTS #ifndef STEAM_API_EXPORTS
// Global interface accessor // Global interface accessor
@ -388,7 +386,7 @@ STEAM_DEFINE_GAMESERVER_INTERFACE_ACCESSOR( ISteamUGC *, SteamGameServerUGC, STE
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
struct SteamUGCQueryCompleted_t struct SteamUGCQueryCompleted_t
{ {
enum { k_iCallback = k_iSteamUGCCallbacks + 1 }; enum { k_iCallback = k_iClientUGCCallbacks + 1 };
UGCQueryHandle_t m_handle; UGCQueryHandle_t m_handle;
EResult m_eResult; EResult m_eResult;
uint32 m_unNumResultsReturned; uint32 m_unNumResultsReturned;
@ -403,7 +401,7 @@ struct SteamUGCQueryCompleted_t
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
struct SteamUGCRequestUGCDetailsResult_t struct SteamUGCRequestUGCDetailsResult_t
{ {
enum { k_iCallback = k_iSteamUGCCallbacks + 2 }; enum { k_iCallback = k_iClientUGCCallbacks + 2 };
SteamUGCDetails_t m_details; SteamUGCDetails_t m_details;
bool m_bCachedData; // indicates whether this data was retrieved from the local on-disk cache bool m_bCachedData; // indicates whether this data was retrieved from the local on-disk cache
}; };
@ -414,7 +412,7 @@ struct SteamUGCRequestUGCDetailsResult_t
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
struct CreateItemResult_t struct CreateItemResult_t
{ {
enum { k_iCallback = k_iSteamUGCCallbacks + 3 }; enum { k_iCallback = k_iClientUGCCallbacks + 3 };
EResult m_eResult; EResult m_eResult;
PublishedFileId_t m_nPublishedFileId; // new item got this UGC PublishFileID PublishedFileId_t m_nPublishedFileId; // new item got this UGC PublishFileID
bool m_bUserNeedsToAcceptWorkshopLegalAgreement; bool m_bUserNeedsToAcceptWorkshopLegalAgreement;
@ -426,7 +424,7 @@ struct CreateItemResult_t
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
struct SubmitItemUpdateResult_t struct SubmitItemUpdateResult_t
{ {
enum { k_iCallback = k_iSteamUGCCallbacks + 4 }; enum { k_iCallback = k_iClientUGCCallbacks + 4 };
EResult m_eResult; EResult m_eResult;
bool m_bUserNeedsToAcceptWorkshopLegalAgreement; bool m_bUserNeedsToAcceptWorkshopLegalAgreement;
PublishedFileId_t m_nPublishedFileId; PublishedFileId_t m_nPublishedFileId;
@ -438,7 +436,7 @@ struct SubmitItemUpdateResult_t
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
struct ItemInstalled_t struct ItemInstalled_t
{ {
enum { k_iCallback = k_iSteamUGCCallbacks + 5 }; enum { k_iCallback = k_iClientUGCCallbacks + 5 };
AppId_t m_unAppID; AppId_t m_unAppID;
PublishedFileId_t m_nPublishedFileId; PublishedFileId_t m_nPublishedFileId;
}; };
@ -449,7 +447,7 @@ struct ItemInstalled_t
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
struct DownloadItemResult_t struct DownloadItemResult_t
{ {
enum { k_iCallback = k_iSteamUGCCallbacks + 6 }; enum { k_iCallback = k_iClientUGCCallbacks + 6 };
AppId_t m_unAppID; AppId_t m_unAppID;
PublishedFileId_t m_nPublishedFileId; PublishedFileId_t m_nPublishedFileId;
EResult m_eResult; EResult m_eResult;
@ -460,7 +458,7 @@ struct DownloadItemResult_t
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
struct UserFavoriteItemsListChanged_t struct UserFavoriteItemsListChanged_t
{ {
enum { k_iCallback = k_iSteamUGCCallbacks + 7 }; enum { k_iCallback = k_iClientUGCCallbacks + 7 };
PublishedFileId_t m_nPublishedFileId; PublishedFileId_t m_nPublishedFileId;
EResult m_eResult; EResult m_eResult;
bool m_bWasAddRequest; bool m_bWasAddRequest;
@ -471,7 +469,7 @@ struct UserFavoriteItemsListChanged_t
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
struct SetUserItemVoteResult_t struct SetUserItemVoteResult_t
{ {
enum { k_iCallback = k_iSteamUGCCallbacks + 8 }; enum { k_iCallback = k_iClientUGCCallbacks + 8 };
PublishedFileId_t m_nPublishedFileId; PublishedFileId_t m_nPublishedFileId;
EResult m_eResult; EResult m_eResult;
bool m_bVoteUp; bool m_bVoteUp;
@ -482,7 +480,7 @@ struct SetUserItemVoteResult_t
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
struct GetUserItemVoteResult_t struct GetUserItemVoteResult_t
{ {
enum { k_iCallback = k_iSteamUGCCallbacks + 9 }; enum { k_iCallback = k_iClientUGCCallbacks + 9 };
PublishedFileId_t m_nPublishedFileId; PublishedFileId_t m_nPublishedFileId;
EResult m_eResult; EResult m_eResult;
bool m_bVotedUp; bool m_bVotedUp;
@ -495,7 +493,7 @@ struct GetUserItemVoteResult_t
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
struct StartPlaytimeTrackingResult_t struct StartPlaytimeTrackingResult_t
{ {
enum { k_iCallback = k_iSteamUGCCallbacks + 10 }; enum { k_iCallback = k_iClientUGCCallbacks + 10 };
EResult m_eResult; EResult m_eResult;
}; };
@ -504,7 +502,7 @@ struct StartPlaytimeTrackingResult_t
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
struct StopPlaytimeTrackingResult_t struct StopPlaytimeTrackingResult_t
{ {
enum { k_iCallback = k_iSteamUGCCallbacks + 11 }; enum { k_iCallback = k_iClientUGCCallbacks + 11 };
EResult m_eResult; EResult m_eResult;
}; };
@ -513,7 +511,7 @@ struct StopPlaytimeTrackingResult_t
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
struct AddUGCDependencyResult_t struct AddUGCDependencyResult_t
{ {
enum { k_iCallback = k_iSteamUGCCallbacks + 12 }; enum { k_iCallback = k_iClientUGCCallbacks + 12 };
EResult m_eResult; EResult m_eResult;
PublishedFileId_t m_nPublishedFileId; PublishedFileId_t m_nPublishedFileId;
PublishedFileId_t m_nChildPublishedFileId; PublishedFileId_t m_nChildPublishedFileId;
@ -524,7 +522,7 @@ struct AddUGCDependencyResult_t
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
struct RemoveUGCDependencyResult_t struct RemoveUGCDependencyResult_t
{ {
enum { k_iCallback = k_iSteamUGCCallbacks + 13 }; enum { k_iCallback = k_iClientUGCCallbacks + 13 };
EResult m_eResult; EResult m_eResult;
PublishedFileId_t m_nPublishedFileId; PublishedFileId_t m_nPublishedFileId;
PublishedFileId_t m_nChildPublishedFileId; PublishedFileId_t m_nChildPublishedFileId;
@ -536,7 +534,7 @@ struct RemoveUGCDependencyResult_t
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
struct AddAppDependencyResult_t struct AddAppDependencyResult_t
{ {
enum { k_iCallback = k_iSteamUGCCallbacks + 14 }; enum { k_iCallback = k_iClientUGCCallbacks + 14 };
EResult m_eResult; EResult m_eResult;
PublishedFileId_t m_nPublishedFileId; PublishedFileId_t m_nPublishedFileId;
AppId_t m_nAppID; AppId_t m_nAppID;
@ -547,7 +545,7 @@ struct AddAppDependencyResult_t
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
struct RemoveAppDependencyResult_t struct RemoveAppDependencyResult_t
{ {
enum { k_iCallback = k_iSteamUGCCallbacks + 15 }; enum { k_iCallback = k_iClientUGCCallbacks + 15 };
EResult m_eResult; EResult m_eResult;
PublishedFileId_t m_nPublishedFileId; PublishedFileId_t m_nPublishedFileId;
AppId_t m_nAppID; AppId_t m_nAppID;
@ -559,7 +557,7 @@ struct RemoveAppDependencyResult_t
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
struct GetAppDependenciesResult_t struct GetAppDependenciesResult_t
{ {
enum { k_iCallback = k_iSteamUGCCallbacks + 16 }; enum { k_iCallback = k_iClientUGCCallbacks + 16 };
EResult m_eResult; EResult m_eResult;
PublishedFileId_t m_nPublishedFileId; PublishedFileId_t m_nPublishedFileId;
AppId_t m_rgAppIDs[32]; AppId_t m_rgAppIDs[32];
@ -572,7 +570,7 @@ struct GetAppDependenciesResult_t
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
struct DeleteItemResult_t struct DeleteItemResult_t
{ {
enum { k_iCallback = k_iSteamUGCCallbacks + 17 }; enum { k_iCallback = k_iClientUGCCallbacks + 17 };
EResult m_eResult; EResult m_eResult;
PublishedFileId_t m_nPublishedFileId; PublishedFileId_t m_nPublishedFileId;
}; };
@ -583,7 +581,7 @@ struct DeleteItemResult_t
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
struct UserSubscribedItemsListChanged_t struct UserSubscribedItemsListChanged_t
{ {
enum { k_iCallback = k_iSteamUGCCallbacks + 18 }; enum { k_iCallback = k_iClientUGCCallbacks + 18 };
AppId_t m_nAppID; AppId_t m_nAppID;
}; };
@ -593,7 +591,7 @@ struct UserSubscribedItemsListChanged_t
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
struct WorkshopEULAStatus_t struct WorkshopEULAStatus_t
{ {
enum { k_iCallback = k_iSteamUGCCallbacks + 20 }; enum { k_iCallback = k_iClientUGCCallbacks + 20 };
EResult m_eResult; EResult m_eResult;
AppId_t m_nAppID; AppId_t m_nAppID;
uint32 m_unVersion; uint32 m_unVersion;

View File

@ -1,180 +0,0 @@
#ifndef ISTEAMUGC015_H
#define ISTEAMUGC015_H
#ifdef STEAM_WIN32
#pragma once
#endif
class ISteamUGC015
{
public:
// Query UGC associated with a user. Creator app id or consumer app id must be valid and be set to the current running app. unPage should start at 1.
virtual UGCQueryHandle_t CreateQueryUserUGCRequest( AccountID_t unAccountID, EUserUGCList eListType, EUGCMatchingUGCType eMatchingUGCType, EUserUGCListSortOrder eSortOrder, AppId_t nCreatorAppID, AppId_t nConsumerAppID, uint32 unPage ) = 0;
// Query for all matching UGC. Creator app id or consumer app id must be valid and be set to the current running app. unPage should start at 1.
STEAM_FLAT_NAME( CreateQueryAllUGCRequestPage )
virtual UGCQueryHandle_t CreateQueryAllUGCRequest( EUGCQuery eQueryType, EUGCMatchingUGCType eMatchingeMatchingUGCTypeFileType, AppId_t nCreatorAppID, AppId_t nConsumerAppID, uint32 unPage ) = 0;
// Query for all matching UGC using the new deep paging interface. Creator app id or consumer app id must be valid and be set to the current running app. pchCursor should be set to NULL or "*" to get the first result set.
STEAM_FLAT_NAME( CreateQueryAllUGCRequestCursor )
virtual UGCQueryHandle_t CreateQueryAllUGCRequest( EUGCQuery eQueryType, EUGCMatchingUGCType eMatchingeMatchingUGCTypeFileType, AppId_t nCreatorAppID, AppId_t nConsumerAppID, const char *pchCursor = NULL ) = 0;
// Query for the details of the given published file ids (the RequestUGCDetails call is deprecated and replaced with this)
virtual UGCQueryHandle_t CreateQueryUGCDetailsRequest( PublishedFileId_t *pvecPublishedFileID, uint32 unNumPublishedFileIDs ) = 0;
// Send the query to Steam
STEAM_CALL_RESULT( SteamUGCQueryCompleted_t )
virtual SteamAPICall_t SendQueryUGCRequest( UGCQueryHandle_t handle ) = 0;
// Retrieve an individual result after receiving the callback for querying UGC
virtual bool GetQueryUGCResult( UGCQueryHandle_t handle, uint32 index, SteamUGCDetails_t *pDetails ) = 0;
virtual uint32 GetQueryUGCNumTags( UGCQueryHandle_t handle, uint32 index ) = 0;
virtual bool GetQueryUGCTag( UGCQueryHandle_t handle, uint32 index, uint32 indexTag, STEAM_OUT_STRING_COUNT( cchValueSize ) char* pchValue, uint32 cchValueSize ) = 0;
virtual bool GetQueryUGCTagDisplayName( UGCQueryHandle_t handle, uint32 index, uint32 indexTag, STEAM_OUT_STRING_COUNT( cchValueSize ) char* pchValue, uint32 cchValueSize ) = 0;
virtual bool GetQueryUGCPreviewURL( UGCQueryHandle_t handle, uint32 index, STEAM_OUT_STRING_COUNT(cchURLSize) char *pchURL, uint32 cchURLSize ) = 0;
virtual bool GetQueryUGCMetadata( UGCQueryHandle_t handle, uint32 index, STEAM_OUT_STRING_COUNT(cchMetadatasize) char *pchMetadata, uint32 cchMetadatasize ) = 0;
virtual bool GetQueryUGCChildren( UGCQueryHandle_t handle, uint32 index, PublishedFileId_t* pvecPublishedFileID, uint32 cMaxEntries ) = 0;
virtual bool GetQueryUGCStatistic( UGCQueryHandle_t handle, uint32 index, EItemStatistic eStatType, uint64 *pStatValue ) = 0;
virtual uint32 GetQueryUGCNumAdditionalPreviews( UGCQueryHandle_t handle, uint32 index ) = 0;
virtual bool GetQueryUGCAdditionalPreview( UGCQueryHandle_t handle, uint32 index, uint32 previewIndex, STEAM_OUT_STRING_COUNT(cchURLSize) char *pchURLOrVideoID, uint32 cchURLSize, STEAM_OUT_STRING_COUNT(cchURLSize) char *pchOriginalFileName, uint32 cchOriginalFileNameSize, EItemPreviewType *pPreviewType ) = 0;
virtual uint32 GetQueryUGCNumKeyValueTags( UGCQueryHandle_t handle, uint32 index ) = 0;
virtual bool GetQueryUGCKeyValueTag( UGCQueryHandle_t handle, uint32 index, uint32 keyValueTagIndex, STEAM_OUT_STRING_COUNT(cchKeySize) char *pchKey, uint32 cchKeySize, STEAM_OUT_STRING_COUNT(cchValueSize) char *pchValue, uint32 cchValueSize ) = 0;
// Return the first value matching the pchKey. Note that a key may map to multiple values. Returns false if there was an error or no matching value was found.
STEAM_FLAT_NAME( GetQueryFirstUGCKeyValueTag )
virtual bool GetQueryUGCKeyValueTag( UGCQueryHandle_t handle, uint32 index, const char *pchKey, STEAM_OUT_STRING_COUNT(cchValueSize) char *pchValue, uint32 cchValueSize ) = 0;
// Release the request to free up memory, after retrieving results
virtual bool ReleaseQueryUGCRequest( UGCQueryHandle_t handle ) = 0;
// Options to set for querying UGC
virtual bool AddRequiredTag( UGCQueryHandle_t handle, const char *pTagName ) = 0;
virtual bool AddRequiredTagGroup( UGCQueryHandle_t handle, const SteamParamStringArray_t *pTagGroups ) = 0; // match any of the tags in this group
virtual bool AddExcludedTag( UGCQueryHandle_t handle, const char *pTagName ) = 0;
virtual bool SetReturnOnlyIDs( UGCQueryHandle_t handle, bool bReturnOnlyIDs ) = 0;
virtual bool SetReturnKeyValueTags( UGCQueryHandle_t handle, bool bReturnKeyValueTags ) = 0;
virtual bool SetReturnLongDescription( UGCQueryHandle_t handle, bool bReturnLongDescription ) = 0;
virtual bool SetReturnMetadata( UGCQueryHandle_t handle, bool bReturnMetadata ) = 0;
virtual bool SetReturnChildren( UGCQueryHandle_t handle, bool bReturnChildren ) = 0;
virtual bool SetReturnAdditionalPreviews( UGCQueryHandle_t handle, bool bReturnAdditionalPreviews ) = 0;
virtual bool SetReturnTotalOnly( UGCQueryHandle_t handle, bool bReturnTotalOnly ) = 0;
virtual bool SetReturnPlaytimeStats( UGCQueryHandle_t handle, uint32 unDays ) = 0;
virtual bool SetLanguage( UGCQueryHandle_t handle, const char *pchLanguage ) = 0;
virtual bool SetAllowCachedResponse( UGCQueryHandle_t handle, uint32 unMaxAgeSeconds ) = 0;
// Options only for querying user UGC
virtual bool SetCloudFileNameFilter( UGCQueryHandle_t handle, const char *pMatchCloudFileName ) = 0;
// Options only for querying all UGC
virtual bool SetMatchAnyTag( UGCQueryHandle_t handle, bool bMatchAnyTag ) = 0;
virtual bool SetSearchText( UGCQueryHandle_t handle, const char *pSearchText ) = 0;
virtual bool SetRankedByTrendDays( UGCQueryHandle_t handle, uint32 unDays ) = 0;
virtual bool AddRequiredKeyValueTag( UGCQueryHandle_t handle, const char *pKey, const char *pValue ) = 0;
// DEPRECATED - Use CreateQueryUGCDetailsRequest call above instead!
STEAM_CALL_RESULT( SteamUGCRequestUGCDetailsResult_t )
virtual SteamAPICall_t RequestUGCDetails( PublishedFileId_t nPublishedFileID, uint32 unMaxAgeSeconds ) = 0;
// Steam Workshop Creator API
STEAM_CALL_RESULT( CreateItemResult_t )
virtual SteamAPICall_t CreateItem( AppId_t nConsumerAppId, EWorkshopFileType eFileType ) = 0; // create new item for this app with no content attached yet
virtual UGCUpdateHandle_t StartItemUpdate( AppId_t nConsumerAppId, PublishedFileId_t nPublishedFileID ) = 0; // start an UGC item update. Set changed properties before commiting update with CommitItemUpdate()
virtual bool SetItemTitle( UGCUpdateHandle_t handle, const char *pchTitle ) = 0; // change the title of an UGC item
virtual bool SetItemDescription( UGCUpdateHandle_t handle, const char *pchDescription ) = 0; // change the description of an UGC item
virtual bool SetItemUpdateLanguage( UGCUpdateHandle_t handle, const char *pchLanguage ) = 0; // specify the language of the title or description that will be set
virtual bool SetItemMetadata( UGCUpdateHandle_t handle, const char *pchMetaData ) = 0; // change the metadata of an UGC item (max = k_cchDeveloperMetadataMax)
virtual bool SetItemVisibility( UGCUpdateHandle_t handle, ERemoteStoragePublishedFileVisibility eVisibility ) = 0; // change the visibility of an UGC item
virtual bool SetItemTags( UGCUpdateHandle_t updateHandle, const SteamParamStringArray_t *pTags ) = 0; // change the tags of an UGC item
virtual bool SetItemContent( UGCUpdateHandle_t handle, const char *pszContentFolder ) = 0; // update item content from this local folder
virtual bool SetItemPreview( UGCUpdateHandle_t handle, const char *pszPreviewFile ) = 0; // change preview image file for this item. pszPreviewFile points to local image file, which must be under 1MB in size
virtual bool SetAllowLegacyUpload( UGCUpdateHandle_t handle, bool bAllowLegacyUpload ) = 0; // use legacy upload for a single small file. The parameter to SetItemContent() should either be a directory with one file or the full path to the file. The file must also be less than 10MB in size.
virtual bool RemoveAllItemKeyValueTags( UGCUpdateHandle_t handle ) = 0; // remove all existing key-value tags (you can add new ones via the AddItemKeyValueTag function)
virtual bool RemoveItemKeyValueTags( UGCUpdateHandle_t handle, const char *pchKey ) = 0; // remove any existing key-value tags with the specified key
virtual bool AddItemKeyValueTag( UGCUpdateHandle_t handle, const char *pchKey, const char *pchValue ) = 0; // add new key-value tags for the item. Note that there can be multiple values for a tag.
virtual bool AddItemPreviewFile( UGCUpdateHandle_t handle, const char *pszPreviewFile, EItemPreviewType type ) = 0; // add preview file for this item. pszPreviewFile points to local file, which must be under 1MB in size
virtual bool AddItemPreviewVideo( UGCUpdateHandle_t handle, const char *pszVideoID ) = 0; // add preview video for this item
virtual bool UpdateItemPreviewFile( UGCUpdateHandle_t handle, uint32 index, const char *pszPreviewFile ) = 0; // updates an existing preview file for this item. pszPreviewFile points to local file, which must be under 1MB in size
virtual bool UpdateItemPreviewVideo( UGCUpdateHandle_t handle, uint32 index, const char *pszVideoID ) = 0; // updates an existing preview video for this item
virtual bool RemoveItemPreview( UGCUpdateHandle_t handle, uint32 index ) = 0; // remove a preview by index starting at 0 (previews are sorted)
STEAM_CALL_RESULT( SubmitItemUpdateResult_t )
virtual SteamAPICall_t SubmitItemUpdate( UGCUpdateHandle_t handle, const char *pchChangeNote ) = 0; // commit update process started with StartItemUpdate()
virtual EItemUpdateStatus GetItemUpdateProgress( UGCUpdateHandle_t handle, uint64 *punBytesProcessed, uint64* punBytesTotal ) = 0;
// Steam Workshop Consumer API
STEAM_CALL_RESULT( SetUserItemVoteResult_t )
virtual SteamAPICall_t SetUserItemVote( PublishedFileId_t nPublishedFileID, bool bVoteUp ) = 0;
STEAM_CALL_RESULT( GetUserItemVoteResult_t )
virtual SteamAPICall_t GetUserItemVote( PublishedFileId_t nPublishedFileID ) = 0;
STEAM_CALL_RESULT( UserFavoriteItemsListChanged_t )
virtual SteamAPICall_t AddItemToFavorites( AppId_t nAppId, PublishedFileId_t nPublishedFileID ) = 0;
STEAM_CALL_RESULT( UserFavoriteItemsListChanged_t )
virtual SteamAPICall_t RemoveItemFromFavorites( AppId_t nAppId, PublishedFileId_t nPublishedFileID ) = 0;
STEAM_CALL_RESULT( RemoteStorageSubscribePublishedFileResult_t )
virtual SteamAPICall_t SubscribeItem( PublishedFileId_t nPublishedFileID ) = 0; // subscribe to this item, will be installed ASAP
STEAM_CALL_RESULT( RemoteStorageUnsubscribePublishedFileResult_t )
virtual SteamAPICall_t UnsubscribeItem( PublishedFileId_t nPublishedFileID ) = 0; // unsubscribe from this item, will be uninstalled after game quits
virtual uint32 GetNumSubscribedItems() = 0; // number of subscribed items
virtual uint32 GetSubscribedItems( PublishedFileId_t* pvecPublishedFileID, uint32 cMaxEntries ) = 0; // all subscribed item PublishFileIDs
// get EItemState flags about item on this client
virtual uint32 GetItemState( PublishedFileId_t nPublishedFileID ) = 0;
// get info about currently installed content on disc for items that have k_EItemStateInstalled set
// if k_EItemStateLegacyItem is set, pchFolder contains the path to the legacy file itself (not a folder)
virtual bool GetItemInstallInfo( PublishedFileId_t nPublishedFileID, uint64 *punSizeOnDisk, STEAM_OUT_STRING_COUNT( cchFolderSize ) char *pchFolder, uint32 cchFolderSize, uint32 *punTimeStamp ) = 0;
// get info about pending update for items that have k_EItemStateNeedsUpdate set. punBytesTotal will be valid after download started once
virtual bool GetItemDownloadInfo( PublishedFileId_t nPublishedFileID, uint64 *punBytesDownloaded, uint64 *punBytesTotal ) = 0;
// download new or update already installed item. If function returns true, wait for DownloadItemResult_t. If the item is already installed,
// then files on disk should not be used until callback received. If item is not subscribed to, it will be cached for some time.
// If bHighPriority is set, any other item download will be suspended and this item downloaded ASAP.
virtual bool DownloadItem( PublishedFileId_t nPublishedFileID, bool bHighPriority ) = 0;
// game servers can set a specific workshop folder before issuing any UGC commands.
// This is helpful if you want to support multiple game servers running out of the same install folder
virtual bool BInitWorkshopForGameServer( DepotId_t unWorkshopDepotID, const char *pszFolder ) = 0;
// SuspendDownloads( true ) will suspend all workshop downloads until SuspendDownloads( false ) is called or the game ends
virtual void SuspendDownloads( bool bSuspend ) = 0;
// usage tracking
STEAM_CALL_RESULT( StartPlaytimeTrackingResult_t )
virtual SteamAPICall_t StartPlaytimeTracking( PublishedFileId_t *pvecPublishedFileID, uint32 unNumPublishedFileIDs ) = 0;
STEAM_CALL_RESULT( StopPlaytimeTrackingResult_t )
virtual SteamAPICall_t StopPlaytimeTracking( PublishedFileId_t *pvecPublishedFileID, uint32 unNumPublishedFileIDs ) = 0;
STEAM_CALL_RESULT( StopPlaytimeTrackingResult_t )
virtual SteamAPICall_t StopPlaytimeTrackingForAllItems() = 0;
// parent-child relationship or dependency management
STEAM_CALL_RESULT( AddUGCDependencyResult_t )
virtual SteamAPICall_t AddDependency( PublishedFileId_t nParentPublishedFileID, PublishedFileId_t nChildPublishedFileID ) = 0;
STEAM_CALL_RESULT( RemoveUGCDependencyResult_t )
virtual SteamAPICall_t RemoveDependency( PublishedFileId_t nParentPublishedFileID, PublishedFileId_t nChildPublishedFileID ) = 0;
// add/remove app dependence/requirements (usually DLC)
STEAM_CALL_RESULT( AddAppDependencyResult_t )
virtual SteamAPICall_t AddAppDependency( PublishedFileId_t nPublishedFileID, AppId_t nAppID ) = 0;
STEAM_CALL_RESULT( RemoveAppDependencyResult_t )
virtual SteamAPICall_t RemoveAppDependency( PublishedFileId_t nPublishedFileID, AppId_t nAppID ) = 0;
// request app dependencies. note that whatever callback you register for GetAppDependenciesResult_t may be called multiple times
// until all app dependencies have been returned
STEAM_CALL_RESULT( GetAppDependenciesResult_t )
virtual SteamAPICall_t GetAppDependencies( PublishedFileId_t nPublishedFileID ) = 0;
// delete the item without prompting the user
STEAM_CALL_RESULT( DeleteItemResult_t )
virtual SteamAPICall_t DeleteItem( PublishedFileId_t nPublishedFileID ) = 0;
// Show the app's latest Workshop EULA to the user in an overlay window, where they can accept it or not
virtual bool ShowWorkshopEULA() = 0;
// Retrieve information related to the user's acceptance or not of the app's specific Workshop EULA
STEAM_CALL_RESULT( WorkshopEULAStatus_t )
virtual SteamAPICall_t GetWorkshopEULAStatus() = 0;
};
#endif // ISTEAMUGC015_H

View File

@ -58,14 +58,14 @@ STEAM_CALLBACK_BEGIN( BroadcastUploadStop_t, k_iClientVideoCallbacks + 5 )
STEAM_CALLBACK_MEMBER( 0, EBroadcastUploadResult, m_eResult ) STEAM_CALLBACK_MEMBER( 0, EBroadcastUploadResult, m_eResult )
STEAM_CALLBACK_END(1) STEAM_CALLBACK_END(1)
STEAM_CALLBACK_BEGIN( GetVideoURLResult_t, k_iSteamVideoCallbacks + 11 ) STEAM_CALLBACK_BEGIN( GetVideoURLResult_t, k_iClientVideoCallbacks + 11 )
STEAM_CALLBACK_MEMBER( 0, EResult, m_eResult ) STEAM_CALLBACK_MEMBER( 0, EResult, m_eResult )
STEAM_CALLBACK_MEMBER( 1, AppId_t, m_unVideoAppID ) STEAM_CALLBACK_MEMBER( 1, AppId_t, m_unVideoAppID )
STEAM_CALLBACK_MEMBER( 2, char, m_rgchURL[256] ) STEAM_CALLBACK_MEMBER( 2, char, m_rgchURL[256] )
STEAM_CALLBACK_END(3) STEAM_CALLBACK_END(3)
STEAM_CALLBACK_BEGIN( GetOPFSettingsResult_t, k_iSteamVideoCallbacks + 24 ) STEAM_CALLBACK_BEGIN( GetOPFSettingsResult_t, k_iClientVideoCallbacks + 24 )
STEAM_CALLBACK_MEMBER( 0, EResult, m_eResult ) STEAM_CALLBACK_MEMBER( 0, EResult, m_eResult )
STEAM_CALLBACK_MEMBER( 1, AppId_t, m_unVideoAppID ) STEAM_CALLBACK_MEMBER( 1, AppId_t, m_unVideoAppID )
STEAM_CALLBACK_END(2) STEAM_CALLBACK_END(2)

View File

@ -104,7 +104,6 @@
#include "isteamnetworkingutils.h" #include "isteamnetworkingutils.h"
#include "isteamnetworkingutils001.h" #include "isteamnetworkingutils001.h"
#include "isteamnetworkingutils002.h" #include "isteamnetworkingutils002.h"
#include "isteamnetworkingutils003.h"
#include "isteamnetworkingsockets001.h" #include "isteamnetworkingsockets001.h"
#include "isteamnetworkingsockets002.h" #include "isteamnetworkingsockets002.h"
#include "isteamnetworkingsockets003.h" #include "isteamnetworkingsockets003.h"
@ -154,7 +153,6 @@
#include "isteamugc012.h" #include "isteamugc012.h"
#include "isteamugc013.h" #include "isteamugc013.h"
#include "isteamugc014.h" #include "isteamugc014.h"
#include "isteamugc015.h"
#include "isteamapplist.h" #include "isteamapplist.h"
#include "isteamhtmlsurface.h" #include "isteamhtmlsurface.h"
#include "isteamhtmlsurface001.h" #include "isteamhtmlsurface001.h"
@ -172,13 +170,11 @@
#include "isteaminput.h" #include "isteaminput.h"
#include "isteaminput001.h" #include "isteaminput001.h"
#include "isteaminput002.h" #include "isteaminput002.h"
#include "isteaminput005.h"
#include "isteamremoteplay.h" #include "isteamremoteplay.h"
#include "isteamnetworkingmessages.h" #include "isteamnetworkingmessages.h"
#include "isteamnetworkingsockets.h" #include "isteamnetworkingsockets.h"
#include "isteamnetworkingutils.h" #include "isteamnetworkingutils.h"
#include "isteamtv.h" #include "isteamtv.h"
#include "steamnetworkingfakeip.h"
//----------------------------------------------------------------------------------------------------------------------------------------------------------// //----------------------------------------------------------------------------------------------------------------------------------------------------------//

View File

@ -212,9 +212,7 @@ STEAMAPI_API int SteamAPI_ISteamUtils_FilterText( ISteamUtils* self, ETextFilter
STEAMAPI_API ESteamIPv6ConnectivityState SteamAPI_ISteamUtils_GetIPv6ConnectivityState( ISteamUtils* self, ESteamIPv6ConnectivityProtocol eProtocol ); STEAMAPI_API ESteamIPv6ConnectivityState SteamAPI_ISteamUtils_GetIPv6ConnectivityState( ISteamUtils* self, ESteamIPv6ConnectivityProtocol eProtocol );
STEAMAPI_API bool SteamAPI_ISteamUtils_IsSteamRunningOnSteamDeck( ISteamUtils* self ); STEAMAPI_API bool SteamAPI_ISteamUtils_IsSteamRunningOnSteamDeck( ISteamUtils* self );
STEAMAPI_API bool SteamAPI_ISteamUtils_ShowModalGamepadTextInput( ISteamUtils* self, EGamepadTextInputLineMode eLineInputMode ); STEAMAPI_API bool SteamAPI_ISteamUtils_ShowModalGamepadTextInput( ISteamUtils* self, EGamepadTextInputLineMode eLineInputMode );
STEAMAPI_API bool SteamAPI_ISteamUtils_ShowFloatingGamepadTextInput( ISteamUtils* self, EFloatingGamepadTextInputMode eKeyboardMode, int nTextFieldXPosition, int nTextFieldYPosition, int nTextFieldWidth, int nTextFieldHeight );
STEAMAPI_API void SteamAPI_ISteamUtils_SetGameLauncherMode( ISteamUtils* self, bool bLauncherMode ); STEAMAPI_API void SteamAPI_ISteamUtils_SetGameLauncherMode( ISteamUtils* self, bool bLauncherMode );
STEAMAPI_API bool SteamAPI_ISteamUtils_DismissFloatingGamepadTextInput( ISteamUtils* self );
// ISteamMatchmaking // ISteamMatchmaking
STEAMAPI_API ISteamMatchmaking *SteamAPI_SteamMatchmaking_v009(); STEAMAPI_API ISteamMatchmaking *SteamAPI_SteamMatchmaking_v009();
@ -592,7 +590,6 @@ STEAMAPI_API bool SteamAPI_ISteamHTTP_GetHTTPRequestWasTimedOut( ISteamHTTP* sel
STEAMAPI_API ISteamInput *SteamAPI_SteamInput_v001(); STEAMAPI_API ISteamInput *SteamAPI_SteamInput_v001();
STEAMAPI_API ISteamInput *SteamAPI_SteamInput_v002(); STEAMAPI_API ISteamInput *SteamAPI_SteamInput_v002();
STEAMAPI_API ISteamInput *SteamAPI_SteamInput_v005(); STEAMAPI_API ISteamInput *SteamAPI_SteamInput_v005();
STEAMAPI_API ISteamInput *SteamAPI_SteamInput_v006();
STEAMAPI_API bool SteamAPI_ISteamInput_Init( ISteamInput* self, bool bExplicitlyCallRunFrame ); STEAMAPI_API bool SteamAPI_ISteamInput_Init( ISteamInput* self, bool bExplicitlyCallRunFrame );
STEAMAPI_API bool SteamAPI_ISteamInput_Shutdown( ISteamInput* self ); STEAMAPI_API bool SteamAPI_ISteamInput_Shutdown( ISteamInput* self );
STEAMAPI_API bool SteamAPI_ISteamInput_SetInputActionManifestFilePath( ISteamInput* self, const char * pchInputActionManifestAbsolutePath ); STEAMAPI_API bool SteamAPI_ISteamInput_SetInputActionManifestFilePath( ISteamInput* self, const char * pchInputActionManifestAbsolutePath );
@ -685,10 +682,8 @@ STEAMAPI_API bool SteamAPI_ISteamController_GetControllerBindingRevision( ISteam
// ISteamUGC // ISteamUGC
STEAMAPI_API ISteamUGC *SteamAPI_SteamUGC_v014(); STEAMAPI_API ISteamUGC *SteamAPI_SteamUGC_v014();
STEAMAPI_API ISteamUGC *SteamAPI_SteamUGC_v015(); STEAMAPI_API ISteamUGC *SteamAPI_SteamUGC_v015();
STEAMAPI_API ISteamUGC *SteamAPI_SteamUGC_v016();
STEAMAPI_API ISteamUGC *SteamAPI_SteamGameServerUGC_v014(); STEAMAPI_API ISteamUGC *SteamAPI_SteamGameServerUGC_v014();
STEAMAPI_API ISteamUGC *SteamAPI_SteamGameServerUGC_v015(); STEAMAPI_API ISteamUGC *SteamAPI_SteamGameServerUGC_v015();
STEAMAPI_API ISteamUGC *SteamAPI_SteamGameServerUGC_v016();
STEAMAPI_API UGCQueryHandle_t SteamAPI_ISteamUGC_CreateQueryUserUGCRequest( ISteamUGC* self, AccountID_t unAccountID, EUserUGCList eListType, EUGCMatchingUGCType eMatchingUGCType, EUserUGCListSortOrder eSortOrder, AppId_t nCreatorAppID, AppId_t nConsumerAppID, uint32 unPage ); STEAMAPI_API UGCQueryHandle_t SteamAPI_ISteamUGC_CreateQueryUserUGCRequest( ISteamUGC* self, AccountID_t unAccountID, EUserUGCList eListType, EUGCMatchingUGCType eMatchingUGCType, EUserUGCListSortOrder eSortOrder, AppId_t nCreatorAppID, AppId_t nConsumerAppID, uint32 unPage );
STEAMAPI_API UGCQueryHandle_t SteamAPI_ISteamUGC_CreateQueryAllUGCRequestPage( ISteamUGC* self, EUGCQuery eQueryType, EUGCMatchingUGCType eMatchingeMatchingUGCTypeFileType, AppId_t nCreatorAppID, AppId_t nConsumerAppID, uint32 unPage ); STEAMAPI_API UGCQueryHandle_t SteamAPI_ISteamUGC_CreateQueryAllUGCRequestPage( ISteamUGC* self, EUGCQuery eQueryType, EUGCMatchingUGCType eMatchingeMatchingUGCTypeFileType, AppId_t nCreatorAppID, AppId_t nConsumerAppID, uint32 unPage );
STEAMAPI_API UGCQueryHandle_t SteamAPI_ISteamUGC_CreateQueryAllUGCRequestCursor( ISteamUGC* self, EUGCQuery eQueryType, EUGCMatchingUGCType eMatchingeMatchingUGCTypeFileType, AppId_t nCreatorAppID, AppId_t nConsumerAppID, const char * pchCursor ); STEAMAPI_API UGCQueryHandle_t SteamAPI_ISteamUGC_CreateQueryAllUGCRequestCursor( ISteamUGC* self, EUGCQuery eQueryType, EUGCMatchingUGCType eMatchingeMatchingUGCTypeFileType, AppId_t nCreatorAppID, AppId_t nConsumerAppID, const char * pchCursor );
@ -725,8 +720,6 @@ STEAMAPI_API bool SteamAPI_ISteamUGC_SetCloudFileNameFilter( ISteamUGC* self, UG
STEAMAPI_API bool SteamAPI_ISteamUGC_SetMatchAnyTag( ISteamUGC* self, UGCQueryHandle_t handle, bool bMatchAnyTag ); STEAMAPI_API bool SteamAPI_ISteamUGC_SetMatchAnyTag( ISteamUGC* self, UGCQueryHandle_t handle, bool bMatchAnyTag );
STEAMAPI_API bool SteamAPI_ISteamUGC_SetSearchText( ISteamUGC* self, UGCQueryHandle_t handle, const char * pSearchText ); STEAMAPI_API bool SteamAPI_ISteamUGC_SetSearchText( ISteamUGC* self, UGCQueryHandle_t handle, const char * pSearchText );
STEAMAPI_API bool SteamAPI_ISteamUGC_SetRankedByTrendDays( ISteamUGC* self, UGCQueryHandle_t handle, uint32 unDays ); STEAMAPI_API bool SteamAPI_ISteamUGC_SetRankedByTrendDays( ISteamUGC* self, UGCQueryHandle_t handle, uint32 unDays );
STEAMAPI_API bool SteamAPI_ISteamUGC_SetTimeCreatedDateRange( ISteamUGC* self, UGCQueryHandle_t handle, RTime32 rtStart, RTime32 rtEnd );
STEAMAPI_API bool SteamAPI_ISteamUGC_SetTimeUpdatedDateRange( ISteamUGC* self, UGCQueryHandle_t handle, RTime32 rtStart, RTime32 rtEnd );
STEAMAPI_API bool SteamAPI_ISteamUGC_AddRequiredKeyValueTag( ISteamUGC* self, UGCQueryHandle_t handle, const char * pKey, const char * pValue ); STEAMAPI_API bool SteamAPI_ISteamUGC_AddRequiredKeyValueTag( ISteamUGC* self, UGCQueryHandle_t handle, const char * pKey, const char * pValue );
STEAMAPI_API SteamAPICall_t SteamAPI_ISteamUGC_RequestUGCDetails( ISteamUGC* self, PublishedFileId_t nPublishedFileID, uint32 unMaxAgeSeconds ); STEAMAPI_API SteamAPICall_t SteamAPI_ISteamUGC_RequestUGCDetails( ISteamUGC* self, PublishedFileId_t nPublishedFileID, uint32 unMaxAgeSeconds );
STEAMAPI_API SteamAPICall_t SteamAPI_ISteamUGC_CreateItem( ISteamUGC* self, AppId_t nConsumerAppId, EWorkshopFileType eFileType ); STEAMAPI_API SteamAPICall_t SteamAPI_ISteamUGC_CreateItem( ISteamUGC* self, AppId_t nConsumerAppId, EWorkshopFileType eFileType );
@ -915,10 +908,6 @@ STEAMAPI_API bool SteamAPI_ISteamNetworkingMessages_CloseChannelWithUser( ISteam
STEAMAPI_API ESteamNetworkingConnectionState SteamAPI_ISteamNetworkingMessages_GetSessionConnectionInfo( ISteamNetworkingMessages* self, const SteamNetworkingIdentity & identityRemote, SteamNetConnectionInfo_t * pConnectionInfo, SteamNetworkingQuickConnectionStatus * pQuickStatus ); STEAMAPI_API ESteamNetworkingConnectionState SteamAPI_ISteamNetworkingMessages_GetSessionConnectionInfo( ISteamNetworkingMessages* self, const SteamNetworkingIdentity & identityRemote, SteamNetConnectionInfo_t * pConnectionInfo, SteamNetworkingQuickConnectionStatus * pQuickStatus );
// ISteamNetworkingSockets // ISteamNetworkingSockets
STEAMAPI_API ISteamNetworkingSockets *SteamAPI_SteamNetworkingSockets_SteamAPI_v012();
STEAMAPI_API ISteamNetworkingSockets *SteamAPI_SteamGameServerNetworkingSockets_SteamAPI_v012();
STEAMAPI_API ISteamNetworkingSockets *SteamAPI_SteamNetworkingSockets_SteamAPI_v011();
STEAMAPI_API ISteamNetworkingSockets *SteamAPI_SteamGameServerNetworkingSockets_SteamAPI_v011();
STEAMAPI_API ISteamNetworkingSockets *SteamAPI_SteamNetworkingSockets_SteamAPI_v009(); STEAMAPI_API ISteamNetworkingSockets *SteamAPI_SteamNetworkingSockets_SteamAPI_v009();
STEAMAPI_API ISteamNetworkingSockets *SteamAPI_SteamGameServerNetworkingSockets_SteamAPI_v009(); STEAMAPI_API ISteamNetworkingSockets *SteamAPI_SteamGameServerNetworkingSockets_SteamAPI_v009();
STEAMAPI_API ISteamNetworkingSockets *SteamAPI_SteamNetworkingSockets_v009(); STEAMAPI_API ISteamNetworkingSockets *SteamAPI_SteamNetworkingSockets_v009();
@ -941,12 +930,10 @@ STEAMAPI_API void SteamAPI_ISteamNetworkingSockets_SendMessages( ISteamNetworkin
STEAMAPI_API EResult SteamAPI_ISteamNetworkingSockets_FlushMessagesOnConnection( ISteamNetworkingSockets* self, HSteamNetConnection hConn ); STEAMAPI_API EResult SteamAPI_ISteamNetworkingSockets_FlushMessagesOnConnection( ISteamNetworkingSockets* self, HSteamNetConnection hConn );
STEAMAPI_API int SteamAPI_ISteamNetworkingSockets_ReceiveMessagesOnConnection( ISteamNetworkingSockets* self, HSteamNetConnection hConn, SteamNetworkingMessage_t ** ppOutMessages, int nMaxMessages ); STEAMAPI_API int SteamAPI_ISteamNetworkingSockets_ReceiveMessagesOnConnection( ISteamNetworkingSockets* self, HSteamNetConnection hConn, SteamNetworkingMessage_t ** ppOutMessages, int nMaxMessages );
STEAMAPI_API bool SteamAPI_ISteamNetworkingSockets_GetConnectionInfo( ISteamNetworkingSockets* self, HSteamNetConnection hConn, SteamNetConnectionInfo_t * pInfo ); STEAMAPI_API bool SteamAPI_ISteamNetworkingSockets_GetConnectionInfo( ISteamNetworkingSockets* self, HSteamNetConnection hConn, SteamNetConnectionInfo_t * pInfo );
STEAMAPI_API EResult SteamAPI_ISteamNetworkingSockets_GetConnectionRealTimeStatus( ISteamNetworkingSockets* self, HSteamNetConnection hConn, SteamNetConnectionRealTimeStatus_t * pStatus, int nLanes, SteamNetConnectionRealTimeLaneStatus_t * pLanes ); STEAMAPI_API bool SteamAPI_ISteamNetworkingSockets_GetQuickConnectionStatus( ISteamNetworkingSockets* self, HSteamNetConnection hConn, SteamNetworkingQuickConnectionStatus * pStats );
STEAMAPI_API bool SteamAPI_ISteamNetworkingSockets_GetQuickConnectionStatus( ISteamNetworkingSockets009* self, HSteamNetConnection hConn, SteamNetworkingQuickConnectionStatus * pStats );
STEAMAPI_API int SteamAPI_ISteamNetworkingSockets_GetDetailedConnectionStatus( ISteamNetworkingSockets* self, HSteamNetConnection hConn, char * pszBuf, int cbBuf ); STEAMAPI_API int SteamAPI_ISteamNetworkingSockets_GetDetailedConnectionStatus( ISteamNetworkingSockets* self, HSteamNetConnection hConn, char * pszBuf, int cbBuf );
STEAMAPI_API bool SteamAPI_ISteamNetworkingSockets_GetListenSocketAddress( ISteamNetworkingSockets* self, HSteamListenSocket hSocket, SteamNetworkingIPAddr * address ); STEAMAPI_API bool SteamAPI_ISteamNetworkingSockets_GetListenSocketAddress( ISteamNetworkingSockets* self, HSteamListenSocket hSocket, SteamNetworkingIPAddr * address );
STEAMAPI_API bool SteamAPI_ISteamNetworkingSockets_CreateSocketPair( ISteamNetworkingSockets* self, HSteamNetConnection * pOutConnection1, HSteamNetConnection * pOutConnection2, bool bUseNetworkLoopback, const SteamNetworkingIdentity * pIdentity1, const SteamNetworkingIdentity * pIdentity2 ); STEAMAPI_API bool SteamAPI_ISteamNetworkingSockets_CreateSocketPair( ISteamNetworkingSockets* self, HSteamNetConnection * pOutConnection1, HSteamNetConnection * pOutConnection2, bool bUseNetworkLoopback, const SteamNetworkingIdentity * pIdentity1, const SteamNetworkingIdentity * pIdentity2 );
STEAMAPI_API EResult SteamAPI_ISteamNetworkingSockets_ConfigureConnectionLanes( ISteamNetworkingSockets* self, HSteamNetConnection hConn, int nNumLanes, const int * pLanePriorities, const uint16 * pLaneWeights );
STEAMAPI_API bool SteamAPI_ISteamNetworkingSockets_GetIdentity( ISteamNetworkingSockets* self, SteamNetworkingIdentity * pIdentity ); STEAMAPI_API bool SteamAPI_ISteamNetworkingSockets_GetIdentity( ISteamNetworkingSockets* self, SteamNetworkingIdentity * pIdentity );
STEAMAPI_API ESteamNetworkingAvailability SteamAPI_ISteamNetworkingSockets_InitAuthentication( ISteamNetworkingSockets* self ); STEAMAPI_API ESteamNetworkingAvailability SteamAPI_ISteamNetworkingSockets_InitAuthentication( ISteamNetworkingSockets* self );
STEAMAPI_API ESteamNetworkingAvailability SteamAPI_ISteamNetworkingSockets_GetAuthenticationStatus( ISteamNetworkingSockets* self, SteamNetAuthenticationStatus_t * pDetails ); STEAMAPI_API ESteamNetworkingAvailability SteamAPI_ISteamNetworkingSockets_GetAuthenticationStatus( ISteamNetworkingSockets* self, SteamNetAuthenticationStatus_t * pDetails );
@ -966,13 +953,7 @@ STEAMAPI_API HSteamNetConnection SteamAPI_ISteamNetworkingSockets_ConnectP2PCust
STEAMAPI_API bool SteamAPI_ISteamNetworkingSockets_ReceivedP2PCustomSignal( ISteamNetworkingSockets* self, const void * pMsg, int cbMsg, ISteamNetworkingCustomSignalingRecvContext * pContext ); STEAMAPI_API bool SteamAPI_ISteamNetworkingSockets_ReceivedP2PCustomSignal( ISteamNetworkingSockets* self, const void * pMsg, int cbMsg, ISteamNetworkingCustomSignalingRecvContext * pContext );
STEAMAPI_API bool SteamAPI_ISteamNetworkingSockets_GetCertificateRequest( ISteamNetworkingSockets* self, int * pcbBlob, void * pBlob, SteamNetworkingErrMsg & errMsg ); STEAMAPI_API bool SteamAPI_ISteamNetworkingSockets_GetCertificateRequest( ISteamNetworkingSockets* self, int * pcbBlob, void * pBlob, SteamNetworkingErrMsg & errMsg );
STEAMAPI_API bool SteamAPI_ISteamNetworkingSockets_SetCertificate( ISteamNetworkingSockets* self, const void * pCertificate, int cbCertificate, SteamNetworkingErrMsg & errMsg ); STEAMAPI_API bool SteamAPI_ISteamNetworkingSockets_SetCertificate( ISteamNetworkingSockets* self, const void * pCertificate, int cbCertificate, SteamNetworkingErrMsg & errMsg );
STEAMAPI_API void SteamAPI_ISteamNetworkingSockets_ResetIdentity( ISteamNetworkingSockets* self, const SteamNetworkingIdentity * pIdentity );
STEAMAPI_API void SteamAPI_ISteamNetworkingSockets_RunCallbacks( ISteamNetworkingSockets* self ); STEAMAPI_API void SteamAPI_ISteamNetworkingSockets_RunCallbacks( ISteamNetworkingSockets* self );
STEAMAPI_API bool SteamAPI_ISteamNetworkingSockets_BeginAsyncRequestFakeIP( ISteamNetworkingSockets* self, int nNumPorts );
STEAMAPI_API void SteamAPI_ISteamNetworkingSockets_GetFakeIP( ISteamNetworkingSockets* self, int idxFirstPort, SteamNetworkingFakeIPResult_t * pInfo );
STEAMAPI_API HSteamListenSocket SteamAPI_ISteamNetworkingSockets_CreateListenSocketP2PFakeIP( ISteamNetworkingSockets* self, int idxFakePort, int nOptions, const SteamNetworkingConfigValue_t * pOptions );
STEAMAPI_API EResult SteamAPI_ISteamNetworkingSockets_GetRemoteFakeIPForConnection( ISteamNetworkingSockets* self, HSteamNetConnection hConn, SteamNetworkingIPAddr * pOutAddr );
STEAMAPI_API ISteamNetworkingFakeUDPPort * SteamAPI_ISteamNetworkingSockets_CreateFakeUDPPort( ISteamNetworkingSockets* self, int idxFakeServerPort );
// ISteamNetworkingConnectionCustomSignaling // ISteamNetworkingConnectionCustomSignaling
STEAMAPI_API bool SteamAPI_ISteamNetworkingConnectionCustomSignaling_SendSignal( ISteamNetworkingConnectionCustomSignaling* self, HSteamNetConnection hConn, const SteamNetConnectionInfo_t & info, const void * pMsg, int cbMsg ); STEAMAPI_API bool SteamAPI_ISteamNetworkingConnectionCustomSignaling_SendSignal( ISteamNetworkingConnectionCustomSignaling* self, HSteamNetConnection hConn, const SteamNetConnectionInfo_t & info, const void * pMsg, int cbMsg );
@ -1001,9 +982,6 @@ STEAMAPI_API int SteamAPI_ISteamNetworkingUtils_GetPOPCount( ISteamNetworkingUti
STEAMAPI_API int SteamAPI_ISteamNetworkingUtils_GetPOPList( ISteamNetworkingUtils* self, SteamNetworkingPOPID * list, int nListSz ); STEAMAPI_API int SteamAPI_ISteamNetworkingUtils_GetPOPList( ISteamNetworkingUtils* self, SteamNetworkingPOPID * list, int nListSz );
STEAMAPI_API SteamNetworkingMicroseconds SteamAPI_ISteamNetworkingUtils_GetLocalTimestamp( ISteamNetworkingUtils* self ); STEAMAPI_API SteamNetworkingMicroseconds SteamAPI_ISteamNetworkingUtils_GetLocalTimestamp( ISteamNetworkingUtils* self );
STEAMAPI_API void SteamAPI_ISteamNetworkingUtils_SetDebugOutputFunction( ISteamNetworkingUtils* self, ESteamNetworkingSocketsDebugOutputType eDetailLevel, FSteamNetworkingSocketsDebugOutput pfnFunc ); STEAMAPI_API void SteamAPI_ISteamNetworkingUtils_SetDebugOutputFunction( ISteamNetworkingUtils* self, ESteamNetworkingSocketsDebugOutputType eDetailLevel, FSteamNetworkingSocketsDebugOutput pfnFunc );
STEAMAPI_API bool SteamAPI_ISteamNetworkingUtils_IsFakeIPv4( ISteamNetworkingUtils* self, uint32 nIPv4 );
STEAMAPI_API ESteamNetworkingFakeIPType SteamAPI_ISteamNetworkingUtils_GetIPv4FakeIPType( ISteamNetworkingUtils* self, uint32 nIPv4 );
STEAMAPI_API EResult SteamAPI_ISteamNetworkingUtils_GetRealIdentityForFakeIP( ISteamNetworkingUtils* self, const SteamNetworkingIPAddr & fakeIP, SteamNetworkingIdentity * pOutRealIdentity );
STEAMAPI_API bool SteamAPI_ISteamNetworkingUtils_SetGlobalConfigValueInt32( ISteamNetworkingUtils* self, ESteamNetworkingConfigValue eValue, int32 val ); STEAMAPI_API bool SteamAPI_ISteamNetworkingUtils_SetGlobalConfigValueInt32( ISteamNetworkingUtils* self, ESteamNetworkingConfigValue eValue, int32 val );
STEAMAPI_API bool SteamAPI_ISteamNetworkingUtils_SetGlobalConfigValueFloat( ISteamNetworkingUtils* self, ESteamNetworkingConfigValue eValue, float val ); STEAMAPI_API bool SteamAPI_ISteamNetworkingUtils_SetGlobalConfigValueFloat( ISteamNetworkingUtils* self, ESteamNetworkingConfigValue eValue, float val );
STEAMAPI_API bool SteamAPI_ISteamNetworkingUtils_SetGlobalConfigValueString( ISteamNetworkingUtils* self, ESteamNetworkingConfigValue eValue, const char * val ); STEAMAPI_API bool SteamAPI_ISteamNetworkingUtils_SetGlobalConfigValueString( ISteamNetworkingUtils* self, ESteamNetworkingConfigValue eValue, const char * val );
@ -1014,18 +992,15 @@ STEAMAPI_API bool SteamAPI_ISteamNetworkingUtils_SetConnectionConfigValueString(
STEAMAPI_API bool SteamAPI_ISteamNetworkingUtils_SetGlobalCallback_SteamNetConnectionStatusChanged( ISteamNetworkingUtils* self, FnSteamNetConnectionStatusChanged fnCallback ); STEAMAPI_API bool SteamAPI_ISteamNetworkingUtils_SetGlobalCallback_SteamNetConnectionStatusChanged( ISteamNetworkingUtils* self, FnSteamNetConnectionStatusChanged fnCallback );
STEAMAPI_API bool SteamAPI_ISteamNetworkingUtils_SetGlobalCallback_SteamNetAuthenticationStatusChanged( ISteamNetworkingUtils* self, FnSteamNetAuthenticationStatusChanged fnCallback ); STEAMAPI_API bool SteamAPI_ISteamNetworkingUtils_SetGlobalCallback_SteamNetAuthenticationStatusChanged( ISteamNetworkingUtils* self, FnSteamNetAuthenticationStatusChanged fnCallback );
STEAMAPI_API bool SteamAPI_ISteamNetworkingUtils_SetGlobalCallback_SteamRelayNetworkStatusChanged( ISteamNetworkingUtils* self, FnSteamRelayNetworkStatusChanged fnCallback ); STEAMAPI_API bool SteamAPI_ISteamNetworkingUtils_SetGlobalCallback_SteamRelayNetworkStatusChanged( ISteamNetworkingUtils* self, FnSteamRelayNetworkStatusChanged fnCallback );
STEAMAPI_API bool SteamAPI_ISteamNetworkingUtils_SetGlobalCallback_FakeIPResult( ISteamNetworkingUtils* self, FnSteamNetworkingFakeIPResult fnCallback );
STEAMAPI_API bool SteamAPI_ISteamNetworkingUtils_SetGlobalCallback_MessagesSessionRequest( ISteamNetworkingUtils* self, FnSteamNetworkingMessagesSessionRequest fnCallback ); STEAMAPI_API bool SteamAPI_ISteamNetworkingUtils_SetGlobalCallback_MessagesSessionRequest( ISteamNetworkingUtils* self, FnSteamNetworkingMessagesSessionRequest fnCallback );
STEAMAPI_API bool SteamAPI_ISteamNetworkingUtils_SetGlobalCallback_MessagesSessionFailed( ISteamNetworkingUtils* self, FnSteamNetworkingMessagesSessionFailed fnCallback ); STEAMAPI_API bool SteamAPI_ISteamNetworkingUtils_SetGlobalCallback_MessagesSessionFailed( ISteamNetworkingUtils* self, FnSteamNetworkingMessagesSessionFailed fnCallback );
STEAMAPI_API bool SteamAPI_ISteamNetworkingUtils_SetConfigValue( ISteamNetworkingUtils* self, ESteamNetworkingConfigValue eValue, ESteamNetworkingConfigScope eScopeType, intptr_t scopeObj, ESteamNetworkingConfigDataType eDataType, const void * pArg ); STEAMAPI_API bool SteamAPI_ISteamNetworkingUtils_SetConfigValue( ISteamNetworkingUtils* self, ESteamNetworkingConfigValue eValue, ESteamNetworkingConfigScope eScopeType, intptr_t scopeObj, ESteamNetworkingConfigDataType eDataType, const void * pArg );
STEAMAPI_API bool SteamAPI_ISteamNetworkingUtils_SetConfigValueStruct( ISteamNetworkingUtils* self, const SteamNetworkingConfigValue_t & opt, ESteamNetworkingConfigScope eScopeType, intptr_t scopeObj ); STEAMAPI_API bool SteamAPI_ISteamNetworkingUtils_SetConfigValueStruct( ISteamNetworkingUtils* self, const SteamNetworkingConfigValue_t & opt, ESteamNetworkingConfigScope eScopeType, intptr_t scopeObj );
STEAMAPI_API ESteamNetworkingGetConfigValueResult SteamAPI_ISteamNetworkingUtils_GetConfigValue( ISteamNetworkingUtils* self, ESteamNetworkingConfigValue eValue, ESteamNetworkingConfigScope eScopeType, intptr_t scopeObj, ESteamNetworkingConfigDataType * pOutDataType, void * pResult, size_t * cbResult ); STEAMAPI_API ESteamNetworkingGetConfigValueResult SteamAPI_ISteamNetworkingUtils_GetConfigValue( ISteamNetworkingUtils* self, ESteamNetworkingConfigValue eValue, ESteamNetworkingConfigScope eScopeType, intptr_t scopeObj, ESteamNetworkingConfigDataType * pOutDataType, void * pResult, size_t * cbResult );
STEAMAPI_API const char * SteamAPI_ISteamNetworkingUtils_GetConfigValueInfo( ISteamNetworkingUtils* self, ESteamNetworkingConfigValue eValue, ESteamNetworkingConfigDataType * pOutDataType, ESteamNetworkingConfigScope * pOutScope ); STEAMAPI_API bool SteamAPI_ISteamNetworkingUtils_GetConfigValueInfo( ISteamNetworkingUtils* self, ESteamNetworkingConfigValue eValue, const char ** pOutName, ESteamNetworkingConfigDataType * pOutDataType, ESteamNetworkingConfigScope * pOutScope, ESteamNetworkingConfigValue * pOutNextValue );
STEAMAPI_API ESteamNetworkingConfigValue SteamAPI_ISteamNetworkingUtils_GetFirstConfigValue( ISteamNetworkingUtils* self ); STEAMAPI_API ESteamNetworkingConfigValue SteamAPI_ISteamNetworkingUtils_GetFirstConfigValue( ISteamNetworkingUtils* self );
STEAMAPI_API ESteamNetworkingConfigValue SteamAPI_ISteamNetworkingUtils_IterateGenericEditableConfigValues( ISteamNetworkingUtils* self, ESteamNetworkingConfigValue eCurrent, bool bEnumerateDevVars );
STEAMAPI_API void SteamAPI_ISteamNetworkingUtils_SteamNetworkingIPAddr_ToString( ISteamNetworkingUtils* self, const SteamNetworkingIPAddr & addr, char * buf, uint32 cbBuf, bool bWithPort ); STEAMAPI_API void SteamAPI_ISteamNetworkingUtils_SteamNetworkingIPAddr_ToString( ISteamNetworkingUtils* self, const SteamNetworkingIPAddr & addr, char * buf, uint32 cbBuf, bool bWithPort );
STEAMAPI_API bool SteamAPI_ISteamNetworkingUtils_SteamNetworkingIPAddr_ParseString( ISteamNetworkingUtils* self, SteamNetworkingIPAddr * pAddr, const char * pszStr ); STEAMAPI_API bool SteamAPI_ISteamNetworkingUtils_SteamNetworkingIPAddr_ParseString( ISteamNetworkingUtils* self, SteamNetworkingIPAddr * pAddr, const char * pszStr );
STEAMAPI_API ESteamNetworkingFakeIPType SteamAPI_ISteamNetworkingUtils_SteamNetworkingIPAddr_GetFakeIPType( ISteamNetworkingUtils* self, const SteamNetworkingIPAddr & addr );
STEAMAPI_API void SteamAPI_ISteamNetworkingUtils_SteamNetworkingIdentity_ToString( ISteamNetworkingUtils* self, const SteamNetworkingIdentity & identity, char * buf, uint32 cbBuf ); STEAMAPI_API void SteamAPI_ISteamNetworkingUtils_SteamNetworkingIdentity_ToString( ISteamNetworkingUtils* self, const SteamNetworkingIdentity & identity, char * buf, uint32 cbBuf );
STEAMAPI_API bool SteamAPI_ISteamNetworkingUtils_SteamNetworkingIdentity_ParseString( ISteamNetworkingUtils* self, SteamNetworkingIdentity * pIdentity, const char * pszStr ); STEAMAPI_API bool SteamAPI_ISteamNetworkingUtils_SteamNetworkingIdentity_ParseString( ISteamNetworkingUtils* self, SteamNetworkingIdentity * pIdentity, const char * pszStr );
@ -1093,12 +1068,6 @@ STEAMAPI_API bool SteamAPI_ISteamGameServerStats_SetUserAchievement( ISteamGameS
STEAMAPI_API bool SteamAPI_ISteamGameServerStats_ClearUserAchievement( ISteamGameServerStats* self, uint64_steamid steamIDUser, const char * pchName ); STEAMAPI_API bool SteamAPI_ISteamGameServerStats_ClearUserAchievement( ISteamGameServerStats* self, uint64_steamid steamIDUser, const char * pchName );
STEAMAPI_API SteamAPICall_t SteamAPI_ISteamGameServerStats_StoreUserStats( ISteamGameServerStats* self, uint64_steamid steamIDUser ); STEAMAPI_API SteamAPICall_t SteamAPI_ISteamGameServerStats_StoreUserStats( ISteamGameServerStats* self, uint64_steamid steamIDUser );
// ISteamNetworkingFakeUDPPort
STEAMAPI_API void SteamAPI_ISteamNetworkingFakeUDPPort_DestroyFakeUDPPort( ISteamNetworkingFakeUDPPort* self );
STEAMAPI_API EResult SteamAPI_ISteamNetworkingFakeUDPPort_SendMessageToFakeIP( ISteamNetworkingFakeUDPPort* self, const SteamNetworkingIPAddr & remoteAddress, const void * pData, uint32 cbData, int nSendFlags );
STEAMAPI_API int SteamAPI_ISteamNetworkingFakeUDPPort_ReceiveMessages( ISteamNetworkingFakeUDPPort* self, SteamNetworkingMessage_t ** ppOutMessages, int nMaxMessages );
STEAMAPI_API void SteamAPI_ISteamNetworkingFakeUDPPort_ScheduleCleanup( ISteamNetworkingFakeUDPPort* self, const SteamNetworkingIPAddr & remoteAddress );
// SteamIPAddress_t // SteamIPAddress_t
STEAMAPI_API bool SteamAPI_SteamIPAddress_t_IsSet( SteamIPAddress_t* self ); STEAMAPI_API bool SteamAPI_SteamIPAddress_t_IsSet( SteamIPAddress_t* self );
@ -1136,8 +1105,6 @@ STEAMAPI_API bool SteamAPI_SteamNetworkingIPAddr_IsLocalHost( SteamNetworkingIPA
STEAMAPI_API void SteamAPI_SteamNetworkingIPAddr_ToString( SteamNetworkingIPAddr* self, char * buf, uint32 cbBuf, bool bWithPort ); STEAMAPI_API void SteamAPI_SteamNetworkingIPAddr_ToString( SteamNetworkingIPAddr* self, char * buf, uint32 cbBuf, bool bWithPort );
STEAMAPI_API bool SteamAPI_SteamNetworkingIPAddr_ParseString( SteamNetworkingIPAddr* self, const char * pszStr ); STEAMAPI_API bool SteamAPI_SteamNetworkingIPAddr_ParseString( SteamNetworkingIPAddr* self, const char * pszStr );
STEAMAPI_API bool SteamAPI_SteamNetworkingIPAddr_IsEqualTo( SteamNetworkingIPAddr* self, const SteamNetworkingIPAddr & x ); STEAMAPI_API bool SteamAPI_SteamNetworkingIPAddr_IsEqualTo( SteamNetworkingIPAddr* self, const SteamNetworkingIPAddr & x );
STEAMAPI_API ESteamNetworkingFakeIPType SteamAPI_SteamNetworkingIPAddr_GetFakeIPType( SteamNetworkingIPAddr* self );
STEAMAPI_API bool SteamAPI_SteamNetworkingIPAddr_IsFakeIP( SteamNetworkingIPAddr* self );
// SteamNetworkingIdentity // SteamNetworkingIdentity
STEAMAPI_API void SteamAPI_SteamNetworkingIdentity_Clear( SteamNetworkingIdentity* self ); STEAMAPI_API void SteamAPI_SteamNetworkingIdentity_Clear( SteamNetworkingIdentity* self );
@ -1154,10 +1121,6 @@ STEAMAPI_API void SteamAPI_SteamNetworkingIdentity_SetStadiaID( SteamNetworkingI
STEAMAPI_API uint64 SteamAPI_SteamNetworkingIdentity_GetStadiaID( SteamNetworkingIdentity* self ); STEAMAPI_API uint64 SteamAPI_SteamNetworkingIdentity_GetStadiaID( SteamNetworkingIdentity* self );
STEAMAPI_API void SteamAPI_SteamNetworkingIdentity_SetIPAddr( SteamNetworkingIdentity* self, const SteamNetworkingIPAddr & addr ); STEAMAPI_API void SteamAPI_SteamNetworkingIdentity_SetIPAddr( SteamNetworkingIdentity* self, const SteamNetworkingIPAddr & addr );
STEAMAPI_API const SteamNetworkingIPAddr * SteamAPI_SteamNetworkingIdentity_GetIPAddr( SteamNetworkingIdentity* self ); STEAMAPI_API const SteamNetworkingIPAddr * SteamAPI_SteamNetworkingIdentity_GetIPAddr( SteamNetworkingIdentity* self );
STEAMAPI_API void SteamAPI_SteamNetworkingIdentity_SetIPv4Addr( SteamNetworkingIdentity* self, uint32 nIPv4, uint16 nPort );
STEAMAPI_API uint32 SteamAPI_SteamNetworkingIdentity_GetIPv4( SteamNetworkingIdentity* self );
STEAMAPI_API ESteamNetworkingFakeIPType SteamAPI_SteamNetworkingIdentity_GetFakeIPType( SteamNetworkingIdentity* self );
STEAMAPI_API bool SteamAPI_SteamNetworkingIdentity_IsFakeIP( SteamNetworkingIdentity* self );
STEAMAPI_API void SteamAPI_SteamNetworkingIdentity_SetLocalHost( SteamNetworkingIdentity* self ); STEAMAPI_API void SteamAPI_SteamNetworkingIdentity_SetLocalHost( SteamNetworkingIdentity* self );
STEAMAPI_API bool SteamAPI_SteamNetworkingIdentity_IsLocalHost( SteamNetworkingIdentity* self ); STEAMAPI_API bool SteamAPI_SteamNetworkingIdentity_IsLocalHost( SteamNetworkingIdentity* self );
STEAMAPI_API bool SteamAPI_SteamNetworkingIdentity_SetGenericString( SteamNetworkingIdentity* self, const char * pszString ); STEAMAPI_API bool SteamAPI_SteamNetworkingIdentity_SetGenericString( SteamNetworkingIdentity* self, const char * pszString );

View File

@ -265,7 +265,6 @@ enum { k_iSteamNetworkingSocketsCallbacks = 1220 };
enum { k_iSteamNetworkingMessagesCallbacks = 1250 }; enum { k_iSteamNetworkingMessagesCallbacks = 1250 };
enum { k_iSteamNetworkingUtilsCallbacks = 1280 }; enum { k_iSteamNetworkingUtilsCallbacks = 1280 };
enum { k_iClientRemoteStorageCallbacks = 1300 }; enum { k_iClientRemoteStorageCallbacks = 1300 };
enum { k_iSteamRemoteStorageCallbacks = 1300 };
enum { k_iClientDepotBuilderCallbacks = 1400 }; enum { k_iClientDepotBuilderCallbacks = 1400 };
enum { k_iSteamGameServerItemsCallbacks = 1500 }; enum { k_iSteamGameServerItemsCallbacks = 1500 };
enum { k_iClientUtilsCallbacks = 1600 }; enum { k_iClientUtilsCallbacks = 1600 };
@ -274,7 +273,6 @@ enum { k_iSteamGameServerStatsCallbacks = 1800 };
enum { k_iSteam2AsyncCallbacks = 1900 }; enum { k_iSteam2AsyncCallbacks = 1900 };
enum { k_iSteamGameStatsCallbacks = 2000 }; enum { k_iSteamGameStatsCallbacks = 2000 };
enum { k_iClientHTTPCallbacks = 2100 }; enum { k_iClientHTTPCallbacks = 2100 };
enum { k_iSteamHTTPCallbacks = 2100 };
enum { k_iClientScreenshotsCallbacks = 2200 }; enum { k_iClientScreenshotsCallbacks = 2200 };
enum { k_iSteamScreenshotsCallbacks = 2300 }; enum { k_iSteamScreenshotsCallbacks = 2300 };
enum { k_iClientAudioCallbacks = 2400 }; enum { k_iClientAudioCallbacks = 2400 };
@ -288,7 +286,6 @@ enum { k_iClientNetworkDeviceManagerCallbacks = 3100 };
enum { k_iClientMusicCallbacks = 3200 }; enum { k_iClientMusicCallbacks = 3200 };
enum { k_iClientRemoteClientManagerCallbacks = 3300 }; enum { k_iClientRemoteClientManagerCallbacks = 3300 };
enum { k_iClientUGCCallbacks = 3400 }; enum { k_iClientUGCCallbacks = 3400 };
enum { k_iSteamUGCCallbacks = 3400 };
enum { k_iSteamStreamClientCallbacks = 3500 }; enum { k_iSteamStreamClientCallbacks = 3500 };
enum { k_IClientProductBuilderCallbacks = 3600 }; enum { k_IClientProductBuilderCallbacks = 3600 };
enum { k_iClientShortcutsCallbacks = 3700 }; enum { k_iClientShortcutsCallbacks = 3700 };
@ -301,9 +298,7 @@ enum { k_iClientGameNotificationCallbacks = 4300 };
enum { k_iSteamGameNotificationCallbacks = 4400 }; enum { k_iSteamGameNotificationCallbacks = 4400 };
enum { k_iSteamHTMLSurfaceCallbacks = 4500 }; enum { k_iSteamHTMLSurfaceCallbacks = 4500 };
enum { k_iClientVideoCallbacks = 4600 }; enum { k_iClientVideoCallbacks = 4600 };
enum { k_iSteamVideoCallbacks = 4600 };
enum { k_iClientInventoryCallbacks = 4700 }; enum { k_iClientInventoryCallbacks = 4700 };
enum { k_iSteamInventoryCallbacks = 4700 };
enum { k_iClientBluetoothManagerCallbacks = 4800 }; enum { k_iClientBluetoothManagerCallbacks = 4800 };
enum { k_iClientSharedConnectionCallbacks = 4900 }; enum { k_iClientSharedConnectionCallbacks = 4900 };
enum { k_ISteamParentalSettingsCallbacks = 5000 }; enum { k_ISteamParentalSettingsCallbacks = 5000 };

View File

@ -1,6 +1,6 @@
//========= Copyright <20> 1996-2008, Valve LLC, All rights reserved. ============ //========= Copyright <20> 1996-2008, Valve LLC, All rights reserved. ============
// //
// Declare common types used by the Steamworks SDK. // Purpose:
// //
//============================================================================= //=============================================================================
@ -148,7 +148,6 @@ enum EResult
k_EResultSteamRealmMismatch = 120, // The user's realm does not match the realm of the requested resource k_EResultSteamRealmMismatch = 120, // The user's realm does not match the realm of the requested resource
k_EResultInvalidSignature = 121, // signature check did not match k_EResultInvalidSignature = 121, // signature check did not match
k_EResultParseFailure = 122, // Failed to parse input k_EResultParseFailure = 122, // Failed to parse input
k_EResultNoVerifiedPhone = 123, // account does not have a verified phone number
}; };
// Error codes for use with the voice functions // Error codes for use with the voice functions

View File

@ -1,135 +0,0 @@
//====== Copyright Valve Corporation, All rights reserved. ====================
#ifndef STEAMNETWORKINGFAKEIP_H
#define STEAMNETWORKINGFAKEIP_H
#include "steamnetworkingtypes.h"
#include "steam_api_common.h"
// It is HIGHLY recommended to limit messages sent via Fake UDP port to this
// value. The purpose of a Fake UDP port is to make porting ordinary ad-hoc UDP
// code easier. Although the real MTU might be higher than this, this particular
// conservative value is chosen so that fragmentation won't be occurring and
// hiding performance problems from you.
constexpr int k_cbSteamNetworkingSocketsFakeUDPPortRecommendedMTU = 1200;
// Messages larger than this size are not allowed and cannot be sent
// via Fake UDP port.
constexpr int k_cbSteamNetworkingSocketsFakeUDPPortMaxMessageSize = 4096;
//-----------------------------------------------------------------------------
/// ISteamNetworkingFakeUDPPort
///
/// Acts like a UDP port, sending and receiving datagrams addressed using
/// FakeIP addresses.
///
/// See: ISteamNetworkingSockets::CreateFakeUDPPort
class ISteamNetworkingFakeUDPPort
{
public:
/// Destroy the object and cleanup any internal connections.
/// Note that this function call is not threadsafe with respect
/// to any other method of this interface. (However, in general
/// all other operations are threadsafe with respect to each other.)
virtual void DestroyFakeUDPPort() = 0;
/// Send a datagram to the specified FakeIP.
///
/// See ISteamNetworkingSockets::SendMessageToConnection for the meaning of
/// nSendFlags and possible return codes.
///
/// Notes:
/// - datagrams larger than the underlying MTU are supported, but
/// reliable messages (k_nSteamNetworkingSend_Reliable) are not supported.
/// - You will usually want to use k_nSteamNetworkingSend_NoNagle
/// - k_EResultBusy is returned if this is a "server" port and the global
/// allocation has not yet completed.
/// - k_EResultIPNotFound will be returned if the address is a local/ephemeral
/// address and no existing connection can be found. This can happen if
/// the remote host contacted us without having a global address, and we
/// assigned them a random local address, and then the session with
/// that host timed out.
/// - When initiating communications, the first messages may be sent
/// via backend signaling, or otherwise delayed, while a route is found.
/// Expect the ping time to fluctuate during this period, and it's possible
/// that messages will be delivered out of order (which is also possible with
/// ordinary UDP).
virtual EResult SendMessageToFakeIP( const SteamNetworkingIPAddr &remoteAddress, const void *pData, uint32 cbData, int nSendFlags ) = 0;
/// Receive messages on the port.
///
/// Returns the number of messages returned into your array, up to nMaxMessages.
///
/// SteamNetworkingMessage_t::m_identity in the returned message(s) will always contain
/// a FakeIP. See ISteamNetworkingUtils::GetRealIdentityForFakeIP.
virtual int ReceiveMessages( SteamNetworkingMessage_t **ppOutMessages, int nMaxMessages ) = 0;
/// Schedule the internal connection for a given peer to be cleaned up in a few seconds.
///
/// Idle connections automatically time out, and so this is not strictly *necessary*,
/// but if you have reason to believe that you are done talking to a given peer for
/// a while, you can call this to speed up the timeout. If any remaining packets are
/// sent or received from the peer, the cleanup is canceled and the usual timeout
/// value is restored. Thus you will usually call this immediately after sending
/// or receiving application-layer "close connection" packets.
virtual void ScheduleCleanup( const SteamNetworkingIPAddr &remoteAddress ) = 0;
};
#define STEAMNETWORKINGFAKEUDPPORT_INTERFACE_VERSION "SteamNetworkingFakeUDPPort001" /* for proton codegen */
/// Callback struct used to notify when a connection has changed state
#if defined( VALVE_CALLBACK_PACK_SMALL )
#pragma pack( push, 4 )
#elif defined( VALVE_CALLBACK_PACK_LARGE )
#pragma pack( push, 8 )
#else
#error "Must define VALVE_CALLBACK_PACK_SMALL or VALVE_CALLBACK_PACK_LARGE"
#endif
/// A struct used to describe a "fake IP" we have been assigned to
/// use as an identifier. This callback is posted when
/// ISteamNetworkingSoockets::BeginAsyncRequestFakeIP completes.
/// See also ISteamNetworkingSockets::GetFakeIP
struct SteamNetworkingFakeIPResult_t
{
enum { k_iCallback = k_iSteamNetworkingSocketsCallbacks + 3 };
/// Status/result of the allocation request. Possible failure values are:
/// - k_EResultBusy - you called GetFakeIP but the request has not completed.
/// - k_EResultInvalidParam - you called GetFakeIP with an invalid port index
/// - k_EResultLimitExceeded - You asked for too many ports, or made an
/// additional request after one had already succeeded
/// - k_EResultNoMatch - GetFakeIP was called, but no request has been made
///
/// Note that, with the exception of k_EResultBusy (if you are polling),
/// it is highly recommended to treat all failures as fatal.
EResult m_eResult;
/// Local identity of the ISteamNetworkingSockets object that made
/// this request and is assigned the IP. This is needed in the callback
/// in the case where there are multiple ISteamNetworkingSockets objects.
/// (E.g. one for the user, and another for the local gameserver).
SteamNetworkingIdentity m_identity;
/// Fake IPv4 IP address that we have been assigned. NOTE: this
/// IP address is not exclusively ours! Steam tries to avoid sharing
/// IP addresses, but this may not always be possible. The IP address
/// may be currently in use by another host, but with different port(s).
/// The exact same IP:port address may have been used previously.
/// Steam tries to avoid reusing ports until they have not been in use for
/// some time, but this may not always be possible.
uint32 m_unIP;
/// Port number(s) assigned to us. Only the first entries will contain
/// nonzero values. Entries corresponding to ports beyond what was
/// allocated for you will be zero.
///
/// (NOTE: At the time of this writing, the maximum number of ports you may
/// request is 4.)
enum { k_nMaxReturnPorts = 8 };
uint16 m_unPorts[k_nMaxReturnPorts];
};
#pragma pack( pop )
#endif // _H

View File

@ -57,14 +57,12 @@ struct SteamNetAuthenticationStatus_t;
struct SteamRelayNetworkStatus_t; struct SteamRelayNetworkStatus_t;
struct SteamNetworkingMessagesSessionRequest_t; struct SteamNetworkingMessagesSessionRequest_t;
struct SteamNetworkingMessagesSessionFailed_t; struct SteamNetworkingMessagesSessionFailed_t;
struct SteamNetworkingFakeIPResult_t;
typedef void (*FnSteamNetConnectionStatusChanged)( SteamNetConnectionStatusChangedCallback_t * ); typedef void (*FnSteamNetConnectionStatusChanged)( SteamNetConnectionStatusChangedCallback_t * );
typedef void (*FnSteamNetAuthenticationStatusChanged)( SteamNetAuthenticationStatus_t * ); typedef void (*FnSteamNetAuthenticationStatusChanged)( SteamNetAuthenticationStatus_t * );
typedef void (*FnSteamRelayNetworkStatusChanged)(SteamRelayNetworkStatus_t *); typedef void (*FnSteamRelayNetworkStatusChanged)(SteamRelayNetworkStatus_t *);
typedef void (*FnSteamNetworkingMessagesSessionRequest)(SteamNetworkingMessagesSessionRequest_t *); typedef void (*FnSteamNetworkingMessagesSessionRequest)(SteamNetworkingMessagesSessionRequest_t *);
typedef void (*FnSteamNetworkingMessagesSessionFailed)(SteamNetworkingMessagesSessionFailed_t *); typedef void (*FnSteamNetworkingMessagesSessionFailed)(SteamNetworkingMessagesSessionFailed_t *);
typedef void (*FnSteamNetworkingFakeIPResult)(SteamNetworkingFakeIPResult_t *);
/// Handle used to identify a connection to a remote host. /// Handle used to identify a connection to a remote host.
typedef uint32 HSteamNetConnection; typedef uint32 HSteamNetConnection;
@ -134,7 +132,7 @@ enum ESteamNetworkingAvailability
enum ESteamNetworkingIdentityType enum ESteamNetworkingIdentityType
{ {
// Dummy/empty/invalid. // Dummy/empty/invalid.
// Please note that if we parse a string that we don't recognize // Plese note that if we parse a string that we don't recognize
// but that appears reasonable, we will NOT use this type. Instead // but that appears reasonable, we will NOT use this type. Instead
// we'll use k_ESteamNetworkingIdentityType_UnknownType. // we'll use k_ESteamNetworkingIdentityType_UnknownType.
k_ESteamNetworkingIdentityType_Invalid = 0, k_ESteamNetworkingIdentityType_Invalid = 0,
@ -178,18 +176,6 @@ enum ESteamNetworkingIdentityType
k_ESteamNetworkingIdentityType__Force32bit = 0x7fffffff, k_ESteamNetworkingIdentityType__Force32bit = 0x7fffffff,
}; };
/// "Fake IPs" are assigned to hosts, to make it easier to interface with
/// older code that assumed all hosts will have an IPv4 address
enum ESteamNetworkingFakeIPType
{
k_ESteamNetworkingFakeIPType_Invalid, // Error, argument was not even an IP address, etc.
k_ESteamNetworkingFakeIPType_NotFake, // Argument was a valid IP, but was not from the reserved "fake" range
k_ESteamNetworkingFakeIPType_GlobalIPv4, // Globally unique (for a given app) IPv4 address. Address space managed by Steam
k_ESteamNetworkingFakeIPType_LocalIPv4, // Locally unique IPv4 address. Address space managed by the local process. For internal use only; should not be shared!
k_ESteamNetworkingFakeIPType__Force32Bit = 0x7fffffff
};
#pragma pack(push,1) #pragma pack(push,1)
/// Store an IP and port. IPv6 is always used; IPv4 is represented using /// Store an IP and port. IPv6 is always used; IPv4 is represented using
@ -240,13 +226,6 @@ struct SteamNetworkingIPAddr
/// See if two addresses are identical /// See if two addresses are identical
bool operator==(const SteamNetworkingIPAddr &x ) const; bool operator==(const SteamNetworkingIPAddr &x ) const;
/// Classify address as FakeIP. This function never returns
/// k_ESteamNetworkingFakeIPType_Invalid.
ESteamNetworkingFakeIPType GetFakeIPType() const;
/// Return true if we are a FakeIP
bool IsFakeIP() const { return GetFakeIPType() > k_ESteamNetworkingFakeIPType_NotFake; }
}; };
/// An abstract way to represent the identity of a network host. All identities can /// An abstract way to represent the identity of a network host. All identities can
@ -273,11 +252,6 @@ struct SteamNetworkingIdentity
void SetIPAddr( const SteamNetworkingIPAddr &addr ); // Set to specified IP:port void SetIPAddr( const SteamNetworkingIPAddr &addr ); // Set to specified IP:port
const SteamNetworkingIPAddr *GetIPAddr() const; // returns null if we are not an IP address. const SteamNetworkingIPAddr *GetIPAddr() const; // returns null if we are not an IP address.
void SetIPv4Addr( uint32 nIPv4, uint16 nPort ); // Set to specified IPv4:port
uint32 GetIPv4() const; // returns 0 if we are not an IPv4 address.
ESteamNetworkingFakeIPType GetFakeIPType() const;
bool IsFakeIP() const { return GetFakeIPType() > k_ESteamNetworkingFakeIPType_NotFake; }
// "localhost" is equivalent for many purposes to "anonymous." Our remote // "localhost" is equivalent for many purposes to "anonymous." Our remote
// will identify us by the network address we use. // will identify us by the network address we use.
@ -561,9 +535,13 @@ enum ESteamNetConnectionEnd
// - etc // - etc
k_ESteamNetConnectionEnd_Remote_BadCert = 4003, k_ESteamNetConnectionEnd_Remote_BadCert = 4003,
// These will never be returned // We couldn't rendezvous with the remote host because
//k_ESteamNetConnectionEnd_Remote_NotLoggedIn_DEPRECATED = 4004, // they aren't logged into Steam
//k_ESteamNetConnectionEnd_Remote_NotRunningApp_DEPRECATED = 4005, k_ESteamNetConnectionEnd_Remote_NotLoggedIn = 4004,
// We couldn't rendezvous with the remote host because
// they aren't running the right application.
k_ESteamNetConnectionEnd_Remote_NotRunningApp = 4005,
// Something wrong with the protocol version you are using. // Something wrong with the protocol version you are using.
// (Probably the code you are running is too old.) // (Probably the code you are running is too old.)
@ -597,7 +575,10 @@ enum ESteamNetConnectionEnd
// or on their end. // or on their end.
k_ESteamNetConnectionEnd_Misc_Timeout = 5003, k_ESteamNetConnectionEnd_Misc_Timeout = 5003,
//k_ESteamNetConnectionEnd_Misc_RelayConnectivity_DEPRECATED = 5004, // We're having trouble talking to the relevant relay.
// We don't have enough information to say whether the
// problem is on our end or not.
k_ESteamNetConnectionEnd_Misc_RelayConnectivity = 5004,
// There's some trouble talking to Steam. // There's some trouble talking to Steam.
k_ESteamNetConnectionEnd_Misc_SteamConnectivity = 5005, k_ESteamNetConnectionEnd_Misc_SteamConnectivity = 5005,
@ -650,16 +631,6 @@ const int k_cchSteamNetworkingMaxConnectionCloseReason = 128;
/// of a connection. /// of a connection.
const int k_cchSteamNetworkingMaxConnectionDescription = 128; const int k_cchSteamNetworkingMaxConnectionDescription = 128;
/// Max length of the app's part of the description
const int k_cchSteamNetworkingMaxConnectionAppName = 32;
const int k_nSteamNetworkConnectionInfoFlags_Unauthenticated = 1; // We don't have a certificate for the remote host.
const int k_nSteamNetworkConnectionInfoFlags_Unencrypted = 2; // Information is being sent out over a wire unencrypted (by this library)
const int k_nSteamNetworkConnectionInfoFlags_LoopbackBuffers = 4; // Internal loopback buffers. Won't be true for localhost. (You can check the address to determine that.) This implies k_nSteamNetworkConnectionInfoFlags_FastLAN
const int k_nSteamNetworkConnectionInfoFlags_Fast = 8; // The connection is "fast" and "reliable". Either internal/localhost (check the address to find out), or the peer is on the same LAN. (Probably. It's based on the address and the ping time, this is actually hard to determine unambiguously).
const int k_nSteamNetworkConnectionInfoFlags_Relayed = 16; // The connection is relayed somehow (SDR or TURN).
const int k_nSteamNetworkConnectionInfoFlags_DualWifi = 32; // We're taking advantage of dual-wifi multi-path
/// Describe the state of a connection. /// Describe the state of a connection.
struct SteamNetConnectionInfo_t struct SteamNetConnectionInfo_t
{ {
@ -707,16 +678,13 @@ struct SteamNetConnectionInfo_t
/// handle, but in certain cases with symmetric connections it might not. /// handle, but in certain cases with symmetric connections it might not.
char m_szConnectionDescription[ k_cchSteamNetworkingMaxConnectionDescription ]; char m_szConnectionDescription[ k_cchSteamNetworkingMaxConnectionDescription ];
/// Misc flags. Bitmask of k_nSteamNetworkConnectionInfoFlags_Xxxx
int m_nFlags;
/// Internal stuff, room to change API easily /// Internal stuff, room to change API easily
uint32 reserved[63]; uint32 reserved[64];
}; };
/// Quick connection state, pared down to something you could call /// Quick connection state, pared down to something you could call
/// more frequently without it being too big of a perf hit. /// more frequently without it being too big of a perf hit.
struct SteamNetConnectionRealTimeStatus_t struct SteamNetworkingQuickConnectionStatus
{ {
/// High level state of the connection /// High level state of the connection
@ -759,16 +727,17 @@ struct SteamNetConnectionRealTimeStatus_t
/// have to re-transmit. /// have to re-transmit.
int m_cbSentUnackedReliable; int m_cbSentUnackedReliable;
/// If you queued a message right now, approximately how long would that message /// If you asked us to send a message right now, how long would that message
/// wait in the queue before we actually started putting its data on the wire in /// sit in the queue before we actually started putting packets on the wire?
/// a packet? /// (And assuming Nagle does not cause any packets to be delayed.)
/// ///
/// In general, data that is sent by the application is limited by the bandwidth /// In general, data that is sent by the application is limited by the
/// of the channel. If you send data faster than this, it must be queued and /// bandwidth of the channel. If you send data faster than this, it must
/// put on the wire at a metered rate. Even sending a small amount of data (e.g. /// be queued and put on the wire at a metered rate. Even sending a small amount
/// a few MTU, say ~3k) will require some of the data to be delayed a bit. /// of data (e.g. a few MTU, say ~3k) will require some of the data to be delayed
/// a bit.
/// ///
/// Ignoring multiple lanes, the estimated delay will be approximately equal to /// In general, the estimated delay will be approximately equal to
/// ///
/// ( m_cbPendingUnreliable+m_cbPendingReliable ) / m_nSendRateBytesPerSecond /// ( m_cbPendingUnreliable+m_cbPendingReliable ) / m_nSendRateBytesPerSecond
/// ///
@ -777,42 +746,15 @@ struct SteamNetConnectionRealTimeStatus_t
/// and the last packet placed on the wire, and we are exactly up against the send /// and the last packet placed on the wire, and we are exactly up against the send
/// rate limit. In that case we might need to wait for one packet's worth of time to /// rate limit. In that case we might need to wait for one packet's worth of time to
/// elapse before we can send again. On the other extreme, the queue might have data /// elapse before we can send again. On the other extreme, the queue might have data
/// in it waiting for Nagle. (This will always be less than one packet, because as /// in it waiting for Nagle. (This will always be less than one packet, because as soon
/// soon as we have a complete packet we would send it.) In that case, we might be /// as we have a complete packet we would send it.) In that case, we might be ready
/// ready to send data now, and this value will be 0. /// to send data now, and this value will be 0.
///
/// This value is only valid if multiple lanes are not used. If multiple lanes are
/// in use, then the queue time will be different for each lane, and you must use
/// the value in SteamNetConnectionRealTimeLaneStatus_t.
///
/// Nagle delay is ignored for the purposes of this calculation.
SteamNetworkingMicroseconds m_usecQueueTime; SteamNetworkingMicroseconds m_usecQueueTime;
// Internal stuff, room to change API easily /// Internal stuff, room to change API easily
uint32 reserved[16]; uint32 reserved[16];
}; };
#define SteamNetworkingQuickConnectionStatus SteamNetConnectionRealTimeStatus_t
/// Quick status of a particular lane
struct SteamNetConnectionRealTimeLaneStatus_t
{
// Counters for this particular lane. See the corresponding variables
// in SteamNetConnectionRealTimeStatus_t
int m_cbPendingUnreliable;
int m_cbPendingReliable;
int m_cbSentUnackedReliable;
int _reservePad1; // Reserved for future use
/// Lane-specific queue time. This value takes into consideration lane priorities
/// and weights, and how much data is queued in each lane, and attempts to predict
/// how any data currently queued will be sent out.
SteamNetworkingMicroseconds m_usecQueueTime;
// Internal stuff, room to change API easily
uint32 reserved[10];
};
#pragma pack( pop ) #pragma pack( pop )
// //
@ -859,17 +801,15 @@ struct SteamNetworkingMessage_t
/// - You might have closed the connection, so fetching the user data /// - You might have closed the connection, so fetching the user data
/// would not be possible. /// would not be possible.
/// ///
/// Not used when sending messages. /// Not used when sending messages,
int64 m_nConnUserData; int64 m_nConnUserData;
/// Local timestamp when the message was received /// Local timestamp when the message was received
/// Not used for outbound messages. /// Not used for outbound messages.
SteamNetworkingMicroseconds m_usecTimeReceived; SteamNetworkingMicroseconds m_usecTimeReceived;
/// Message number assigned by the sender. This is not used for outbound /// Message number assigned by the sender.
/// messages. Note that if multiple lanes are used, each lane has its own /// This is not used for outbound messages
/// message numbers, which are assigned sequentially, so messages from
/// different lanes will share the same numbers.
int64 m_nMessageNumber; int64 m_nMessageNumber;
/// Function used to free up m_pData. This mechanism exists so that /// Function used to free up m_pData. This mechanism exists so that
@ -901,11 +841,6 @@ struct SteamNetworkingMessage_t
/// Not used for received messages. /// Not used for received messages.
int64 m_nUserData; int64 m_nUserData;
/// For outbound messages, which lane to use? See ISteamNetworkingSockets::ConfigureConnectionLanes.
/// For inbound messages, what lane was the message received on?
uint16 m_idxLane;
uint16 _pad1__;
/// You MUST call this when you're done with the object, /// You MUST call this when you're done with the object,
/// to free up memory, etc. /// to free up memory, etc.
inline void Release(); inline void Release();
@ -1122,6 +1057,7 @@ enum ESteamNetworkingConfigValue
{ {
k_ESteamNetworkingConfig_Invalid = 0, k_ESteamNetworkingConfig_Invalid = 0,
// //
// Connection options // Connection options
// //
@ -1217,6 +1153,19 @@ enum ESteamNetworkingConfigValue
/// the peer to also modify their value in order for encryption to be disabled.) /// the peer to also modify their value in order for encryption to be disabled.)
k_ESteamNetworkingConfig_Unencrypted = 34, k_ESteamNetworkingConfig_Unencrypted = 34,
/// [global int32] 0 or 1. Some variables are "dev" variables. They are useful
/// for debugging, but should not be adjusted in production. When this flag is false (the default),
/// such variables will not be enumerated by the ISteamnetworkingUtils::GetFirstConfigValue
/// ISteamNetworkingUtils::GetConfigValueInfo functions. The idea here is that you
/// can use those functions to provide a generic mechanism to set any configuration
/// value from a console or configuration file, looking up the variable by name. Depending
/// on your game, modifying other configuration values may also have negative effects, and
/// you may wish to further lock down which variables are allowed to be modified by the user.
/// (Maybe no variables!) Or maybe you use a whitelist or blacklist approach.
///
/// (This flag is itself a dev variable.)
k_ESteamNetworkingConfig_EnumerateDevVars = 35,
/// [connection int32] Set this to 1 on outbound connections and listen sockets, /// [connection int32] Set this to 1 on outbound connections and listen sockets,
/// to enable "symmetric connect mode", which is useful in the following /// to enable "symmetric connect mode", which is useful in the following
/// common peer-to-peer use case: /// common peer-to-peer use case:
@ -1318,14 +1267,6 @@ enum ESteamNetworkingConfigValue
/// This value should not be read or written in any other context. /// This value should not be read or written in any other context.
k_ESteamNetworkingConfig_LocalVirtualPort = 38, k_ESteamNetworkingConfig_LocalVirtualPort = 38,
/// [connection int32] Enable Dual wifi band support for this connection
/// 0 = no, 1 = yes, 2 = simulate it for debugging, even if dual wifi not available
k_ESteamNetworkingConfig_DualWifi_Enable = 39,
/// [connection int32] True to enable diagnostics reporting through
/// generic platform UI. (Only available on Steam.)
k_ESteamNetworkingConfig_EnableDiagnosticsUI = 46,
// //
// Simulating network conditions // Simulating network conditions
// //
@ -1378,9 +1319,9 @@ enum ESteamNetworkingConfigValue
k_ESteamNetworkingConfig_FakeRateLimit_Recv_Rate = 44, k_ESteamNetworkingConfig_FakeRateLimit_Recv_Rate = 44,
k_ESteamNetworkingConfig_FakeRateLimit_Recv_Burst = 45, k_ESteamNetworkingConfig_FakeRateLimit_Recv_Burst = 45,
// //
// Callbacks // Callbacks
// //
// On Steam, you may use the default Steam callback dispatch mechanism. If you prefer // On Steam, you may use the default Steam callback dispatch mechanism. If you prefer
// to not use this dispatch mechanism (or you are not running with Steam), or you want // to not use this dispatch mechanism (or you are not running with Steam), or you want
@ -1445,14 +1386,9 @@ enum ESteamNetworkingConfigValue
/// ISteamNetworkingMessages. /// ISteamNetworkingMessages.
k_ESteamNetworkingConfig_Callback_CreateConnectionSignaling = 206, k_ESteamNetworkingConfig_Callback_CreateConnectionSignaling = 206,
/// [global FnSteamNetworkingFakeIPResult] Callback that's invoked when //
/// a FakeIP allocation finishes. See: ISteamNetworkingSockets::BeginAsyncRequestFakeIP, // P2P settings
/// ISteamNetworkingUtils::SetGlobalCallback_FakeIPResult //
k_ESteamNetworkingConfig_Callback_FakeIPResult = 207,
//
// P2P connection settings
//
// /// [listen socket int32] When you create a P2P listen socket, we will automatically // /// [listen socket int32] When you create a P2P listen socket, we will automatically
// /// open up a UDP port to listen for LAN connections. LAN connections can be made // /// open up a UDP port to listen for LAN connections. LAN connections can be made
@ -1483,9 +1419,9 @@ enum ESteamNetworkingConfigValue
k_ESteamNetworkingConfig_P2P_Transport_SDR_Penalty = 106, k_ESteamNetworkingConfig_P2P_Transport_SDR_Penalty = 106,
//k_ESteamNetworkingConfig_P2P_Transport_LANBeacon_Penalty = 107, //k_ESteamNetworkingConfig_P2P_Transport_LANBeacon_Penalty = 107,
// //
// Settings for SDR relayed connections // Settings for SDR relayed connections
// //
/// [int32 global] If the first N pings to a port all fail, mark that port as unavailable for /// [int32 global] If the first N pings to a port all fail, mark that port as unavailable for
/// a while, and try a different one. Some ISPs and routers may drop the first /// a while, and try a different one. Some ISPs and routers may drop the first
@ -1532,14 +1468,14 @@ enum ESteamNetworkingConfigValue
/// in production. /// in production.
k_ESteamNetworkingConfig_SDRClient_FakeClusterPing = 36, k_ESteamNetworkingConfig_SDRClient_FakeClusterPing = 36,
// //
// Log levels for debugging information of various subsystems. // Log levels for debugging information of various subsystems.
// Higher numeric values will cause more stuff to be printed. // Higher numeric values will cause more stuff to be printed.
// See ISteamNetworkingUtils::SetDebugOutputFunction for more // See ISteamNetworkingUtils::SetDebugOutputFunction for more
// information // information
// //
// The default for all values is k_ESteamNetworkingSocketsDebugOutputType_Warning. // The default for all values is k_ESteamNetworkingSocketsDebugOutputType_Warning.
// //
k_ESteamNetworkingConfig_LogLevel_AckRTT = 13, // [connection int32] RTT calculations for inline pings and replies k_ESteamNetworkingConfig_LogLevel_AckRTT = 13, // [connection int32] RTT calculations for inline pings and replies
k_ESteamNetworkingConfig_LogLevel_PacketDecode = 14, // [connection int32] log SNP packets send/recv k_ESteamNetworkingConfig_LogLevel_PacketDecode = 14, // [connection int32] log SNP packets send/recv
k_ESteamNetworkingConfig_LogLevel_Message = 15, // [connection int32] log each message send/recv k_ESteamNetworkingConfig_LogLevel_Message = 15, // [connection int32] log each message send/recv
@ -1547,10 +1483,6 @@ enum ESteamNetworkingConfigValue
k_ESteamNetworkingConfig_LogLevel_P2PRendezvous = 17, // [connection int32] P2P rendezvous messages k_ESteamNetworkingConfig_LogLevel_P2PRendezvous = 17, // [connection int32] P2P rendezvous messages
k_ESteamNetworkingConfig_LogLevel_SDRRelayPings = 18, // [global int32] Ping relays k_ESteamNetworkingConfig_LogLevel_SDRRelayPings = 18, // [global int32] Ping relays
// Deleted, do not use
k_ESteamNetworkingConfig_DELETED_EnumerateDevVars = 35,
k_ESteamNetworkingConfigValue__Force32Bit = 0x7fffffff k_ESteamNetworkingConfigValue__Force32Bit = 0x7fffffff
}; };
@ -1708,8 +1640,6 @@ inline void GetSteamNetworkingLocationPOPStringFromID( SteamNetworkingPOPID id,
/// The POPID "dev" is used in non-production environments for testing. /// The POPID "dev" is used in non-production environments for testing.
const SteamNetworkingPOPID k_SteamDatagramPOPID_dev = ( (uint32)'d' << 16U ) | ( (uint32)'e' << 8U ) | (uint32)'v'; const SteamNetworkingPOPID k_SteamDatagramPOPID_dev = ( (uint32)'d' << 16U ) | ( (uint32)'e' << 8U ) | (uint32)'v';
#ifndef API_GEN
/// Utility class for printing a SteamNetworkingPOPID. /// Utility class for printing a SteamNetworkingPOPID.
struct SteamNetworkingPOPIDRender struct SteamNetworkingPOPIDRender
{ {
@ -1719,7 +1649,6 @@ private:
char buf[ 8 ]; char buf[ 8 ];
}; };
#endif
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
// //