mirror of
https://gitlab.com/kelteseth/ScreenPlay.git
synced 2024-11-07 03:22:33 +01:00
Merge remote-tracking branch 'origin/qt6-support' into qt6-kde
This commit is contained in:
commit
1ecf2937d9
@ -10,13 +10,16 @@ find_package(
|
||||
REQUIRED)
|
||||
|
||||
set(SOURCES # cmake-format: sortable
|
||||
src/util.cpp src/contenttypes.cpp)
|
||||
src/util.cpp src/contenttypes.cpp inc/public/ScreenPlayUtil/httpfileserver.cpp)
|
||||
|
||||
set(HEADER # cmake-format: sortable
|
||||
inc/public/ScreenPlayUtil/util.h inc/public/ScreenPlayUtil/contenttypes.h inc/public/ScreenPlayUtil/projectfile.h)
|
||||
inc/public/ScreenPlayUtil/util.h inc/public/ScreenPlayUtil/httpfileserver.h inc/public/ScreenPlayUtil/contenttypes.h inc/public/ScreenPlayUtil/projectfile.h)
|
||||
|
||||
add_library(${PROJECT_NAME} STATIC ${SOURCES} ${HEADER})
|
||||
|
||||
find_path(CPP_HTTPLIB_INCLUDE_DIRS "httplib.h")
|
||||
target_include_directories(${PROJECT_NAME} PUBLIC ${CPP_HTTPLIB_INCLUDE_DIRS})
|
||||
|
||||
target_include_directories(
|
||||
${PROJECT_NAME}
|
||||
PUBLIC inc/public/
|
||||
|
@ -102,4 +102,27 @@ namespace InstalledType {
|
||||
Q_ENUM_NS(InstalledType)
|
||||
|
||||
}
|
||||
|
||||
/*!
|
||||
\namespace ScreenPlay::InstalledType
|
||||
\inmodule ScreenPlayUtil
|
||||
\brief When changing the enum, one also needs to change:
|
||||
GlobalVariables::getAvailableWallpaper
|
||||
GlobalVariables::getAvailableWidgets
|
||||
Common/Util.js isWallpaper() and isWidget()
|
||||
ScreenPlayWallpaper: BaseWindow::parseWallpaperType()
|
||||
*/
|
||||
namespace VideoCodec {
|
||||
Q_NAMESPACE
|
||||
|
||||
enum class VideoCodec {
|
||||
Unknown,
|
||||
VP8,
|
||||
VP9,
|
||||
AV1,
|
||||
H264,
|
||||
H265
|
||||
};
|
||||
Q_ENUM_NS(VideoCodec)
|
||||
}
|
||||
}
|
||||
|
28
ScreenPlayUtil/inc/public/ScreenPlayUtil/httpfileserver.cpp
Normal file
28
ScreenPlayUtil/inc/public/ScreenPlayUtil/httpfileserver.cpp
Normal file
@ -0,0 +1,28 @@
|
||||
#include "httpfileserver.h"
|
||||
#include "httplib.h"
|
||||
|
||||
namespace ScreenPlay {
|
||||
HttpFileServer::HttpFileServer(QObject* parent)
|
||||
: QObject { parent }
|
||||
{
|
||||
}
|
||||
|
||||
void HttpFileServer::startServer()
|
||||
{
|
||||
const auto deleter = [](auto* ptr) { delete ptr; };
|
||||
m_server = std::unique_ptr<httplib::Server, Deleter>(new httplib::Server(), deleter);
|
||||
m_thread = std::thread([&]() {
|
||||
qInfo() << " set_mount_point" << m_server->set_mount_point("/", "C:/Users/Eli/Desktop/web");
|
||||
|
||||
qInfo() << "listen";
|
||||
m_server->listen("0.0.0.0", 8081);
|
||||
qInfo() << "end";
|
||||
});
|
||||
}
|
||||
|
||||
void HttpFileServer::stopServer()
|
||||
{
|
||||
if (m_thread.joinable())
|
||||
m_thread.join();
|
||||
}
|
||||
}
|
29
ScreenPlayUtil/inc/public/ScreenPlayUtil/httpfileserver.h
Normal file
29
ScreenPlayUtil/inc/public/ScreenPlayUtil/httpfileserver.h
Normal file
@ -0,0 +1,29 @@
|
||||
#pragma once
|
||||
|
||||
#include <QDebug>
|
||||
#include <QObject>
|
||||
|
||||
#include <memory>
|
||||
#include <thread>
|
||||
|
||||
namespace httplib {
|
||||
class Server;
|
||||
}
|
||||
|
||||
namespace ScreenPlay {
|
||||
|
||||
class HttpFileServer : public QObject {
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit HttpFileServer(QObject* parent = nullptr);
|
||||
|
||||
void startServer();
|
||||
void stopServer();
|
||||
|
||||
private:
|
||||
using Deleter = std::function<void(httplib::Server*)>;
|
||||
std::unique_ptr<httplib::Server, Deleter> m_server;
|
||||
|
||||
std::thread m_thread;
|
||||
};
|
||||
}
|
@ -44,6 +44,7 @@ namespace ScreenPlayUtil {
|
||||
QJsonArray fillArray(const QVector<QString>& items);
|
||||
ScreenPlay::SearchType::SearchType getSearchTypeFromInstalledType(const ScreenPlay::InstalledType::InstalledType type);
|
||||
std::optional<ScreenPlay::InstalledType::InstalledType> getInstalledTypeFromString(const QString& type);
|
||||
std::optional<ScreenPlay::VideoCodec::VideoCodec> getVideoCodecFromString(const QString& type);
|
||||
std::optional<QJsonObject> parseQByteArrayToQJsonObject(const QByteArray& byteArray);
|
||||
std::optional<QJsonObject> openJsonFileToObject(const QString& path);
|
||||
std::optional<QString> openJsonFileToString(const QString& path);
|
||||
|
@ -266,6 +266,33 @@ std::optional<ScreenPlay::InstalledType::InstalledType> getInstalledTypeFromStri
|
||||
return std::nullopt;
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
\brief Maps the video codec type from a QString to an enum. Used for parsing the project.json.
|
||||
*/
|
||||
std::optional<ScreenPlay::VideoCodec::VideoCodec> getVideoCodecFromString(const QString &type)
|
||||
{
|
||||
if(type.isEmpty())
|
||||
return std::nullopt;
|
||||
|
||||
if(type.contains("vp8",Qt::CaseInsensitive))
|
||||
return ScreenPlay::VideoCodec::VideoCodec::VP8;
|
||||
|
||||
if(type.contains("vp9",Qt::CaseInsensitive))
|
||||
return ScreenPlay::VideoCodec::VideoCodec::VP9;
|
||||
|
||||
if(type.contains("av1",Qt::CaseInsensitive))
|
||||
return ScreenPlay::VideoCodec::VideoCodec::AV1;
|
||||
|
||||
if(type.contains("h264",Qt::CaseInsensitive))
|
||||
return ScreenPlay::VideoCodec::VideoCodec::H264;
|
||||
|
||||
if(type.contains("h265",Qt::CaseInsensitive))
|
||||
return ScreenPlay::VideoCodec::VideoCodec::H264;
|
||||
|
||||
return std::nullopt;
|
||||
}
|
||||
|
||||
/*!
|
||||
\brief Converts the given \a url string to a local file path.
|
||||
*/
|
||||
@ -368,4 +395,5 @@ std::optional<QVector<int>> parseStringToIntegerList(const QString string)
|
||||
return list;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -39,7 +39,7 @@ set(SOURCES ${SOURCES} main.cpp src/basewindow.cpp)
|
||||
set(HEADER ${HEADER} src/basewindow.h)
|
||||
|
||||
set(QML # cmake-format: sortable
|
||||
qml/GifWallpaper.qml qml/Test.qml qml/Wallpaper.qml qml/WebsiteWallpaper.qml qml/WebView.qml qml/MultimediaView.qml)
|
||||
qml/GifWallpaper.qml qml/Test.qml qml/Wallpaper.qml qml/WebsiteWallpaper.qml qml/WebView.qml qml/MultimediaView.qml qml/MultimediaWebView.qml)
|
||||
|
||||
qt_add_resources(RESOURCES Resources.qrc)
|
||||
|
||||
|
@ -13,11 +13,4 @@ Video {
|
||||
if (Wallpaper.loops)
|
||||
root.play()
|
||||
}
|
||||
|
||||
//loops: MediaPlayer.Infinite
|
||||
// onErrorOccurred: function (error, errorString) {
|
||||
// console.log("[qmlvideo] VideoItem.onError error " + error
|
||||
// + " errorString " + errorString)
|
||||
// root.fatalError()
|
||||
// }
|
||||
}
|
||||
|
157
ScreenPlayWallpaper/qml/MultimediaWebView.qml
Normal file
157
ScreenPlayWallpaper/qml/MultimediaWebView.qml
Normal file
@ -0,0 +1,157 @@
|
||||
import QtQuick
|
||||
import QtWebEngine
|
||||
import ScreenPlay.Enums.InstalledType 1.0
|
||||
import ScreenPlayWallpaper 1.0
|
||||
|
||||
/*!
|
||||
* The native macOS multimedia stack does not support VP8/VP9. For this we must use the WebEngine.
|
||||
*/
|
||||
Item {
|
||||
id: root
|
||||
|
||||
signal requestFadeIn()
|
||||
|
||||
function getSetVideoCommand() {
|
||||
// TODO 30:
|
||||
// Currently wont work. Commit anyways til QtCreator and Qt work with js template literals
|
||||
var src = ""
|
||||
src += "var videoPlayer = document.getElementById('videoPlayer');"
|
||||
src += "var videoSource = document.getElementById('videoSource');"
|
||||
src += "videoSource.src = '" + Wallpaper.projectSourceFileAbsolute + "';"
|
||||
src += "videoPlayer.load();"
|
||||
src += "videoPlayer.volume = " + Wallpaper.volume + ";"
|
||||
src += "videoPlayer.setAttribute('style', 'object-fit :" + Wallpaper.fillMode + ";');"
|
||||
src += "videoPlayer.play();"
|
||||
print(src)
|
||||
return src
|
||||
}
|
||||
|
||||
Component.onCompleted: {
|
||||
WebEngine.settings.localContentCanAccessFileUrls = true
|
||||
WebEngine.settings.localContentCanAccessRemoteUrls = true
|
||||
WebEngine.settings.allowRunningInsecureContent = true
|
||||
WebEngine.settings.accelerated2dCanvasEnabled = true
|
||||
WebEngine.settings.javascriptCanOpenWindows = false
|
||||
WebEngine.settings.showScrollBars = false
|
||||
WebEngine.settings.playbackRequiresUserGesture = false
|
||||
WebEngine.settings.focusOnNavigationEnabled = true
|
||||
}
|
||||
|
||||
WebEngineView {
|
||||
id: webView
|
||||
anchors.fill: parent
|
||||
// url:"https://www.google.de"
|
||||
url: "qrc:/index.html"
|
||||
onJavaScriptConsoleMessage:(lineNumber, message)=> print(lineNumber, message)
|
||||
onLoadProgressChanged: {
|
||||
if (loadProgress === 100) {
|
||||
loadHtml("")
|
||||
requestFadeIn()
|
||||
return
|
||||
webView.runJavaScript(root.getSetVideoCommand(),
|
||||
function (result) {
|
||||
requestFadeIn()
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Text {
|
||||
id: txtVisualsPaused
|
||||
text: qsTr("If you can read this, then the VisualsPaused optimization does not work on your system. You can fix this by disable this in: \n Settings -> Perfromance -> Pause wallpaper video rendering while another app is in the foreground ")
|
||||
font.pointSize: 32
|
||||
visible: false
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
wrapMode: Text.WrapAtWordBoundaryOrAnywhere
|
||||
anchors.centerIn: parent
|
||||
width: parent.width * 0.8
|
||||
color: "white"
|
||||
}
|
||||
|
||||
Timer {
|
||||
id: timerCover
|
||||
|
||||
interval: 300
|
||||
onTriggered: {
|
||||
webView.visible = !Wallpaper.visualsPaused
|
||||
txtVisualsPaused.visible = Wallpaper.visualsPaused
|
||||
}
|
||||
}
|
||||
|
||||
Connections {
|
||||
function onReloadVideo(oldType) {
|
||||
webView.runJavaScript(root.getSetVideoCommand())
|
||||
}
|
||||
|
||||
function onQmlExit() {
|
||||
webView.runJavaScript(
|
||||
"var videoPlayer = document.getElementById('videoPlayer'); videoPlayer.volume = 0;")
|
||||
}
|
||||
|
||||
function onMutedChanged(muted) {
|
||||
if (muted)
|
||||
webView.runJavaScript(
|
||||
"var videoPlayer = document.getElementById('videoPlayer'); videoPlayer.volume = 0;")
|
||||
else
|
||||
webView.runJavaScript(
|
||||
"var videoPlayer = document.getElementById('videoPlayer'); videoPlayer.volume = " + Wallpaper.volume + ";")
|
||||
}
|
||||
|
||||
function onFillModeChanged(fillMode) {
|
||||
if (webView.loadProgress === 100)
|
||||
webView.runJavaScript(
|
||||
"var videoPlayer = document.getElementById('videoPlayer'); videoPlayer.setAttribute('style', 'object-fit :" + fillMode + ";');")
|
||||
}
|
||||
|
||||
function onLoopsChanged(loops) {
|
||||
if (webView.loadProgress === 100)
|
||||
webView.runJavaScript(
|
||||
"var videoPlayer = document.getElementById('videoPlayer'); videoPlayer.loop = " + loops + ";")
|
||||
}
|
||||
|
||||
function onVolumeChanged(volume) {
|
||||
if (webView.loadProgress === 100)
|
||||
webView.runJavaScript(
|
||||
"var videoPlayer = document.getElementById('videoPlayer'); videoPlayer.volume = " + volume + ";")
|
||||
}
|
||||
|
||||
function onCurrentTimeChanged(currentTime) {
|
||||
if (webView.loadProgress === 100)
|
||||
webView.runJavaScript(
|
||||
"var videoPlayer = document.getElementById('videoPlayer'); videoPlayer.currentTime = "
|
||||
+ currentTime + " * videoPlayer.duration;")
|
||||
}
|
||||
|
||||
function onPlaybackRateChanged(playbackRate) {
|
||||
if (webView.loadProgress === 100)
|
||||
webView.runJavaScript(
|
||||
"var videoPlayer = document.getElementById('videoPlayer'); videoPlayer.playbackRate = " + playbackRate + ";")
|
||||
}
|
||||
|
||||
function onVisualsPausedChanged(visualsPaused) {
|
||||
if (visualsPaused) {
|
||||
// Wait until Wallpaper animation is finsihed
|
||||
timerCover.restart()
|
||||
} else {
|
||||
webView.visible = true
|
||||
txtVisualsPaused.visible = false
|
||||
}
|
||||
}
|
||||
|
||||
function onIsPlayingChanged(isPlaying) {
|
||||
if (webView.loadProgress === 100) {
|
||||
if (isPlaying)
|
||||
webView.runJavaScript(
|
||||
"var videoPlayer = document.getElementById('videoPlayer'); videoPlayer.play();")
|
||||
else
|
||||
webView.runJavaScript(
|
||||
"var videoPlayer = document.getElementById('videoPlayer'); videoPlayer.pause();")
|
||||
}
|
||||
}
|
||||
|
||||
target: Wallpaper
|
||||
}
|
||||
}
|
@ -3,16 +3,31 @@ import QtQuick
|
||||
import QtQuick.Controls
|
||||
import ScreenPlayWallpaper 1.0
|
||||
import ScreenPlay.Enums.InstalledType 1.0
|
||||
import ScreenPlay.Enums.VideoCodec 1.0
|
||||
|
||||
Rectangle {
|
||||
id: root
|
||||
onStateChanged: print(state)
|
||||
|
||||
property bool canFadeByWallpaperFillMode: true
|
||||
|
||||
function init() {
|
||||
print("init")
|
||||
switch (Wallpaper.type) {
|
||||
case InstalledType.VideoWallpaper:
|
||||
if(Wallpaper.videoCodec === VideoCodec.Unknown){
|
||||
Wallpaper.terminate()
|
||||
}
|
||||
if(Qt.platform.os === "osx") {
|
||||
// macOS only supports h264 via the native Qt MM
|
||||
if(Wallpaper.videoCodec === VideoCodec.VP8 || Wallpaper.videoCodec === VideoCodec.VP9){
|
||||
print(Qt.resolvedUrl(Wallpaper.projectSourceFileAbsolute))
|
||||
loader.source = "qrc:/ScreenPlayWallpaper/qml/MultimediaWebView.qml";
|
||||
print(loader.status)
|
||||
}else {
|
||||
loader.source = "qrc:/ScreenPlayWallpaper/qml/MultimediaView.qml";
|
||||
}
|
||||
}
|
||||
fadeIn();
|
||||
break;
|
||||
case InstalledType.HTMLWallpaper:
|
||||
@ -106,11 +121,11 @@ Rectangle {
|
||||
anchors.fill: parent
|
||||
// QML Engine deadlocks in 5.15.2 when a loader cannot load
|
||||
// an item. QApplication::quit(); waits for the destruction forever.
|
||||
asynchronous: true
|
||||
//asynchronous: true
|
||||
onStatusChanged: {
|
||||
if (loader.status === Loader.Error) {
|
||||
loader.source = "";
|
||||
Wallpaper.terminate();
|
||||
// Wallpaper.terminate();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -41,6 +41,12 @@ BaseWindow::BaseWindow(
|
||||
"InstalledType",
|
||||
"Error: only enums");
|
||||
|
||||
qmlRegisterUncreatableMetaObject(ScreenPlay::VideoCodec::staticMetaObject,
|
||||
"ScreenPlay.Enums.VideoCodec",
|
||||
1, 0,
|
||||
"VideoCodec",
|
||||
"Error: only enums");
|
||||
|
||||
qmlRegisterType<BaseWindow>("ScreenPlay.Wallpaper", 1, 0, "Wallpaper");
|
||||
|
||||
if (!appID.contains("appID=")) {
|
||||
@ -76,8 +82,33 @@ BaseWindow::BaseWindow(
|
||||
QApplication::exit(-4);
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (auto typeOpt = ScreenPlayUtil::getInstalledTypeFromString(project.value("type").toString())) {
|
||||
setType(typeOpt.value());
|
||||
|
||||
if (!project.contains("videoCodec") ) {
|
||||
qWarning("No videoCodec was specified inside the json object!");
|
||||
// QApplication::exit(-4);
|
||||
const QString filename = project.value("file").toString();
|
||||
qInfo() << filename;
|
||||
if(filename.endsWith(".mp4")){
|
||||
setVideoCodec(ScreenPlay::VideoCodec::VideoCodec::H264);
|
||||
} else if(filename.endsWith(".webm")){
|
||||
setVideoCodec(ScreenPlay::VideoCodec::VideoCodec::VP8);
|
||||
}
|
||||
} else {
|
||||
if(this->type() == ScreenPlay::InstalledType::InstalledType::VideoWallpaper){
|
||||
if (auto videoCodecOpt = ScreenPlayUtil::getVideoCodecFromString(project.value("videoCodec").toString())) {
|
||||
setVideoCodec(videoCodecOpt.value());
|
||||
} else {
|
||||
qCritical() << "Cannot parse Wallpaper video codec from value" << project.value("type");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
} else {
|
||||
qCritical() << "Cannot parse Wallpaper type from value" << project.value("type");
|
||||
}
|
||||
@ -239,3 +270,16 @@ void BaseWindow::setupLiveReloading()
|
||||
QObject::connect(&m_liveReloadLimiter, &QTimer::timeout, this, reloadQMLLambda);
|
||||
m_fileSystemWatcher.addPaths({ QUrl::fromUserInput(projectPath()).toLocalFile() });
|
||||
}
|
||||
|
||||
ScreenPlay::VideoCodec::VideoCodec BaseWindow::videoCodec() const
|
||||
{
|
||||
return m_videoCodec;
|
||||
}
|
||||
|
||||
void BaseWindow::setVideoCodec(ScreenPlay::VideoCodec::VideoCodec newVideoCodec)
|
||||
{
|
||||
if (m_videoCodec == newVideoCodec)
|
||||
return;
|
||||
m_videoCodec = newVideoCodec;
|
||||
emit videoCodecChanged();
|
||||
}
|
||||
|
@ -91,6 +91,7 @@ public:
|
||||
Q_PROPERTY(float currentTime READ currentTime WRITE setCurrentTime NOTIFY currentTimeChanged)
|
||||
|
||||
Q_PROPERTY(ScreenPlay::InstalledType::InstalledType type READ type WRITE setType NOTIFY typeChanged)
|
||||
Q_PROPERTY(ScreenPlay::VideoCodec::VideoCodec videoCodec READ videoCodec WRITE setVideoCodec NOTIFY videoCodecChanged)
|
||||
Q_PROPERTY(QString OSVersion READ OSVersion WRITE setOSVersion NOTIFY OSVersionChanged)
|
||||
|
||||
Q_PROPERTY(ScreenPlaySDK* sdk READ sdk WRITE setSdk NOTIFY sdkChanged)
|
||||
@ -117,6 +118,9 @@ public:
|
||||
const QString& projectSourceFile() const { return m_projectSourceFile; }
|
||||
const QUrl& projectSourceFileAbsolute() const { return m_projectSourceFileAbsolute; }
|
||||
|
||||
ScreenPlay::VideoCodec::VideoCodec videoCodec() const;
|
||||
void setVideoCodec(ScreenPlay::VideoCodec::VideoCodec newVideoCodec);
|
||||
|
||||
signals:
|
||||
void qmlExit();
|
||||
void reloadQML(const ScreenPlay::InstalledType::InstalledType oldType);
|
||||
@ -146,6 +150,8 @@ signals:
|
||||
void projectSourceFileChanged(const QString& projectSourceFile);
|
||||
void projectSourceFileAbsoluteChanged(const QUrl& rojectSourceFileAbsolute);
|
||||
|
||||
void videoCodecChanged();
|
||||
|
||||
public slots:
|
||||
virtual void destroyThis() { }
|
||||
virtual void setVisible(bool show) { Q_UNUSED(show) }
|
||||
@ -385,4 +391,5 @@ private:
|
||||
QSysInfo m_sysinfo;
|
||||
std::unique_ptr<ScreenPlaySDK> m_sdk;
|
||||
QUrl m_projectSourceFileAbsolute;
|
||||
ScreenPlay::VideoCodec::VideoCodec m_videoCodec = ScreenPlay::VideoCodec::VideoCodec::Unknown;
|
||||
};
|
||||
|
@ -46,7 +46,7 @@ MacWindow::MacWindow(
|
||||
m_window.setFlags(flags | Qt::FramelessWindowHint | Qt::Desktop);
|
||||
m_window.setResizeMode(QQuickView::ResizeMode::SizeRootObjectToView);
|
||||
m_window.setTextRenderType(QQuickWindow::TextRenderType::NativeTextRendering);
|
||||
m_window.setSource(QUrl("qrc:/qml/Wallpaper.qml"));
|
||||
m_window.setSource(QUrl("qrc:/ScreenPlayWallpaper/qml/Wallpaper.qml"));
|
||||
|
||||
MacIntegration* macIntegration = new MacIntegration(this);
|
||||
macIntegration->SetBackgroundLevel(&m_window);
|
||||
|
@ -68,12 +68,6 @@ if(APPLE)
|
||||
POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E make_directory ${workshop_install_dir})
|
||||
|
||||
add_custom_command(
|
||||
TARGET ${PROJECT_NAME}
|
||||
POST_BUILD
|
||||
COMMENT "Copying qmldir info into ScreenPlay.app bundle"
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/qmldir ${workshop_install_dir})
|
||||
|
||||
add_custom_command(
|
||||
TARGET ${PROJECT_NAME}
|
||||
POST_BUILD
|
||||
|
@ -7,25 +7,6 @@ set(CMAKE_AUTOMOC ON)
|
||||
find_package(Qt6 COMPONENTS Core)
|
||||
|
||||
set(HEADER
|
||||
public/steam/isteamugc.h
|
||||
public/steam/isteamuser.h
|
||||
public/steam/isteamuserstats.h
|
||||
public/steam/isteamutils.h
|
||||
public/steam/isteamvideo.h
|
||||
public/steam/matchmakingtypes.h
|
||||
public/steam/steam_api.h
|
||||
public/steam/steam_api_common.h
|
||||
public/steam/steam_api_flat.h
|
||||
public/steam/steam_api_internal.h
|
||||
public/steam/steam_gameserver.h
|
||||
public/steam/steamclientpublic.h
|
||||
public/steam/steamdatagram_tickets.h
|
||||
public/steam/steamencryptedappticket.h
|
||||
public/steam/steamhttpenums.h
|
||||
public/steam/steamnetworkingtypes.h
|
||||
public/steam/steamps3params.h
|
||||
public/steam/steamtypes.h
|
||||
public/steam/steamuniverse.h
|
||||
public/steam/isteamapplist.h
|
||||
public/steam/isteamapps.h
|
||||
public/steam/isteamappticket.h
|
||||
@ -39,7 +20,6 @@ set(HEADER
|
||||
public/steam/isteamhttp.h
|
||||
public/steam/isteaminput.h
|
||||
public/steam/isteaminventory.h
|
||||
public/steam/isteammasterserverupdater.h
|
||||
public/steam/isteammatchmaking.h
|
||||
public/steam/isteammusic.h
|
||||
public/steam/isteammusicremote.h
|
||||
@ -52,6 +32,24 @@ set(HEADER
|
||||
public/steam/isteamremoteplay.h
|
||||
public/steam/isteamremotestorage.h
|
||||
public/steam/isteamscreenshots.h
|
||||
public/steam/isteamugc.h
|
||||
public/steam/isteamuser.h
|
||||
public/steam/isteamuserstats.h
|
||||
public/steam/isteamutils.h
|
||||
public/steam/isteamvideo.h
|
||||
public/steam/matchmakingtypes.h
|
||||
public/steam/steam_api_common.h
|
||||
public/steam/steam_api_flat.h
|
||||
public/steam/steam_api_internal.h
|
||||
public/steam/steam_api.h
|
||||
public/steam/steam_gameserver.h
|
||||
public/steam/steamclientpublic.h
|
||||
public/steam/steamencryptedappticket.h
|
||||
public/steam/steamhttpenums.h
|
||||
public/steam/steamnetworkingtypes.h
|
||||
public/steam/steamps3params.h
|
||||
public/steam/steamtypes.h
|
||||
public/steam/steamuniverse.h
|
||||
# CUSTOM
|
||||
public/steam/steam_qt_enums_generated.h
|
||||
# ENDCUSTOM
|
||||
|
@ -1,3 +1,3 @@
|
||||
### Steam SDK
|
||||
Version: 1.51 - 09.01.2021
|
||||
Version: 1.52 - 14.09.2021
|
||||
Download from: https://partner.steamgames.com/home
|
@ -11,7 +11,6 @@
|
||||
#endif
|
||||
|
||||
#include "steam_api_common.h"
|
||||
#include "steamtypes.h"
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: This is a restricted interface that can only be used by previously approved apps,
|
||||
@ -19,7 +18,8 @@
|
||||
// This interface lets you detect installed apps for the local Steam client, useful for debugging tools
|
||||
// to offer lists of apps to debug via Steam.
|
||||
//-----------------------------------------------------------------------------
|
||||
class ISteamAppList {
|
||||
class ISteamAppList
|
||||
{
|
||||
public:
|
||||
virtual uint32 GetNumInstalledApps() = 0;
|
||||
virtual uint32 GetInstalledApps( AppId_t *pvecAppID, uint32 unMaxAppIDs ) = 0;
|
||||
@ -45,19 +45,24 @@ STEAM_DEFINE_USER_INTERFACE_ACCESSOR(ISteamAppList*, SteamAppList, STEAMAPPLIST_
|
||||
#error steam_api_common.h should define VALVE_CALLBACK_PACK_xxx
|
||||
#endif
|
||||
|
||||
|
||||
//---------------------------------------------------------------------------------
|
||||
// Purpose: Sent when a new app is installed
|
||||
//---------------------------------------------------------------------------------
|
||||
STEAM_CALLBACK_BEGIN( SteamAppInstalled_t, k_iSteamAppListCallbacks + 1 )
|
||||
STEAM_CALLBACK_MEMBER( 0, AppId_t, m_nAppID ) // ID of the app that installs
|
||||
STEAM_CALLBACK_END(1)
|
||||
STEAM_CALLBACK_MEMBER( 1, int, m_iInstallFolderIndex ) // library folder the app is installed
|
||||
STEAM_CALLBACK_END( 2 )
|
||||
|
||||
|
||||
//---------------------------------------------------------------------------------
|
||||
// Purpose: Sent when an app is uninstalled
|
||||
//---------------------------------------------------------------------------------
|
||||
STEAM_CALLBACK_BEGIN( SteamAppUninstalled_t, k_iSteamAppListCallbacks + 2 )
|
||||
STEAM_CALLBACK_MEMBER( 0, AppId_t, m_nAppID ) // ID of the app that installs
|
||||
STEAM_CALLBACK_END(1)
|
||||
STEAM_CALLBACK_MEMBER( 1, int, m_iInstallFolderIndex ) // library folder the app was installed
|
||||
STEAM_CALLBACK_END(2)
|
||||
|
||||
|
||||
#pragma pack( pop )
|
||||
#endif // ISTEAMAPPLIST_H
|
||||
|
@ -14,10 +14,12 @@
|
||||
|
||||
const int k_cubAppProofOfPurchaseKeyMax = 240; // max supported length of a legacy cd key
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: interface to app data
|
||||
//-----------------------------------------------------------------------------
|
||||
class ISteamApps {
|
||||
class ISteamApps
|
||||
{
|
||||
public:
|
||||
virtual bool BIsSubscribed() = 0;
|
||||
virtual bool BIsLowViolence() = 0;
|
||||
@ -114,10 +116,6 @@ public:
|
||||
inline ISteamApps *SteamApps();
|
||||
STEAM_DEFINE_USER_INTERFACE_ACCESSOR( ISteamApps *, SteamApps, STEAMAPPS_INTERFACE_VERSION );
|
||||
|
||||
// Global accessor for the gameserver client
|
||||
inline ISteamApps* SteamGameServerApps();
|
||||
STEAM_DEFINE_GAMESERVER_INTERFACE_ACCESSOR(ISteamApps*, SteamGameServerApps, STEAMAPPS_INTERFACE_VERSION);
|
||||
|
||||
// callbacks
|
||||
#if defined( VALVE_CALLBACK_PACK_SMALL )
|
||||
#pragma pack( push, 4 )
|
||||
@ -129,15 +127,18 @@ STEAM_DEFINE_GAMESERVER_INTERFACE_ACCESSOR(ISteamApps*, SteamGameServerApps, STE
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: posted after the user gains ownership of DLC & that DLC is installed
|
||||
//-----------------------------------------------------------------------------
|
||||
struct DlcInstalled_t {
|
||||
struct DlcInstalled_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamAppsCallbacks + 5 };
|
||||
AppId_t m_nAppID; // AppID of the DLC
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: possible results when registering an activation code
|
||||
//-----------------------------------------------------------------------------
|
||||
enum ERegisterActivationCodeResult {
|
||||
enum ERegisterActivationCodeResult
|
||||
{
|
||||
k_ERegisterActivationCodeResultOK = 0,
|
||||
k_ERegisterActivationCodeResultFail = 1,
|
||||
k_ERegisterActivationCodeResultAlreadyRegistered = 2,
|
||||
@ -145,30 +146,36 @@ enum ERegisterActivationCodeResult {
|
||||
k_ERegisterActivationCodeAlreadyOwned = 4,
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: response to RegisterActivationCode()
|
||||
//-----------------------------------------------------------------------------
|
||||
struct RegisterActivationCodeResponse_t {
|
||||
struct RegisterActivationCodeResponse_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamAppsCallbacks + 8 };
|
||||
ERegisterActivationCodeResult m_eResult;
|
||||
uint32 m_unPackageRegistered; // package that was registered. Only set on success
|
||||
};
|
||||
|
||||
|
||||
//---------------------------------------------------------------------------------
|
||||
// Purpose: posted after the user gains executes a Steam URL with command line or query parameters
|
||||
// such as steam://run/<appid>//-commandline/?param1=value1¶m2=value2¶m3=value3 etc
|
||||
// while the game is already running. The new params can be queried
|
||||
// with GetLaunchQueryParam and GetLaunchCommandLine
|
||||
//---------------------------------------------------------------------------------
|
||||
struct NewUrlLaunchParameters_t {
|
||||
struct NewUrlLaunchParameters_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamAppsCallbacks + 14 };
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: response to RequestAppProofOfPurchaseKey/RequestAllProofOfPurchaseKeys
|
||||
// for supporting third-party CD keys, or other proof-of-purchase systems.
|
||||
//-----------------------------------------------------------------------------
|
||||
struct AppProofOfPurchaseKeyResponse_t {
|
||||
struct AppProofOfPurchaseKeyResponse_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamAppsCallbacks + 21 };
|
||||
EResult m_eResult;
|
||||
uint32 m_nAppID;
|
||||
@ -176,10 +183,12 @@ struct AppProofOfPurchaseKeyResponse_t {
|
||||
char m_rgchKey[k_cubAppProofOfPurchaseKeyMax];
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: response to GetFileDetails
|
||||
//-----------------------------------------------------------------------------
|
||||
struct FileDetailsResult_t {
|
||||
struct FileDetailsResult_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamAppsCallbacks + 23 };
|
||||
EResult m_eResult;
|
||||
uint64 m_ulFileSize; // original file size in bytes
|
||||
@ -187,10 +196,12 @@ struct FileDetailsResult_t {
|
||||
uint32 m_unFlags; //
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: called for games in Timed Trial mode
|
||||
//-----------------------------------------------------------------------------
|
||||
struct TimedTrialStatus_t {
|
||||
struct TimedTrialStatus_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamAppsCallbacks + 30 };
|
||||
AppId_t m_unAppID; // appID
|
||||
bool m_bIsOffline; // if true, time allowed / played refers to offline time, not total time
|
||||
|
@ -16,11 +16,13 @@
|
||||
// steamid are located. the sizes of the appid and steamid are implicit in
|
||||
// (each version of) the interface - currently uin32 appid and uint64 steamid
|
||||
//-----------------------------------------------------------------------------
|
||||
class ISteamAppTicket {
|
||||
class ISteamAppTicket
|
||||
{
|
||||
public:
|
||||
virtual uint32 GetAppOwnershipTicketData( uint32 nAppID, void *pvBuffer, uint32 cbBufferLength, uint32 *piAppId, uint32 *piSteamId, uint32 *piSignature, uint32 *pcbSignature ) = 0;
|
||||
};
|
||||
|
||||
#define STEAMAPPTICKET_INTERFACE_VERSION "STEAMAPPTICKET_INTERFACE_VERSION001"
|
||||
|
||||
|
||||
#endif // ISTEAMAPPTICKET_H
|
||||
|
@ -24,7 +24,8 @@
|
||||
// or if you want to implement a multiplexed gameserver where a single process
|
||||
// is handling multiple games at once with independent gameserver SteamIDs.
|
||||
//-----------------------------------------------------------------------------
|
||||
class ISteamClient {
|
||||
class ISteamClient
|
||||
{
|
||||
public:
|
||||
// Creates a communication pipe to the Steam client.
|
||||
// NOT THREADSAFE - ensure that no other threads are accessing Steamworks API when calling
|
||||
@ -159,6 +160,7 @@ public:
|
||||
virtual ISteamRemotePlay *GetISteamRemotePlay( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0;
|
||||
|
||||
STEAM_PRIVATE_API( virtual void DestroyAllInterfaces() = 0; )
|
||||
|
||||
};
|
||||
#define STEAMCLIENT_INTERFACE_VERSION "SteamClient020"
|
||||
|
||||
|
@ -16,8 +16,8 @@
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
#include "isteaminput.h"
|
||||
#include "steam_api_common.h"
|
||||
#include "isteaminput.h"
|
||||
|
||||
#define STEAM_CONTROLLER_MAX_COUNT 16
|
||||
|
||||
@ -36,7 +36,8 @@
|
||||
#define STEAM_CONTROLLER_MAX_ANALOG_ACTION_DATA 1.0f
|
||||
|
||||
#ifndef ISTEAMINPUT_H
|
||||
enum ESteamControllerPad {
|
||||
enum ESteamControllerPad
|
||||
{
|
||||
k_ESteamControllerPad_Left,
|
||||
k_ESteamControllerPad_Right
|
||||
};
|
||||
@ -46,7 +47,8 @@ enum ESteamControllerPad {
|
||||
// guarantee that they will be added in a contiguous manner - use GetInputTypeForHandle instead
|
||||
// Versions of Steam that add new controller types in the future will extend this enum if you're
|
||||
// using a lookup table please check the bounds of any origins returned by Steam.
|
||||
enum EControllerActionOrigin {
|
||||
enum EControllerActionOrigin
|
||||
{
|
||||
// Steam Controller
|
||||
k_EControllerActionOrigin_None,
|
||||
k_EControllerActionOrigin_A,
|
||||
@ -365,12 +367,19 @@ enum EControllerActionOrigin {
|
||||
k_EControllerActionOrigin_PS5_Gyro_Yaw,
|
||||
k_EControllerActionOrigin_PS5_Gyro_Roll,
|
||||
|
||||
k_EControllerActionOrigin_XBoxOne_LeftGrip_Lower,
|
||||
k_EControllerActionOrigin_XBoxOne_LeftGrip_Upper,
|
||||
k_EControllerActionOrigin_XBoxOne_RightGrip_Lower,
|
||||
k_EControllerActionOrigin_XBoxOne_RightGrip_Upper,
|
||||
k_EControllerActionOrigin_XBoxOne_Share,
|
||||
|
||||
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.
|
||||
};
|
||||
|
||||
#ifndef ISTEAMINPUT_H
|
||||
enum EXboxOrigin {
|
||||
enum EXboxOrigin
|
||||
{
|
||||
k_EXboxOrigin_A,
|
||||
k_EXboxOrigin_B,
|
||||
k_EXboxOrigin_X,
|
||||
@ -401,7 +410,8 @@ enum EXboxOrigin {
|
||||
k_EXboxOrigin_DPad_East,
|
||||
};
|
||||
|
||||
enum ESteamInputType {
|
||||
enum ESteamInputType
|
||||
{
|
||||
k_ESteamInputType_Unknown,
|
||||
k_ESteamInputType_SteamController,
|
||||
k_ESteamInputType_XBox360Controller,
|
||||
@ -421,7 +431,8 @@ enum ESteamInputType {
|
||||
};
|
||||
#endif
|
||||
|
||||
enum ESteamControllerLEDFlag {
|
||||
enum ESteamControllerLEDFlag
|
||||
{
|
||||
k_ESteamControllerLEDFlag_SetColor,
|
||||
k_ESteamControllerLEDFlag_RestoreUserDefault
|
||||
};
|
||||
@ -430,6 +441,7 @@ enum ESteamControllerLEDFlag {
|
||||
// This handle will consistently identify a controller, even if it is disconnected and re-connected
|
||||
typedef uint64 ControllerHandle_t;
|
||||
|
||||
|
||||
// These handles are used to refer to a specific in-game action or action set
|
||||
// All action handles should be queried during initialization for performance reasons
|
||||
typedef uint64 ControllerActionSetHandle_t;
|
||||
@ -443,7 +455,8 @@ typedef uint64 ControllerAnalogActionHandle_t;
|
||||
#define ControllerDigitalActionData_t InputDigitalActionData_t
|
||||
#define ControllerMotionData_t InputMotionData_t
|
||||
#else
|
||||
struct ControllerAnalogActionData_t {
|
||||
struct ControllerAnalogActionData_t
|
||||
{
|
||||
// Type of data coming from this action, this will match what got specified in the action set
|
||||
EControllerSourceMode eMode;
|
||||
|
||||
@ -454,7 +467,8 @@ struct ControllerAnalogActionData_t {
|
||||
bool bActive;
|
||||
};
|
||||
|
||||
struct ControllerDigitalActionData_t {
|
||||
struct ControllerDigitalActionData_t
|
||||
{
|
||||
// The current state of this action; will be true if currently pressed
|
||||
bool bState;
|
||||
|
||||
@ -462,7 +476,8 @@ struct ControllerDigitalActionData_t {
|
||||
bool bActive;
|
||||
};
|
||||
|
||||
struct ControllerMotionData_t {
|
||||
struct ControllerMotionData_t
|
||||
{
|
||||
// Sensor-fused absolute rotation; will drift in heading
|
||||
float rotQuatX;
|
||||
float rotQuatY;
|
||||
@ -482,11 +497,14 @@ struct ControllerMotionData_t {
|
||||
#endif
|
||||
#pragma pack( pop )
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Steam Input API
|
||||
//-----------------------------------------------------------------------------
|
||||
class ISteamController {
|
||||
class ISteamController
|
||||
{
|
||||
public:
|
||||
|
||||
// Init and Shutdown must be called when starting/ending use of this interface
|
||||
virtual bool Init() = 0;
|
||||
virtual bool Shutdown() = 0;
|
||||
@ -579,7 +597,7 @@ public:
|
||||
virtual void SetLEDColor( ControllerHandle_t controllerHandle, uint8 nColorR, uint8 nColorG, uint8 nColorB, unsigned int nFlags ) = 0;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Utility functions availible without using the rest of Steam Input API
|
||||
// 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
|
||||
|
@ -15,7 +15,8 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: set of relationships to other users
|
||||
//-----------------------------------------------------------------------------
|
||||
enum EFriendRelationship {
|
||||
enum EFriendRelationship
|
||||
{
|
||||
k_EFriendRelationshipNone = 0,
|
||||
k_EFriendRelationshipBlocked = 1, // this doesn't get stored; the user has just done an Ignore on an friendship invite
|
||||
k_EFriendRelationshipRequestRecipient = 2,
|
||||
@ -43,10 +44,12 @@ const FriendsGroupID_t k_FriendsGroupID_Invalid = -1;
|
||||
|
||||
const int k_cEnumerateFollowersMax = 50;
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: list of states a friend can be in
|
||||
//-----------------------------------------------------------------------------
|
||||
enum EPersonaState {
|
||||
enum EPersonaState
|
||||
{
|
||||
k_EPersonaStateOffline = 0, // friend is not currently logged on
|
||||
k_EPersonaStateOnline = 1, // friend is logged on
|
||||
k_EPersonaStateBusy = 2, // user is on, but busy
|
||||
@ -58,10 +61,12 @@ enum EPersonaState {
|
||||
k_EPersonaStateMax,
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: flags for enumerating friends list, or quickly checking a the relationship between users
|
||||
//-----------------------------------------------------------------------------
|
||||
enum EFriendFlags {
|
||||
enum EFriendFlags
|
||||
{
|
||||
k_EFriendFlagNone = 0x00,
|
||||
k_EFriendFlagBlocked = 0x01,
|
||||
k_EFriendFlagFriendshipRequested = 0x02,
|
||||
@ -79,6 +84,7 @@ enum EFriendFlags {
|
||||
k_EFriendFlagAll = 0xFFFF,
|
||||
};
|
||||
|
||||
|
||||
// friend game played information
|
||||
#if defined( VALVE_CALLBACK_PACK_SMALL )
|
||||
#pragma pack( push, 4 )
|
||||
@ -87,7 +93,8 @@ enum EFriendFlags {
|
||||
#else
|
||||
#error steam_api_common.h should define VALVE_CALLBACK_PACK_xxx
|
||||
#endif
|
||||
struct FriendGameInfo_t {
|
||||
struct FriendGameInfo_t
|
||||
{
|
||||
CGameID m_gameID;
|
||||
uint32 m_unGameIP;
|
||||
uint16 m_usGamePort;
|
||||
@ -99,7 +106,8 @@ struct FriendGameInfo_t {
|
||||
// maximum number of characters in a user's name. Two flavors; one for UTF-8 and one for UTF-16.
|
||||
// The UTF-8 version has to be very generous to accomodate characters that get large when encoded
|
||||
// in UTF-8.
|
||||
enum {
|
||||
enum
|
||||
{
|
||||
k_cchPersonaNameMax = 128,
|
||||
k_cwchPersonaNameMax = 32,
|
||||
};
|
||||
@ -107,7 +115,8 @@ enum {
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: user restriction flags
|
||||
//-----------------------------------------------------------------------------
|
||||
enum EUserRestriction {
|
||||
enum EUserRestriction
|
||||
{
|
||||
k_nUserRestrictionNone = 0, // no known chat/content restriction
|
||||
k_nUserRestrictionUnknown = 1, // we don't know yet (user offline)
|
||||
k_nUserRestrictionAnyChat = 2, // user is not allowed to (or can't) send/recv any chat
|
||||
@ -127,16 +136,19 @@ enum { k_cchMaxRichPresenceKeyLength = 64 };
|
||||
enum { k_cchMaxRichPresenceValueLength = 256 };
|
||||
|
||||
// These values are passed as parameters to the store
|
||||
enum EOverlayToStoreFlag {
|
||||
enum EOverlayToStoreFlag
|
||||
{
|
||||
k_EOverlayToStoreFlag_None = 0,
|
||||
k_EOverlayToStoreFlag_AddToCart = 1,
|
||||
k_EOverlayToStoreFlag_AddToCartAndShow = 2,
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Tells Steam where to place the browser window inside the overlay
|
||||
//-----------------------------------------------------------------------------
|
||||
enum EActivateGameOverlayToWebPageMode {
|
||||
enum EActivateGameOverlayToWebPageMode
|
||||
{
|
||||
k_EActivateGameOverlayToWebPageMode_Default = 0, // Browser will open next to all other windows that the user has open in the overlay.
|
||||
// The window will remain open, even if the user closes then re-opens the overlay.
|
||||
|
||||
@ -145,11 +157,13 @@ enum EActivateGameOverlayToWebPageMode {
|
||||
// will also close. When the user closes the browser window, the overlay will automatically close.
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: interface to accessing information about individual users,
|
||||
// that can be a friend, in a group, on a game server or in a lobby with the local user
|
||||
//-----------------------------------------------------------------------------
|
||||
class ISteamFriends {
|
||||
class ISteamFriends
|
||||
{
|
||||
public:
|
||||
// returns the local players name - guaranteed to not be NULL.
|
||||
// this is the same name as on the users community profile page
|
||||
@ -428,16 +442,19 @@ STEAM_DEFINE_USER_INTERFACE_ACCESSOR(ISteamFriends*, SteamFriends, STEAMFRIENDS_
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: called when a friends' status changes
|
||||
//-----------------------------------------------------------------------------
|
||||
struct PersonaStateChange_t {
|
||||
struct PersonaStateChange_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamFriendsCallbacks + 4 };
|
||||
|
||||
uint64 m_ulSteamID; // steamID of the friend who changed
|
||||
int m_nChangeFlags; // what's changed
|
||||
};
|
||||
|
||||
|
||||
// used in PersonaStateChange_t::m_nChangeFlags to describe what's changed about a user
|
||||
// these flags describe what the client has learned has changed recently, so on startup you'll see a name, avatar & relationship change for every friend
|
||||
enum EPersonaChange {
|
||||
enum EPersonaChange
|
||||
{
|
||||
k_EPersonaChangeName = 0x0001,
|
||||
k_EPersonaChangeStatus = 0x0002,
|
||||
k_EPersonaChangeComeOnline = 0x0004,
|
||||
@ -455,30 +472,36 @@ enum EPersonaChange {
|
||||
k_EPersonaChangeRichPresence = 0x4000,
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: posted when game overlay activates or deactivates
|
||||
// the game can use this to be pause or resume single player games
|
||||
//-----------------------------------------------------------------------------
|
||||
struct GameOverlayActivated_t {
|
||||
struct GameOverlayActivated_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamFriendsCallbacks + 31 };
|
||||
uint8 m_bActive; // true if it's just been activated, false otherwise
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: called when the user tries to join a different game server from their friends list
|
||||
// game client should attempt to connect to specified server when this is received
|
||||
//-----------------------------------------------------------------------------
|
||||
struct GameServerChangeRequested_t {
|
||||
struct GameServerChangeRequested_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamFriendsCallbacks + 32 };
|
||||
char m_rgchServer[64]; // server address ("127.0.0.1:27015", "tf2.valvesoftware.com")
|
||||
char m_rgchPassword[64]; // server password, if any
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: called when the user tries to join a lobby from their friends list
|
||||
// game client should attempt to connect to specified lobby when this is received
|
||||
//-----------------------------------------------------------------------------
|
||||
struct GameLobbyJoinRequested_t {
|
||||
struct GameLobbyJoinRequested_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamFriendsCallbacks + 33 };
|
||||
CSteamID m_steamIDLobby;
|
||||
|
||||
@ -490,11 +513,13 @@ struct GameLobbyJoinRequested_t {
|
||||
CSteamID m_steamIDFriend;
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: called when an avatar is loaded in from a previous GetLargeFriendAvatar() call
|
||||
// if the image wasn't already available
|
||||
//-----------------------------------------------------------------------------
|
||||
struct AvatarImageLoaded_t {
|
||||
struct AvatarImageLoaded_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamFriendsCallbacks + 34 };
|
||||
CSteamID m_steamID; // steamid the avatar has been loaded for
|
||||
int m_iImage; // the image index of the now loaded image
|
||||
@ -502,58 +527,70 @@ struct AvatarImageLoaded_t {
|
||||
int m_iTall; // height of the loaded image
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: marks the return of a request officer list call
|
||||
//-----------------------------------------------------------------------------
|
||||
struct ClanOfficerListResponse_t {
|
||||
struct ClanOfficerListResponse_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamFriendsCallbacks + 35 };
|
||||
CSteamID m_steamIDClan;
|
||||
int m_cOfficers;
|
||||
uint8 m_bSuccess;
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: callback indicating updated data about friends rich presence information
|
||||
//-----------------------------------------------------------------------------
|
||||
struct FriendRichPresenceUpdate_t {
|
||||
struct FriendRichPresenceUpdate_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamFriendsCallbacks + 36 };
|
||||
CSteamID m_steamIDFriend; // friend who's rich presence has changed
|
||||
AppId_t m_nAppID; // the appID of the game (should always be the current game)
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: called when the user tries to join a game from their friends list
|
||||
// rich presence will have been set with the "connect" key which is set here
|
||||
//-----------------------------------------------------------------------------
|
||||
struct GameRichPresenceJoinRequested_t {
|
||||
struct GameRichPresenceJoinRequested_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamFriendsCallbacks + 37 };
|
||||
CSteamID m_steamIDFriend; // the friend they did the join via (will be invalid if not directly via a friend)
|
||||
char m_rgchConnect[k_cchMaxRichPresenceValueLength];
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: a chat message has been received for a clan chat the game has joined
|
||||
//-----------------------------------------------------------------------------
|
||||
struct GameConnectedClanChatMsg_t {
|
||||
struct GameConnectedClanChatMsg_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamFriendsCallbacks + 38 };
|
||||
CSteamID m_steamIDClanChat;
|
||||
CSteamID m_steamIDUser;
|
||||
int m_iMessageID;
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: a user has joined a clan chat
|
||||
//-----------------------------------------------------------------------------
|
||||
struct GameConnectedChatJoin_t {
|
||||
struct GameConnectedChatJoin_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamFriendsCallbacks + 39 };
|
||||
CSteamID m_steamIDClanChat;
|
||||
CSteamID m_steamIDUser;
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: a user has left the chat we're in
|
||||
//-----------------------------------------------------------------------------
|
||||
struct GameConnectedChatLeave_t {
|
||||
struct GameConnectedChatLeave_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamFriendsCallbacks + 40 };
|
||||
CSteamID m_steamIDClanChat;
|
||||
CSteamID m_steamIDUser;
|
||||
@ -561,18 +598,22 @@ struct GameConnectedChatLeave_t {
|
||||
bool m_bDropped; // true if Steam connection dropped
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: a DownloadClanActivityCounts() call has finished
|
||||
//-----------------------------------------------------------------------------
|
||||
struct DownloadClanActivityCountsResult_t {
|
||||
struct DownloadClanActivityCountsResult_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamFriendsCallbacks + 41 };
|
||||
bool m_bSuccess;
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: a JoinClanChatRoom() call has finished
|
||||
//-----------------------------------------------------------------------------
|
||||
struct JoinClanChatRoomCompletionResult_t {
|
||||
struct JoinClanChatRoomCompletionResult_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamFriendsCallbacks + 42 };
|
||||
CSteamID m_steamIDClanChat;
|
||||
EChatRoomEnterResponse m_eChatRoomEnterResponse;
|
||||
@ -581,27 +622,34 @@ struct JoinClanChatRoomCompletionResult_t {
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: a chat message has been received from a user
|
||||
//-----------------------------------------------------------------------------
|
||||
struct GameConnectedFriendChatMsg_t {
|
||||
struct GameConnectedFriendChatMsg_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamFriendsCallbacks + 43 };
|
||||
CSteamID m_steamIDUser;
|
||||
int m_iMessageID;
|
||||
};
|
||||
|
||||
struct FriendsGetFollowerCount_t {
|
||||
|
||||
struct FriendsGetFollowerCount_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamFriendsCallbacks + 44 };
|
||||
EResult m_eResult;
|
||||
CSteamID m_steamID;
|
||||
int m_nCount;
|
||||
};
|
||||
|
||||
struct FriendsIsFollowing_t {
|
||||
|
||||
struct FriendsIsFollowing_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamFriendsCallbacks + 45 };
|
||||
EResult m_eResult;
|
||||
CSteamID m_steamID;
|
||||
bool m_bIsFollowing;
|
||||
};
|
||||
|
||||
struct FriendsEnumerateFollowingList_t {
|
||||
|
||||
struct FriendsEnumerateFollowingList_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamFriendsCallbacks + 46 };
|
||||
EResult m_eResult;
|
||||
CSteamID m_rgSteamID[ k_cEnumerateFollowersMax ];
|
||||
@ -612,7 +660,8 @@ struct FriendsEnumerateFollowingList_t {
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: reports the result of an attempt to change the user's persona name
|
||||
//-----------------------------------------------------------------------------
|
||||
struct SetPersonaNameResponse_t {
|
||||
struct SetPersonaNameResponse_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamFriendsCallbacks + 47 };
|
||||
|
||||
bool m_bSuccess; // true if name change succeeded completely.
|
||||
@ -623,18 +672,22 @@ struct SetPersonaNameResponse_t {
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Invoked when the status of unread messages changes
|
||||
//-----------------------------------------------------------------------------
|
||||
struct UnreadChatMessagesChanged_t {
|
||||
struct UnreadChatMessagesChanged_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamFriendsCallbacks + 48 };
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Dispatched when an overlay browser instance is navigated to a protocol/scheme registered by RegisterProtocolInOverlayBrowser()
|
||||
//-----------------------------------------------------------------------------
|
||||
struct OverlayBrowserProtocolNavigation_t {
|
||||
struct OverlayBrowserProtocolNavigation_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamFriendsCallbacks + 49 };
|
||||
char rgchURI[ 1024 ];
|
||||
};
|
||||
|
||||
|
||||
#pragma pack( pop )
|
||||
|
||||
#endif // ISTEAMFRIENDS_H
|
||||
|
@ -12,8 +12,10 @@
|
||||
|
||||
#include "steam_api_common.h"
|
||||
|
||||
|
||||
// list of possible return values from the ISteamGameCoordinator API
|
||||
enum EGCResults {
|
||||
enum EGCResults
|
||||
{
|
||||
k_EGCResultOK = 0,
|
||||
k_EGCResultNoMessage = 1, // There is no message in the queue
|
||||
k_EGCResultBufferTooSmall = 2, // The buffer is too small for the requested message
|
||||
@ -21,12 +23,15 @@ enum EGCResults {
|
||||
k_EGCResultInvalidMessage = 4, // Something was wrong with the message being sent with SendMessage
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Functions for sending and receiving messages from the Game Coordinator
|
||||
// for this application
|
||||
//-----------------------------------------------------------------------------
|
||||
class ISteamGameCoordinator {
|
||||
class ISteamGameCoordinator
|
||||
{
|
||||
public:
|
||||
|
||||
// sends a message to the Game Coordinator
|
||||
virtual EGCResults SendMessage( uint32 unMsgType, const void *pubData, uint32 cubData ) = 0;
|
||||
|
||||
@ -38,6 +43,7 @@ public:
|
||||
// If the provided buffer is not large enough to fit the entire message, k_EGCResultBufferTooSmall is returned
|
||||
// and the message remains at the head of the queue.
|
||||
virtual EGCResults RetrieveMessage( uint32 *punMsgType, void *pubDest, uint32 cubDest, uint32 *pcubMsgSize ) = 0;
|
||||
|
||||
};
|
||||
#define STEAMGAMECOORDINATOR_INTERFACE_VERSION "SteamGameCoordinator001"
|
||||
|
||||
@ -51,13 +57,15 @@ public:
|
||||
#endif
|
||||
|
||||
// callback notification - A new message is available for reading from the message queue
|
||||
struct GCMessageAvailable_t {
|
||||
struct GCMessageAvailable_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamGameCoordinatorCallbacks + 1 };
|
||||
uint32 m_nMessageSize;
|
||||
};
|
||||
|
||||
// callback notification - A message failed to make it to the GC. It may be down temporarily
|
||||
struct GCMessageFailed_t {
|
||||
struct GCMessageFailed_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamGameCoordinatorCallbacks + 2 };
|
||||
};
|
||||
|
||||
|
@ -15,8 +15,10 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Functions for authenticating users via Steam to play on a game server
|
||||
//-----------------------------------------------------------------------------
|
||||
class ISteamGameServer {
|
||||
class ISteamGameServer
|
||||
{
|
||||
public:
|
||||
|
||||
//
|
||||
// Basic server data. These properties, if set, must be set before before calling LogOn. They
|
||||
// may not be changed after logged in.
|
||||
@ -89,14 +91,23 @@ public:
|
||||
|
||||
/// Set name of map to report in the server browser
|
||||
///
|
||||
/// @see k_cbMaxGameServerName
|
||||
/// @see k_cbMaxGameServerMapName
|
||||
virtual void SetMapName( const char *pszMapName ) = 0;
|
||||
|
||||
/// Let people know if your server will require a password
|
||||
virtual void SetPasswordProtected( bool bPasswordProtected ) = 0;
|
||||
|
||||
/// Spectator server. The default value is zero, meaning the service
|
||||
/// is not used.
|
||||
/// Spectator server port to advertise. The default value is zero, meaning the
|
||||
/// service is not used. If your server receives any info requests on the LAN,
|
||||
/// this is the value that will be placed into the reply for such local queries.
|
||||
///
|
||||
/// This is also the value that will be advertised by the master server.
|
||||
/// The only exception is if your server is using a FakeIP. Then then the second
|
||||
/// fake port number (index 1) assigned to your server will be listed on the master
|
||||
/// server as the spectator port, if you set this value to any nonzero value.
|
||||
///
|
||||
/// This function merely controls the values that are advertised -- it's up to you to
|
||||
/// configure the server to actually listen on this port and handle any spectator traffic
|
||||
virtual void SetSpectatorPort( uint16 unSpectatorPort ) = 0;
|
||||
|
||||
/// Name of the spectator server. (Only used if spectator port is nonzero.)
|
||||
@ -118,8 +129,6 @@ public:
|
||||
|
||||
/// Sets a string defining the "gamedata" for this server, this is optional, but if it is set
|
||||
/// it allows users to filter in the matchmaking/server-browser interfaces based on the value
|
||||
/// don't set this unless it actually changes, its only uploaded to the master once (when
|
||||
/// acknowledged)
|
||||
///
|
||||
/// @see k_cbMaxGameServerGameData
|
||||
virtual void SetGameData( const char *pchGameData ) = 0;
|
||||
@ -127,41 +136,19 @@ public:
|
||||
/// Region identifier. This is an optional field, the default value is empty, meaning the "world" region
|
||||
virtual void SetRegion( const char *pszRegion ) = 0;
|
||||
|
||||
//
|
||||
// Player list management / authentication
|
||||
//
|
||||
/// Indicate whether you wish to be listed on the master server list
|
||||
/// and/or respond to server browser / LAN discovery packets.
|
||||
/// The server starts with this value set to false. You should set all
|
||||
/// relevant server parameters before enabling advertisement on the server.
|
||||
///
|
||||
/// (This function used to be named EnableHeartbeats, so if you are wondering
|
||||
/// where that function went, it's right here. It does the same thing as before,
|
||||
/// the old name was just confusing.)
|
||||
virtual void SetAdvertiseServerActive( bool bActive ) = 0;
|
||||
|
||||
// Handles receiving a new connection from a Steam user. This call will ask the Steam
|
||||
// servers to validate the users identity, app ownership, and VAC status. If the Steam servers
|
||||
// are off-line, then it will validate the cached ticket itself which will validate app ownership
|
||||
// and identity. The AuthBlob here should be acquired on the game client using SteamUser()->InitiateGameConnection()
|
||||
// and must then be sent up to the game server for authentication.
|
||||
//
|
||||
// Return Value: returns true if the users ticket passes basic checks. pSteamIDUser will contain the Steam ID of this user. pSteamIDUser must NOT be NULL
|
||||
// If the call succeeds then you should expect a GSClientApprove_t or GSClientDeny_t callback which will tell you whether authentication
|
||||
// for the user has succeeded or failed (the steamid in the callback will match the one returned by this call)
|
||||
virtual bool SendUserConnectAndAuthenticate(uint32 unIPClient, const void* pvAuthBlob, uint32 cubAuthBlobSize, CSteamID* pSteamIDUser) = 0;
|
||||
|
||||
// Creates a fake user (ie, a bot) which will be listed as playing on the server, but skips validation.
|
||||
// Player list management / authentication.
|
||||
//
|
||||
// Return Value: Returns a SteamID for the user to be tracked with, you should call HandleUserDisconnect()
|
||||
// when this user leaves the server just like you would for a real user.
|
||||
virtual CSteamID CreateUnauthenticatedUserConnection() = 0;
|
||||
|
||||
// Should be called whenever a user leaves our game server, this lets Steam internally
|
||||
// track which users are currently on which servers for the purposes of preventing a single
|
||||
// account being logged into multiple servers, showing who is currently on a server, etc.
|
||||
virtual void SendUserDisconnect(CSteamID steamIDUser) = 0;
|
||||
|
||||
// Update the data to be displayed in the server browser and matchmaking interfaces for a user
|
||||
// currently connected to the server. For regular users you must call this after you receive a
|
||||
// GSUserValidationSuccess callback.
|
||||
//
|
||||
// Return Value: true if successful, false if failure (ie, steamIDUser wasn't for an active player)
|
||||
virtual bool BUpdateUserData(CSteamID steamIDUser, const char* pchPlayerName, uint32 uScore) = 0;
|
||||
|
||||
// New auth system APIs - do not mix with the old auth system APIs.
|
||||
// ----------------------------------------------------------------
|
||||
|
||||
// Retrieve ticket to be sent to the entity who wishes to authenticate you ( using BeginAuthSession API ).
|
||||
// pcbTicket retrieves the length of the actual ticket.
|
||||
@ -185,6 +172,7 @@ public:
|
||||
// returns false if we're not connected to the steam servers and thus cannot ask
|
||||
virtual bool RequestUserGroupStatus( CSteamID steamIDUser, CSteamID steamIDGroup ) = 0;
|
||||
|
||||
|
||||
// these two functions s are deprecated, and will not return results
|
||||
// they will be removed in a future version of the SDK
|
||||
virtual void GetGameplayStats( ) = 0;
|
||||
@ -196,12 +184,9 @@ public:
|
||||
// connect to
|
||||
virtual SteamIPAddress_t GetPublicIP() = 0;
|
||||
|
||||
// These are in GameSocketShare mode, where instead of ISteamGameServer creating its own
|
||||
// socket to talk to the master server on, it lets the game use its socket to forward messages
|
||||
// back and forth. This prevents us from requiring server ops to open up yet another port
|
||||
// in their firewalls.
|
||||
//
|
||||
// the IP address and port should be in host order, i.e 127.0.0.1 == 0x7f000001
|
||||
// Server browser related query packet processing for shared socket mode. These are used
|
||||
// when you pass STEAMGAMESERVER_QUERY_PORT_SHARED as the query port to SteamGameServer_Init.
|
||||
// IP address and port are in host order, i.e 127.0.0.1 == 0x7f000001
|
||||
|
||||
// These are used when you've elected to multiplex the game server's UDP socket
|
||||
// rather than having the master server updater use its own sockets.
|
||||
@ -220,21 +205,9 @@ public:
|
||||
virtual int GetNextOutgoingPacket( void *pOut, int cbMaxOut, uint32 *pNetAdr, uint16 *pPort ) = 0;
|
||||
|
||||
//
|
||||
// Control heartbeats / advertisement with master server
|
||||
// Server clan association
|
||||
//
|
||||
|
||||
// Call this as often as you like to tell the master server updater whether or not
|
||||
// you want it to be active (default: off).
|
||||
virtual void EnableHeartbeats(bool bActive) = 0;
|
||||
|
||||
// You usually don't need to modify this.
|
||||
// Pass -1 to use the default value for iHeartbeatInterval.
|
||||
// Some mods change this.
|
||||
virtual void SetHeartbeatInterval(int iHeartbeatInterval) = 0;
|
||||
|
||||
// Force a heartbeat to steam at the next opportunity
|
||||
virtual void ForceHeartbeat() = 0;
|
||||
|
||||
// associate this game server with this clan for the purposes of computing player compat
|
||||
STEAM_CALL_RESULT( AssociateWithClanResult_t )
|
||||
virtual SteamAPICall_t AssociateWithClan( CSteamID steamIDClan ) = 0;
|
||||
@ -242,9 +215,56 @@ public:
|
||||
// ask if any of the current players dont want to play with this new player - or vice versa
|
||||
STEAM_CALL_RESULT( ComputeNewPlayerCompatibilityResult_t )
|
||||
virtual SteamAPICall_t ComputeNewPlayerCompatibility( CSteamID steamIDNewPlayer ) = 0;
|
||||
|
||||
|
||||
|
||||
|
||||
// Handles receiving a new connection from a Steam user. This call will ask the Steam
|
||||
// servers to validate the users identity, app ownership, and VAC status. If the Steam servers
|
||||
// are off-line, then it will validate the cached ticket itself which will validate app ownership
|
||||
// and identity. The AuthBlob here should be acquired on the game client using SteamUser()->InitiateGameConnection()
|
||||
// and must then be sent up to the game server for authentication.
|
||||
//
|
||||
// Return Value: returns true if the users ticket passes basic checks. pSteamIDUser will contain the Steam ID of this user. pSteamIDUser must NOT be NULL
|
||||
// If the call succeeds then you should expect a GSClientApprove_t or GSClientDeny_t callback which will tell you whether authentication
|
||||
// for the user has succeeded or failed (the steamid in the callback will match the one returned by this call)
|
||||
//
|
||||
// DEPRECATED! This function will be removed from the SDK in an upcoming version.
|
||||
// Please migrate to BeginAuthSession and related functions.
|
||||
virtual bool SendUserConnectAndAuthenticate_DEPRECATED( uint32 unIPClient, const void *pvAuthBlob, uint32 cubAuthBlobSize, CSteamID *pSteamIDUser ) = 0;
|
||||
|
||||
// Creates a fake user (ie, a bot) which will be listed as playing on the server, but skips validation.
|
||||
//
|
||||
// Return Value: Returns a SteamID for the user to be tracked with, you should call EndAuthSession()
|
||||
// when this user leaves the server just like you would for a real user.
|
||||
virtual CSteamID CreateUnauthenticatedUserConnection() = 0;
|
||||
|
||||
// Should be called whenever a user leaves our game server, this lets Steam internally
|
||||
// track which users are currently on which servers for the purposes of preventing a single
|
||||
// account being logged into multiple servers, showing who is currently on a server, etc.
|
||||
//
|
||||
// DEPRECATED! This function will be removed from the SDK in an upcoming version.
|
||||
// Please migrate to BeginAuthSession and related functions.
|
||||
virtual void SendUserDisconnect_DEPRECATED( CSteamID steamIDUser ) = 0;
|
||||
|
||||
// Update the data to be displayed in the server browser and matchmaking interfaces for a user
|
||||
// currently connected to the server. For regular users you must call this after you receive a
|
||||
// GSUserValidationSuccess callback.
|
||||
//
|
||||
// Return Value: true if successful, false if failure (ie, steamIDUser wasn't for an active player)
|
||||
virtual bool BUpdateUserData( CSteamID steamIDUser, const char *pchPlayerName, uint32 uScore ) = 0;
|
||||
|
||||
// Deprecated functions. These will be removed in a future version of the SDK.
|
||||
// If you really need these, please contact us and help us understand what you are
|
||||
// using them for.
|
||||
|
||||
STEAM_PRIVATE_API(
|
||||
virtual void SetMasterServerHeartbeatInterval_DEPRECATED( int iHeartbeatInterval ) = 0;
|
||||
virtual void ForceMasterServerHeartbeat_DEPRECATED() = 0;
|
||||
)
|
||||
};
|
||||
|
||||
#define STEAMGAMESERVER_INTERFACE_VERSION "SteamGameServer013"
|
||||
#define STEAMGAMESERVER_INTERFACE_VERSION "SteamGameServer014"
|
||||
|
||||
// Global accessor
|
||||
inline ISteamGameServer *SteamGameServer();
|
||||
@ -259,23 +279,29 @@ STEAM_DEFINE_GAMESERVER_INTERFACE_ACCESSOR(ISteamGameServer*, SteamGameServer, S
|
||||
#error steam_api_common.h should define VALVE_CALLBACK_PACK_xxx
|
||||
#endif
|
||||
|
||||
|
||||
// client has been approved to connect to this game server
|
||||
struct GSClientApprove_t {
|
||||
struct GSClientApprove_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamGameServerCallbacks + 1 };
|
||||
CSteamID m_SteamID; // SteamID of approved player
|
||||
CSteamID m_OwnerSteamID; // SteamID of original owner for game license
|
||||
};
|
||||
|
||||
|
||||
// client has been denied to connection to this game server
|
||||
struct GSClientDeny_t {
|
||||
struct GSClientDeny_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamGameServerCallbacks + 2 };
|
||||
CSteamID m_SteamID;
|
||||
EDenyReason m_eDenyReason;
|
||||
char m_rgchOptionalText[128];
|
||||
};
|
||||
|
||||
|
||||
// request the game server should kick the user
|
||||
struct GSClientKick_t {
|
||||
struct GSClientKick_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamGameServerCallbacks + 3 };
|
||||
CSteamID m_SteamID;
|
||||
EDenyReason m_eDenyReason;
|
||||
@ -284,8 +310,10 @@ struct GSClientKick_t {
|
||||
// NOTE: callback values 4 and 5 are skipped because they are used for old deprecated callbacks,
|
||||
// do not reuse them here.
|
||||
|
||||
|
||||
// client achievement info
|
||||
struct GSClientAchievementStatus_t {
|
||||
struct GSClientAchievementStatus_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamGameServerCallbacks + 6 };
|
||||
uint64 m_SteamID;
|
||||
char m_pchAchievement[128];
|
||||
@ -294,13 +322,15 @@ struct GSClientAchievementStatus_t {
|
||||
|
||||
// received when the game server requests to be displayed as secure (VAC protected)
|
||||
// m_bSecure is true if the game server should display itself as secure to users, false otherwise
|
||||
struct GSPolicyResponse_t {
|
||||
struct GSPolicyResponse_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamUserCallbacks + 15 };
|
||||
uint8 m_bSecure;
|
||||
};
|
||||
|
||||
// GS gameplay stats info
|
||||
struct GSGameplayStats_t {
|
||||
struct GSGameplayStats_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamGameServerCallbacks + 7 };
|
||||
EResult m_eResult; // Result of the call
|
||||
int32 m_nRank; // Overall rank of the server (0-based)
|
||||
@ -309,7 +339,8 @@ struct GSGameplayStats_t {
|
||||
};
|
||||
|
||||
// send as a reply to RequestUserGroupStatus()
|
||||
struct GSClientGroupStatus_t {
|
||||
struct GSClientGroupStatus_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamGameServerCallbacks + 8 };
|
||||
CSteamID m_SteamIDUser;
|
||||
CSteamID m_SteamIDGroup;
|
||||
@ -318,7 +349,8 @@ struct GSClientGroupStatus_t {
|
||||
};
|
||||
|
||||
// Sent as a reply to GetServerReputation()
|
||||
struct GSReputation_t {
|
||||
struct GSReputation_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamGameServerCallbacks + 9 };
|
||||
EResult m_eResult; // Result of the call;
|
||||
uint32 m_unReputationScore; // The reputation score for the game server
|
||||
@ -337,13 +369,15 @@ struct GSReputation_t {
|
||||
};
|
||||
|
||||
// Sent as a reply to AssociateWithClan()
|
||||
struct AssociateWithClanResult_t {
|
||||
struct AssociateWithClanResult_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamGameServerCallbacks + 10 };
|
||||
EResult m_eResult; // Result of the call;
|
||||
};
|
||||
|
||||
// Sent as a reply to ComputeNewPlayerCompatibility()
|
||||
struct ComputeNewPlayerCompatibilityResult_t {
|
||||
struct ComputeNewPlayerCompatibilityResult_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamGameServerCallbacks + 11 };
|
||||
EResult m_eResult; // Result of the call;
|
||||
int m_cPlayersThatDontLikeCandidate;
|
||||
@ -352,6 +386,7 @@ struct ComputeNewPlayerCompatibilityResult_t {
|
||||
CSteamID m_SteamIDCandidate;
|
||||
};
|
||||
|
||||
|
||||
#pragma pack( pop )
|
||||
|
||||
#endif // ISTEAMGAMESERVER_H
|
||||
|
@ -15,7 +15,8 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Functions for authenticating users via Steam to play on a game server
|
||||
//-----------------------------------------------------------------------------
|
||||
class ISteamGameServerStats {
|
||||
class ISteamGameServerStats
|
||||
{
|
||||
public:
|
||||
// downloads stats for the user
|
||||
// returns a GSStatsReceived_t callback when completed
|
||||
@ -65,6 +66,7 @@ public:
|
||||
inline ISteamGameServerStats *SteamGameServerStats();
|
||||
STEAM_DEFINE_GAMESERVER_INTERFACE_ACCESSOR( ISteamGameServerStats *, SteamGameServerStats, STEAMGAMESERVERSTATS_INTERFACE_VERSION );
|
||||
|
||||
|
||||
// callbacks
|
||||
#if defined( VALVE_CALLBACK_PACK_SMALL )
|
||||
#pragma pack( push, 4 )
|
||||
@ -78,16 +80,19 @@ STEAM_DEFINE_GAMESERVER_INTERFACE_ACCESSOR(ISteamGameServerStats*, SteamGameServ
|
||||
// Purpose: called when the latests stats and achievements have been received
|
||||
// from the server
|
||||
//-----------------------------------------------------------------------------
|
||||
struct GSStatsReceived_t {
|
||||
struct GSStatsReceived_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamGameServerStatsCallbacks };
|
||||
EResult m_eResult; // Success / error fetching the stats
|
||||
CSteamID m_steamIDUser; // The user for whom the stats are retrieved for
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: result of a request to store the user stats for a game
|
||||
//-----------------------------------------------------------------------------
|
||||
struct GSStatsStored_t {
|
||||
struct GSStatsStored_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamGameServerStatsCallbacks + 1 };
|
||||
EResult m_eResult; // success / error
|
||||
CSteamID m_steamIDUser; // The user for whom the stats were stored
|
||||
@ -97,11 +102,13 @@ struct GSStatsStored_t {
|
||||
// Purpose: Callback indicating that a user's stats have been unloaded.
|
||||
// Call RequestUserStats again to access stats for this user
|
||||
//-----------------------------------------------------------------------------
|
||||
struct GSStatsUnloaded_t {
|
||||
struct GSStatsUnloaded_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamUserStatsCallbacks + 8 };
|
||||
CSteamID m_steamIDUser; // User whose stats have been unloaded
|
||||
};
|
||||
|
||||
#pragma pack( pop )
|
||||
|
||||
|
||||
#endif // ISTEAMGAMESERVERSTATS_H
|
||||
|
@ -18,7 +18,8 @@ const uint32 INVALID_HTMLBROWSER = 0;
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Functions for displaying HTML pages and interacting with them
|
||||
//-----------------------------------------------------------------------------
|
||||
class ISteamHTMLSurface {
|
||||
class ISteamHTMLSurface
|
||||
{
|
||||
public:
|
||||
virtual ~ISteamHTMLSurface() {}
|
||||
|
||||
@ -65,7 +66,8 @@ public:
|
||||
// run this javascript script in the currently loaded page
|
||||
virtual void ExecuteJavascript( HHTMLBrowser unBrowserHandle, const char *pchScript ) = 0;
|
||||
|
||||
enum EHTMLMouseButton {
|
||||
enum EHTMLMouseButton
|
||||
{
|
||||
eHTMLMouseButton_Left = 0,
|
||||
eHTMLMouseButton_Right = 1,
|
||||
eHTMLMouseButton_Middle = 2,
|
||||
@ -80,7 +82,8 @@ public:
|
||||
// nDelta is pixels of scroll
|
||||
virtual void MouseWheel( HHTMLBrowser unBrowserHandle, int32 nDelta ) = 0;
|
||||
|
||||
enum EMouseCursor {
|
||||
enum EMouseCursor
|
||||
{
|
||||
dc_user = 0,
|
||||
dc_none,
|
||||
dc_arrow,
|
||||
@ -126,7 +129,8 @@ public:
|
||||
dc_last, // custom cursors start from this value and up
|
||||
};
|
||||
|
||||
enum EHTMLKeyModifiers {
|
||||
enum EHTMLKeyModifiers
|
||||
{
|
||||
k_eHTMLKeyModifier_None = 0,
|
||||
k_eHTMLKeyModifier_AltDown = 1 << 0,
|
||||
k_eHTMLKeyModifier_CtrlDown = 1 << 1,
|
||||
@ -197,7 +201,6 @@ public:
|
||||
virtual void JSDialogResponse( HHTMLBrowser unBrowserHandle, bool bResult ) = 0;
|
||||
|
||||
// You MUST call this in response to a HTML_FileOpenDialog_t callback
|
||||
STEAM_IGNOREATTR()
|
||||
virtual void FileLoadDialogResponse( HHTMLBrowser unBrowserHandle, const char **pchSelectedFiles ) = 0;
|
||||
};
|
||||
|
||||
@ -216,6 +219,7 @@ STEAM_DEFINE_USER_INTERFACE_ACCESSOR(ISteamHTMLSurface*, SteamHTMLSurface, STEAM
|
||||
#error steam_api_common.h should define VALVE_CALLBACK_PACK_xxx
|
||||
#endif
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: The browser is ready for use
|
||||
//-----------------------------------------------------------------------------
|
||||
@ -223,6 +227,7 @@ STEAM_CALLBACK_BEGIN(HTML_BrowserReady_t, k_iSteamHTMLSurfaceCallbacks + 1)
|
||||
STEAM_CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // this browser is now fully created and ready to navigate to pages
|
||||
STEAM_CALLBACK_END(1)
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: the browser has a pending paint
|
||||
//-----------------------------------------------------------------------------
|
||||
@ -241,6 +246,7 @@ STEAM_CALLBACK_MEMBER(10, float, flPageScale) // the page scale factor on this p
|
||||
STEAM_CALLBACK_MEMBER(11, uint32, unPageSerial) // incremented on each new page load, you can use this to reject draws while navigating to new pages
|
||||
STEAM_CALLBACK_END(12)
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: The browser wanted to navigate to a new page
|
||||
// NOTE - you MUST call AllowStartRequest in response to this callback
|
||||
@ -253,6 +259,7 @@ STEAM_CALLBACK_MEMBER(3, const char*, pchPostData) // any posted data for the re
|
||||
STEAM_CALLBACK_MEMBER(4, bool, bIsRedirect) // true if this was a http/html redirect from the last load request
|
||||
STEAM_CALLBACK_END(5)
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: The browser has been requested to close due to user interaction (usually from a javascript window.close() call)
|
||||
//-----------------------------------------------------------------------------
|
||||
@ -260,6 +267,7 @@ STEAM_CALLBACK_BEGIN(HTML_CloseBrowser_t, k_iSteamHTMLSurfaceCallbacks + 4)
|
||||
STEAM_CALLBACK_MEMBER(0, HHTMLBrowser, unBrowserHandle) // the handle of the surface
|
||||
STEAM_CALLBACK_END(1)
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: the browser is navigating to a new url
|
||||
//-----------------------------------------------------------------------------
|
||||
@ -272,6 +280,7 @@ STEAM_CALLBACK_MEMBER(4, const char*, pchPageTitle) // the title of the page
|
||||
STEAM_CALLBACK_MEMBER( 5, bool, bNewNavigation ) // true if this was from a fresh tab and not a click on an existing page
|
||||
STEAM_CALLBACK_END(6)
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: A page is finished loading
|
||||
//-----------------------------------------------------------------------------
|
||||
@ -281,6 +290,7 @@ STEAM_CALLBACK_MEMBER(1, const char*, pchURL) //
|
||||
STEAM_CALLBACK_MEMBER( 2, const char *, pchPageTitle ) //
|
||||
STEAM_CALLBACK_END(3)
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: a request to load this url in a new tab
|
||||
//-----------------------------------------------------------------------------
|
||||
@ -289,6 +299,7 @@ STEAM_CALLBACK_MEMBER(0, HHTMLBrowser, unBrowserHandle) // the handle of the sur
|
||||
STEAM_CALLBACK_MEMBER( 1, const char *, pchURL ) //
|
||||
STEAM_CALLBACK_END(2)
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: the page has a new title now
|
||||
//-----------------------------------------------------------------------------
|
||||
@ -297,6 +308,7 @@ STEAM_CALLBACK_MEMBER(0, HHTMLBrowser, unBrowserHandle) // the handle of the sur
|
||||
STEAM_CALLBACK_MEMBER( 1, const char *, pchTitle ) //
|
||||
STEAM_CALLBACK_END(2)
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: results from a search
|
||||
//-----------------------------------------------------------------------------
|
||||
@ -306,6 +318,7 @@ STEAM_CALLBACK_MEMBER(1, uint32, unResults) //
|
||||
STEAM_CALLBACK_MEMBER( 2, uint32, unCurrentMatch ) //
|
||||
STEAM_CALLBACK_END(3)
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: page history status changed on the ability to go backwards and forward
|
||||
//-----------------------------------------------------------------------------
|
||||
@ -315,6 +328,7 @@ STEAM_CALLBACK_MEMBER(1, bool, bCanGoBack) //
|
||||
STEAM_CALLBACK_MEMBER( 2, bool, bCanGoForward ) //
|
||||
STEAM_CALLBACK_END(3)
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: details on the visibility and size of the horizontal scrollbar
|
||||
//-----------------------------------------------------------------------------
|
||||
@ -327,6 +341,7 @@ STEAM_CALLBACK_MEMBER(4, bool, bVisible) //
|
||||
STEAM_CALLBACK_MEMBER( 5, uint32, unPageSize ) //
|
||||
STEAM_CALLBACK_END(6)
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: details on the visibility and size of the vertical scrollbar
|
||||
//-----------------------------------------------------------------------------
|
||||
@ -339,6 +354,7 @@ STEAM_CALLBACK_MEMBER(4, bool, bVisible) //
|
||||
STEAM_CALLBACK_MEMBER( 5, uint32, unPageSize ) //
|
||||
STEAM_CALLBACK_END(6)
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: response to GetLinkAtPosition call
|
||||
//-----------------------------------------------------------------------------
|
||||
@ -351,6 +367,8 @@ STEAM_CALLBACK_MEMBER(4, bool, bInput) //
|
||||
STEAM_CALLBACK_MEMBER( 5, bool, bLiveLink ) //
|
||||
STEAM_CALLBACK_END(6)
|
||||
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: show a Javascript alert dialog, call JSDialogResponse
|
||||
// when the user dismisses this dialog (or right away to ignore it)
|
||||
@ -360,6 +378,7 @@ STEAM_CALLBACK_MEMBER(0, HHTMLBrowser, unBrowserHandle) // the handle of the sur
|
||||
STEAM_CALLBACK_MEMBER( 1, const char *, pchMessage ) //
|
||||
STEAM_CALLBACK_END(2)
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: show a Javascript confirmation dialog, call JSDialogResponse
|
||||
// when the user dismisses this dialog (or right away to ignore it)
|
||||
@ -369,6 +388,7 @@ STEAM_CALLBACK_MEMBER(0, HHTMLBrowser, unBrowserHandle) // the handle of the sur
|
||||
STEAM_CALLBACK_MEMBER( 1, const char *, pchMessage ) //
|
||||
STEAM_CALLBACK_END(2)
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: when received show a file open dialog
|
||||
// then call FileLoadDialogResponse with the file(s) the user selected.
|
||||
@ -379,6 +399,7 @@ STEAM_CALLBACK_MEMBER(1, const char*, pchTitle) //
|
||||
STEAM_CALLBACK_MEMBER( 2, const char *, pchInitialFile ) //
|
||||
STEAM_CALLBACK_END(3)
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: a new html window is being created.
|
||||
//
|
||||
@ -398,6 +419,7 @@ STEAM_CALLBACK_MEMBER(5, uint32, unTall) // the total height of the pBGRA textur
|
||||
STEAM_CALLBACK_MEMBER( 6, HHTMLBrowser, unNewWindow_BrowserHandle_IGNORE )
|
||||
STEAM_CALLBACK_END(7)
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: change the cursor to display
|
||||
//-----------------------------------------------------------------------------
|
||||
@ -406,6 +428,7 @@ STEAM_CALLBACK_MEMBER(0, HHTMLBrowser, unBrowserHandle) // the handle of the sur
|
||||
STEAM_CALLBACK_MEMBER( 1, uint32, eMouseCursor ) // the EMouseCursor to display
|
||||
STEAM_CALLBACK_END(2)
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: informational message from the browser
|
||||
//-----------------------------------------------------------------------------
|
||||
@ -414,6 +437,7 @@ STEAM_CALLBACK_MEMBER(0, HHTMLBrowser, unBrowserHandle) // the handle of the sur
|
||||
STEAM_CALLBACK_MEMBER( 1, const char *, pchMsg ) // the EMouseCursor to display
|
||||
STEAM_CALLBACK_END(2)
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: show a tooltip
|
||||
//-----------------------------------------------------------------------------
|
||||
@ -422,6 +446,7 @@ STEAM_CALLBACK_MEMBER(0, HHTMLBrowser, unBrowserHandle) // the handle of the sur
|
||||
STEAM_CALLBACK_MEMBER( 1, const char *, pchMsg ) // the EMouseCursor to display
|
||||
STEAM_CALLBACK_END(2)
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: update the text of an existing tooltip
|
||||
//-----------------------------------------------------------------------------
|
||||
@ -430,6 +455,7 @@ STEAM_CALLBACK_MEMBER(0, HHTMLBrowser, unBrowserHandle) // the handle of the sur
|
||||
STEAM_CALLBACK_MEMBER( 1, const char *, pchMsg ) // the EMouseCursor to display
|
||||
STEAM_CALLBACK_END(2)
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: hide the tooltip you are showing
|
||||
//-----------------------------------------------------------------------------
|
||||
@ -437,6 +463,7 @@ STEAM_CALLBACK_BEGIN(HTML_HideToolTip_t, k_iSteamHTMLSurfaceCallbacks + 26)
|
||||
STEAM_CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the handle of the surface
|
||||
STEAM_CALLBACK_END(1)
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: The browser has restarted due to an internal failure, use this new handle value
|
||||
//-----------------------------------------------------------------------------
|
||||
@ -445,6 +472,8 @@ STEAM_CALLBACK_MEMBER(0, HHTMLBrowser, unBrowserHandle) // this is the new brows
|
||||
STEAM_CALLBACK_MEMBER( 1, HHTMLBrowser, unOldBrowserHandle ) // the handle for the browser before the restart, if your handle was this then switch to using unBrowserHandle for API calls
|
||||
STEAM_CALLBACK_END(2)
|
||||
|
||||
|
||||
#pragma pack( pop )
|
||||
|
||||
|
||||
#endif // ISTEAMHTMLSURFACE_H
|
||||
|
@ -23,8 +23,10 @@ typedef uint32 HTTPCookieContainerHandle;
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: interface to http client
|
||||
//-----------------------------------------------------------------------------
|
||||
class ISteamHTTP {
|
||||
class ISteamHTTP
|
||||
{
|
||||
public:
|
||||
|
||||
// Initializes a new HTTP request, returning a handle to use in further operations on it. Requires
|
||||
// the method (GET or POST) and the absolute URL for the request. Both http and https are supported,
|
||||
// so this string must start with http:// or https:// and should look like http://store.steampowered.com/app/250/
|
||||
@ -157,7 +159,8 @@ STEAM_DEFINE_GAMESERVER_INTERFACE_ACCESSOR(ISteamHTTP*, SteamGameServerHTTP, STE
|
||||
#error steam_api_common.h should define VALVE_CALLBACK_PACK_xxx
|
||||
#endif
|
||||
|
||||
struct HTTPRequestCompleted_t {
|
||||
struct HTTPRequestCompleted_t
|
||||
{
|
||||
enum { k_iCallback = k_iClientHTTPCallbacks + 1 };
|
||||
|
||||
// Handle value for the request that has completed.
|
||||
@ -178,7 +181,9 @@ struct HTTPRequestCompleted_t {
|
||||
uint32 m_unBodySize; // Same as GetHTTPResponseBodySize()
|
||||
};
|
||||
|
||||
struct HTTPRequestHeadersReceived_t {
|
||||
|
||||
struct HTTPRequestHeadersReceived_t
|
||||
{
|
||||
enum { k_iCallback = k_iClientHTTPCallbacks + 2 };
|
||||
|
||||
// Handle value for the request that has received headers.
|
||||
@ -189,7 +194,8 @@ struct HTTPRequestHeadersReceived_t {
|
||||
uint64 m_ulContextValue;
|
||||
};
|
||||
|
||||
struct HTTPRequestDataReceived_t {
|
||||
struct HTTPRequestDataReceived_t
|
||||
{
|
||||
enum { k_iCallback = k_iClientHTTPCallbacks + 3 };
|
||||
|
||||
// Handle value for the request that has received data.
|
||||
@ -199,6 +205,7 @@ struct HTTPRequestDataReceived_t {
|
||||
// no context value was set.
|
||||
uint64 m_ulContextValue;
|
||||
|
||||
|
||||
// Offset to provide to GetHTTPStreamingResponseBodyData to get this chunk of data
|
||||
uint32 m_cOffset;
|
||||
|
||||
@ -206,6 +213,7 @@ struct HTTPRequestDataReceived_t {
|
||||
uint32 m_cBytesReceived;
|
||||
};
|
||||
|
||||
|
||||
#pragma pack( pop )
|
||||
|
||||
#endif // ISTEAMHTTP_H
|
@ -31,7 +31,8 @@
|
||||
#define STEAM_INPUT_MIN_ANALOG_ACTION_DATA -1.0f
|
||||
#define STEAM_INPUT_MAX_ANALOG_ACTION_DATA 1.0f
|
||||
|
||||
enum EInputSourceMode {
|
||||
enum EInputSourceMode
|
||||
{
|
||||
k_EInputSourceMode_None,
|
||||
k_EInputSourceMode_Dpad,
|
||||
k_EInputSourceMode_Buttons,
|
||||
@ -55,7 +56,8 @@ enum EInputSourceMode {
|
||||
// guarantee that they will be added in a contiguous manner - use GetInputTypeForHandle instead.
|
||||
// Versions of Steam that add new controller types in the future will extend this enum so if you're
|
||||
// using a lookup table please check the bounds of any origins returned by Steam.
|
||||
enum EInputActionOrigin {
|
||||
enum EInputActionOrigin
|
||||
{
|
||||
// Steam Controller
|
||||
k_EInputActionOrigin_None,
|
||||
k_EInputActionOrigin_SteamController_A,
|
||||
@ -204,11 +206,11 @@ enum EInputActionOrigin {
|
||||
k_EInputActionOrigin_XBoxOne_DPad_West,
|
||||
k_EInputActionOrigin_XBoxOne_DPad_East,
|
||||
k_EInputActionOrigin_XBoxOne_DPad_Move,
|
||||
k_EInputActionOrigin_XBoxOne_Reserved1,
|
||||
k_EInputActionOrigin_XBoxOne_Reserved2,
|
||||
k_EInputActionOrigin_XBoxOne_Reserved3,
|
||||
k_EInputActionOrigin_XBoxOne_Reserved4,
|
||||
k_EInputActionOrigin_XBoxOne_Reserved5,
|
||||
k_EInputActionOrigin_XBoxOne_LeftGrip_Lower,
|
||||
k_EInputActionOrigin_XBoxOne_LeftGrip_Upper,
|
||||
k_EInputActionOrigin_XBoxOne_RightGrip_Lower,
|
||||
k_EInputActionOrigin_XBoxOne_RightGrip_Upper,
|
||||
k_EInputActionOrigin_XBoxOne_Share, // Xbox Series X controllers only
|
||||
k_EInputActionOrigin_XBoxOne_Reserved6,
|
||||
k_EInputActionOrigin_XBoxOne_Reserved7,
|
||||
k_EInputActionOrigin_XBoxOne_Reserved8,
|
||||
@ -256,6 +258,7 @@ enum EInputActionOrigin {
|
||||
k_EInputActionOrigin_XBox360_Reserved9,
|
||||
k_EInputActionOrigin_XBox360_Reserved10,
|
||||
|
||||
|
||||
// Switch - Pro or Joycons used as a single input device.
|
||||
// This does not apply to a single joycon
|
||||
k_EInputActionOrigin_Switch_A,
|
||||
@ -408,7 +411,8 @@ enum EInputActionOrigin {
|
||||
k_EInputActionOrigin_MaximumPossibleValue = 32767, // Origins are currently a maximum of 16 bits.
|
||||
};
|
||||
|
||||
enum EXboxOrigin {
|
||||
enum EXboxOrigin
|
||||
{
|
||||
k_EXboxOrigin_A,
|
||||
k_EXboxOrigin_B,
|
||||
k_EXboxOrigin_X,
|
||||
@ -440,12 +444,28 @@ enum EXboxOrigin {
|
||||
k_EXboxOrigin_Count,
|
||||
};
|
||||
|
||||
enum ESteamControllerPad {
|
||||
enum ESteamControllerPad
|
||||
{
|
||||
k_ESteamControllerPad_Left,
|
||||
k_ESteamControllerPad_Right
|
||||
};
|
||||
|
||||
enum ESteamInputType {
|
||||
enum EControllerHapticLocation
|
||||
{
|
||||
k_EControllerHapticLocation_Left = ( 1 << k_ESteamControllerPad_Left ),
|
||||
k_EControllerHapticLocation_Right = ( 1 << k_ESteamControllerPad_Right ),
|
||||
k_EControllerHapticLocation_Both = ( 1 << k_ESteamControllerPad_Left | 1 << k_ESteamControllerPad_Right ),
|
||||
};
|
||||
|
||||
enum EControllerHapticType
|
||||
{
|
||||
k_EControllerHapticType_Off,
|
||||
k_EControllerHapticType_Tick,
|
||||
k_EControllerHapticType_Click,
|
||||
};
|
||||
|
||||
enum ESteamInputType
|
||||
{
|
||||
k_ESteamInputType_Unknown,
|
||||
k_ESteamInputType_SteamController,
|
||||
k_ESteamInputType_XBox360Controller,
|
||||
@ -464,14 +484,39 @@ enum ESteamInputType {
|
||||
k_ESteamInputType_MaximumPossibleValue = 255,
|
||||
};
|
||||
|
||||
// Individual values are used by the GetSessionInputConfigurationSettings bitmask
|
||||
enum ESteamInputConfigurationEnableType
|
||||
{
|
||||
k_ESteamInputConfigurationEnableType_None = 0x0000,
|
||||
k_ESteamInputConfigurationEnableType_Playstation = 0x0001,
|
||||
k_ESteamInputConfigurationEnableType_Xbox = 0x0002,
|
||||
k_ESteamInputConfigurationEnableType_Generic = 0x0004,
|
||||
k_ESteamInputConfigurationEnableType_Switch = 0x0008,
|
||||
};
|
||||
|
||||
// These values are passed into SetLEDColor
|
||||
enum ESteamInputLEDFlag {
|
||||
enum ESteamInputLEDFlag
|
||||
{
|
||||
k_ESteamInputLEDFlag_SetColor,
|
||||
// Restore the LED color to the user's preference setting as set in the controller personalization menu.
|
||||
// This also happens automatically on exit of your game.
|
||||
k_ESteamInputLEDFlag_RestoreUserDefault
|
||||
};
|
||||
|
||||
// These values are passed into GetGlyphPNGForActionOrigin
|
||||
enum ESteamInputGlyphSize
|
||||
{
|
||||
k_ESteamInputGlyphSize_Small,
|
||||
k_ESteamInputGlyphSize_Medium,
|
||||
k_ESteamInputGlyphSize_Large,
|
||||
};
|
||||
|
||||
enum ESteamInputActionEventType
|
||||
{
|
||||
ESteamInputActionEventType_DigitalAction,
|
||||
ESteamInputActionEventType_AnalogAction,
|
||||
};
|
||||
|
||||
// InputHandle_t is used to refer to a specific controller.
|
||||
// This handle will consistently identify a controller, even if it is disconnected and re-connected
|
||||
typedef uint64 InputHandle_t;
|
||||
@ -484,7 +529,8 @@ typedef uint64 InputAnalogActionHandle_t;
|
||||
|
||||
#pragma pack( push, 1 )
|
||||
|
||||
struct InputAnalogActionData_t {
|
||||
struct InputAnalogActionData_t
|
||||
{
|
||||
// Type of data coming from this action, this will match what got specified in the action set
|
||||
EInputSourceMode eMode;
|
||||
|
||||
@ -495,7 +541,8 @@ struct InputAnalogActionData_t {
|
||||
bool bActive;
|
||||
};
|
||||
|
||||
struct InputDigitalActionData_t {
|
||||
struct InputDigitalActionData_t
|
||||
{
|
||||
// The current state of this action; will be true if currently pressed
|
||||
bool bState;
|
||||
|
||||
@ -503,7 +550,8 @@ struct InputDigitalActionData_t {
|
||||
bool bActive;
|
||||
};
|
||||
|
||||
struct InputMotionData_t {
|
||||
struct InputMotionData_t
|
||||
{
|
||||
// Sensor-fused absolute rotation; will drift in heading
|
||||
float rotQuatX;
|
||||
float rotQuatY;
|
||||
@ -521,22 +569,64 @@ struct InputMotionData_t {
|
||||
float rotVelZ;
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: when callbacks are enabled this fires each time a controller action
|
||||
// state changes
|
||||
//-----------------------------------------------------------------------------
|
||||
struct SteamInputActionEvent_t
|
||||
{
|
||||
InputHandle_t controllerHandle;
|
||||
ESteamInputActionEventType eEventType;
|
||||
union {
|
||||
struct {
|
||||
InputAnalogActionHandle_t actionHandle;
|
||||
InputAnalogActionData_t analogActionData;
|
||||
} analogAction;
|
||||
struct {
|
||||
InputDigitalActionHandle_t actionHandle;
|
||||
InputDigitalActionData_t digitalActionData;
|
||||
} digitalAction;
|
||||
};
|
||||
};
|
||||
|
||||
#pragma pack( pop )
|
||||
|
||||
typedef void ( *SteamInputActionEventCallbackPointer )( SteamInputActionEvent_t * );
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Steam Input API
|
||||
//-----------------------------------------------------------------------------
|
||||
class ISteamInput {
|
||||
class ISteamInput
|
||||
{
|
||||
public:
|
||||
// Init and Shutdown must be called when starting/ending use of this interface
|
||||
virtual bool Init() = 0;
|
||||
|
||||
// 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;
|
||||
|
||||
// Synchronize API state with the latest Steam Controller inputs available. This
|
||||
// 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. This must
|
||||
// be called from somewhere before GetConnectedControllers will return any handles
|
||||
virtual void RunFrame() = 0;
|
||||
// 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.
|
||||
@ -544,6 +634,32 @@ public:
|
||||
// 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
|
||||
//-----------------------------------------------------------------------------
|
||||
@ -561,8 +677,9 @@ public:
|
||||
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 ControllerActionSetHandle_t handles
|
||||
// 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;
|
||||
|
||||
@ -581,6 +698,9 @@ public:
|
||||
// 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;
|
||||
|
||||
@ -592,12 +712,21 @@ public:
|
||||
// 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 art for on-screen glyph for a particular origin
|
||||
virtual const char* GetGlyphForActionOrigin(EInputActionOrigin eOrigin) = 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;
|
||||
|
||||
@ -611,20 +740,26 @@ public:
|
||||
// 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 TriggerHapticPulse(InputHandle_t inputHandle, ESteamControllerPad eTargetPad, unsigned short usDurationMicroSec) = 0;
|
||||
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 TriggerRepeatedHapticPulse(InputHandle_t inputHandle, ESteamControllerPad eTargetPad, unsigned short usDurationMicroSec, unsigned short usOffMicroSec, unsigned short unRepeat, unsigned int nFlags) = 0;
|
||||
virtual void Legacy_TriggerRepeatedHapticPulse( InputHandle_t inputHandle, ESteamControllerPad eTargetPad, unsigned short usDurationMicroSec, unsigned short usOffMicroSec, unsigned short unRepeat, unsigned int nFlags ) = 0;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Utility functions availible without using the rest of Steam Input API
|
||||
// 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
|
||||
@ -663,12 +798,64 @@ public:
|
||||
// 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;
|
||||
};
|
||||
|
||||
#define STEAMINPUT_INTERFACE_VERSION "SteamInput002"
|
||||
#define STEAMINPUT_INTERFACE_VERSION "SteamInput005"
|
||||
|
||||
// Global interface accessor
|
||||
inline ISteamInput *SteamInput();
|
||||
STEAM_DEFINE_USER_INTERFACE_ACCESSOR( ISteamInput *, SteamInput, STEAMINPUT_INTERFACE_VERSION );
|
||||
|
||||
#if defined( VALVE_CALLBACK_PACK_SMALL )
|
||||
#pragma pack( push, 4 )
|
||||
#elif defined( VALVE_CALLBACK_PACK_LARGE )
|
||||
#pragma pack( push, 8 )
|
||||
#else
|
||||
#error steam_api_common.h should define VALVE_CALLBACK_PACK_xxx
|
||||
#endif
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: called when a new controller has been connected, will fire once
|
||||
// per controller if multiple new controllers connect in the same frame
|
||||
//-----------------------------------------------------------------------------
|
||||
struct SteamInputDeviceConnected_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamControllerCallbacks + 1 };
|
||||
InputHandle_t m_ulConnectedDeviceHandle; // Handle for device
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: called when a new controller has been connected, will fire once
|
||||
// per controller if multiple new controllers connect in the same frame
|
||||
//-----------------------------------------------------------------------------
|
||||
struct SteamInputDeviceDisconnected_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamControllerCallbacks + 2 };
|
||||
InputHandle_t m_ulDisconnectedDeviceHandle; // Handle for device
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: called when a controller configuration has been loaded, will fire once
|
||||
// per controller per focus change for Steam Input enabled controllers
|
||||
//-----------------------------------------------------------------------------
|
||||
struct SteamInputConfigurationLoaded_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamControllerCallbacks + 3 };
|
||||
AppId_t m_unAppID;
|
||||
InputHandle_t m_ulDeviceHandle; // Handle for device
|
||||
CSteamID m_ulMappingCreator; // May differ from local user when using
|
||||
// an unmodified community or official config
|
||||
uint32 m_unMajorRevision; // Binding revision from In-game Action File.
|
||||
// Same value as queried by GetDeviceBindingRevision
|
||||
uint32 m_unMinorRevision;
|
||||
bool m_bUsesSteamInputAPI; // Does the configuration contain any Analog/Digital actions?
|
||||
bool m_bUsesGamepadAPI; // Does the configuration contain any Xinput bindings?
|
||||
};
|
||||
|
||||
#pragma pack( pop )
|
||||
|
||||
#endif // ISTEAMINPUT_H
|
@ -21,6 +21,7 @@
|
||||
#error steam_api_common.h should define VALVE_CALLBACK_PACK_xxx
|
||||
#endif
|
||||
|
||||
|
||||
// Every individual instance of an item has a globally-unique ItemInstanceID.
|
||||
// This ID is unique to the combination of (player, specific item instance)
|
||||
// and will not be transferred to another player or re-used for another item.
|
||||
@ -34,7 +35,9 @@ static const SteamItemInstanceID_t k_SteamItemInstanceIDInvalid = (SteamItemInst
|
||||
// reserved for internal Steam use.
|
||||
typedef int32 SteamItemDef_t;
|
||||
|
||||
enum ESteamItemFlags {
|
||||
|
||||
enum ESteamItemFlags
|
||||
{
|
||||
// Item status flags - these flags are permanently attached to specific item instances
|
||||
k_ESteamItemNoTrade = 1 << 0, // This item is account-locked and cannot be traded or given away.
|
||||
|
||||
@ -46,7 +49,8 @@ enum ESteamItemFlags {
|
||||
// Do not assume anything about the state of other flags which are not defined here.
|
||||
};
|
||||
|
||||
struct SteamItemDetails_t {
|
||||
struct SteamItemDetails_t
|
||||
{
|
||||
SteamItemInstanceID_t m_itemId;
|
||||
SteamItemDef_t m_iDefinition;
|
||||
uint16 m_unQuantity;
|
||||
@ -63,8 +67,10 @@ const SteamInventoryUpdateHandle_t k_SteamInventoryUpdateHandleInvalid = 0xfffff
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Steam Inventory query and manipulation API
|
||||
//-----------------------------------------------------------------------------
|
||||
class ISteamInventory {
|
||||
class ISteamInventory
|
||||
{
|
||||
public:
|
||||
|
||||
// INVENTORY ASYNC RESULT MANAGEMENT
|
||||
//
|
||||
// Asynchronous inventory queries always output a result handle which can be used with
|
||||
@ -80,16 +86,13 @@ public:
|
||||
// k_EResultServiceUnavailable - ERROR: service temporarily down, you may retry later
|
||||
// k_EResultLimitExceeded - ERROR: operation would exceed per-user inventory limits
|
||||
// k_EResultFail - ERROR: unknown / generic error
|
||||
STEAM_METHOD_DESC(Find out the status of an asynchronous inventory result handle.)
|
||||
virtual EResult GetResultStatus( SteamInventoryResult_t resultHandle ) = 0;
|
||||
|
||||
// Copies the contents of a result set into a flat array. The specific
|
||||
// contents of the result set depend on which query which was used.
|
||||
STEAM_METHOD_DESC(Copies the contents of a result set into a flat array.The specific contents of the result set depend on which query which was used.)
|
||||
virtual bool GetResultItems( SteamInventoryResult_t resultHandle,
|
||||
STEAM_OUT_ARRAY_COUNT( punOutItemsArraySize,Output array) SteamItemDetails_t *pOutItemsArray,
|
||||
uint32* punOutItemsArraySize)
|
||||
= 0;
|
||||
uint32 *punOutItemsArraySize ) = 0;
|
||||
|
||||
// In combination with GetResultItems, you can use GetResultItemProperty to retrieve
|
||||
// dynamic string properties for a given item returned in the result set.
|
||||
@ -106,24 +109,21 @@ public:
|
||||
virtual bool GetResultItemProperty( SteamInventoryResult_t resultHandle,
|
||||
uint32 unItemIndex,
|
||||
const char *pchPropertyName,
|
||||
STEAM_OUT_STRING_COUNT(punValueBufferSizeOut) char* pchValueBuffer, uint32* punValueBufferSizeOut)
|
||||
= 0;
|
||||
STEAM_OUT_STRING_COUNT( punValueBufferSizeOut ) char *pchValueBuffer, uint32 *punValueBufferSizeOut ) = 0;
|
||||
|
||||
// Returns the server time at which the result was generated. Compare against
|
||||
// the value of IClientUtils::GetServerRealTime() to determine age.
|
||||
STEAM_METHOD_DESC(Returns the server time at which the result was generated.Compare against the value of IClientUtils::GetServerRealTime() to determine age.)
|
||||
virtual uint32 GetResultTimestamp( SteamInventoryResult_t resultHandle ) = 0;
|
||||
|
||||
// Returns true if the result belongs to the target steam ID, false if the
|
||||
// result does not. This is important when using DeserializeResult, to verify
|
||||
// that a remote player is not pretending to have a different user's inventory.
|
||||
STEAM_METHOD_DESC(Returns true if the result belongs to the target steam ID or false if the result does not .This is important when using DeserializeResult to verify that a remote player is not pretending to have a different users inventory.)
|
||||
virtual bool CheckResultSteamID( SteamInventoryResult_t resultHandle, CSteamID steamIDExpected ) = 0;
|
||||
|
||||
// Destroys a result handle and frees all associated memory.
|
||||
STEAM_METHOD_DESC(Destroys a result handle and frees all associated memory.)
|
||||
virtual void DestroyResult( SteamInventoryResult_t resultHandle ) = 0;
|
||||
|
||||
|
||||
// INVENTORY ASYNC QUERY
|
||||
//
|
||||
|
||||
@ -134,9 +134,9 @@ public:
|
||||
// cached results if called too frequently. It is suggested that you call
|
||||
// this function only when you are about to display the user's full inventory,
|
||||
// or if you expect that the inventory may have changed.
|
||||
STEAM_METHOD_DESC(Captures the entire state of the current users Steam inventory.)
|
||||
virtual bool GetAllItems( SteamInventoryResult_t *pResultHandle ) = 0;
|
||||
|
||||
|
||||
// Captures the state of a subset of the current user's Steam inventory,
|
||||
// identified by an array of item instance IDs. The results from this call
|
||||
// can be serialized and passed to other players to "prove" that the current
|
||||
@ -144,9 +144,9 @@ public:
|
||||
// For example, you could call GetItemsByID with the IDs of the user's
|
||||
// currently equipped cosmetic items and serialize this to a buffer, and
|
||||
// then transmit this buffer to other players upon joining a game.
|
||||
STEAM_METHOD_DESC(Captures the state of a subset of the current users Steam inventory identified by an array of item instance IDs.)
|
||||
virtual bool GetItemsByID( SteamInventoryResult_t *pResultHandle, STEAM_ARRAY_COUNT( unCountInstanceIDs ) const SteamItemInstanceID_t *pInstanceIDs, uint32 unCountInstanceIDs ) = 0;
|
||||
|
||||
|
||||
// RESULT SERIALIZATION AND AUTHENTICATION
|
||||
//
|
||||
// Serialized result sets contain a short signature which can't be forged
|
||||
@ -182,6 +182,7 @@ public:
|
||||
// could challenge the player with expired data to send an updated result set.
|
||||
virtual bool DeserializeResult( SteamInventoryResult_t *pOutResultHandle, STEAM_BUFFER_COUNT(punOutBufferSize) const void *pBuffer, uint32 unBufferSize, bool bRESERVED_MUST_BE_FALSE = false ) = 0;
|
||||
|
||||
|
||||
// INVENTORY ASYNC MODIFICATION
|
||||
//
|
||||
|
||||
@ -197,7 +198,6 @@ public:
|
||||
// and grants the items (one time only). On success, the result set will include items which
|
||||
// were granted, if any. If no items were granted because the user isn't eligible for any
|
||||
// promotions, this is still considered a success.
|
||||
STEAM_METHOD_DESC(GrantPromoItems() checks the list of promotional items for which the user may be eligible and grants the items (one time only).)
|
||||
virtual bool GrantPromoItems( SteamInventoryResult_t *pResultHandle ) = 0;
|
||||
|
||||
// AddPromoItem() / AddPromoItems() are restricted versions of GrantPromoItems(). Instead of
|
||||
@ -210,7 +210,6 @@ public:
|
||||
// ConsumeItem() removes items from the inventory, permanently. They cannot be recovered.
|
||||
// Not for the faint of heart - if your game implements item removal at all, a high-friction
|
||||
// UI confirmation process is highly recommended.
|
||||
STEAM_METHOD_DESC(ConsumeItem() removes items from the inventory permanently.)
|
||||
virtual bool ConsumeItem( SteamInventoryResult_t *pResultHandle, SteamItemInstanceID_t itemConsume, uint32 unQuantity ) = 0;
|
||||
|
||||
// ExchangeItems() is an atomic combination of item generation and consumption.
|
||||
@ -223,8 +222,8 @@ public:
|
||||
// exchange will fail.
|
||||
virtual bool ExchangeItems( SteamInventoryResult_t *pResultHandle,
|
||||
STEAM_ARRAY_COUNT(unArrayGenerateLength) const SteamItemDef_t *pArrayGenerate, STEAM_ARRAY_COUNT(unArrayGenerateLength) const uint32 *punArrayGenerateQuantity, uint32 unArrayGenerateLength,
|
||||
STEAM_ARRAY_COUNT(unArrayDestroyLength) const SteamItemInstanceID_t* pArrayDestroy, STEAM_ARRAY_COUNT(unArrayDestroyLength) const uint32* punArrayDestroyQuantity, uint32 unArrayDestroyLength)
|
||||
= 0;
|
||||
STEAM_ARRAY_COUNT(unArrayDestroyLength) const SteamItemInstanceID_t *pArrayDestroy, STEAM_ARRAY_COUNT(unArrayDestroyLength) const uint32 *punArrayDestroyQuantity, uint32 unArrayDestroyLength ) = 0;
|
||||
|
||||
|
||||
// TransferItemQuantity() is intended for use with items which are "stackable" (can have
|
||||
// quantity greater than one). It can be used to split a stack into two, or to transfer
|
||||
@ -232,11 +231,11 @@ public:
|
||||
// two, pass k_SteamItemInstanceIDInvalid for itemIdDest and a new item will be generated.
|
||||
virtual bool TransferItemQuantity( SteamInventoryResult_t *pResultHandle, SteamItemInstanceID_t itemIdSource, uint32 unQuantity, SteamItemInstanceID_t itemIdDest ) = 0;
|
||||
|
||||
|
||||
// TIMED DROPS AND PLAYTIME CREDIT
|
||||
//
|
||||
|
||||
// Deprecated. Calling this method is not required for proper playtime accounting.
|
||||
STEAM_METHOD_DESC(Deprecated method.Playtime accounting is performed on the Steam servers.)
|
||||
virtual void SendItemDropHeartbeat() = 0;
|
||||
|
||||
// Playtime credit must be consumed and turned into item drops by your game. Only item
|
||||
@ -248,14 +247,14 @@ public:
|
||||
// to directly control rarity.
|
||||
// See your Steamworks configuration to set playtime drop rates for individual itemdefs.
|
||||
// The client library will suppress too-frequent calls to this method.
|
||||
STEAM_METHOD_DESC(Playtime credit must be consumed and turned into item drops by your game.)
|
||||
virtual bool TriggerItemDrop( SteamInventoryResult_t *pResultHandle, SteamItemDef_t dropListDefinition ) = 0;
|
||||
|
||||
|
||||
// Deprecated. This method is not supported.
|
||||
virtual bool TradeItems( SteamInventoryResult_t *pResultHandle, CSteamID steamIDTradePartner,
|
||||
STEAM_ARRAY_COUNT(nArrayGiveLength) const SteamItemInstanceID_t *pArrayGive, STEAM_ARRAY_COUNT(nArrayGiveLength) const uint32 *pArrayGiveQuantity, uint32 nArrayGiveLength,
|
||||
STEAM_ARRAY_COUNT(nArrayGetLength) const SteamItemInstanceID_t* pArrayGet, STEAM_ARRAY_COUNT(nArrayGetLength) const uint32* pArrayGetQuantity, uint32 nArrayGetLength)
|
||||
= 0;
|
||||
STEAM_ARRAY_COUNT(nArrayGetLength) const SteamItemInstanceID_t *pArrayGet, STEAM_ARRAY_COUNT(nArrayGetLength) const uint32 *pArrayGetQuantity, uint32 nArrayGetLength ) = 0;
|
||||
|
||||
|
||||
// ITEM DEFINITIONS
|
||||
//
|
||||
@ -271,7 +270,6 @@ public:
|
||||
// Every time new item definitions are available (eg, from the dynamic addition of new
|
||||
// item types while players are still in-game), a SteamInventoryDefinitionUpdate_t
|
||||
// callback will be fired.
|
||||
STEAM_METHOD_DESC(LoadItemDefinitions triggers the automatic load and refresh of item definitions.)
|
||||
virtual bool LoadItemDefinitions() = 0;
|
||||
|
||||
// GetItemDefinitionIDs returns the set of all defined item definition IDs (which are
|
||||
@ -281,8 +279,7 @@ public:
|
||||
// return false if and only if there is not enough space in the output array.
|
||||
virtual bool GetItemDefinitionIDs(
|
||||
STEAM_OUT_ARRAY_COUNT(punItemDefIDsArraySize,List of item definition IDs) SteamItemDef_t *pItemDefIDs,
|
||||
STEAM_DESC(Size of array is passed in and actual size used is returned in this param) uint32* punItemDefIDsArraySize)
|
||||
= 0;
|
||||
STEAM_DESC(Size of array is passed in and actual size used is returned in this param) uint32 *punItemDefIDsArraySize ) = 0;
|
||||
|
||||
// GetItemDefinitionProperty returns a string property from a given item definition.
|
||||
// Note that some properties (for example, "name") may be localized and will depend
|
||||
@ -294,8 +291,7 @@ public:
|
||||
// to pchValueBuffer. If the results do not fit in the given buffer, partial
|
||||
// results may be copied.
|
||||
virtual bool GetItemDefinitionProperty( SteamItemDef_t iDefinition, const char *pchPropertyName,
|
||||
STEAM_OUT_STRING_COUNT(punValueBufferSizeOut) char* pchValueBuffer, uint32* punValueBufferSizeOut)
|
||||
= 0;
|
||||
STEAM_OUT_STRING_COUNT(punValueBufferSizeOut) char *pchValueBuffer, uint32 *punValueBufferSizeOut ) = 0;
|
||||
|
||||
// Request the list of "eligible" promo items that can be manually granted to the given
|
||||
// user. These are promo items of type "manual" that won't be granted automatically.
|
||||
@ -309,8 +305,7 @@ public:
|
||||
virtual bool GetEligiblePromoItemDefinitionIDs(
|
||||
CSteamID steamID,
|
||||
STEAM_OUT_ARRAY_COUNT(punItemDefIDsArraySize,List of item definition IDs) SteamItemDef_t *pItemDefIDs,
|
||||
STEAM_DESC(Size of array is passed in and actual size used is returned in this param) uint32* punItemDefIDsArraySize)
|
||||
= 0;
|
||||
STEAM_DESC(Size of array is passed in and actual size used is returned in this param) uint32 *punItemDefIDsArraySize ) = 0;
|
||||
|
||||
// Starts the purchase process for the given item definitions. The callback SteamInventoryStartPurchaseResult_t
|
||||
// will be posted if Steam was able to initialize the transaction.
|
||||
@ -359,7 +354,6 @@ public:
|
||||
// Submit the update request by handle
|
||||
virtual bool SubmitUpdateProperties( SteamInventoryUpdateHandle_t handle, SteamInventoryResult_t * pResultHandle ) = 0;
|
||||
|
||||
STEAM_METHOD_DESC(Look up the given token and return a pseudo - Inventory item.)
|
||||
virtual bool InspectItem( SteamInventoryResult_t *pResultHandle, const char *pchItemToken ) = 0;
|
||||
};
|
||||
|
||||
@ -376,12 +370,14 @@ STEAM_DEFINE_GAMESERVER_INTERFACE_ACCESSOR(ISteamInventory*, SteamGameServerInve
|
||||
// SteamInventoryResultReady_t callbacks are fired whenever asynchronous
|
||||
// results transition from "Pending" to "OK" or an error state. There will
|
||||
// always be exactly one callback per handle.
|
||||
struct SteamInventoryResultReady_t {
|
||||
struct SteamInventoryResultReady_t
|
||||
{
|
||||
enum { k_iCallback = k_iClientInventoryCallbacks + 0 };
|
||||
SteamInventoryResult_t m_handle;
|
||||
EResult m_result;
|
||||
};
|
||||
|
||||
|
||||
// SteamInventoryFullUpdate_t callbacks are triggered when GetAllItems
|
||||
// successfully returns a result which is newer / fresher than the last
|
||||
// known result. (It will not trigger if the inventory hasn't changed,
|
||||
@ -389,21 +385,25 @@ struct SteamInventoryResultReady_t {
|
||||
// the earlier result is already known to be stale/out-of-date.)
|
||||
// The normal ResultReady callback will still be triggered immediately
|
||||
// afterwards; this is an additional notification for your convenience.
|
||||
struct SteamInventoryFullUpdate_t {
|
||||
struct SteamInventoryFullUpdate_t
|
||||
{
|
||||
enum { k_iCallback = k_iClientInventoryCallbacks + 1 };
|
||||
SteamInventoryResult_t m_handle;
|
||||
};
|
||||
|
||||
|
||||
// A SteamInventoryDefinitionUpdate_t callback is triggered whenever
|
||||
// item definitions have been updated, which could be in response to
|
||||
// LoadItemDefinitions() or any other async request which required
|
||||
// a definition update in order to process results from the server.
|
||||
struct SteamInventoryDefinitionUpdate_t {
|
||||
struct SteamInventoryDefinitionUpdate_t
|
||||
{
|
||||
enum { k_iCallback = k_iClientInventoryCallbacks + 2 };
|
||||
};
|
||||
|
||||
// Returned
|
||||
struct SteamInventoryEligiblePromoItemDefIDs_t {
|
||||
struct SteamInventoryEligiblePromoItemDefIDs_t
|
||||
{
|
||||
enum { k_iCallback = k_iClientInventoryCallbacks + 3 };
|
||||
EResult m_result;
|
||||
CSteamID m_steamID;
|
||||
@ -412,15 +412,18 @@ struct SteamInventoryEligiblePromoItemDefIDs_t {
|
||||
};
|
||||
|
||||
// Triggered from StartPurchase call
|
||||
struct SteamInventoryStartPurchaseResult_t {
|
||||
struct SteamInventoryStartPurchaseResult_t
|
||||
{
|
||||
enum { k_iCallback = k_iClientInventoryCallbacks + 4 };
|
||||
EResult m_result;
|
||||
uint64 m_ulOrderID;
|
||||
uint64 m_ulTransID;
|
||||
};
|
||||
|
||||
|
||||
// Triggered from RequestPrices
|
||||
struct SteamInventoryRequestPricesResult_t {
|
||||
struct SteamInventoryRequestPricesResult_t
|
||||
{
|
||||
enum { k_iCallback = k_iClientInventoryCallbacks + 5 };
|
||||
EResult m_result;
|
||||
char m_rgchCurrency[4];
|
||||
@ -428,4 +431,5 @@ struct SteamInventoryRequestPricesResult_t {
|
||||
|
||||
#pragma pack( pop )
|
||||
|
||||
|
||||
#endif // ISTEAMCONTROLLER_H
|
||||
|
@ -1 +0,0 @@
|
||||
#error "This file isn't used any more"
|
@ -10,12 +10,13 @@
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
#include "isteamfriends.h"
|
||||
#include "matchmakingtypes.h"
|
||||
#include "steam_api_common.h"
|
||||
#include "matchmakingtypes.h"
|
||||
#include "isteamfriends.h"
|
||||
|
||||
// lobby type description
|
||||
enum ELobbyType {
|
||||
enum ELobbyType
|
||||
{
|
||||
k_ELobbyTypePrivate = 0, // only way to join the lobby is to invite to someone else
|
||||
k_ELobbyTypeFriendsOnly = 1, // shows for friends or invitees, but not in lobby list
|
||||
k_ELobbyTypePublic = 2, // visible for friends and in lobby list
|
||||
@ -27,7 +28,8 @@ enum ELobbyType {
|
||||
};
|
||||
|
||||
// lobby search filter tools
|
||||
enum ELobbyComparison {
|
||||
enum ELobbyComparison
|
||||
{
|
||||
k_ELobbyComparisonEqualToOrLessThan = -2,
|
||||
k_ELobbyComparisonLessThan = -1,
|
||||
k_ELobbyComparisonEqual = 0,
|
||||
@ -37,7 +39,8 @@ enum ELobbyComparison {
|
||||
};
|
||||
|
||||
// lobby search distance. Lobby results are sorted from closest to farthest.
|
||||
enum ELobbyDistanceFilter {
|
||||
enum ELobbyDistanceFilter
|
||||
{
|
||||
k_ELobbyDistanceFilterClose, // only lobbies in the same immediate region will be returned
|
||||
k_ELobbyDistanceFilterDefault, // only lobbies in the same region or near by regions
|
||||
k_ELobbyDistanceFilterFar, // for games that don't have many latency requirements, will return lobbies about half-way around the globe
|
||||
@ -51,7 +54,8 @@ enum ELobbyDistanceFilter {
|
||||
// Purpose: Functions for match making services for clients to get to favorites
|
||||
// and to operate on game lobbies.
|
||||
//-----------------------------------------------------------------------------
|
||||
class ISteamMatchmaking {
|
||||
class ISteamMatchmaking
|
||||
{
|
||||
public:
|
||||
// game server favorites storage
|
||||
// saves basic details about a multiplayer game server locally
|
||||
@ -285,7 +289,8 @@ typedef void* HServerListRequest;
|
||||
// to cancel any in-progress queries so you don't get a callback into the destructed
|
||||
// object and crash.
|
||||
//-----------------------------------------------------------------------------
|
||||
class ISteamMatchmakingServerListResponse {
|
||||
class ISteamMatchmakingServerListResponse
|
||||
{
|
||||
public:
|
||||
// Server has responded ok with updated data
|
||||
virtual void ServerResponded( HServerListRequest hRequest, int iServer ) = 0;
|
||||
@ -297,6 +302,7 @@ public:
|
||||
virtual void RefreshComplete( HServerListRequest hRequest, EMatchMakingServerResponse response ) = 0;
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Callback interface for receiving responses after pinging an individual server
|
||||
//
|
||||
@ -307,7 +313,8 @@ public:
|
||||
// which is in progress. Failure to cancel in progress queries when destructing
|
||||
// a callback handler may result in a crash when a callback later occurs.
|
||||
//-----------------------------------------------------------------------------
|
||||
class ISteamMatchmakingPingResponse {
|
||||
class ISteamMatchmakingPingResponse
|
||||
{
|
||||
public:
|
||||
// Server has responded successfully and has updated data
|
||||
virtual void ServerResponded( gameserveritem_t &server ) = 0;
|
||||
@ -316,6 +323,7 @@ public:
|
||||
virtual void ServerFailedToRespond() = 0;
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Callback interface for receiving responses after requesting details on
|
||||
// who is playing on a particular server.
|
||||
@ -327,7 +335,8 @@ public:
|
||||
// which is in progress. Failure to cancel in progress queries when destructing
|
||||
// a callback handler may result in a crash when a callback later occurs.
|
||||
//-----------------------------------------------------------------------------
|
||||
class ISteamMatchmakingPlayersResponse {
|
||||
class ISteamMatchmakingPlayersResponse
|
||||
{
|
||||
public:
|
||||
// Got data on a new player on the server -- you'll get this callback once per player
|
||||
// on the server which you have requested player data on.
|
||||
@ -341,6 +350,7 @@ public:
|
||||
virtual void PlayersRefreshComplete() = 0;
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Callback interface for receiving responses after requesting rules
|
||||
// details on a particular server.
|
||||
@ -352,7 +362,8 @@ public:
|
||||
// which is in progress. Failure to cancel in progress queries when destructing
|
||||
// a callback handler may result in a crash when a callback later occurs.
|
||||
//-----------------------------------------------------------------------------
|
||||
class ISteamMatchmakingRulesResponse {
|
||||
class ISteamMatchmakingRulesResponse
|
||||
{
|
||||
public:
|
||||
// Got data on a rule on the server -- you'll get one of these per rule defined on
|
||||
// the server you are querying
|
||||
@ -366,6 +377,7 @@ public:
|
||||
virtual void RulesRefreshComplete() = 0;
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Typedef for handle type you will receive when querying details on an individual server.
|
||||
//-----------------------------------------------------------------------------
|
||||
@ -375,7 +387,8 @@ const int HSERVERQUERY_INVALID = 0xffffffff;
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Functions for match making services for clients to get to game lists and details
|
||||
//-----------------------------------------------------------------------------
|
||||
class ISteamMatchmakingServers {
|
||||
class ISteamMatchmakingServers
|
||||
{
|
||||
public:
|
||||
// Request a new list of servers of a particular type. These calls each correspond to one of the EMatchMakingType values.
|
||||
// Each call allocates a new asynchronous request object.
|
||||
@ -490,6 +503,7 @@ public:
|
||||
// Refresh a single server inside of a query (rather than all the servers )
|
||||
virtual void RefreshServer( HServerListRequest hRequest, int iServer ) = 0;
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Queries to individual servers directly via IP/Port
|
||||
//-----------------------------------------------------------------------------
|
||||
@ -519,10 +533,12 @@ const uint32 k_unFavoriteFlagNone = 0x00;
|
||||
const uint32 k_unFavoriteFlagFavorite = 0x01; // this game favorite entry is for the favorites list
|
||||
const uint32 k_unFavoriteFlagHistory = 0x02; // this game favorite entry is for the history list
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Used in ChatInfo messages - fields specific to a chat member - must fit in a uint32
|
||||
//-----------------------------------------------------------------------------
|
||||
enum EChatMemberStateChange {
|
||||
enum EChatMemberStateChange
|
||||
{
|
||||
// Specific to joining / leaving the chatroom
|
||||
k_EChatMemberStateChangeEntered = 0x0001, // This user has joined or is joining the chat room
|
||||
k_EChatMemberStateChangeLeft = 0x0002, // This user has left or is leaving the chat room
|
||||
@ -534,11 +550,14 @@ enum EChatMemberStateChange {
|
||||
// returns true of the flags indicate that a user has been removed from the chat
|
||||
#define BChatMemberStateChangeRemoved( rgfChatMemberStateChangeFlags ) ( rgfChatMemberStateChangeFlags & ( k_EChatMemberStateChangeDisconnected | k_EChatMemberStateChangeLeft | k_EChatMemberStateChangeKicked | k_EChatMemberStateChangeBanned ) )
|
||||
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Functions for match making services for clients to get to favorites
|
||||
// and to operate on game lobbies.
|
||||
//-----------------------------------------------------------------------------
|
||||
class ISteamGameSearch {
|
||||
class ISteamGameSearch
|
||||
{
|
||||
public:
|
||||
// =============================================================================================
|
||||
// Game Player APIs
|
||||
@ -598,6 +617,7 @@ public:
|
||||
// ends the game. no further SubmitPlayerResults for ullUniqueGameID will be accepted
|
||||
// any future requests will provide a new ullUniqueGameID
|
||||
virtual EGameSearchErrorCode_t EndGame( uint64 ullUniqueGameID ) = 0;
|
||||
|
||||
};
|
||||
#define STEAMGAMESEARCH_INTERFACE_VERSION "SteamMatchGameSearch001"
|
||||
|
||||
@ -605,17 +625,20 @@ public:
|
||||
inline ISteamGameSearch *SteamGameSearch();
|
||||
STEAM_DEFINE_USER_INTERFACE_ACCESSOR( ISteamGameSearch *, SteamGameSearch, STEAMGAMESEARCH_INTERFACE_VERSION );
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Functions for quickly creating a Party with friends or acquaintances,
|
||||
// EG from chat rooms.
|
||||
//-----------------------------------------------------------------------------
|
||||
enum ESteamPartyBeaconLocationType {
|
||||
enum ESteamPartyBeaconLocationType
|
||||
{
|
||||
k_ESteamPartyBeaconLocationType_Invalid = 0,
|
||||
k_ESteamPartyBeaconLocationType_ChatGroup = 1,
|
||||
|
||||
k_ESteamPartyBeaconLocationType_Max,
|
||||
};
|
||||
|
||||
|
||||
#if defined( VALVE_CALLBACK_PACK_SMALL )
|
||||
#pragma pack( push, 4 )
|
||||
#elif defined( VALVE_CALLBACK_PACK_LARGE )
|
||||
@ -624,12 +647,15 @@ enum ESteamPartyBeaconLocationType {
|
||||
#error steam_api_common.h should define VALVE_CALLBACK_PACK_xxx
|
||||
#endif
|
||||
|
||||
struct SteamPartyBeaconLocation_t {
|
||||
|
||||
struct SteamPartyBeaconLocation_t
|
||||
{
|
||||
ESteamPartyBeaconLocationType m_eType;
|
||||
uint64 m_ulLocationID;
|
||||
};
|
||||
|
||||
enum ESteamPartyBeaconLocationData {
|
||||
enum ESteamPartyBeaconLocationData
|
||||
{
|
||||
k_ESteamPartyBeaconLocationDataInvalid = 0,
|
||||
k_ESteamPartyBeaconLocationDataName = 1,
|
||||
k_ESteamPartyBeaconLocationDataIconURLSmall = 2,
|
||||
@ -637,8 +663,10 @@ enum ESteamPartyBeaconLocationData {
|
||||
k_ESteamPartyBeaconLocationDataIconURLLarge = 4,
|
||||
};
|
||||
|
||||
class ISteamParties {
|
||||
class ISteamParties
|
||||
{
|
||||
public:
|
||||
|
||||
// =============================================================================================
|
||||
// Party Client APIs
|
||||
|
||||
@ -686,6 +714,7 @@ public:
|
||||
|
||||
// Utils
|
||||
virtual bool GetBeaconLocationData( SteamPartyBeaconLocation_t BeaconLocation, ESteamPartyBeaconLocationData eData, STEAM_OUT_STRING_COUNT(cchDataStringOut) char *pchDataStringOut, int cchDataStringOut ) = 0;
|
||||
|
||||
};
|
||||
#define STEAMPARTIES_INTERFACE_VERSION "SteamParties002"
|
||||
|
||||
@ -693,13 +722,15 @@ public:
|
||||
inline ISteamParties *SteamParties();
|
||||
STEAM_DEFINE_USER_INTERFACE_ACCESSOR( ISteamParties *, SteamParties, STEAMPARTIES_INTERFACE_VERSION );
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Callbacks for ISteamMatchmaking (which go through the regular Steam callback registration system)
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: a server was added/removed from the favorites list, you should refresh now
|
||||
//-----------------------------------------------------------------------------
|
||||
struct FavoritesListChanged_t {
|
||||
struct FavoritesListChanged_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamMatchmakingCallbacks + 2 };
|
||||
uint32 m_nIP; // an IP of 0 means reload the whole list, any other value means just one server
|
||||
uint32 m_nQueryPort;
|
||||
@ -710,6 +741,7 @@ struct FavoritesListChanged_t {
|
||||
AccountID_t m_unAccountId;
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Someone has invited you to join a Lobby
|
||||
// normally you don't need to do anything with this, since
|
||||
@ -718,7 +750,8 @@ struct FavoritesListChanged_t {
|
||||
// if the user outside a game chooses to join, your game will be launched with the parameter "+connect_lobby <64-bit lobby id>",
|
||||
// or with the callback GameLobbyJoinRequested_t if they're already in-game
|
||||
//-----------------------------------------------------------------------------
|
||||
struct LobbyInvite_t {
|
||||
struct LobbyInvite_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamMatchmakingCallbacks + 3 };
|
||||
|
||||
uint64 m_ulSteamIDUser; // Steam ID of the person making the invite
|
||||
@ -726,12 +759,14 @@ struct LobbyInvite_t {
|
||||
uint64 m_ulGameID; // GameID of the Lobby
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Sent on entering a lobby, or on failing to enter
|
||||
// m_EChatRoomEnterResponse will be set to k_EChatRoomEnterResponseSuccess on success,
|
||||
// or a higher value on failure (see enum EChatRoomEnterResponse)
|
||||
//-----------------------------------------------------------------------------
|
||||
struct LobbyEnter_t {
|
||||
struct LobbyEnter_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamMatchmakingCallbacks + 4 };
|
||||
|
||||
uint64 m_ulSteamIDLobby; // SteamID of the Lobby you have entered
|
||||
@ -740,12 +775,14 @@ struct LobbyEnter_t {
|
||||
uint32 m_EChatRoomEnterResponse; // EChatRoomEnterResponse
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: The lobby metadata has changed
|
||||
// if m_ulSteamIDMember is the steamID of a lobby member, use GetLobbyMemberData() to access per-user details
|
||||
// if m_ulSteamIDMember == m_ulSteamIDLobby, use GetLobbyData() to access lobby metadata
|
||||
//-----------------------------------------------------------------------------
|
||||
struct LobbyDataUpdate_t {
|
||||
struct LobbyDataUpdate_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamMatchmakingCallbacks + 5 };
|
||||
|
||||
uint64 m_ulSteamIDLobby; // steamID of the Lobby
|
||||
@ -754,11 +791,13 @@ struct LobbyDataUpdate_t {
|
||||
// will only be false if RequestLobbyData() was called on a lobby that no longer exists
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: The lobby chat room state has changed
|
||||
// this is usually sent when a user has joined or left the lobby
|
||||
//-----------------------------------------------------------------------------
|
||||
struct LobbyChatUpdate_t {
|
||||
struct LobbyChatUpdate_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamMatchmakingCallbacks + 6 };
|
||||
|
||||
uint64 m_ulSteamIDLobby; // Lobby ID
|
||||
@ -768,11 +807,13 @@ struct LobbyChatUpdate_t {
|
||||
uint32 m_rgfChatMemberStateChange; // bitfield of EChatMemberStateChange values
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: A chat message for this lobby has been sent
|
||||
// use GetLobbyChatEntry( m_iChatID ) to retrieve the contents of this message
|
||||
//-----------------------------------------------------------------------------
|
||||
struct LobbyChatMsg_t {
|
||||
struct LobbyChatMsg_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamMatchmakingCallbacks + 7 };
|
||||
|
||||
uint64 m_ulSteamIDLobby; // the lobby id this is in
|
||||
@ -781,13 +822,15 @@ struct LobbyChatMsg_t {
|
||||
uint32 m_iChatID; // index of the chat entry to lookup
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: A game created a game for all the members of the lobby to join,
|
||||
// as triggered by a SetLobbyGameServer()
|
||||
// it's up to the individual clients to take action on this; the usual
|
||||
// game behavior is to leave the lobby and connect to the specified game server
|
||||
//-----------------------------------------------------------------------------
|
||||
struct LobbyGameCreated_t {
|
||||
struct LobbyGameCreated_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamMatchmakingCallbacks + 9 };
|
||||
|
||||
uint64 m_ulSteamIDLobby; // the lobby we were in
|
||||
@ -796,33 +839,39 @@ struct LobbyGameCreated_t {
|
||||
uint16 m_usPort;
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Number of matching lobbies found
|
||||
// iterate the returned lobbies with GetLobbyByIndex(), from values 0 to m_nLobbiesMatching-1
|
||||
//-----------------------------------------------------------------------------
|
||||
struct LobbyMatchList_t {
|
||||
struct LobbyMatchList_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamMatchmakingCallbacks + 10 };
|
||||
uint32 m_nLobbiesMatching; // Number of lobbies that matched search criteria and we have SteamIDs for
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: posted if a user is forcefully removed from a lobby
|
||||
// can occur if a user loses connection to Steam
|
||||
//-----------------------------------------------------------------------------
|
||||
struct LobbyKicked_t {
|
||||
struct LobbyKicked_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamMatchmakingCallbacks + 12 };
|
||||
uint64 m_ulSteamIDLobby; // Lobby
|
||||
uint64 m_ulSteamIDAdmin; // User who kicked you - possibly the ID of the lobby itself
|
||||
uint8 m_bKickedDueToDisconnect; // true if you were kicked from the lobby due to the user losing connection to Steam (currently always true)
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Result of our request to create a Lobby
|
||||
// m_eResult == k_EResultOK on success
|
||||
// at this point, the lobby has been joined and is ready for use
|
||||
// a LobbyEnter_t callback will also be received (since the local user is joining their own lobby)
|
||||
//-----------------------------------------------------------------------------
|
||||
struct LobbyCreated_t {
|
||||
struct LobbyCreated_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamMatchmakingCallbacks + 13 };
|
||||
|
||||
EResult m_eResult; // k_EResultOK - the lobby was successfully created
|
||||
@ -838,35 +887,42 @@ struct LobbyCreated_t {
|
||||
// used by now obsolete RequestFriendsLobbiesResponse_t
|
||||
// enum { k_iCallback = k_iSteamMatchmakingCallbacks + 14 };
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Result of CheckForPSNGameBootInvite
|
||||
// m_eResult == k_EResultOK on success
|
||||
// at this point, the local user may not have finishing joining this lobby;
|
||||
// game code should wait until the subsequent LobbyEnter_t callback is received
|
||||
//-----------------------------------------------------------------------------
|
||||
struct PSNGameBootInviteResult_t {
|
||||
struct PSNGameBootInviteResult_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamMatchmakingCallbacks + 15 };
|
||||
|
||||
bool m_bGameBootInviteExists;
|
||||
CSteamID m_steamIDLobby; // Should be valid if m_bGameBootInviteExists == true
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Result of our request to create a Lobby
|
||||
// m_eResult == k_EResultOK on success
|
||||
// at this point, the lobby has been joined and is ready for use
|
||||
// a LobbyEnter_t callback will also be received (since the local user is joining their own lobby)
|
||||
//-----------------------------------------------------------------------------
|
||||
struct FavoritesListAccountsUpdated_t {
|
||||
struct FavoritesListAccountsUpdated_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamMatchmakingCallbacks + 16 };
|
||||
|
||||
EResult m_eResult;
|
||||
};
|
||||
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Callbacks for ISteamGameSearch (which go through the regular Steam callback registration system)
|
||||
|
||||
struct SearchForGameProgressCallback_t {
|
||||
struct SearchForGameProgressCallback_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamGameSearchCallbacks + 1 };
|
||||
|
||||
uint64 m_ullSearchID; // all future callbacks referencing this search will include this Search ID
|
||||
@ -880,7 +936,8 @@ struct SearchForGameProgressCallback_t {
|
||||
};
|
||||
|
||||
// notification to all players searching that a game has been found
|
||||
struct SearchForGameResultCallback_t {
|
||||
struct SearchForGameResultCallback_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamGameSearchCallbacks + 2 };
|
||||
|
||||
uint64 m_ullSearchID;
|
||||
@ -895,12 +952,14 @@ struct SearchForGameResultCallback_t {
|
||||
bool m_bFinalCallback;
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// ISteamGameSearch : Game Host API callbacks
|
||||
|
||||
// callback from RequestPlayersForGame when the matchmaking service has started or ended search
|
||||
// callback will also follow a call from CancelRequestPlayersForGame - m_bSearchInProgress will be false
|
||||
struct RequestPlayersForGameProgressCallback_t {
|
||||
struct RequestPlayersForGameProgressCallback_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamGameSearchCallbacks + 11 };
|
||||
|
||||
EResult m_eResult; // m_ullSearchID will be non-zero if this is k_EResultOK
|
||||
@ -910,7 +969,8 @@ struct RequestPlayersForGameProgressCallback_t {
|
||||
// callback from RequestPlayersForGame
|
||||
// one of these will be sent per player
|
||||
// followed by additional callbacks when players accept or decline the game
|
||||
struct RequestPlayersForGameResultCallback_t {
|
||||
struct RequestPlayersForGameResultCallback_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamGameSearchCallbacks + 12 };
|
||||
|
||||
EResult m_eResult; // m_ullSearchID will be non-zero if this is k_EResultOK
|
||||
@ -918,7 +978,8 @@ struct RequestPlayersForGameResultCallback_t {
|
||||
|
||||
CSteamID m_SteamIDPlayerFound; // player steamID
|
||||
CSteamID m_SteamIDLobby; // if the player is in a lobby, the lobby ID
|
||||
enum PlayerAcceptState_t {
|
||||
enum PlayerAcceptState_t
|
||||
{
|
||||
k_EStateUnknown = 0,
|
||||
k_EStatePlayerAccepted = 1,
|
||||
k_EStatePlayerDeclined = 2,
|
||||
@ -931,7 +992,9 @@ struct RequestPlayersForGameResultCallback_t {
|
||||
uint64 m_ullUniqueGameID;
|
||||
};
|
||||
|
||||
struct RequestPlayersForGameFinalResultCallback_t {
|
||||
|
||||
struct RequestPlayersForGameFinalResultCallback_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamGameSearchCallbacks + 13 };
|
||||
|
||||
EResult m_eResult;
|
||||
@ -939,8 +1002,11 @@ struct RequestPlayersForGameFinalResultCallback_t {
|
||||
uint64 m_ullUniqueGameID;
|
||||
};
|
||||
|
||||
|
||||
|
||||
// this callback confirms that results were received by the matchmaking service for this player
|
||||
struct SubmitPlayerResultResultCallback_t {
|
||||
struct SubmitPlayerResultResultCallback_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamGameSearchCallbacks + 14 };
|
||||
|
||||
EResult m_eResult;
|
||||
@ -948,19 +1014,23 @@ struct SubmitPlayerResultResultCallback_t {
|
||||
CSteamID steamIDPlayer;
|
||||
};
|
||||
|
||||
|
||||
// this callback confirms that the game is recorded as complete on the matchmaking service
|
||||
// the next call to RequestPlayersForGame will generate a new unique game ID
|
||||
struct EndGameResultCallback_t {
|
||||
struct EndGameResultCallback_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamGameSearchCallbacks + 15 };
|
||||
|
||||
EResult m_eResult;
|
||||
uint64 ullUniqueGameID;
|
||||
};
|
||||
|
||||
|
||||
// Steam has responded to the user request to join a party via the given Beacon ID.
|
||||
// If successful, the connect string contains game-specific instructions to connect
|
||||
// to the game with that party.
|
||||
struct JoinPartyCallback_t {
|
||||
struct JoinPartyCallback_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamPartiesCallbacks + 1 };
|
||||
|
||||
EResult m_eResult;
|
||||
@ -970,7 +1040,8 @@ struct JoinPartyCallback_t {
|
||||
};
|
||||
|
||||
// Response to CreateBeacon request. If successful, the beacon ID is provided.
|
||||
struct CreateBeaconCallback_t {
|
||||
struct CreateBeaconCallback_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamPartiesCallbacks + 2 };
|
||||
|
||||
EResult m_eResult;
|
||||
@ -981,7 +1052,8 @@ struct CreateBeaconCallback_t {
|
||||
// and we've reserved one of the open slots for them.
|
||||
// You should confirm when they join your party by calling OnReservationCompleted().
|
||||
// Otherwise, Steam may timeout their reservation eventually.
|
||||
struct ReservationNotificationCallback_t {
|
||||
struct ReservationNotificationCallback_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamPartiesCallbacks + 3 };
|
||||
|
||||
PartyBeaconID_t m_ulBeaconID;
|
||||
@ -989,22 +1061,27 @@ struct ReservationNotificationCallback_t {
|
||||
};
|
||||
|
||||
// Response to ChangeNumOpenSlots call
|
||||
struct ChangeNumOpenSlotsCallback_t {
|
||||
struct ChangeNumOpenSlotsCallback_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamPartiesCallbacks + 4 };
|
||||
|
||||
EResult m_eResult;
|
||||
};
|
||||
|
||||
// The list of possible Party beacon locations has changed
|
||||
struct AvailableBeaconLocationsUpdated_t {
|
||||
struct AvailableBeaconLocationsUpdated_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamPartiesCallbacks + 5 };
|
||||
};
|
||||
|
||||
// The list of active beacons may have changed
|
||||
struct ActiveBeaconsUpdated_t {
|
||||
struct ActiveBeaconsUpdated_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamPartiesCallbacks + 6 };
|
||||
};
|
||||
|
||||
|
||||
#pragma pack( pop )
|
||||
|
||||
|
||||
#endif // ISTEAMMATCHMAKING
|
||||
|
@ -11,17 +11,20 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose:
|
||||
//-----------------------------------------------------------------------------
|
||||
enum AudioPlayback_Status {
|
||||
enum AudioPlayback_Status
|
||||
{
|
||||
AudioPlayback_Undefined = 0,
|
||||
AudioPlayback_Playing = 1,
|
||||
AudioPlayback_Paused = 2,
|
||||
AudioPlayback_Idle = 3
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Functions to control music playback in the steam client
|
||||
//-----------------------------------------------------------------------------
|
||||
class ISteamMusic {
|
||||
class ISteamMusic
|
||||
{
|
||||
public:
|
||||
virtual bool BIsEnabled() = 0;
|
||||
virtual bool BIsPlaying() = 0;
|
||||
@ -36,6 +39,7 @@ public:
|
||||
// volume is between 0.0 and 1.0
|
||||
virtual void SetVolume( float flVolume ) = 0;
|
||||
virtual float GetVolume() = 0;
|
||||
|
||||
};
|
||||
|
||||
#define STEAMMUSIC_INTERFACE_VERSION "STEAMMUSIC_INTERFACE_VERSION001"
|
||||
@ -53,6 +57,7 @@ STEAM_DEFINE_USER_INTERFACE_ACCESSOR(ISteamMusic*, SteamMusic, STEAMMUSIC_INTERF
|
||||
#error steam_api_common.h should define VALVE_CALLBACK_PACK_xxx
|
||||
#endif
|
||||
|
||||
|
||||
STEAM_CALLBACK_BEGIN( PlaybackStatusHasChanged_t, k_iSteamMusicCallbacks + 1 )
|
||||
STEAM_CALLBACK_END(0)
|
||||
|
||||
@ -62,4 +67,5 @@ STEAM_CALLBACK_END(1)
|
||||
|
||||
#pragma pack( pop )
|
||||
|
||||
|
||||
#endif // #define ISTEAMMUSIC_H
|
||||
|
@ -6,13 +6,15 @@
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
#include "isteammusic.h"
|
||||
#include "steam_api_common.h"
|
||||
#include "isteammusic.h"
|
||||
|
||||
#define k_SteamMusicNameMaxLength 255
|
||||
#define k_SteamMusicPNGMaxLength 65535
|
||||
|
||||
class ISteamMusicRemote {
|
||||
|
||||
class ISteamMusicRemote
|
||||
{
|
||||
public:
|
||||
// Service Definition
|
||||
virtual bool RegisterSteamMusicRemote( const char *pchName ) = 0;
|
||||
@ -75,6 +77,7 @@ STEAM_DEFINE_USER_INTERFACE_ACCESSOR(ISteamMusicRemote*, SteamMusicRemote, STEAM
|
||||
#error steam_api_common.h should define VALVE_CALLBACK_PACK_xxx
|
||||
#endif
|
||||
|
||||
|
||||
STEAM_CALLBACK_BEGIN( MusicPlayerRemoteWillActivate_t, k_iSteamMusicRemoteCallbacks + 1)
|
||||
STEAM_CALLBACK_END(0)
|
||||
|
||||
@ -125,4 +128,6 @@ STEAM_CALLBACK_END(1)
|
||||
|
||||
#pragma pack( pop )
|
||||
|
||||
|
||||
|
||||
#endif // #define ISTEAMMUSICREMOTE_H
|
||||
|
@ -14,7 +14,8 @@
|
||||
|
||||
// list of possible errors returned by SendP2PPacket() API
|
||||
// these will be posted in the P2PSessionConnectFail_t callback
|
||||
enum EP2PSessionError {
|
||||
enum EP2PSessionError
|
||||
{
|
||||
k_EP2PSessionErrorNone = 0,
|
||||
k_EP2PSessionErrorNoRightsToApp = 2, // local user doesn't own the app that is running
|
||||
k_EP2PSessionErrorTimeout = 4, // target isn't responding, perhaps not calling AcceptP2PSessionWithUser()
|
||||
@ -31,7 +32,8 @@ enum EP2PSessionError {
|
||||
|
||||
// SendP2PPacket() send types
|
||||
// Typically k_EP2PSendUnreliable is what you want for UDP-like packets, k_EP2PSendReliable for TCP-like packets
|
||||
enum EP2PSend {
|
||||
enum EP2PSend
|
||||
{
|
||||
// Basic UDP send. Packets can't be bigger than 1200 bytes (your typical MTU size). Can be lost, or arrive out of order (rare).
|
||||
// The sending API does have some knowledge of the underlying connection, so if there is no NAT-traversal accomplished or
|
||||
// there is a recognized adjustment happening on the connection, the packet will be batched until the connection is open again.
|
||||
@ -55,6 +57,7 @@ enum EP2PSend {
|
||||
|
||||
};
|
||||
|
||||
|
||||
// connection state to a specified user, returned by GetP2PSessionState()
|
||||
// this is under-the-hood info about what's going on with a SendP2PPacket(), shouldn't be needed except for debuggin
|
||||
#if defined( VALVE_CALLBACK_PACK_SMALL )
|
||||
@ -64,7 +67,8 @@ enum EP2PSend {
|
||||
#else
|
||||
#error steam_api_common.h should define VALVE_CALLBACK_PACK_xxx
|
||||
#endif
|
||||
struct P2PSessionState_t {
|
||||
struct P2PSessionState_t
|
||||
{
|
||||
uint8 m_bConnectionActive; // true if we've got an active open connection
|
||||
uint8 m_bConnecting; // true if we're currently trying to establish a connection
|
||||
uint8 m_eP2PSessionError; // last error recorded (see enum above)
|
||||
@ -76,12 +80,14 @@ struct P2PSessionState_t {
|
||||
};
|
||||
#pragma pack( pop )
|
||||
|
||||
|
||||
// handle to a socket
|
||||
typedef uint32 SNetSocket_t; // CreateP2PConnectionSocket()
|
||||
typedef uint32 SNetListenSocket_t; // CreateListenSocket()
|
||||
|
||||
// connection progress indicators, used by CreateP2PConnectionSocket()
|
||||
enum ESNetSocketState {
|
||||
enum ESNetSocketState
|
||||
{
|
||||
k_ESNetSocketStateInvalid = 0,
|
||||
|
||||
// communication is valid
|
||||
@ -107,12 +113,14 @@ enum ESNetSocketState {
|
||||
};
|
||||
|
||||
// describes how the socket is currently connected
|
||||
enum ESNetSocketConnectionType {
|
||||
enum ESNetSocketConnectionType
|
||||
{
|
||||
k_ESNetSocketConnectionTypeNotConnected = 0,
|
||||
k_ESNetSocketConnectionTypeUDP = 1,
|
||||
k_ESNetSocketConnectionTypeUDPRelay = 2,
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Functions for making connections and sending data between clients,
|
||||
// traversing NAT's where possible
|
||||
@ -121,7 +129,8 @@ enum ESNetSocketConnectionType {
|
||||
/// the Steamworks SDK. Please see ISteamNetworkingSockets and
|
||||
/// ISteamNetworkingMessages
|
||||
//-----------------------------------------------------------------------------
|
||||
class ISteamNetworking {
|
||||
class ISteamNetworking
|
||||
{
|
||||
public:
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
@ -189,6 +198,7 @@ public:
|
||||
// to this function, to prevent revealing the client's IP address top another peer.
|
||||
virtual bool AllowP2PPacketRelay( bool bAllow ) = 0;
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// LISTEN / CONNECT connection-oriented interface functions
|
||||
@ -208,6 +218,7 @@ public:
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
// creates a socket and listens others to connect
|
||||
// will trigger a SocketStatusCallback_t callback on another client connecting
|
||||
// nVirtualP2PPort is the unique ID that the client will connect to, in case you have multiple ports
|
||||
@ -298,23 +309,28 @@ STEAM_DEFINE_GAMESERVER_INTERFACE_ACCESSOR(ISteamNetworking*, SteamGameServerNet
|
||||
|
||||
// callback notification - a user wants to talk to us over the P2P channel via the SendP2PPacket() API
|
||||
// in response, a call to AcceptP2PPacketsFromUser() needs to be made, if you want to talk with them
|
||||
struct P2PSessionRequest_t {
|
||||
struct P2PSessionRequest_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamNetworkingCallbacks + 2 };
|
||||
CSteamID m_steamIDRemote; // user who wants to talk to us
|
||||
};
|
||||
|
||||
|
||||
// callback notification - packets can't get through to the specified user via the SendP2PPacket() API
|
||||
// all packets queued packets unsent at this point will be dropped
|
||||
// further attempts to send will retry making the connection (but will be dropped if we fail again)
|
||||
struct P2PSessionConnectFail_t {
|
||||
struct P2PSessionConnectFail_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamNetworkingCallbacks + 3 };
|
||||
CSteamID m_steamIDRemote; // user we were sending packets to
|
||||
uint8 m_eP2PSessionError; // EP2PSessionError indicating why we're having trouble
|
||||
};
|
||||
|
||||
|
||||
// callback notification - status of a socket has changed
|
||||
// used as part of the CreateListenSocket() / CreateP2PConnectionSocket()
|
||||
struct SocketStatusCallback_t {
|
||||
struct SocketStatusCallback_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamNetworkingCallbacks + 1 };
|
||||
SNetSocket_t m_hSocket; // the socket used to send/receive data to the remote host
|
||||
SNetListenSocket_t m_hListenSocket; // this is the server socket that we were listening on; NULL if this was an outgoing connection
|
||||
|
@ -4,8 +4,8 @@
|
||||
#define ISTEAMNETWORKINGMESSAGES
|
||||
#pragma once
|
||||
|
||||
#include "steam_api_common.h"
|
||||
#include "steamnetworkingtypes.h"
|
||||
#include "steam_api_common.h"
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
/// The non-connection-oriented interface to send and receive messages
|
||||
@ -33,7 +33,8 @@
|
||||
/// you may find the symmetric connection mode of ISteamNetworkingSockets useful.
|
||||
/// (See k_ESteamNetworkingConfig_SymmetricConnect.)
|
||||
///
|
||||
class ISteamNetworkingMessages {
|
||||
class ISteamNetworkingMessages
|
||||
{
|
||||
public:
|
||||
/// Sends a message to the specified host. If we don't already have a session with that user,
|
||||
/// a session is implicitly created. There might be some handshaking that needs to happen
|
||||
@ -130,7 +131,8 @@ public:
|
||||
#pragma pack( push, 1 )
|
||||
|
||||
/// Posted when a remote host is sending us a message, and we do not already have a session with them
|
||||
struct SteamNetworkingMessagesSessionRequest_t {
|
||||
struct SteamNetworkingMessagesSessionRequest_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamNetworkingMessagesCallbacks + 1 };
|
||||
SteamNetworkingIdentity m_identityRemote; // user who wants to talk to us
|
||||
};
|
||||
@ -146,7 +148,8 @@ struct SteamNetworkingMessagesSessionRequest_t {
|
||||
/// Also, if a session times out due to inactivity, no callbacks will be posted. The only
|
||||
/// way to detect that this is happening is that querying the session state may return
|
||||
/// none, connecting, and findingroute again.
|
||||
struct SteamNetworkingMessagesSessionFailed_t {
|
||||
struct SteamNetworkingMessagesSessionFailed_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamNetworkingMessagesCallbacks + 2 };
|
||||
|
||||
/// Detailed info about the session that failed.
|
||||
@ -173,15 +176,9 @@ inline ISteamNetworkingMessages* SteamGameServerNetworkingMessages_Lib() { retur
|
||||
#endif
|
||||
|
||||
#ifndef STEAMNETWORKINGSOCKETS_STEAMAPI
|
||||
inline ISteamNetworkingMessages* SteamNetworkingMessages()
|
||||
{
|
||||
return SteamNetworkingMessages_LibV2();
|
||||
}
|
||||
inline ISteamNetworkingMessages *SteamNetworkingMessages() { return SteamNetworkingMessages_LibV2(); }
|
||||
#ifdef STEAMNETWORKINGSOCKETS_STEAM
|
||||
inline ISteamNetworkingMessages* SteamGameServerNetworkingMessages()
|
||||
{
|
||||
return SteamGameServerNetworkingMessages_LibV2();
|
||||
}
|
||||
inline ISteamNetworkingMessages *SteamGameServerNetworkingMessages() { return SteamGameServerNetworkingMessages_LibV2(); }
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
@ -194,10 +191,7 @@ STEAM_DEFINE_USER_INTERFACE_ACCESSOR(ISteamNetworkingMessages*, SteamNetworkingM
|
||||
STEAM_DEFINE_GAMESERVER_INTERFACE_ACCESSOR( ISteamNetworkingMessages *, SteamGameServerNetworkingMessages_SteamAPI, STEAMNETWORKINGMESSAGES_INTERFACE_VERSION );
|
||||
|
||||
#ifndef STEAMNETWORKINGSOCKETS_STANDALONELIB
|
||||
inline ISteamNetworkingMessages* SteamNetworkingMessages()
|
||||
{
|
||||
return SteamNetworkingMessages_SteamAPI();
|
||||
}
|
||||
inline ISteamNetworkingMessages *SteamNetworkingMessages() { return SteamNetworkingMessages_SteamAPI(); }
|
||||
inline ISteamNetworkingMessages *SteamGameServerNetworkingMessages() { return SteamGameServerNetworkingMessages_SteamAPI(); }
|
||||
#endif
|
||||
#endif
|
||||
|
@ -4,8 +4,8 @@
|
||||
#define ISTEAMNETWORKINGSOCKETS
|
||||
#pragma once
|
||||
|
||||
#include "steam_api_common.h"
|
||||
#include "steamnetworkingtypes.h"
|
||||
#include "steam_api_common.h"
|
||||
|
||||
struct SteamNetAuthenticationStatus_t;
|
||||
class ISteamNetworkingConnectionSignaling;
|
||||
@ -15,10 +15,13 @@ class ISteamNetworkingSignalingRecvContext;
|
||||
/// Lower level networking API.
|
||||
///
|
||||
/// - Connection-oriented API (like TCP, not UDP). When sending and receiving
|
||||
/// messages, a connection handle is used. (For a UDP-style interface, see
|
||||
/// ISteamNetworkingMessages.) In this TCP-style interface, the "server" will
|
||||
/// "listen" on a "listen socket." A "client" will "connect" to the server,
|
||||
/// and the server will "accept" the connection.
|
||||
/// messages, a connection handle is used. (For a UDP-style interface, where
|
||||
/// the peer is identified by their address with each send/recv call, see
|
||||
/// ISteamNetworkingMessages.) The typical pattern is for a "server" to "listen"
|
||||
/// on a "listen socket." A "client" will "connect" to the server, and the
|
||||
/// server will "accept" the connection. If you have a symmetric situation
|
||||
/// where either peer may initiate the connection and server/client roles are
|
||||
/// not clearly defined, check out k_ESteamNetworkingConfig_SymmetricConnect.
|
||||
/// - But unlike TCP, it's message-oriented, not stream-oriented.
|
||||
/// - Mix of reliable and unreliable messages
|
||||
/// - Fragmentation and reassembly
|
||||
@ -34,8 +37,10 @@ class ISteamNetworkingSignalingRecvContext;
|
||||
///
|
||||
/// See also: ISteamNetworkingMessages, the UDP-style interface. This API might be
|
||||
/// easier to use, especially when porting existing UDP code.
|
||||
class ISteamNetworkingSockets {
|
||||
class ISteamNetworkingSockets
|
||||
{
|
||||
public:
|
||||
|
||||
/// Creates a "server" socket that listens for clients to connect to by
|
||||
/// calling ConnectByIPAddress, over ordinary UDP (IPv4 or IPv6)
|
||||
///
|
||||
@ -190,7 +195,23 @@ public:
|
||||
/// Set connection user data. the data is returned in the following places
|
||||
/// - You can query it using GetConnectionUserData.
|
||||
/// - The SteamNetworkingmessage_t structure.
|
||||
/// - The SteamNetConnectionInfo_t structure. (Which is a member of SteamNetConnectionStatusChangedCallback_t.)
|
||||
/// - The SteamNetConnectionInfo_t structure.
|
||||
/// (Which is a member of SteamNetConnectionStatusChangedCallback_t -- but see WARNINGS below!!!!)
|
||||
///
|
||||
/// Do you need to set this atomically when the connection is created?
|
||||
/// See k_ESteamNetworkingConfig_ConnectionUserData.
|
||||
///
|
||||
/// WARNING: Be *very careful* when using the value provided in callbacks structs.
|
||||
/// Callbacks are queued, and the value that you will receive in your
|
||||
/// callback is the userdata that was effective at the time the callback
|
||||
/// was queued. There are subtle race conditions that can happen if you
|
||||
/// don't understand this!
|
||||
///
|
||||
/// If any incoming messages for this connection are queued, the userdata
|
||||
/// field is updated, so that when when you receive messages (e.g. with
|
||||
/// ReceiveMessagesOnConnection), they will always have the very latest
|
||||
/// userdata. So the tricky race conditions that can happen with callbacks
|
||||
/// do not apply to retrieving messages.
|
||||
///
|
||||
/// Returns false if the handle is invalid.
|
||||
virtual bool SetConnectionUserData( HSteamNetConnection hPeer, int64 nUserData ) = 0;
|
||||
@ -256,7 +277,7 @@ public:
|
||||
/// m_pData at your buffer and set the callback to the appropriate function
|
||||
/// to free it. Note that if you use your own buffer, it MUST remain valid
|
||||
/// until the callback is executed. And also note that your callback can be
|
||||
/// invoked at ant time from any thread (perhaps even before SendMessages
|
||||
/// invoked at any time from any thread (perhaps even before SendMessages
|
||||
/// returns!), so it MUST be fast and threadsafe.
|
||||
///
|
||||
/// You MUST also fill in:
|
||||
@ -578,6 +599,7 @@ public:
|
||||
/// and don't share it directly with clients.
|
||||
virtual EResult GetGameCoordinatorServerLogin( SteamDatagramGameCoordinatorServerLogin *pLoginInfo, int *pcbSignedBlob, void *pBlob ) = 0;
|
||||
|
||||
|
||||
//
|
||||
// Relayed connections using custom signaling protocol
|
||||
//
|
||||
@ -659,7 +681,7 @@ public:
|
||||
/// Get blob that describes a certificate request. You can send this to your game coordinator.
|
||||
/// Upon entry, *pcbBlob should contain the size of the buffer. On successful exit, it will
|
||||
/// return the number of bytes that were populated. You can pass pBlob=NULL to query for the required
|
||||
/// size. (256 bytes is a very conservative estimate.)
|
||||
/// size. (512 bytes is a conservative estimate.)
|
||||
///
|
||||
/// Pass this blob to your game coordinator and call SteamDatagram_CreateCert.
|
||||
virtual bool GetCertificateRequest( int *pcbBlob, void *pBlob, SteamNetworkingErrMsg &errMsg ) = 0;
|
||||
@ -674,7 +696,6 @@ public:
|
||||
/// You don't need to call this if you are using Steam's callback dispatch
|
||||
/// mechanism (SteamAPI_RunCallbacks and SteamGameserver_RunCallbacks).
|
||||
virtual void RunCallbacks() = 0;
|
||||
|
||||
protected:
|
||||
~ISteamNetworkingSockets(); // Silence some warnings
|
||||
};
|
||||
@ -696,15 +717,9 @@ inline ISteamNetworkingSockets* SteamGameServerNetworkingSockets_Lib() { return
|
||||
#endif
|
||||
|
||||
#ifndef STEAMNETWORKINGSOCKETS_STEAMAPI
|
||||
inline ISteamNetworkingSockets* SteamNetworkingSockets()
|
||||
{
|
||||
return SteamNetworkingSockets_LibV9();
|
||||
}
|
||||
inline ISteamNetworkingSockets *SteamNetworkingSockets() { return SteamNetworkingSockets_LibV9(); }
|
||||
#ifdef STEAMNETWORKINGSOCKETS_STEAM
|
||||
inline ISteamNetworkingSockets* SteamGameServerNetworkingSockets()
|
||||
{
|
||||
return SteamGameServerNetworkingSockets_LibV9();
|
||||
}
|
||||
inline ISteamNetworkingSockets *SteamGameServerNetworkingSockets() { return SteamGameServerNetworkingSockets_LibV9(); }
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
@ -717,10 +732,7 @@ STEAM_DEFINE_USER_INTERFACE_ACCESSOR(ISteamNetworkingSockets*, SteamNetworkingSo
|
||||
STEAM_DEFINE_GAMESERVER_INTERFACE_ACCESSOR( ISteamNetworkingSockets *, SteamGameServerNetworkingSockets_SteamAPI, STEAMNETWORKINGSOCKETS_INTERFACE_VERSION );
|
||||
|
||||
#ifndef STEAMNETWORKINGSOCKETS_STANDALONELIB
|
||||
inline ISteamNetworkingSockets* SteamNetworkingSockets()
|
||||
{
|
||||
return SteamNetworkingSockets_SteamAPI();
|
||||
}
|
||||
inline ISteamNetworkingSockets *SteamNetworkingSockets() { return SteamNetworkingSockets_SteamAPI(); }
|
||||
inline ISteamNetworkingSockets *SteamGameServerNetworkingSockets() { return SteamGameServerNetworkingSockets_SteamAPI(); }
|
||||
#endif
|
||||
#endif
|
||||
@ -769,7 +781,8 @@ inline ISteamNetworkingSockets* SteamGameServerNetworkingSockets() { return Stea
|
||||
/// state by the time you process this callback.
|
||||
///
|
||||
/// Also note that callbacks will be posted when connections are created and destroyed by your own API calls.
|
||||
struct SteamNetConnectionStatusChangedCallback_t {
|
||||
struct SteamNetConnectionStatusChangedCallback_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamNetworkingSocketsCallbacks + 1 };
|
||||
|
||||
/// Connection handle
|
||||
@ -790,7 +803,8 @@ struct SteamNetConnectionStatusChangedCallback_t {
|
||||
/// - A valid certificate issued by a CA.
|
||||
///
|
||||
/// This callback is posted whenever the state of our readiness changes.
|
||||
struct SteamNetAuthenticationStatus_t {
|
||||
struct SteamNetAuthenticationStatus_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamNetworkingSocketsCallbacks + 2 };
|
||||
|
||||
/// Status
|
||||
|
@ -8,8 +8,8 @@
|
||||
#define ISTEAMNETWORKINGUTILS
|
||||
#pragma once
|
||||
|
||||
#include "steam_api_common.h"
|
||||
#include "steamnetworkingtypes.h"
|
||||
#include "steam_api_common.h"
|
||||
|
||||
struct SteamDatagramRelayAuthTicket;
|
||||
struct SteamRelayNetworkStatus_t;
|
||||
@ -17,7 +17,8 @@ struct SteamRelayNetworkStatus_t;
|
||||
//-----------------------------------------------------------------------------
|
||||
/// Misc networking utilities for checking the local networking environment
|
||||
/// and estimating pings.
|
||||
class ISteamNetworkingUtils {
|
||||
class ISteamNetworkingUtils
|
||||
{
|
||||
public:
|
||||
//
|
||||
// Efficient message sending
|
||||
@ -129,7 +130,7 @@ public:
|
||||
/// 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.
|
||||
/// You are looking for the "game coordinator" 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.
|
||||
@ -276,8 +277,7 @@ public:
|
||||
/// 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;
|
||||
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
|
||||
@ -293,8 +293,7 @@ public:
|
||||
/// - 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;
|
||||
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.
|
||||
@ -330,10 +329,7 @@ STEAMNETWORKINGSOCKETS_INTERFACE ISteamNetworkingUtils* SteamNetworkingUtils_Lib
|
||||
inline ISteamNetworkingUtils *SteamNetworkingUtils_Lib() { return SteamNetworkingUtils_LibV3(); }
|
||||
|
||||
#ifndef STEAMNETWORKINGSOCKETS_STEAMAPI
|
||||
inline ISteamNetworkingUtils* SteamNetworkingUtils()
|
||||
{
|
||||
return SteamNetworkingUtils_LibV3();
|
||||
}
|
||||
inline ISteamNetworkingUtils *SteamNetworkingUtils() { return SteamNetworkingUtils_LibV3(); }
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@ -342,22 +338,23 @@ inline ISteamNetworkingUtils* SteamNetworkingUtils()
|
||||
STEAM_DEFINE_INTERFACE_ACCESSOR( ISteamNetworkingUtils *, SteamNetworkingUtils_SteamAPI,
|
||||
/* Prefer user version of the interface. But if it isn't found, then use
|
||||
gameserver one. Yes, this is a completely terrible hack */
|
||||
SteamInternal_FindOrCreateUserInterface(0, STEAMNETWORKINGUTILS_INTERFACE_VERSION) ? SteamInternal_FindOrCreateUserInterface(0, STEAMNETWORKINGUTILS_INTERFACE_VERSION) : SteamInternal_FindOrCreateGameServerInterface(0, STEAMNETWORKINGUTILS_INTERFACE_VERSION),
|
||||
SteamInternal_FindOrCreateUserInterface( 0, STEAMNETWORKINGUTILS_INTERFACE_VERSION ) ?
|
||||
SteamInternal_FindOrCreateUserInterface( 0, STEAMNETWORKINGUTILS_INTERFACE_VERSION ) :
|
||||
SteamInternal_FindOrCreateGameServerInterface( 0, STEAMNETWORKINGUTILS_INTERFACE_VERSION ),
|
||||
"global",
|
||||
STEAMNETWORKINGUTILS_INTERFACE_VERSION)
|
||||
STEAMNETWORKINGUTILS_INTERFACE_VERSION
|
||||
)
|
||||
|
||||
#ifndef STEAMNETWORKINGSOCKETS_STANDALONELIB
|
||||
inline ISteamNetworkingUtils* SteamNetworkingUtils()
|
||||
{
|
||||
return SteamNetworkingUtils_SteamAPI();
|
||||
}
|
||||
inline ISteamNetworkingUtils *SteamNetworkingUtils() { return SteamNetworkingUtils_SteamAPI(); }
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/// A struct used to describe our readiness to use the relay network.
|
||||
/// To do this we first need to fetch the network configuration,
|
||||
/// which describes what POPs are available.
|
||||
struct SteamRelayNetworkStatus_t {
|
||||
struct SteamRelayNetworkStatus_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamNetworkingUtilsCallbacks + 1 };
|
||||
|
||||
/// Summary status. When this is "current", initialization has
|
||||
@ -390,19 +387,19 @@ struct SteamRelayNetworkStatus_t {
|
||||
|
||||
/// Utility class for printing a SteamNetworkingIdentity.
|
||||
/// E.g. printf( "Identity is '%s'\n", SteamNetworkingIdentityRender( identity ).c_str() );
|
||||
struct SteamNetworkingIdentityRender {
|
||||
struct SteamNetworkingIdentityRender
|
||||
{
|
||||
SteamNetworkingIdentityRender( const SteamNetworkingIdentity &x ) { x.ToString( buf, sizeof(buf) ); }
|
||||
inline const char *c_str() const { return buf; }
|
||||
|
||||
private:
|
||||
char buf[ SteamNetworkingIdentity::k_cchMaxString ];
|
||||
};
|
||||
|
||||
/// Utility class for printing a SteamNetworkingIPAddrRender.
|
||||
struct SteamNetworkingIPAddrRender {
|
||||
struct SteamNetworkingIPAddrRender
|
||||
{
|
||||
SteamNetworkingIPAddrRender( const SteamNetworkingIPAddr &x, bool bWithPort = true ) { x.ToString( buf, sizeof(buf), bWithPort ); }
|
||||
inline const char *c_str() const { return buf; }
|
||||
|
||||
private:
|
||||
char buf[ SteamNetworkingIPAddr::k_cchMaxString ];
|
||||
};
|
||||
|
@ -13,7 +13,8 @@
|
||||
#include "steam_api_common.h"
|
||||
|
||||
// Feature types for parental settings
|
||||
enum EParentalFeature {
|
||||
enum EParentalFeature
|
||||
{
|
||||
k_EFeatureInvalid = 0,
|
||||
k_EFeatureStore = 1,
|
||||
k_EFeatureCommunity = 2,
|
||||
@ -31,7 +32,8 @@ enum EParentalFeature {
|
||||
k_EFeatureMax
|
||||
};
|
||||
|
||||
class ISteamParentalSettings {
|
||||
class ISteamParentalSettings
|
||||
{
|
||||
public:
|
||||
virtual bool BIsParentalLockEnabled() = 0;
|
||||
virtual bool BIsParentalLockLocked() = 0;
|
||||
@ -52,8 +54,10 @@ STEAM_DEFINE_USER_INTERFACE_ACCESSOR(ISteamParentalSettings*, SteamParentalSetti
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Callback for querying UGC
|
||||
//-----------------------------------------------------------------------------
|
||||
struct SteamParentalSettingsChanged_t {
|
||||
struct SteamParentalSettingsChanged_t
|
||||
{
|
||||
enum { k_iCallback = k_ISteamParentalSettingsCallbacks + 1 };
|
||||
};
|
||||
|
||||
|
||||
#endif // ISTEAMPARENTALSETTINGS_H
|
||||
|
@ -16,7 +16,8 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Enum for supported gradient directions
|
||||
//-----------------------------------------------------------------------------
|
||||
enum EOverlayGradientDirection {
|
||||
enum EOverlayGradientDirection
|
||||
{
|
||||
k_EOverlayGradientHorizontal = 1,
|
||||
k_EOverlayGradientVertical = 2,
|
||||
k_EOverlayGradientNone = 3,
|
||||
@ -35,11 +36,14 @@ enum EOverlayGradientDirection {
|
||||
#define STEAM_COLOR_ALPHA( color ) \
|
||||
(int)(((color)>>24)&0xff)
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Interface the game must expose to Steam for rendering
|
||||
//-----------------------------------------------------------------------------
|
||||
class ISteamPS3OverlayRenderHost {
|
||||
class ISteamPS3OverlayRenderHost
|
||||
{
|
||||
public:
|
||||
|
||||
// Interface for game engine to implement which Steam requires to render.
|
||||
|
||||
// Draw a textured rect. This may use only part of the texture and will pass texture coords, it will also possibly request a gradient and will specify colors for vertexes.
|
||||
@ -55,11 +59,14 @@ public:
|
||||
virtual void DeleteAllTextures() = 0;
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Interface Steam exposes for the game to tell it when to render, etc.
|
||||
//-----------------------------------------------------------------------------
|
||||
class ISteamPS3OverlayRender {
|
||||
class ISteamPS3OverlayRender
|
||||
{
|
||||
public:
|
||||
|
||||
// Call once at startup to initialize the Steam overlay and pass it your host interface ptr
|
||||
virtual bool BHostInitialize( uint32 unScreenWidth, uint32 unScreenHeight, uint32 unRefreshRate, ISteamPS3OverlayRenderHost *pRenderHost, void *CellFontLib ) = 0;
|
||||
|
||||
@ -80,4 +87,5 @@ public:
|
||||
virtual bool BResetInputState() = 0;
|
||||
};
|
||||
|
||||
|
||||
#endif // ISTEAMPS3OVERLAYRENDERER_H
|
@ -8,10 +8,12 @@
|
||||
|
||||
#include "steam_api_common.h"
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: The form factor of a device
|
||||
//-----------------------------------------------------------------------------
|
||||
enum ESteamDeviceFormFactor {
|
||||
enum ESteamDeviceFormFactor
|
||||
{
|
||||
k_ESteamDeviceFormFactorUnknown = 0,
|
||||
k_ESteamDeviceFormFactorPhone = 1,
|
||||
k_ESteamDeviceFormFactorTablet = 2,
|
||||
@ -22,10 +24,12 @@ enum ESteamDeviceFormFactor {
|
||||
// Steam Remote Play session ID
|
||||
typedef uint32 RemotePlaySessionID_t;
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Functions to provide information about Steam Remote Play sessions
|
||||
//-----------------------------------------------------------------------------
|
||||
class ISteamRemotePlay {
|
||||
class ISteamRemotePlay
|
||||
{
|
||||
public:
|
||||
// Get the number of currently connected Steam Remote Play sessions
|
||||
virtual uint32 GetSessionCount() = 0;
|
||||
@ -67,14 +71,18 @@ STEAM_DEFINE_USER_INTERFACE_ACCESSOR(ISteamRemotePlay*, SteamRemotePlay, STEAMRE
|
||||
#error steam_api_common.h should define VALVE_CALLBACK_PACK_xxx
|
||||
#endif
|
||||
|
||||
|
||||
STEAM_CALLBACK_BEGIN( SteamRemotePlaySessionConnected_t, k_iSteamRemotePlayCallbacks + 1 )
|
||||
STEAM_CALLBACK_MEMBER( 0, RemotePlaySessionID_t, m_unSessionID )
|
||||
STEAM_CALLBACK_END( 0 )
|
||||
|
||||
|
||||
STEAM_CALLBACK_BEGIN( SteamRemotePlaySessionDisconnected_t, k_iSteamRemotePlayCallbacks + 2 )
|
||||
STEAM_CALLBACK_MEMBER( 0, RemotePlaySessionID_t, m_unSessionID )
|
||||
STEAM_CALLBACK_END( 0 )
|
||||
|
||||
|
||||
#pragma pack( pop )
|
||||
|
||||
|
||||
#endif // #define ISTEAMREMOTEPLAY_H
|
||||
|
@ -12,12 +12,14 @@
|
||||
|
||||
#include "steam_api_common.h"
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Defines the largest allowed file size. Cloud files cannot be written
|
||||
// in a single chunk over 100MB (and cannot be over 200MB total.)
|
||||
//-----------------------------------------------------------------------------
|
||||
const uint32 k_unMaxCloudFileChunkSize = 100 * 1024 * 1024;
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Structure that contains an array of const char * strings and the number of those strings
|
||||
//-----------------------------------------------------------------------------
|
||||
@ -28,7 +30,8 @@ const uint32 k_unMaxCloudFileChunkSize = 100 * 1024 * 1024;
|
||||
#else
|
||||
#error steam_api_common.h should define VALVE_CALLBACK_PACK_xxx
|
||||
#endif
|
||||
struct SteamParamStringArray_t {
|
||||
struct SteamParamStringArray_t
|
||||
{
|
||||
const char ** m_ppStrings;
|
||||
int32 m_nNumStrings;
|
||||
};
|
||||
@ -54,7 +57,9 @@ const uint32 k_cchTagListMax = 1024 + 1;
|
||||
const uint32 k_cchFilenameMax = 260;
|
||||
const uint32 k_cchPublishedFileURLMax = 256;
|
||||
|
||||
enum ERemoteStoragePlatform {
|
||||
|
||||
enum ERemoteStoragePlatform
|
||||
{
|
||||
k_ERemoteStoragePlatformNone = 0,
|
||||
k_ERemoteStoragePlatformWindows = (1 << 0),
|
||||
k_ERemoteStoragePlatformOSX = (1 << 1),
|
||||
@ -68,14 +73,17 @@ enum ERemoteStoragePlatform {
|
||||
k_ERemoteStoragePlatformAll = 0xffffffff
|
||||
};
|
||||
|
||||
enum ERemoteStoragePublishedFileVisibility {
|
||||
enum ERemoteStoragePublishedFileVisibility
|
||||
{
|
||||
k_ERemoteStoragePublishedFileVisibilityPublic = 0,
|
||||
k_ERemoteStoragePublishedFileVisibilityFriendsOnly = 1,
|
||||
k_ERemoteStoragePublishedFileVisibilityPrivate = 2,
|
||||
k_ERemoteStoragePublishedFileVisibilityUnlisted = 3,
|
||||
};
|
||||
|
||||
enum EWorkshopFileType {
|
||||
|
||||
enum EWorkshopFileType
|
||||
{
|
||||
k_EWorkshopFileTypeFirst = 0,
|
||||
|
||||
k_EWorkshopFileTypeCommunity = 0, // normal Workshop item that can be subscribed to
|
||||
@ -100,19 +108,22 @@ enum EWorkshopFileType {
|
||||
|
||||
};
|
||||
|
||||
enum EWorkshopVote {
|
||||
enum EWorkshopVote
|
||||
{
|
||||
k_EWorkshopVoteUnvoted = 0,
|
||||
k_EWorkshopVoteFor = 1,
|
||||
k_EWorkshopVoteAgainst = 2,
|
||||
k_EWorkshopVoteLater = 3,
|
||||
};
|
||||
|
||||
enum EWorkshopFileAction {
|
||||
enum EWorkshopFileAction
|
||||
{
|
||||
k_EWorkshopFileActionPlayed = 0,
|
||||
k_EWorkshopFileActionCompleted = 1,
|
||||
};
|
||||
|
||||
enum EWorkshopEnumerationType {
|
||||
enum EWorkshopEnumerationType
|
||||
{
|
||||
k_EWorkshopEnumerationTypeRankedByVote = 0,
|
||||
k_EWorkshopEnumerationTypeRecent = 1,
|
||||
k_EWorkshopEnumerationTypeTrending = 2,
|
||||
@ -122,12 +133,15 @@ enum EWorkshopEnumerationType {
|
||||
k_EWorkshopEnumerationTypeRecentFromFollowedUsers = 6,
|
||||
};
|
||||
|
||||
enum EWorkshopVideoProvider {
|
||||
enum EWorkshopVideoProvider
|
||||
{
|
||||
k_EWorkshopVideoProviderNone = 0,
|
||||
k_EWorkshopVideoProviderYoutube = 1
|
||||
};
|
||||
|
||||
enum EUGCReadAction {
|
||||
|
||||
enum EUGCReadAction
|
||||
{
|
||||
// Keeps the file handle open unless the last byte is read. You can use this when reading large files (over 100MB) in sequential chunks.
|
||||
// If the last byte is read, this will behave the same as k_EUGCRead_Close. Otherwise, it behaves the same as k_EUGCRead_ContinueReading.
|
||||
// This value maintains the same behavior as before the EUGCReadAction parameter was introduced.
|
||||
@ -142,11 +156,35 @@ enum EUGCReadAction {
|
||||
k_EUGCRead_Close = 2,
|
||||
};
|
||||
|
||||
enum ERemoteStorageLocalFileChange
|
||||
{
|
||||
k_ERemoteStorageLocalFileChange_Invalid = 0,
|
||||
|
||||
// The file was updated from another device
|
||||
k_ERemoteStorageLocalFileChange_FileUpdated = 1,
|
||||
|
||||
// The file was deleted by another device
|
||||
k_ERemoteStorageLocalFileChange_FileDeleted = 2,
|
||||
};
|
||||
|
||||
enum ERemoteStorageFilePathType
|
||||
{
|
||||
k_ERemoteStorageFilePathType_Invalid = 0,
|
||||
|
||||
// The file is directly accessed by the game and this is the full path
|
||||
k_ERemoteStorageFilePathType_Absolute = 1,
|
||||
|
||||
// The file is accessed via the ISteamRemoteStorage API and this is the filename
|
||||
k_ERemoteStorageFilePathType_APIFilename = 2,
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Functions for accessing, reading and writing files stored remotely
|
||||
// and cached locally
|
||||
//-----------------------------------------------------------------------------
|
||||
class ISteamRemoteStorage {
|
||||
class ISteamRemoteStorage
|
||||
{
|
||||
public:
|
||||
// NOTE
|
||||
//
|
||||
@ -222,24 +260,6 @@ public:
|
||||
virtual int32 GetCachedUGCCount() = 0;
|
||||
virtual UGCHandle_t GetCachedUGCHandle( int32 iCachedContent ) = 0;
|
||||
|
||||
// The following functions are only necessary on the Playstation 3. On PC & Mac, the Steam client will handle these operations for you
|
||||
// On Playstation 3, the game controls which files are stored in the cloud, via FilePersist, FileFetch, and FileForget.
|
||||
|
||||
#if defined(_SERVER)
|
||||
// Connect to Steam and get a list of files in the Cloud - results in a RemoteStorageAppSyncStatusCheck_t callback
|
||||
virtual void GetFileListFromServer() = 0;
|
||||
// Indicate this file should be downloaded in the next sync
|
||||
virtual bool FileFetch(const char* pchFile) = 0;
|
||||
// Indicate this file should be persisted in the next sync
|
||||
virtual bool FilePersist(const char* pchFile) = 0;
|
||||
// Pull any requested files down from the Cloud - results in a RemoteStorageAppSyncedClient_t callback
|
||||
virtual bool SynchronizeToClient() = 0;
|
||||
// Upload any requested files to the Cloud - results in a RemoteStorageAppSyncedServer_t callback
|
||||
virtual bool SynchronizeToServer() = 0;
|
||||
// Reset any fetch/persist/etc requests
|
||||
virtual bool ResetFileRequestState() = 0;
|
||||
#endif
|
||||
|
||||
// publishing UGC
|
||||
STEAM_CALL_RESULT( RemoteStoragePublishFileProgress_t )
|
||||
virtual SteamAPICall_t PublishWorkshopFile( const char *pchFile, const char *pchPreviewFile, AppId_t nConsumerAppId, const char *pchTitle, const char *pchDescription, ERemoteStoragePublishedFileVisibility eVisibility, SteamParamStringArray_t *pTags, EWorkshopFileType eWorkshopFileType ) = 0;
|
||||
@ -289,9 +309,18 @@ public:
|
||||
|
||||
STEAM_CALL_RESULT( RemoteStorageDownloadUGCResult_t )
|
||||
virtual SteamAPICall_t UGCDownloadToLocation( UGCHandle_t hContent, const char *pchLocation, uint32 unPriority ) = 0;
|
||||
|
||||
// Cloud dynamic state change notification
|
||||
virtual int32 GetLocalFileChangeCount() = 0;
|
||||
virtual const char *GetLocalFileChange( int iFile, ERemoteStorageLocalFileChange *pEChangeType, ERemoteStorageFilePathType *pEFilePathType ) = 0;
|
||||
|
||||
// Indicate to Steam the beginning / end of a set of local file
|
||||
// operations - for example, writing a game save that requires updating two files.
|
||||
virtual bool BeginFileWriteBatch() = 0;
|
||||
virtual bool EndFileWriteBatch() = 0;
|
||||
};
|
||||
|
||||
#define STEAMREMOTESTORAGE_INTERFACE_VERSION "STEAMREMOTESTORAGE_INTERFACE_VERSION014"
|
||||
#define STEAMREMOTESTORAGE_INTERFACE_VERSION "STEAMREMOTESTORAGE_INTERFACE_VERSION016"
|
||||
|
||||
// Global interface accessor
|
||||
inline ISteamRemoteStorage *SteamRemoteStorage();
|
||||
@ -306,90 +335,59 @@ STEAM_DEFINE_USER_INTERFACE_ACCESSOR(ISteamRemoteStorage*, SteamRemoteStorage, S
|
||||
#error steam_api_common.h should define VALVE_CALLBACK_PACK_xxx
|
||||
#endif
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: sent when the local file cache is fully synced with the server for an app
|
||||
// That means that an application can be started and has all latest files
|
||||
//-----------------------------------------------------------------------------
|
||||
struct RemoteStorageAppSyncedClient_t {
|
||||
enum { k_iCallback = k_iClientRemoteStorageCallbacks + 1 };
|
||||
AppId_t m_nAppID;
|
||||
EResult m_eResult;
|
||||
int m_unNumDownloads;
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: sent when the server is fully synced with the local file cache for an app
|
||||
// That means that we can shutdown Steam and our data is stored on the server
|
||||
//-----------------------------------------------------------------------------
|
||||
struct RemoteStorageAppSyncedServer_t {
|
||||
enum { k_iCallback = k_iClientRemoteStorageCallbacks + 2 };
|
||||
AppId_t m_nAppID;
|
||||
EResult m_eResult;
|
||||
int m_unNumUploads;
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Status of up and downloads during a sync session
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
struct RemoteStorageAppSyncProgress_t {
|
||||
enum { k_iCallback = k_iClientRemoteStorageCallbacks + 3 };
|
||||
char m_rgchCurrentFile[k_cchFilenameMax]; // Current file being transferred
|
||||
AppId_t m_nAppID; // App this info relates to
|
||||
uint32 m_uBytesTransferredThisChunk; // Bytes transferred this chunk
|
||||
double m_dAppPercentComplete; // Percent complete that this app's transfers are
|
||||
bool m_bUploading; // if false, downloading
|
||||
};
|
||||
|
||||
//
|
||||
// IMPORTANT! k_iClientRemoteStorageCallbacks + 4 is used, see iclientremotestorage.h
|
||||
// IMPORTANT! k_iClientRemoteStorageCallbacks 1 through 6 are used, see iclientremotestorage.h
|
||||
//
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Sent after we've determined the list of files that are out of sync
|
||||
// with the server.
|
||||
//-----------------------------------------------------------------------------
|
||||
struct RemoteStorageAppSyncStatusCheck_t {
|
||||
enum { k_iCallback = k_iClientRemoteStorageCallbacks + 5 };
|
||||
AppId_t m_nAppID;
|
||||
EResult m_eResult;
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: The result of a call to FileShare()
|
||||
//-----------------------------------------------------------------------------
|
||||
struct RemoteStorageFileShareResult_t {
|
||||
struct RemoteStorageFileShareResult_t
|
||||
{
|
||||
enum { k_iCallback = k_iClientRemoteStorageCallbacks + 7 };
|
||||
EResult m_eResult; // The result of the operation
|
||||
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
|
||||
};
|
||||
|
||||
|
||||
// k_iClientRemoteStorageCallbacks + 8 is deprecated! Do not reuse
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: The result of a call to PublishFile()
|
||||
//-----------------------------------------------------------------------------
|
||||
struct RemoteStoragePublishFileResult_t {
|
||||
struct RemoteStoragePublishFileResult_t
|
||||
{
|
||||
enum { k_iCallback = k_iClientRemoteStorageCallbacks + 9 };
|
||||
EResult m_eResult; // The result of the operation.
|
||||
PublishedFileId_t m_nPublishedFileId;
|
||||
bool m_bUserNeedsToAcceptWorkshopLegalAgreement;
|
||||
};
|
||||
|
||||
// k_iClientRemoteStorageCallbacks + 10 is deprecated! Do not reuse
|
||||
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: The result of a call to DeletePublishedFile()
|
||||
//-----------------------------------------------------------------------------
|
||||
struct RemoteStorageDeletePublishedFileResult_t {
|
||||
struct RemoteStorageDeletePublishedFileResult_t
|
||||
{
|
||||
enum { k_iCallback = k_iClientRemoteStorageCallbacks + 11 };
|
||||
EResult m_eResult; // The result of the operation.
|
||||
PublishedFileId_t m_nPublishedFileId;
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: The result of a call to EnumerateUserPublishedFiles()
|
||||
//-----------------------------------------------------------------------------
|
||||
struct RemoteStorageEnumerateUserPublishedFilesResult_t {
|
||||
struct RemoteStorageEnumerateUserPublishedFilesResult_t
|
||||
{
|
||||
enum { k_iCallback = k_iClientRemoteStorageCallbacks + 12 };
|
||||
EResult m_eResult; // The result of the operation.
|
||||
int32 m_nResultsReturned;
|
||||
@ -397,19 +395,23 @@ struct RemoteStorageEnumerateUserPublishedFilesResult_t {
|
||||
PublishedFileId_t m_rgPublishedFileId[ k_unEnumeratePublishedFilesMaxResults ];
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: The result of a call to SubscribePublishedFile()
|
||||
//-----------------------------------------------------------------------------
|
||||
struct RemoteStorageSubscribePublishedFileResult_t {
|
||||
struct RemoteStorageSubscribePublishedFileResult_t
|
||||
{
|
||||
enum { k_iCallback = k_iClientRemoteStorageCallbacks + 13 };
|
||||
EResult m_eResult; // The result of the operation.
|
||||
PublishedFileId_t m_nPublishedFileId;
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: The result of a call to EnumerateSubscribePublishedFiles()
|
||||
//-----------------------------------------------------------------------------
|
||||
struct RemoteStorageEnumerateUserSubscribedFilesResult_t {
|
||||
struct RemoteStorageEnumerateUserSubscribedFilesResult_t
|
||||
{
|
||||
enum { k_iCallback = k_iClientRemoteStorageCallbacks + 14 };
|
||||
EResult m_eResult; // The result of the operation.
|
||||
int32 m_nResultsReturned;
|
||||
@ -429,26 +431,31 @@ VALVE_COMPILE_TIME_ASSERT(sizeof(RemoteStorageEnumerateUserSubscribedFilesResult
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: The result of a call to UnsubscribePublishedFile()
|
||||
//-----------------------------------------------------------------------------
|
||||
struct RemoteStorageUnsubscribePublishedFileResult_t {
|
||||
struct RemoteStorageUnsubscribePublishedFileResult_t
|
||||
{
|
||||
enum { k_iCallback = k_iClientRemoteStorageCallbacks + 15 };
|
||||
EResult m_eResult; // The result of the operation.
|
||||
PublishedFileId_t m_nPublishedFileId;
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: The result of a call to CommitPublishedFileUpdate()
|
||||
//-----------------------------------------------------------------------------
|
||||
struct RemoteStorageUpdatePublishedFileResult_t {
|
||||
struct RemoteStorageUpdatePublishedFileResult_t
|
||||
{
|
||||
enum { k_iCallback = k_iClientRemoteStorageCallbacks + 16 };
|
||||
EResult m_eResult; // The result of the operation.
|
||||
PublishedFileId_t m_nPublishedFileId;
|
||||
bool m_bUserNeedsToAcceptWorkshopLegalAgreement;
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: The result of a call to UGCDownload()
|
||||
//-----------------------------------------------------------------------------
|
||||
struct RemoteStorageDownloadUGCResult_t {
|
||||
struct RemoteStorageDownloadUGCResult_t
|
||||
{
|
||||
enum { k_iCallback = k_iClientRemoteStorageCallbacks + 17 };
|
||||
EResult m_eResult; // The result of the operation.
|
||||
UGCHandle_t m_hFile; // The handle to the file that was attempted to be downloaded.
|
||||
@ -458,10 +465,12 @@ struct RemoteStorageDownloadUGCResult_t {
|
||||
uint64 m_ulSteamIDOwner; // Steam ID of the user who created this content.
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: The result of a call to GetPublishedFileDetails()
|
||||
//-----------------------------------------------------------------------------
|
||||
struct RemoteStorageGetPublishedFileDetailsResult_t {
|
||||
struct RemoteStorageGetPublishedFileDetailsResult_t
|
||||
{
|
||||
enum { k_iCallback = k_iClientRemoteStorageCallbacks + 18 };
|
||||
EResult m_eResult; // The result of the operation.
|
||||
PublishedFileId_t m_nPublishedFileId;
|
||||
@ -486,7 +495,9 @@ struct RemoteStorageGetPublishedFileDetailsResult_t {
|
||||
bool m_bAcceptedForUse; // developer has specifically flagged this item as accepted in the Workshop
|
||||
};
|
||||
|
||||
struct RemoteStorageEnumerateWorkshopFilesResult_t {
|
||||
|
||||
struct RemoteStorageEnumerateWorkshopFilesResult_t
|
||||
{
|
||||
enum { k_iCallback = k_iClientRemoteStorageCallbacks + 19 };
|
||||
EResult m_eResult;
|
||||
int32 m_nResultsReturned;
|
||||
@ -497,10 +508,12 @@ struct RemoteStorageEnumerateWorkshopFilesResult_t {
|
||||
uint32 m_unStartIndex;
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: The result of GetPublishedItemVoteDetails
|
||||
//-----------------------------------------------------------------------------
|
||||
struct RemoteStorageGetPublishedItemVoteDetailsResult_t {
|
||||
struct RemoteStorageGetPublishedItemVoteDetailsResult_t
|
||||
{
|
||||
enum { k_iCallback = k_iClientRemoteStorageCallbacks + 20 };
|
||||
EResult m_eResult;
|
||||
PublishedFileId_t m_unPublishedFileId;
|
||||
@ -510,10 +523,12 @@ struct RemoteStorageGetPublishedItemVoteDetailsResult_t {
|
||||
float m_fScore;
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: User subscribed to a file for the app (from within the app or on the web)
|
||||
//-----------------------------------------------------------------------------
|
||||
struct RemoteStoragePublishedFileSubscribed_t {
|
||||
struct RemoteStoragePublishedFileSubscribed_t
|
||||
{
|
||||
enum { k_iCallback = k_iClientRemoteStorageCallbacks + 21 };
|
||||
PublishedFileId_t m_nPublishedFileId; // The published file id
|
||||
AppId_t m_nAppID; // ID of the app that will consume this file.
|
||||
@ -522,41 +537,49 @@ struct RemoteStoragePublishedFileSubscribed_t {
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: User unsubscribed from a file for the app (from within the app or on the web)
|
||||
//-----------------------------------------------------------------------------
|
||||
struct RemoteStoragePublishedFileUnsubscribed_t {
|
||||
struct RemoteStoragePublishedFileUnsubscribed_t
|
||||
{
|
||||
enum { k_iCallback = k_iClientRemoteStorageCallbacks + 22 };
|
||||
PublishedFileId_t m_nPublishedFileId; // The published file id
|
||||
AppId_t m_nAppID; // ID of the app that will consume this file.
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Published file that a user owns was deleted (from within the app or the web)
|
||||
//-----------------------------------------------------------------------------
|
||||
struct RemoteStoragePublishedFileDeleted_t {
|
||||
struct RemoteStoragePublishedFileDeleted_t
|
||||
{
|
||||
enum { k_iCallback = k_iClientRemoteStorageCallbacks + 23 };
|
||||
PublishedFileId_t m_nPublishedFileId; // The published file id
|
||||
AppId_t m_nAppID; // ID of the app that will consume this file.
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: The result of a call to UpdateUserPublishedItemVote()
|
||||
//-----------------------------------------------------------------------------
|
||||
struct RemoteStorageUpdateUserPublishedItemVoteResult_t {
|
||||
struct RemoteStorageUpdateUserPublishedItemVoteResult_t
|
||||
{
|
||||
enum { k_iCallback = k_iClientRemoteStorageCallbacks + 24 };
|
||||
EResult m_eResult; // The result of the operation.
|
||||
PublishedFileId_t m_nPublishedFileId; // The published file id
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: The result of a call to GetUserPublishedItemVoteDetails()
|
||||
//-----------------------------------------------------------------------------
|
||||
struct RemoteStorageUserVoteDetails_t {
|
||||
struct RemoteStorageUserVoteDetails_t
|
||||
{
|
||||
enum { k_iCallback = k_iClientRemoteStorageCallbacks + 25 };
|
||||
EResult m_eResult; // The result of the operation.
|
||||
PublishedFileId_t m_nPublishedFileId; // The published file id
|
||||
EWorkshopVote m_eVote; // what the user voted
|
||||
};
|
||||
|
||||
struct RemoteStorageEnumerateUserSharedWorkshopFilesResult_t {
|
||||
struct RemoteStorageEnumerateUserSharedWorkshopFilesResult_t
|
||||
{
|
||||
enum { k_iCallback = k_iClientRemoteStorageCallbacks + 26 };
|
||||
EResult m_eResult; // The result of the operation.
|
||||
int32 m_nResultsReturned;
|
||||
@ -564,14 +587,16 @@ struct RemoteStorageEnumerateUserSharedWorkshopFilesResult_t {
|
||||
PublishedFileId_t m_rgPublishedFileId[ k_unEnumeratePublishedFilesMaxResults ];
|
||||
};
|
||||
|
||||
struct RemoteStorageSetUserPublishedFileActionResult_t {
|
||||
struct RemoteStorageSetUserPublishedFileActionResult_t
|
||||
{
|
||||
enum { k_iCallback = k_iClientRemoteStorageCallbacks + 27 };
|
||||
EResult m_eResult; // The result of the operation.
|
||||
PublishedFileId_t m_nPublishedFileId; // The published file id
|
||||
EWorkshopFileAction m_eAction; // the action that was attempted
|
||||
};
|
||||
|
||||
struct RemoteStorageEnumeratePublishedFilesByUserActionResult_t {
|
||||
struct RemoteStorageEnumeratePublishedFilesByUserActionResult_t
|
||||
{
|
||||
enum { k_iCallback = k_iClientRemoteStorageCallbacks + 28 };
|
||||
EResult m_eResult; // The result of the operation.
|
||||
EWorkshopFileAction m_eAction; // the action that was filtered on
|
||||
@ -581,19 +606,23 @@ struct RemoteStorageEnumeratePublishedFilesByUserActionResult_t {
|
||||
uint32 m_rgRTimeUpdated[ k_unEnumeratePublishedFilesMaxResults ];
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Called periodically while a PublishWorkshopFile is in progress
|
||||
//-----------------------------------------------------------------------------
|
||||
struct RemoteStoragePublishFileProgress_t {
|
||||
struct RemoteStoragePublishFileProgress_t
|
||||
{
|
||||
enum { k_iCallback = k_iClientRemoteStorageCallbacks + 29 };
|
||||
double m_dPercentFile;
|
||||
bool m_bPreview;
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Called when the content for a published file is updated
|
||||
//-----------------------------------------------------------------------------
|
||||
struct RemoteStoragePublishedFileUpdated_t {
|
||||
struct RemoteStoragePublishedFileUpdated_t
|
||||
{
|
||||
enum { k_iCallback = k_iClientRemoteStorageCallbacks + 30 };
|
||||
PublishedFileId_t m_nPublishedFileId; // The published file id
|
||||
AppId_t m_nAppID; // ID of the app that will consume this file.
|
||||
@ -603,7 +632,8 @@ struct RemoteStoragePublishedFileUpdated_t {
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Called when a FileWriteAsync completes
|
||||
//-----------------------------------------------------------------------------
|
||||
struct RemoteStorageFileWriteAsyncComplete_t {
|
||||
struct RemoteStorageFileWriteAsyncComplete_t
|
||||
{
|
||||
enum { k_iCallback = k_iClientRemoteStorageCallbacks + 31 };
|
||||
EResult m_eResult; // result
|
||||
};
|
||||
@ -611,7 +641,8 @@ struct RemoteStorageFileWriteAsyncComplete_t {
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Called when a FileReadAsync completes
|
||||
//-----------------------------------------------------------------------------
|
||||
struct RemoteStorageFileReadAsyncComplete_t {
|
||||
struct RemoteStorageFileReadAsyncComplete_t
|
||||
{
|
||||
enum { k_iCallback = k_iClientRemoteStorageCallbacks + 32 };
|
||||
SteamAPICall_t m_hFileReadAsync; // call handle of the async read which was made
|
||||
EResult m_eResult; // result
|
||||
@ -619,6 +650,15 @@ struct RemoteStorageFileReadAsyncComplete_t {
|
||||
uint32 m_cubRead; // amount read - will the <= the amount requested
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: one or more files for this app have changed locally after syncing
|
||||
// to remote session changes
|
||||
// Note: only posted if this happens DURING the local app session
|
||||
//-----------------------------------------------------------------------------
|
||||
STEAM_CALLBACK_BEGIN( RemoteStorageLocalFileChange_t, k_iClientRemoteStorageCallbacks + 33 )
|
||||
STEAM_CALLBACK_END( 0 )
|
||||
|
||||
#pragma pack( pop )
|
||||
|
||||
|
||||
#endif // ISTEAMREMOTESTORAGE_H
|
||||
|
@ -25,7 +25,8 @@ const int k_ScreenshotThumbWidth = 200;
|
||||
typedef uint32 ScreenshotHandle;
|
||||
#define INVALID_SCREENSHOT_HANDLE 0
|
||||
|
||||
enum EVRScreenshotType {
|
||||
enum EVRScreenshotType
|
||||
{
|
||||
k_EVRScreenshotType_None = 0,
|
||||
k_EVRScreenshotType_Mono = 1,
|
||||
k_EVRScreenshotType_Stereo = 2,
|
||||
@ -37,7 +38,8 @@ enum EVRScreenshotType {
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Functions for adding screenshots to the user's screenshot library
|
||||
//-----------------------------------------------------------------------------
|
||||
class ISteamScreenshots {
|
||||
class ISteamScreenshots
|
||||
{
|
||||
public:
|
||||
// Writes a screenshot to the user's screenshot library given the raw image data, which must be in RGB format.
|
||||
// The return value is a handle that is valid for the duration of the game process and can be used to apply tags.
|
||||
@ -95,7 +97,8 @@ STEAM_DEFINE_USER_INTERFACE_ACCESSOR(ISteamScreenshots*, SteamScreenshots, STEAM
|
||||
// Purpose: Screenshot successfully written or otherwise added to the library
|
||||
// and can now be tagged
|
||||
//-----------------------------------------------------------------------------
|
||||
struct ScreenshotReady_t {
|
||||
struct ScreenshotReady_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamScreenshotsCallbacks + 1 };
|
||||
ScreenshotHandle m_hLocal;
|
||||
EResult m_eResult;
|
||||
@ -106,10 +109,12 @@ struct ScreenshotReady_t {
|
||||
// HookScreenshots() has been called, in which case Steam will not take
|
||||
// the screenshot itself.
|
||||
//-----------------------------------------------------------------------------
|
||||
struct ScreenshotRequested_t {
|
||||
struct ScreenshotRequested_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamScreenshotsCallbacks + 2 };
|
||||
};
|
||||
|
||||
#pragma pack( pop )
|
||||
|
||||
#endif // ISTEAMSCREENSHOTS_H
|
||||
|
||||
|
@ -10,8 +10,8 @@
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
#include "isteamremotestorage.h"
|
||||
#include "steam_api_common.h"
|
||||
#include "isteamremotestorage.h"
|
||||
|
||||
// callbacks
|
||||
#if defined( VALVE_CALLBACK_PACK_SMALL )
|
||||
@ -22,14 +22,18 @@
|
||||
#error steam_api_common.h should define VALVE_CALLBACK_PACK_xxx
|
||||
#endif
|
||||
|
||||
|
||||
typedef uint64 UGCQueryHandle_t;
|
||||
typedef uint64 UGCUpdateHandle_t;
|
||||
|
||||
|
||||
const UGCQueryHandle_t k_UGCQueryHandleInvalid = 0xffffffffffffffffull;
|
||||
const UGCUpdateHandle_t k_UGCUpdateHandleInvalid = 0xffffffffffffffffull;
|
||||
|
||||
|
||||
// Matching UGC types for queries
|
||||
enum EUGCMatchingUGCType {
|
||||
enum EUGCMatchingUGCType
|
||||
{
|
||||
k_EUGCMatchingUGCType_Items = 0, // both mtx items and ready-to-use items
|
||||
k_EUGCMatchingUGCType_Items_Mtx = 1,
|
||||
k_EUGCMatchingUGCType_Items_ReadyToUse = 2,
|
||||
@ -48,7 +52,8 @@ enum EUGCMatchingUGCType {
|
||||
|
||||
// Different lists of published UGC for a user.
|
||||
// If the current logged in user is different than the specified user, then some options may not be allowed.
|
||||
enum EUserUGCList {
|
||||
enum EUserUGCList
|
||||
{
|
||||
k_EUserUGCList_Published,
|
||||
k_EUserUGCList_VotedOn,
|
||||
k_EUserUGCList_VotedUp,
|
||||
@ -61,7 +66,8 @@ enum EUserUGCList {
|
||||
};
|
||||
|
||||
// Sort order for user published UGC lists (defaults to creation order descending)
|
||||
enum EUserUGCListSortOrder {
|
||||
enum EUserUGCListSortOrder
|
||||
{
|
||||
k_EUserUGCListSortOrder_CreationOrderDesc,
|
||||
k_EUserUGCListSortOrder_CreationOrderAsc,
|
||||
k_EUserUGCListSortOrder_TitleAsc,
|
||||
@ -72,7 +78,8 @@ enum EUserUGCListSortOrder {
|
||||
};
|
||||
|
||||
// Combination of sorting and filtering for queries across all UGC
|
||||
enum EUGCQuery {
|
||||
enum EUGCQuery
|
||||
{
|
||||
k_EUGCQuery_RankedByVote = 0,
|
||||
k_EUGCQuery_RankedByPublicationDate = 1,
|
||||
k_EUGCQuery_AcceptedForGameRankedByAcceptanceDate = 2,
|
||||
@ -92,9 +99,11 @@ enum EUGCQuery {
|
||||
k_EUGCQuery_RankedByLifetimeAveragePlaytime = 16,
|
||||
k_EUGCQuery_RankedByPlaytimeSessionsTrend = 17,
|
||||
k_EUGCQuery_RankedByLifetimePlaytimeSessions = 18,
|
||||
k_EUGCQuery_RankedByLastUpdatedDate = 19,
|
||||
};
|
||||
|
||||
enum EItemUpdateStatus {
|
||||
enum EItemUpdateStatus
|
||||
{
|
||||
k_EItemUpdateStatusInvalid = 0, // The item update handle was invalid, job might be finished, listen too SubmitItemUpdateResult_t
|
||||
k_EItemUpdateStatusPreparingConfig = 1, // The item update is processing configuration data
|
||||
k_EItemUpdateStatusPreparingContent = 2, // The item update is reading and processing content files
|
||||
@ -103,7 +112,8 @@ enum EItemUpdateStatus {
|
||||
k_EItemUpdateStatusCommittingChanges = 5 // The item update is committing all changes
|
||||
};
|
||||
|
||||
enum EItemState {
|
||||
enum EItemState
|
||||
{
|
||||
k_EItemStateNone = 0, // item not tracked on client
|
||||
k_EItemStateSubscribed = 1, // current user is subscribed to this item. Not just cached.
|
||||
k_EItemStateLegacyItem = 2, // item was created with ISteamRemoteStorage
|
||||
@ -113,7 +123,8 @@ enum EItemState {
|
||||
k_EItemStateDownloadPending = 32, // DownloadItem() was called for this item, content isn't available until DownloadItemResult_t is fired
|
||||
};
|
||||
|
||||
enum EItemStatistic {
|
||||
enum EItemStatistic
|
||||
{
|
||||
k_EItemStatistic_NumSubscriptions = 0,
|
||||
k_EItemStatistic_NumFavorites = 1,
|
||||
k_EItemStatistic_NumFollowers = 2,
|
||||
@ -129,7 +140,8 @@ enum EItemStatistic {
|
||||
k_EItemStatistic_NumPlaytimeSessionsDuringTimePeriod = 12,
|
||||
};
|
||||
|
||||
enum EItemPreviewType {
|
||||
enum EItemPreviewType
|
||||
{
|
||||
k_EItemPreviewType_Image = 0, // standard image file expected (e.g. jpg, png, gif, etc.)
|
||||
k_EItemPreviewType_YouTubeVideo = 1, // video id is stored
|
||||
k_EItemPreviewType_Sketchfab = 2, // model id is stored
|
||||
@ -149,7 +161,8 @@ const uint32 kNumUGCResultsPerPage = 50;
|
||||
const uint32 k_cchDeveloperMetadataMax = 5000;
|
||||
|
||||
// Details for a single published file/UGC
|
||||
struct SteamUGCDetails_t {
|
||||
struct SteamUGCDetails_t
|
||||
{
|
||||
PublishedFileId_t m_nPublishedFileId;
|
||||
EResult m_eResult; // The result of the operation.
|
||||
EWorkshopFileType m_eFileType; // Type of the file
|
||||
@ -184,8 +197,10 @@ struct SteamUGCDetails_t {
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Steam UGC support API
|
||||
//-----------------------------------------------------------------------------
|
||||
class ISteamUGC {
|
||||
class ISteamUGC
|
||||
{
|
||||
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;
|
||||
|
||||
@ -346,6 +361,12 @@ public:
|
||||
// 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;
|
||||
};
|
||||
|
||||
#define STEAMUGC_INTERFACE_VERSION "STEAMUGC_INTERFACE_VERSION015"
|
||||
@ -361,7 +382,8 @@ STEAM_DEFINE_GAMESERVER_INTERFACE_ACCESSOR(ISteamUGC*, SteamGameServerUGC, STEAM
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Callback for querying UGC
|
||||
//-----------------------------------------------------------------------------
|
||||
struct SteamUGCQueryCompleted_t {
|
||||
struct SteamUGCQueryCompleted_t
|
||||
{
|
||||
enum { k_iCallback = k_iClientUGCCallbacks + 1 };
|
||||
UGCQueryHandle_t m_handle;
|
||||
EResult m_eResult;
|
||||
@ -371,48 +393,58 @@ struct SteamUGCQueryCompleted_t {
|
||||
char m_rgchNextCursor[k_cchPublishedFileURLMax]; // If a paging cursor was used, then this will be the next cursor to get the next result set.
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Callback for requesting details on one piece of UGC
|
||||
//-----------------------------------------------------------------------------
|
||||
struct SteamUGCRequestUGCDetailsResult_t {
|
||||
struct SteamUGCRequestUGCDetailsResult_t
|
||||
{
|
||||
enum { k_iCallback = k_iClientUGCCallbacks + 2 };
|
||||
SteamUGCDetails_t m_details;
|
||||
bool m_bCachedData; // indicates whether this data was retrieved from the local on-disk cache
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: result for ISteamUGC::CreateItem()
|
||||
//-----------------------------------------------------------------------------
|
||||
struct CreateItemResult_t {
|
||||
struct CreateItemResult_t
|
||||
{
|
||||
enum { k_iCallback = k_iClientUGCCallbacks + 3 };
|
||||
EResult m_eResult;
|
||||
PublishedFileId_t m_nPublishedFileId; // new item got this UGC PublishFileID
|
||||
bool m_bUserNeedsToAcceptWorkshopLegalAgreement;
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: result for ISteamUGC::SubmitItemUpdate()
|
||||
//-----------------------------------------------------------------------------
|
||||
struct SubmitItemUpdateResult_t {
|
||||
struct SubmitItemUpdateResult_t
|
||||
{
|
||||
enum { k_iCallback = k_iClientUGCCallbacks + 4 };
|
||||
EResult m_eResult;
|
||||
bool m_bUserNeedsToAcceptWorkshopLegalAgreement;
|
||||
PublishedFileId_t m_nPublishedFileId;
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: a Workshop item has been installed or updated
|
||||
//-----------------------------------------------------------------------------
|
||||
struct ItemInstalled_t {
|
||||
struct ItemInstalled_t
|
||||
{
|
||||
enum { k_iCallback = k_iClientUGCCallbacks + 5 };
|
||||
AppId_t m_unAppID;
|
||||
PublishedFileId_t m_nPublishedFileId;
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: result of DownloadItem(), existing item files can be accessed again
|
||||
//-----------------------------------------------------------------------------
|
||||
struct DownloadItemResult_t {
|
||||
struct DownloadItemResult_t
|
||||
{
|
||||
enum { k_iCallback = k_iClientUGCCallbacks + 6 };
|
||||
AppId_t m_unAppID;
|
||||
PublishedFileId_t m_nPublishedFileId;
|
||||
@ -422,7 +454,8 @@ struct DownloadItemResult_t {
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: result of AddItemToFavorites() or RemoveItemFromFavorites()
|
||||
//-----------------------------------------------------------------------------
|
||||
struct UserFavoriteItemsListChanged_t {
|
||||
struct UserFavoriteItemsListChanged_t
|
||||
{
|
||||
enum { k_iCallback = k_iClientUGCCallbacks + 7 };
|
||||
PublishedFileId_t m_nPublishedFileId;
|
||||
EResult m_eResult;
|
||||
@ -432,7 +465,8 @@ struct UserFavoriteItemsListChanged_t {
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: The result of a call to SetUserItemVote()
|
||||
//-----------------------------------------------------------------------------
|
||||
struct SetUserItemVoteResult_t {
|
||||
struct SetUserItemVoteResult_t
|
||||
{
|
||||
enum { k_iCallback = k_iClientUGCCallbacks + 8 };
|
||||
PublishedFileId_t m_nPublishedFileId;
|
||||
EResult m_eResult;
|
||||
@ -442,7 +476,8 @@ struct SetUserItemVoteResult_t {
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: The result of a call to GetUserItemVote()
|
||||
//-----------------------------------------------------------------------------
|
||||
struct GetUserItemVoteResult_t {
|
||||
struct GetUserItemVoteResult_t
|
||||
{
|
||||
enum { k_iCallback = k_iClientUGCCallbacks + 9 };
|
||||
PublishedFileId_t m_nPublishedFileId;
|
||||
EResult m_eResult;
|
||||
@ -454,7 +489,8 @@ struct GetUserItemVoteResult_t {
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: The result of a call to StartPlaytimeTracking()
|
||||
//-----------------------------------------------------------------------------
|
||||
struct StartPlaytimeTrackingResult_t {
|
||||
struct StartPlaytimeTrackingResult_t
|
||||
{
|
||||
enum { k_iCallback = k_iClientUGCCallbacks + 10 };
|
||||
EResult m_eResult;
|
||||
};
|
||||
@ -462,7 +498,8 @@ struct StartPlaytimeTrackingResult_t {
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: The result of a call to StopPlaytimeTracking()
|
||||
//-----------------------------------------------------------------------------
|
||||
struct StopPlaytimeTrackingResult_t {
|
||||
struct StopPlaytimeTrackingResult_t
|
||||
{
|
||||
enum { k_iCallback = k_iClientUGCCallbacks + 11 };
|
||||
EResult m_eResult;
|
||||
};
|
||||
@ -470,7 +507,8 @@ struct StopPlaytimeTrackingResult_t {
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: The result of a call to AddDependency
|
||||
//-----------------------------------------------------------------------------
|
||||
struct AddUGCDependencyResult_t {
|
||||
struct AddUGCDependencyResult_t
|
||||
{
|
||||
enum { k_iCallback = k_iClientUGCCallbacks + 12 };
|
||||
EResult m_eResult;
|
||||
PublishedFileId_t m_nPublishedFileId;
|
||||
@ -480,17 +518,20 @@ struct AddUGCDependencyResult_t {
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: The result of a call to RemoveDependency
|
||||
//-----------------------------------------------------------------------------
|
||||
struct RemoveUGCDependencyResult_t {
|
||||
struct RemoveUGCDependencyResult_t
|
||||
{
|
||||
enum { k_iCallback = k_iClientUGCCallbacks + 13 };
|
||||
EResult m_eResult;
|
||||
PublishedFileId_t m_nPublishedFileId;
|
||||
PublishedFileId_t m_nChildPublishedFileId;
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: The result of a call to AddAppDependency
|
||||
//-----------------------------------------------------------------------------
|
||||
struct AddAppDependencyResult_t {
|
||||
struct AddAppDependencyResult_t
|
||||
{
|
||||
enum { k_iCallback = k_iClientUGCCallbacks + 14 };
|
||||
EResult m_eResult;
|
||||
PublishedFileId_t m_nPublishedFileId;
|
||||
@ -500,7 +541,8 @@ struct AddAppDependencyResult_t {
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: The result of a call to RemoveAppDependency
|
||||
//-----------------------------------------------------------------------------
|
||||
struct RemoveAppDependencyResult_t {
|
||||
struct RemoveAppDependencyResult_t
|
||||
{
|
||||
enum { k_iCallback = k_iClientUGCCallbacks + 15 };
|
||||
EResult m_eResult;
|
||||
PublishedFileId_t m_nPublishedFileId;
|
||||
@ -511,7 +553,8 @@ struct RemoveAppDependencyResult_t {
|
||||
// Purpose: The result of a call to GetAppDependencies. Callback may be called
|
||||
// multiple times until all app dependencies have been returned.
|
||||
//-----------------------------------------------------------------------------
|
||||
struct GetAppDependenciesResult_t {
|
||||
struct GetAppDependenciesResult_t
|
||||
{
|
||||
enum { k_iCallback = k_iClientUGCCallbacks + 16 };
|
||||
EResult m_eResult;
|
||||
PublishedFileId_t m_nPublishedFileId;
|
||||
@ -523,12 +566,38 @@ struct GetAppDependenciesResult_t {
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: The result of a call to DeleteItem
|
||||
//-----------------------------------------------------------------------------
|
||||
struct DeleteItemResult_t {
|
||||
struct DeleteItemResult_t
|
||||
{
|
||||
enum { k_iCallback = k_iClientUGCCallbacks + 17 };
|
||||
EResult m_eResult;
|
||||
PublishedFileId_t m_nPublishedFileId;
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: signal that the list of subscribed items changed
|
||||
//-----------------------------------------------------------------------------
|
||||
struct UserSubscribedItemsListChanged_t
|
||||
{
|
||||
enum { k_iCallback = k_iClientUGCCallbacks + 18 };
|
||||
AppId_t m_nAppID;
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Status of the user's acceptable/rejection of the app's specific Workshop EULA
|
||||
//-----------------------------------------------------------------------------
|
||||
struct WorkshopEULAStatus_t
|
||||
{
|
||||
enum { k_iCallback = k_iClientUGCCallbacks + 20 };
|
||||
EResult m_eResult;
|
||||
AppId_t m_nAppID;
|
||||
uint32 m_unVersion;
|
||||
RTime32 m_rtAction;
|
||||
bool m_bAccepted;
|
||||
bool m_bNeedsAction;
|
||||
};
|
||||
|
||||
#pragma pack( pop )
|
||||
|
||||
#endif // ISTEAMUGC_H
|
||||
|
@ -16,7 +16,8 @@
|
||||
// Purpose: Functions for accessing and manipulating a steam account
|
||||
// associated with one client instance
|
||||
//-----------------------------------------------------------------------------
|
||||
class ISteamUser {
|
||||
class ISteamUser
|
||||
{
|
||||
public:
|
||||
// returns the HSteamUser this interface represents
|
||||
// this is only used internally by the API, and by a few select interfaces that support multi-user
|
||||
@ -46,11 +47,17 @@ public:
|
||||
//
|
||||
// return value - returns the number of bytes written to pBlob. If the return is 0, then the buffer passed in was too small, and the call has failed
|
||||
// The contents of pBlob should then be sent to the game server, for it to use to complete the authentication process.
|
||||
virtual int InitiateGameConnection(void* pAuthBlob, int cbMaxAuthBlob, CSteamID steamIDGameServer, uint32 unIPServer, uint16 usPortServer, bool bSecure) = 0;
|
||||
//
|
||||
// DEPRECATED! This function will be removed from the SDK in an upcoming version.
|
||||
// Please migrate to BeginAuthSession and related functions.
|
||||
virtual int InitiateGameConnection_DEPRECATED( void *pAuthBlob, int cbMaxAuthBlob, CSteamID steamIDGameServer, uint32 unIPServer, uint16 usPortServer, bool bSecure ) = 0;
|
||||
|
||||
// notify of disconnect
|
||||
// needs to occur when the game client leaves the specified game server, needs to match with the InitiateGameConnection() call
|
||||
virtual void TerminateGameConnection(uint32 unIPServer, uint16 usPortServer) = 0;
|
||||
//
|
||||
// DEPRECATED! This function will be removed from the SDK in an upcoming version.
|
||||
// Please migrate to BeginAuthSession and related functions.
|
||||
virtual void TerminateGameConnection_DEPRECATED( uint32 unIPServer, uint16 usPortServer ) = 0;
|
||||
|
||||
// Legacy functions
|
||||
|
||||
@ -200,6 +207,7 @@ public:
|
||||
// This will prevent offline gameplay time from counting against a user's
|
||||
// playtime limits.
|
||||
virtual bool BSetDurationControlOnlineState( EDurationControlOnlineState eNewState ) = 0;
|
||||
|
||||
};
|
||||
|
||||
#define STEAMUSER_INTERFACE_VERSION "SteamUser021"
|
||||
@ -224,7 +232,8 @@ STEAM_DEFINE_USER_INTERFACE_ACCESSOR(ISteamUser*, SteamUser, STEAMUSER_INTERFACE
|
||||
// only be seen if the user has dropped connection due to a networking issue
|
||||
// or a Steam server update
|
||||
//-----------------------------------------------------------------------------
|
||||
struct SteamServersConnected_t {
|
||||
struct SteamServersConnected_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamUserCallbacks + 1 };
|
||||
};
|
||||
|
||||
@ -233,28 +242,33 @@ struct SteamServersConnected_t {
|
||||
// this will occur periodically if the Steam client is not connected,
|
||||
// and has failed in it's retry to establish a connection
|
||||
//-----------------------------------------------------------------------------
|
||||
struct SteamServerConnectFailure_t {
|
||||
struct SteamServerConnectFailure_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamUserCallbacks + 2 };
|
||||
EResult m_eResult;
|
||||
bool m_bStillRetrying;
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: called if the client has lost connection to the Steam servers
|
||||
// real-time services will be disabled until a matching SteamServersConnected_t has been posted
|
||||
//-----------------------------------------------------------------------------
|
||||
struct SteamServersDisconnected_t {
|
||||
struct SteamServersDisconnected_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamUserCallbacks + 3 };
|
||||
EResult m_eResult;
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Sent by the Steam server to the client telling it to disconnect from the specified game server,
|
||||
// which it may be in the process of or already connected to.
|
||||
// The game client should immediately disconnect upon receiving this message.
|
||||
// This can usually occur if the user doesn't have rights to play on the game server.
|
||||
//-----------------------------------------------------------------------------
|
||||
struct ClientGameServerDeny_t {
|
||||
struct ClientGameServerDeny_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamUserCallbacks + 13 };
|
||||
|
||||
uint32 m_uAppID;
|
||||
@ -264,41 +278,50 @@ struct ClientGameServerDeny_t {
|
||||
uint32 m_uReason;
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: called when the callback system for this client is in an error state (and has flushed pending callbacks)
|
||||
// When getting this message the client should disconnect from Steam, reset any stored Steam state and reconnect.
|
||||
// This usually occurs in the rare event the Steam client has some kind of fatal error.
|
||||
//-----------------------------------------------------------------------------
|
||||
struct IPCFailure_t {
|
||||
struct IPCFailure_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamUserCallbacks + 17 };
|
||||
enum EFailureType {
|
||||
enum EFailureType
|
||||
{
|
||||
k_EFailureFlushedCallbackQueue,
|
||||
k_EFailurePipeFail,
|
||||
};
|
||||
uint8 m_eFailureType;
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Signaled whenever licenses change
|
||||
//-----------------------------------------------------------------------------
|
||||
struct LicensesUpdated_t {
|
||||
struct LicensesUpdated_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamUserCallbacks + 25 };
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// callback for BeginAuthSession
|
||||
//-----------------------------------------------------------------------------
|
||||
struct ValidateAuthTicketResponse_t {
|
||||
struct ValidateAuthTicketResponse_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamUserCallbacks + 43 };
|
||||
CSteamID m_SteamID;
|
||||
EAuthSessionResponse m_eAuthSessionResponse;
|
||||
CSteamID m_OwnerSteamID; // different from m_SteamID if borrowed
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: called when a user has responded to a microtransaction authorization request
|
||||
//-----------------------------------------------------------------------------
|
||||
struct MicroTxnAuthorizationResponse_t {
|
||||
struct MicroTxnAuthorizationResponse_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamUserCallbacks + 52 };
|
||||
|
||||
uint32 m_unAppID; // AppID for this microtransaction
|
||||
@ -306,10 +329,12 @@ struct MicroTxnAuthorizationResponse_t {
|
||||
uint8 m_bAuthorized; // if user authorized transaction
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Result from RequestEncryptedAppTicket
|
||||
//-----------------------------------------------------------------------------
|
||||
struct EncryptedAppTicketResponse_t {
|
||||
struct EncryptedAppTicketResponse_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamUserCallbacks + 54 };
|
||||
|
||||
EResult m_eResult;
|
||||
@ -318,16 +343,19 @@ struct EncryptedAppTicketResponse_t {
|
||||
//-----------------------------------------------------------------------------
|
||||
// callback for GetAuthSessionTicket
|
||||
//-----------------------------------------------------------------------------
|
||||
struct GetAuthSessionTicketResponse_t {
|
||||
struct GetAuthSessionTicketResponse_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamUserCallbacks + 63 };
|
||||
HAuthTicket m_hAuthTicket;
|
||||
EResult m_eResult;
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: sent to your game in response to a steam://gamewebcallback/ command
|
||||
//-----------------------------------------------------------------------------
|
||||
struct GameWebCallback_t {
|
||||
struct GameWebCallback_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamUserCallbacks + 64 };
|
||||
char m_szURL[256];
|
||||
};
|
||||
@ -335,15 +363,18 @@ struct GameWebCallback_t {
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: sent to your game in response to ISteamUser::RequestStoreAuthURL
|
||||
//-----------------------------------------------------------------------------
|
||||
struct StoreAuthURLResponse_t {
|
||||
struct StoreAuthURLResponse_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamUserCallbacks + 65 };
|
||||
char m_szURL[512];
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: sent in response to ISteamUser::GetMarketEligibility
|
||||
//-----------------------------------------------------------------------------
|
||||
struct MarketEligibilityResponse_t {
|
||||
struct MarketEligibilityResponse_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamUserCallbacks + 66 };
|
||||
bool m_bAllowed;
|
||||
EMarketNotAllowedReasonFlags m_eNotAllowedReason;
|
||||
@ -353,6 +384,7 @@ struct MarketEligibilityResponse_t {
|
||||
int m_cdayNewDeviceCooldown; // The number of days after initial device authorization a user must wait before using the market on that device
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: sent for games with enabled anti indulgence / duration control, for
|
||||
// enabled users. Lets the game know whether the user can keep playing or
|
||||
@ -361,7 +393,8 @@ struct MarketEligibilityResponse_t {
|
||||
// This callback is fired asynchronously in response to timers triggering.
|
||||
// It is also fired in response to calls to GetDurationControl().
|
||||
//-----------------------------------------------------------------------------
|
||||
struct DurationControl_t {
|
||||
struct DurationControl_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamUserCallbacks + 67 };
|
||||
|
||||
EResult m_eResult; // result of call (always k_EResultOK for asynchronous timer-based notifications)
|
||||
@ -377,6 +410,7 @@ struct DurationControl_t {
|
||||
int32 m_csecsRemaining; // playtime remaining until the user hits a regulatory limit
|
||||
};
|
||||
|
||||
|
||||
#pragma pack( pop )
|
||||
|
||||
#endif // ISTEAMUSER_H
|
||||
|
@ -10,8 +10,8 @@
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
#include "isteamremotestorage.h"
|
||||
#include "steam_api_common.h"
|
||||
#include "isteamremotestorage.h"
|
||||
|
||||
// size limit on stat or achievement name (UTF-8 encoded)
|
||||
enum { k_cchStatNameMax = 128 };
|
||||
@ -29,7 +29,8 @@ typedef uint64 SteamLeaderboard_t;
|
||||
typedef uint64 SteamLeaderboardEntries_t;
|
||||
|
||||
// type of data request, when downloading leaderboard entries
|
||||
enum ELeaderboardDataRequest {
|
||||
enum ELeaderboardDataRequest
|
||||
{
|
||||
k_ELeaderboardDataRequestGlobal = 0,
|
||||
k_ELeaderboardDataRequestGlobalAroundUser = 1,
|
||||
k_ELeaderboardDataRequestFriends = 2,
|
||||
@ -37,21 +38,24 @@ enum ELeaderboardDataRequest {
|
||||
};
|
||||
|
||||
// the sort order of a leaderboard
|
||||
enum ELeaderboardSortMethod {
|
||||
enum ELeaderboardSortMethod
|
||||
{
|
||||
k_ELeaderboardSortMethodNone = 0,
|
||||
k_ELeaderboardSortMethodAscending = 1, // top-score is lowest number
|
||||
k_ELeaderboardSortMethodDescending = 2, // top-score is highest number
|
||||
};
|
||||
|
||||
// the display type (used by the Steam Community web site) for a leaderboard
|
||||
enum ELeaderboardDisplayType {
|
||||
enum ELeaderboardDisplayType
|
||||
{
|
||||
k_ELeaderboardDisplayTypeNone = 0,
|
||||
k_ELeaderboardDisplayTypeNumeric = 1, // simple numerical score
|
||||
k_ELeaderboardDisplayTypeTimeSeconds = 2, // the score represents a time, in seconds
|
||||
k_ELeaderboardDisplayTypeTimeMilliSeconds = 3, // the score represents a time, in milliseconds
|
||||
};
|
||||
|
||||
enum ELeaderboardUploadScoreMethod {
|
||||
enum ELeaderboardUploadScoreMethod
|
||||
{
|
||||
k_ELeaderboardUploadScoreMethodNone = 0,
|
||||
k_ELeaderboardUploadScoreMethodKeepBest = 1, // Leaderboard will keep user's best score
|
||||
k_ELeaderboardUploadScoreMethodForceUpdate = 2, // Leaderboard will always replace score with specified
|
||||
@ -66,7 +70,8 @@ enum ELeaderboardUploadScoreMethod {
|
||||
#error steam_api_common.h should define VALVE_CALLBACK_PACK_xxx
|
||||
#endif
|
||||
|
||||
struct LeaderboardEntry_t {
|
||||
struct LeaderboardEntry_t
|
||||
{
|
||||
CSteamID m_steamIDUser; // user with the entry - use SteamFriends()->GetFriendPersonaName() & SteamFriends()->GetFriendAvatar() to get more info
|
||||
int32 m_nGlobalRank; // [1..N], where N is the number of users with an entry in the leaderboard
|
||||
int32 m_nScore; // score as set in the leaderboard
|
||||
@ -76,10 +81,12 @@ struct LeaderboardEntry_t {
|
||||
|
||||
#pragma pack( pop )
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Functions for accessing stats, achievements, and leaderboard information
|
||||
//-----------------------------------------------------------------------------
|
||||
class ISteamUserStats {
|
||||
class ISteamUserStats
|
||||
{
|
||||
public:
|
||||
// Ask the server to send down this user's data and achievements for this game
|
||||
STEAM_CALL_BACK( UserStatsReceived_t )
|
||||
@ -203,11 +210,9 @@ public:
|
||||
// as above, but downloads leaderboard entries for an arbitrary set of users - ELeaderboardDataRequest is k_ELeaderboardDataRequestUsers
|
||||
// if a user doesn't have a leaderboard entry, they won't be included in the result
|
||||
// a max of 100 users can be downloaded at a time, with only one outstanding call at a time
|
||||
STEAM_METHOD_DESC(Downloads leaderboard entries for an arbitrary set of users - ELeaderboardDataRequest is k_ELeaderboardDataRequestUsers)
|
||||
STEAM_CALL_RESULT( LeaderboardScoresDownloaded_t )
|
||||
virtual SteamAPICall_t DownloadLeaderboardEntriesForUsers( SteamLeaderboard_t hSteamLeaderboard,
|
||||
STEAM_ARRAY_COUNT_D(cUsers, Array of users to retrieve) CSteamID* prgUsers, int cUsers)
|
||||
= 0;
|
||||
STEAM_ARRAY_COUNT_D(cUsers, Array of users to retrieve) CSteamID *prgUsers, int cUsers ) = 0;
|
||||
|
||||
// Returns data about a single leaderboard entry
|
||||
// use a for loop from 0 to LeaderboardScoresDownloaded_t::m_cEntryCount to get all the downloaded entries
|
||||
@ -295,6 +300,7 @@ public:
|
||||
|
||||
STEAM_FLAT_NAME( GetAchievementProgressLimitsFloat )
|
||||
virtual bool GetAchievementProgressLimits( const char *pchName, float *pfMinProgress, float *pfMaxProgress ) = 0;
|
||||
|
||||
};
|
||||
|
||||
#define STEAMUSERSTATS_INTERFACE_VERSION "STEAMUSERSTATS_INTERFACE_VERSION012"
|
||||
@ -316,28 +322,33 @@ STEAM_DEFINE_USER_INTERFACE_ACCESSOR(ISteamUserStats*, SteamUserStats, STEAMUSER
|
||||
// Purpose: called when the latests stats and achievements have been received
|
||||
// from the server
|
||||
//-----------------------------------------------------------------------------
|
||||
struct UserStatsReceived_t {
|
||||
struct UserStatsReceived_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamUserStatsCallbacks + 1 };
|
||||
uint64 m_nGameID; // Game these stats are for
|
||||
EResult m_eResult; // Success / error fetching the stats
|
||||
CSteamID m_steamIDUser; // The user for whom the stats are retrieved for
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: result of a request to store the user stats for a game
|
||||
//-----------------------------------------------------------------------------
|
||||
struct UserStatsStored_t {
|
||||
struct UserStatsStored_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamUserStatsCallbacks + 2 };
|
||||
uint64 m_nGameID; // Game these stats are for
|
||||
EResult m_eResult; // success / error
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: result of a request to store the achievements for a game, or an
|
||||
// "indicate progress" call. If both m_nCurProgress and m_nMaxProgress
|
||||
// are zero, that means the achievement has been fully unlocked.
|
||||
//-----------------------------------------------------------------------------
|
||||
struct UserAchievementStored_t {
|
||||
struct UserAchievementStored_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamUserStatsCallbacks + 3 };
|
||||
|
||||
uint64 m_nGameID; // Game this is for
|
||||
@ -347,32 +358,38 @@ struct UserAchievementStored_t {
|
||||
uint32 m_nMaxProgress; // "out of" this many
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: call result for finding a leaderboard, returned as a result of FindOrCreateLeaderboard() or FindLeaderboard()
|
||||
// use CCallResult<> to map this async result to a member function
|
||||
//-----------------------------------------------------------------------------
|
||||
struct LeaderboardFindResult_t {
|
||||
struct LeaderboardFindResult_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamUserStatsCallbacks + 4 };
|
||||
SteamLeaderboard_t m_hSteamLeaderboard; // handle to the leaderboard serarched for, 0 if no leaderboard found
|
||||
uint8 m_bLeaderboardFound; // 0 if no leaderboard found
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: call result indicating scores for a leaderboard have been downloaded and are ready to be retrieved, returned as a result of DownloadLeaderboardEntries()
|
||||
// use CCallResult<> to map this async result to a member function
|
||||
//-----------------------------------------------------------------------------
|
||||
struct LeaderboardScoresDownloaded_t {
|
||||
struct LeaderboardScoresDownloaded_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamUserStatsCallbacks + 5 };
|
||||
SteamLeaderboard_t m_hSteamLeaderboard;
|
||||
SteamLeaderboardEntries_t m_hSteamLeaderboardEntries; // the handle to pass into GetDownloadedLeaderboardEntries()
|
||||
int m_cEntryCount; // the number of entries downloaded
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: call result indicating scores has been uploaded, returned as a result of UploadLeaderboardScore()
|
||||
// use CCallResult<> to map this async result to a member function
|
||||
//-----------------------------------------------------------------------------
|
||||
struct LeaderboardScoreUploaded_t {
|
||||
struct LeaderboardScoreUploaded_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamUserStatsCallbacks + 6 };
|
||||
uint8 m_bSuccess; // 1 if the call was successful
|
||||
SteamLeaderboard_t m_hSteamLeaderboard; // the leaderboard handle that was
|
||||
@ -382,25 +399,32 @@ struct LeaderboardScoreUploaded_t {
|
||||
int m_nGlobalRankPrevious; // the previous global rank of the user in this leaderboard; 0 if the user had no existing entry in the leaderboard
|
||||
};
|
||||
|
||||
struct NumberOfCurrentPlayers_t {
|
||||
struct NumberOfCurrentPlayers_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamUserStatsCallbacks + 7 };
|
||||
uint8 m_bSuccess; // 1 if the call was successful
|
||||
int32 m_cPlayers; // Number of players currently playing
|
||||
};
|
||||
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Callback indicating that a user's stats have been unloaded.
|
||||
// Call RequestUserStats again to access stats for this user
|
||||
//-----------------------------------------------------------------------------
|
||||
struct UserStatsUnloaded_t {
|
||||
struct UserStatsUnloaded_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamUserStatsCallbacks + 8 };
|
||||
CSteamID m_steamIDUser; // User whose stats have been unloaded
|
||||
};
|
||||
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Callback indicating that an achievement icon has been fetched
|
||||
//-----------------------------------------------------------------------------
|
||||
struct UserAchievementIconFetched_t {
|
||||
struct UserAchievementIconFetched_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamUserStatsCallbacks + 9 };
|
||||
|
||||
CGameID m_nGameID; // Game this is for
|
||||
@ -409,40 +433,49 @@ struct UserAchievementIconFetched_t {
|
||||
int m_nIconHandle; // Handle to the image, which can be used in SteamUtils()->GetImageRGBA(), 0 means no image is set for the achievement
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Callback indicating that global achievement percentages are fetched
|
||||
//-----------------------------------------------------------------------------
|
||||
struct GlobalAchievementPercentagesReady_t {
|
||||
struct GlobalAchievementPercentagesReady_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamUserStatsCallbacks + 10 };
|
||||
|
||||
uint64 m_nGameID; // Game this is for
|
||||
EResult m_eResult; // Result of the operation
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: call result indicating UGC has been uploaded, returned as a result of SetLeaderboardUGC()
|
||||
//-----------------------------------------------------------------------------
|
||||
struct LeaderboardUGCSet_t {
|
||||
struct LeaderboardUGCSet_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamUserStatsCallbacks + 11 };
|
||||
EResult m_eResult; // The result of the operation
|
||||
SteamLeaderboard_t m_hSteamLeaderboard; // the leaderboard handle that was
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: callback indicating that PS3 trophies have been installed
|
||||
//-----------------------------------------------------------------------------
|
||||
struct PS3TrophiesInstalled_t {
|
||||
struct PS3TrophiesInstalled_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamUserStatsCallbacks + 12 };
|
||||
uint64 m_nGameID; // Game these stats are for
|
||||
EResult m_eResult; // The result of the operation
|
||||
uint64 m_ulRequiredDiskSpace; // If m_eResult is k_EResultDiskFull, will contain the amount of space needed to install trophies
|
||||
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: callback indicating global stats have been received.
|
||||
// Returned as a result of RequestGlobalStats()
|
||||
//-----------------------------------------------------------------------------
|
||||
struct GlobalStatsReceived_t {
|
||||
struct GlobalStatsReceived_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamUserStatsCallbacks + 12 };
|
||||
uint64 m_nGameID; // Game global stats were requested for
|
||||
EResult m_eResult; // The result of the request
|
||||
@ -450,4 +483,5 @@ struct GlobalStatsReceived_t {
|
||||
|
||||
#pragma pack( pop )
|
||||
|
||||
|
||||
#endif // ISTEAMUSER_H
|
||||
|
@ -12,8 +12,10 @@
|
||||
|
||||
#include "steam_api_common.h"
|
||||
|
||||
|
||||
// Steam API call failure results
|
||||
enum ESteamAPICallFailure {
|
||||
enum ESteamAPICallFailure
|
||||
{
|
||||
k_ESteamAPICallFailureNone = -1, // no failure
|
||||
k_ESteamAPICallFailureSteamGone = 0, // the local Steam process has gone away
|
||||
k_ESteamAPICallFailureNetworkFailure = 1, // the network connection to Steam has been broken, or was already broken
|
||||
@ -23,26 +25,41 @@ enum ESteamAPICallFailure {
|
||||
k_ESteamAPICallFailureMismatchedCallback = 3,// GetAPICallResult() was called with the wrong callback type for this API call
|
||||
};
|
||||
|
||||
|
||||
// Input modes for the Big Picture gamepad text entry
|
||||
enum EGamepadTextInputMode {
|
||||
enum EGamepadTextInputMode
|
||||
{
|
||||
k_EGamepadTextInputModeNormal = 0,
|
||||
k_EGamepadTextInputModePassword = 1
|
||||
};
|
||||
|
||||
|
||||
// Controls number of allowed lines for the Big Picture gamepad text entry
|
||||
enum EGamepadTextInputLineMode {
|
||||
enum EGamepadTextInputLineMode
|
||||
{
|
||||
k_EGamepadTextInputLineModeSingleLine = 0,
|
||||
k_EGamepadTextInputLineModeMultipleLines = 1
|
||||
};
|
||||
|
||||
enum EFloatingGamepadTextInputMode
|
||||
{
|
||||
k_EFloatingGamepadTextInputModeModeSingleLine = 0, // Enter dismisses the keyboard
|
||||
k_EFloatingGamepadTextInputModeModeMultipleLines = 1, // User needs to explictly close the keyboard
|
||||
k_EFloatingGamepadTextInputModeModeEmail = 2,
|
||||
k_EFloatingGamepadTextInputModeModeNumeric = 3,
|
||||
|
||||
};
|
||||
|
||||
// The context where text filtering is being done
|
||||
enum ETextFilteringContext {
|
||||
enum ETextFilteringContext
|
||||
{
|
||||
k_ETextFilteringContextUnknown = 0, // Unknown context
|
||||
k_ETextFilteringContextGameContent = 1, // Game content, only legally required filtering is performed
|
||||
k_ETextFilteringContextChat = 2, // Chat from another player
|
||||
k_ETextFilteringContextName = 3, // Character or item name
|
||||
};
|
||||
|
||||
|
||||
// function prototype for warning message hook
|
||||
#if defined( POSIX )
|
||||
#define __cdecl
|
||||
@ -52,7 +69,8 @@ extern "C" typedef void(__cdecl* SteamAPIWarningMessageHook_t)(int, const char*)
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: interface to user independent utility functions
|
||||
//-----------------------------------------------------------------------------
|
||||
class ISteamUtils {
|
||||
class ISteamUtils
|
||||
{
|
||||
public:
|
||||
// return the number of seconds since the user
|
||||
virtual uint32 GetSecondsSinceAppActive() = 0;
|
||||
@ -136,7 +154,7 @@ public:
|
||||
STEAM_CALL_RESULT( CheckFileSignature_t )
|
||||
virtual SteamAPICall_t CheckFileSignature( const char *szFileName ) = 0;
|
||||
|
||||
// Activates the Big Picture text input dialog which only supports gamepad input
|
||||
// Activates the full-screen text input dialog which takes a initial text string and returns the text the user has typed
|
||||
virtual bool ShowGamepadTextInput( EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, const char *pchDescription, uint32 unCharMax, const char *pchExistingText ) = 0;
|
||||
|
||||
// Returns previously entered text & length
|
||||
@ -193,6 +211,16 @@ public:
|
||||
// Return what we believe your current ipv6 connectivity to "the internet" is on the specified protocol.
|
||||
// This does NOT tell you if the Steam client is currently connected to Steam via ipv6.
|
||||
virtual ESteamIPv6ConnectivityState GetIPv6ConnectivityState( ESteamIPv6ConnectivityProtocol eProtocol ) = 0;
|
||||
|
||||
// returns true if currently running on the Steam Deck device
|
||||
virtual bool IsSteamRunningOnSteamDeck() = 0;
|
||||
|
||||
// Opens a floating keyboard over the game content and sends OS keyboard keys directly to the game.
|
||||
// The text field position is specified in pixels relative the origin of the game window and is used to position the floating keyboard in a way that doesn't cover the text field
|
||||
virtual bool ShowFloatingGamepadTextInput( EFloatingGamepadTextInputMode eKeyboardMode, int nTextFieldXPosition, int nTextFieldYPosition, int nTextFieldWidth, int nTextFieldHeight ) = 0;
|
||||
|
||||
// In game launchers that don't have controller support you can call this to have Steam Input translate the controller input into mouse/kb to navigate the launcher
|
||||
virtual void SetGameLauncherMode( bool bLauncherMode ) = 0;
|
||||
};
|
||||
|
||||
#define STEAMUTILS_INTERFACE_VERSION "SteamUtils010"
|
||||
@ -217,39 +245,47 @@ STEAM_DEFINE_INTERFACE_ACCESSOR(ISteamUtils*, SteamGameServerUtils, SteamInterna
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: The country of the user changed
|
||||
//-----------------------------------------------------------------------------
|
||||
struct IPCountry_t {
|
||||
struct IPCountry_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamUtilsCallbacks + 1 };
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Fired when running on a laptop and less than 10 minutes of battery is left, fires then every minute
|
||||
//-----------------------------------------------------------------------------
|
||||
struct LowBatteryPower_t {
|
||||
struct LowBatteryPower_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamUtilsCallbacks + 2 };
|
||||
uint8 m_nMinutesBatteryLeft;
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: called when a SteamAsyncCall_t has completed (or failed)
|
||||
//-----------------------------------------------------------------------------
|
||||
struct SteamAPICallCompleted_t {
|
||||
struct SteamAPICallCompleted_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamUtilsCallbacks + 3 };
|
||||
SteamAPICall_t m_hAsyncCall;
|
||||
int m_iCallback;
|
||||
uint32 m_cubParam;
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// called when Steam wants to shutdown
|
||||
//-----------------------------------------------------------------------------
|
||||
struct SteamShutdown_t {
|
||||
struct SteamShutdown_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamUtilsCallbacks + 4 };
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// results for CheckFileSignature
|
||||
//-----------------------------------------------------------------------------
|
||||
enum ECheckFileSignature {
|
||||
enum ECheckFileSignature
|
||||
{
|
||||
k_ECheckFileSignatureInvalidSignature = 0,
|
||||
k_ECheckFileSignatureValidSignature = 1,
|
||||
k_ECheckFileSignatureFileNotFound = 2,
|
||||
@ -260,23 +296,40 @@ enum ECheckFileSignature {
|
||||
//-----------------------------------------------------------------------------
|
||||
// callback for CheckFileSignature
|
||||
//-----------------------------------------------------------------------------
|
||||
struct CheckFileSignature_t {
|
||||
struct CheckFileSignature_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamUtilsCallbacks + 5 };
|
||||
ECheckFileSignature m_eCheckFileSignature;
|
||||
};
|
||||
|
||||
|
||||
// k_iSteamUtilsCallbacks + 13 is taken
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Big Picture gamepad text input has been closed
|
||||
// Full Screen gamepad text input has been closed
|
||||
//-----------------------------------------------------------------------------
|
||||
struct GamepadTextInputDismissed_t {
|
||||
struct GamepadTextInputDismissed_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamUtilsCallbacks + 14 };
|
||||
bool m_bSubmitted; // true if user entered & accepted text (Call ISteamUtils::GetEnteredGamepadTextInput() for text), false if canceled input
|
||||
uint32 m_unSubmittedText;
|
||||
};
|
||||
|
||||
// k_iSteamUtilsCallbacks + 15 is taken
|
||||
// k_iSteamUtilsCallbacks + 15 through 35 are taken
|
||||
|
||||
STEAM_CALLBACK_BEGIN( AppResumingFromSuspend_t, k_iSteamUtilsCallbacks + 36 )
|
||||
STEAM_CALLBACK_END(0)
|
||||
|
||||
// k_iSteamUtilsCallbacks + 37 is taken
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// The floating on-screen keyboard has been closed
|
||||
//-----------------------------------------------------------------------------
|
||||
struct FloatingGamepadTextInputDismissed_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamUtilsCallbacks + 38 };
|
||||
};
|
||||
|
||||
#pragma pack( pop )
|
||||
|
||||
|
@ -21,11 +21,16 @@
|
||||
#error steam_api_common.h should define VALVE_CALLBACK_PACK_xxx
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Steam Video API
|
||||
//-----------------------------------------------------------------------------
|
||||
class ISteamVideo {
|
||||
class ISteamVideo
|
||||
{
|
||||
public:
|
||||
|
||||
// Get a URL suitable for streaming the given Video app ID's video
|
||||
virtual void GetVideoURL( AppId_t unVideoAppID ) = 0;
|
||||
|
||||
@ -50,11 +55,14 @@ STEAM_CALLBACK_MEMBER(1, AppId_t, m_unVideoAppID)
|
||||
STEAM_CALLBACK_MEMBER( 2, char, m_rgchURL[256] )
|
||||
STEAM_CALLBACK_END(3)
|
||||
|
||||
|
||||
STEAM_CALLBACK_BEGIN( GetOPFSettingsResult_t, k_iClientVideoCallbacks + 24 )
|
||||
STEAM_CALLBACK_MEMBER( 0, EResult, m_eResult )
|
||||
STEAM_CALLBACK_MEMBER( 1, AppId_t, m_unVideoAppID )
|
||||
STEAM_CALLBACK_END(2)
|
||||
|
||||
|
||||
#pragma pack( pop )
|
||||
|
||||
|
||||
#endif // ISTEAMVIDEO_H
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -37,7 +37,8 @@ const int k_cbMaxGameServerGameData = 2048;
|
||||
/// Actually, the name Key/Value is a bit misleading. The "key" is better
|
||||
/// understood as "filter operation code" and the "value" is the operand to this
|
||||
/// filter operation. The meaning of the operand depends upon the filter.
|
||||
struct MatchMakingKeyValuePair_t {
|
||||
struct MatchMakingKeyValuePair_t
|
||||
{
|
||||
MatchMakingKeyValuePair_t() { m_szKey[0] = m_szValue[0] = 0; }
|
||||
MatchMakingKeyValuePair_t( const char *pchKey, const char *pchValue )
|
||||
{
|
||||
@ -50,7 +51,9 @@ struct MatchMakingKeyValuePair_t {
|
||||
char m_szValue[ 256 ];
|
||||
};
|
||||
|
||||
enum EMatchMakingServerResponse {
|
||||
|
||||
enum EMatchMakingServerResponse
|
||||
{
|
||||
eServerResponded = 0,
|
||||
eServerFailedToRespond,
|
||||
eNoServersListedOnMasterServer // for the Internet query type, returned in response callback if no servers of this type match
|
||||
@ -58,14 +61,11 @@ enum EMatchMakingServerResponse {
|
||||
|
||||
// servernetadr_t is all the addressing info the serverbrowser needs to know about a game server,
|
||||
// namely: its IP, its connection port, and its query port.
|
||||
class servernetadr_t {
|
||||
public:
|
||||
servernetadr_t()
|
||||
: m_usConnectionPort(0)
|
||||
, m_usQueryPort(0)
|
||||
, m_unIP(0)
|
||||
class servernetadr_t
|
||||
{
|
||||
}
|
||||
public:
|
||||
|
||||
servernetadr_t() : m_usConnectionPort( 0 ), m_usQueryPort( 0 ), m_unIP( 0 ) {}
|
||||
|
||||
void Init( unsigned int ip, uint16 usQueryPort, uint16 usConnectionPort );
|
||||
#ifdef NETADR_H
|
||||
@ -97,6 +97,7 @@ public:
|
||||
m_unIP = that.m_unIP;
|
||||
}
|
||||
|
||||
|
||||
private:
|
||||
const char *ToString( uint32 unIP, uint16 usPort ) const;
|
||||
uint16 m_usConnectionPort; // (in HOST byte order)
|
||||
@ -104,6 +105,7 @@ private:
|
||||
uint32 m_unIP;
|
||||
};
|
||||
|
||||
|
||||
inline void servernetadr_t::Init( unsigned int ip, uint16 usQueryPort, uint16 usConnectionPort )
|
||||
{
|
||||
m_unIP = ip;
|
||||
@ -182,7 +184,8 @@ inline bool servernetadr_t::operator<(const servernetadr_t& netadr) const
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Data describing a single server
|
||||
//-----------------------------------------------------------------------------
|
||||
class gameserveritem_t {
|
||||
class gameserveritem_t
|
||||
{
|
||||
public:
|
||||
gameserveritem_t();
|
||||
|
||||
@ -207,6 +210,7 @@ public:
|
||||
int m_nServerVersion; ///< server version as reported to Steam
|
||||
|
||||
private:
|
||||
|
||||
/// Game server name
|
||||
char m_szServerName[k_cbMaxGameServerName];
|
||||
|
||||
@ -219,6 +223,7 @@ public:
|
||||
CSteamID m_steamID;
|
||||
};
|
||||
|
||||
|
||||
inline gameserveritem_t::gameserveritem_t()
|
||||
{
|
||||
m_szGameDir[0] = m_szMap[0] = m_szGameDescription[0] = m_szServerName[0] = 0;
|
||||
@ -242,4 +247,5 @@ inline void gameserveritem_t::SetName(const char* pName)
|
||||
m_szServerName[ sizeof( m_szServerName ) - 1 ] = '\0';
|
||||
}
|
||||
|
||||
|
||||
#endif // MATCHMAKINGTYPES_H
|
||||
|
@ -21,31 +21,32 @@
|
||||
#include "steam_api_common.h"
|
||||
|
||||
// All of the interfaces
|
||||
#include "isteamapplist.h"
|
||||
#include "isteamapps.h"
|
||||
#include "isteamclient.h"
|
||||
#include "isteamcontroller.h"
|
||||
#include "isteamuser.h"
|
||||
#include "isteamfriends.h"
|
||||
#include "isteamhtmlsurface.h"
|
||||
#include "isteamhttp.h"
|
||||
#include "isteaminput.h"
|
||||
#include "isteaminventory.h"
|
||||
#include "isteamutils.h"
|
||||
#include "isteammatchmaking.h"
|
||||
#include "isteamuserstats.h"
|
||||
#include "isteamapps.h"
|
||||
#include "isteamnetworking.h"
|
||||
#include "isteamremotestorage.h"
|
||||
#include "isteamscreenshots.h"
|
||||
#include "isteammusic.h"
|
||||
#include "isteammusicremote.h"
|
||||
#include "isteamnetworking.h"
|
||||
#include "isteamhttp.h"
|
||||
#include "isteamcontroller.h"
|
||||
#include "isteamugc.h"
|
||||
#include "isteamapplist.h"
|
||||
#include "isteamhtmlsurface.h"
|
||||
#include "isteaminventory.h"
|
||||
#include "isteamvideo.h"
|
||||
#include "isteamparentalsettings.h"
|
||||
#include "isteaminput.h"
|
||||
#include "isteamremoteplay.h"
|
||||
#include "isteamnetworkingmessages.h"
|
||||
#include "isteamnetworkingsockets.h"
|
||||
#include "isteamnetworkingutils.h"
|
||||
#include "isteamparentalsettings.h"
|
||||
#include "isteamremoteplay.h"
|
||||
#include "isteamremotestorage.h"
|
||||
#include "isteamscreenshots.h"
|
||||
#include "isteamugc.h"
|
||||
#include "isteamuser.h"
|
||||
#include "isteamuserstats.h"
|
||||
#include "isteamutils.h"
|
||||
#include "isteamvideo.h"
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------------------------------------------------------------------------------------//
|
||||
// Steam API setup & shutdown
|
||||
@ -54,6 +55,7 @@
|
||||
//
|
||||
//----------------------------------------------------------------------------------------------------------------------------------------------------------//
|
||||
|
||||
|
||||
// SteamAPI_Init must be called before using any other API functions. If it fails, an
|
||||
// error message will be output to the debugger (or stderr) with further information.
|
||||
S_API bool S_CALLTYPE SteamAPI_Init();
|
||||
@ -79,6 +81,7 @@ S_API bool S_CALLTYPE SteamAPI_RestartAppIfNecessary(uint32 unOwnAppID);
|
||||
// program never needs to explicitly call this function.
|
||||
S_API void S_CALLTYPE SteamAPI_ReleaseCurrentThreadMemory();
|
||||
|
||||
|
||||
// crash dump recording functions
|
||||
S_API void S_CALLTYPE SteamAPI_WriteMiniDump( uint32 uStructuredExceptionCode, void* pvExceptionInfo, uint32 uBuildID );
|
||||
S_API void S_CALLTYPE SteamAPI_SetMiniDumpComment( const char *pchMsg );
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -13,8 +13,8 @@
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
#include "steamclientpublic.h"
|
||||
#include "steamtypes.h"
|
||||
#include "steamclientpublic.h"
|
||||
|
||||
// S_API defines the linkage and calling conventions for steam_api.dll exports
|
||||
#if defined( _WIN32 ) && !defined( _X360 )
|
||||
@ -44,9 +44,7 @@
|
||||
#elif defined(STEAM_API_EXPORTS) && defined(API_GEN)
|
||||
#define STEAM_PRIVATE_API( ... )
|
||||
#else
|
||||
#define STEAM_PRIVATE_API(...) \
|
||||
protected: \
|
||||
__VA_ARGS__ public:
|
||||
#define STEAM_PRIVATE_API( ... ) protected: __VA_ARGS__ public:
|
||||
#endif
|
||||
|
||||
// handle to a communication pipe to the Steam client
|
||||
@ -106,8 +104,7 @@ S_API void S_CALLTYPE SteamAPI_RunCallbacks();
|
||||
// Declares a callback function and a named CCallbackManual variable which
|
||||
// has Register and Unregister functions instead of automatic registration.
|
||||
#define STEAM_CALLBACK_MANUAL( thisclass, func, callback_type, var ) \
|
||||
CCallbackManual<thisclass, callback_type> var; \
|
||||
void func(callback_type* pParam)
|
||||
CCallbackManual< thisclass, callback_type > var; void func( callback_type *pParam )
|
||||
|
||||
// Dispatch callbacks relevant to the gameserver client and interfaces.
|
||||
// To register for these, you need to use STEAM_GAMESERVER_CALLBACK.
|
||||
@ -119,19 +116,15 @@ S_API void S_CALLTYPE SteamGameServer_RunCallbacks();
|
||||
#define STEAM_GAMESERVER_CALLBACK( thisclass, func, /*callback_type, [deprecated] var*/... ) \
|
||||
_STEAM_CALLBACK_SELECT( ( __VA_ARGS__, GS, 3 ), ( this->SetGameserverFlag();, thisclass, func, __VA_ARGS__ ) )
|
||||
#define STEAM_GAMESERVER_CALLBACK_MANUAL( thisclass, func, callback_type, var ) \
|
||||
CCallbackManual<thisclass, callback_type, true> var; \
|
||||
void func(callback_type* pParam)
|
||||
CCallbackManual< thisclass, callback_type, true > var; void func( callback_type *pParam )
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: base for callbacks and call results - internal implementation detail
|
||||
//-----------------------------------------------------------------------------
|
||||
class CCallbackBase {
|
||||
public:
|
||||
CCallbackBase()
|
||||
class CCallbackBase
|
||||
{
|
||||
m_nCallbackFlags = 0;
|
||||
m_iCallback = 0;
|
||||
}
|
||||
public:
|
||||
CCallbackBase() { m_nCallbackFlags = 0; m_iCallback = 0; }
|
||||
// don't add a virtual destructor because we export this binary interface across dll's
|
||||
virtual void Run( void *pvParam ) = 0;
|
||||
virtual void Run( void *pvParam, bool bIOFailure, SteamAPICall_t hSteamAPICall ) = 0;
|
||||
@ -139,8 +132,7 @@ public:
|
||||
virtual int GetCallbackSizeBytes() = 0;
|
||||
|
||||
protected:
|
||||
enum { k_ECallbackFlagsRegistered = 0x01,
|
||||
k_ECallbackFlagsGameServer = 0x02 };
|
||||
enum { k_ECallbackFlagsRegistered = 0x01, k_ECallbackFlagsGameServer = 0x02 };
|
||||
uint8 m_nCallbackFlags;
|
||||
int m_iCallback;
|
||||
friend class CCallbackMgr;
|
||||
@ -154,13 +146,10 @@ private:
|
||||
// Purpose: templated base for callbacks - internal implementation detail
|
||||
//-----------------------------------------------------------------------------
|
||||
template< int sizeof_P >
|
||||
class CCallbackImpl : protected CCallbackBase {
|
||||
public:
|
||||
virtual ~CCallbackImpl()
|
||||
class CCallbackImpl : protected CCallbackBase
|
||||
{
|
||||
if (m_nCallbackFlags & k_ECallbackFlagsRegistered)
|
||||
SteamAPI_UnregisterCallback(this);
|
||||
}
|
||||
public:
|
||||
virtual ~CCallbackImpl() { if ( m_nCallbackFlags & k_ECallbackFlagsRegistered ) SteamAPI_UnregisterCallback( this ); }
|
||||
void SetGameserverFlag() { m_nCallbackFlags |= k_ECallbackFlagsGameServer; }
|
||||
|
||||
protected:
|
||||
@ -170,12 +159,14 @@ protected:
|
||||
virtual int GetCallbackSizeBytes() { return sizeof_P; }
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: maps a steam async call result to a class member function
|
||||
// template params: T = local class, P = parameter struct
|
||||
//-----------------------------------------------------------------------------
|
||||
template< class T, class P >
|
||||
class CCallResult : private CCallbackBase {
|
||||
class CCallResult : private CCallbackBase
|
||||
{
|
||||
public:
|
||||
typedef void (T::*func_t)( P*, bool );
|
||||
|
||||
@ -187,7 +178,6 @@ public:
|
||||
void Cancel();
|
||||
|
||||
void SetGameserverFlag() { m_nCallbackFlags |= k_ECallbackFlagsGameServer; }
|
||||
|
||||
private:
|
||||
virtual void Run( void *pvParam );
|
||||
virtual void Run( void *pvParam, bool bIOFailure, SteamAPICall_t hSteamAPICall );
|
||||
@ -198,13 +188,16 @@ private:
|
||||
func_t m_Func;
|
||||
};
|
||||
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: maps a steam callback to a class member function
|
||||
// template params: T = local class, P = parameter struct,
|
||||
// bGameserver = listen for gameserver callbacks instead of client callbacks
|
||||
//-----------------------------------------------------------------------------
|
||||
template< class T, class P, bool bGameserver = false >
|
||||
class CCallback : public CCallbackImpl<sizeof(P)> {
|
||||
class CCallback : public CCallbackImpl< sizeof( P ) >
|
||||
{
|
||||
public:
|
||||
typedef void (T::*func_t)(P*);
|
||||
|
||||
@ -222,17 +215,16 @@ protected:
|
||||
func_t m_Func;
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: subclass of CCallback which allows default-construction in
|
||||
// an unregistered state; you must call Register manually
|
||||
//-----------------------------------------------------------------------------
|
||||
template< class T, class P, bool bGameServer = false >
|
||||
class CCallbackManual : public CCallback<T, P, bGameServer> {
|
||||
public:
|
||||
CCallbackManual()
|
||||
: CCallback<T, P, bGameServer>(nullptr, nullptr)
|
||||
class CCallbackManual : public CCallback< T, P, bGameServer >
|
||||
{
|
||||
}
|
||||
public:
|
||||
CCallbackManual() : CCallback< T, P, bGameServer >( nullptr, nullptr ) {}
|
||||
|
||||
// Inherits public Register and Unregister functions from base class
|
||||
};
|
||||
|
@ -8,13 +8,15 @@
|
||||
#ifndef STEAMAPIFLAT_H
|
||||
#define STEAMAPIFLAT_H
|
||||
|
||||
#include "steam/steam_api.h"
|
||||
#include "steam/isteamgameserver.h"
|
||||
#include "steam/isteamgameserverstats.h"
|
||||
#include "steam/steam_api.h"
|
||||
|
||||
typedef uint64 uint64_steamid; // Used when passing or returning CSteamID
|
||||
typedef uint64 uint64_gameid; // Used when passing or return CGameID
|
||||
|
||||
|
||||
|
||||
// ISteamClient
|
||||
S_API HSteamPipe SteamAPI_ISteamClient_CreateSteamPipe( ISteamClient* self );
|
||||
S_API bool SteamAPI_ISteamClient_BReleaseSteamPipe( ISteamClient* self, HSteamPipe hSteamPipe );
|
||||
@ -58,8 +60,8 @@ S_API ISteamUser* SteamAPI_SteamUser_v021();
|
||||
S_API HSteamUser SteamAPI_ISteamUser_GetHSteamUser( ISteamUser* self );
|
||||
S_API bool SteamAPI_ISteamUser_BLoggedOn( ISteamUser* self );
|
||||
S_API uint64_steamid SteamAPI_ISteamUser_GetSteamID( ISteamUser* self );
|
||||
S_API int SteamAPI_ISteamUser_InitiateGameConnection(ISteamUser* self, void* pAuthBlob, int cbMaxAuthBlob, uint64_steamid steamIDGameServer, uint32 unIPServer, uint16 usPortServer, bool bSecure);
|
||||
S_API void SteamAPI_ISteamUser_TerminateGameConnection(ISteamUser* self, uint32 unIPServer, uint16 usPortServer);
|
||||
S_API int SteamAPI_ISteamUser_InitiateGameConnection_DEPRECATED( ISteamUser* self, void * pAuthBlob, int cbMaxAuthBlob, uint64_steamid steamIDGameServer, uint32 unIPServer, uint16 usPortServer, bool bSecure );
|
||||
S_API void SteamAPI_ISteamUser_TerminateGameConnection_DEPRECATED( ISteamUser* self, uint32 unIPServer, uint16 usPortServer );
|
||||
S_API void SteamAPI_ISteamUser_TrackAppUsageEvent( ISteamUser* self, uint64_gameid gameID, int eAppUsageEvent, const char * pchExtraInfo );
|
||||
S_API bool SteamAPI_ISteamUser_GetUserDataFolder( ISteamUser* self, char * pchBuffer, int cubBuffer );
|
||||
S_API void SteamAPI_ISteamUser_StartVoiceRecording( ISteamUser* self );
|
||||
@ -202,6 +204,9 @@ S_API bool SteamAPI_ISteamUtils_IsSteamChinaLauncher(ISteamUtils* self);
|
||||
S_API bool SteamAPI_ISteamUtils_InitFilterText( ISteamUtils* self, uint32 unFilterOptions );
|
||||
S_API int SteamAPI_ISteamUtils_FilterText( ISteamUtils* self, ETextFilteringContext eContext, uint64_steamid sourceSteamID, const char * pchInputMessage, char * pchOutFilteredText, uint32 nByteSizeOutFilteredText );
|
||||
S_API ESteamIPv6ConnectivityState SteamAPI_ISteamUtils_GetIPv6ConnectivityState( ISteamUtils* self, ESteamIPv6ConnectivityProtocol eProtocol );
|
||||
S_API bool SteamAPI_ISteamUtils_IsSteamRunningOnSteamDeck( ISteamUtils* self );
|
||||
S_API bool SteamAPI_ISteamUtils_ShowModalGamepadTextInput( ISteamUtils* self, EGamepadTextInputLineMode eLineInputMode );
|
||||
S_API void SteamAPI_ISteamUtils_SetGameLauncherMode( ISteamUtils* self, bool bLauncherMode );
|
||||
|
||||
// ISteamMatchmaking
|
||||
S_API ISteamMatchmaking *SteamAPI_SteamMatchmaking_v009();
|
||||
@ -316,7 +321,7 @@ S_API bool SteamAPI_ISteamParties_DestroyBeacon(ISteamParties* self, PartyBeacon
|
||||
S_API bool SteamAPI_ISteamParties_GetBeaconLocationData( ISteamParties* self, SteamPartyBeaconLocation_t BeaconLocation, ESteamPartyBeaconLocationData eData, char * pchDataStringOut, int cchDataStringOut );
|
||||
|
||||
// ISteamRemoteStorage
|
||||
S_API ISteamRemoteStorage* SteamAPI_SteamRemoteStorage_v014();
|
||||
S_API ISteamRemoteStorage *SteamAPI_SteamRemoteStorage_v016();
|
||||
S_API bool SteamAPI_ISteamRemoteStorage_FileWrite( ISteamRemoteStorage* self, const char * pchFile, const void * pvData, int32 cubData );
|
||||
S_API int32 SteamAPI_ISteamRemoteStorage_FileRead( ISteamRemoteStorage* self, const char * pchFile, void * pvData, int32 cubDataToRead );
|
||||
S_API SteamAPICall_t SteamAPI_ISteamRemoteStorage_FileWriteAsync( ISteamRemoteStorage* self, const char * pchFile, const void * pvData, uint32 cubData );
|
||||
@ -372,6 +377,10 @@ S_API SteamAPICall_t SteamAPI_ISteamRemoteStorage_SetUserPublishedFileAction(ISt
|
||||
S_API SteamAPICall_t SteamAPI_ISteamRemoteStorage_EnumeratePublishedFilesByUserAction( ISteamRemoteStorage* self, EWorkshopFileAction eAction, uint32 unStartIndex );
|
||||
S_API SteamAPICall_t SteamAPI_ISteamRemoteStorage_EnumeratePublishedWorkshopFiles( ISteamRemoteStorage* self, EWorkshopEnumerationType eEnumerationType, uint32 unStartIndex, uint32 unCount, uint32 unDays, SteamParamStringArray_t * pTags, SteamParamStringArray_t * pUserTags );
|
||||
S_API SteamAPICall_t SteamAPI_ISteamRemoteStorage_UGCDownloadToLocation( ISteamRemoteStorage* self, UGCHandle_t hContent, const char * pchLocation, uint32 unPriority );
|
||||
S_API int32 SteamAPI_ISteamRemoteStorage_GetLocalFileChangeCount( ISteamRemoteStorage* self );
|
||||
S_API const char * SteamAPI_ISteamRemoteStorage_GetLocalFileChange( ISteamRemoteStorage* self, int iFile, ERemoteStorageLocalFileChange * pEChangeType, ERemoteStorageFilePathType * pEFilePathType );
|
||||
S_API bool SteamAPI_ISteamRemoteStorage_BeginFileWriteBatch( ISteamRemoteStorage* self );
|
||||
S_API bool SteamAPI_ISteamRemoteStorage_EndFileWriteBatch( ISteamRemoteStorage* self );
|
||||
|
||||
// ISteamUserStats
|
||||
S_API ISteamUserStats *SteamAPI_SteamUserStats_v012();
|
||||
@ -423,7 +432,6 @@ S_API bool SteamAPI_ISteamUserStats_GetAchievementProgressLimitsFloat(ISteamUser
|
||||
|
||||
// ISteamApps
|
||||
S_API ISteamApps *SteamAPI_SteamApps_v008();
|
||||
S_API ISteamApps* SteamAPI_SteamGameServerApps_v008();
|
||||
S_API bool SteamAPI_ISteamApps_BIsSubscribed( ISteamApps* self );
|
||||
S_API bool SteamAPI_ISteamApps_BIsLowViolence( ISteamApps* self );
|
||||
S_API bool SteamAPI_ISteamApps_BIsCybercafe( ISteamApps* self );
|
||||
@ -569,11 +577,16 @@ S_API bool SteamAPI_ISteamHTTP_SetHTTPRequestAbsoluteTimeoutMS(ISteamHTTP* self,
|
||||
S_API bool SteamAPI_ISteamHTTP_GetHTTPRequestWasTimedOut( ISteamHTTP* self, HTTPRequestHandle hRequest, bool * pbWasTimedOut );
|
||||
|
||||
// ISteamInput
|
||||
S_API ISteamInput* SteamAPI_SteamInput_v002();
|
||||
S_API bool SteamAPI_ISteamInput_Init(ISteamInput* self);
|
||||
S_API ISteamInput *SteamAPI_SteamInput_v005();
|
||||
S_API bool SteamAPI_ISteamInput_Init( ISteamInput* self, bool bExplicitlyCallRunFrame );
|
||||
S_API bool SteamAPI_ISteamInput_Shutdown( ISteamInput* self );
|
||||
S_API void SteamAPI_ISteamInput_RunFrame(ISteamInput* self);
|
||||
S_API bool SteamAPI_ISteamInput_SetInputActionManifestFilePath( ISteamInput* self, const char * pchInputActionManifestAbsolutePath );
|
||||
S_API void SteamAPI_ISteamInput_RunFrame( ISteamInput* self, bool bReservedValue );
|
||||
S_API bool SteamAPI_ISteamInput_BWaitForData( ISteamInput* self, bool bWaitForever, uint32 unTimeout );
|
||||
S_API bool SteamAPI_ISteamInput_BNewDataAvailable( ISteamInput* self );
|
||||
S_API int SteamAPI_ISteamInput_GetConnectedControllers( ISteamInput* self, InputHandle_t * handlesOut );
|
||||
S_API void SteamAPI_ISteamInput_EnableDeviceCallbacks( ISteamInput* self );
|
||||
S_API void SteamAPI_ISteamInput_EnableActionEventCallbacks( ISteamInput* self, SteamInputActionEventCallbackPointer pCallback );
|
||||
S_API InputActionSetHandle_t SteamAPI_ISteamInput_GetActionSetHandle( ISteamInput* self, const char * pszActionSetName );
|
||||
S_API void SteamAPI_ISteamInput_ActivateActionSet( ISteamInput* self, InputHandle_t inputHandle, InputActionSetHandle_t actionSetHandle );
|
||||
S_API InputActionSetHandle_t SteamAPI_ISteamInput_GetCurrentActionSet( ISteamInput* self, InputHandle_t inputHandle );
|
||||
@ -584,17 +597,23 @@ S_API int SteamAPI_ISteamInput_GetActiveActionSetLayers(ISteamInput* self, Input
|
||||
S_API InputDigitalActionHandle_t SteamAPI_ISteamInput_GetDigitalActionHandle( ISteamInput* self, const char * pszActionName );
|
||||
S_API InputDigitalActionData_t SteamAPI_ISteamInput_GetDigitalActionData( ISteamInput* self, InputHandle_t inputHandle, InputDigitalActionHandle_t digitalActionHandle );
|
||||
S_API int SteamAPI_ISteamInput_GetDigitalActionOrigins( ISteamInput* self, InputHandle_t inputHandle, InputActionSetHandle_t actionSetHandle, InputDigitalActionHandle_t digitalActionHandle, EInputActionOrigin * originsOut );
|
||||
S_API const char * SteamAPI_ISteamInput_GetStringForDigitalActionName( ISteamInput* self, InputDigitalActionHandle_t eActionHandle );
|
||||
S_API InputAnalogActionHandle_t SteamAPI_ISteamInput_GetAnalogActionHandle( ISteamInput* self, const char * pszActionName );
|
||||
S_API InputAnalogActionData_t SteamAPI_ISteamInput_GetAnalogActionData( ISteamInput* self, InputHandle_t inputHandle, InputAnalogActionHandle_t analogActionHandle );
|
||||
S_API int SteamAPI_ISteamInput_GetAnalogActionOrigins( ISteamInput* self, InputHandle_t inputHandle, InputActionSetHandle_t actionSetHandle, InputAnalogActionHandle_t analogActionHandle, EInputActionOrigin * originsOut );
|
||||
S_API const char* SteamAPI_ISteamInput_GetGlyphForActionOrigin(ISteamInput* self, EInputActionOrigin eOrigin);
|
||||
S_API const char * SteamAPI_ISteamInput_GetGlyphPNGForActionOrigin( ISteamInput* self, EInputActionOrigin eOrigin, ESteamInputGlyphSize eSize, uint32 unFlags );
|
||||
S_API const char * SteamAPI_ISteamInput_GetGlyphSVGForActionOrigin( ISteamInput* self, EInputActionOrigin eOrigin, uint32 unFlags );
|
||||
S_API const char * SteamAPI_ISteamInput_GetGlyphForActionOrigin_Legacy( ISteamInput* self, EInputActionOrigin eOrigin );
|
||||
S_API const char * SteamAPI_ISteamInput_GetStringForActionOrigin( ISteamInput* self, EInputActionOrigin eOrigin );
|
||||
S_API const char * SteamAPI_ISteamInput_GetStringForAnalogActionName( ISteamInput* self, InputAnalogActionHandle_t eActionHandle );
|
||||
S_API void SteamAPI_ISteamInput_StopAnalogActionMomentum( ISteamInput* self, InputHandle_t inputHandle, InputAnalogActionHandle_t eAction );
|
||||
S_API InputMotionData_t SteamAPI_ISteamInput_GetMotionData( ISteamInput* self, InputHandle_t inputHandle );
|
||||
S_API void SteamAPI_ISteamInput_TriggerVibration( ISteamInput* self, InputHandle_t inputHandle, unsigned short usLeftSpeed, unsigned short usRightSpeed );
|
||||
S_API void SteamAPI_ISteamInput_TriggerVibrationExtended( ISteamInput* self, InputHandle_t inputHandle, unsigned short usLeftSpeed, unsigned short usRightSpeed, unsigned short usLeftTriggerSpeed, unsigned short usRightTriggerSpeed );
|
||||
S_API void SteamAPI_ISteamInput_TriggerSimpleHapticEvent( ISteamInput* self, InputHandle_t inputHandle, EControllerHapticLocation eHapticLocation, uint8 nIntensity, char nGainDB, uint8 nOtherIntensity, char nOtherGainDB );
|
||||
S_API void SteamAPI_ISteamInput_SetLEDColor( ISteamInput* self, InputHandle_t inputHandle, uint8 nColorR, uint8 nColorG, uint8 nColorB, unsigned int nFlags );
|
||||
S_API void SteamAPI_ISteamInput_TriggerHapticPulse(ISteamInput* self, InputHandle_t inputHandle, ESteamControllerPad eTargetPad, unsigned short usDurationMicroSec);
|
||||
S_API void SteamAPI_ISteamInput_TriggerRepeatedHapticPulse(ISteamInput* self, InputHandle_t inputHandle, ESteamControllerPad eTargetPad, unsigned short usDurationMicroSec, unsigned short usOffMicroSec, unsigned short unRepeat, unsigned int nFlags);
|
||||
S_API void SteamAPI_ISteamInput_Legacy_TriggerHapticPulse( ISteamInput* self, InputHandle_t inputHandle, ESteamControllerPad eTargetPad, unsigned short usDurationMicroSec );
|
||||
S_API void SteamAPI_ISteamInput_Legacy_TriggerRepeatedHapticPulse( ISteamInput* self, InputHandle_t inputHandle, ESteamControllerPad eTargetPad, unsigned short usDurationMicroSec, unsigned short usOffMicroSec, unsigned short unRepeat, unsigned int nFlags );
|
||||
S_API bool SteamAPI_ISteamInput_ShowBindingPanel( ISteamInput* self, InputHandle_t inputHandle );
|
||||
S_API ESteamInputType SteamAPI_ISteamInput_GetInputTypeForHandle( ISteamInput* self, InputHandle_t inputHandle );
|
||||
S_API InputHandle_t SteamAPI_ISteamInput_GetControllerForGamepadIndex( ISteamInput* self, int nIndex );
|
||||
@ -605,6 +624,7 @@ S_API EInputActionOrigin SteamAPI_ISteamInput_GetActionOriginFromXboxOrigin(ISte
|
||||
S_API EInputActionOrigin SteamAPI_ISteamInput_TranslateActionOrigin( ISteamInput* self, ESteamInputType eDestinationInputType, EInputActionOrigin eSourceOrigin );
|
||||
S_API bool SteamAPI_ISteamInput_GetDeviceBindingRevision( ISteamInput* self, InputHandle_t inputHandle, int * pMajor, int * pMinor );
|
||||
S_API uint32 SteamAPI_ISteamInput_GetRemotePlaySessionID( ISteamInput* self, InputHandle_t inputHandle );
|
||||
S_API uint16 SteamAPI_ISteamInput_GetSessionInputConfigurationSettings( ISteamInput* self );
|
||||
|
||||
// ISteamController
|
||||
S_API ISteamController *SteamAPI_SteamController_v008();
|
||||
@ -728,6 +748,8 @@ S_API SteamAPICall_t SteamAPI_ISteamUGC_AddAppDependency(ISteamUGC* self, Publis
|
||||
S_API SteamAPICall_t SteamAPI_ISteamUGC_RemoveAppDependency( ISteamUGC* self, PublishedFileId_t nPublishedFileID, AppId_t nAppID );
|
||||
S_API SteamAPICall_t SteamAPI_ISteamUGC_GetAppDependencies( ISteamUGC* self, PublishedFileId_t nPublishedFileID );
|
||||
S_API SteamAPICall_t SteamAPI_ISteamUGC_DeleteItem( ISteamUGC* self, PublishedFileId_t nPublishedFileID );
|
||||
S_API bool SteamAPI_ISteamUGC_ShowWorkshopEULA( ISteamUGC* self );
|
||||
S_API SteamAPICall_t SteamAPI_ISteamUGC_GetWorkshopEULAStatus( ISteamUGC* self );
|
||||
|
||||
// ISteamAppList
|
||||
S_API ISteamAppList *SteamAPI_SteamAppList_v001();
|
||||
@ -856,8 +878,8 @@ S_API bool SteamAPI_ISteamNetworkingMessages_CloseChannelWithUser(ISteamNetworki
|
||||
S_API ESteamNetworkingConnectionState SteamAPI_ISteamNetworkingMessages_GetSessionConnectionInfo( ISteamNetworkingMessages* self, const SteamNetworkingIdentity & identityRemote, SteamNetConnectionInfo_t * pConnectionInfo, SteamNetworkingQuickConnectionStatus * pQuickStatus );
|
||||
|
||||
// ISteamNetworkingSockets
|
||||
S_API ISteamNetworkingSockets* SteamAPI_SteamNetworkingSockets_SteamAPI_v009();
|
||||
S_API ISteamNetworkingSockets* SteamAPI_SteamGameServerNetworkingSockets_SteamAPI_v009();
|
||||
S_API ISteamNetworkingSockets *SteamAPI_SteamNetworkingSockets_SteamAPI_v011();
|
||||
S_API ISteamNetworkingSockets *SteamAPI_SteamGameServerNetworkingSockets_SteamAPI_v011();
|
||||
S_API HSteamListenSocket SteamAPI_ISteamNetworkingSockets_CreateListenSocketIP( ISteamNetworkingSockets* self, const SteamNetworkingIPAddr & localAddress, int nOptions, const SteamNetworkingConfigValue_t * pOptions );
|
||||
S_API HSteamNetConnection SteamAPI_ISteamNetworkingSockets_ConnectByIPAddress( ISteamNetworkingSockets* self, const SteamNetworkingIPAddr & address, int nOptions, const SteamNetworkingConfigValue_t * pOptions );
|
||||
S_API HSteamListenSocket SteamAPI_ISteamNetworkingSockets_CreateListenSocketP2P( ISteamNetworkingSockets* self, int nLocalVirtualPort, int nOptions, const SteamNetworkingConfigValue_t * pOptions );
|
||||
@ -897,10 +919,11 @@ S_API HSteamNetConnection SteamAPI_ISteamNetworkingSockets_ConnectP2PCustomSigna
|
||||
S_API bool SteamAPI_ISteamNetworkingSockets_ReceivedP2PCustomSignal( ISteamNetworkingSockets* self, const void * pMsg, int cbMsg, ISteamNetworkingSignalingRecvContext * pContext );
|
||||
S_API bool SteamAPI_ISteamNetworkingSockets_GetCertificateRequest( ISteamNetworkingSockets* self, int * pcbBlob, void * pBlob, SteamNetworkingErrMsg & errMsg );
|
||||
S_API bool SteamAPI_ISteamNetworkingSockets_SetCertificate( ISteamNetworkingSockets* self, const void * pCertificate, int cbCertificate, SteamNetworkingErrMsg & errMsg );
|
||||
S_API void SteamAPI_ISteamNetworkingSockets_ResetIdentity( ISteamNetworkingSockets* self, const SteamNetworkingIdentity * pIdentity );
|
||||
S_API void SteamAPI_ISteamNetworkingSockets_RunCallbacks( ISteamNetworkingSockets* self );
|
||||
|
||||
// ISteamNetworkingUtils
|
||||
S_API ISteamNetworkingUtils* SteamAPI_SteamNetworkingUtils_SteamAPI_v003();
|
||||
S_API ISteamNetworkingUtils *SteamAPI_SteamNetworkingUtils_SteamAPI_v004();
|
||||
S_API SteamNetworkingMessage_t * SteamAPI_ISteamNetworkingUtils_AllocateMessage( ISteamNetworkingUtils* self, int cbAllocateBuffer );
|
||||
S_API void SteamAPI_ISteamNetworkingUtils_InitRelayNetworkAccess( ISteamNetworkingUtils* self );
|
||||
S_API ESteamNetworkingAvailability SteamAPI_ISteamNetworkingUtils_GetRelayNetworkStatus( ISteamNetworkingUtils* self, SteamRelayNetworkStatus_t * pDetails );
|
||||
@ -931,15 +954,15 @@ S_API bool SteamAPI_ISteamNetworkingUtils_SetGlobalCallback_MessagesSessionFaile
|
||||
S_API bool SteamAPI_ISteamNetworkingUtils_SetConfigValue( ISteamNetworkingUtils* self, ESteamNetworkingConfigValue eValue, ESteamNetworkingConfigScope eScopeType, intptr_t scopeObj, ESteamNetworkingConfigDataType eDataType, const void * pArg );
|
||||
S_API bool SteamAPI_ISteamNetworkingUtils_SetConfigValueStruct( ISteamNetworkingUtils* self, const SteamNetworkingConfigValue_t & opt, ESteamNetworkingConfigScope eScopeType, intptr_t scopeObj );
|
||||
S_API ESteamNetworkingGetConfigValueResult SteamAPI_ISteamNetworkingUtils_GetConfigValue( ISteamNetworkingUtils* self, ESteamNetworkingConfigValue eValue, ESteamNetworkingConfigScope eScopeType, intptr_t scopeObj, ESteamNetworkingConfigDataType * pOutDataType, void * pResult, size_t * cbResult );
|
||||
S_API bool SteamAPI_ISteamNetworkingUtils_GetConfigValueInfo(ISteamNetworkingUtils* self, ESteamNetworkingConfigValue eValue, const char** pOutName, ESteamNetworkingConfigDataType* pOutDataType, ESteamNetworkingConfigScope* pOutScope, ESteamNetworkingConfigValue* pOutNextValue);
|
||||
S_API ESteamNetworkingConfigValue SteamAPI_ISteamNetworkingUtils_GetFirstConfigValue(ISteamNetworkingUtils* self);
|
||||
S_API const char * SteamAPI_ISteamNetworkingUtils_GetConfigValueInfo( ISteamNetworkingUtils* self, ESteamNetworkingConfigValue eValue, ESteamNetworkingConfigDataType * pOutDataType, ESteamNetworkingConfigScope * pOutScope );
|
||||
S_API ESteamNetworkingConfigValue SteamAPI_ISteamNetworkingUtils_IterateGenericEditableConfigValues( ISteamNetworkingUtils* self, ESteamNetworkingConfigValue eCurrent, bool bEnumerateDevVars );
|
||||
S_API void SteamAPI_ISteamNetworkingUtils_SteamNetworkingIPAddr_ToString( ISteamNetworkingUtils* self, const SteamNetworkingIPAddr & addr, char * buf, uint32 cbBuf, bool bWithPort );
|
||||
S_API bool SteamAPI_ISteamNetworkingUtils_SteamNetworkingIPAddr_ParseString( ISteamNetworkingUtils* self, SteamNetworkingIPAddr * pAddr, const char * pszStr );
|
||||
S_API void SteamAPI_ISteamNetworkingUtils_SteamNetworkingIdentity_ToString( ISteamNetworkingUtils* self, const SteamNetworkingIdentity & identity, char * buf, uint32 cbBuf );
|
||||
S_API bool SteamAPI_ISteamNetworkingUtils_SteamNetworkingIdentity_ParseString( ISteamNetworkingUtils* self, SteamNetworkingIdentity * pIdentity, const char * pszStr );
|
||||
|
||||
// ISteamGameServer
|
||||
S_API ISteamGameServer* SteamAPI_SteamGameServer_v013();
|
||||
S_API ISteamGameServer *SteamAPI_SteamGameServer_v014();
|
||||
S_API void SteamAPI_ISteamGameServer_SetProduct( ISteamGameServer* self, const char * pszProduct );
|
||||
S_API void SteamAPI_ISteamGameServer_SetGameDescription( ISteamGameServer* self, const char * pszGameDescription );
|
||||
S_API void SteamAPI_ISteamGameServer_SetModDir( ISteamGameServer* self, const char * pszModDir );
|
||||
@ -963,10 +986,7 @@ S_API void SteamAPI_ISteamGameServer_SetKeyValue(ISteamGameServer* self, const c
|
||||
S_API void SteamAPI_ISteamGameServer_SetGameTags( ISteamGameServer* self, const char * pchGameTags );
|
||||
S_API void SteamAPI_ISteamGameServer_SetGameData( ISteamGameServer* self, const char * pchGameData );
|
||||
S_API void SteamAPI_ISteamGameServer_SetRegion( ISteamGameServer* self, const char * pszRegion );
|
||||
S_API bool SteamAPI_ISteamGameServer_SendUserConnectAndAuthenticate(ISteamGameServer* self, uint32 unIPClient, const void* pvAuthBlob, uint32 cubAuthBlobSize, CSteamID* pSteamIDUser);
|
||||
S_API uint64_steamid SteamAPI_ISteamGameServer_CreateUnauthenticatedUserConnection(ISteamGameServer* self);
|
||||
S_API void SteamAPI_ISteamGameServer_SendUserDisconnect(ISteamGameServer* self, uint64_steamid steamIDUser);
|
||||
S_API bool SteamAPI_ISteamGameServer_BUpdateUserData(ISteamGameServer* self, uint64_steamid steamIDUser, const char* pchPlayerName, uint32 uScore);
|
||||
S_API void SteamAPI_ISteamGameServer_SetAdvertiseServerActive( ISteamGameServer* self, bool bActive );
|
||||
S_API HAuthTicket SteamAPI_ISteamGameServer_GetAuthSessionTicket( ISteamGameServer* self, void * pTicket, int cbMaxTicket, uint32 * pcbTicket );
|
||||
S_API EBeginAuthSessionResult SteamAPI_ISteamGameServer_BeginAuthSession( ISteamGameServer* self, const void * pAuthTicket, int cbAuthTicket, uint64_steamid steamID );
|
||||
S_API void SteamAPI_ISteamGameServer_EndAuthSession( ISteamGameServer* self, uint64_steamid steamID );
|
||||
@ -978,11 +998,12 @@ S_API SteamAPICall_t SteamAPI_ISteamGameServer_GetServerReputation(ISteamGameSer
|
||||
S_API SteamIPAddress_t SteamAPI_ISteamGameServer_GetPublicIP( ISteamGameServer* self );
|
||||
S_API bool SteamAPI_ISteamGameServer_HandleIncomingPacket( ISteamGameServer* self, const void * pData, int cbData, uint32 srcIP, uint16 srcPort );
|
||||
S_API int SteamAPI_ISteamGameServer_GetNextOutgoingPacket( ISteamGameServer* self, void * pOut, int cbMaxOut, uint32 * pNetAdr, uint16 * pPort );
|
||||
S_API void SteamAPI_ISteamGameServer_EnableHeartbeats(ISteamGameServer* self, bool bActive);
|
||||
S_API void SteamAPI_ISteamGameServer_SetHeartbeatInterval(ISteamGameServer* self, int iHeartbeatInterval);
|
||||
S_API void SteamAPI_ISteamGameServer_ForceHeartbeat(ISteamGameServer* self);
|
||||
S_API SteamAPICall_t SteamAPI_ISteamGameServer_AssociateWithClan( ISteamGameServer* self, uint64_steamid steamIDClan );
|
||||
S_API SteamAPICall_t SteamAPI_ISteamGameServer_ComputeNewPlayerCompatibility( ISteamGameServer* self, uint64_steamid steamIDNewPlayer );
|
||||
S_API bool SteamAPI_ISteamGameServer_SendUserConnectAndAuthenticate_DEPRECATED( ISteamGameServer* self, uint32 unIPClient, const void * pvAuthBlob, uint32 cubAuthBlobSize, CSteamID * pSteamIDUser );
|
||||
S_API uint64_steamid SteamAPI_ISteamGameServer_CreateUnauthenticatedUserConnection( ISteamGameServer* self );
|
||||
S_API void SteamAPI_ISteamGameServer_SendUserDisconnect_DEPRECATED( ISteamGameServer* self, uint64_steamid steamIDUser );
|
||||
S_API bool SteamAPI_ISteamGameServer_BUpdateUserData( ISteamGameServer* self, uint64_steamid steamIDUser, const char * pchPlayerName, uint32 uScore );
|
||||
|
||||
// ISteamGameServerStats
|
||||
S_API ISteamGameServerStats *SteamAPI_SteamGameServerStats_v001();
|
||||
|
@ -33,8 +33,7 @@ S_API void* S_CALLTYPE SteamInternal_FindOrCreateGameServerInterface(HSteamUser
|
||||
#define STEAM_DEFINE_INTERFACE_ACCESSOR( type, name, expr, kind, version ) \
|
||||
inline void S_CALLTYPE SteamInternal_Init_ ## name( type *p ) { *p = (type)( expr ); } \
|
||||
STEAM_CLANG_ATTR( "interface_accessor_kind:" kind ";interface_accessor_version:" version ";" ) \
|
||||
inline type name() \
|
||||
{ \
|
||||
inline type name() { \
|
||||
static void* s_CallbackCounterAndContext[ 3 ] = { (void*)&SteamInternal_Init_ ## name, 0, 0 }; \
|
||||
return *(type*)SteamInternal_ContextInit( s_CallbackCounterAndContext ); \
|
||||
}
|
||||
@ -69,22 +68,15 @@ S_API void S_CALLTYPE SteamAPI_UnregisterCallResult(class CCallbackBase* pCallba
|
||||
CCallbackInternal_ ## func () { extra_code SteamAPI_RegisterCallback( this, param::k_iCallback ); } \
|
||||
CCallbackInternal_ ## func ( const CCallbackInternal_ ## func & ) { extra_code SteamAPI_RegisterCallback( this, param::k_iCallback ); } \
|
||||
CCallbackInternal_ ## func & operator=( const CCallbackInternal_ ## func & ) { return *this; } \
|
||||
\
|
||||
private: \
|
||||
virtual void Run(void* pvParam) \
|
||||
{ \
|
||||
_STEAM_CALLBACK_AUTO_HOOK(thisclass, func, param) \
|
||||
private: virtual void Run( void *pvParam ) { _STEAM_CALLBACK_AUTO_HOOK( thisclass, func, param ) \
|
||||
thisclass *pOuter = reinterpret_cast<thisclass*>( reinterpret_cast<char*>(this) - offsetof( thisclass, m_steamcallback_ ## func ) ); \
|
||||
pOuter->func( reinterpret_cast<param*>( pvParam ) ); \
|
||||
} \
|
||||
} m_steamcallback_##func; \
|
||||
void func(param* pParam)
|
||||
} m_steamcallback_ ## func ; void func( param *pParam )
|
||||
#define _STEAM_CALLBACK_4( _, thisclass, func, param, var ) \
|
||||
CCallback<thisclass, param> var; \
|
||||
void func(param* pParam)
|
||||
CCallback< thisclass, param > var; void func( param *pParam )
|
||||
#define _STEAM_CALLBACK_GS( _, thisclass, func, param, var ) \
|
||||
CCallback<thisclass, param, true> var; \
|
||||
void func(param* pParam)
|
||||
CCallback< thisclass, param, true > var; void func( param *pParam )
|
||||
|
||||
#ifndef API_GEN
|
||||
|
||||
@ -120,7 +112,8 @@ inline bool CCallResult<T, P>::IsActive() const
|
||||
template< class T, class P >
|
||||
inline void CCallResult<T, P>::Cancel()
|
||||
{
|
||||
if (m_hAPICall != k_uAPICallInvalid) {
|
||||
if ( m_hAPICall != k_uAPICallInvalid )
|
||||
{
|
||||
SteamAPI_UnregisterCallResult( this, m_hAPICall );
|
||||
m_hAPICall = k_uAPICallInvalid;
|
||||
}
|
||||
@ -142,7 +135,8 @@ inline void CCallResult<T, P>::Run(void* pvParam)
|
||||
template< class T, class P >
|
||||
inline void CCallResult<T, P>::Run( void *pvParam, bool bIOFailure, SteamAPICall_t hSteamAPICall )
|
||||
{
|
||||
if (hSteamAPICall == m_hAPICall) {
|
||||
if ( hSteamAPICall == m_hAPICall )
|
||||
{
|
||||
m_hAPICall = k_uAPICallInvalid; // caller unregisters for us
|
||||
(m_pObj->*m_Func)((P *)pvParam, bIOFailure);
|
||||
}
|
||||
@ -150,10 +144,10 @@ inline void CCallResult<T, P>::Run(void* pvParam, bool bIOFailure, SteamAPICall_
|
||||
|
||||
template< class T, class P, bool bGameserver >
|
||||
inline CCallback< T, P, bGameserver >::CCallback( T *pObj, func_t func )
|
||||
: m_pObj(nullptr)
|
||||
, m_Func(nullptr)
|
||||
: m_pObj( nullptr ), m_Func( nullptr )
|
||||
{
|
||||
if ( bGameserver )
|
||||
{
|
||||
if (bGameserver) {
|
||||
this->SetGameserverFlag();
|
||||
}
|
||||
Register( pObj, func );
|
||||
@ -200,7 +194,8 @@ inline void CCallback<T, P, bGameserver>::Run(void* pvParam)
|
||||
#endif
|
||||
|
||||
/// Internal structure used in manual callback dispatch
|
||||
struct CallbackMsg_t {
|
||||
struct CallbackMsg_t
|
||||
{
|
||||
HSteamUser m_hSteamUser; // Specific user to whom this callback applies.
|
||||
int m_iCallback; // Callback identifier. (Corresponds to the k_iCallback enum in the callback structure.)
|
||||
uint8 *m_pubParam; // Points to the callback structure
|
||||
@ -212,14 +207,10 @@ struct CallbackMsg_t {
|
||||
#ifdef STEAM_CALLBACK_INSPECTION_ENABLED
|
||||
#include "../../clientdll/steam_api_callback_inspection.h"
|
||||
#else
|
||||
#define STEAM_CALLBACK_BEGIN(callbackname, callbackid) \
|
||||
struct callbackname { \
|
||||
enum { k_iCallback = callbackid };
|
||||
#define STEAM_CALLBACK_BEGIN( callbackname, callbackid ) struct callbackname { enum { k_iCallback = callbackid };
|
||||
#define STEAM_CALLBACK_MEMBER( varidx, vartype, varname ) vartype varname ;
|
||||
#define STEAM_CALLBACK_MEMBER_ARRAY( varidx, vartype, varname, varcount ) vartype varname [ varcount ];
|
||||
#define STEAM_CALLBACK_END(nArgs) \
|
||||
} \
|
||||
;
|
||||
#define STEAM_CALLBACK_END(nArgs) };
|
||||
#endif
|
||||
|
||||
// Forward declare all of the Steam interfaces. (Do we really need to do this?)
|
||||
@ -319,18 +310,44 @@ enum { k_iClientSTARCallbacks = 5600 };
|
||||
enum { k_iSteamRemotePlayCallbacks = 5700 };
|
||||
enum { k_iClientCompatCallbacks = 5800 };
|
||||
enum { k_iSteamChatCallbacks = 5900 };
|
||||
enum { k_iClientNetworkingUtilsCallbacks = 6000 };
|
||||
enum { k_iClientSystemManagerCallbacks = 6100 };
|
||||
enum { k_iClientStorageDeviceManagerCallbacks = 6200 };
|
||||
|
||||
#ifdef _MSVC_VER
|
||||
#pragma warning( pop )
|
||||
#endif
|
||||
|
||||
// Macros used to annotate various Steamworks interfaces to generate the
|
||||
// flat API
|
||||
#ifdef API_GEN
|
||||
# define STEAM_CLANG_ATTR(ATTR) __attribute__((annotate( ATTR )))
|
||||
#else
|
||||
# define STEAM_CLANG_ATTR(ATTR)
|
||||
#endif
|
||||
|
||||
#define STEAM_OUT_STRUCT() STEAM_CLANG_ATTR( "out_struct: ;" )
|
||||
#define STEAM_OUT_STRING() STEAM_CLANG_ATTR( "out_string: ;" )
|
||||
#define STEAM_OUT_ARRAY_CALL(COUNTER,FUNCTION,PARAMS) STEAM_CLANG_ATTR( "out_array_call:" #COUNTER "," #FUNCTION "," #PARAMS ";" )
|
||||
#define STEAM_OUT_ARRAY_COUNT(COUNTER, DESC) STEAM_CLANG_ATTR( "out_array_count:" #COUNTER ";desc:" #DESC )
|
||||
#define STEAM_ARRAY_COUNT(COUNTER) STEAM_CLANG_ATTR( "array_count:" #COUNTER ";" )
|
||||
#define STEAM_ARRAY_COUNT_D(COUNTER, DESC) STEAM_CLANG_ATTR( "array_count:" #COUNTER ";desc:" #DESC )
|
||||
#define STEAM_BUFFER_COUNT(COUNTER) STEAM_CLANG_ATTR( "buffer_count:" #COUNTER ";" )
|
||||
#define STEAM_OUT_BUFFER_COUNT(COUNTER) STEAM_CLANG_ATTR( "out_buffer_count:" #COUNTER ";" )
|
||||
#define STEAM_OUT_STRING_COUNT(COUNTER) STEAM_CLANG_ATTR( "out_string_count:" #COUNTER ";" )
|
||||
#define STEAM_DESC(DESC) STEAM_CLANG_ATTR("desc:" #DESC ";")
|
||||
#define STEAM_CALL_RESULT(RESULT_TYPE) STEAM_CLANG_ATTR("callresult:" #RESULT_TYPE ";")
|
||||
#define STEAM_CALL_BACK(RESULT_TYPE) STEAM_CLANG_ATTR("callback:" #RESULT_TYPE ";")
|
||||
#define STEAM_FLAT_NAME(NAME) STEAM_CLANG_ATTR("flat_name:" #NAME ";")
|
||||
|
||||
// CSteamAPIContext encapsulates the Steamworks API global accessors into
|
||||
// a single object.
|
||||
//
|
||||
// DEPRECATED: Used the global interface accessors instead!
|
||||
//
|
||||
// This will be removed in a future iteration of the SDK
|
||||
class CSteamAPIContext {
|
||||
class CSteamAPIContext
|
||||
{
|
||||
public:
|
||||
CSteamAPIContext() { Clear(); }
|
||||
inline void Clear() { memset( this, 0, sizeof(*this) ); }
|
||||
@ -358,7 +375,6 @@ public:
|
||||
ISteamVideo* SteamVideo() const { return m_pSteamVideo; }
|
||||
ISteamParentalSettings* SteamParentalSettings() const { return m_pSteamParentalSettings; }
|
||||
ISteamInput* SteamInput() const { return m_pSteamInput; }
|
||||
|
||||
private:
|
||||
ISteamClient *m_pSteamClient;
|
||||
ISteamUser *m_pSteamUser;
|
||||
@ -385,7 +401,8 @@ private:
|
||||
ISteamInput *m_pSteamInput;
|
||||
};
|
||||
|
||||
class CSteamGameServerAPIContext {
|
||||
class CSteamGameServerAPIContext
|
||||
{
|
||||
public:
|
||||
CSteamGameServerAPIContext() { Clear(); }
|
||||
inline void Clear() { memset( this, 0, sizeof(*this) ); }
|
||||
@ -399,7 +416,6 @@ public:
|
||||
ISteamHTTP *SteamHTTP() const { return m_pSteamHTTP; }
|
||||
ISteamInventory *SteamInventory() const { return m_pSteamInventory; }
|
||||
ISteamUGC *SteamUGC() const { return m_pSteamUGC; }
|
||||
ISteamApps* SteamApps() const { return m_pSteamApps; }
|
||||
|
||||
private:
|
||||
ISteamClient *m_pSteamClient;
|
||||
@ -410,5 +426,6 @@ private:
|
||||
ISteamHTTP *m_pSteamHTTP;
|
||||
ISteamInventory *m_pSteamInventory;
|
||||
ISteamUGC *m_pSteamUGC;
|
||||
ISteamApps* m_pSteamApps;
|
||||
};
|
||||
|
||||
|
||||
|
@ -10,11 +10,12 @@
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
#include "steam_api.h"
|
||||
#include "isteamgameserver.h"
|
||||
#include "isteamgameserverstats.h"
|
||||
#include "steam_api.h"
|
||||
|
||||
enum EServerMode {
|
||||
enum EServerMode
|
||||
{
|
||||
eServerModeInvalid = 0, // DO NOT USE
|
||||
eServerModeNoAuthentication = 1, // Don't authenticate user logins and don't list on the server list
|
||||
eServerModeAuthentication = 2, // Authenticate users, list on the server list, don't run VAC on clients that connect
|
||||
@ -22,10 +23,13 @@ enum EServerMode {
|
||||
};
|
||||
|
||||
/// Pass to SteamGameServer_Init to indicate that the same UDP port will be used for game traffic
|
||||
/// UDP queries. In this case, Steam will not open up a socket to handle server browser queries,
|
||||
/// and you must use ISteamGameServer::HandleIncomingPacket and ISteamGameServer::GetNextOutgoingPacket
|
||||
/// to handle packets related to server discovery on your socket.
|
||||
#define MASTERSERVERUPDATERPORT_USEGAMESOCKETSHARE ((uint16)-1)
|
||||
/// UDP queries for server browser pings and LAN discovery. In this case, Steam will not open up a
|
||||
/// socket to handle server browser queries, and you must use ISteamGameServer::HandleIncomingPacket
|
||||
/// and ISteamGameServer::GetNextOutgoingPacket to handle packets related to server discovery on your socket.
|
||||
const uint16 STEAMGAMESERVER_QUERY_PORT_SHARED = 0xffff;
|
||||
|
||||
// DEPRECATED: This old name was really confusing.
|
||||
const uint16 MASTERSERVERUPDATERPORT_USEGAMESOCKETSHARE = STEAMGAMESERVER_QUERY_PORT_SHARED;
|
||||
|
||||
// Initialize SteamGameServer client and interface objects, and set server properties which may not be changed.
|
||||
//
|
||||
@ -38,9 +42,10 @@ enum EServerMode {
|
||||
// - usGamePort is the port that clients will connect to for gameplay. You will usually open up your
|
||||
// own socket bound to this port.
|
||||
// - usQueryPort is the port that will manage server browser related duties and info
|
||||
// pings from clients. If you pass MASTERSERVERUPDATERPORT_USEGAMESOCKETSHARE for usQueryPort, then it
|
||||
// pings from clients. If you pass STEAMGAMESERVER_QUERY_PORT_SHARED for usQueryPort, then it
|
||||
// will use "GameSocketShare" mode, which means that the game is responsible for sending and receiving
|
||||
// UDP packets for the master server updater. See references to GameSocketShare in isteamgameserver.h.
|
||||
// UDP packets for the master server updater. (See ISteamGameServer::HandleIncomingPacket and
|
||||
// ISteamGameServer::GetNextOutgoingPacket.)
|
||||
// - The version string should be in the form x.x.x.x, and is used by the master server to detect when the
|
||||
// server is out of date. (Only servers with the latest version will be listed.)
|
||||
inline bool SteamGameServer_Init( uint32 unIP, uint16 usGamePort, uint16 usQueryPort, EServerMode eServerMode, const char *pchVersionString );
|
||||
@ -88,9 +93,8 @@ inline bool CSteamGameServerAPIContext::Init()
|
||||
m_pSteamHTTP = ::SteamGameServerHTTP();
|
||||
m_pSteamInventory = ::SteamGameServerInventory();
|
||||
m_pSteamUGC = ::SteamGameServerUGC();
|
||||
m_pSteamApps = ::SteamGameServerApps();
|
||||
if ( !m_pSteamGameServer || !m_pSteamGameServerUtils || !m_pSteamGameServerNetworking || !m_pSteamGameServerStats
|
||||
|| !m_pSteamHTTP || !m_pSteamInventory || !m_pSteamUGC || !m_pSteamApps)
|
||||
|| !m_pSteamHTTP || !m_pSteamInventory || !m_pSteamUGC )
|
||||
return false;
|
||||
|
||||
return true;
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,29 +1,18 @@
|
||||
//========= Copyright <20> 1996-2008, Valve LLC, All rights reserved. ============
|
||||
//
|
||||
// Purpose:
|
||||
// Declare common types used by the Steamworks SDK.
|
||||
//
|
||||
//=============================================================================
|
||||
|
||||
#ifndef STEAMCLIENTPUBLIC_H
|
||||
#define STEAMCLIENTPUBLIC_H
|
||||
#ifdef _WIN32
|
||||
#pragma once
|
||||
#endif
|
||||
//lint -save -e1931 -e1927 -e1924 -e613 -e726
|
||||
|
||||
// This header file defines the interface between the calling application and the code that
|
||||
// knows how to communicate with the connection manager (CM) from the Steam service
|
||||
|
||||
// This header file is intended to be portable; ideally this 1 header file plus a lib or dll
|
||||
// is all you need to integrate the client library into some other tree. So please avoid
|
||||
// including or requiring other header files if possible. This header should only describe the
|
||||
// interface layer, no need to include anything about the implementation.
|
||||
|
||||
#include "steamtypes.h"
|
||||
#include "steamuniverse.h"
|
||||
|
||||
// General result codes
|
||||
enum EResult {
|
||||
enum EResult
|
||||
{
|
||||
k_EResultNone = 0, // no result
|
||||
k_EResultOK = 1, // success
|
||||
k_EResultFail = 2, // generic failure
|
||||
@ -144,10 +133,14 @@ enum EResult {
|
||||
k_EResultNoLauncherSpecified = 117, // No launcher was specified, but a launcher was needed to choose correct realm for operation.
|
||||
k_EResultMustAgreeToSSA = 118, // User must agree to china SSA or global SSA before login
|
||||
k_EResultLauncherMigrated = 119, // The specified launcher type is no longer supported; the user should be directed elsewhere
|
||||
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_EResultParseFailure = 122, // Failed to parse input
|
||||
};
|
||||
|
||||
// Error codes for use with the voice functions
|
||||
enum EVoiceResult {
|
||||
enum EVoiceResult
|
||||
{
|
||||
k_EVoiceResultOK = 0,
|
||||
k_EVoiceResultNotInitialized = 1,
|
||||
k_EVoiceResultNotRecording = 2,
|
||||
@ -162,7 +155,8 @@ enum EVoiceResult {
|
||||
};
|
||||
|
||||
// Result codes to GSHandleClientDeny/Kick
|
||||
enum EDenyReason {
|
||||
enum EDenyReason
|
||||
{
|
||||
k_EDenyInvalid = 0,
|
||||
k_EDenyInvalidVersion = 1,
|
||||
k_EDenyGeneric = 2,
|
||||
@ -186,7 +180,8 @@ typedef uint32 HAuthTicket;
|
||||
const HAuthTicket k_HAuthTicketInvalid = 0;
|
||||
|
||||
// results from BeginAuthSession
|
||||
enum EBeginAuthSessionResult {
|
||||
enum EBeginAuthSessionResult
|
||||
{
|
||||
k_EBeginAuthSessionResultOK = 0, // Ticket is valid for this game and this steamID.
|
||||
k_EBeginAuthSessionResultInvalidTicket = 1, // Ticket is not valid.
|
||||
k_EBeginAuthSessionResultDuplicateRequest = 2, // A ticket has already been submitted for this steamID
|
||||
@ -196,7 +191,8 @@ enum EBeginAuthSessionResult {
|
||||
};
|
||||
|
||||
// Callback values for callback ValidateAuthTicketResponse_t which is a response to BeginAuthSession
|
||||
enum EAuthSessionResponse {
|
||||
enum EAuthSessionResponse
|
||||
{
|
||||
k_EAuthSessionResponseOK = 0, // Steam has verified the user is online, the ticket is valid and ticket has not been reused.
|
||||
k_EAuthSessionResponseUserNotConnectedToSteam = 1, // The user in question is not connected to steam
|
||||
k_EAuthSessionResponseNoLicenseOrExpired = 2, // The license has expired.
|
||||
@ -210,14 +206,17 @@ enum EAuthSessionResponse {
|
||||
};
|
||||
|
||||
// results from UserHasLicenseForApp
|
||||
enum EUserHasLicenseForAppResult {
|
||||
enum EUserHasLicenseForAppResult
|
||||
{
|
||||
k_EUserHasLicenseResultHasLicense = 0, // User has a license for specified app
|
||||
k_EUserHasLicenseResultDoesNotHaveLicense = 1, // User does not have a license for the specified app
|
||||
k_EUserHasLicenseResultNoAuth = 2, // User has not been authenticated
|
||||
};
|
||||
|
||||
|
||||
// Steam account types
|
||||
enum EAccountType {
|
||||
enum EAccountType
|
||||
{
|
||||
k_EAccountTypeInvalid = 0,
|
||||
k_EAccountTypeIndividual = 1, // single user account
|
||||
k_EAccountTypeMultiseat = 2, // multiseat (e.g. cybercafe) account
|
||||
@ -234,95 +233,13 @@ enum EAccountType {
|
||||
k_EAccountTypeMax
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose:
|
||||
//-----------------------------------------------------------------------------
|
||||
enum EAppReleaseState {
|
||||
k_EAppReleaseState_Unknown = 0, // unknown, required appinfo or license info is missing
|
||||
k_EAppReleaseState_Unavailable = 1, // even owners can't see game in library yet, no AppInfo released
|
||||
k_EAppReleaseState_Prerelease = 2, // app can be purchased and is visible in library, nothing else. Only Common AppInfo section released
|
||||
k_EAppReleaseState_PreloadOnly = 3, // owners can preload app, but not play it. All AppInfo sections fully released
|
||||
k_EAppReleaseState_Released = 4, // owners can download and play app.
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose:
|
||||
//-----------------------------------------------------------------------------
|
||||
enum EAppOwnershipFlags {
|
||||
k_EAppOwnershipFlags_None = 0x0000, // unknown
|
||||
k_EAppOwnershipFlags_OwnsLicense = 0x0001, // owns license for this game
|
||||
k_EAppOwnershipFlags_FreeLicense = 0x0002, // not paid for game
|
||||
k_EAppOwnershipFlags_RegionRestricted = 0x0004, // owns app, but not allowed to play in current region
|
||||
k_EAppOwnershipFlags_LowViolence = 0x0008, // only low violence version
|
||||
k_EAppOwnershipFlags_InvalidPlatform = 0x0010, // app not supported on current platform
|
||||
k_EAppOwnershipFlags_SharedLicense = 0x0020, // license was granted by authorized local device
|
||||
k_EAppOwnershipFlags_FreeWeekend = 0x0040, // owned by a free weekend licenses
|
||||
k_EAppOwnershipFlags_RetailLicense = 0x0080, // has a retail license for game, (CD-Key etc)
|
||||
k_EAppOwnershipFlags_LicenseLocked = 0x0100, // shared license is locked (in use) by other user
|
||||
k_EAppOwnershipFlags_LicensePending = 0x0200, // owns app, but transaction is still pending. Can't install or play
|
||||
k_EAppOwnershipFlags_LicenseExpired = 0x0400, // doesn't own app anymore since license expired
|
||||
k_EAppOwnershipFlags_LicensePermanent = 0x0800, // permanent license, not borrowed, or guest or freeweekend etc
|
||||
k_EAppOwnershipFlags_LicenseRecurring = 0x1000, // Recurring license, user is charged periodically
|
||||
k_EAppOwnershipFlags_LicenseCanceled = 0x2000, // Mark as canceled, but might be still active if recurring
|
||||
k_EAppOwnershipFlags_AutoGrant = 0x4000, // Ownership is based on any kind of autogrant license
|
||||
k_EAppOwnershipFlags_PendingGift = 0x8000, // user has pending gift to redeem
|
||||
k_EAppOwnershipFlags_RentalNotActivated = 0x10000, // Rental hasn't been activated yet
|
||||
k_EAppOwnershipFlags_Rental = 0x20000, // Is a rental
|
||||
k_EAppOwnershipFlags_SiteLicense = 0x40000, // Is from a site license
|
||||
k_EAppOwnershipFlags_LegacyFreeSub = 0x80000, // App only owned through Steam's legacy free sub
|
||||
k_EAppOwnershipFlags_InvalidOSType = 0x100000, // app not supported on current OS version, used to indicate a game is 32-bit on post-catalina. Currently it's own flag so the library will display a notice.
|
||||
k_EAppOwnershipFlags_TimedTrial = 0x200000, // App is playable only for limited time
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: designed as flags to allow filters masks
|
||||
// NOTE: If you add to this, please update PackageAppType (SteamConfig) as well as populatePackageAppType
|
||||
//-----------------------------------------------------------------------------
|
||||
enum EAppType {
|
||||
k_EAppType_Invalid = 0x000, // unknown / invalid
|
||||
k_EAppType_Game = 0x001, // playable game, default type
|
||||
k_EAppType_Application = 0x002, // software application
|
||||
k_EAppType_Tool = 0x004, // SDKs, editors & dedicated servers
|
||||
k_EAppType_Demo = 0x008, // game demo
|
||||
k_EAppType_Media_DEPRECATED = 0x010, // legacy - was used for game trailers, which are now just videos on the web
|
||||
k_EAppType_DLC = 0x020, // down loadable content
|
||||
k_EAppType_Guide = 0x040, // game guide, PDF etc
|
||||
k_EAppType_Driver = 0x080, // hardware driver updater (ATI, Razor etc)
|
||||
k_EAppType_Config = 0x100, // hidden app used to config Steam features (backpack, sales, etc)
|
||||
k_EAppType_Hardware = 0x200, // a hardware device (Steam Machine, Steam Controller, Steam Link, etc.)
|
||||
k_EAppType_Franchise = 0x400, // A hub for collections of multiple apps, eg films, series, games
|
||||
k_EAppType_Video = 0x800, // A video component of either a Film or TVSeries (may be the feature, an episode, preview, making-of, etc)
|
||||
k_EAppType_Plugin = 0x1000, // Plug-in types for other Apps
|
||||
k_EAppType_MusicAlbum = 0x2000, // "Video game soundtrack album"
|
||||
k_EAppType_Series = 0x4000, // Container app for video series
|
||||
k_EAppType_Comic_UNUSED = 0x8000, // Comic Book
|
||||
k_EAppType_Beta = 0x10000, // this is a beta version of a game
|
||||
|
||||
k_EAppType_Shortcut = 0x40000000, // just a shortcut, client side only
|
||||
k_EAppType_DepotOnly_DEPRECATED = 0x80000000, // there shouldn't be any appinfo for depots
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// types of user game stats fields
|
||||
// WARNING: DO NOT RENUMBER EXISTING VALUES - STORED IN DATABASE
|
||||
//-----------------------------------------------------------------------------
|
||||
enum ESteamUserStatType {
|
||||
k_ESteamUserStatTypeINVALID = 0,
|
||||
k_ESteamUserStatTypeINT = 1,
|
||||
k_ESteamUserStatTypeFLOAT = 2,
|
||||
// Read as FLOAT, set with count / session length
|
||||
k_ESteamUserStatTypeAVGRATE = 3,
|
||||
k_ESteamUserStatTypeACHIEVEMENTS = 4,
|
||||
k_ESteamUserStatTypeGROUPACHIEVEMENTS = 5,
|
||||
|
||||
// max, for sanity checks
|
||||
k_ESteamUserStatTypeMAX
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Chat Entry Types (previously was only friend-to-friend message types)
|
||||
//-----------------------------------------------------------------------------
|
||||
enum EChatEntryType {
|
||||
enum EChatEntryType
|
||||
{
|
||||
k_EChatEntryTypeInvalid = 0,
|
||||
k_EChatEntryTypeChatMsg = 1, // Normal text message from another user
|
||||
k_EChatEntryTypeTyping = 2, // Another user is typing (not used in multi-user chat)
|
||||
@ -341,10 +258,12 @@ enum EChatEntryType {
|
||||
k_EChatEntryTypeLinkBlocked = 14, // a link was removed by the chat filter.
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Chat Room Enter Responses
|
||||
//-----------------------------------------------------------------------------
|
||||
enum EChatRoomEnterResponse {
|
||||
enum EChatRoomEnterResponse
|
||||
{
|
||||
k_EChatRoomEnterResponseSuccess = 1, // Success
|
||||
k_EChatRoomEnterResponseDoesntExist = 2, // Chat doesn't exist (probably closed)
|
||||
k_EChatRoomEnterResponseNotAllowed = 3, // General Denied - You don't have the permissions needed to join the chat
|
||||
@ -362,8 +281,6 @@ enum EChatRoomEnterResponse {
|
||||
k_EChatRoomEnterResponseRatelimitExceeded = 15, // Join failed - to many join attempts in a very short period of time
|
||||
};
|
||||
|
||||
typedef void (*PFNLegacyKeyRegistration)(const char* pchCDKey, const char* pchInstallPath);
|
||||
typedef bool (*PFNLegacyKeyInstalled)();
|
||||
|
||||
const unsigned int k_unSteamAccountIDMask = 0xFFFFFFFF;
|
||||
const unsigned int k_unSteamAccountInstanceMask = 0x000FFFFF;
|
||||
@ -371,7 +288,8 @@ const unsigned int k_unSteamUserDefaultInstance = 1; // fixed instance for all i
|
||||
|
||||
// Special flags for Chat accounts - they go in the top 8 bits
|
||||
// of the steam ID's "instance", leaving 12 for the actual instances
|
||||
enum EChatSteamIDInstanceFlags {
|
||||
enum EChatSteamIDInstanceFlags
|
||||
{
|
||||
k_EChatAccountInstanceMask = 0x00000FFF, // top 8 bits are flags
|
||||
|
||||
k_EChatInstanceFlagClan = ( k_unSteamAccountInstanceMask + 1 ) >> 1, // top bit
|
||||
@ -381,34 +299,24 @@ enum EChatSteamIDInstanceFlags {
|
||||
// Max of 8 flags
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Marketing message flags that change how a client should handle them
|
||||
//-----------------------------------------------------------------------------
|
||||
enum EMarketingMessageFlags {
|
||||
k_EMarketingMessageFlagsNone = 0,
|
||||
k_EMarketingMessageFlagsHighPriority = 1 << 0,
|
||||
k_EMarketingMessageFlagsPlatformWindows = 1 << 1,
|
||||
k_EMarketingMessageFlagsPlatformMac = 1 << 2,
|
||||
k_EMarketingMessageFlagsPlatformLinux = 1 << 3,
|
||||
|
||||
//aggregate flags
|
||||
k_EMarketingMessageFlagsPlatformRestrictions = k_EMarketingMessageFlagsPlatformWindows | k_EMarketingMessageFlagsPlatformMac | k_EMarketingMessageFlagsPlatformLinux,
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Possible positions to tell the overlay to show notifications in
|
||||
//-----------------------------------------------------------------------------
|
||||
enum ENotificationPosition {
|
||||
enum ENotificationPosition
|
||||
{
|
||||
k_EPositionTopLeft = 0,
|
||||
k_EPositionTopRight = 1,
|
||||
k_EPositionBottomLeft = 2,
|
||||
k_EPositionBottomRight = 3,
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Broadcast upload result details
|
||||
//-----------------------------------------------------------------------------
|
||||
enum EBroadcastUploadResult {
|
||||
enum EBroadcastUploadResult
|
||||
{
|
||||
k_EBroadcastUploadResultNone = 0, // broadcast state unknown
|
||||
k_EBroadcastUploadResultOK = 1, // broadcast was good, no problems
|
||||
k_EBroadcastUploadResultInitFailed = 2, // broadcast init failed
|
||||
@ -435,145 +343,13 @@ enum EBroadcastUploadResult {
|
||||
k_EBroadcastUploadResultAudioInitFailed = 23, // invalid audio settings
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: codes for well defined launch options
|
||||
//-----------------------------------------------------------------------------
|
||||
enum ELaunchOptionType {
|
||||
k_ELaunchOptionType_None = 0, // unknown what launch option does
|
||||
k_ELaunchOptionType_Default = 1, // runs the game, app, whatever in default mode
|
||||
k_ELaunchOptionType_SafeMode = 2, // runs the game in safe mode
|
||||
k_ELaunchOptionType_Multiplayer = 3, // runs the game in multiplayer mode
|
||||
k_ELaunchOptionType_Config = 4, // runs config tool for this game
|
||||
k_ELaunchOptionType_OpenVR = 5, // runs game in VR mode using OpenVR
|
||||
k_ELaunchOptionType_Server = 6, // runs dedicated server for this game
|
||||
k_ELaunchOptionType_Editor = 7, // runs game editor
|
||||
k_ELaunchOptionType_Manual = 8, // shows game manual
|
||||
k_ELaunchOptionType_Benchmark = 9, // runs game benchmark
|
||||
k_ELaunchOptionType_Option1 = 10, // generic run option, uses description field for game name
|
||||
k_ELaunchOptionType_Option2 = 11, // generic run option, uses description field for game name
|
||||
k_ELaunchOptionType_Option3 = 12, // generic run option, uses description field for game name
|
||||
k_ELaunchOptionType_OculusVR = 13, // runs game in VR mode using the Oculus SDK
|
||||
k_ELaunchOptionType_OpenVROverlay = 14, // runs an OpenVR dashboard overlay
|
||||
k_ELaunchOptionType_OSVR = 15, // runs game in VR mode using the OSVR SDK
|
||||
|
||||
k_ELaunchOptionType_Dialog = 1000, // show launch options dialog
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: true if this launch option is any of the vr launching types
|
||||
//-----------------------------------------------------------------------------
|
||||
static inline bool BIsVRLaunchOptionType(const ELaunchOptionType eType)
|
||||
{
|
||||
return eType == k_ELaunchOptionType_OpenVR
|
||||
|| eType == k_ELaunchOptionType_OpenVROverlay
|
||||
|| eType == k_ELaunchOptionType_OculusVR
|
||||
|| eType == k_ELaunchOptionType_OSVR;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: true if this launch option is any of the vr launching types
|
||||
//-----------------------------------------------------------------------------
|
||||
static inline bool BIsLaunchOptionTypeExemptFromGameTheater(const ELaunchOptionType eType)
|
||||
{
|
||||
return eType == k_ELaunchOptionType_Config
|
||||
|| eType == k_ELaunchOptionType_Server
|
||||
|| eType == k_ELaunchOptionType_Editor
|
||||
|| eType == k_ELaunchOptionType_Manual;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: code points for VR HMD vendors and models
|
||||
// WARNING: DO NOT RENUMBER EXISTING VALUES - STORED IN A DATABASE
|
||||
//-----------------------------------------------------------------------------
|
||||
enum EVRHMDType {
|
||||
k_eEVRHMDType_None = -1, // unknown vendor and model
|
||||
|
||||
k_eEVRHMDType_Unknown = 0, // unknown vendor and model
|
||||
|
||||
k_eEVRHMDType_HTC_Dev = 1, // original HTC dev kits
|
||||
k_eEVRHMDType_HTC_VivePre = 2, // htc vive pre
|
||||
k_eEVRHMDType_HTC_Vive = 3, // htc vive consumer release
|
||||
k_eEVRHMDType_HTC_VivePro = 4, // htc vive pro release
|
||||
k_eEVRHMDType_HTC_ViveCosmos = 5, // HTC Vive Cosmos
|
||||
|
||||
k_eEVRHMDType_HTC_Unknown = 20, // unknown htc hmd
|
||||
|
||||
k_eEVRHMDType_Oculus_DK1 = 21, // Oculus DK1
|
||||
k_eEVRHMDType_Oculus_DK2 = 22, // Oculus DK2
|
||||
k_eEVRHMDType_Oculus_Rift = 23, // Oculus Rift
|
||||
k_eEVRHMDType_Oculus_RiftS = 24, // Oculus Rift S
|
||||
k_eEVRHMDType_Oculus_Quest = 25, // Oculus Quest
|
||||
|
||||
k_eEVRHMDType_Oculus_Unknown = 40, // // Oculus unknown HMD
|
||||
|
||||
k_eEVRHMDType_Acer_Unknown = 50, // Acer unknown HMD
|
||||
k_eEVRHMDType_Acer_WindowsMR = 51, // Acer QHMD Windows MR headset
|
||||
|
||||
k_eEVRHMDType_Dell_Unknown = 60, // Dell unknown HMD
|
||||
k_eEVRHMDType_Dell_Visor = 61, // Dell Visor Windows MR headset
|
||||
|
||||
k_eEVRHMDType_Lenovo_Unknown = 70, // Lenovo unknown HMD
|
||||
k_eEVRHMDType_Lenovo_Explorer = 71, // Lenovo Explorer Windows MR headset
|
||||
|
||||
k_eEVRHMDType_HP_Unknown = 80, // HP unknown HMD
|
||||
k_eEVRHMDType_HP_WindowsMR = 81, // HP Windows MR headset
|
||||
k_eEVRHMDType_HP_Reverb = 82, // HP Reverb Windows MR headset
|
||||
k_eEVRHMDType_HP_ReverbG2 = 1463, // HP Reverb G2 Windows MR headset
|
||||
|
||||
k_eEVRHMDType_Samsung_Unknown = 90, // Samsung unknown HMD
|
||||
k_eEVRHMDType_Samsung_Odyssey = 91, // Samsung Odyssey Windows MR headset
|
||||
|
||||
k_eEVRHMDType_Unannounced_Unknown = 100, // Unannounced unknown HMD
|
||||
k_eEVRHMDType_Unannounced_WindowsMR = 101, // Unannounced Windows MR headset
|
||||
|
||||
k_eEVRHMDType_vridge = 110, // VRIDGE tool
|
||||
|
||||
k_eEVRHMDType_Huawei_Unknown = 120, // Huawei unknown HMD
|
||||
k_eEVRHMDType_Huawei_VR2 = 121, // Huawei VR2 3DOF headset
|
||||
k_eEVRHMDType_Huawei_EndOfRange = 129, // end of Huawei HMD range
|
||||
|
||||
k_eEVRHmdType_Valve_Unknown = 130, // Valve Unknown HMD
|
||||
k_eEVRHmdType_Valve_Index = 131, // Valve Index HMD
|
||||
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: true if this is from an Oculus HMD
|
||||
//-----------------------------------------------------------------------------
|
||||
static inline bool BIsOculusHMD(EVRHMDType eType)
|
||||
{
|
||||
return eType == k_eEVRHMDType_Oculus_DK1 || eType == k_eEVRHMDType_Oculus_DK2 || eType == k_eEVRHMDType_Oculus_Rift || eType == k_eEVRHMDType_Oculus_RiftS || eType == k_eEVRHMDType_Oculus_Quest || eType == k_eEVRHMDType_Oculus_Unknown;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: true if this is from a Windows MR HMD
|
||||
//-----------------------------------------------------------------------------
|
||||
static inline bool BIsWindowsMRHeadset(EVRHMDType eType)
|
||||
{
|
||||
return eType >= k_eEVRHMDType_Acer_WindowsMR && eType <= k_eEVRHMDType_Unannounced_WindowsMR;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: true if this is from a Hauwei HMD
|
||||
//-----------------------------------------------------------------------------
|
||||
static inline bool BIsHuaweiHeadset(EVRHMDType eType)
|
||||
{
|
||||
return eType >= k_eEVRHMDType_Huawei_Unknown && eType <= k_eEVRHMDType_Huawei_EndOfRange;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: true if this is from an Vive HMD
|
||||
//-----------------------------------------------------------------------------
|
||||
static inline bool BIsViveHMD(EVRHMDType eType)
|
||||
{
|
||||
return eType == k_eEVRHMDType_HTC_Dev || eType == k_eEVRHMDType_HTC_VivePre || eType == k_eEVRHMDType_HTC_Vive || eType == k_eEVRHMDType_HTC_Unknown || eType == k_eEVRHMDType_HTC_VivePro;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Reasons a user may not use the Community Market.
|
||||
// Used in MarketEligibilityResponse_t.
|
||||
//-----------------------------------------------------------------------------
|
||||
enum EMarketNotAllowedReasonFlags {
|
||||
enum EMarketNotAllowedReasonFlags
|
||||
{
|
||||
k_EMarketNotAllowedReason_None = 0,
|
||||
|
||||
// A back-end call failed or something that might work again on retry
|
||||
@ -627,12 +403,14 @@ enum EMarketNotAllowedReasonFlags {
|
||||
k_EMarketNotAllowedReason_AcceptedWalletGift = (1 << 15),
|
||||
};
|
||||
|
||||
|
||||
//
|
||||
// describes XP / progress restrictions to apply for games with duration control /
|
||||
// anti-indulgence enabled for minor Steam China users.
|
||||
//
|
||||
// WARNING: DO NOT RENUMBER
|
||||
enum EDurationControlProgress {
|
||||
enum EDurationControlProgress
|
||||
{
|
||||
k_EDurationControlProgress_Full = 0, // Full progress
|
||||
k_EDurationControlProgress_Half = 1, // deprecated - XP or persistent rewards should be halved
|
||||
k_EDurationControlProgress_None = 2, // deprecated - XP or persistent rewards should be stopped
|
||||
@ -642,11 +420,13 @@ enum EDurationControlProgress {
|
||||
k_EDurationControl_ExitSoon_Night = 5, // game running after day period, game should exit - steam will terminate the game soon
|
||||
};
|
||||
|
||||
|
||||
//
|
||||
// describes which notification timer has expired, for steam china duration control feature
|
||||
//
|
||||
// WARNING: DO NOT RENUMBER
|
||||
enum EDurationControlNotification {
|
||||
enum EDurationControlNotification
|
||||
{
|
||||
k_EDurationControlNotification_None = 0, // just informing you about progress, no notification to show
|
||||
k_EDurationControlNotification_1Hour = 1, // "you've been playing for N hours"
|
||||
|
||||
@ -659,23 +439,28 @@ enum EDurationControlNotification {
|
||||
k_EDurationControlNotification_ExitSoon_Night = 7,// game running after day period, game should exit - steam will terminate the game soon
|
||||
};
|
||||
|
||||
|
||||
//
|
||||
// Specifies a game's online state in relation to duration control
|
||||
//
|
||||
enum EDurationControlOnlineState {
|
||||
enum EDurationControlOnlineState
|
||||
{
|
||||
k_EDurationControlOnlineState_Invalid = 0, // nil value
|
||||
k_EDurationControlOnlineState_Offline = 1, // currently in offline play - single-player, offline co-op, etc.
|
||||
k_EDurationControlOnlineState_Online = 2, // currently in online play
|
||||
k_EDurationControlOnlineState_OnlineHighPri = 3, // currently in online play and requests not to be interrupted
|
||||
};
|
||||
|
||||
|
||||
#pragma pack( push, 1 )
|
||||
|
||||
#define CSTEAMID_DEFINED
|
||||
|
||||
// Steam ID structure (64 bits total)
|
||||
class CSteamID {
|
||||
class CSteamID
|
||||
{
|
||||
public:
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Constructor
|
||||
//-----------------------------------------------------------------------------
|
||||
@ -687,6 +472,7 @@ public:
|
||||
m_steamid.m_comp.m_unAccountInstance = 0;
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Constructor
|
||||
// Input : unAccountID - 32-bit account ID
|
||||
@ -698,6 +484,7 @@ public:
|
||||
Set( unAccountID, eUniverse, eAccountType );
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Constructor
|
||||
// Input : unAccountID - 32-bit account ID
|
||||
@ -713,6 +500,7 @@ public:
|
||||
InstancedSet( unAccountID, unAccountInstance, eUniverse, eAccountType );
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Constructor
|
||||
// Input : ulSteamID - 64-bit representation of a Steam ID
|
||||
@ -730,6 +518,7 @@ public:
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Sets parameters for steam ID
|
||||
// Input : unAccountID - 32-bit account ID
|
||||
@ -742,13 +531,17 @@ public:
|
||||
m_steamid.m_comp.m_EUniverse = eUniverse;
|
||||
m_steamid.m_comp.m_EAccountType = eAccountType;
|
||||
|
||||
if (eAccountType == k_EAccountTypeClan || eAccountType == k_EAccountTypeGameServer) {
|
||||
if ( eAccountType == k_EAccountTypeClan || eAccountType == k_EAccountTypeGameServer )
|
||||
{
|
||||
m_steamid.m_comp.m_unAccountInstance = 0;
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
m_steamid.m_comp.m_unAccountInstance = k_unSteamUserDefaultInstance;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Sets parameters for steam ID
|
||||
// Input : unAccountID - 32-bit account ID
|
||||
@ -763,6 +556,7 @@ public:
|
||||
m_steamid.m_comp.m_unAccountInstance = unInstance;
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Initializes a steam ID from its 52 bit parts and universe/type
|
||||
// Input : ulIdentifier - 52 bits of goodness
|
||||
@ -775,6 +569,7 @@ public:
|
||||
m_steamid.m_comp.m_EAccountType = eAccountType;
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Initializes a steam ID from its 64-bit representation
|
||||
// Input : ulSteamID - 64-bit representation of a Steam ID
|
||||
@ -784,6 +579,7 @@ public:
|
||||
m_steamid.m_unAll64Bits = ulSteamID;
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Clear all fields, leaving an invalid ID.
|
||||
//-----------------------------------------------------------------------------
|
||||
@ -795,6 +591,7 @@ public:
|
||||
m_steamid.m_comp.m_unAccountInstance = 0;
|
||||
}
|
||||
|
||||
|
||||
#if defined( INCLUDED_STEAM2_USERID_STRUCTS )
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Initializes a steam ID from a Steam2 ID structure
|
||||
@ -803,7 +600,8 @@ public:
|
||||
//-----------------------------------------------------------------------------
|
||||
void SetFromSteam2( TSteamGlobalUserID *pTSteamGlobalUserID, EUniverse eUniverse )
|
||||
{
|
||||
m_steamid.m_comp.m_unAccountID = pTSteamGlobalUserID->m_SteamLocalUserID.Split.Low32bits * 2 + pTSteamGlobalUserID->m_SteamLocalUserID.Split.High32bits;
|
||||
m_steamid.m_comp.m_unAccountID = pTSteamGlobalUserID->m_SteamLocalUserID.Split.Low32bits * 2 +
|
||||
pTSteamGlobalUserID->m_SteamLocalUserID.Split.High32bits;
|
||||
m_steamid.m_comp.m_EUniverse = eUniverse; // set the universe
|
||||
m_steamid.m_comp.m_EAccountType = k_EAccountTypeIndividual; // Steam 2 accounts always map to account type of individual
|
||||
m_steamid.m_comp.m_unAccountInstance = k_unSteamUserDefaultInstance; // Steam2 only knew one instance
|
||||
@ -833,6 +631,7 @@ public:
|
||||
return m_steamid.m_unAll64Bits;
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Converts the static parts of a steam ID to a 64-bit representation.
|
||||
// For multiseat accounts, all instances of that account will have the
|
||||
@ -846,6 +645,7 @@ public:
|
||||
return (uint64) ( ( ( (uint64) m_steamid.m_comp.m_EUniverse ) << 56 ) + ((uint64) m_steamid.m_comp.m_EAccountType << 52 ) + m_steamid.m_comp.m_unAccountID );
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: create an anonymous game server login to be filled in by the AM
|
||||
//-----------------------------------------------------------------------------
|
||||
@ -857,6 +657,7 @@ public:
|
||||
m_steamid.m_comp.m_unAccountInstance = 0;
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: create an anonymous game server login to be filled in by the AM
|
||||
//-----------------------------------------------------------------------------
|
||||
@ -908,6 +709,7 @@ public:
|
||||
return m_steamid.m_comp.m_EAccountType == k_EAccountTypeContentServer;
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Is this a clan account id?
|
||||
//-----------------------------------------------------------------------------
|
||||
@ -916,6 +718,7 @@ public:
|
||||
return m_steamid.m_comp.m_EAccountType == k_EAccountTypeClan;
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Is this a chat account id?
|
||||
//-----------------------------------------------------------------------------
|
||||
@ -933,6 +736,7 @@ public:
|
||||
&& ( m_steamid.m_comp.m_unAccountInstance & k_EChatInstanceFlagLobby );
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Is this an individual user account id?
|
||||
//-----------------------------------------------------------------------------
|
||||
@ -941,6 +745,7 @@ public:
|
||||
return m_steamid.m_comp.m_EAccountType == k_EAccountTypeIndividual || m_steamid.m_comp.m_EAccountType == k_EAccountTypeConsoleUser;
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Is this an anonymous account?
|
||||
//-----------------------------------------------------------------------------
|
||||
@ -1007,8 +812,10 @@ private:
|
||||
CSteamID( int32 );
|
||||
|
||||
// 64 bits total
|
||||
union SteamID_t {
|
||||
struct SteamIDComponent_t {
|
||||
union SteamID_t
|
||||
{
|
||||
struct SteamIDComponent_t
|
||||
{
|
||||
#ifdef VALVE_BIG_ENDIAN
|
||||
EUniverse m_EUniverse : 8; // universe this account belongs to
|
||||
unsigned int m_EAccountType : 4; // type of account - can't show as EAccountType, due to signed / unsigned difference
|
||||
@ -1034,17 +841,20 @@ inline bool CSteamID::IsValid() const
|
||||
if ( m_steamid.m_comp.m_EUniverse <= k_EUniverseInvalid || m_steamid.m_comp.m_EUniverse >= k_EUniverseMax )
|
||||
return false;
|
||||
|
||||
if (m_steamid.m_comp.m_EAccountType == k_EAccountTypeIndividual) {
|
||||
if ( m_steamid.m_comp.m_EAccountType == k_EAccountTypeIndividual )
|
||||
{
|
||||
if ( m_steamid.m_comp.m_unAccountID == 0 || m_steamid.m_comp.m_unAccountInstance != k_unSteamUserDefaultInstance )
|
||||
return false;
|
||||
}
|
||||
|
||||
if (m_steamid.m_comp.m_EAccountType == k_EAccountTypeClan) {
|
||||
if ( m_steamid.m_comp.m_EAccountType == k_EAccountTypeClan )
|
||||
{
|
||||
if ( m_steamid.m_comp.m_unAccountID == 0 || m_steamid.m_comp.m_unAccountInstance != 0 )
|
||||
return false;
|
||||
}
|
||||
|
||||
if (m_steamid.m_comp.m_EAccountType == k_EAccountTypeGameServer) {
|
||||
if ( m_steamid.m_comp.m_EAccountType == k_EAccountTypeGameServer )
|
||||
{
|
||||
if ( m_steamid.m_comp.m_unAccountID == 0 )
|
||||
return false;
|
||||
// Any limit on instances? We use them for local users and bots
|
||||
@ -1067,6 +877,7 @@ inline bool CSteamID::IsValid() const
|
||||
// wants to support the "Join Game" option in the friends list
|
||||
#define k_steamIDNonSteamGS CSteamID( 2, 0, k_EUniverseInvalid, k_EAccountTypeInvalid )
|
||||
|
||||
|
||||
#ifdef STEAM
|
||||
// Returns the matching chat steamID, with the default instance of 0
|
||||
// If the steamID passed in is already of type k_EAccountTypeChat it will be returned with the same instance
|
||||
@ -1081,11 +892,14 @@ CSteamID ClanIDFromChatID(const CSteamID& steamIDChat);
|
||||
|
||||
#endif // _STEAM
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: encapsulates an appID/modID pair
|
||||
//-----------------------------------------------------------------------------
|
||||
class CGameID {
|
||||
class CGameID
|
||||
{
|
||||
public:
|
||||
|
||||
CGameID()
|
||||
{
|
||||
m_gameID.m_nType = k_EGameIDTypeApp;
|
||||
@ -1140,71 +954,6 @@ public:
|
||||
const char *Render() const; // render this Game ID to string
|
||||
static const char *Render( uint64 ulGameID ); // static method to render a uint64 representation of a Game ID to a string
|
||||
|
||||
// must include checksum_crc.h first to get this functionality
|
||||
#if defined(CHECKSUM_CRC_H)
|
||||
CGameID(uint32 nAppID, const char* pchModPath)
|
||||
{
|
||||
m_ulGameID = 0;
|
||||
m_gameID.m_nAppID = nAppID;
|
||||
m_gameID.m_nType = k_EGameIDTypeGameMod;
|
||||
|
||||
char rgchModDir[MAX_PATH];
|
||||
V_FileBase(pchModPath, rgchModDir, sizeof(rgchModDir));
|
||||
CRC32_t crc32;
|
||||
CRC32_Init(&crc32);
|
||||
CRC32_ProcessBuffer(&crc32, rgchModDir, V_strlen(rgchModDir));
|
||||
CRC32_Final(&crc32);
|
||||
|
||||
// set the high-bit on the mod-id
|
||||
// reduces crc32 to 31bits, but lets us use the modID as a guaranteed unique
|
||||
// replacement for appID's
|
||||
m_gameID.m_nModID = crc32 | (0x80000000);
|
||||
}
|
||||
|
||||
CGameID(const char* pchExePath, const char* pchAppName)
|
||||
{
|
||||
m_ulGameID = 0;
|
||||
m_gameID.m_nAppID = k_uAppIdInvalid;
|
||||
m_gameID.m_nType = k_EGameIDTypeShortcut;
|
||||
|
||||
CRC32_t crc32;
|
||||
CRC32_Init(&crc32);
|
||||
if (pchExePath)
|
||||
CRC32_ProcessBuffer(&crc32, pchExePath, V_strlen(pchExePath));
|
||||
if (pchAppName)
|
||||
CRC32_ProcessBuffer(&crc32, pchAppName, V_strlen(pchAppName));
|
||||
CRC32_Final(&crc32);
|
||||
|
||||
// set the high-bit on the mod-id
|
||||
// reduces crc32 to 31bits, but lets us use the modID as a guaranteed unique
|
||||
// replacement for appID's
|
||||
m_gameID.m_nModID = crc32 | (0x80000000);
|
||||
}
|
||||
|
||||
#if defined(VSTFILEID_H)
|
||||
|
||||
CGameID(VstFileID vstFileID)
|
||||
{
|
||||
m_ulGameID = 0;
|
||||
m_gameID.m_nAppID = k_uAppIdInvalid;
|
||||
m_gameID.m_nType = k_EGameIDTypeP2P;
|
||||
|
||||
CRC32_t crc32;
|
||||
CRC32_Init(&crc32);
|
||||
const char* pchFileId = vstFileID.Render();
|
||||
CRC32_ProcessBuffer(&crc32, pchFileId, V_strlen(pchFileId));
|
||||
CRC32_Final(&crc32);
|
||||
|
||||
// set the high-bit on the mod-id
|
||||
// reduces crc32 to 31bits, but lets us use the modID as a guaranteed unique
|
||||
// replacement for appID's
|
||||
m_gameID.m_nModID = crc32 | (0x80000000);
|
||||
}
|
||||
|
||||
#endif /* VSTFILEID_H */
|
||||
|
||||
#endif /* CHECKSUM_CRC_H */
|
||||
|
||||
uint64 ToUint64() const
|
||||
{
|
||||
return m_ulGameID;
|
||||
@ -1268,7 +1017,8 @@ public:
|
||||
bool IsValid() const
|
||||
{
|
||||
// each type has it's own invalid fixed point:
|
||||
switch (m_gameID.m_nType) {
|
||||
switch( m_gameID.m_nType )
|
||||
{
|
||||
case k_EGameIDTypeApp:
|
||||
return m_gameID.m_nAppID != k_uAppIdInvalid;
|
||||
|
||||
@ -1284,6 +1034,7 @@ public:
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void Reset()
|
||||
@ -1291,15 +1042,20 @@ public:
|
||||
m_ulGameID = 0;
|
||||
}
|
||||
|
||||
private:
|
||||
enum EGameIDType {
|
||||
//
|
||||
// Internal stuff. Use the accessors above if possible
|
||||
//
|
||||
|
||||
enum EGameIDType
|
||||
{
|
||||
k_EGameIDTypeApp = 0,
|
||||
k_EGameIDTypeGameMod = 1,
|
||||
k_EGameIDTypeShortcut = 2,
|
||||
k_EGameIDTypeP2P = 3,
|
||||
};
|
||||
|
||||
struct GameID_t {
|
||||
struct GameID_t
|
||||
{
|
||||
#ifdef VALVE_BIG_ENDIAN
|
||||
unsigned int m_nModID : 32;
|
||||
unsigned int m_nType : 8;
|
||||
@ -1311,7 +1067,8 @@ private:
|
||||
#endif
|
||||
};
|
||||
|
||||
union {
|
||||
union
|
||||
{
|
||||
uint64 m_ulGameID;
|
||||
GameID_t m_gameID;
|
||||
};
|
||||
@ -1321,12 +1078,6 @@ private:
|
||||
|
||||
const int k_cchGameExtraInfoMax = 64;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Constants used for query ports.
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#define QUERY_PORT_NOT_INITIALIZED 0xFFFF // We haven't asked the GS for this query port's actual value yet.
|
||||
#define QUERY_PORT_ERROR 0xFFFE // We were unable to get the query port for this server.
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Passed as argument to SteamAPI_UseBreakpadCrashHandler to enable optional callback
|
||||
@ -1334,13 +1085,8 @@ const int k_cchGameExtraInfoMax = 64;
|
||||
//-----------------------------------------------------------------------------
|
||||
typedef void (*PFNPreMinidumpCallback)(void *context);
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Used by ICrashHandler interfaces to reference particular installed crash handlers
|
||||
//-----------------------------------------------------------------------------
|
||||
typedef void* BREAKPAD_HANDLE;
|
||||
#define BREAKPAD_INVALID_HANDLE (BREAKPAD_HANDLE)0
|
||||
|
||||
enum EGameSearchErrorCode_t {
|
||||
enum EGameSearchErrorCode_t
|
||||
{
|
||||
k_EGameSearchErrorCode_OK = 1,
|
||||
k_EGameSearchErrorCode_Failed_Search_Already_In_Progress = 2,
|
||||
k_EGameSearchErrorCode_Failed_No_Search_In_Progress = 3,
|
||||
@ -1352,7 +1098,8 @@ enum EGameSearchErrorCode_t {
|
||||
k_EGameSearchErrorCode_Failed_Unknown_Error = 9, // unknown error
|
||||
};
|
||||
|
||||
enum EPlayerResult_t {
|
||||
enum EPlayerResult_t
|
||||
{
|
||||
k_EPlayerResultFailedToConnect = 1, // failed to connect after confirming
|
||||
k_EPlayerResultAbandoned = 2, // quit game without completing it
|
||||
k_EPlayerResultKicked = 3, // kicked by other players/moderator/server rules
|
||||
@ -1360,19 +1107,23 @@ enum EPlayerResult_t {
|
||||
k_EPlayerResultCompleted = 5, // player completed game
|
||||
};
|
||||
|
||||
enum ESteamIPv6ConnectivityProtocol {
|
||||
|
||||
enum ESteamIPv6ConnectivityProtocol
|
||||
{
|
||||
k_ESteamIPv6ConnectivityProtocol_Invalid = 0,
|
||||
k_ESteamIPv6ConnectivityProtocol_HTTP = 1, // because a proxy may make this different than other protocols
|
||||
k_ESteamIPv6ConnectivityProtocol_UDP = 2, // test UDP connectivity. Uses a port that is commonly needed for other Steam stuff. If UDP works, TCP probably works.
|
||||
};
|
||||
|
||||
// For the above transport protocol, what do we think the local machine's connectivity to the internet over ipv6 is like
|
||||
enum ESteamIPv6ConnectivityState {
|
||||
enum ESteamIPv6ConnectivityState
|
||||
{
|
||||
k_ESteamIPv6ConnectivityState_Unknown = 0, // We haven't run a test yet
|
||||
k_ESteamIPv6ConnectivityState_Good = 1, // We have recently been able to make a request on ipv6 for the given protocol
|
||||
k_ESteamIPv6ConnectivityState_Bad = 2, // We failed to make a request, either because this machine has no ipv6 address assigned, or it has no upstream connectivity
|
||||
};
|
||||
|
||||
|
||||
// Define compile time assert macros to let us validate the structure sizes.
|
||||
#define VALVE_COMPILE_TIME_ASSERT( pred ) typedef char compile_time_assert_type[(pred) ? 1 : -1];
|
||||
|
||||
@ -1395,7 +1146,8 @@ enum ESteamIPv6ConnectivityState {
|
||||
#error ???
|
||||
#endif
|
||||
|
||||
typedef struct ValvePackingSentinel_t {
|
||||
typedef struct ValvePackingSentinel_t
|
||||
{
|
||||
uint32 m_u32;
|
||||
uint64 m_u64;
|
||||
uint16 m_u16;
|
||||
@ -1404,6 +1156,7 @@ typedef struct ValvePackingSentinel_t {
|
||||
|
||||
#pragma pack( pop )
|
||||
|
||||
|
||||
#if defined(VALVE_CALLBACK_PACK_SMALL)
|
||||
VALVE_COMPILE_TIME_ASSERT( sizeof(ValvePackingSentinel_t) == 24 )
|
||||
#elif defined(VALVE_CALLBACK_PACK_LARGE)
|
||||
|
@ -1,284 +0,0 @@
|
||||
//====== Copyright Valve Corporation, All rights reserved. ====================
|
||||
//
|
||||
// Types and utilities for handling steam datagram tickets. These are
|
||||
// useful for both the client and the backend ticket generating authority.
|
||||
//
|
||||
//=============================================================================
|
||||
|
||||
#ifndef STEAMDATAGRAM_TICKETS_H
|
||||
#define STEAMDATAGRAM_TICKETS_H
|
||||
#ifdef _WIN32
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
#ifndef assert
|
||||
#include <assert.h>
|
||||
#endif
|
||||
|
||||
#include "steamnetworkingtypes.h"
|
||||
#include <string.h>
|
||||
|
||||
#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
|
||||
|
||||
/// Max length of serialized auth ticket. This is important so that we
|
||||
/// can ensure that we always fit into a single UDP datagram (along with
|
||||
/// other certs and signatures) and keep the implementation simple.
|
||||
const size_t k_cbSteamDatagramMaxSerializedTicket = 512;
|
||||
|
||||
/// Network-routable identifier for a service. This is an intentionally
|
||||
/// opaque byte blob. The relays know how to use this to forward it on
|
||||
/// to the intended destination, but otherwise clients really should not
|
||||
/// need to know what's inside. (Indeed, we don't really want them to
|
||||
/// know, as it could reveal information useful to an attacker.)
|
||||
struct SteamDatagramHostedAddress {
|
||||
|
||||
// Size of data blob.
|
||||
int m_cbSize;
|
||||
|
||||
// Opaque data
|
||||
char m_data[128];
|
||||
|
||||
// Reset to empty state
|
||||
void Clear() { memset(this, 0, sizeof(*this)); }
|
||||
|
||||
// Parse the data center out of the blob.
|
||||
SteamNetworkingPOPID GetPopID() const { return CalculateSteamNetworkingPOPIDFromString(m_data); }
|
||||
|
||||
/// Set a dummy routing blob with a hardcoded IP:port. You should only use
|
||||
/// this in a dev environment, since the address is in plaintext!
|
||||
/// In production this information should come from the server,
|
||||
/// using ISteamNetworkingSockets::GetHostedDedicatedServerAddress
|
||||
void SetDevAddress(uint32 nIP, uint16 nPort, SteamNetworkingPOPID popid = 0)
|
||||
{
|
||||
GetSteamNetworkingLocationPOPStringFromID(popid, m_data);
|
||||
m_cbSize = 4;
|
||||
m_data[m_cbSize++] = 1;
|
||||
m_data[m_cbSize++] = 1;
|
||||
m_data[m_cbSize++] = char(nPort);
|
||||
m_data[m_cbSize++] = char(nPort >> 8);
|
||||
m_data[m_cbSize++] = char(nIP);
|
||||
m_data[m_cbSize++] = char(nIP >> 8);
|
||||
m_data[m_cbSize++] = char(nIP >> 16);
|
||||
m_data[m_cbSize++] = char(nIP >> 24);
|
||||
}
|
||||
|
||||
/// Convert to/from std::string (or anything that acts like it).
|
||||
/// Useful for interfacing with google protobuf. It's a template
|
||||
/// mainly so that we don't have to include <string> in the header.
|
||||
/// Note: by "string", we don't mean that it's text. It's a binary
|
||||
/// blob, and it might have zeros in it. (std::string can handle that.)
|
||||
template <typename T>
|
||||
bool SetFromStdString(const T& str)
|
||||
{
|
||||
if (str.length() >= sizeof(m_data)) {
|
||||
m_cbSize = 0;
|
||||
return false;
|
||||
}
|
||||
m_cbSize = (int)str.length();
|
||||
memcpy(m_data, str.c_str(), m_cbSize);
|
||||
return true;
|
||||
}
|
||||
template <typename T>
|
||||
void GetAsStdString(T* str) const
|
||||
{
|
||||
str->assign(m_data, m_cbSize);
|
||||
}
|
||||
};
|
||||
|
||||
/// Ticket used to gain access to the relay network.
|
||||
struct SteamDatagramRelayAuthTicket {
|
||||
SteamDatagramRelayAuthTicket() { Clear(); }
|
||||
|
||||
/// Reset all fields
|
||||
void Clear()
|
||||
{
|
||||
memset(this, 0, sizeof(*this));
|
||||
m_nRestrictToVirtualPort = -1;
|
||||
}
|
||||
|
||||
/// Identity of the gameserver we want to talk to. This is required.
|
||||
SteamNetworkingIdentity m_identityGameserver;
|
||||
|
||||
/// Identity of the person who was authorized. This is required.
|
||||
SteamNetworkingIdentity m_identityAuthorizedClient;
|
||||
|
||||
/// SteamID is authorized to send from a particular public IP. If this
|
||||
/// is 0, then the sender is not restricted to a particular IP.
|
||||
///
|
||||
/// Recommend to leave this set to zero.
|
||||
uint32 m_unPublicIP;
|
||||
|
||||
/// Time when the ticket expires. Recommended: take the current
|
||||
/// time and add 6 hours, or maybe a bit longer if your gameplay
|
||||
/// sessions are longer.
|
||||
///
|
||||
/// NOTE: relays may reject tickets with expiry times excessively
|
||||
/// far in the future, so contact us if you wish to use an expiry
|
||||
/// longer than, say, 24 hours.
|
||||
RTime32 m_rtimeTicketExpiry;
|
||||
|
||||
/// Routing information where the gameserver is listening for
|
||||
/// relayed traffic. You should fill this in when generating
|
||||
/// a ticket.
|
||||
///
|
||||
/// When generating tickets on your backend:
|
||||
/// - In production: The gameserver knows the proper routing
|
||||
/// information, so you need to call
|
||||
/// ISteamNetworkingSockets::GetHostedDedicatedServerAddress
|
||||
/// and send the info to your backend.
|
||||
/// - In development, you will need to provide public IP
|
||||
/// of the server using SteamDatagramServiceNetID::SetDevAddress.
|
||||
/// Relays need to be able to send UDP
|
||||
/// packets to this server. Since it's very likely that
|
||||
/// your server is behind a firewall/NAT, make sure that
|
||||
/// the address is the one that the outside world can use.
|
||||
/// The traffic from the relays will be "unsolicited", so
|
||||
/// stateful firewalls won't work -- you will probably have
|
||||
/// to set up an explicit port forward.
|
||||
/// On the client:
|
||||
/// - this field will always be blank.
|
||||
SteamDatagramHostedAddress m_routing;
|
||||
|
||||
/// App ID this is for. This is required, and should be the
|
||||
/// App ID the client is running. (Even if your gameserver
|
||||
/// uses a different App ID.)
|
||||
uint32 m_nAppID;
|
||||
|
||||
/// Restrict this ticket to be used for a particular virtual port?
|
||||
/// Set to -1 to allow any virtual port.
|
||||
///
|
||||
/// This is useful as a security measure, and also so the client will
|
||||
/// use the right ticket (which might have extra fields that are useful
|
||||
/// for proper analytics), if the client happens to have more than one
|
||||
/// appropriate ticket.
|
||||
///
|
||||
/// Note: if a client has more that one acceptable ticket, they will
|
||||
/// always use the one expiring the latest.
|
||||
int m_nRestrictToVirtualPort;
|
||||
|
||||
//
|
||||
// Extra fields.
|
||||
//
|
||||
// These are collected for backend analytics. For example, you might
|
||||
// send a MatchID so that all of the records for a particular match can
|
||||
// be located. Or send a game mode field so that you can compare
|
||||
// the network characteristics of different game modes.
|
||||
//
|
||||
// (At the time of this writing we don't have a way to expose the data
|
||||
// we collect to partners, but we hope to in the future so that you can
|
||||
// get visibility into network conditions.)
|
||||
//
|
||||
|
||||
struct ExtraField {
|
||||
enum EType {
|
||||
k_EType_String,
|
||||
k_EType_Int, // For most small integral values. Uses google protobuf sint64, so it's small on the wire. WARNING: In some places this value may be transmitted in JSON, in which case precision may be lost in backend analytics. Don't use this for an "identifier", use it for a scalar quantity.
|
||||
k_EType_Fixed64, // 64 arbitrary bits. This value is treated as an "identifier". In places where JSON format is used, it will be serialized as a string. No aggregation / analytics can be performed on this value.
|
||||
};
|
||||
int /* EType */ m_eType;
|
||||
char m_szName[28];
|
||||
|
||||
union {
|
||||
char m_szStringValue[128];
|
||||
int64 m_nIntValue;
|
||||
uint64 m_nFixed64Value;
|
||||
};
|
||||
};
|
||||
enum { k_nMaxExtraFields = 16 };
|
||||
int m_nExtraFields;
|
||||
ExtraField m_vecExtraFields[k_nMaxExtraFields];
|
||||
|
||||
/// Helper to add an extra field in a single call
|
||||
void AddExtraField_Int(const char* pszName, int64 val)
|
||||
{
|
||||
ExtraField* p = AddExtraField(pszName, ExtraField::k_EType_Int);
|
||||
if (p)
|
||||
p->m_nIntValue = val;
|
||||
}
|
||||
void AddExtraField_Fixed64(const char* pszName, uint64 val)
|
||||
{
|
||||
ExtraField* p = AddExtraField(pszName, ExtraField::k_EType_Fixed64);
|
||||
if (p)
|
||||
p->m_nFixed64Value = val;
|
||||
}
|
||||
void AddExtraField_String(const char* pszName, const char* val)
|
||||
{
|
||||
ExtraField* p = AddExtraField(pszName, ExtraField::k_EType_String);
|
||||
if (p) {
|
||||
size_t l = strlen(val);
|
||||
if (l > sizeof(p->m_szStringValue) - 1)
|
||||
l = sizeof(p->m_szStringValue) - 1;
|
||||
memcpy(p->m_szStringValue, val, l);
|
||||
p->m_szStringValue[l] = '\0';
|
||||
}
|
||||
}
|
||||
|
||||
private:
|
||||
ExtraField* AddExtraField(const char* pszName, ExtraField::EType eType)
|
||||
{
|
||||
if (m_nExtraFields >= k_nMaxExtraFields) {
|
||||
assert(false);
|
||||
return NULL;
|
||||
}
|
||||
ExtraField* p = &m_vecExtraFields[m_nExtraFields++];
|
||||
p->m_eType = eType;
|
||||
|
||||
size_t l = strlen(pszName);
|
||||
if (l > sizeof(p->m_szName) - 1)
|
||||
l = sizeof(p->m_szName) - 1;
|
||||
memcpy(p->m_szName, pszName, l);
|
||||
p->m_szName[l] = '\0';
|
||||
return p;
|
||||
}
|
||||
};
|
||||
|
||||
#pragma pack(pop)
|
||||
|
||||
/// Max size of user data blob
|
||||
const size_t k_cbMaxSteamDatagramGameCoordinatorServerLoginAppData = 2048;
|
||||
|
||||
/// Max size of serialized data blob
|
||||
const size_t k_cbMaxSteamDatagramGameCoordinatorServerLoginSerialized = 4096;
|
||||
|
||||
/// Structure that describes a gameserver attempting to authenticate
|
||||
/// with your central server allocator / matchmaking service ("game coordinator").
|
||||
/// This is useful because the game coordinator needs to know:
|
||||
///
|
||||
/// - What data center is the gameserver running in?
|
||||
/// - The routing blob of the gameserver
|
||||
/// - Is the gameserver actually trusted?
|
||||
///
|
||||
/// Using this structure, you can securely communicate this information
|
||||
/// to your server, and you can do this WITHOUT maintaining any
|
||||
/// whitelists or tables of IP addresses.
|
||||
///
|
||||
/// See ISteamNetworkingSockets::GetGameCoordinatorServerLogin
|
||||
struct SteamDatagramGameCoordinatorServerLogin {
|
||||
/// Server's identity
|
||||
SteamNetworkingIdentity m_identity;
|
||||
|
||||
/// Routing info. Note that this includes the POPID
|
||||
SteamDatagramHostedAddress m_routing;
|
||||
|
||||
/// AppID that the server thinks it is running
|
||||
AppId_t m_nAppID;
|
||||
|
||||
/// Unix timestamp when this was generated
|
||||
RTime32 m_rtime;
|
||||
|
||||
/// Size of application data
|
||||
int m_cbAppData;
|
||||
|
||||
/// Application data. This is any additional information
|
||||
/// that you need to identify the server not contained above.
|
||||
/// (E.g. perhaps a public IP as seen by the coordinator service.)
|
||||
char m_appData[k_cbMaxSteamDatagramGameCoordinatorServerLoginAppData];
|
||||
};
|
||||
|
||||
#endif // STEAMDATAGRAM_TICKETS_H
|
@ -12,6 +12,7 @@
|
||||
|
||||
static const int k_nSteamEncryptedAppTicketSymmetricKeyLen = 32;
|
||||
|
||||
|
||||
S_API bool SteamEncryptedAppTicket_BDecryptTicket( const uint8 *rgubTicketEncrypted, uint32 cubTicketEncrypted,
|
||||
uint8 *rgubTicketDecrypted, uint32 *pcubTicketDecrypted,
|
||||
const uint8 rgubKey[k_nSteamEncryptedAppTicketSymmetricKeyLen], int cubKey );
|
||||
|
@ -14,7 +14,8 @@
|
||||
// HTTP related types
|
||||
|
||||
// This enum is used in client API methods, do not re-number existing values.
|
||||
enum EHTTPMethod {
|
||||
enum EHTTPMethod
|
||||
{
|
||||
k_EHTTPMethodInvalid = 0,
|
||||
k_EHTTPMethodGET,
|
||||
k_EHTTPMethodHEAD,
|
||||
@ -31,9 +32,11 @@ enum EHTTPMethod {
|
||||
// k_EHTTPMethodCONNECT
|
||||
};
|
||||
|
||||
|
||||
// HTTP Status codes that the server can send in response to a request, see rfc2616 section 10.3 for descriptions
|
||||
// of each of these.
|
||||
enum EHTTPStatusCode {
|
||||
enum EHTTPStatusCode
|
||||
{
|
||||
// Invalid status code (this isn't defined in HTTP, used to indicate unset in our code)
|
||||
k_EHTTPStatusCodeInvalid = 0,
|
||||
|
||||
|
@ -8,10 +8,10 @@
|
||||
#define STEAMNETWORKINGTYPES
|
||||
#pragma once
|
||||
|
||||
#include "steamclientpublic.h"
|
||||
#include "steamtypes.h"
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
#include <stdint.h>
|
||||
#include "steamtypes.h"
|
||||
#include "steamclientpublic.h"
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// SteamNetworkingSockets config.
|
||||
@ -98,7 +98,8 @@ typedef uint32 SteamNetworkingPOPID;
|
||||
typedef int64 SteamNetworkingMicroseconds;
|
||||
|
||||
/// Describe the status of a particular network resource
|
||||
enum ESteamNetworkingAvailability {
|
||||
enum ESteamNetworkingAvailability
|
||||
{
|
||||
// Negative values indicate a problem.
|
||||
//
|
||||
// In general, we will not automatically retry unless you take some action that
|
||||
@ -118,6 +119,7 @@ enum ESteamNetworkingAvailability {
|
||||
|
||||
k_ESteamNetworkingAvailability_Current = 100, // Resource is online/available
|
||||
|
||||
|
||||
k_ESteamNetworkingAvailability_Unknown = 0, // Internal dummy/sentinel, or value is not applicable in this context
|
||||
k_ESteamNetworkingAvailability__Force32bit = 0x7fffffff,
|
||||
};
|
||||
@ -127,9 +129,10 @@ enum ESteamNetworkingAvailability {
|
||||
//
|
||||
|
||||
/// Different methods of describing the identity of a network host
|
||||
enum ESteamNetworkingIdentityType {
|
||||
enum ESteamNetworkingIdentityType
|
||||
{
|
||||
// Dummy/empty/invalid.
|
||||
// Plese note that if we parse a string that we don't recognize
|
||||
// Please note that if we parse a string that we don't recognize
|
||||
// but that appears reasonable, we will NOT use this type. Instead
|
||||
// we'll use k_ESteamNetworkingIdentityType_UnknownType.
|
||||
k_ESteamNetworkingIdentityType_Invalid = 0,
|
||||
@ -178,7 +181,8 @@ enum ESteamNetworkingIdentityType {
|
||||
/// Store an IP and port. IPv6 is always used; IPv4 is represented using
|
||||
/// "IPv4-mapped" addresses: IPv4 aa.bb.cc.dd => IPv6 ::ffff:aabb:ccdd
|
||||
/// (RFC 4291 section 2.5.5.2.)
|
||||
struct SteamNetworkingIPAddr {
|
||||
struct SteamNetworkingIPAddr
|
||||
{
|
||||
void Clear(); // Set everything to zero. E.g. [::]:0
|
||||
bool IsIPv6AllZeros() const; // Return true if the IP is ::0. (Doesn't check port.)
|
||||
void SetIPv6( const uint8 *ipv6, uint16 nPort ); // Set IPv6 address. IP is interpreted as bytes, so there are no endian issues. (Same as inaddr_in6.) The IP can be a mapped IPv4 address
|
||||
@ -213,7 +217,8 @@ struct SteamNetworkingIPAddr {
|
||||
uint8 m_ip[ 4 ]; // NOTE: As bytes, i.e. network byte order
|
||||
};
|
||||
|
||||
union {
|
||||
union
|
||||
{
|
||||
uint8 m_ipv6[ 16 ];
|
||||
IPv4MappedAddress m_ipv4;
|
||||
};
|
||||
@ -228,7 +233,8 @@ struct SteamNetworkingIPAddr {
|
||||
/// used on the wire in several places, even though it is less efficient, in order to
|
||||
/// facilitate forward compatibility. (Old client code can handle an identity type that
|
||||
/// it doesn't understand.)
|
||||
struct SteamNetworkingIdentity {
|
||||
struct SteamNetworkingIdentity
|
||||
{
|
||||
/// Type of identity.
|
||||
ESteamNetworkingIdentityType m_eType;
|
||||
|
||||
@ -306,7 +312,8 @@ struct SteamNetworkingIdentity {
|
||||
//
|
||||
|
||||
/// High level connection status
|
||||
enum ESteamNetworkingConnectionState {
|
||||
enum ESteamNetworkingConnectionState
|
||||
{
|
||||
|
||||
/// Dummy value used to indicate an error condition in the API.
|
||||
/// Specified connection doesn't exist or has already been closed.
|
||||
@ -412,7 +419,8 @@ enum ESteamNetworkingConnectionState {
|
||||
/// Enumerate various causes of connection termination. These are designed to work similar
|
||||
/// to HTTP error codes: the numeric range gives you a rough classification as to the source
|
||||
/// of the problem.
|
||||
enum ESteamNetConnectionEnd {
|
||||
enum ESteamNetConnectionEnd
|
||||
{
|
||||
// Invalid/sentinel value
|
||||
k_ESteamNetConnectionEnd_Invalid = 0,
|
||||
|
||||
@ -527,13 +535,9 @@ enum ESteamNetConnectionEnd {
|
||||
// - etc
|
||||
k_ESteamNetConnectionEnd_Remote_BadCert = 4003,
|
||||
|
||||
// We couldn't rendezvous with the remote host because
|
||||
// they aren't logged into Steam
|
||||
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,
|
||||
// These will never be returned
|
||||
//k_ESteamNetConnectionEnd_Remote_NotLoggedIn_DEPRECATED = 4004,
|
||||
//k_ESteamNetConnectionEnd_Remote_NotRunningApp_DEPRECATED = 4005,
|
||||
|
||||
// Something wrong with the protocol version you are using.
|
||||
// (Probably the code you are running is too old.)
|
||||
@ -567,10 +571,7 @@ enum ESteamNetConnectionEnd {
|
||||
// or on their end.
|
||||
k_ESteamNetConnectionEnd_Misc_Timeout = 5003,
|
||||
|
||||
// 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,
|
||||
//k_ESteamNetConnectionEnd_Misc_RelayConnectivity_DEPRECATED = 5004,
|
||||
|
||||
// There's some trouble talking to Steam.
|
||||
k_ESteamNetConnectionEnd_Misc_SteamConnectivity = 5005,
|
||||
@ -624,7 +625,8 @@ const int k_cchSteamNetworkingMaxConnectionCloseReason = 128;
|
||||
const int k_cchSteamNetworkingMaxConnectionDescription = 128;
|
||||
|
||||
/// Describe the state of a connection.
|
||||
struct SteamNetConnectionInfo_t {
|
||||
struct SteamNetConnectionInfo_t
|
||||
{
|
||||
|
||||
/// Who is on the other end? Depending on the connection type and phase of the connection, we might not know
|
||||
SteamNetworkingIdentity m_identityRemote;
|
||||
@ -675,7 +677,8 @@ struct SteamNetConnectionInfo_t {
|
||||
|
||||
/// Quick connection state, pared down to something you could call
|
||||
/// more frequently without it being too big of a perf hit.
|
||||
struct SteamNetworkingQuickConnectionStatus {
|
||||
struct SteamNetworkingQuickConnectionStatus
|
||||
{
|
||||
|
||||
/// High level state of the connection
|
||||
ESteamNetworkingConnectionState m_eState;
|
||||
@ -757,7 +760,8 @@ struct SteamNetworkingQuickConnectionStatus {
|
||||
const int k_cbMaxSteamNetworkingSocketsMessageSizeSend = 512 * 1024;
|
||||
|
||||
/// A message that has been received.
|
||||
struct SteamNetworkingMessage_t {
|
||||
struct SteamNetworkingMessage_t
|
||||
{
|
||||
|
||||
/// Message payload
|
||||
void *m_pData;
|
||||
@ -836,10 +840,7 @@ struct SteamNetworkingMessage_t {
|
||||
|
||||
// For code compatibility, some accessors
|
||||
#ifndef API_GEN
|
||||
inline uint32 GetSize() const
|
||||
{
|
||||
return m_cbSize;
|
||||
}
|
||||
inline uint32 GetSize() const { return m_cbSize; }
|
||||
inline const void *GetData() const { return m_pData; }
|
||||
inline int GetChannel() const { return m_nChannel; }
|
||||
inline HSteamNetConnection GetConnection() const { return m_conn; }
|
||||
@ -984,7 +985,8 @@ const int k_nSteamNetworkingSend_AutoRestartBrokenSession = 32;
|
||||
/// send it over the wire, or persist it in a file or database! If you need
|
||||
/// to do that, convert it to a string representation using the methods in
|
||||
/// ISteamNetworkingUtils().
|
||||
struct SteamNetworkPingLocation_t {
|
||||
struct SteamNetworkPingLocation_t
|
||||
{
|
||||
uint8 m_data[ 512 ];
|
||||
};
|
||||
|
||||
@ -1004,7 +1006,8 @@ const int k_nSteamNetworkingPing_Unknown = -2;
|
||||
//
|
||||
|
||||
/// Configuration values can be applied to different types of objects.
|
||||
enum ESteamNetworkingConfigScope {
|
||||
enum ESteamNetworkingConfigScope
|
||||
{
|
||||
|
||||
/// Get/set global option, or defaults. Even options that apply to more specific scopes
|
||||
/// have global scope, and you may be able to just change the global defaults. If you
|
||||
@ -1031,7 +1034,8 @@ enum ESteamNetworkingConfigScope {
|
||||
};
|
||||
|
||||
// Different configuration values have different data types
|
||||
enum ESteamNetworkingConfigDataType {
|
||||
enum ESteamNetworkingConfigDataType
|
||||
{
|
||||
k_ESteamNetworkingConfig_Int32 = 1,
|
||||
k_ESteamNetworkingConfig_Int64 = 2,
|
||||
k_ESteamNetworkingConfig_Float = 3,
|
||||
@ -1042,34 +1046,13 @@ enum ESteamNetworkingConfigDataType {
|
||||
};
|
||||
|
||||
/// Configuration options
|
||||
enum ESteamNetworkingConfigValue {
|
||||
enum ESteamNetworkingConfigValue
|
||||
{
|
||||
k_ESteamNetworkingConfig_Invalid = 0,
|
||||
|
||||
/// [global float, 0--100] Randomly discard N pct of packets instead of sending/recv
|
||||
/// This is a global option only, since it is applied at a low level
|
||||
/// where we don't have much context
|
||||
k_ESteamNetworkingConfig_FakePacketLoss_Send = 2,
|
||||
k_ESteamNetworkingConfig_FakePacketLoss_Recv = 3,
|
||||
|
||||
/// [global int32]. Delay all outbound/inbound packets by N ms
|
||||
k_ESteamNetworkingConfig_FakePacketLag_Send = 4,
|
||||
k_ESteamNetworkingConfig_FakePacketLag_Recv = 5,
|
||||
|
||||
/// [global float] 0-100 Percentage of packets we will add additional delay
|
||||
/// to (causing them to be reordered)
|
||||
k_ESteamNetworkingConfig_FakePacketReorder_Send = 6,
|
||||
k_ESteamNetworkingConfig_FakePacketReorder_Recv = 7,
|
||||
|
||||
/// [global int32] Extra delay, in ms, to apply to reordered packets.
|
||||
k_ESteamNetworkingConfig_FakePacketReorder_Time = 8,
|
||||
|
||||
/// [global float 0--100] Globally duplicate some percentage of packets we send
|
||||
k_ESteamNetworkingConfig_FakePacketDup_Send = 26,
|
||||
k_ESteamNetworkingConfig_FakePacketDup_Recv = 27,
|
||||
|
||||
/// [global int32] Amount of delay, in ms, to delay duplicated packets.
|
||||
/// (We chose a random delay between 0 and this value)
|
||||
k_ESteamNetworkingConfig_FakePacketDup_TimeMax = 28,
|
||||
//
|
||||
// Connection options
|
||||
//
|
||||
|
||||
/// [connection int32] Timeout value (in ms) to use when first connecting
|
||||
k_ESteamNetworkingConfig_TimeoutInitial = 24,
|
||||
@ -1082,6 +1065,41 @@ enum ESteamNetworkingConfigValue {
|
||||
/// Default is 512k (524288 bytes)
|
||||
k_ESteamNetworkingConfig_SendBufferSize = 9,
|
||||
|
||||
/// [connection int64] Get/set userdata as a configuration option.
|
||||
/// The default value is -1. You may want to set the user data as
|
||||
/// a config value, instead of using ISteamNetworkingSockets::SetConnectionUserData
|
||||
/// in two specific instances:
|
||||
///
|
||||
/// - You wish to set the userdata atomically when creating
|
||||
/// an outbound connection, so that the userdata is filled in properly
|
||||
/// for any callbacks that happen. However, note that this trick
|
||||
/// only works for connections initiated locally! For incoming
|
||||
/// connections, multiple state transitions may happen and
|
||||
/// callbacks be queued, before you are able to service the first
|
||||
/// callback! Be careful!
|
||||
///
|
||||
/// - You can set the default userdata for all newly created connections
|
||||
/// by setting this value at a higher level (e.g. on the listen
|
||||
/// socket or at the global level.) Then this default
|
||||
/// value will be inherited when the connection is created.
|
||||
/// This is useful in case -1 is a valid userdata value, and you
|
||||
/// wish to use something else as the default value so you can
|
||||
/// tell if it has been set or not.
|
||||
///
|
||||
/// HOWEVER: once a connection is created, the effective value is
|
||||
/// then bound to the connection. Unlike other connection options,
|
||||
/// if you change it again at a higher level, the new value will not
|
||||
/// be inherited by connections.
|
||||
///
|
||||
/// Using the userdata field in callback structs is not advised because
|
||||
/// of tricky race conditions. Instead, you might try one of these methods:
|
||||
///
|
||||
/// - Use a separate map with the HSteamNetConnection as the key.
|
||||
/// - Fetch the userdata from the connection in your callback
|
||||
/// using ISteamNetworkingSockets::GetConnectionUserData, to
|
||||
// ensure you have the current value.
|
||||
k_ESteamNetworkingConfig_ConnectionUserData = 40,
|
||||
|
||||
/// [connection int32] Minimum/maximum send rate clamp, 0 is no limit.
|
||||
/// This value will control the min/max allowed sending rate that
|
||||
/// bandwidth estimation is allowed to reach. Default is 0 (no-limit)
|
||||
@ -1241,6 +1259,59 @@ enum ESteamNetworkingConfigValue {
|
||||
/// This value should not be read or written in any other context.
|
||||
k_ESteamNetworkingConfig_LocalVirtualPort = 38,
|
||||
|
||||
|
||||
//
|
||||
// Simulating network conditions
|
||||
//
|
||||
// These are global (not per-connection) because they apply at
|
||||
// a relatively low UDP layer.
|
||||
//
|
||||
|
||||
/// [global float, 0--100] Randomly discard N pct of packets instead of sending/recv
|
||||
/// This is a global option only, since it is applied at a low level
|
||||
/// where we don't have much context
|
||||
k_ESteamNetworkingConfig_FakePacketLoss_Send = 2,
|
||||
k_ESteamNetworkingConfig_FakePacketLoss_Recv = 3,
|
||||
|
||||
/// [global int32]. Delay all outbound/inbound packets by N ms
|
||||
k_ESteamNetworkingConfig_FakePacketLag_Send = 4,
|
||||
k_ESteamNetworkingConfig_FakePacketLag_Recv = 5,
|
||||
|
||||
/// [global float] 0-100 Percentage of packets we will add additional delay
|
||||
/// to (causing them to be reordered)
|
||||
k_ESteamNetworkingConfig_FakePacketReorder_Send = 6,
|
||||
k_ESteamNetworkingConfig_FakePacketReorder_Recv = 7,
|
||||
|
||||
/// [global int32] Extra delay, in ms, to apply to reordered packets.
|
||||
k_ESteamNetworkingConfig_FakePacketReorder_Time = 8,
|
||||
|
||||
/// [global float 0--100] Globally duplicate some percentage of packets we send
|
||||
k_ESteamNetworkingConfig_FakePacketDup_Send = 26,
|
||||
k_ESteamNetworkingConfig_FakePacketDup_Recv = 27,
|
||||
|
||||
/// [global int32] Amount of delay, in ms, to delay duplicated packets.
|
||||
/// (We chose a random delay between 0 and this value)
|
||||
k_ESteamNetworkingConfig_FakePacketDup_TimeMax = 28,
|
||||
|
||||
/// [global int32] Trace every UDP packet, similar to Wireshark or tcpdump.
|
||||
/// Value is max number of bytes to dump. -1 disables tracing.
|
||||
// 0 only traces the info but no actual data bytes
|
||||
k_ESteamNetworkingConfig_PacketTraceMaxBytes = 41,
|
||||
|
||||
|
||||
// [global int32] Global UDP token bucket rate limits.
|
||||
// "Rate" refers to the steady state rate. (Bytes/sec, the
|
||||
// rate that tokens are put into the bucket.) "Burst"
|
||||
// refers to the max amount that could be sent in a single
|
||||
// burst. (In bytes, the max capacity of the bucket.)
|
||||
// Rate=0 disables the limiter entirely, which is the default.
|
||||
// Burst=0 disables burst. (This is not realistic. A
|
||||
// burst of at least 4K is recommended; the default is higher.)
|
||||
k_ESteamNetworkingConfig_FakeRateLimit_Send_Rate = 42,
|
||||
k_ESteamNetworkingConfig_FakeRateLimit_Send_Burst = 43,
|
||||
k_ESteamNetworkingConfig_FakeRateLimit_Recv_Rate = 44,
|
||||
k_ESteamNetworkingConfig_FakeRateLimit_Recv_Burst = 45,
|
||||
|
||||
//
|
||||
// Callbacks
|
||||
//
|
||||
@ -1309,7 +1380,7 @@ enum ESteamNetworkingConfigValue {
|
||||
k_ESteamNetworkingConfig_Callback_CreateConnectionSignaling = 206,
|
||||
|
||||
//
|
||||
// P2P settings
|
||||
// P2P connection settings
|
||||
//
|
||||
|
||||
// /// [listen socket int32] When you create a P2P listen socket, we will automatically
|
||||
@ -1427,7 +1498,8 @@ const int k_nSteamNetworkingConfig_P2P_Transport_ICE_Enable_All = 0x7fffffff;
|
||||
/// when the object is created, we just iterate over the list of options and call
|
||||
/// ISteamNetworkingUtils::SetConfigValueStruct, where the scope arguments are supplied by the
|
||||
/// object being created.
|
||||
struct SteamNetworkingConfigValue_t {
|
||||
struct SteamNetworkingConfigValue_t
|
||||
{
|
||||
/// Which option is being set
|
||||
ESteamNetworkingConfigValue m_eValue;
|
||||
|
||||
@ -1435,7 +1507,8 @@ struct SteamNetworkingConfigValue_t {
|
||||
ESteamNetworkingConfigDataType m_eDataType;
|
||||
|
||||
/// Option value
|
||||
union {
|
||||
union
|
||||
{
|
||||
int32_t m_int32;
|
||||
int64_t m_int64;
|
||||
float m_float;
|
||||
@ -1479,7 +1552,8 @@ struct SteamNetworkingConfigValue_t {
|
||||
};
|
||||
|
||||
/// Return value of ISteamNetworkintgUtils::GetConfigValue
|
||||
enum ESteamNetworkingGetConfigValueResult {
|
||||
enum ESteamNetworkingGetConfigValueResult
|
||||
{
|
||||
k_ESteamNetworkingGetConfigValue_BadValue = -1, // No such configuration value
|
||||
k_ESteamNetworkingGetConfigValue_BadScopeObj = -2, // Bad connection handle, etc
|
||||
k_ESteamNetworkingGetConfigValue_BufferTooSmall = -3, // Couldn't fit the result in your buffer
|
||||
@ -1495,7 +1569,8 @@ enum ESteamNetworkingGetConfigValueResult {
|
||||
|
||||
/// Detail level for diagnostic output callback.
|
||||
/// See ISteamNetworkingUtils::SetDebugOutputFunction
|
||||
enum ESteamNetworkingSocketsDebugOutputType {
|
||||
enum ESteamNetworkingSocketsDebugOutputType
|
||||
{
|
||||
k_ESteamNetworkingSocketsDebugOutputType_None = 0,
|
||||
k_ESteamNetworkingSocketsDebugOutputType_Bug = 1, // You used the API incorrectly, or an internal error happened
|
||||
k_ESteamNetworkingSocketsDebugOutputType_Error = 2, // Run-time error condition that isn't the result of a bug. (E.g. we are offline, cannot bind a port, etc)
|
||||
@ -1530,9 +1605,11 @@ inline SteamNetworkingPOPID CalculateSteamNetworkingPOPIDFromString(const char*
|
||||
//
|
||||
// There is also extra paranoia to make sure the bytes are not treated as signed.
|
||||
SteamNetworkingPOPID result = (uint32)(uint8)pszCode[0] << 16U;
|
||||
if (pszCode[1]) {
|
||||
if ( pszCode[1] )
|
||||
{
|
||||
result |= ( (uint32)(uint8)pszCode[1] << 8U );
|
||||
if (pszCode[2]) {
|
||||
if ( pszCode[2] )
|
||||
{
|
||||
result |= (uint32)(uint8)pszCode[2] | ( (uint32)(uint8)pszCode[3] << 24U );
|
||||
}
|
||||
}
|
||||
@ -1557,14 +1634,15 @@ inline void GetSteamNetworkingLocationPOPStringFromID(SteamNetworkingPOPID id, c
|
||||
const SteamNetworkingPOPID k_SteamDatagramPOPID_dev = ( (uint32)'d' << 16U ) | ( (uint32)'e' << 8U ) | (uint32)'v';
|
||||
|
||||
/// Utility class for printing a SteamNetworkingPOPID.
|
||||
struct SteamNetworkingPOPIDRender {
|
||||
struct SteamNetworkingPOPIDRender
|
||||
{
|
||||
SteamNetworkingPOPIDRender( SteamNetworkingPOPID x ) { GetSteamNetworkingLocationPOPStringFromID( x, buf ); }
|
||||
inline const char *c_str() const { return buf; }
|
||||
|
||||
private:
|
||||
char buf[ 8 ];
|
||||
};
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Internal stuff
|
||||
@ -1575,40 +1653,12 @@ typedef SteamNetworkingMessage_t ISteamNetworkingMessage;
|
||||
typedef SteamNetworkingErrMsg SteamDatagramErrMsg;
|
||||
|
||||
inline void SteamNetworkingIPAddr::Clear() { memset( this, 0, sizeof(*this) ); }
|
||||
inline bool SteamNetworkingIPAddr::IsIPv6AllZeros() const
|
||||
{
|
||||
const uint64* q = (const uint64*)m_ipv6;
|
||||
return q[0] == 0 && q[1] == 0;
|
||||
}
|
||||
inline void SteamNetworkingIPAddr::SetIPv6(const uint8* ipv6, uint16 nPort)
|
||||
{
|
||||
memcpy(m_ipv6, ipv6, 16);
|
||||
m_port = nPort;
|
||||
}
|
||||
inline void SteamNetworkingIPAddr::SetIPv4(uint32 nIP, uint16 nPort)
|
||||
{
|
||||
m_ipv4.m_8zeros = 0;
|
||||
m_ipv4.m_0000 = 0;
|
||||
m_ipv4.m_ffff = 0xffff;
|
||||
m_ipv4.m_ip[0] = uint8(nIP >> 24);
|
||||
m_ipv4.m_ip[1] = uint8(nIP >> 16);
|
||||
m_ipv4.m_ip[2] = uint8(nIP >> 8);
|
||||
m_ipv4.m_ip[3] = uint8(nIP);
|
||||
m_port = nPort;
|
||||
}
|
||||
inline bool SteamNetworkingIPAddr::IsIPv6AllZeros() const { const uint64 *q = (const uint64 *)m_ipv6; return q[0] == 0 && q[1] == 0; }
|
||||
inline void SteamNetworkingIPAddr::SetIPv6( const uint8 *ipv6, uint16 nPort ) { memcpy( m_ipv6, ipv6, 16 ); m_port = nPort; }
|
||||
inline void SteamNetworkingIPAddr::SetIPv4( uint32 nIP, uint16 nPort ) { m_ipv4.m_8zeros = 0; m_ipv4.m_0000 = 0; m_ipv4.m_ffff = 0xffff; m_ipv4.m_ip[0] = uint8(nIP>>24); m_ipv4.m_ip[1] = uint8(nIP>>16); m_ipv4.m_ip[2] = uint8(nIP>>8); m_ipv4.m_ip[3] = uint8(nIP); m_port = nPort; }
|
||||
inline bool SteamNetworkingIPAddr::IsIPv4() const { return m_ipv4.m_8zeros == 0 && m_ipv4.m_0000 == 0 && m_ipv4.m_ffff == 0xffff; }
|
||||
inline uint32 SteamNetworkingIPAddr::GetIPv4() const { return IsIPv4() ? ( (uint32(m_ipv4.m_ip[0])<<24) | (uint32(m_ipv4.m_ip[1])<<16) | (uint32(m_ipv4.m_ip[2])<<8) | uint32(m_ipv4.m_ip[3]) ) : 0; }
|
||||
inline void SteamNetworkingIPAddr::SetIPv6LocalHost(uint16 nPort)
|
||||
{
|
||||
m_ipv4.m_8zeros = 0;
|
||||
m_ipv4.m_0000 = 0;
|
||||
m_ipv4.m_ffff = 0;
|
||||
m_ipv6[12] = 0;
|
||||
m_ipv6[13] = 0;
|
||||
m_ipv6[14] = 0;
|
||||
m_ipv6[15] = 1;
|
||||
m_port = nPort;
|
||||
}
|
||||
inline void SteamNetworkingIPAddr::SetIPv6LocalHost( uint16 nPort ) { m_ipv4.m_8zeros = 0; m_ipv4.m_0000 = 0; m_ipv4.m_ffff = 0; m_ipv6[12] = 0; m_ipv6[13] = 0; m_ipv6[14] = 0; m_ipv6[15] = 1; m_port = nPort; }
|
||||
inline bool SteamNetworkingIPAddr::IsLocalHost() const { return ( m_ipv4.m_8zeros == 0 && m_ipv4.m_0000 == 0 && m_ipv4.m_ffff == 0 && m_ipv6[12] == 0 && m_ipv6[13] == 0 && m_ipv6[14] == 0 && m_ipv6[15] == 1 ) || ( GetIPv4() == 0x7f000001 ); }
|
||||
inline bool SteamNetworkingIPAddr::operator==(const SteamNetworkingIPAddr &x ) const { return memcmp( this, &x, sizeof(SteamNetworkingIPAddr) ) == 0; }
|
||||
|
||||
@ -1616,54 +1666,19 @@ inline void SteamNetworkingIdentity::Clear() { memset(this, 0, sizeof(*this)); }
|
||||
inline bool SteamNetworkingIdentity::IsInvalid() const { return m_eType == k_ESteamNetworkingIdentityType_Invalid; }
|
||||
inline void SteamNetworkingIdentity::SetSteamID( CSteamID steamID ) { SetSteamID64( steamID.ConvertToUint64() ); }
|
||||
inline CSteamID SteamNetworkingIdentity::GetSteamID() const { return CSteamID( GetSteamID64() ); }
|
||||
inline void SteamNetworkingIdentity::SetSteamID64(uint64 steamID)
|
||||
{
|
||||
m_eType = k_ESteamNetworkingIdentityType_SteamID;
|
||||
m_cbSize = sizeof(m_steamID64);
|
||||
m_steamID64 = steamID;
|
||||
}
|
||||
inline void SteamNetworkingIdentity::SetSteamID64( uint64 steamID ) { m_eType = k_ESteamNetworkingIdentityType_SteamID; m_cbSize = sizeof( m_steamID64 ); m_steamID64 = steamID; }
|
||||
inline uint64 SteamNetworkingIdentity::GetSteamID64() const { return m_eType == k_ESteamNetworkingIdentityType_SteamID ? m_steamID64 : 0; }
|
||||
inline void SteamNetworkingIdentity::SetIPAddr(const SteamNetworkingIPAddr& addr)
|
||||
{
|
||||
m_eType = k_ESteamNetworkingIdentityType_IPAddress;
|
||||
m_cbSize = (int)sizeof(m_ip);
|
||||
m_ip = addr;
|
||||
}
|
||||
inline void SteamNetworkingIdentity::SetIPAddr( const SteamNetworkingIPAddr &addr ) { m_eType = k_ESteamNetworkingIdentityType_IPAddress; m_cbSize = (int)sizeof(m_ip); m_ip = addr; }
|
||||
inline const SteamNetworkingIPAddr *SteamNetworkingIdentity::GetIPAddr() const { return m_eType == k_ESteamNetworkingIdentityType_IPAddress ? &m_ip : NULL; }
|
||||
inline void SteamNetworkingIdentity::SetLocalHost()
|
||||
{
|
||||
m_eType = k_ESteamNetworkingIdentityType_IPAddress;
|
||||
m_cbSize = (int)sizeof(m_ip);
|
||||
m_ip.SetIPv6LocalHost();
|
||||
}
|
||||
inline void SteamNetworkingIdentity::SetLocalHost() { m_eType = k_ESteamNetworkingIdentityType_IPAddress; m_cbSize = (int)sizeof(m_ip); m_ip.SetIPv6LocalHost(); }
|
||||
inline bool SteamNetworkingIdentity::IsLocalHost() const { return m_eType == k_ESteamNetworkingIdentityType_IPAddress && m_ip.IsLocalHost(); }
|
||||
inline bool SteamNetworkingIdentity::SetGenericString(const char* pszString)
|
||||
{
|
||||
size_t l = strlen(pszString);
|
||||
if (l >= sizeof(m_szGenericString))
|
||||
return false;
|
||||
m_eType = k_ESteamNetworkingIdentityType_GenericString;
|
||||
m_cbSize = int(l + 1);
|
||||
memcpy(m_szGenericString, pszString, m_cbSize);
|
||||
return true;
|
||||
}
|
||||
inline bool SteamNetworkingIdentity::SetGenericString( const char *pszString ) { size_t l = strlen( pszString ); if ( l >= sizeof(m_szGenericString) ) return false;
|
||||
m_eType = k_ESteamNetworkingIdentityType_GenericString; m_cbSize = int(l+1); memcpy( m_szGenericString, pszString, m_cbSize ); return true; }
|
||||
inline const char *SteamNetworkingIdentity::GetGenericString() const { return m_eType == k_ESteamNetworkingIdentityType_GenericString ? m_szGenericString : NULL; }
|
||||
inline bool SteamNetworkingIdentity::SetGenericBytes(const void* data, size_t cbLen)
|
||||
{
|
||||
if (cbLen > sizeof(m_genericBytes))
|
||||
return false;
|
||||
m_eType = k_ESteamNetworkingIdentityType_GenericBytes;
|
||||
m_cbSize = int(cbLen);
|
||||
memcpy(m_genericBytes, data, m_cbSize);
|
||||
return true;
|
||||
}
|
||||
inline const uint8* SteamNetworkingIdentity::GetGenericBytes(int& cbLen) const
|
||||
{
|
||||
if (m_eType != k_ESteamNetworkingIdentityType_GenericBytes)
|
||||
return NULL;
|
||||
cbLen = m_cbSize;
|
||||
return m_genericBytes;
|
||||
}
|
||||
inline bool SteamNetworkingIdentity::SetGenericBytes( const void *data, size_t cbLen ) { if ( cbLen > sizeof(m_genericBytes) ) return false;
|
||||
m_eType = k_ESteamNetworkingIdentityType_GenericBytes; m_cbSize = int(cbLen); memcpy( m_genericBytes, data, m_cbSize ); return true; }
|
||||
inline const uint8 *SteamNetworkingIdentity::GetGenericBytes( int &cbLen ) const { if ( m_eType != k_ESteamNetworkingIdentityType_GenericBytes ) return NULL;
|
||||
cbLen = m_cbSize; return m_genericBytes; }
|
||||
inline bool SteamNetworkingIdentity::operator==(const SteamNetworkingIdentity &x ) const { return m_eType == x.m_eType && m_cbSize == x.m_cbSize && memcmp( m_genericBytes, x.m_genericBytes, m_cbSize ) == 0; }
|
||||
inline void SteamNetworkingMessage_t::Release() { (*m_pfnRelease)( this ); }
|
||||
|
||||
|
@ -22,7 +22,8 @@
|
||||
#define STEAM_PS3_LANGUAGE_MAX 64
|
||||
#define STEAM_PS3_REGION_CODE_MAX 16
|
||||
#define STEAM_PS3_CURRENT_PARAMS_VER 2
|
||||
struct SteamPS3Params_t {
|
||||
struct SteamPS3Params_t
|
||||
{
|
||||
uint32 m_unVersion; // set to STEAM_PS3_CURRENT_PARAMS_VER
|
||||
|
||||
void *pReserved;
|
||||
@ -62,35 +63,41 @@ struct SteamPS3Params_t {
|
||||
// like: profile_on, profile_off, profile_dump, mem_stats, mem_validate.
|
||||
unsigned int m_cSteamInputTTY;
|
||||
|
||||
struct Ps3netInit_t {
|
||||
struct Ps3netInit_t
|
||||
{
|
||||
bool m_bNeedInit;
|
||||
void *m_pMemory;
|
||||
int m_nMemorySize;
|
||||
int m_flags;
|
||||
} m_sysNetInitInfo;
|
||||
|
||||
struct Ps3jpgInit_t {
|
||||
struct Ps3jpgInit_t
|
||||
{
|
||||
bool m_bNeedInit;
|
||||
} m_sysJpgInitInfo;
|
||||
|
||||
struct Ps3pngInit_t {
|
||||
struct Ps3pngInit_t
|
||||
{
|
||||
bool m_bNeedInit;
|
||||
} m_sysPngInitInfo;
|
||||
|
||||
struct Ps3sysutilUserInfo_t {
|
||||
struct Ps3sysutilUserInfo_t
|
||||
{
|
||||
bool m_bNeedInit;
|
||||
} m_sysSysUtilUserInfo;
|
||||
|
||||
bool m_bIncludeNewsPage;
|
||||
};
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------------------------------------------------------------------------------------//
|
||||
// PlayStation 3 memory structure
|
||||
//----------------------------------------------------------------------------------------------------------------------------------------------------------//
|
||||
#define STEAMPS3_MALLOC_INUSE 0x53D04A51
|
||||
#define STEAMPS3_MALLOC_SYSTEM 0x0D102C48
|
||||
#define STEAMPS3_MALLOC_OK 0xFFD04A51
|
||||
struct SteamPS3Memory_t {
|
||||
struct SteamPS3Memory_t
|
||||
{
|
||||
bool m_bSingleAllocation; // If true, Steam will request one 6MB allocation and use the returned memory for all future allocations
|
||||
// If false, Steam will make call malloc for each allocation
|
||||
|
||||
@ -101,4 +108,5 @@ struct SteamPS3Memory_t {
|
||||
size_t (*m_pUsable_size)(void*);
|
||||
};
|
||||
|
||||
|
||||
#endif // STEAMPS3PARAMS_H
|
||||
|
@ -17,26 +17,31 @@
|
||||
typedef unsigned char uint8;
|
||||
#endif
|
||||
|
||||
#if defined(__GNUC__) && !defined(POSIX)
|
||||
#if defined( __GNUC__ ) && !defined(_WIN32) && !defined(POSIX)
|
||||
#if __GNUC__ < 4
|
||||
#error "Steamworks requires GCC 4.X (4.2 or 4.4 have been tested)"
|
||||
#endif
|
||||
#define POSIX 1
|
||||
#endif
|
||||
|
||||
#if defined(__x86_64__) || defined(_WIN64) || defined(__aarch64__)
|
||||
#if defined(__LP64__) || defined(__x86_64__) || defined(_WIN64) || defined(__aarch64__) || defined(__s390x__)
|
||||
#define X64BITS
|
||||
#endif
|
||||
|
||||
#if !defined(VALVE_BIG_ENDIAN)
|
||||
#if defined(_PS3)
|
||||
// Make sure VALVE_BIG_ENDIAN gets set on PS3, may already be set previously in Valve internal code.
|
||||
#if !defined(VALVE_BIG_ENDIAN) && defined(_PS3)
|
||||
#define VALVE_BIG_ENDIAN
|
||||
#define VALVE_BIG_ENDIAN 1
|
||||
#endif
|
||||
#if defined( __GNUC__ ) && __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
|
||||
#define VALVE_BIG_ENDIAN 1
|
||||
#endif
|
||||
#endif
|
||||
|
||||
typedef unsigned char uint8;
|
||||
typedef signed char int8;
|
||||
|
||||
#if defined(_WIN32)
|
||||
#if defined( _WIN32 ) && !defined( __GNUC__ )
|
||||
|
||||
typedef __int16 int16;
|
||||
typedef unsigned __int16 uint16;
|
||||
@ -84,113 +89,37 @@ typedef unsigned int uintp;
|
||||
|
||||
#endif // else _WIN32
|
||||
|
||||
#ifdef API_GEN
|
||||
#define STEAM_CLANG_ATTR(ATTR) __attribute__((annotate(ATTR)))
|
||||
#else
|
||||
#define STEAM_CLANG_ATTR(ATTR)
|
||||
#endif
|
||||
|
||||
#define STEAM_METHOD_DESC(DESC) STEAM_CLANG_ATTR("desc:" #DESC ";")
|
||||
#define STEAM_IGNOREATTR() STEAM_CLANG_ATTR("ignore")
|
||||
#define STEAM_OUT_STRUCT() STEAM_CLANG_ATTR("out_struct: ;")
|
||||
#define STEAM_OUT_STRING() STEAM_CLANG_ATTR("out_string: ;")
|
||||
#define STEAM_OUT_ARRAY_CALL(COUNTER, FUNCTION, PARAMS) STEAM_CLANG_ATTR("out_array_call:" #COUNTER "," #FUNCTION "," #PARAMS ";")
|
||||
#define STEAM_OUT_ARRAY_COUNT(COUNTER, DESC) STEAM_CLANG_ATTR("out_array_count:" #COUNTER ";desc:" #DESC)
|
||||
#define STEAM_ARRAY_COUNT(COUNTER) STEAM_CLANG_ATTR("array_count:" #COUNTER ";")
|
||||
#define STEAM_ARRAY_COUNT_D(COUNTER, DESC) STEAM_CLANG_ATTR("array_count:" #COUNTER ";desc:" #DESC)
|
||||
#define STEAM_BUFFER_COUNT(COUNTER) STEAM_CLANG_ATTR("buffer_count:" #COUNTER ";")
|
||||
#define STEAM_OUT_BUFFER_COUNT(COUNTER) STEAM_CLANG_ATTR("out_buffer_count:" #COUNTER ";")
|
||||
#define STEAM_OUT_STRING_COUNT(COUNTER) STEAM_CLANG_ATTR("out_string_count:" #COUNTER ";")
|
||||
#define STEAM_DESC(DESC) STEAM_CLANG_ATTR("desc:" #DESC ";")
|
||||
#define STEAM_CALL_RESULT(RESULT_TYPE) STEAM_CLANG_ATTR("callresult:" #RESULT_TYPE ";")
|
||||
#define STEAM_CALL_BACK(RESULT_TYPE) STEAM_CLANG_ATTR("callback:" #RESULT_TYPE ";")
|
||||
#define STEAM_FLAT_NAME(NAME) STEAM_CLANG_ATTR("flat_name:" #NAME ";")
|
||||
|
||||
const int k_cubSaltSize = 8;
|
||||
typedef uint8 Salt_t[k_cubSaltSize];
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// GID (GlobalID) stuff
|
||||
// This is a globally unique identifier. It's guaranteed to be unique across all
|
||||
// racks and servers for as long as a given universe persists.
|
||||
//-----------------------------------------------------------------------------
|
||||
// NOTE: for GID parsing/rendering and other utils, see gid.h
|
||||
typedef uint64 GID_t;
|
||||
|
||||
const GID_t k_GIDNil = 0xffffffffffffffffull;
|
||||
|
||||
// For convenience, we define a number of types that are just new names for GIDs
|
||||
typedef uint64 JobID_t; // Each Job has a unique ID
|
||||
typedef GID_t TxnID_t; // Each financial transaction has a unique ID
|
||||
|
||||
const GID_t k_TxnIDNil = k_GIDNil;
|
||||
const GID_t k_TxnIDUnknown = 0;
|
||||
|
||||
const JobID_t k_JobIDNil = 0xffffffffffffffffull;
|
||||
|
||||
// this is baked into client messages and interfaces as an int,
|
||||
// make sure we never break this.
|
||||
typedef uint32 PackageId_t;
|
||||
const PackageId_t k_uPackageIdInvalid = 0xFFFFFFFF;
|
||||
|
||||
typedef uint32 BundleId_t;
|
||||
const BundleId_t k_uBundleIdInvalid = 0;
|
||||
|
||||
// this is baked into client messages and interfaces as an int,
|
||||
// make sure we never break this.
|
||||
typedef uint32 AppId_t;
|
||||
const AppId_t k_uAppIdInvalid = 0x0;
|
||||
|
||||
typedef uint64 AssetClassId_t;
|
||||
const AssetClassId_t k_ulAssetClassIdInvalid = 0x0;
|
||||
|
||||
typedef uint32 PhysicalItemId_t;
|
||||
const PhysicalItemId_t k_uPhysicalItemIdInvalid = 0x0;
|
||||
|
||||
// this is baked into client messages and interfaces as an int,
|
||||
// make sure we never break this. AppIds and DepotIDs also presently
|
||||
// share the same namespace, but since we'd like to change that in the future
|
||||
// I've defined it seperately here.
|
||||
// AppIds and DepotIDs also presently share the same namespace
|
||||
typedef uint32 DepotId_t;
|
||||
const DepotId_t k_uDepotIdInvalid = 0x0;
|
||||
|
||||
// RTime32
|
||||
// We use this 32 bit time representing real world time.
|
||||
// It offers 1 second resolution beginning on January 1, 1970 (Unix time)
|
||||
// RTime32. Seconds elapsed since Jan 1 1970, i.e. unix timestamp.
|
||||
// It's the same as time_t, but it is always 32-bit and unsigned.
|
||||
typedef uint32 RTime32;
|
||||
|
||||
typedef uint32 CellID_t;
|
||||
const CellID_t k_uCellIDInvalid = 0xFFFFFFFF;
|
||||
|
||||
// handle to a Steam API call
|
||||
typedef uint64 SteamAPICall_t;
|
||||
const SteamAPICall_t k_uAPICallInvalid = 0x0;
|
||||
|
||||
typedef uint32 AccountID_t;
|
||||
|
||||
typedef uint32 PartnerId_t;
|
||||
const PartnerId_t k_uPartnerIdInvalid = 0;
|
||||
|
||||
// ID for a depot content manifest
|
||||
typedef uint64 ManifestId_t;
|
||||
const ManifestId_t k_uManifestIdInvalid = 0;
|
||||
|
||||
// ID for cafe sites
|
||||
typedef uint64 SiteId_t;
|
||||
const SiteId_t k_ulSiteIdInvalid = 0;
|
||||
|
||||
// Party Beacon ID
|
||||
typedef uint64 PartyBeaconID_t;
|
||||
const PartyBeaconID_t k_ulPartyBeaconIdInvalid = 0;
|
||||
|
||||
enum ESteamIPType {
|
||||
enum ESteamIPType
|
||||
{
|
||||
k_ESteamIPTypeIPv4 = 0,
|
||||
k_ESteamIPTypeIPv6 = 1,
|
||||
};
|
||||
|
||||
#pragma pack( push, 1 )
|
||||
|
||||
struct SteamIPAddress_t {
|
||||
struct SteamIPAddress_t
|
||||
{
|
||||
union {
|
||||
|
||||
uint32 m_unIPv4; // Host order
|
||||
@ -204,9 +133,12 @@ struct SteamIPAddress_t {
|
||||
|
||||
bool IsSet() const
|
||||
{
|
||||
if (k_ESteamIPTypeIPv4 == m_eType) {
|
||||
if ( k_ESteamIPTypeIPv4 == m_eType )
|
||||
{
|
||||
return m_unIPv4 != 0;
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
return m_ipv6Qword[0] !=0 || m_ipv6Qword[1] != 0;
|
||||
}
|
||||
}
|
||||
|
@ -10,8 +10,10 @@
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
|
||||
// Steam universes. Each universe is a self-contained Steam instance.
|
||||
enum EUniverse {
|
||||
enum EUniverse
|
||||
{
|
||||
k_EUniverseInvalid = 0,
|
||||
k_EUniversePublic = 1,
|
||||
k_EUniverseBeta = 2,
|
||||
@ -21,4 +23,5 @@ enum EUniverse {
|
||||
k_EUniverseMax
|
||||
};
|
||||
|
||||
|
||||
#endif // STEAMUNIVERSE_H
|
||||
|
Binary file not shown.
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:ce6f48938493b90ffa175fc93f2b8ee5189e5db81f1274d5b57c9841d6fe4179
|
||||
size 239904
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -100,19 +100,19 @@ public slots:
|
||||
QObject::connect(item.get(), &SteamWorkshopItem::userNeedsToAcceptWorkshopLegalAgreement, this, &UploadListModel::userNeedsToAcceptWorkshopLegalAgreement);
|
||||
|
||||
QObject::connect(item.get(), &SteamWorkshopItem::uploadProgressChanged, this, [this]() {
|
||||
emit this->dataChanged(index(0, 0), index(rowCount() - 1, 0), QVector { static_cast<int>(UploadListModelRole::UploadProgressRole) });
|
||||
emit this->dataChanged(index(0, 0), index(rowCount() - 1, 0), QVector<int> { static_cast<int>(UploadListModelRole::UploadProgressRole) });
|
||||
});
|
||||
QObject::connect(item.get(), &SteamWorkshopItem::nameChanged, this, [this]() {
|
||||
emit this->dataChanged(index(0, 0), index(rowCount() - 1, 0), QVector { static_cast<int>(UploadListModelRole::NameRole) });
|
||||
emit this->dataChanged(index(0, 0), index(rowCount() - 1, 0), QVector<int> { static_cast<int>(UploadListModelRole::NameRole) });
|
||||
});
|
||||
QObject::connect(item.get(), &SteamWorkshopItem::absolutePreviewImagePathChanged, this, [this]() {
|
||||
emit this->dataChanged(index(0, 0), index(rowCount() - 1, 0), QVector { static_cast<int>(UploadListModelRole::AbsolutePreviewImagePath) });
|
||||
emit this->dataChanged(index(0, 0), index(rowCount() - 1, 0), QVector<int> { static_cast<int>(UploadListModelRole::AbsolutePreviewImagePath) });
|
||||
});
|
||||
QObject::connect(item.get(), &SteamWorkshopItem::uploadComplete, this, [this](bool successful) {
|
||||
emit this->dataChanged(index(0, 0), index(rowCount() - 1, 0), QVector { static_cast<int>(UploadListModelRole::AbsolutePreviewImagePath) });
|
||||
emit this->dataChanged(index(0, 0), index(rowCount() - 1, 0), QVector<int> { static_cast<int>(UploadListModelRole::AbsolutePreviewImagePath) });
|
||||
});
|
||||
QObject::connect(item.get(), &SteamWorkshopItem::statusChanged, this, [this](ScreenPlayWorkshopSteamEnums::EResult status) {
|
||||
emit this->dataChanged(index(0, 0), index(rowCount() - 1, 0), QVector { static_cast<int>(UploadListModelRole::Status) });
|
||||
emit this->dataChanged(index(0, 0), index(rowCount() - 1, 0), QVector<int> { static_cast<int>(UploadListModelRole::Status) });
|
||||
|
||||
// Check if all items are
|
||||
|
||||
|
@ -43,6 +43,7 @@ if __name__ == "__main__":
|
||||
"doctest",
|
||||
"benchmark",
|
||||
"libarchive",
|
||||
"cpp-httplib"
|
||||
]
|
||||
|
||||
vcpkg_triplet = ""
|
||||
|
Loading…
Reference in New Issue
Block a user