1
0
mirror of https://gitlab.com/kelteseth/ScreenPlay.git synced 2024-09-18 08:22:33 +02:00

Merge remote-tracking branch 'origin/master'

This commit is contained in:
Elias Steurer 2022-11-02 16:39:57 +01:00
commit 6e78909060
127 changed files with 13927 additions and 14550 deletions

View File

@ -13,11 +13,9 @@ if(WIN32)
elseif(UNIX AND NOT APPLE)
set(VCPKG_ARCH "x64-linux")
elseif(APPLE)
# CMAKE_HOST_SYSTEM_PROCESSOR returns the value of `uname -p` on host.
# Universal builds are not available with vcpkg,
# but the prebuild Qt binaries are. CMake also handles
# https://github.com/microsoft/vcpkg/discussions/19454
# This means we must compile twice and then merge the binaries with lipo
# CMAKE_HOST_SYSTEM_PROCESSOR returns the value of `uname -p` on host. Universal builds are not available with vcpkg, but the prebuild
# Qt binaries are. CMake also handles https://github.com/microsoft/vcpkg/discussions/19454 This means we must compile twice and then
# merge the binaries with lipo
if(CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL x86_64 OR CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL amd64)
set(VCPKG_ARCH "x64-osx")
set(CMAKE_OSX_ARCHITECTURES "x86_64")
@ -37,21 +35,18 @@ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/CMake" ${CMAKE_MODULE_PATH})
# This is needed for OSX:
# Because we bundle ScreenPlay and ScreenPlayWallpaper into .app
# they both need other QML dependencies like ScreenPlayUtil.
# The fastest way is to use a shared QML module path for development
# and add this path to the qml engines import pah.
# For the SCREENPLAY_DEPLOY we copy them into the matching dirs
# via the build.py
# This is needed for OSX: Because we bundle ScreenPlay and ScreenPlayWallpaper into .app they both need other QML dependencies like
# ScreenPlayUtil. The fastest way is to use a shared QML module path for development and add this path to the qml engines import pah. For
# the SCREENPLAY_DEPLOY we copy them into the matching dirs via the build.py
#
# This subdirectoy is needed for OSX and Linux to fix linker errors because
# we would have ScreenPlayApp executable and folder for the qml files in the
# same directory.
# This subdirectoy is needed for OSX and Linux to fix linker errors because we would have ScreenPlayApp executable and folder for the qml
# files in the same directory.
set(SCREENPLAY_QML_MODULES_PATH "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/qml")
# Adds the qml import path so QtCreator can find them
list(APPEND QML_DIRS "${SCREENPLAY_QML_MODULES_PATH}")
set(QML_IMPORT_PATH "${QML_DIRS}" CACHE STRING "Qt Creator extra qml import paths")
set(QML_IMPORT_PATH
"${QML_DIRS}"
CACHE STRING "Qt Creator extra qml import paths")
set(SCREENPLAY_IFW_ROOT "")
set(SCREENPLAY_IFW_VERSION "4.4")
@ -61,7 +56,8 @@ set(VCPKG_INSTALLED_PATH "${VCPKG_PATH}/installed/${VCPKG_ARCH}")
set(VCPKG_BIN_PATH "${VCPKG_INSTALLED_PATH}/bin")
option(SCREENPLAY_STEAM "For FOSS distribution so we do not bundle proprietary code." ON)
option(SCREENPLAY_DEPLOY "Marks this version as an official deploy version. This version uses different import paths and other settings." OFF)
option(SCREENPLAY_DEPLOY "Marks this version as an official deploy version. This version uses different import paths and other settings."
OFF)
option(SCREENPLAY_TESTS "Enables UI tests." ON)
option(SCREENPLAY_INSTALLER "Indicates whether an installer via the Qt Installer Framework is created." OFF)
@ -78,7 +74,6 @@ if(${SCREENPLAY_DEPLOY})
add_compile_definitions(DEPLOY_VERSION)
endif()
find_package(Git REQUIRED)
if(WIN32)
set(DATE_COMMAND "CMD")
@ -132,12 +127,10 @@ add_subdirectory(ScreenPlayWeather)
add_subdirectory(ThirdParty/QArchive)
add_subdirectory(Tools)
if(${SCREENPLAY_TESTS})
enable_testing()
endif()
# Only add target SteamSDKQtEnums
add_subdirectory(ScreenPlayWorkshop/SteamSDK)
if(${SCREENPLAY_STEAM})

View File

@ -5,6 +5,7 @@ set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOMOC ON)
set(SOURCES
# cmake-format: sort
src/app.cpp
src/create.cpp
src/createimportvideo.cpp
@ -23,6 +24,7 @@ set(SOURCES
src/wizards.cpp)
set(HEADER
# cmake-format: sort
inc/public/ScreenPlay/app.h
inc/public/ScreenPlay/create.h
inc/public/ScreenPlay/createimportstates.h
@ -43,15 +45,16 @@ set(HEADER
inc/public/ScreenPlay/wizards.h)
set(QML
# cmake-format: sort
main.qml
qml/Community/Community.qml
qml/Community/CommunityNavItem.qml
qml/Community/XMLNewsfeed.qml
qml/Create/Wizard.qml
qml/Create/Create.qml
qml/Create/CreateSidebar.qml
qml/Create/StartInfo.qml
qml/Create/StartInfoLinkImage.qml
qml/Create/Wizard.qml
qml/Create/Wizards/GifWallpaper.qml
qml/Create/Wizards/HTMLWallpaper.qml
qml/Create/Wizards/HTMLWidget.qml
@ -72,8 +75,8 @@ set(QML
qml/Create/WizardsFiles/QMLWallpaperMain.qml
qml/Create/WizardsFiles/QMLWidgetMain.qml
qml/Installed/Installed.qml
qml/Installed/InstalledWelcomeScreen.qml
qml/Installed/InstalledNavigation.qml
qml/Installed/InstalledWelcomeScreen.qml
qml/Installed/ScreenPlayItem.qml
qml/Installed/ScreenPlayItemImage.qml
qml/Installed/Sidebar.qml
@ -83,9 +86,8 @@ set(QML
qml/Monitors/MonitorSelectionItem.qml
qml/Monitors/MonitorsProjectSettingItem.qml
qml/Monitors/SaveNotification.qml
qml/Navigation/ExitPopup.qml
qml/Navigation/Navigation.qml
qml/Navigation/WindowNavButton.qml
qml/Navigation/WindowNavigation.qml
qml/Settings/SettingBool.qml
qml/Settings/Settings.qml
qml/Settings/SettingsButton.qml
@ -97,6 +99,7 @@ set(QML
qml/Workshop/Workshop.qml)
set(TS_FILES
# cmake-format: sort
translations/ScreenPlay_.ts
translations/ScreenPlay_de_DE.ts
translations/ScreenPlay_es_ES.ts
@ -112,15 +115,19 @@ set(TS_FILES
translations/ScreenPlay_zh_CN.ts)
set(RESOURCES
assets/WorkshopPreview.html
# cmake-format: sort
"legal/Font Awesome Free License.txt"
"legal/Qt LGPLv3.txt"
assets/icons/app.ico
assets/icons/brand_github.svg
assets/icons/brand_gitlab.svg
assets/icons/brand_reddit.svg
assets/icons/brand_twitch.svg
assets/icons/brand_twitter.svg
assets/icons/exclamation-triangle-solid.svg
assets/icons/font-awsome/close.svg
assets/icons/font-awsome/frown-o.svg
assets/icons/font-awsome/patreon-brands.svg
assets/icons/icon_arrow_left.svg
assets/icons/icon_arrow_right.svg
assets/icons/icon_build.svg
@ -137,10 +144,12 @@ set(RESOURCES
assets/icons/icon_folder_open.svg
assets/icons/icon_forum.svg
assets/icons/icon_help_center.svg
assets/icons/icon_import_export_.svg
assets/icons/icon_indicator_down.svg
assets/icons/icon_info.svg
assets/icons/icon_installed.svg
assets/icons/icon_launch.svg
assets/icons/icon_minimize.svg
assets/icons/icon_movie.svg
assets/icons/icon_new_releases.svg
assets/icons/icon_open_in_new.svg
@ -153,28 +162,38 @@ set(RESOURCES
assets/icons/icon_settings.svg
assets/icons/icon_share.svg
assets/icons/icon_single_image.svg
assets/icons/icon_sort-down-solid.svg
assets/icons/icon_sort-up-solid.svg
assets/icons/icon_steam.svg
assets/icons/icon_supervisor_account.svg
assets/icons/icon_thumb_down.svg
assets/icons/icon_thumb_up.svg
assets/icons/icon_upload.svg
assets/icons/icon_video_settings_black_24dp.svg
assets/icons/icon_volume.svg
assets/icons/icon_volume_mute.svg
assets/icons/icon_volume_up.svg
assets/icons/icon_widgets.svg
assets/icons/icon_window.svg
assets/icons/item_banner_new.svg
assets/icons/monitor_setup.svg
assets/icons/steam_default_avatar.png
assets/images/Early_Access.png
assets/images/Intro.png
assets/images/Intro_PC.png
assets/images/Intro_shine.png
assets/images/Window.svg
assets/images/mask_round.svg
assets/images/mask_workshop.png
assets/images/missingPreview.png
assets/images/noisy-texture-3.png
assets/images/noisy-texture.png
assets/images/scale_window_indicator.png
assets/images/steam_offline.png
assets/images/trayIcon_windows.png
assets/images/Window.svg
assets/licenses/Apache2.txt
assets/licenses/OFL.txt
assets/macos/app.screenplay.plist
assets/particle/backgroundGlow.png
assets/particle/dot.png
assets/shader/movingcolorramp.fsh
@ -197,6 +216,8 @@ set(RESOURCES
assets/startinfo/sharex.png
assets/startinfo/unsplash.png
assets/startinfo/vscode.png
assets/wizards/example_html.png
assets/wizards/example_qml.png
assets/wizards/License_All_Rights_Reserved_1.0.txt
assets/wizards/License_Apache_2.0.txt
assets/wizards/License_CC0_1.0.txt
@ -204,35 +225,18 @@ set(RESOURCES
assets/wizards/License_CC_Attribution-ShareAlike_4.0.txt
assets/wizards/License_CC_Attribution_4.0.txt
assets/wizards/License_GPL_3.0.txt
assets/wizards/example_html.png
assets/wizards/example_qml.png
assets/WorkshopPreview.html
legal/DataProtection.txt
"legal/Font Awesome Free License.txt"
legal/OFL.txt
legal/OpenSSL.txt
"legal/Qt LGPLv3.txt"
legal/gpl-3.0.txt
legal/lgpl-2.1.txt
legal/OFL.txt
legal/OpenSSL.txt
profiles.json
qtquickcontrols2.conf
assets/images/Early_Access.png
assets/icons/icon_sort-up-solid.svg
assets/icons/icon_sort-down-solid.svg
assets/icons/brand_reddit.svg
assets/icons/icon_import_export_.svg
assets/icons/steam_default_avatar.png
assets/macos/app.screenplay.plist
assets/icons/item_banner_new.svg
qml/Create/WizardsFiles/HTMLWallpaperMain.html
qml/Create/WizardsFiles/HTMLWidgetMain.html
assets/icons/icon_minimize.svg
assets/icons/icon_video_settings_black_24dp.svg
qml/Create/WizardsFiles/QMLWallpaperMain.qml
qml/Create/WizardsFiles/QMLWidgetMain.qml
assets/icons/font-awsome/patreon-brands.svg
assets/images/steam_offline.png
assets/images/scale_window_indicator.png
)
qtquickcontrols2.conf)
# Needed on macos
find_package(Threads REQUIRED)
@ -266,7 +270,8 @@ qt_add_qml_module(
ScreenPlayApp
OUTPUT_DIRECTORY
${SCREENPLAY_QML_MODULES_PATH}/${PROJECT_NAME}App
RESOURCE_PREFIX /qml
RESOURCE_PREFIX
/qml
VERSION
1.0
QML_FILES
@ -275,8 +280,7 @@ qt_add_qml_module(
${SOURCES}
${HEADER}
RESOURCES
${RESOURCES}
)
${RESOURCES})
target_link_libraries(
ScreenPlayApp
PUBLIC ScreenPlaySDK
@ -311,7 +315,8 @@ if(${SCREENPLAY_TESTS})
endif()
if(APPLE)
set_source_files_properties(${TS_FILES} PROPERTIES OUTPUT_LOCATION "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${PROJECT_NAME}.app/Contents/Resources/translations")
set_source_files_properties(
${TS_FILES} PROPERTIES OUTPUT_LOCATION "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${PROJECT_NAME}.app/Contents/Resources/translations")
else()
set_source_files_properties(${TS_FILES} PROPERTIES OUTPUT_LOCATION "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/translations")
endif()
@ -331,7 +336,9 @@ target_include_directories(
PUBLIC inc/public/
PRIVATE src/)
if(WIN32 OR UNIX AND NOT APPLE)
if(WIN32
OR UNIX
AND NOT APPLE)
include(CopyRecursive)
set(FONTS_OUT_DIR ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/assets/fonts)
file(MAKE_DIRECTORY ${FONTS_OUT_DIR})
@ -412,5 +419,4 @@ if(APPLE)
copy_recursive(${CMAKE_CURRENT_SOURCE_DIR}/assets/fonts ${FONTS_OUT_DIR} "*.ttf")
copy_recursive(${CMAKE_CURRENT_SOURCE_DIR}/assets/fonts ${FONTS_OUT_DIR} "*.otf")
endif()

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

View File

@ -71,7 +71,6 @@ namespace ScreenPlay {
class App : public QObject {
Q_OBJECT
Q_PROPERTY(QQmlApplicationEngine* mainWindowEngine READ mainWindowEngine WRITE setMainWindowEngine NOTIFY mainWindowEngineChanged)
Q_PROPERTY(GlobalVariables* globalVariables READ globalVariables WRITE setGlobalVariables NOTIFY globalVariablesChanged)
Q_PROPERTY(ScreenPlayManager* screenPlayManager READ screenPlayManager WRITE setScreenPlayManager NOTIFY screenPlayManagerChanged)

View File

@ -58,8 +58,6 @@
#include "ScreenPlay/createimportvideo.h"
#include "ScreenPlay/globalvariables.h"
#include "ScreenPlay/util.h"
#include "ScreenPlayUtil/util.h"
namespace ScreenPlay {

View File

@ -45,12 +45,13 @@
#include <QJsonParseError>
#include <QObject>
#include <QProcess>
#include <QQmlEngine>
#include <QScopeGuard>
#include <QString>
#include <QThread>
#include <QtMath>
#include "ScreenPlay/createimportstates.h"
#include "ScreenPlay/util.h"
namespace ScreenPlay {

View File

@ -41,7 +41,7 @@
#include <QUrl>
#include <QVersionNumber>
#include "ScreenPlayUtil/contenttypes.h"
#include <QQmlEngine>
namespace ScreenPlay {

View File

@ -49,8 +49,6 @@
#include "screenplaywallpaper.h"
#include "screenplaywidget.h"
#include "settings.h"
#include "util.h"
#include <memory>
#include <optional>

View File

@ -45,7 +45,6 @@
#include "ScreenPlay/projectsettingslistmodel.h"
#include "ScreenPlay/sdkconnection.h"
#include "ScreenPlay/settings.h"
#include "ScreenPlay/util.h"
namespace ScreenPlay {

View File

@ -67,10 +67,6 @@
#include <memory>
#include <optional>
#ifdef Q_OS_WIN
#include <qt_windows.h>
#endif
namespace ScreenPlay {
class ActiveProfile;
@ -153,18 +149,11 @@ public:
Theme theme() const { return m_theme; }
bool steamVersion() const { return m_steamVersion; }
DesktopEnvironment desktopEnvironment() const { return m_desktopEnvironment; }
void setupLanguage();
const QString &buildInfos() const
{
return m_buildInfos;
}
const QString& buildInfos() const { return m_buildInfos; }
signals:
void requestRetranslation();
void resetInstalledListmodel();
void autostartChanged(bool autostart);
void highPriorityStartChanged(bool highPriorityStart);
void hasWorkshopBannerSeenChanged(bool hasWorkshopBannerSeen);
@ -180,10 +169,10 @@ signals:
void themeChanged(ScreenPlay::Settings::Theme theme);
void steamVersionChanged(bool steamVersion);
void desktopEnvironmentChanged(DesktopEnvironment desktopEnvironment);
void buildInfosChanged(const QString& buildInfos);
public slots:
void setupLanguage();
void writeJsonFileFromResource(const QString& filename);
void setupWidgetAndWindowPaths();
bool retranslateUI();
@ -411,6 +400,7 @@ public slots:
private:
void restoreDefault(const QString& appConfigLocation, const QString& settingsFileType);
void initInstalledPath();
void initSteamInstalledPath();
QString fixLanguageCode(const QString& languageCode);
private:

View File

@ -42,18 +42,20 @@
#include <QDir>
#include <QJsonDocument>
#include <QJsonObject>
#include <QMetaType>
#include <QNetworkAccessManager>
#include <QNetworkReply>
#include <QObject>
#include <QProcess>
#include <QQmlEngine>
#include <QScopeGuard>
#include <QString>
#include <QTextStream>
#include <QVersionNumber>
#include <QtConcurrent/QtConcurrent>
#include <qqml.h>
#include "ScreenPlay/globalvariables.h"
#include "ScreenPlayUtil/contenttypes.h"
#include "ScreenPlayUtil/util.h"
#include "qarchive_enums.hpp"

View File

@ -49,7 +49,8 @@ Q_IMPORT_QML_PLUGIN(ScreenPlayWorkshopPlugin)
int main(int argc, char* argv[])
{
// https://bugreports.qt.io/browse/QTBUG-72028
qputenv("QT_QPA_PLATFORM", "windows:darkmode=2");
QApplication qtGuiApp(argc, argv);
ScreenPlay::App app;

View File

@ -6,8 +6,9 @@ import QtQuick.Layouts
import ScreenPlayApp
import ScreenPlay
import Settings
import ScreenPlayUtil
import ScreenPlayUtil as Util
import Qt5Compat.GraphicalEffects
import Qt.labs.settings 1.0 as Labs
import "qml/Monitors" as Monitors
import "qml/Installed" as Installed
import "qml/Navigation" as Navigation
@ -60,8 +61,6 @@ ApplicationWindow {
title: "ScreenPlay Alpha - V" + App.version()
minimumHeight: 450
minimumWidth: 1050
property bool enableCustomWindowNavigation: Qt.platform.os === "windows"
|| Qt.platform.os === "osx"
// Partial workaround for
// https://bugreports.qt.io/browse/QTBUG-86047
@ -70,16 +69,38 @@ ApplicationWindow {
if (root.visibility === 2)
App.installedListModel.reset()
}
onClosing: {
onClosing: (close) => {
close.accepted = false
if (App.screenPlayManager.activeWallpaperCounter === 0
&& App.screenPlayManager.activeWidgetsCounter === 0) {
Qt.quit()
}
const alwaysMinimize = settings.value("alwaysMinimize", null)
if(alwaysMinimize === null){
console.error("Unable to retreive alwaysMinimize setting")
}
if(alwaysMinimize === "true"){
root.hide()
return
}
exitDialog.open()
}
Labs.Settings {
id: settings
}
Navigation.ExitPopup {
id: exitDialog
applicationWindow: root
modalSource: content
}
Component.onCompleted: {
if (root.enableCustomWindowNavigation) {
root.flags = Qt.FramelessWindowHint | Qt.Window
}
setTheme(App.settings.theme)
stackView.push("qrc:/qml/ScreenPlayApp/qml/Installed/Installed.qml", {
"sidebar": sidebar
@ -90,16 +111,16 @@ ApplicationWindow {
Item {
id: noneContentItems
SteamNotAvailable {
Util.SteamNotAvailable {
id: dialogSteam
modalSource: content
}
MonitorConfiguration {
Util.MonitorConfiguration {
modalSource: content
}
CriticalError {
Util.CriticalError {
window: root
modalSource: content
}
@ -108,33 +129,11 @@ ApplicationWindow {
id: monitors
modalSource: content
}
TrayIcon {
Util.TrayIcon {
window: root
}
}
Item {
anchors.fill: parent
anchors.margins: 1
Navigation.WindowNavigation {
id: windowNav
enabled: root.enableCustomWindowNavigation
visible: enabled
z: 5
modalSource: content
width: parent.width
window: root
}
Item {
id: content
anchors {
top: root.enableCustomWindowNavigation ? windowNav.bottom : parent.top
right: parent.right
bottom: parent.bottom
left: parent.left
}
Connections {
function onThemeChanged(theme) {
setTheme(theme)
@ -159,6 +158,11 @@ ApplicationWindow {
target: App.screenPlayManager
}
Item {
id: content
anchors.fill:parent
StackView {
id: stackView
objectName: "stackView"
@ -251,80 +255,3 @@ ApplicationWindow {
}
}
}
Rectangle {
height: 1
color: "#222"
anchors {
top: parent.top
right: parent.right
left: parent.left
}
}
Rectangle {
height: 1
color: "#222"
anchors {
bottom: parent.bottom
right: parent.right
left: parent.left
}
}
Rectangle {
width: 1
color: "#222"
anchors {
left: parent.left
bottom: parent.bottom
top: parent.top
}
}
Rectangle {
width: 1
color: "#222"
anchors {
right: parent.right
bottom: parent.bottom
top: parent.top
}
}
Item {
width: 15
height: width
anchors {
right: parent.right
bottom: parent.bottom
margins: 1
}
Image {
source: "qrc:/qml/ScreenPlayApp/assets/images/scale_window_indicator.png"
}
MouseArea {
id: maResize
anchors.fill: parent
cursorShape: Qt.SizeFDiagCursor
property point clickPosition
property size originalSize
onPressed: {
maResize.clickPosition = Qt.point(maResize.mouseX,
maResize.mouseY)
maResize.clickPosition = maResize.mapToGlobal(
maResize.clickPosition.x, maResize.clickPosition.y)
maResize.originalSize = Qt.size(root.width, root.height)
}
onPositionChanged: {
if (maResize.pressed) {
let newPos = maResize.mapToGlobal(maResize.mouseX,
maResize.mouseY)
let newPosX = newPos.x - maResize.clickPosition.x
let newPosY = newPos.y - maResize.clickPosition.y
root.setGeometry(root.x, root.y,
maResize.originalSize.width + newPosX,
maResize.originalSize.height + newPosY)
}
}
}
}
}

View File

@ -73,7 +73,6 @@ Item {
Loader {
id: loaderHelp
active: false
z: 99
anchors.fill: parent

View File

@ -51,9 +51,7 @@ Item {
running: true
loops: Animation.Infinite
}
}
}
Image {
@ -69,19 +67,18 @@ Item {
topMargin: -200
horizontalCenter: parent.horizontalCenter
}
}
Text {
id: txtHeadline
y: 80
text: App.settings.steamVersion ? qsTr("Get free Widgets and Wallpaper via the Steam Workshop") : qsTr("Get content via our forum")
text: App.settings.steamVersion ? qsTr("Get free Widgets and Wallpaper via the Steam Workshop") : qsTr(
"Get content via our forum")
font.family: App.settings.font
font.capitalization: Font.Capitalize
wrapMode: Text.WordWrap
color: "white"
font.weight: Font.Thin
font.pointSize: 28
horizontalAlignment: Text.AlignHCenter
@ -90,7 +87,6 @@ Item {
left: parent.left
top: parent.top
}
}
Image {
@ -106,23 +102,40 @@ Item {
topMargin: 50
horizontalCenter: parent.horizontalCenter
}
}
Button {
id: btnWorkshop
text: qsTr("Browse the Steam Workshop")
text: {
if (App.settings.steamVersion) {
return qsTr("Browse the Steam Workshop")
} else {
return qsTr("Open the ScreenPlay forum")
}
}
Material.background: Material.color(Material.Orange)
Material.foreground: "white"
font.pointSize: 16
font.weight: Font.Thin
width: implicitWidth + 20
height: implicitHeight + 10
icon.source: "qrc:/qml/ScreenPlayApp/assets/icons/icon_steam.svg"
icon.source:{
if (App.settings.steamVersion) {
return "qrc:/qml/ScreenPlayApp/assets/icons/icon_steam.svg"
} else {
return "qrc:/qml/ScreenPlayApp/assets/icons/icon_community.svg"
}
}
icon.width: 18
icon.height: 18
onClicked: helperButtonPressed(1)
onClicked: {
if (App.settings.steamVersion) {
helperButtonPressed(1)
} else {
Qt.openUrlExternally("https://forum.screen-play.app/")
}
}
transform: [
Shake {
id: animShake
@ -141,7 +154,6 @@ Item {
bottomMargin: -100
horizontalCenter: parent.horizontalCenter
}
}
states: [
@ -173,14 +185,13 @@ Item {
PropertyChanges {
target: txtHeadline
opacity: 0
anchors.topMargin: -300
anchors.topMargin: 0
}
PropertyChanges {
target: btnWorkshop
anchors.bottomMargin: -100
}
},
State {
name: "in"
@ -218,7 +229,6 @@ Item {
target: btnWorkshop
anchors.bottomMargin: 50
}
}
]
transitions: [
@ -239,12 +249,11 @@ Item {
property: "opacity"
duration: 600
}
}
SequentialAnimation {
PauseAnimation {
duration: 500
duration: 200
}
PropertyAnimation {
@ -260,29 +269,28 @@ Item {
duration: 600
easing.type: Easing.OutBack
}
}
SequentialAnimation {
ParallelAnimation {
PropertyAnimation {
targets: imgLogo
property: "opacity"
duration: 500
duration: 600
easing.type: Easing.InOutExpo
}
PropertyAnimation {
targets: imgLogo
property: "topMargin"
duration: 500
duration: 1000
easing.type: Easing.InOutExpo
}
}
SequentialAnimation {
PauseAnimation {
duration: 200
duration: 400
}
PropertyAnimation {
@ -291,7 +299,6 @@ Item {
duration: 1100
easing.type: Easing.InOutExpo
}
}
SequentialAnimation {
@ -302,18 +309,16 @@ Item {
PropertyAnimation {
targets: btnWorkshop
properties: "bottomMargin"
duration: 400
duration: 1500
easing.type: Easing.OutBack
}
ScriptAction {
script: {
animShake.start(2000, 1000, -1);
animShake.start(2000, 1000, -1)
}
}
}
}
]
}

View File

@ -0,0 +1,95 @@
import QtQuick
import Qt.labs.settings 1.0 as Labs
import QtQuick.Window
import QtQuick.Controls
import QtQuick.Controls.Material
import QtQuick.Layouts
import ScreenPlayApp
import ScreenPlay
import ScreenPlayUtil as Util
import Qt5Compat.GraphicalEffects
/*!
\qmltype exitDialog
\brief exitDialog
*/
Util.Popup {
id: root
property ApplicationWindow applicationWindow
contentHeight: 400
contentWidth: 600
contentItem: Item {
ColumnLayout {
anchors.margins: 20
anchors.fill: parent
spacing: 20
Text {
text: qsTr("You have active Wallpaper.\nScreenPlay will only quit if no Wallpaper are running.")
Layout.fillWidth: true
Layout.fillHeight: true
wrapMode: Text.WrapAtWordBoundaryOrAnywhere
horizontalAlignment: Text.AlignHCenter
font.family: App.settings.font
font.pointSize: 16
color: Material.primaryTextColor
}
Image {
Layout.alignment: Qt.AlignHCenter
source: "qrc:/qml/ScreenPlayApp/assets/images/trayIcon_windows.png"
fillMode: Image.PreserveAspectFit
}
Text {
text: {
if (Qt.platform.os === "windows") {
return qsTr("You can <b>quit</b> ScreenPlay via the bottom right Tray-Icon.")
}
if (Qt.platform.os === "osx") {
return qsTr("You can <b>quit</b> ScreenPlay via the top right Tray-Icon.")
}
}
Layout.fillWidth: true
Layout.fillHeight: true
wrapMode: Text.WrapAtWordBoundaryOrAnywhere
horizontalAlignment: Text.AlignHCenter
font.family: App.settings.font
font.pointSize: 12
color: Material.primaryTextColor
}
Labs.Settings {
id: settings
}
RowLayout {
Layout.alignment: Qt.AlignHCenter
Layout.fillWidth: true
Button {
text: qsTr("Quit ScreenPlay now")
onClicked: Qt.quit()
}
Button {
text: qsTr("Minimize ScreenPlay")
onClicked: {
applicationWindow.hide()
root.close()
}
}
Button {
highlighted: true
text: qsTr("Always minimize ScreenPlay")
onClicked: {
settings.setValue("alwaysMinimize", true)
settings.sync()
applicationWindow.hide()
root.close()
}
}
}
}
}
}

View File

@ -1,79 +0,0 @@
import QtQuick
import Qt5Compat.GraphicalEffects
import QtQuick.Controls.Material
/*!
\qmltype Window Nav Button
\brief A image selector with popup preview.
*/
MouseArea {
id: root
height: 29
width: 45
/*!
\qmlproperty color BackButtonIcon::color
Color if the icon.
*/
property color color: Material.iconColor
/*!
\qmlproperty string BackButtonIcon::icon
Icon image if the icon.
*/
property alias icon: img
cursorShape: Qt.PointingHandCursor
onEntered: root.state = "hover"
onExited: root.state = ""
hoverEnabled: true
Image {
id: img
source: root.icon
visible: false
width: 14
height: 14
smooth: true
anchors.centerIn: parent
sourceSize: Qt.size(width, width)
}
ColorOverlay {
id: iconColorOverlay
anchors.fill: img
source: img
color: root.color
}
states: [
State {
name: "hover"
PropertyChanges {
target: iconColorOverlay
color: Material.color(Material.Orange)
}
}
]
transitions: [
Transition {
from: ""
to: "hover"
reversible: true
ColorAnimation {
target: iconColorOverlay
duration: 200
easing.type: Easing.InOutQuad
}
}
]
}

View File

@ -1,92 +0,0 @@
import QtQuick
import QtQuick.Controls
import QtQuick.Layouts
import QtQuick.Window
import QtQuick.Controls.Material
import Qt5Compat.GraphicalEffects
import QtQuick.Controls.Material.impl
import ScreenPlayApp
import ScreenPlay
import ScreenPlayUtil as Util
Rectangle {
id: root
height: 29
implicitWidth: 1366
color: Material.theme === Material.Light ? Material.background : "#242424"
property Item modalSource
property ApplicationWindow window
Text {
id: title
text: qsTr("ScreenPlay Alpha V%1 - Open Source Wallpaper And Widgets").arg(
App.version())
color: Material.primaryTextColor
verticalAlignment: Text.AlignVCenter
anchors {
top: parent.top
left: parent.left
leftMargin: 10
bottom: parent.bottom
}
}
MouseArea {
id: mouseArea
property var clickPos
anchors.fill: parent
hoverEnabled: true
onPressed: function (mouse) {
clickPos = {
"x": mouse.x,
"y": mouse.y
}
}
onPositionChanged: {
if (mouseArea.pressed) {
let pos = App.cursorPos()
window.setX(pos.x - clickPos.x)
window.setY(pos.y - clickPos.y)
}
}
}
RowLayout {
anchors {
top: root.top
right: root.right
bottom: root.bottom
}
WindowNavButton {
id: miMinimize
Layout.alignment: Qt.AlignVCenter
icon.source: "qrc:/qml/ScreenPlayApp/assets/icons/icon_minimize.svg"
onClicked: root.window.hide()
}
WindowNavButton {
id: miquit
Layout.alignment: Qt.AlignVCenter
icon.source: "qrc:/qml/ScreenPlayApp/assets/icons/icon_close.svg"
onClicked: {
if (App.screenPlayManager.activeWallpaperCounter === 0
&& App.screenPlayManager.activeWidgetsCounter === 0) {
Qt.quit()
return
}
dialog.open()
}
}
}
Util.Dialog {
id: dialog
modalSource: root.modalSource
title: qsTr("Are you sure you want to exit ScreenPlay? This will shut down all Wallpaper and Widgets. If you want your Wallpaper to continue playing, press the minimize button.")
standardButtons: Dialog.Ok | Dialog.Cancel
onAccepted: Qt.quit()
}
}

View File

@ -2,8 +2,8 @@
#include "steam/steam_qt_enums_generated.h"
#include <QProcessEnvironment>
#include <QVersionNumber>
#include <QQuickStyle>
#include <QVersionNumber>
namespace ScreenPlay {
/*!

View File

@ -1,4 +1,6 @@
#include "ScreenPlay/create.h"
#include "ScreenPlay/util.h"
#include "ScreenPlayUtil/util.h"
namespace ScreenPlay {

View File

@ -3,7 +3,6 @@
#include "util.h"
namespace ScreenPlay {
/*!
@ -472,7 +471,6 @@ void ScreenPlayManager::newConnection()
m_unconnectedClients.push_back(std::move(connection));
}
/*!
\brief Removes a wallpaper from the given appID. Returns true on success.
*/

View File

@ -1,5 +1,7 @@
#include "ScreenPlay/screenplaywallpaper.h"
#include "util.h"
namespace ScreenPlay {
/*!

View File

@ -3,6 +3,10 @@
#include "ScreenPlayUtil/util.h"
#include <QFileInfo>
#ifdef Q_OS_WIN
#include <qt_windows.h>
#endif
namespace ScreenPlay {
/*!
@ -199,7 +203,7 @@ void Settings::restoreDefault(const QString& appConfigLocation, const QString& s
void Settings::initInstalledPath()
{
const QString contentPath = m_qSettings.value("ScreenPlayContentPath").toString();
const QString contentPath = m_qSettings.value("ScreenPlayContentPath", "").toString();
// Steamless
if (!steamVersion() && contentPath.isEmpty()) {
@ -212,34 +216,43 @@ void Settings::initInstalledPath()
// Steam
if (contentPath.isEmpty()) {
return initSteamInstalledPath();
}
/*
* ! We must use this (ugly) method, because to stay FOSS we cannot call the steamAPI here !
*
* We start with the assumption that when we go up 2 folder.
* So that there must be at least a common folder:
* Windows example:
* From -> C:\Program Files (x86)\Steam\steamapps\common\ScreenPlay
* To -> C:\Program Files (x86)\Steam\steamapps\
* Dest.-> C:\Program Files (x86)\Steam\steamapps\workshop\content\672870
*
* When we reach the folder it _can_ contain a workshop folder when the user
* previously installed any workshop content. If the folder does not exsist we
* need to create it by hand. Normally Steam will create this folder but we need to
* set it here at this point so that the QFileSystemWatcher in InstalledListModel does
* not generate warnings.
m_globalVariables->setLocalStoragePath(QUrl::fromUserInput(contentPath));
}
/*!
\brief We must use this (ugly) method, because to stay FOSS we cannot call the steamAPI here !
We start with the assumption that when we go up 2 folder.
So that there must be at least a common folder:
Windows example:
From -> C:\Program Files (x86)\Steam\steamapps\common\ScreenPlay
To -> C:\Program Files (x86)\Steam\steamapps\
Dest.-> C:\Program Files (x86)\Steam\steamapps\workshop\content\672870
When we reach the folder it _can_ contain a workshop folder when the user
previously installed any workshop content. If the folder does not exsist we
need to create it by hand. Normally Steam will create this folder but we need to
set it here at this point so that the QFileSystemWatcher in InstalledListModel does
not generate warnings.
*/
QDir dir;
void Settings::initSteamInstalledPath()
{
QString appBasePath = QApplication::instance()->applicationDirPath();
if (desktopEnvironment() == DesktopEnvironment::OSX) {
appBasePath += "/../../..";
}
QString path = appBasePath + "/../../workshop/content/672870";
qInfo() << path;
qInfo() << "InitSteamInstalledPath:" << path;
QDir dir;
if (!dir.exists()) {
if (!dir.mkpath(path)) {
qWarning() << "Could not create steam workshop path for path: " << path;
}
}
if (QDir(path).exists()) {
m_globalVariables->setLocalStoragePath(QUrl::fromUserInput(path));
@ -248,10 +261,6 @@ void Settings::initInstalledPath()
} else {
qWarning() << "The following path could not be resolved to search for workshop content: " << path;
}
return;
}
m_globalVariables->setLocalStoragePath(QUrl::fromUserInput(contentPath));
}
/*!

View File

@ -232,6 +232,25 @@
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>ExitPopup</name>
<message>
<source>Are you sure you want to exit ScreenPlay?</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>This will shut down all Wallpaper and Widgets. If you want your Wallpaper to continue playing, press the minimize button.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Close ScreenPlay</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Minimize ScreenPlay</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>GifWallpaper</name>
<message>
@ -1022,17 +1041,6 @@
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>WindowNavigation</name>
<message>
<source>Are you sure you want to exit ScreenPlay? This will shut down all Wallpaper and Widgets. If you want your Wallpaper to continue playing, press the minimize button.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>ScreenPlay Alpha V%1 - Open Source Wallpaper And Widgets</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>WizardPage</name>
<message>

View File

@ -233,6 +233,25 @@
<translation>Runter Skallieren</translation>
</message>
</context>
<context>
<name>ExitPopup</name>
<message>
<source>Are you sure you want to exit ScreenPlay?</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>This will shut down all Wallpaper and Widgets. If you want your Wallpaper to continue playing, press the minimize button.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Close ScreenPlay</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Minimize ScreenPlay</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>GifWallpaper</name>
<message>
@ -1023,17 +1042,6 @@
<translation>Vorschaubild</translation>
</message>
</context>
<context>
<name>WindowNavigation</name>
<message>
<source>Are you sure you want to exit ScreenPlay? This will shut down all Wallpaper and Widgets. If you want your Wallpaper to continue playing, press the minimize button.</source>
<translation type="unfinished">Are you sure you want to exit ScreenPlay? This will shut down all Wallpaper and Widgets. If you want your Wallpaper to continue playing, press the minimize button.</translation>
</message>
<message>
<source>ScreenPlay Alpha V%1 - Open Source Wallpaper And Widgets</source>
<translation type="unfinished">ScreenPlay Alpha V%1 - Open Source Wallpaper And Widgets</translation>
</message>
</context>
<context>
<name>WizardPage</name>
<message>

View File

@ -234,6 +234,25 @@
<translation type="unfinished">Scale_Down</translation>
</message>
</context>
<context>
<name>ExitPopup</name>
<message>
<source>Are you sure you want to exit ScreenPlay?</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>This will shut down all Wallpaper and Widgets. If you want your Wallpaper to continue playing, press the minimize button.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Close ScreenPlay</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Minimize ScreenPlay</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>GifWallpaper</name>
<message>
@ -1024,17 +1043,6 @@
<translation type="unfinished">Preview Image</translation>
</message>
</context>
<context>
<name>WindowNavigation</name>
<message>
<source>Are you sure you want to exit ScreenPlay? This will shut down all Wallpaper and Widgets. If you want your Wallpaper to continue playing, press the minimize button.</source>
<translation type="unfinished">Are you sure you want to exit ScreenPlay? This will shut down all Wallpaper and Widgets. If you want your Wallpaper to continue playing, press the minimize button.</translation>
</message>
<message>
<source>ScreenPlay Alpha V%1 - Open Source Wallpaper And Widgets</source>
<translation type="unfinished">ScreenPlay Alpha V%1 - Open Source Wallpaper And Widgets</translation>
</message>
</context>
<context>
<name>WizardPage</name>
<message>

View File

@ -234,6 +234,25 @@
<translation>Réduire</translation>
</message>
</context>
<context>
<name>ExitPopup</name>
<message>
<source>Are you sure you want to exit ScreenPlay?</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>This will shut down all Wallpaper and Widgets. If you want your Wallpaper to continue playing, press the minimize button.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Close ScreenPlay</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Minimize ScreenPlay</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>GifWallpaper</name>
<message>
@ -1024,17 +1043,6 @@
<translation type="unfinished">Preview Image</translation>
</message>
</context>
<context>
<name>WindowNavigation</name>
<message>
<source>Are you sure you want to exit ScreenPlay? This will shut down all Wallpaper and Widgets. If you want your Wallpaper to continue playing, press the minimize button.</source>
<translation type="unfinished">Are you sure you want to exit ScreenPlay? This will shut down all Wallpaper and Widgets. If you want your Wallpaper to continue playing, press the minimize button.</translation>
</message>
<message>
<source>ScreenPlay Alpha V%1 - Open Source Wallpaper And Widgets</source>
<translation type="unfinished">ScreenPlay Alpha V%1 - Open Source Wallpaper And Widgets</translation>
</message>
</context>
<context>
<name>WizardPage</name>
<message>

View File

@ -234,6 +234,25 @@
<translation>Riduci</translation>
</message>
</context>
<context>
<name>ExitPopup</name>
<message>
<source>Are you sure you want to exit ScreenPlay?</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>This will shut down all Wallpaper and Widgets. If you want your Wallpaper to continue playing, press the minimize button.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Close ScreenPlay</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Minimize ScreenPlay</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>GifWallpaper</name>
<message>
@ -1024,17 +1043,6 @@
<translation>Immagine danteprima</translation>
</message>
</context>
<context>
<name>WindowNavigation</name>
<message>
<source>Are you sure you want to exit ScreenPlay? This will shut down all Wallpaper and Widgets. If you want your Wallpaper to continue playing, press the minimize button.</source>
<translation type="unfinished">Are you sure you want to exit ScreenPlay? This will shut down all Wallpaper and Widgets. If you want your Wallpaper to continue playing, press the minimize button.</translation>
</message>
<message>
<source>ScreenPlay Alpha V%1 - Open Source Wallpaper And Widgets</source>
<translation type="unfinished">ScreenPlay Alpha V%1 - Open Source Wallpaper And Widgets</translation>
</message>
</context>
<context>
<name>WizardPage</name>
<message>

View File

@ -234,6 +234,25 @@
<translation type="unfinished">Scale_Down</translation>
</message>
</context>
<context>
<name>ExitPopup</name>
<message>
<source>Are you sure you want to exit ScreenPlay?</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>This will shut down all Wallpaper and Widgets. If you want your Wallpaper to continue playing, press the minimize button.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Close ScreenPlay</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Minimize ScreenPlay</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>GifWallpaper</name>
<message>
@ -1024,17 +1043,6 @@
<translation type="unfinished">Preview Image</translation>
</message>
</context>
<context>
<name>WindowNavigation</name>
<message>
<source>Are you sure you want to exit ScreenPlay? This will shut down all Wallpaper and Widgets. If you want your Wallpaper to continue playing, press the minimize button.</source>
<translation type="unfinished">Are you sure you want to exit ScreenPlay? This will shut down all Wallpaper and Widgets. If you want your Wallpaper to continue playing, press the minimize button.</translation>
</message>
<message>
<source>ScreenPlay Alpha V%1 - Open Source Wallpaper And Widgets</source>
<translation type="unfinished">ScreenPlay Alpha V%1 - Open Source Wallpaper And Widgets</translation>
</message>
</context>
<context>
<name>WizardPage</name>
<message>

View File

@ -234,6 +234,25 @@
<translation>Schaal_Omlaag</translation>
</message>
</context>
<context>
<name>ExitPopup</name>
<message>
<source>Are you sure you want to exit ScreenPlay?</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>This will shut down all Wallpaper and Widgets. If you want your Wallpaper to continue playing, press the minimize button.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Close ScreenPlay</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Minimize ScreenPlay</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>GifWallpaper</name>
<message>
@ -1024,17 +1043,6 @@
<translation type="unfinished">Preview Image</translation>
</message>
</context>
<context>
<name>WindowNavigation</name>
<message>
<source>Are you sure you want to exit ScreenPlay? This will shut down all Wallpaper and Widgets. If you want your Wallpaper to continue playing, press the minimize button.</source>
<translation type="unfinished">Are you sure you want to exit ScreenPlay? This will shut down all Wallpaper and Widgets. If you want your Wallpaper to continue playing, press the minimize button.</translation>
</message>
<message>
<source>ScreenPlay Alpha V%1 - Open Source Wallpaper And Widgets</source>
<translation type="unfinished">ScreenPlay Alpha V%1 - Open Source Wallpaper And Widgets</translation>
</message>
</context>
<context>
<name>WizardPage</name>
<message>

View File

@ -234,6 +234,25 @@
<translation type="unfinished">Scale_Down</translation>
</message>
</context>
<context>
<name>ExitPopup</name>
<message>
<source>Are you sure you want to exit ScreenPlay?</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>This will shut down all Wallpaper and Widgets. If you want your Wallpaper to continue playing, press the minimize button.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Close ScreenPlay</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Minimize ScreenPlay</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>GifWallpaper</name>
<message>
@ -1024,17 +1043,6 @@
<translation>Obraz podglądu</translation>
</message>
</context>
<context>
<name>WindowNavigation</name>
<message>
<source>Are you sure you want to exit ScreenPlay? This will shut down all Wallpaper and Widgets. If you want your Wallpaper to continue playing, press the minimize button.</source>
<translation>Czy na pewno chcesz zamknąć ScreenPlay? Wyłączy to wszystkie tapety oraz widżety. Jeśli chcesz nadal odtwarzać swoją tapetę, naciśnij przycisk minimalizuj.</translation>
</message>
<message>
<source>ScreenPlay Alpha V%1 - Open Source Wallpaper And Widgets</source>
<translation type="unfinished">ScreenPlay Alpha V%1 - Open Source Wallpaper And Widgets</translation>
</message>
</context>
<context>
<name>WizardPage</name>
<message>

View File

@ -234,6 +234,25 @@
<translation>Escalonar_Abaixo</translation>
</message>
</context>
<context>
<name>ExitPopup</name>
<message>
<source>Are you sure you want to exit ScreenPlay?</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>This will shut down all Wallpaper and Widgets. If you want your Wallpaper to continue playing, press the minimize button.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Close ScreenPlay</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Minimize ScreenPlay</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>GifWallpaper</name>
<message>
@ -1024,17 +1043,6 @@
<translation type="unfinished">Preview Image</translation>
</message>
</context>
<context>
<name>WindowNavigation</name>
<message>
<source>Are you sure you want to exit ScreenPlay? This will shut down all Wallpaper and Widgets. If you want your Wallpaper to continue playing, press the minimize button.</source>
<translation type="unfinished">Are you sure you want to exit ScreenPlay? This will shut down all Wallpaper and Widgets. If you want your Wallpaper to continue playing, press the minimize button.</translation>
</message>
<message>
<source>ScreenPlay Alpha V%1 - Open Source Wallpaper And Widgets</source>
<translation type="unfinished">ScreenPlay Alpha V%1 - Open Source Wallpaper And Widgets</translation>
</message>
</context>
<context>
<name>WizardPage</name>
<message>

View File

@ -234,6 +234,25 @@
<translation type="unfinished">Scale_Down</translation>
</message>
</context>
<context>
<name>ExitPopup</name>
<message>
<source>Are you sure you want to exit ScreenPlay?</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>This will shut down all Wallpaper and Widgets. If you want your Wallpaper to continue playing, press the minimize button.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Close ScreenPlay</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Minimize ScreenPlay</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>GifWallpaper</name>
<message>
@ -1024,17 +1043,6 @@
<translation type="unfinished">Preview Image</translation>
</message>
</context>
<context>
<name>WindowNavigation</name>
<message>
<source>Are you sure you want to exit ScreenPlay? This will shut down all Wallpaper and Widgets. If you want your Wallpaper to continue playing, press the minimize button.</source>
<translation type="unfinished">Are you sure you want to exit ScreenPlay? This will shut down all Wallpaper and Widgets. If you want your Wallpaper to continue playing, press the minimize button.</translation>
</message>
<message>
<source>ScreenPlay Alpha V%1 - Open Source Wallpaper And Widgets</source>
<translation type="unfinished">ScreenPlay Alpha V%1 - Open Source Wallpaper And Widgets</translation>
</message>
</context>
<context>
<name>WizardPage</name>
<message>

View File

@ -234,6 +234,25 @@
<translation>Ölçek_Düşür</translation>
</message>
</context>
<context>
<name>ExitPopup</name>
<message>
<source>Are you sure you want to exit ScreenPlay?</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>This will shut down all Wallpaper and Widgets. If you want your Wallpaper to continue playing, press the minimize button.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Close ScreenPlay</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Minimize ScreenPlay</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>GifWallpaper</name>
<message>
@ -1024,17 +1043,6 @@
<translation type="unfinished">Preview Image</translation>
</message>
</context>
<context>
<name>WindowNavigation</name>
<message>
<source>Are you sure you want to exit ScreenPlay? This will shut down all Wallpaper and Widgets. If you want your Wallpaper to continue playing, press the minimize button.</source>
<translation type="unfinished">Are you sure you want to exit ScreenPlay? This will shut down all Wallpaper and Widgets. If you want your Wallpaper to continue playing, press the minimize button.</translation>
</message>
<message>
<source>ScreenPlay Alpha V%1 - Open Source Wallpaper And Widgets</source>
<translation type="unfinished">ScreenPlay Alpha V%1 - Open Source Wallpaper And Widgets</translation>
</message>
</context>
<context>
<name>WizardPage</name>
<message>

View File

@ -234,6 +234,25 @@
<translation>Giảm tỉ lệ</translation>
</message>
</context>
<context>
<name>ExitPopup</name>
<message>
<source>Are you sure you want to exit ScreenPlay?</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>This will shut down all Wallpaper and Widgets. If you want your Wallpaper to continue playing, press the minimize button.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Close ScreenPlay</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Minimize ScreenPlay</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>GifWallpaper</name>
<message>
@ -1024,17 +1043,6 @@
<translation>nh xem trước</translation>
</message>
</context>
<context>
<name>WindowNavigation</name>
<message>
<source>Are you sure you want to exit ScreenPlay? This will shut down all Wallpaper and Widgets. If you want your Wallpaper to continue playing, press the minimize button.</source>
<translation type="unfinished">Are you sure you want to exit ScreenPlay? This will shut down all Wallpaper and Widgets. If you want your Wallpaper to continue playing, press the minimize button.</translation>
</message>
<message>
<source>ScreenPlay Alpha V%1 - Open Source Wallpaper And Widgets</source>
<translation type="unfinished">ScreenPlay Alpha V%1 - Open Source Wallpaper And Widgets</translation>
</message>
</context>
<context>
<name>WizardPage</name>
<message>

View File

@ -234,6 +234,34 @@
<translation></translation>
</message>
</context>
<context>
<name>ExitPopup</name>
<message>
<source>Minimize ScreenPlay</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Always minimize ScreenPlay</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>You have active Wallpaper.
ScreenPlay will only quit if no Wallpaper are running.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>You can &lt;b&gt;quit&lt;/b&gt; ScreenPlay via the bottom right Tray-Icon.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>You can &lt;b&gt;quit&lt;/b&gt; ScreenPlay via the top right Tray-Icon.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Quit ScreenPlay now</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>GifWallpaper</name>
<message>
@ -1024,17 +1052,6 @@
<translation></translation>
</message>
</context>
<context>
<name>WindowNavigation</name>
<message>
<source>Are you sure you want to exit ScreenPlay? This will shut down all Wallpaper and Widgets. If you want your Wallpaper to continue playing, press the minimize button.</source>
<translation>退ScreenPlay吗使</translation>
</message>
<message>
<source>ScreenPlay Alpha V%1 - Open Source Wallpaper And Widgets</source>
<translation>ScreenPlay Alpha V%1 - </translation>
</message>
</context>
<context>
<name>WizardPage</name>
<message>

View File

@ -51,7 +51,6 @@
class ScreenPlaySDK : public QObject {
Q_OBJECT
QML_UNCREATABLE("")
public:
ScreenPlaySDK(const QString& appID, const QString& type);

View File

@ -19,13 +19,15 @@ set(QML_PLUGIN_SOURCES src/shaderlibrary.cpp)
set(QML_PLUGIN_HEADER src/shaderlibrary.h)
set(SHADER
shaders/lightning.vert
# cmake-format: sort
shaders/lightning.frag
shaders/wobble.frag
shaders/lightning.vert
shaders/water.frag
shaders/water.vert)
shaders/water.vert
shaders/wobble.frag)
set(RESOURCES
# cmake-format: sort
assets/mask_01.png
assets/Shadertoy_Bayer.png
assets/Shadertoy_Gray_Noise_Medium.png
@ -42,7 +44,8 @@ qt_add_qml_module(
${SCREENPLAY_QML_MODULES_PATH}/${PROJECT_NAME}
URI
${PROJECT_NAME}
RESOURCE_PREFIX /qml
RESOURCE_PREFIX
/qml
VERSION
1.0
SOURCES

View File

@ -17,6 +17,7 @@ find_package(
set(QML qml/TestMain.qml)
set(QML_PLUGIN_SOURCES
# cmake-format: sort
src/cpu.cpp
src/gpu.cpp
src/ipaddress.cpp
@ -26,6 +27,7 @@ set(QML_PLUGIN_SOURCES
src/uptime.cpp)
set(QML_PLUGIN_HEADER
# cmake-format: sort
src/cpu.h
src/gpu.h
src/ipaddress.h
@ -51,7 +53,8 @@ qt_add_qml_module(
1.0
OUTPUT_DIRECTORY
${SCREENPLAY_QML_MODULES_PATH}/${PROJECT_NAME}
RESOURCE_PREFIX /qml
RESOURCE_PREFIX
/qml
QML_FILES
${QML}
SOURCES

View File

@ -10,18 +10,21 @@ find_package(
REQUIRED)
set(QML
# cmake-format: sort
qml/CloseIcon.qml
qml/ColorPicker.qml
qml/Dialog.qml
qml/Dialogs/CriticalError.qml
qml/Dialogs/MonitorConfiguration.qml
qml/Dialogs/SteamNotAvailable.qml
qml/FileDropAnimation.qml
qml/FileSelector.qml
qml/Grow.qml
qml/GrowIconLink.qml
qml/Headline.qml
qml/HeadlineSection.qml
qml/ImageSelector.qml
qml/JSUtil.js
qml/LicenseSelector.qml
qml/ModalBackgroundBlur.qml
qml/MouseHoverBlocker.qml
@ -29,17 +32,17 @@ set(QML
qml/RippleEffect.qml
qml/Search.qml
qml/Shake.qml
qml/FileDropAnimation.qml
qml/Slider.qml
qml/Tag.qml
qml/TagSelector.qml
qml/TextField.qml
qml/TrayIcon.qml
qml/JSUtil.js)
qml/TrayIcon.qml)
set(SOURCES inc/public/ScreenPlayUtil/httpfileserver.cpp src/contenttypes.cpp src/util.cpp)
set(SOURCES # cmake-format: sort
inc/public/ScreenPlayUtil/httpfileserver.cpp src/contenttypes.cpp src/util.cpp)
set(HEADER
# cmake-format: sort
inc/public/ScreenPlayUtil/AutoPropertyHelpers.h
inc/public/ScreenPlayUtil/ConstRefPropertyHelpers.h
inc/public/ScreenPlayUtil/contenttypes.h
@ -52,10 +55,8 @@ set(HEADER
inc/public/ScreenPlayUtil/SingletonHelper.h
inc/public/ScreenPlayUtil/util.h)
set(RESOURCES
assets/icons/folder.svg
assets/icons/description.svg
assets/icons/attach_file.svg)
set(RESOURCES # cmake-format: sort
assets/icons/attach_file.svg assets/icons/description.svg assets/icons/folder.svg)
qt_add_library(
${PROJECT_NAME}
@ -67,7 +68,8 @@ qt_add_qml_module(
${PROJECT_NAME}
OUTPUT_DIRECTORY
${SCREENPLAY_QML_MODULES_PATH}/${PROJECT_NAME}
RESOURCE_PREFIX /qml
RESOURCE_PREFIX
/qml
URI
${PROJECT_NAME}
VERSION

View File

@ -37,9 +37,10 @@
#include <QtGlobal>
#if defined(Q_OS_WIN)
// Must be first!
#include <qt_windows.h>
// Do not sort !
#include "WinUser.h"
#include <ShellScalingApi.h>
#endif
@ -48,6 +49,7 @@
#include <QJsonArray>
#include <QJsonObject>
#include <QMetaEnum>
#include <QMetaType>
#include <QString>
#include <QVersionNumber>
#include <cmath>

View File

@ -78,7 +78,7 @@ SystemTrayIcon {
}
MenuItem {
text: qsTr("Quit")
text: qsTr("Quit ScreenPlay")
onTriggered: App.exit()
}
}

View File

@ -37,6 +37,7 @@ set(SOURCES ${SOURCES} main.cpp src/basewindow.cpp)
set(HEADER ${HEADER} src/basewindow.h)
set(QML
# cmake-format: sort
qml/GifWallpaper.qml
qml/MultimediaView.qml
qml/MultimediaWebView.qml
@ -44,11 +45,7 @@ set(QML
qml/Wallpaper.qml
qml/WebsiteWallpaper.qml)
set(RESOURCES
dot.png
qtquickcontrols2.conf
index.html
)
set(RESOURCES dot.png qtquickcontrols2.conf index.html)
add_executable(${PROJECT_NAME} ${SOURCES} ${HEADER})
@ -60,7 +57,8 @@ qt_add_qml_module(
1.0
OUTPUT_DIRECTORY
${SCREENPLAY_QML_MODULES_PATH}/${PROJECT_NAME}
RESOURCE_PREFIX /qml
RESOURCE_PREFIX
/qml
QML_FILES
${QML}
RESOURCES

View File

@ -19,40 +19,50 @@ set(QML_PLUGIN_SOURCES src/screenplayweather.cpp)
set(QML_PLUGIN_HEADER src/day.h src/screenplayweather.h)
set(RESOURCES
# cmake-format: sort
assets/icons/wi-alien.svg
assets/icons/wi-barometer.svg
assets/icons/wi-celsius.svg
assets/icons/wi-cloud-down.svg
assets/icons/wi-cloud-refresh.svg
assets/icons/wi-cloud-up.svg
assets/icons/wi-cloud.svg
assets/icons/wi-cloudy-gusts.svg
assets/icons/wi-cloudy-windy.svg
assets/icons/wi-day-cloudy.svg
assets/icons/wi-cloudy.svg
assets/icons/wi-day-cloudy-gusts.svg
assets/icons/wi-day-cloudy-high.svg
assets/icons/wi-day-cloudy-windy.svg
assets/icons/wi-day-cloudy.svg
assets/icons/wi-day-fog.svg
assets/icons/wi-day-hail.svg
assets/icons/wi-day-haze.svg
assets/icons/wi-day-lightning.svg
assets/icons/wi-day-light-wind.svg
assets/icons/wi-day-rain.svg
assets/icons/wi-day-lightning.svg
assets/icons/wi-day-rain-mix.svg
assets/icons/wi-day-rain-wind.svg
assets/icons/wi-day-rain.svg
assets/icons/wi-day-showers.svg
assets/icons/wi-day-sleet.svg
assets/icons/wi-day-sleet-storm.svg
assets/icons/wi-day-snow.svg
assets/icons/wi-day-sleet.svg
assets/icons/wi-day-snow-thunderstorm.svg
assets/icons/wi-day-snow-wind.svg
assets/icons/wi-day-snow.svg
assets/icons/wi-day-sprinkle.svg
assets/icons/wi-day-storm-showers.svg
assets/icons/wi-day-sunny.svg
assets/icons/wi-day-sunny-overcast.svg
assets/icons/wi-day-sunny.svg
assets/icons/wi-day-thunderstorm.svg
assets/icons/wi-day-windy.svg
assets/icons/wi-degrees.svg
assets/icons/wi-direction-down.svg
assets/icons/wi-direction-down-left.svg
assets/icons/wi-direction-down-right.svg
assets/icons/wi-direction-down.svg
assets/icons/wi-direction-left.svg
assets/icons/wi-direction-right.svg
assets/icons/wi-direction-up.svg
assets/icons/wi-direction-up-left.svg
assets/icons/wi-direction-up-right.svg
assets/icons/wi-direction-up.svg
assets/icons/wi-dust.svg
assets/icons/wi-earthquake.svg
assets/icons/wi-fahrenheit.svg
@ -61,12 +71,12 @@ set(RESOURCES
assets/icons/wi-fog.svg
assets/icons/wi-gale-warning.svg
assets/icons/wi-hail.svg
assets/icons/wi-horizon.svg
assets/icons/wi-horizon-alt.svg
assets/icons/wi-horizon.svg
assets/icons/wi-hot.svg
assets/icons/wi-humidity.svg
assets/icons/wi-hurricane.svg
assets/icons/wi-hurricane-warning.svg
assets/icons/wi-hurricane.svg
assets/icons/wi-lightning.svg
assets/icons/wi-lunar-eclipse.svg
assets/icons/wi-meteor.svg
@ -101,8 +111,6 @@ set(RESOURCES
assets/icons/wi-moon-first-quarter.svg
assets/icons/wi-moon-full.svg
assets/icons/wi-moon-new.svg
assets/icons/wi-moonrise.svg
assets/icons/wi-moonset.svg
assets/icons/wi-moon-third-quarter.svg
assets/icons/wi-moon-waning-crescent-1.svg
assets/icons/wi-moon-waning-crescent-2.svg
@ -128,63 +136,65 @@ set(RESOURCES
assets/icons/wi-moon-waxing-gibbous-4.svg
assets/icons/wi-moon-waxing-gibbous-5.svg
assets/icons/wi-moon-waxing-gibbous-6.svg
assets/icons/wi-moonrise.svg
assets/icons/wi-moonset.svg
assets/icons/wi-na.svg
assets/icons/wi-night-alt-cloudy.svg
assets/icons/wi-night-alt-cloudy-gusts.svg
assets/icons/wi-night-alt-cloudy-high.svg
assets/icons/wi-night-alt-cloudy-windy.svg
assets/icons/wi-night-alt-cloudy.svg
assets/icons/wi-night-alt-hail.svg
assets/icons/wi-night-alt-lightning.svg
assets/icons/wi-night-alt-partly-cloudy.svg
assets/icons/wi-night-alt-rain.svg
assets/icons/wi-night-alt-rain-mix.svg
assets/icons/wi-night-alt-rain-wind.svg
assets/icons/wi-night-alt-rain.svg
assets/icons/wi-night-alt-showers.svg
assets/icons/wi-night-alt-sleet.svg
assets/icons/wi-night-alt-sleet-storm.svg
assets/icons/wi-night-alt-snow.svg
assets/icons/wi-night-alt-sleet.svg
assets/icons/wi-night-alt-snow-thunderstorm.svg
assets/icons/wi-night-alt-snow-wind.svg
assets/icons/wi-night-alt-snow.svg
assets/icons/wi-night-alt-sprinkle.svg
assets/icons/wi-night-alt-storm-showers.svg
assets/icons/wi-night-alt-thunderstorm.svg
assets/icons/wi-night-clear.svg
assets/icons/wi-night-cloudy.svg
assets/icons/wi-night-cloudy-gusts.svg
assets/icons/wi-night-cloudy-high.svg
assets/icons/wi-night-cloudy-windy.svg
assets/icons/wi-night-cloudy.svg
assets/icons/wi-night-fog.svg
assets/icons/wi-night-hail.svg
assets/icons/wi-night-lightning.svg
assets/icons/wi-night-partly-cloudy.svg
assets/icons/wi-night-rain.svg
assets/icons/wi-night-rain-mix.svg
assets/icons/wi-night-rain-wind.svg
assets/icons/wi-night-rain.svg
assets/icons/wi-night-showers.svg
assets/icons/wi-night-sleet.svg
assets/icons/wi-night-sleet-storm.svg
assets/icons/wi-night-snow.svg
assets/icons/wi-night-sleet.svg
assets/icons/wi-night-snow-thunderstorm.svg
assets/icons/wi-night-snow-wind.svg
assets/icons/wi-night-snow.svg
assets/icons/wi-night-sprinkle.svg
assets/icons/wi-night-storm-showers.svg
assets/icons/wi-night-thunderstorm.svg
assets/icons/wi-rain-mix.svg
assets/icons/wi-rain-wind.svg
assets/icons/wi-rain.svg
assets/icons/wi-raindrop.svg
assets/icons/wi-raindrops.svg
assets/icons/wi-rain-mix.svg
assets/icons/wi-rain-wind.svg
assets/icons/wi-refresh.svg
assets/icons/wi-refresh-alt.svg
assets/icons/wi-refresh.svg
assets/icons/wi-sandstorm.svg
assets/icons/wi-showers.svg
assets/icons/wi-sleet.svg
assets/icons/wi-small-craft-advisory.svg
assets/icons/wi-smog.svg
assets/icons/wi-smoke.svg
assets/icons/wi-snow-wind.svg
assets/icons/wi-snow.svg
assets/icons/wi-snowflake-cold.svg
assets/icons/wi-snow-wind.svg
assets/icons/wi-solar-eclipse.svg
assets/icons/wi-sprinkle.svg
assets/icons/wi-stars.svg
@ -193,11 +203,14 @@ set(RESOURCES
assets/icons/wi-strong-wind.svg
assets/icons/wi-sunrise.svg
assets/icons/wi-sunset.svg
assets/icons/wi-thermometer.svg
assets/icons/wi-thermometer-exterior.svg
assets/icons/wi-thermometer-internal.svg
assets/icons/wi-thermometer.svg
assets/icons/wi-thunderstorm.svg
assets/icons/wi-time-1.svg
assets/icons/wi-time-10.svg
assets/icons/wi-time-11.svg
assets/icons/wi-time-12.svg
assets/icons/wi-time-2.svg
assets/icons/wi-time-3.svg
assets/icons/wi-time-4.svg
@ -206,9 +219,6 @@ set(RESOURCES
assets/icons/wi-time-7.svg
assets/icons/wi-time-8.svg
assets/icons/wi-time-9.svg
assets/icons/wi-time-10.svg
assets/icons/wi-time-11.svg
assets/icons/wi-time-12.svg
assets/icons/wi-tornado.svg
assets/icons/wi-train.svg
assets/icons/wi-tsunami.svg
@ -216,6 +226,9 @@ set(RESOURCES
assets/icons/wi-volcano.svg
assets/icons/wi-wind-beaufort-0.svg
assets/icons/wi-wind-beaufort-1.svg
assets/icons/wi-wind-beaufort-10.svg
assets/icons/wi-wind-beaufort-11.svg
assets/icons/wi-wind-beaufort-12.svg
assets/icons/wi-wind-beaufort-2.svg
assets/icons/wi-wind-beaufort-3.svg
assets/icons/wi-wind-beaufort-4.svg
@ -224,20 +237,8 @@ set(RESOURCES
assets/icons/wi-wind-beaufort-7.svg
assets/icons/wi-wind-beaufort-8.svg
assets/icons/wi-wind-beaufort-9.svg
assets/icons/wi-wind-beaufort-10.svg
assets/icons/wi-wind-beaufort-11.svg
assets/icons/wi-wind-beaufort-12.svg
assets/icons/wi-wind-deg.svg
assets/icons/wi-windy.svg
assets/icons/wi-alien.svg
assets/icons/wi-barometer.svg
assets/icons/wi-celsius.svg
assets/icons/wi-cloud.svg
assets/icons/wi-cloud-down.svg
assets/icons/wi-cloud-refresh.svg
assets/icons/wi-cloud-up.svg
assets/icons/wi-cloudy.svg
assets/icons/wi-cloudy-gusts.svg)
assets/icons/wi-windy.svg)
qt_add_library(${PROJECT_NAME} STATIC)
target_link_libraries(${PROJECT_NAME} PUBLIC ScreenPlayUtil)
@ -249,7 +250,8 @@ qt_add_qml_module(
${PROJECT_NAME}
OUTPUT_DIRECTORY
${SCREENPLAY_QML_MODULES_PATH}/${PROJECT_NAME}
RESOURCE_PREFIX /qml
RESOURCE_PREFIX
/qml
VERSION
1.0
QML_FILES

View File

@ -24,9 +24,10 @@ find_package(
Positioning)
set(RESOURCES
# cmake-format: sort
assets/icons/baseline-close-24px.svg
assets/icons/baseline-opacity-24px.svg
assets/icons/baseline-settings-20px.svg
assets/icons/baseline-close-24px.svg
assets/image/noisy-texture-3.png)
qt_add_executable(
@ -61,7 +62,8 @@ qt_add_qml_module(
1.0
OUTPUT_DIRECTORY
${SCREENPLAY_QML_MODULES_PATH}/${PROJECT_NAME}
RESOURCE_PREFIX /qml
RESOURCE_PREFIX
/qml
QML_FILES
${QML}
RESOURCES

View File

@ -53,12 +53,11 @@
#include <QtQuick/QQuickWindow>
#ifdef Q_OS_WIN
#include <QFileSystemWatcher>
#include <qt_windows.h>
#endif
#include "ScreenPlayUtil/util.h"
#include "ScreenPlaySDK/screenplaysdk.h"
#include "ScreenPlayUtil/util.h"
#include <memory>
class WidgetWindow : public QObject {

View File

@ -13,7 +13,7 @@ find_package(
REQUIRED)
set(QML
qml/TestMain.qml
# cmake-format: sort
qml/Background.qml
qml/Forum.qml
qml/Navigation.qml
@ -24,6 +24,7 @@ set(QML
qml/SteamProfile.qml
qml/SteamWorkshop.qml
qml/SteamWorkshopStartPage.qml
qml/TestMain.qml
qml/upload/PopupSteamWorkshopAgreement.qml
qml/upload/UploadProject.qml
qml/upload/UploadProjectBigItem.qml
@ -33,17 +34,20 @@ set(QML
qml/WorkshopItem.qml)
set(SOURCES
# cmake-format: sort
src/installedlistmodel.cpp
src/screenplayworkshop.cpp
src/steamaccount.cpp
src/steamapiwrapper.cpp
src/steamqmlimageprovider.cpp
src/steamworkshop.cpp
src/steamworkshopitem.cpp
src/steamworkshoplistmodel.cpp
src/screenplayworkshop.cpp)
src/steamworkshoplistmodel.cpp)
set(HEADER
# cmake-format: sort
src/installedlistmodel.h
src/screenplayworkshop.h
src/steamaccount.h
src/steamapiwrapper.h
src/steamqmlimageprovider.h
@ -51,26 +55,26 @@ set(HEADER
src/steamworkshopitem.h
src/steamworkshoplistmodel.h
src/uploadlistmodel.h
src/screenplayworkshop.h
src/workshopitem.h)
set(RESOURCES
# cmake-format: sort
assets/icons/icon_account_circle.svg
assets/icons/icon_arrow_left.svg
assets/icons/icon_arrow_right.svg
assets/icons/icon_close.svg
assets/icons/icon_download.svg
assets/icons/icon_file_upload.svg
assets/icons/icon_info.svg
assets/icons/icon_open_in_new.svg
assets/icons/icon_plus.svg
assets/icons/icon_search.svg
assets/icons/icon_steam.svg
assets/icons/icon_thumb_down.svg
assets/icons/icon_thumb_up.svg
assets/icons/icon_account_circle.svg
assets/icons/icon_arrow_left.svg
assets/icons/icon_close.svg
assets/icons/icon_arrow_right.svg
assets/icons/icon_search.svg
assets/icons/icon_info.svg
assets/images/mask_workshop.png
assets/images/steam_default_avatar.png
assets/images/steam_offline.png
assets/images/mask_workshop.png)
assets/images/steam_offline.png)
set(STEAM_LIB_PATH "${CMAKE_CURRENT_SOURCE_DIR}/SteamSDK/redistributable_bin/")
@ -104,7 +108,8 @@ qt_add_qml_module(
${PROJECT_NAME}
OUTPUT_DIRECTORY
${SCREENPLAY_QML_MODULES_PATH}/${PROJECT_NAME}
RESOURCE_PREFIX /qml
RESOURCE_PREFIX
/qml
VERSION
1.0
QML_FILES

View File

@ -18,8 +18,7 @@
// 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,7 +44,6 @@ STEAM_DEFINE_USER_INTERFACE_ACCESSOR( ISteamAppList *, SteamAppList, STEAMAPPLIS
#error steam_api_common.h should define VALVE_CALLBACK_PACK_xxx
#endif
//---------------------------------------------------------------------------------
// Purpose: Sent when a new app is installed
//---------------------------------------------------------------------------------
@ -54,7 +52,6 @@ STEAM_CALLBACK_MEMBER( 0, AppId_t, m_nAppID ) // ID of the app that installs
STEAM_CALLBACK_MEMBER(1, int, m_iInstallFolderIndex) // library folder the app is installed
STEAM_CALLBACK_END(2)
//---------------------------------------------------------------------------------
// Purpose: Sent when an app is uninstalled
//---------------------------------------------------------------------------------
@ -63,6 +60,5 @@ STEAM_CALLBACK_MEMBER( 0, AppId_t, m_nAppID ) // ID of the app that installs
STEAM_CALLBACK_MEMBER(1, int, m_iInstallFolderIndex) // library folder the app was installed
STEAM_CALLBACK_END(2)
#pragma pack(pop)
#endif // ISTEAMAPPLIST_H

View File

@ -14,12 +14,10 @@
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;
@ -130,18 +128,15 @@ STEAM_DEFINE_USER_INTERFACE_ACCESSOR( ISteamApps *, SteamApps, STEAMAPPS_INTERFA
//-----------------------------------------------------------------------------
// 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,
@ -149,36 +144,30 @@ 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&param2=value2&param3=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;
@ -186,12 +175,10 @@ 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
@ -199,12 +186,10 @@ 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

View File

@ -16,13 +16,11 @@
// 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

View File

@ -24,8 +24,7 @@
// 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
@ -160,7 +159,6 @@ public:
virtual ISteamRemotePlay* GetISteamRemotePlay(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) = 0;
STEAM_PRIVATE_API(virtual void DestroyAllInterfaces() = 0;)
};
#define STEAMCLIENT_INTERFACE_VERSION "SteamClient020"

View File

@ -16,8 +16,8 @@
#pragma once
#endif
#include "steam_api_common.h"
#include "isteaminput.h"
#include "steam_api_common.h"
#define STEAM_CONTROLLER_MAX_COUNT 16
@ -36,8 +36,7 @@
#define STEAM_CONTROLLER_MAX_ANALOG_ACTION_DATA 1.0f
#ifndef ISTEAMINPUT_H
enum ESteamControllerPad
{
enum ESteamControllerPad {
k_ESteamControllerPad_Left,
k_ESteamControllerPad_Right
};
@ -47,8 +46,7 @@ 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,
@ -453,8 +451,7 @@ enum EControllerActionOrigin
};
#ifndef ISTEAMINPUT_H
enum EXboxOrigin
{
enum EXboxOrigin {
k_EXboxOrigin_A,
k_EXboxOrigin_B,
k_EXboxOrigin_X,
@ -485,8 +482,7 @@ enum EXboxOrigin
k_EXboxOrigin_DPad_East,
};
enum ESteamInputType
{
enum ESteamInputType {
k_ESteamInputType_Unknown,
k_ESteamInputType_SteamController,
k_ESteamInputType_XBox360Controller,
@ -506,8 +502,7 @@ enum ESteamInputType
};
#endif
enum ESteamControllerLEDFlag
{
enum ESteamControllerLEDFlag {
k_ESteamControllerLEDFlag_SetColor,
k_ESteamControllerLEDFlag_RestoreUserDefault
};
@ -516,7 +511,6 @@ 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;
@ -530,8 +524,7 @@ 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;
@ -542,8 +535,7 @@ 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;
@ -551,8 +543,7 @@ struct ControllerDigitalActionData_t
bool bActive;
};
struct ControllerMotionData_t
{
struct ControllerMotionData_t {
// Sensor-fused absolute rotation; will drift in heading
float rotQuatX;
float rotQuatY;
@ -572,14 +563,11 @@ 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;

View File

@ -4,11 +4,9 @@
* All Rights Reserved.
*/
#ifndef _SCE_PAD_TRIGGER_EFFECT_H
#define _SCE_PAD_TRIGGER_EFFECT_H
#define SCE_PAD_TRIGGER_EFFECT_TRIGGER_MASK_L2 0x01
#define SCE_PAD_TRIGGER_EFFECT_TRIGGER_MASK_R2 0x02

View File

@ -15,8 +15,7 @@
//-----------------------------------------------------------------------------
// 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,
@ -44,12 +43,10 @@ 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
@ -61,12 +58,10 @@ 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,
@ -84,7 +79,6 @@ enum EFriendFlags
k_EFriendFlagAll = 0xFFFF,
};
// friend game played information
#if defined(VALVE_CALLBACK_PACK_SMALL)
#pragma pack(push, 4)
@ -93,8 +87,7 @@ 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;
@ -106,8 +99,7 @@ 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,
};
@ -115,8 +107,7 @@ 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
@ -136,19 +127,16 @@ 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.
@ -160,16 +148,14 @@ enum EActivateGameOverlayToWebPageMode
//-----------------------------------------------------------------------------
// Purpose: See GetProfileItemPropertyString and GetProfileItemPropertyUint
//-----------------------------------------------------------------------------
enum ECommunityProfileItemType
{
enum ECommunityProfileItemType {
k_ECommunityProfileItemType_AnimatedAvatar = 0,
k_ECommunityProfileItemType_AvatarFrame = 1,
k_ECommunityProfileItemType_ProfileModifier = 2,
k_ECommunityProfileItemType_ProfileBackground = 3,
k_ECommunityProfileItemType_MiniProfileBackground = 4,
};
enum ECommunityProfileItemProperty
{
enum ECommunityProfileItemProperty {
k_ECommunityProfileItemProperty_ImageSmall = 0, // string
k_ECommunityProfileItemProperty_ImageLarge = 1, // string
k_ECommunityProfileItemProperty_InternalName = 2, // string
@ -188,8 +174,7 @@ enum ECommunityProfileItemProperty
// 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
@ -476,19 +461,16 @@ STEAM_DEFINE_USER_INTERFACE_ACCESSOR( ISteamFriends *, SteamFriends, STEAMFRIEND
//-----------------------------------------------------------------------------
// 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,
@ -506,36 +488,30 @@ 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;
@ -547,13 +523,11 @@ 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
@ -561,70 +535,58 @@ 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;
@ -632,22 +594,18 @@ 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;
@ -656,34 +614,27 @@ 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];
@ -694,8 +645,7 @@ 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.
@ -706,17 +656,14 @@ 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];
};
@ -724,8 +671,7 @@ struct OverlayBrowserProtocolNavigation_t
//-----------------------------------------------------------------------------
// Purpose: A user's equipped profile items have changed
//-----------------------------------------------------------------------------
struct EquippedProfileItemsChanged_t
{
struct EquippedProfileItemsChanged_t {
enum { k_iCallback = k_iSteamFriendsCallbacks + 50 };
CSteamID m_steamID;
};
@ -733,8 +679,7 @@ struct EquippedProfileItemsChanged_t
//-----------------------------------------------------------------------------
// Purpose:
//-----------------------------------------------------------------------------
struct EquippedProfileItems_t
{
struct EquippedProfileItems_t {
enum { k_iCallback = k_iSteamFriendsCallbacks + 51 };
EResult m_eResult;
CSteamID m_steamID;

View File

@ -12,10 +12,8 @@
#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
@ -23,15 +21,12 @@ 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;
@ -43,7 +38,6 @@ 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"
@ -57,15 +51,13 @@ 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 };
};

View File

@ -15,10 +15,8 @@
//-----------------------------------------------------------------------------
// 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.
@ -172,7 +170,6 @@ 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;
@ -216,9 +213,6 @@ public:
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
@ -260,8 +254,7 @@ public:
STEAM_PRIVATE_API(
virtual void SetMasterServerHeartbeatInterval_DEPRECATED(int iHeartbeatInterval) = 0;
virtual void ForceMasterServerHeartbeat_DEPRECATED() = 0;
)
virtual void ForceMasterServerHeartbeat_DEPRECATED() = 0;)
};
#define STEAMGAMESERVER_INTERFACE_VERSION "SteamGameServer014"
@ -279,29 +272,23 @@ STEAM_DEFINE_GAMESERVER_INTERFACE_ACCESSOR( ISteamGameServer *, SteamGameServer,
#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;
@ -310,10 +297,8 @@ 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];
@ -322,15 +307,13 @@ 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)
@ -339,8 +322,7 @@ 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;
@ -349,8 +331,7 @@ 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
@ -369,15 +350,13 @@ 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;
@ -386,7 +365,6 @@ struct ComputeNewPlayerCompatibilityResult_t
CSteamID m_SteamIDCandidate;
};
#pragma pack(pop)
#endif // ISTEAMGAMESERVER_H

View File

@ -15,8 +15,7 @@
//-----------------------------------------------------------------------------
// 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
@ -66,7 +65,6 @@ 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)
@ -80,19 +78,16 @@ STEAM_DEFINE_GAMESERVER_INTERFACE_ACCESSOR( ISteamGameServerStats *, SteamGameSe
// 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
@ -102,13 +97,11 @@ 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

View File

@ -18,8 +18,7 @@ const uint32 INVALID_HTMLBROWSER = 0;
//-----------------------------------------------------------------------------
// Purpose: Functions for displaying HTML pages and interacting with them
//-----------------------------------------------------------------------------
class ISteamHTMLSurface
{
class ISteamHTMLSurface {
public:
virtual ~ISteamHTMLSurface() { }
@ -66,8 +65,7 @@ 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,
@ -82,8 +80,7 @@ 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,
@ -129,8 +126,7 @@ 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,
@ -219,7 +215,6 @@ STEAM_DEFINE_USER_INTERFACE_ACCESSOR( ISteamHTMLSurface *, SteamHTMLSurface, STE
#error steam_api_common.h should define VALVE_CALLBACK_PACK_xxx
#endif
//-----------------------------------------------------------------------------
// Purpose: The browser is ready for use
//-----------------------------------------------------------------------------
@ -227,7 +222,6 @@ 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
//-----------------------------------------------------------------------------
@ -246,7 +240,6 @@ 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
@ -259,7 +252,6 @@ STEAM_CALLBACK_MEMBER(3, const char *, pchPostData ) // any posted data for the
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)
//-----------------------------------------------------------------------------
@ -267,7 +259,6 @@ 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
//-----------------------------------------------------------------------------
@ -280,7 +271,6 @@ 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
//-----------------------------------------------------------------------------
@ -290,7 +280,6 @@ 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
//-----------------------------------------------------------------------------
@ -299,7 +288,6 @@ STEAM_CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the handle of the s
STEAM_CALLBACK_MEMBER(1, const char*, pchURL) //
STEAM_CALLBACK_END(2)
//-----------------------------------------------------------------------------
// Purpose: the page has a new title now
//-----------------------------------------------------------------------------
@ -308,7 +296,6 @@ STEAM_CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the handle of the s
STEAM_CALLBACK_MEMBER(1, const char*, pchTitle) //
STEAM_CALLBACK_END(2)
//-----------------------------------------------------------------------------
// Purpose: results from a search
//-----------------------------------------------------------------------------
@ -318,7 +305,6 @@ 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
//-----------------------------------------------------------------------------
@ -328,7 +314,6 @@ 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
//-----------------------------------------------------------------------------
@ -341,7 +326,6 @@ 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
//-----------------------------------------------------------------------------
@ -354,7 +338,6 @@ STEAM_CALLBACK_MEMBER( 4, bool, bVisible ) //
STEAM_CALLBACK_MEMBER(5, uint32, unPageSize) //
STEAM_CALLBACK_END(6)
//-----------------------------------------------------------------------------
// Purpose: response to GetLinkAtPosition call
//-----------------------------------------------------------------------------
@ -367,8 +350,6 @@ 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)
@ -378,7 +359,6 @@ STEAM_CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the handle of the s
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)
@ -388,7 +368,6 @@ STEAM_CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the handle of the s
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.
@ -399,7 +378,6 @@ 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.
//
@ -419,7 +397,6 @@ STEAM_CALLBACK_MEMBER( 5, uint32, unTall ) // the total height of the pBGRA text
STEAM_CALLBACK_MEMBER(6, HHTMLBrowser, unNewWindow_BrowserHandle_IGNORE)
STEAM_CALLBACK_END(7)
//-----------------------------------------------------------------------------
// Purpose: change the cursor to display
//-----------------------------------------------------------------------------
@ -428,7 +405,6 @@ STEAM_CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the handle of the s
STEAM_CALLBACK_MEMBER(1, uint32, eMouseCursor) // the EMouseCursor to display
STEAM_CALLBACK_END(2)
//-----------------------------------------------------------------------------
// Purpose: informational message from the browser
//-----------------------------------------------------------------------------
@ -437,7 +413,6 @@ STEAM_CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the handle of the s
STEAM_CALLBACK_MEMBER(1, const char*, pchMsg) // the EMouseCursor to display
STEAM_CALLBACK_END(2)
//-----------------------------------------------------------------------------
// Purpose: show a tooltip
//-----------------------------------------------------------------------------
@ -446,7 +421,6 @@ STEAM_CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the handle of the s
STEAM_CALLBACK_MEMBER(1, const char*, pchMsg) // the EMouseCursor to display
STEAM_CALLBACK_END(2)
//-----------------------------------------------------------------------------
// Purpose: update the text of an existing tooltip
//-----------------------------------------------------------------------------
@ -455,7 +429,6 @@ STEAM_CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the handle of the s
STEAM_CALLBACK_MEMBER(1, const char*, pchMsg) // the EMouseCursor to display
STEAM_CALLBACK_END(2)
//-----------------------------------------------------------------------------
// Purpose: hide the tooltip you are showing
//-----------------------------------------------------------------------------
@ -463,7 +436,6 @@ 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
//-----------------------------------------------------------------------------
@ -472,8 +444,6 @@ STEAM_CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // this is the new bro
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

View File

@ -23,10 +23,8 @@ 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/
@ -159,8 +157,7 @@ STEAM_DEFINE_GAMESERVER_INTERFACE_ACCESSOR( ISteamHTTP *, SteamGameServerHTTP, S
#error steam_api_common.h should define VALVE_CALLBACK_PACK_xxx
#endif
struct HTTPRequestCompleted_t
{
struct HTTPRequestCompleted_t {
enum { k_iCallback = k_iSteamHTTPCallbacks + 1 };
// Handle value for the request that has completed.
@ -181,9 +178,7 @@ struct HTTPRequestCompleted_t
uint32 m_unBodySize; // Same as GetHTTPResponseBodySize()
};
struct HTTPRequestHeadersReceived_t
{
struct HTTPRequestHeadersReceived_t {
enum { k_iCallback = k_iSteamHTTPCallbacks + 2 };
// Handle value for the request that has received headers.
@ -194,8 +189,7 @@ struct HTTPRequestHeadersReceived_t
uint64 m_ulContextValue;
};
struct HTTPRequestDataReceived_t
{
struct HTTPRequestDataReceived_t {
enum { k_iCallback = k_iSteamHTTPCallbacks + 3 };
// Handle value for the request that has received data.
@ -205,7 +199,6 @@ 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;
@ -213,7 +206,6 @@ struct HTTPRequestDataReceived_t
uint32 m_cBytesReceived;
};
#pragma pack(pop)
#endif // ISTEAMHTTP_H

View File

@ -31,8 +31,7 @@
#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,
@ -56,8 +55,7 @@ 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,
@ -258,7 +256,6 @@ 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,
@ -486,8 +483,7 @@ 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,
@ -519,28 +515,24 @@ enum EXboxOrigin
k_EXboxOrigin_Count,
};
enum ESteamControllerPad
{
enum ESteamControllerPad {
k_ESteamControllerPad_Left,
k_ESteamControllerPad_Right
};
enum EControllerHapticLocation
{
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
{
enum EControllerHapticType {
k_EControllerHapticType_Off,
k_EControllerHapticType_Tick,
k_EControllerHapticType_Click,
};
enum ESteamInputType
{
enum ESteamInputType {
k_ESteamInputType_Unknown,
k_ESteamInputType_SteamController,
k_ESteamInputType_XBox360Controller,
@ -561,8 +553,7 @@ enum ESteamInputType
};
// Individual values are used by the GetSessionInputConfigurationSettings bitmask
enum ESteamInputConfigurationEnableType
{
enum ESteamInputConfigurationEnableType {
k_ESteamInputConfigurationEnableType_None = 0x0000,
k_ESteamInputConfigurationEnableType_Playstation = 0x0001,
k_ESteamInputConfigurationEnableType_Xbox = 0x0002,
@ -571,8 +562,7 @@ enum ESteamInputConfigurationEnableType
};
// 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.
@ -580,16 +570,14 @@ enum ESteamInputLEDFlag
};
// These values are passed into GetGlyphPNGForActionOrigin
enum ESteamInputGlyphSize
{
enum ESteamInputGlyphSize {
k_ESteamInputGlyphSize_Small, // 32x32 pixels
k_ESteamInputGlyphSize_Medium, // 128x128 pixels
k_ESteamInputGlyphSize_Large, // 256x256 pixels
k_ESteamInputGlyphSize_Count,
};
enum ESteamInputGlyphStyle
{
enum ESteamInputGlyphStyle {
// Base-styles - cannot mix
ESteamInputGlyphStyle_Knockout = 0x0, // Face buttons will have colored labels/outlines on a knocked out background
// Rest of inputs will have white detail/borders on a knocked out background
@ -602,8 +590,7 @@ enum ESteamInputGlyphStyle
ESteamInputGlyphStyle_SolidABXY = 0x20, // ABXY Buttons will have a solid fill
};
enum ESteamInputActionEventType
{
enum ESteamInputActionEventType {
ESteamInputActionEventType_DigitalAction,
ESteamInputActionEventType_AnalogAction,
};
@ -620,8 +607,7 @@ 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;
@ -632,8 +618,7 @@ 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;
@ -641,8 +626,7 @@ struct InputDigitalActionData_t
bool bActive;
};
struct InputMotionData_t
{
struct InputMotionData_t {
// Sensor-fused absolute rotation; will drift in heading
float rotQuatX;
float rotQuatY;
@ -664,8 +648,7 @@ struct InputMotionData_t
// Purpose: when callbacks are enabled this fires each time a controller action
// state changes
//-----------------------------------------------------------------------------
struct SteamInputActionEvent_t
{
struct SteamInputActionEvent_t {
InputHandle_t controllerHandle;
ESteamInputActionEventType eEventType;
struct AnalogAction_t {
@ -694,10 +677,8 @@ 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.
// if bExplicitlyCallRunFrame is called then you will need to manually call RunFrame
// each frame, otherwise Steam Input will updated when SteamAPI_RunCallbacks() is called
@ -923,8 +904,7 @@ STEAM_DEFINE_USER_INTERFACE_ACCESSOR( ISteamInput *, SteamInput, STEAMINPUT_INTE
// 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
{
struct SteamInputDeviceConnected_t {
enum { k_iCallback = k_iSteamControllerCallbacks + 1 };
InputHandle_t m_ulConnectedDeviceHandle; // Handle for device
};
@ -933,8 +913,7 @@ struct SteamInputDeviceConnected_t
// 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
{
struct SteamInputDeviceDisconnected_t {
enum { k_iCallback = k_iSteamControllerCallbacks + 2 };
InputHandle_t m_ulDisconnectedDeviceHandle; // Handle for device
};
@ -943,8 +922,7 @@ struct SteamInputDeviceDisconnected_t
// 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
{
struct SteamInputConfigurationLoaded_t {
enum { k_iCallback = k_iSteamControllerCallbacks + 3 };
AppId_t m_unAppID;
InputHandle_t m_ulDeviceHandle; // Handle for device

View File

@ -21,7 +21,6 @@
#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.
@ -35,9 +34,7 @@ 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.
@ -49,8 +46,7 @@ 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;
@ -67,10 +63,8 @@ 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
@ -92,7 +86,8 @@ public:
// 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.
@ -109,7 +104,8 @@ 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.
@ -123,7 +119,6 @@ public:
// Destroys a result handle and frees all associated memory.
virtual void DestroyResult(SteamInventoryResult_t resultHandle) = 0;
// INVENTORY ASYNC QUERY
//
@ -136,7 +131,6 @@ public:
// or if you expect that the inventory may have changed.
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
@ -146,7 +140,6 @@ public:
// then transmit this buffer to other players upon joining a game.
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,7 +175,6 @@ 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
//
@ -222,8 +214,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
@ -231,7 +223,6 @@ 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
//
@ -249,12 +240,11 @@ public:
// The client library will suppress too-frequent calls to this method.
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
//
@ -279,7 +269,8 @@ 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
@ -291,7 +282,8 @@ 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.
@ -305,7 +297,8 @@ 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.
@ -370,14 +363,12 @@ STEAM_DEFINE_GAMESERVER_INTERFACE_ACCESSOR( ISteamInventory *, SteamGameServerIn
// 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_iSteamInventoryCallbacks + 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,
@ -385,25 +376,21 @@ 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_iSteamInventoryCallbacks + 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_iSteamInventoryCallbacks + 2 };
};
// Returned
struct SteamInventoryEligiblePromoItemDefIDs_t
{
struct SteamInventoryEligiblePromoItemDefIDs_t {
enum { k_iCallback = k_iSteamInventoryCallbacks + 3 };
EResult m_result;
CSteamID m_steamID;
@ -412,18 +399,15 @@ struct SteamInventoryEligiblePromoItemDefIDs_t
};
// Triggered from StartPurchase call
struct SteamInventoryStartPurchaseResult_t
{
struct SteamInventoryStartPurchaseResult_t {
enum { k_iCallback = k_iSteamInventoryCallbacks + 4 };
EResult m_result;
uint64 m_ulOrderID;
uint64 m_ulTransID;
};
// Triggered from RequestPrices
struct SteamInventoryRequestPricesResult_t
{
struct SteamInventoryRequestPricesResult_t {
enum { k_iCallback = k_iSteamInventoryCallbacks + 5 };
EResult m_result;
char m_rgchCurrency[4];
@ -431,5 +415,4 @@ struct SteamInventoryRequestPricesResult_t
#pragma pack(pop)
#endif // ISTEAMCONTROLLER_H

View File

@ -10,13 +10,12 @@
#pragma once
#endif
#include "steam_api_common.h"
#include "matchmakingtypes.h"
#include "isteamfriends.h"
#include "matchmakingtypes.h"
#include "steam_api_common.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
@ -28,8 +27,7 @@ enum ELobbyType
};
// lobby search filter tools
enum ELobbyComparison
{
enum ELobbyComparison {
k_ELobbyComparisonEqualToOrLessThan = -2,
k_ELobbyComparisonLessThan = -1,
k_ELobbyComparisonEqual = 0,
@ -39,8 +37,7 @@ 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
@ -54,8 +51,7 @@ 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
@ -289,8 +285,7 @@ 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;
@ -302,7 +297,6 @@ public:
virtual void RefreshComplete(HServerListRequest hRequest, EMatchMakingServerResponse response) = 0;
};
//-----------------------------------------------------------------------------
// Purpose: Callback interface for receiving responses after pinging an individual server
//
@ -313,8 +307,7 @@ 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;
@ -323,7 +316,6 @@ public:
virtual void ServerFailedToRespond() = 0;
};
//-----------------------------------------------------------------------------
// Purpose: Callback interface for receiving responses after requesting details on
// who is playing on a particular server.
@ -335,8 +327,7 @@ 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.
@ -350,7 +341,6 @@ public:
virtual void PlayersRefreshComplete() = 0;
};
//-----------------------------------------------------------------------------
// Purpose: Callback interface for receiving responses after requesting rules
// details on a particular server.
@ -362,8 +352,7 @@ 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
@ -377,7 +366,6 @@ public:
virtual void RulesRefreshComplete() = 0;
};
//-----------------------------------------------------------------------------
// Typedef for handle type you will receive when querying details on an individual server.
//-----------------------------------------------------------------------------
@ -387,8 +375,7 @@ 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.
@ -503,7 +490,6 @@ 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
//-----------------------------------------------------------------------------
@ -533,12 +519,10 @@ 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
@ -550,14 +534,11 @@ 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
@ -617,7 +598,6 @@ 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"
@ -625,20 +605,17 @@ 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)
@ -647,15 +624,12 @@ 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,
@ -663,10 +637,8 @@ enum ESteamPartyBeaconLocationData
k_ESteamPartyBeaconLocationDataIconURLLarge = 4,
};
class ISteamParties
{
class ISteamParties {
public:
// =============================================================================================
// Party Client APIs
@ -714,7 +686,6 @@ 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"
@ -722,15 +693,13 @@ 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;
@ -741,7 +710,6 @@ 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
@ -750,8 +718,7 @@ 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
@ -759,14 +726,12 @@ 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
@ -775,14 +740,12 @@ 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
@ -791,13 +754,11 @@ 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
@ -807,13 +768,11 @@ 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
@ -822,15 +781,13 @@ 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
@ -839,39 +796,33 @@ 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
@ -887,42 +838,35 @@ 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
@ -936,8 +880,7 @@ 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;
@ -952,14 +895,12 @@ 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
@ -969,8 +910,7 @@ 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
@ -978,8 +918,7 @@ 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,
@ -992,9 +931,7 @@ struct RequestPlayersForGameResultCallback_t
uint64 m_ullUniqueGameID;
};
struct RequestPlayersForGameFinalResultCallback_t
{
struct RequestPlayersForGameFinalResultCallback_t {
enum { k_iCallback = k_iSteamGameSearchCallbacks + 13 };
EResult m_eResult;
@ -1002,11 +939,8 @@ 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;
@ -1014,23 +948,19 @@ 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;
@ -1040,8 +970,7 @@ 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;
@ -1052,8 +981,7 @@ 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;
@ -1061,27 +989,22 @@ 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

View File

@ -11,20 +11,17 @@
//-----------------------------------------------------------------------------
// 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;
@ -39,7 +36,6 @@ 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"
@ -57,7 +53,6 @@ STEAM_DEFINE_USER_INTERFACE_ACCESSOR( ISteamMusic *, SteamMusic, STEAMMUSIC_INTE
#error steam_api_common.h should define VALVE_CALLBACK_PACK_xxx
#endif
STEAM_CALLBACK_BEGIN(PlaybackStatusHasChanged_t, k_iSteamMusicCallbacks + 1)
STEAM_CALLBACK_END(0)
@ -67,5 +62,4 @@ STEAM_CALLBACK_END(1)
#pragma pack(pop)
#endif // #define ISTEAMMUSIC_H

View File

@ -6,15 +6,13 @@
#pragma once
#endif
#include "steam_api_common.h"
#include "isteammusic.h"
#include "steam_api_common.h"
#define k_SteamMusicNameMaxLength 255
#define k_SteamMusicPNGMaxLength 65535
class ISteamMusicRemote
{
class ISteamMusicRemote {
public:
// Service Definition
virtual bool RegisterSteamMusicRemote(const char* pchName) = 0;
@ -77,7 +75,6 @@ STEAM_DEFINE_USER_INTERFACE_ACCESSOR( ISteamMusicRemote *, SteamMusicRemote, STE
#error steam_api_common.h should define VALVE_CALLBACK_PACK_xxx
#endif
STEAM_CALLBACK_BEGIN(MusicPlayerRemoteWillActivate_t, k_iSteamMusicRemoteCallbacks + 1)
STEAM_CALLBACK_END(0)
@ -128,6 +125,4 @@ STEAM_CALLBACK_END(1)
#pragma pack(pop)
#endif // #define ISTEAMMUSICREMOTE_H

View File

@ -14,8 +14,7 @@
// 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()
@ -32,8 +31,7 @@ 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.
@ -57,7 +55,6 @@ 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)
@ -67,8 +64,7 @@ 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)
@ -80,14 +76,12 @@ 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
@ -113,14 +107,12 @@ 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
@ -129,8 +121,7 @@ enum ESNetSocketConnectionType
/// the Steamworks SDK. Please see ISteamNetworkingSockets and
/// ISteamNetworkingMessages
//-----------------------------------------------------------------------------
class ISteamNetworking
{
class ISteamNetworking {
public:
////////////////////////////////////////////////////////////////////////////////////////////
//
@ -198,7 +189,6 @@ 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
@ -218,7 +208,6 @@ 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
@ -309,28 +298,23 @@ STEAM_DEFINE_GAMESERVER_INTERFACE_ACCESSOR( ISteamNetworking *, SteamGameServerN
// 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

View File

@ -4,8 +4,8 @@
#define ISTEAMNETWORKINGMESSAGES
#pragma once
#include "steamnetworkingtypes.h"
#include "steam_api_common.h"
#include "steamnetworkingtypes.h"
//-----------------------------------------------------------------------------
/// The non-connection-oriented interface to send and receive messages
@ -33,8 +33,7 @@
/// 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
@ -133,8 +132,7 @@ 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
};
@ -150,8 +148,7 @@ 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.
@ -177,7 +174,10 @@ struct SteamNetworkingMessagesSessionFailed_t
inline ISteamNetworkingMessages* SteamGameServerNetworkingMessages_Lib() { return SteamGameServerNetworkingMessages_LibV2(); }
#ifndef STEAMNETWORKINGSOCKETS_STEAMAPI
inline ISteamNetworkingMessages *SteamNetworkingMessages() { return SteamNetworkingMessages_LibV2(); }
inline ISteamNetworkingMessages* SteamNetworkingMessages()
{
return SteamNetworkingMessages_LibV2();
}
inline ISteamNetworkingMessages* SteamGameServerNetworkingMessages() { return SteamGameServerNetworkingMessages_LibV2(); }
#endif
#endif
@ -190,7 +190,10 @@ struct SteamNetworkingMessagesSessionFailed_t
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

View File

@ -4,8 +4,8 @@
#define ISTEAMNETWORKINGSOCKETS
#pragma once
#include "steamnetworkingtypes.h"
#include "steam_api_common.h"
#include "steamnetworkingtypes.h"
struct SteamNetAuthenticationStatus_t;
struct SteamNetworkingFakeIPResult_t;
@ -39,10 +39,8 @@ class ISteamNetworkingFakeUDPPort;
///
/// 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)
///
@ -351,7 +349,8 @@ public:
/// - k_EResultNoConnection - connection handle is invalid or connection has been closed.
/// - k_EResultInvalidParam - nLanes is bad
virtual EResult GetConnectionRealTimeStatus(HSteamNetConnection hConn, SteamNetConnectionRealTimeStatus_t* pStatus,
int nLanes, SteamNetConnectionRealTimeLaneStatus_t *pLanes ) = 0;
int nLanes, SteamNetConnectionRealTimeLaneStatus_t* pLanes)
= 0;
/// Returns detailed connection stats in text format. Useful
/// for dumping to a log, etc.
@ -688,7 +687,6 @@ 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
//
@ -932,7 +930,10 @@ protected:
inline ISteamNetworkingSockets* SteamGameServerNetworkingSockets_Lib() { return SteamGameServerNetworkingSockets_LibV12(); }
#ifndef STEAMNETWORKINGSOCKETS_STEAMAPI
inline ISteamNetworkingSockets *SteamNetworkingSockets() { return SteamNetworkingSockets_LibV12(); }
inline ISteamNetworkingSockets* SteamNetworkingSockets()
{
return SteamNetworkingSockets_LibV12();
}
inline ISteamNetworkingSockets* SteamGameServerNetworkingSockets() { return SteamGameServerNetworkingSockets_LibV12(); }
#endif
#endif
@ -943,7 +944,10 @@ protected:
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
@ -992,8 +996,7 @@ protected:
/// 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
@ -1014,8 +1017,7 @@ 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

View File

@ -8,8 +8,8 @@
#define ISTEAMNETWORKINGUTILS
#pragma once
#include "steamnetworkingtypes.h"
#include "steam_api_common.h"
#include "steamnetworkingtypes.h"
struct SteamDatagramRelayAuthTicket;
struct SteamRelayNetworkStatus_t;
@ -17,8 +17,7 @@ struct SteamRelayNetworkStatus_t;
//-----------------------------------------------------------------------------
/// Misc networking utilities for checking the local networking environment
/// and estimating pings.
class ISteamNetworkingUtils
{
class ISteamNetworkingUtils {
public:
//
// Efficient message sending
@ -304,7 +303,8 @@ 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
@ -320,13 +320,15 @@ 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;
/// Get info about a configuration value. Returns the name of the value,
/// or NULL if the value doesn't exist. Other output parameters can be NULL
/// if you do not need them.
virtual const char* GetConfigValueInfo(ESteamNetworkingConfigValue eValue, ESteamNetworkingConfigDataType* pOutDataType,
ESteamNetworkingConfigScope *pOutScope ) = 0;
ESteamNetworkingConfigScope* pOutScope)
= 0;
/// Iterate the list of all configuration values in the current environment that it might
/// be possible to display or edit using a generic UI. To get the first iterable value,
@ -363,7 +365,10 @@ protected:
inline ISteamNetworkingUtils* SteamNetworkingUtils_Lib() { return SteamNetworkingUtils_LibV4(); }
#ifndef STEAMNETWORKINGSOCKETS_STEAMAPI
inline ISteamNetworkingUtils *SteamNetworkingUtils() { return SteamNetworkingUtils_LibV4(); }
inline ISteamNetworkingUtils* SteamNetworkingUtils()
{
return SteamNetworkingUtils_LibV4();
}
#endif
#endif
@ -372,23 +377,22 @@ protected:
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
@ -423,19 +427,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];
};

View File

@ -13,8 +13,7 @@
#include "steam_api_common.h"
// Feature types for parental settings
enum EParentalFeature
{
enum EParentalFeature {
k_EFeatureInvalid = 0,
k_EFeatureStore = 1,
k_EFeatureCommunity = 2,
@ -32,8 +31,7 @@ enum EParentalFeature
k_EFeatureMax
};
class ISteamParentalSettings
{
class ISteamParentalSettings {
public:
virtual bool BIsParentalLockEnabled() = 0;
virtual bool BIsParentalLockLocked() = 0;
@ -54,10 +52,8 @@ STEAM_DEFINE_USER_INTERFACE_ACCESSOR( ISteamParentalSettings *, SteamParentalSet
//-----------------------------------------------------------------------------
// Purpose: Callback for querying UGC
//-----------------------------------------------------------------------------
struct SteamParentalSettingsChanged_t
{
struct SteamParentalSettingsChanged_t {
enum { k_iCallback = k_ISteamParentalSettingsCallbacks + 1 };
};
#endif // ISTEAMPARENTALSETTINGS_H

View File

@ -16,8 +16,7 @@
//-----------------------------------------------------------------------------
// Purpose: Enum for supported gradient directions
//-----------------------------------------------------------------------------
enum EOverlayGradientDirection
{
enum EOverlayGradientDirection {
k_EOverlayGradientHorizontal = 1,
k_EOverlayGradientVertical = 2,
k_EOverlayGradientNone = 3,
@ -36,14 +35,11 @@ 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.
@ -59,14 +55,11 @@ 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;
@ -87,5 +80,4 @@ public:
virtual bool BResetInputState() = 0;
};
#endif // ISTEAMPS3OVERLAYRENDERER_H

View File

@ -8,12 +8,10 @@
#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,
@ -24,12 +22,10 @@ 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;
@ -71,18 +67,14 @@ STEAM_DEFINE_USER_INTERFACE_ACCESSOR( ISteamRemotePlay *, SteamRemotePlay, STEAM
#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

View File

@ -12,14 +12,12 @@
#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
//-----------------------------------------------------------------------------
@ -30,8 +28,7 @@ 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;
};
@ -57,9 +54,7 @@ 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),
@ -73,17 +68,14 @@ 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
@ -108,22 +100,19 @@ 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,
@ -133,15 +122,12 @@ 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.
@ -156,8 +142,7 @@ enum EUGCReadAction
k_EUGCRead_Close = 2,
};
enum ERemoteStorageLocalFileChange
{
enum ERemoteStorageLocalFileChange {
k_ERemoteStorageLocalFileChange_Invalid = 0,
// The file was updated from another device
@ -167,8 +152,7 @@ enum ERemoteStorageLocalFileChange
k_ERemoteStorageLocalFileChange_FileDeleted = 2,
};
enum ERemoteStorageFilePathType
{
enum ERemoteStorageFilePathType {
k_ERemoteStorageFilePathType_Invalid = 0,
// The file is directly accessed by the game and this is the full path
@ -178,13 +162,11 @@ enum ERemoteStorageFilePathType
k_ERemoteStorageFilePathType_APIFilename = 2,
};
//-----------------------------------------------------------------------------
// Purpose: Functions for accessing, reading and writing files stored remotely
// and cached locally
//-----------------------------------------------------------------------------
class ISteamRemoteStorage
{
class ISteamRemoteStorage {
public:
// NOTE
//
@ -335,29 +317,22 @@ STEAM_DEFINE_USER_INTERFACE_ACCESSOR( ISteamRemoteStorage *, SteamRemoteStorage,
#error steam_api_common.h should define VALVE_CALLBACK_PACK_xxx
#endif
//-----------------------------------------------------------------------------
// Purpose: The result of a call to FileShare()
//-----------------------------------------------------------------------------
struct RemoteStorageFileShareResult_t
{
struct RemoteStorageFileShareResult_t {
enum { k_iCallback = k_iSteamRemoteStorageCallbacks + 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_iSteamRemoteStorageCallbacks + 8 is deprecated! Do not reuse
//-----------------------------------------------------------------------------
// Purpose: The result of a call to PublishFile()
//-----------------------------------------------------------------------------
struct RemoteStoragePublishFileResult_t
{
struct RemoteStoragePublishFileResult_t {
enum { k_iCallback = k_iSteamRemoteStorageCallbacks + 9 };
EResult m_eResult; // The result of the operation.
PublishedFileId_t m_nPublishedFileId;
@ -366,24 +341,19 @@ struct RemoteStoragePublishFileResult_t
// k_iSteamRemoteStorageCallbacks + 10 is deprecated! Do not reuse
//-----------------------------------------------------------------------------
// Purpose: The result of a call to DeletePublishedFile()
//-----------------------------------------------------------------------------
struct RemoteStorageDeletePublishedFileResult_t
{
struct RemoteStorageDeletePublishedFileResult_t {
enum { k_iCallback = k_iSteamRemoteStorageCallbacks + 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_iSteamRemoteStorageCallbacks + 12 };
EResult m_eResult; // The result of the operation.
int32 m_nResultsReturned;
@ -391,23 +361,19 @@ 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_iSteamRemoteStorageCallbacks + 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_iSteamRemoteStorageCallbacks + 14 };
EResult m_eResult; // The result of the operation.
int32 m_nResultsReturned;
@ -427,31 +393,26 @@ struct RemoteStorageEnumerateUserSubscribedFilesResult_t
//-----------------------------------------------------------------------------
// Purpose: The result of a call to UnsubscribePublishedFile()
//-----------------------------------------------------------------------------
struct RemoteStorageUnsubscribePublishedFileResult_t
{
struct RemoteStorageUnsubscribePublishedFileResult_t {
enum { k_iCallback = k_iSteamRemoteStorageCallbacks + 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_iSteamRemoteStorageCallbacks + 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_iSteamRemoteStorageCallbacks + 17 };
EResult m_eResult; // The result of the operation.
UGCHandle_t m_hFile; // The handle to the file that was attempted to be downloaded.
@ -461,12 +422,10 @@ 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_iSteamRemoteStorageCallbacks + 18 };
EResult m_eResult; // The result of the operation.
PublishedFileId_t m_nPublishedFileId;
@ -491,9 +450,7 @@ 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_iSteamRemoteStorageCallbacks + 19 };
EResult m_eResult;
int32 m_nResultsReturned;
@ -504,12 +461,10 @@ struct RemoteStorageEnumerateWorkshopFilesResult_t
uint32 m_unStartIndex;
};
//-----------------------------------------------------------------------------
// Purpose: The result of GetPublishedItemVoteDetails
//-----------------------------------------------------------------------------
struct RemoteStorageGetPublishedItemVoteDetailsResult_t
{
struct RemoteStorageGetPublishedItemVoteDetailsResult_t {
enum { k_iCallback = k_iSteamRemoteStorageCallbacks + 20 };
EResult m_eResult;
PublishedFileId_t m_unPublishedFileId;
@ -519,12 +474,10 @@ 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_iSteamRemoteStorageCallbacks + 21 };
PublishedFileId_t m_nPublishedFileId; // The published file id
AppId_t m_nAppID; // ID of the app that will consume this file.
@ -533,49 +486,41 @@ 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_iSteamRemoteStorageCallbacks + 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_iSteamRemoteStorageCallbacks + 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_iSteamRemoteStorageCallbacks + 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_iSteamRemoteStorageCallbacks + 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_iSteamRemoteStorageCallbacks + 26 };
EResult m_eResult; // The result of the operation.
int32 m_nResultsReturned;
@ -583,16 +528,14 @@ struct RemoteStorageEnumerateUserSharedWorkshopFilesResult_t
PublishedFileId_t m_rgPublishedFileId[k_unEnumeratePublishedFilesMaxResults];
};
struct RemoteStorageSetUserPublishedFileActionResult_t
{
struct RemoteStorageSetUserPublishedFileActionResult_t {
enum { k_iCallback = k_iSteamRemoteStorageCallbacks + 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_iSteamRemoteStorageCallbacks + 28 };
EResult m_eResult; // The result of the operation.
EWorkshopFileAction m_eAction; // the action that was filtered on
@ -602,23 +545,19 @@ 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_iSteamRemoteStorageCallbacks + 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_iSteamRemoteStorageCallbacks + 30 };
PublishedFileId_t m_nPublishedFileId; // The published file id
AppId_t m_nAppID; // ID of the app that will consume this file.
@ -628,8 +567,7 @@ struct RemoteStoragePublishedFileUpdated_t
//-----------------------------------------------------------------------------
// Purpose: Called when a FileWriteAsync completes
//-----------------------------------------------------------------------------
struct RemoteStorageFileWriteAsyncComplete_t
{
struct RemoteStorageFileWriteAsyncComplete_t {
enum { k_iCallback = k_iSteamRemoteStorageCallbacks + 31 };
EResult m_eResult; // result
};
@ -637,8 +575,7 @@ struct RemoteStorageFileWriteAsyncComplete_t
//-----------------------------------------------------------------------------
// Purpose: Called when a FileReadAsync completes
//-----------------------------------------------------------------------------
struct RemoteStorageFileReadAsyncComplete_t
{
struct RemoteStorageFileReadAsyncComplete_t {
enum { k_iCallback = k_iSteamRemoteStorageCallbacks + 32 };
SteamAPICall_t m_hFileReadAsync; // call handle of the async read which was made
EResult m_eResult; // result
@ -656,5 +593,4 @@ STEAM_CALLBACK_END( 0 )
#pragma pack(pop)
#endif // ISTEAMREMOTESTORAGE_H

View File

@ -25,8 +25,7 @@ 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,
@ -38,8 +37,7 @@ 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.
@ -97,8 +95,7 @@ STEAM_DEFINE_USER_INTERFACE_ACCESSOR( ISteamScreenshots *, SteamScreenshots, STE
// 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;
@ -109,12 +106,10 @@ 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

View File

@ -10,8 +10,8 @@
#pragma once
#endif
#include "steam_api_common.h"
#include "isteamremotestorage.h"
#include "steam_api_common.h"
// callbacks
#if defined(VALVE_CALLBACK_PACK_SMALL)
@ -22,18 +22,14 @@
#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,
@ -52,8 +48,7 @@ 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,
@ -66,8 +61,7 @@ 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,
@ -78,8 +72,7 @@ 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,
@ -102,8 +95,7 @@ enum EUGCQuery
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
@ -112,8 +104,7 @@ 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
@ -123,8 +114,7 @@ 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,
@ -140,8 +130,7 @@ 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
@ -161,8 +150,7 @@ 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
@ -197,10 +185,8 @@ 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;
@ -384,8 +370,7 @@ STEAM_DEFINE_GAMESERVER_INTERFACE_ACCESSOR( ISteamUGC *, SteamGameServerUGC, STE
//-----------------------------------------------------------------------------
// Purpose: Callback for querying UGC
//-----------------------------------------------------------------------------
struct SteamUGCQueryCompleted_t
{
struct SteamUGCQueryCompleted_t {
enum { k_iCallback = k_iSteamUGCCallbacks + 1 };
UGCQueryHandle_t m_handle;
EResult m_eResult;
@ -395,58 +380,48 @@ 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_iSteamUGCCallbacks + 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_iSteamUGCCallbacks + 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_iSteamUGCCallbacks + 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_iSteamUGCCallbacks + 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_iSteamUGCCallbacks + 6 };
AppId_t m_unAppID;
PublishedFileId_t m_nPublishedFileId;
@ -456,8 +431,7 @@ struct DownloadItemResult_t
//-----------------------------------------------------------------------------
// Purpose: result of AddItemToFavorites() or RemoveItemFromFavorites()
//-----------------------------------------------------------------------------
struct UserFavoriteItemsListChanged_t
{
struct UserFavoriteItemsListChanged_t {
enum { k_iCallback = k_iSteamUGCCallbacks + 7 };
PublishedFileId_t m_nPublishedFileId;
EResult m_eResult;
@ -467,8 +441,7 @@ struct UserFavoriteItemsListChanged_t
//-----------------------------------------------------------------------------
// Purpose: The result of a call to SetUserItemVote()
//-----------------------------------------------------------------------------
struct SetUserItemVoteResult_t
{
struct SetUserItemVoteResult_t {
enum { k_iCallback = k_iSteamUGCCallbacks + 8 };
PublishedFileId_t m_nPublishedFileId;
EResult m_eResult;
@ -478,8 +451,7 @@ struct SetUserItemVoteResult_t
//-----------------------------------------------------------------------------
// Purpose: The result of a call to GetUserItemVote()
//-----------------------------------------------------------------------------
struct GetUserItemVoteResult_t
{
struct GetUserItemVoteResult_t {
enum { k_iCallback = k_iSteamUGCCallbacks + 9 };
PublishedFileId_t m_nPublishedFileId;
EResult m_eResult;
@ -491,8 +463,7 @@ struct GetUserItemVoteResult_t
//-----------------------------------------------------------------------------
// Purpose: The result of a call to StartPlaytimeTracking()
//-----------------------------------------------------------------------------
struct StartPlaytimeTrackingResult_t
{
struct StartPlaytimeTrackingResult_t {
enum { k_iCallback = k_iSteamUGCCallbacks + 10 };
EResult m_eResult;
};
@ -500,8 +471,7 @@ struct StartPlaytimeTrackingResult_t
//-----------------------------------------------------------------------------
// Purpose: The result of a call to StopPlaytimeTracking()
//-----------------------------------------------------------------------------
struct StopPlaytimeTrackingResult_t
{
struct StopPlaytimeTrackingResult_t {
enum { k_iCallback = k_iSteamUGCCallbacks + 11 };
EResult m_eResult;
};
@ -509,8 +479,7 @@ struct StopPlaytimeTrackingResult_t
//-----------------------------------------------------------------------------
// Purpose: The result of a call to AddDependency
//-----------------------------------------------------------------------------
struct AddUGCDependencyResult_t
{
struct AddUGCDependencyResult_t {
enum { k_iCallback = k_iSteamUGCCallbacks + 12 };
EResult m_eResult;
PublishedFileId_t m_nPublishedFileId;
@ -520,20 +489,17 @@ struct AddUGCDependencyResult_t
//-----------------------------------------------------------------------------
// Purpose: The result of a call to RemoveDependency
//-----------------------------------------------------------------------------
struct RemoveUGCDependencyResult_t
{
struct RemoveUGCDependencyResult_t {
enum { k_iCallback = k_iSteamUGCCallbacks + 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_iSteamUGCCallbacks + 14 };
EResult m_eResult;
PublishedFileId_t m_nPublishedFileId;
@ -543,8 +509,7 @@ struct AddAppDependencyResult_t
//-----------------------------------------------------------------------------
// Purpose: The result of a call to RemoveAppDependency
//-----------------------------------------------------------------------------
struct RemoveAppDependencyResult_t
{
struct RemoveAppDependencyResult_t {
enum { k_iCallback = k_iSteamUGCCallbacks + 15 };
EResult m_eResult;
PublishedFileId_t m_nPublishedFileId;
@ -555,8 +520,7 @@ 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_iSteamUGCCallbacks + 16 };
EResult m_eResult;
PublishedFileId_t m_nPublishedFileId;
@ -568,29 +532,24 @@ struct GetAppDependenciesResult_t
//-----------------------------------------------------------------------------
// Purpose: The result of a call to DeleteItem
//-----------------------------------------------------------------------------
struct DeleteItemResult_t
{
struct DeleteItemResult_t {
enum { k_iCallback = k_iSteamUGCCallbacks + 17 };
EResult m_eResult;
PublishedFileId_t m_nPublishedFileId;
};
//-----------------------------------------------------------------------------
// Purpose: signal that the list of subscribed items changed
//-----------------------------------------------------------------------------
struct UserSubscribedItemsListChanged_t
{
struct UserSubscribedItemsListChanged_t {
enum { k_iCallback = k_iSteamUGCCallbacks + 18 };
AppId_t m_nAppID;
};
//-----------------------------------------------------------------------------
// Purpose: Status of the user's acceptable/rejection of the app's specific Workshop EULA
//-----------------------------------------------------------------------------
struct WorkshopEULAStatus_t
{
struct WorkshopEULAStatus_t {
enum { k_iCallback = k_iSteamUGCCallbacks + 20 };
EResult m_eResult;
AppId_t m_nAppID;

View File

@ -16,8 +16,7 @@
// 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
@ -207,7 +206,6 @@ 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"
@ -232,8 +230,7 @@ STEAM_DEFINE_USER_INTERFACE_ACCESSOR( ISteamUser *, SteamUser, STEAMUSER_INTERFA
// 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 };
};
@ -242,33 +239,28 @@ 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;
@ -278,50 +270,41 @@ 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
@ -329,12 +312,10 @@ 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;
@ -343,19 +324,16 @@ 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];
};
@ -363,18 +341,15 @@ 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;
@ -384,7 +359,6 @@ 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
@ -393,8 +367,7 @@ 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)
@ -410,7 +383,6 @@ struct DurationControl_t
int32 m_csecsRemaining; // playtime remaining until the user hits a regulatory limit
};
#pragma pack(pop)
#endif // ISTEAMUSER_H

View File

@ -10,8 +10,8 @@
#pragma once
#endif
#include "steam_api_common.h"
#include "isteamremotestorage.h"
#include "steam_api_common.h"
// size limit on stat or achievement name (UTF-8 encoded)
enum { k_cchStatNameMax = 128 };
@ -29,8 +29,7 @@ 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,
@ -38,24 +37,21 @@ 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
@ -70,8 +66,7 @@ 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
@ -81,12 +76,10 @@ 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)
@ -212,7 +205,8 @@ public:
// a max of 100 users can be downloaded at a time, with only one outstanding call at a time
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
@ -300,7 +294,6 @@ public:
STEAM_FLAT_NAME(GetAchievementProgressLimitsFloat)
virtual bool GetAchievementProgressLimits(const char* pchName, float* pfMinProgress, float* pfMaxProgress) = 0;
};
#define STEAMUSERSTATS_INTERFACE_VERSION "STEAMUSERSTATS_INTERFACE_VERSION012"
@ -322,33 +315,28 @@ STEAM_DEFINE_USER_INTERFACE_ACCESSOR( ISteamUserStats *, SteamUserStats, STEAMUS
// 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
@ -358,38 +346,32 @@ 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
@ -399,32 +381,25 @@ 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
@ -433,49 +408,40 @@ 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
@ -483,5 +449,4 @@ struct GlobalStatsReceived_t
#pragma pack(pop)
#endif // ISTEAMUSER_H

View File

@ -12,10 +12,8 @@
#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
@ -25,24 +23,19 @@ 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
{
enum EFloatingGamepadTextInputMode {
k_EFloatingGamepadTextInputModeModeSingleLine = 0, // Enter dismisses the keyboard
k_EFloatingGamepadTextInputModeModeMultipleLines = 1, // User needs to explictly close the keyboard
k_EFloatingGamepadTextInputModeModeEmail = 2, // Keyboard layout is email, enter dismisses the keyboard
@ -51,15 +44,13 @@ enum EFloatingGamepadTextInputMode
};
// 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
@ -69,8 +60,7 @@ 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;
@ -248,47 +238,39 @@ STEAM_DEFINE_INTERFACE_ACCESSOR( ISteamUtils *, SteamGameServerUtils, SteamInter
//-----------------------------------------------------------------------------
// 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,
@ -299,21 +281,17 @@ 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
//-----------------------------------------------------------------------------
// 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;
@ -329,8 +307,7 @@ STEAM_CALLBACK_END(0)
//-----------------------------------------------------------------------------
// The floating on-screen keyboard has been closed
//-----------------------------------------------------------------------------
struct FloatingGamepadTextInputDismissed_t
{
struct FloatingGamepadTextInputDismissed_t {
enum { k_iCallback = k_iSteamUtilsCallbacks + 38 };
};

View File

@ -21,16 +21,11 @@
#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;
@ -55,14 +50,11 @@ STEAM_CALLBACK_BEGIN( GetVideoURLResult_t, k_iSteamVideoCallbacks + 11 )
STEAM_CALLBACK_MEMBER(2, char, m_rgchURL[256])
STEAM_CALLBACK_END(3)
STEAM_CALLBACK_BEGIN(GetOPFSettingsResult_t, k_iSteamVideoCallbacks + 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

View File

@ -37,8 +37,7 @@ 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)
{
@ -51,9 +50,7 @@ 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
@ -61,11 +58,14 @@ 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
{
class servernetadr_t {
public:
servernetadr_t() : m_usConnectionPort( 0 ), m_usQueryPort( 0 ), m_unIP( 0 ) {}
servernetadr_t()
: m_usConnectionPort(0)
, m_usQueryPort(0)
, m_unIP(0)
{
}
void Init(unsigned int ip, uint16 usQueryPort, uint16 usConnectionPort);
#ifdef NETADR_H
@ -97,7 +97,6 @@ public:
m_unIP = that.m_unIP;
}
private:
const char* ToString(uint32 unIP, uint16 usPort) const;
uint16 m_usConnectionPort; // (in HOST byte order)
@ -105,7 +104,6 @@ private:
uint32 m_unIP;
};
inline void servernetadr_t::Init(unsigned int ip, uint16 usQueryPort, uint16 usConnectionPort)
{
m_unIP = ip;
@ -184,8 +182,7 @@ 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();
@ -210,7 +207,6 @@ public:
int m_nServerVersion; ///< server version as reported to Steam
private:
/// Game server name
char m_szServerName[k_cbMaxGameServerName];
@ -223,7 +219,6 @@ public:
CSteamID m_steamID;
};
inline gameserveritem_t::gameserveritem_t()
{
m_szGameDir[0] = m_szMap[0] = m_szGameDescription[0] = m_szServerName[0] = 0;
@ -247,5 +242,4 @@ inline void gameserveritem_t::SetName( const char *pName )
m_szServerName[sizeof(m_szServerName) - 1] = '\0';
}
#endif // MATCHMAKINGTYPES_H

View File

@ -21,32 +21,31 @@
#include "steam_api_common.h"
// All of the interfaces
#include "isteamclient.h"
#include "isteamuser.h"
#include "isteamfriends.h"
#include "isteamutils.h"
#include "isteammatchmaking.h"
#include "isteamuserstats.h"
#include "isteamapplist.h"
#include "isteamapps.h"
#include "isteamnetworking.h"
#include "isteamremotestorage.h"
#include "isteamscreenshots.h"
#include "isteamclient.h"
#include "isteamcontroller.h"
#include "isteamfriends.h"
#include "isteamhtmlsurface.h"
#include "isteamhttp.h"
#include "isteaminput.h"
#include "isteaminventory.h"
#include "isteammatchmaking.h"
#include "isteammusic.h"
#include "isteammusicremote.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 "isteamnetworking.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
@ -55,7 +54,6 @@
//
//----------------------------------------------------------------------------------------------------------------------------------------------------------//
// 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();
@ -81,7 +79,6 @@ 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);

View File

@ -13,8 +13,8 @@
#pragma once
#endif
#include "steamtypes.h"
#include "steamclientpublic.h"
#include "steamtypes.h"
// S_API defines the linkage and calling conventions for steam_api.dll exports
#if defined(_WIN32) && !defined(_X360)
@ -44,7 +44,9 @@
#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
@ -104,7 +106,8 @@ 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.
@ -116,15 +119,19 @@ 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
{
class CCallbackBase {
public:
CCallbackBase() { m_nCallbackFlags = 0; m_iCallback = 0; }
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;
@ -132,7 +139,8 @@ 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;
@ -146,10 +154,13 @@ private:
// Purpose: templated base for callbacks - internal implementation detail
//-----------------------------------------------------------------------------
template <int sizeof_P>
class CCallbackImpl : protected CCallbackBase
{
class CCallbackImpl : protected CCallbackBase {
public:
virtual ~CCallbackImpl() { if ( m_nCallbackFlags & k_ECallbackFlagsRegistered ) SteamAPI_UnregisterCallback( this ); }
virtual ~CCallbackImpl()
{
if (m_nCallbackFlags & k_ECallbackFlagsRegistered)
SteamAPI_UnregisterCallback(this);
}
void SetGameserverFlag() { m_nCallbackFlags |= k_ECallbackFlagsGameServer; }
protected:
@ -159,14 +170,12 @@ 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);
@ -178,6 +187,7 @@ 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);
@ -188,16 +198,13 @@ 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*);
@ -215,16 +222,17 @@ 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 >
{
class CCallbackManual : public CCallback<T, P, bGameServer> {
public:
CCallbackManual() : CCallback< T, P, bGameServer >( nullptr, nullptr ) {}
CCallbackManual()
: CCallback<T, P, bGameServer>(nullptr, nullptr)
{
}
// Inherits public Register and Unregister functions from base class
};

View File

@ -8,15 +8,13 @@
#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);

View File

@ -33,7 +33,8 @@ 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); \
}
@ -68,15 +69,22 @@ S_API void S_CALLTYPE SteamAPI_UnregisterCallResult( class CCallbackBase *pCallb
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
@ -112,8 +120,7 @@ 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;
}
@ -135,8 +142,7 @@ 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);
}
@ -144,10 +150,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 )
{
if ( bGameserver )
: m_pObj(nullptr)
, m_Func(nullptr)
{
if (bGameserver) {
this->SetGameserverFlag();
}
Register(pObj, func);
@ -194,8 +200,7 @@ 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
@ -207,10 +212,14 @@ 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?)
@ -321,8 +330,7 @@ enum { k_iSteamChatCallbacks = 5900 };
// 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)); }
@ -350,6 +358,7 @@ 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;
@ -376,8 +385,7 @@ private:
ISteamInput* m_pSteamInput;
};
class CSteamGameServerAPIContext
{
class CSteamGameServerAPIContext {
public:
CSteamGameServerAPIContext() { Clear(); }
inline void Clear() { memset(this, 0, sizeof(*this)); }
@ -402,5 +410,3 @@ private:
ISteamInventory* m_pSteamInventory;
ISteamUGC* m_pSteamUGC;
};

View File

@ -10,12 +10,11 @@
#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

View File

@ -9,15 +9,13 @@ namespace ScreenPlayWorkshopSteamEnums {
Q_NAMESPACE
enum class ESteamIPType
{
enum class ESteamIPType {
K_ESteamIPTypeIPv4 = 0,
K_ESteamIPTypeIPv6 = 1,
};
Q_ENUM_NS(ESteamIPType)
enum class EUniverse
{
enum class EUniverse {
K_EUniverseInvalid = 0,
K_EUniversePublic = 1,
K_EUniverseBeta = 2,
@ -27,8 +25,7 @@ enum class EUniverse
};
Q_ENUM_NS(EUniverse)
enum class EResult
{
enum class EResult {
K_EResultNone = 0,
K_EResultOK = 1,
K_EResultFail = 2,
@ -159,8 +156,7 @@ enum class EResult
};
Q_ENUM_NS(EResult)
enum class EVoiceResult
{
enum class EVoiceResult {
K_EVoiceResultOK = 0,
K_EVoiceResultNotInitialized = 1,
K_EVoiceResultNotRecording = 2,
@ -174,8 +170,7 @@ enum class EVoiceResult
};
Q_ENUM_NS(EVoiceResult)
enum class EDenyReason
{
enum class EDenyReason {
K_EDenyInvalid = 0,
K_EDenyInvalidVersion = 1,
K_EDenyGeneric = 2,
@ -195,8 +190,7 @@ enum class EDenyReason
};
Q_ENUM_NS(EDenyReason)
enum class EBeginAuthSessionResult
{
enum class EBeginAuthSessionResult {
K_EBeginAuthSessionResultOK = 0,
K_EBeginAuthSessionResultInvalidTicket = 1,
K_EBeginAuthSessionResultDuplicateRequest = 2,
@ -206,8 +200,7 @@ enum class EBeginAuthSessionResult
};
Q_ENUM_NS(EBeginAuthSessionResult)
enum class EAuthSessionResponse
{
enum class EAuthSessionResponse {
K_EAuthSessionResponseOK = 0,
K_EAuthSessionResponseUserNotConnectedToSteam = 1,
K_EAuthSessionResponseNoLicenseOrExpired = 2,
@ -221,16 +214,14 @@ enum class EAuthSessionResponse
};
Q_ENUM_NS(EAuthSessionResponse)
enum class EUserHasLicenseForAppResult
{
enum class EUserHasLicenseForAppResult {
K_EUserHasLicenseResultHasLicense = 0,
K_EUserHasLicenseResultDoesNotHaveLicense = 1,
K_EUserHasLicenseResultNoAuth = 2,
};
Q_ENUM_NS(EUserHasLicenseForAppResult)
enum class EAccountType
{
enum class EAccountType {
K_EAccountTypeInvalid = 0,
K_EAccountTypeIndividual = 1,
K_EAccountTypeMultiseat = 2,
@ -246,8 +237,7 @@ enum class EAccountType
};
Q_ENUM_NS(EAccountType)
enum class EChatEntryType
{
enum class EChatEntryType {
K_EChatEntryTypeInvalid = 0,
K_EChatEntryTypeChatMsg = 1,
K_EChatEntryTypeTyping = 2,
@ -263,8 +253,7 @@ enum class EChatEntryType
};
Q_ENUM_NS(EChatEntryType)
enum class EChatRoomEnterResponse
{
enum class EChatRoomEnterResponse {
K_EChatRoomEnterResponseSuccess = 1,
K_EChatRoomEnterResponseDoesntExist = 2,
K_EChatRoomEnterResponseNotAllowed = 3,
@ -280,8 +269,7 @@ enum class EChatRoomEnterResponse
};
Q_ENUM_NS(EChatRoomEnterResponse)
enum class EChatSteamIDInstanceFlags
{
enum class EChatSteamIDInstanceFlags {
K_EChatAccountInstanceMask = 4095,
K_EChatInstanceFlagClan = 524288,
K_EChatInstanceFlagLobby = 262144,
@ -289,8 +277,7 @@ enum class EChatSteamIDInstanceFlags
};
Q_ENUM_NS(EChatSteamIDInstanceFlags)
enum class ENotificationPosition
{
enum class ENotificationPosition {
K_EPositionTopLeft = 0,
K_EPositionTopRight = 1,
K_EPositionBottomLeft = 2,
@ -298,8 +285,7 @@ enum class ENotificationPosition
};
Q_ENUM_NS(ENotificationPosition)
enum class EBroadcastUploadResult
{
enum class EBroadcastUploadResult {
K_EBroadcastUploadResultNone = 0,
K_EBroadcastUploadResultOK = 1,
K_EBroadcastUploadResultInitFailed = 2,
@ -327,8 +313,7 @@ enum class EBroadcastUploadResult
};
Q_ENUM_NS(EBroadcastUploadResult)
enum class EMarketNotAllowedReasonFlags
{
enum class EMarketNotAllowedReasonFlags {
K_EMarketNotAllowedReason_None = 0,
K_EMarketNotAllowedReason_TemporaryFailure = 1,
K_EMarketNotAllowedReason_AccountDisabled = 2,
@ -349,8 +334,7 @@ enum class EMarketNotAllowedReasonFlags
};
Q_ENUM_NS(EMarketNotAllowedReasonFlags)
enum class EDurationControlProgress
{
enum class EDurationControlProgress {
K_EDurationControlProgress_Full = 0,
K_EDurationControlProgress_Half = 1,
K_EDurationControlProgress_None = 2,
@ -360,8 +344,7 @@ enum class EDurationControlProgress
};
Q_ENUM_NS(EDurationControlProgress)
enum class EDurationControlNotification
{
enum class EDurationControlNotification {
K_EDurationControlNotification_None = 0,
K_EDurationControlNotification_1Hour = 1,
K_EDurationControlNotification_3Hours = 2,
@ -373,8 +356,7 @@ enum class EDurationControlNotification
};
Q_ENUM_NS(EDurationControlNotification)
enum class EDurationControlOnlineState
{
enum class EDurationControlOnlineState {
K_EDurationControlOnlineState_Invalid = 0,
K_EDurationControlOnlineState_Offline = 1,
K_EDurationControlOnlineState_Online = 2,
@ -382,8 +364,7 @@ enum class EDurationControlOnlineState
};
Q_ENUM_NS(EDurationControlOnlineState)
enum class EGameSearchErrorCode_t
{
enum class EGameSearchErrorCode_t {
K_EGameSearchErrorCode_OK = 1,
K_EGameSearchErrorCode_Failed_Search_Already_In_Progress = 2,
K_EGameSearchErrorCode_Failed_No_Search_In_Progress = 3,
@ -396,8 +377,7 @@ enum class EGameSearchErrorCode_t
};
Q_ENUM_NS(EGameSearchErrorCode_t)
enum class EPlayerResult_t
{
enum class EPlayerResult_t {
K_EPlayerResultFailedToConnect = 1,
K_EPlayerResultAbandoned = 2,
K_EPlayerResultKicked = 3,
@ -406,24 +386,21 @@ enum class EPlayerResult_t
};
Q_ENUM_NS(EPlayerResult_t)
enum class ESteamIPv6ConnectivityProtocol
{
enum class ESteamIPv6ConnectivityProtocol {
K_ESteamIPv6ConnectivityProtocol_Invalid = 0,
K_ESteamIPv6ConnectivityProtocol_HTTP = 1,
K_ESteamIPv6ConnectivityProtocol_UDP = 2,
};
Q_ENUM_NS(ESteamIPv6ConnectivityProtocol)
enum class ESteamIPv6ConnectivityState
{
enum class ESteamIPv6ConnectivityState {
K_ESteamIPv6ConnectivityState_Unknown = 0,
K_ESteamIPv6ConnectivityState_Good = 1,
K_ESteamIPv6ConnectivityState_Bad = 2,
};
Q_ENUM_NS(ESteamIPv6ConnectivityState)
enum class EFriendRelationship
{
enum class EFriendRelationship {
K_EFriendRelationshipNone = 0,
K_EFriendRelationshipBlocked = 1,
K_EFriendRelationshipRequestRecipient = 2,
@ -436,8 +413,7 @@ enum class EFriendRelationship
};
Q_ENUM_NS(EFriendRelationship)
enum class EPersonaState
{
enum class EPersonaState {
K_EPersonaStateOffline = 0,
K_EPersonaStateOnline = 1,
K_EPersonaStateBusy = 2,
@ -450,8 +426,7 @@ enum class EPersonaState
};
Q_ENUM_NS(EPersonaState)
enum class EFriendFlags
{
enum class EFriendFlags {
K_EFriendFlagNone = 0,
K_EFriendFlagBlocked = 1,
K_EFriendFlagFriendshipRequested = 2,
@ -467,8 +442,7 @@ enum class EFriendFlags
};
Q_ENUM_NS(EFriendFlags)
enum class EUserRestriction
{
enum class EUserRestriction {
K_nUserRestrictionNone = 0,
K_nUserRestrictionUnknown = 1,
K_nUserRestrictionAnyChat = 2,
@ -480,23 +454,20 @@ enum class EUserRestriction
};
Q_ENUM_NS(EUserRestriction)
enum class EOverlayToStoreFlag
{
enum class EOverlayToStoreFlag {
K_EOverlayToStoreFlag_None = 0,
K_EOverlayToStoreFlag_AddToCart = 1,
K_EOverlayToStoreFlag_AddToCartAndShow = 2,
};
Q_ENUM_NS(EOverlayToStoreFlag)
enum class EActivateGameOverlayToWebPageMode
{
enum class EActivateGameOverlayToWebPageMode {
K_EActivateGameOverlayToWebPageMode_Default = 0,
K_EActivateGameOverlayToWebPageMode_Modal = 1,
};
Q_ENUM_NS(EActivateGameOverlayToWebPageMode)
enum class ECommunityProfileItemType
{
enum class ECommunityProfileItemType {
K_ECommunityProfileItemType_AnimatedAvatar = 0,
K_ECommunityProfileItemType_AvatarFrame = 1,
K_ECommunityProfileItemType_ProfileModifier = 2,
@ -505,8 +476,7 @@ enum class ECommunityProfileItemType
};
Q_ENUM_NS(ECommunityProfileItemType)
enum class ECommunityProfileItemProperty
{
enum class ECommunityProfileItemProperty {
K_ECommunityProfileItemProperty_ImageSmall = 0,
K_ECommunityProfileItemProperty_ImageLarge = 1,
K_ECommunityProfileItemProperty_InternalName = 2,
@ -522,8 +492,7 @@ enum class ECommunityProfileItemProperty
};
Q_ENUM_NS(ECommunityProfileItemProperty)
enum class EPersonaChange
{
enum class EPersonaChange {
K_EPersonaChangeName = 1,
K_EPersonaChangeStatus = 2,
K_EPersonaChangeComeOnline = 4,
@ -542,8 +511,7 @@ enum class EPersonaChange
};
Q_ENUM_NS(EPersonaChange)
enum class ESteamAPICallFailure
{
enum class ESteamAPICallFailure {
K_ESteamAPICallFailureNone = -1,
K_ESteamAPICallFailureSteamGone = 0,
K_ESteamAPICallFailureNetworkFailure = 1,
@ -552,22 +520,19 @@ enum class ESteamAPICallFailure
};
Q_ENUM_NS(ESteamAPICallFailure)
enum class EGamepadTextInputMode
{
enum class EGamepadTextInputMode {
K_EGamepadTextInputModeNormal = 0,
K_EGamepadTextInputModePassword = 1,
};
Q_ENUM_NS(EGamepadTextInputMode)
enum class EGamepadTextInputLineMode
{
enum class EGamepadTextInputLineMode {
K_EGamepadTextInputLineModeSingleLine = 0,
K_EGamepadTextInputLineModeMultipleLines = 1,
};
Q_ENUM_NS(EGamepadTextInputLineMode)
enum class EFloatingGamepadTextInputMode
{
enum class EFloatingGamepadTextInputMode {
K_EFloatingGamepadTextInputModeModeSingleLine = 0,
K_EFloatingGamepadTextInputModeModeMultipleLines = 1,
K_EFloatingGamepadTextInputModeModeEmail = 2,
@ -575,8 +540,7 @@ enum class EFloatingGamepadTextInputMode
};
Q_ENUM_NS(EFloatingGamepadTextInputMode)
enum class ETextFilteringContext
{
enum class ETextFilteringContext {
K_ETextFilteringContextUnknown = 0,
K_ETextFilteringContextGameContent = 1,
K_ETextFilteringContextChat = 2,
@ -584,8 +548,7 @@ enum class ETextFilteringContext
};
Q_ENUM_NS(ETextFilteringContext)
enum class ECheckFileSignature
{
enum class ECheckFileSignature {
K_ECheckFileSignatureInvalidSignature = 0,
K_ECheckFileSignatureValidSignature = 1,
K_ECheckFileSignatureFileNotFound = 2,
@ -594,16 +557,14 @@ enum class ECheckFileSignature
};
Q_ENUM_NS(ECheckFileSignature)
enum class EMatchMakingServerResponse
{
enum class EMatchMakingServerResponse {
EServerResponded = 0,
EServerFailedToRespond = 1,
ENoServersListedOnMasterServer = 2,
};
Q_ENUM_NS(EMatchMakingServerResponse)
enum class ELobbyType
{
enum class ELobbyType {
K_ELobbyTypePrivate = 0,
K_ELobbyTypeFriendsOnly = 1,
K_ELobbyTypePublic = 2,
@ -612,8 +573,7 @@ enum class ELobbyType
};
Q_ENUM_NS(ELobbyType)
enum class ELobbyComparison
{
enum class ELobbyComparison {
K_ELobbyComparisonEqualToOrLessThan = -2,
K_ELobbyComparisonLessThan = -1,
K_ELobbyComparisonEqual = 0,
@ -623,8 +583,7 @@ enum class ELobbyComparison
};
Q_ENUM_NS(ELobbyComparison)
enum class ELobbyDistanceFilter
{
enum class ELobbyDistanceFilter {
K_ELobbyDistanceFilterClose = 0,
K_ELobbyDistanceFilterDefault = 1,
K_ELobbyDistanceFilterFar = 2,
@ -632,8 +591,7 @@ enum class ELobbyDistanceFilter
};
Q_ENUM_NS(ELobbyDistanceFilter)
enum class EChatMemberStateChange
{
enum class EChatMemberStateChange {
K_EChatMemberStateChangeEntered = 1,
K_EChatMemberStateChangeLeft = 2,
K_EChatMemberStateChangeDisconnected = 4,
@ -642,16 +600,14 @@ enum class EChatMemberStateChange
};
Q_ENUM_NS(EChatMemberStateChange)
enum class ESteamPartyBeaconLocationType
{
enum class ESteamPartyBeaconLocationType {
K_ESteamPartyBeaconLocationType_Invalid = 0,
K_ESteamPartyBeaconLocationType_ChatGroup = 1,
K_ESteamPartyBeaconLocationType_Max = 2,
};
Q_ENUM_NS(ESteamPartyBeaconLocationType)
enum class ESteamPartyBeaconLocationData
{
enum class ESteamPartyBeaconLocationData {
K_ESteamPartyBeaconLocationDataInvalid = 0,
K_ESteamPartyBeaconLocationDataName = 1,
K_ESteamPartyBeaconLocationDataIconURLSmall = 2,
@ -660,8 +616,7 @@ enum class ESteamPartyBeaconLocationData
};
Q_ENUM_NS(ESteamPartyBeaconLocationData)
enum class ERemoteStoragePlatform
{
enum class ERemoteStoragePlatform {
K_ERemoteStoragePlatformNone = 0,
K_ERemoteStoragePlatformWindows = 1,
K_ERemoteStoragePlatformOSX = 2,
@ -674,8 +629,7 @@ enum class ERemoteStoragePlatform
};
Q_ENUM_NS(ERemoteStoragePlatform)
enum class ERemoteStoragePublishedFileVisibility
{
enum class ERemoteStoragePublishedFileVisibility {
K_ERemoteStoragePublishedFileVisibilityPublic = 0,
K_ERemoteStoragePublishedFileVisibilityFriendsOnly = 1,
K_ERemoteStoragePublishedFileVisibilityPrivate = 2,
@ -683,8 +637,7 @@ enum class ERemoteStoragePublishedFileVisibility
};
Q_ENUM_NS(ERemoteStoragePublishedFileVisibility)
enum class EWorkshopFileType
{
enum class EWorkshopFileType {
K_EWorkshopFileTypeFirst = 0,
K_EWorkshopFileTypeCommunity = 0,
K_EWorkshopFileTypeMicrotransaction = 1,
@ -706,8 +659,7 @@ enum class EWorkshopFileType
};
Q_ENUM_NS(EWorkshopFileType)
enum class EWorkshopVote
{
enum class EWorkshopVote {
K_EWorkshopVoteUnvoted = 0,
K_EWorkshopVoteFor = 1,
K_EWorkshopVoteAgainst = 2,
@ -715,15 +667,13 @@ enum class EWorkshopVote
};
Q_ENUM_NS(EWorkshopVote)
enum class EWorkshopFileAction
{
enum class EWorkshopFileAction {
K_EWorkshopFileActionPlayed = 0,
K_EWorkshopFileActionCompleted = 1,
};
Q_ENUM_NS(EWorkshopFileAction)
enum class EWorkshopEnumerationType
{
enum class EWorkshopEnumerationType {
K_EWorkshopEnumerationTypeRankedByVote = 0,
K_EWorkshopEnumerationTypeRecent = 1,
K_EWorkshopEnumerationTypeTrending = 2,
@ -734,39 +684,34 @@ enum class EWorkshopEnumerationType
};
Q_ENUM_NS(EWorkshopEnumerationType)
enum class EWorkshopVideoProvider
{
enum class EWorkshopVideoProvider {
K_EWorkshopVideoProviderNone = 0,
K_EWorkshopVideoProviderYoutube = 1,
};
Q_ENUM_NS(EWorkshopVideoProvider)
enum class EUGCReadAction
{
enum class EUGCReadAction {
K_EUGCRead_ContinueReadingUntilFinished = 0,
K_EUGCRead_ContinueReading = 1,
K_EUGCRead_Close = 2,
};
Q_ENUM_NS(EUGCReadAction)
enum class ERemoteStorageLocalFileChange
{
enum class ERemoteStorageLocalFileChange {
K_ERemoteStorageLocalFileChange_Invalid = 0,
K_ERemoteStorageLocalFileChange_FileUpdated = 1,
K_ERemoteStorageLocalFileChange_FileDeleted = 2,
};
Q_ENUM_NS(ERemoteStorageLocalFileChange)
enum class ERemoteStorageFilePathType
{
enum class ERemoteStorageFilePathType {
K_ERemoteStorageFilePathType_Invalid = 0,
K_ERemoteStorageFilePathType_Absolute = 1,
K_ERemoteStorageFilePathType_APIFilename = 2,
};
Q_ENUM_NS(ERemoteStorageFilePathType)
enum class ELeaderboardDataRequest
{
enum class ELeaderboardDataRequest {
K_ELeaderboardDataRequestGlobal = 0,
K_ELeaderboardDataRequestGlobalAroundUser = 1,
K_ELeaderboardDataRequestFriends = 2,
@ -774,16 +719,14 @@ enum class ELeaderboardDataRequest
};
Q_ENUM_NS(ELeaderboardDataRequest)
enum class ELeaderboardSortMethod
{
enum class ELeaderboardSortMethod {
K_ELeaderboardSortMethodNone = 0,
K_ELeaderboardSortMethodAscending = 1,
K_ELeaderboardSortMethodDescending = 2,
};
Q_ENUM_NS(ELeaderboardSortMethod)
enum class ELeaderboardDisplayType
{
enum class ELeaderboardDisplayType {
K_ELeaderboardDisplayTypeNone = 0,
K_ELeaderboardDisplayTypeNumeric = 1,
K_ELeaderboardDisplayTypeTimeSeconds = 2,
@ -791,16 +734,14 @@ enum class ELeaderboardDisplayType
};
Q_ENUM_NS(ELeaderboardDisplayType)
enum class ELeaderboardUploadScoreMethod
{
enum class ELeaderboardUploadScoreMethod {
K_ELeaderboardUploadScoreMethodNone = 0,
K_ELeaderboardUploadScoreMethodKeepBest = 1,
K_ELeaderboardUploadScoreMethodForceUpdate = 2,
};
Q_ENUM_NS(ELeaderboardUploadScoreMethod)
enum class ERegisterActivationCodeResult
{
enum class ERegisterActivationCodeResult {
K_ERegisterActivationCodeResultOK = 0,
K_ERegisterActivationCodeResultFail = 1,
K_ERegisterActivationCodeResultAlreadyRegistered = 2,
@ -809,8 +750,7 @@ enum class ERegisterActivationCodeResult
};
Q_ENUM_NS(ERegisterActivationCodeResult)
enum class EP2PSessionError
{
enum class EP2PSessionError {
K_EP2PSessionErrorNone = 0,
K_EP2PSessionErrorNoRightsToApp = 2,
K_EP2PSessionErrorTimeout = 4,
@ -820,8 +760,7 @@ enum class EP2PSessionError
};
Q_ENUM_NS(EP2PSessionError)
enum class EP2PSend
{
enum class EP2PSend {
K_EP2PSendUnreliable = 0,
K_EP2PSendUnreliableNoDelay = 1,
K_EP2PSendReliable = 2,
@ -829,8 +768,7 @@ enum class EP2PSend
};
Q_ENUM_NS(EP2PSend)
enum class ESNetSocketState
{
enum class ESNetSocketState {
K_ESNetSocketStateInvalid = 0,
K_ESNetSocketStateConnected = 1,
K_ESNetSocketStateInitiated = 10,
@ -845,16 +783,14 @@ enum class ESNetSocketState
};
Q_ENUM_NS(ESNetSocketState)
enum class ESNetSocketConnectionType
{
enum class ESNetSocketConnectionType {
K_ESNetSocketConnectionTypeNotConnected = 0,
K_ESNetSocketConnectionTypeUDP = 1,
K_ESNetSocketConnectionTypeUDPRelay = 2,
};
Q_ENUM_NS(ESNetSocketConnectionType)
enum class EVRScreenshotType
{
enum class EVRScreenshotType {
K_EVRScreenshotType_None = 0,
K_EVRScreenshotType_Mono = 1,
K_EVRScreenshotType_Stereo = 2,
@ -864,8 +800,7 @@ enum class EVRScreenshotType
};
Q_ENUM_NS(EVRScreenshotType)
enum class AudioPlayback_Status
{
enum class AudioPlayback_Status {
AudioPlayback_Undefined = 0,
AudioPlayback_Playing = 1,
AudioPlayback_Paused = 2,
@ -873,8 +808,7 @@ enum class AudioPlayback_Status
};
Q_ENUM_NS(AudioPlayback_Status)
enum class EHTTPMethod
{
enum class EHTTPMethod {
K_EHTTPMethodInvalid = 0,
K_EHTTPMethodGET = 1,
K_EHTTPMethodHEAD = 2,
@ -886,8 +820,7 @@ enum class EHTTPMethod
};
Q_ENUM_NS(EHTTPMethod)
enum class EHTTPStatusCode
{
enum class EHTTPStatusCode {
K_EHTTPStatusCodeInvalid = 0,
K_EHTTPStatusCode100Continue = 100,
K_EHTTPStatusCode101SwitchingProtocols = 101,
@ -936,8 +869,7 @@ enum class EHTTPStatusCode
};
Q_ENUM_NS(EHTTPStatusCode)
enum class EInputSourceMode
{
enum class EInputSourceMode {
K_EInputSourceMode_None = 0,
K_EInputSourceMode_Dpad = 1,
K_EInputSourceMode_Buttons = 2,
@ -958,8 +890,7 @@ enum class EInputSourceMode
};
Q_ENUM_NS(EInputSourceMode)
enum class EInputActionOrigin
{
enum class EInputActionOrigin {
K_EInputActionOrigin_None = 0,
K_EInputActionOrigin_SteamController_A = 1,
K_EInputActionOrigin_SteamController_B = 2,
@ -1371,8 +1302,7 @@ enum class EInputActionOrigin
};
Q_ENUM_NS(EInputActionOrigin)
enum class EXboxOrigin
{
enum class EXboxOrigin {
K_EXboxOrigin_A = 0,
K_EXboxOrigin_B = 1,
K_EXboxOrigin_X = 2,
@ -1405,31 +1335,27 @@ enum class EXboxOrigin
};
Q_ENUM_NS(EXboxOrigin)
enum class ESteamControllerPad
{
enum class ESteamControllerPad {
K_ESteamControllerPad_Left = 0,
K_ESteamControllerPad_Right = 1,
};
Q_ENUM_NS(ESteamControllerPad)
enum class EControllerHapticLocation
{
enum class EControllerHapticLocation {
K_EControllerHapticLocation_Left = 1,
K_EControllerHapticLocation_Right = 2,
K_EControllerHapticLocation_Both = 3,
};
Q_ENUM_NS(EControllerHapticLocation)
enum class EControllerHapticType
{
enum class EControllerHapticType {
K_EControllerHapticType_Off = 0,
K_EControllerHapticType_Tick = 1,
K_EControllerHapticType_Click = 2,
};
Q_ENUM_NS(EControllerHapticType)
enum class ESteamInputType
{
enum class ESteamInputType {
K_ESteamInputType_Unknown = 0,
K_ESteamInputType_SteamController = 1,
K_ESteamInputType_XBox360Controller = 2,
@ -1450,8 +1376,7 @@ enum class ESteamInputType
};
Q_ENUM_NS(ESteamInputType)
enum class ESteamInputConfigurationEnableType
{
enum class ESteamInputConfigurationEnableType {
K_ESteamInputConfigurationEnableType_None = 0,
K_ESteamInputConfigurationEnableType_Playstation = 1,
K_ESteamInputConfigurationEnableType_Xbox = 2,
@ -1460,15 +1385,13 @@ enum class ESteamInputConfigurationEnableType
};
Q_ENUM_NS(ESteamInputConfigurationEnableType)
enum class ESteamInputLEDFlag
{
enum class ESteamInputLEDFlag {
K_ESteamInputLEDFlag_SetColor = 0,
K_ESteamInputLEDFlag_RestoreUserDefault = 1,
};
Q_ENUM_NS(ESteamInputLEDFlag)
enum class ESteamInputGlyphSize
{
enum class ESteamInputGlyphSize {
K_ESteamInputGlyphSize_Small = 0,
K_ESteamInputGlyphSize_Medium = 1,
K_ESteamInputGlyphSize_Large = 2,
@ -1476,8 +1399,7 @@ enum class ESteamInputGlyphSize
};
Q_ENUM_NS(ESteamInputGlyphSize)
enum class ESteamInputGlyphStyle
{
enum class ESteamInputGlyphStyle {
ESteamInputGlyphStyle_Knockout = 0,
ESteamInputGlyphStyle_Light = 1,
ESteamInputGlyphStyle_Dark = 2,
@ -1486,15 +1408,13 @@ enum class ESteamInputGlyphStyle
};
Q_ENUM_NS(ESteamInputGlyphStyle)
enum class ESteamInputActionEventType
{
enum class ESteamInputActionEventType {
ESteamInputActionEventType_DigitalAction = 0,
ESteamInputActionEventType_AnalogAction = 1,
};
Q_ENUM_NS(ESteamInputActionEventType)
enum class EControllerActionOrigin
{
enum class EControllerActionOrigin {
K_EControllerActionOrigin_None = 0,
K_EControllerActionOrigin_A = 1,
K_EControllerActionOrigin_B = 2,
@ -1878,15 +1798,13 @@ enum class EControllerActionOrigin
};
Q_ENUM_NS(EControllerActionOrigin)
enum class ESteamControllerLEDFlag
{
enum class ESteamControllerLEDFlag {
K_ESteamControllerLEDFlag_SetColor = 0,
K_ESteamControllerLEDFlag_RestoreUserDefault = 1,
};
Q_ENUM_NS(ESteamControllerLEDFlag)
enum class EUGCMatchingUGCType
{
enum class EUGCMatchingUGCType {
K_EUGCMatchingUGCType_Items = 0,
K_EUGCMatchingUGCType_Items_Mtx = 1,
K_EUGCMatchingUGCType_Items_ReadyToUse = 2,
@ -1904,8 +1822,7 @@ enum class EUGCMatchingUGCType
};
Q_ENUM_NS(EUGCMatchingUGCType)
enum class EUserUGCList
{
enum class EUserUGCList {
K_EUserUGCList_Published = 0,
K_EUserUGCList_VotedOn = 1,
K_EUserUGCList_VotedUp = 2,
@ -1918,8 +1835,7 @@ enum class EUserUGCList
};
Q_ENUM_NS(EUserUGCList)
enum class EUserUGCListSortOrder
{
enum class EUserUGCListSortOrder {
K_EUserUGCListSortOrder_CreationOrderDesc = 0,
K_EUserUGCListSortOrder_CreationOrderAsc = 1,
K_EUserUGCListSortOrder_TitleAsc = 2,
@ -1930,8 +1846,7 @@ enum class EUserUGCListSortOrder
};
Q_ENUM_NS(EUserUGCListSortOrder)
enum class EUGCQuery
{
enum class EUGCQuery {
K_EUGCQuery_RankedByVote = 0,
K_EUGCQuery_RankedByPublicationDate = 1,
K_EUGCQuery_AcceptedForGameRankedByAcceptanceDate = 2,
@ -1955,8 +1870,7 @@ enum class EUGCQuery
};
Q_ENUM_NS(EUGCQuery)
enum class EItemUpdateStatus
{
enum class EItemUpdateStatus {
K_EItemUpdateStatusInvalid = 0,
K_EItemUpdateStatusPreparingConfig = 1,
K_EItemUpdateStatusPreparingContent = 2,
@ -1966,8 +1880,7 @@ enum class EItemUpdateStatus
};
Q_ENUM_NS(EItemUpdateStatus)
enum class EItemState
{
enum class EItemState {
K_EItemStateNone = 0,
K_EItemStateSubscribed = 1,
K_EItemStateLegacyItem = 2,
@ -1978,8 +1891,7 @@ enum class EItemState
};
Q_ENUM_NS(EItemState)
enum class EItemStatistic
{
enum class EItemStatistic {
K_EItemStatistic_NumSubscriptions = 0,
K_EItemStatistic_NumFavorites = 1,
K_EItemStatistic_NumFollowers = 2,
@ -1996,8 +1908,7 @@ enum class EItemStatistic
};
Q_ENUM_NS(EItemStatistic)
enum class EItemPreviewType
{
enum class EItemPreviewType {
K_EItemPreviewType_Image = 0,
K_EItemPreviewType_YouTubeVideo = 1,
K_EItemPreviewType_Sketchfab = 2,
@ -2007,16 +1918,14 @@ enum class EItemPreviewType
};
Q_ENUM_NS(EItemPreviewType)
enum class ESteamItemFlags
{
enum class ESteamItemFlags {
K_ESteamItemNoTrade = 1,
K_ESteamItemRemoved = 256,
K_ESteamItemConsumed = 512,
};
Q_ENUM_NS(ESteamItemFlags)
enum class EParentalFeature
{
enum class EParentalFeature {
K_EFeatureInvalid = 0,
K_EFeatureStore = 1,
K_EFeatureCommunity = 2,
@ -2035,8 +1944,7 @@ enum class EParentalFeature
};
Q_ENUM_NS(EParentalFeature)
enum class ESteamDeviceFormFactor
{
enum class ESteamDeviceFormFactor {
K_ESteamDeviceFormFactorUnknown = 0,
K_ESteamDeviceFormFactorPhone = 1,
K_ESteamDeviceFormFactorTablet = 2,
@ -2045,8 +1953,7 @@ enum class ESteamDeviceFormFactor
};
Q_ENUM_NS(ESteamDeviceFormFactor)
enum class ESteamNetworkingAvailability
{
enum class ESteamNetworkingAvailability {
K_ESteamNetworkingAvailability_CannotTry = -102,
K_ESteamNetworkingAvailability_Failed = -101,
K_ESteamNetworkingAvailability_Previously = -100,
@ -2060,8 +1967,7 @@ enum class ESteamNetworkingAvailability
};
Q_ENUM_NS(ESteamNetworkingAvailability)
enum class ESteamNetworkingIdentityType
{
enum class ESteamNetworkingIdentityType {
K_ESteamNetworkingIdentityType_Invalid = 0,
K_ESteamNetworkingIdentityType_SteamID = 16,
K_ESteamNetworkingIdentityType_XboxPairwiseID = 17,
@ -2075,8 +1981,7 @@ enum class ESteamNetworkingIdentityType
};
Q_ENUM_NS(ESteamNetworkingIdentityType)
enum class ESteamNetworkingFakeIPType
{
enum class ESteamNetworkingFakeIPType {
K_ESteamNetworkingFakeIPType_Invalid = 0,
K_ESteamNetworkingFakeIPType_NotFake = 1,
K_ESteamNetworkingFakeIPType_GlobalIPv4 = 2,
@ -2085,8 +1990,7 @@ enum class ESteamNetworkingFakeIPType
};
Q_ENUM_NS(ESteamNetworkingFakeIPType)
enum class ESteamNetworkingConnectionState
{
enum class ESteamNetworkingConnectionState {
K_ESteamNetworkingConnectionState_None = 0,
K_ESteamNetworkingConnectionState_Connecting = 1,
K_ESteamNetworkingConnectionState_FindingRoute = 2,
@ -2100,8 +2004,7 @@ enum class ESteamNetworkingConnectionState
};
Q_ENUM_NS(ESteamNetworkingConnectionState)
enum class ESteamNetConnectionEnd
{
enum class ESteamNetConnectionEnd {
K_ESteamNetConnectionEnd_Invalid = 0,
K_ESteamNetConnectionEnd_App_Min = 1000,
K_ESteamNetConnectionEnd_App_Generic = 1000,
@ -2138,8 +2041,7 @@ enum class ESteamNetConnectionEnd
};
Q_ENUM_NS(ESteamNetConnectionEnd)
enum class ESteamNetworkingConfigScope
{
enum class ESteamNetworkingConfigScope {
K_ESteamNetworkingConfig_Global = 1,
K_ESteamNetworkingConfig_SocketsInterface = 2,
K_ESteamNetworkingConfig_ListenSocket = 3,
@ -2148,8 +2050,7 @@ enum class ESteamNetworkingConfigScope
};
Q_ENUM_NS(ESteamNetworkingConfigScope)
enum class ESteamNetworkingConfigDataType
{
enum class ESteamNetworkingConfigDataType {
K_ESteamNetworkingConfig_Int32 = 1,
K_ESteamNetworkingConfig_Int64 = 2,
K_ESteamNetworkingConfig_Float = 3,
@ -2159,8 +2060,7 @@ enum class ESteamNetworkingConfigDataType
};
Q_ENUM_NS(ESteamNetworkingConfigDataType)
enum class ESteamNetworkingConfigValue
{
enum class ESteamNetworkingConfigValue {
K_ESteamNetworkingConfig_Invalid = 0,
K_ESteamNetworkingConfig_TimeoutInitial = 24,
K_ESteamNetworkingConfig_TimeoutConnected = 25,
@ -2226,8 +2126,7 @@ enum class ESteamNetworkingConfigValue
};
Q_ENUM_NS(ESteamNetworkingConfigValue)
enum class ESteamNetworkingGetConfigValueResult
{
enum class ESteamNetworkingGetConfigValueResult {
K_ESteamNetworkingGetConfigValue_BadValue = -1,
K_ESteamNetworkingGetConfigValue_BadScopeObj = -2,
K_ESteamNetworkingGetConfigValue_BufferTooSmall = -3,
@ -2237,8 +2136,7 @@ enum class ESteamNetworkingGetConfigValueResult
};
Q_ENUM_NS(ESteamNetworkingGetConfigValueResult)
enum class ESteamNetworkingSocketsDebugOutputType
{
enum class ESteamNetworkingSocketsDebugOutputType {
K_ESteamNetworkingSocketsDebugOutputType_None = 0,
K_ESteamNetworkingSocketsDebugOutputType_Bug = 1,
K_ESteamNetworkingSocketsDebugOutputType_Error = 2,
@ -2252,8 +2150,7 @@ enum class ESteamNetworkingSocketsDebugOutputType
};
Q_ENUM_NS(ESteamNetworkingSocketsDebugOutputType)
enum class EServerMode
{
enum class EServerMode {
EServerModeInvalid = 0,
EServerModeNoAuthentication = 1,
EServerModeAuthentication = 2,
@ -2261,7 +2158,4 @@ enum class EServerMode
};
Q_ENUM_NS(EServerMode)
}

View File

@ -11,8 +11,7 @@
#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,8 +143,7 @@ enum EResult
};
// Error codes for use with the voice functions
enum EVoiceResult
{
enum EVoiceResult {
k_EVoiceResultOK = 0,
k_EVoiceResultNotInitialized = 1,
k_EVoiceResultNotRecording = 2,
@ -160,8 +158,7 @@ enum EVoiceResult
};
// Result codes to GSHandleClientDeny/Kick
enum EDenyReason
{
enum EDenyReason {
k_EDenyInvalid = 0,
k_EDenyInvalidVersion = 1,
k_EDenyGeneric = 2,
@ -185,8 +182,7 @@ 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,8 +192,7 @@ 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.
@ -211,17 +206,14 @@ 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
@ -238,13 +230,10 @@ enum EAccountType
k_EAccountTypeMax
};
//-----------------------------------------------------------------------------
// 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)
@ -263,12 +252,10 @@ 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
@ -286,15 +273,13 @@ enum EChatRoomEnterResponse
k_EChatRoomEnterResponseRatelimitExceeded = 15, // Join failed - to many join attempts in a very short period of time
};
const unsigned int k_unSteamAccountIDMask = 0xFFFFFFFF;
const unsigned int k_unSteamAccountInstanceMask = 0x000FFFFF;
const unsigned int k_unSteamUserDefaultInstance = 1; // fixed instance for all individual users
// 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
@ -304,24 +289,20 @@ enum EChatSteamIDInstanceFlags
// Max of 8 flags
};
//-----------------------------------------------------------------------------
// 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
@ -348,13 +329,11 @@ enum EBroadcastUploadResult
k_EBroadcastUploadResultAudioInitFailed = 23, // invalid audio settings
};
//-----------------------------------------------------------------------------
// 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
@ -408,14 +387,12 @@ 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
@ -425,13 +402,11 @@ 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"
@ -444,28 +419,23 @@ 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
//-----------------------------------------------------------------------------
@ -477,7 +447,6 @@ public:
m_steamid.m_comp.m_unAccountInstance = 0;
}
//-----------------------------------------------------------------------------
// Purpose: Constructor
// Input : unAccountID - 32-bit account ID
@ -489,7 +458,6 @@ public:
Set(unAccountID, eUniverse, eAccountType);
}
//-----------------------------------------------------------------------------
// Purpose: Constructor
// Input : unAccountID - 32-bit account ID
@ -505,7 +473,6 @@ public:
InstancedSet(unAccountID, unAccountInstance, eUniverse, eAccountType);
}
//-----------------------------------------------------------------------------
// Purpose: Constructor
// Input : ulSteamID - 64-bit representation of a Steam ID
@ -523,7 +490,6 @@ public:
}
#endif
//-----------------------------------------------------------------------------
// Purpose: Sets parameters for steam ID
// Input : unAccountID - 32-bit account ID
@ -536,17 +502,13 @@ 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
@ -561,7 +523,6 @@ 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
@ -574,7 +535,6 @@ 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
@ -584,7 +544,6 @@ public:
m_steamid.m_unAll64Bits = ulSteamID;
}
//-----------------------------------------------------------------------------
// Purpose: Clear all fields, leaving an invalid ID.
//-----------------------------------------------------------------------------
@ -605,7 +564,6 @@ 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
@ -619,7 +577,6 @@ 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
//-----------------------------------------------------------------------------
@ -631,7 +588,6 @@ public:
m_steamid.m_comp.m_unAccountInstance = 0;
}
//-----------------------------------------------------------------------------
// Purpose: create an anonymous game server login to be filled in by the AM
//-----------------------------------------------------------------------------
@ -683,7 +639,6 @@ public:
return m_steamid.m_comp.m_EAccountType == k_EAccountTypeContentServer;
}
//-----------------------------------------------------------------------------
// Purpose: Is this a clan account id?
//-----------------------------------------------------------------------------
@ -692,7 +647,6 @@ public:
return m_steamid.m_comp.m_EAccountType == k_EAccountTypeClan;
}
//-----------------------------------------------------------------------------
// Purpose: Is this a chat account id?
//-----------------------------------------------------------------------------
@ -710,7 +664,6 @@ public:
&& (m_steamid.m_comp.m_unAccountInstance & k_EChatInstanceFlagLobby);
}
//-----------------------------------------------------------------------------
// Purpose: Is this an individual user account id?
//-----------------------------------------------------------------------------
@ -719,7 +672,6 @@ public:
return m_steamid.m_comp.m_EAccountType == k_EAccountTypeIndividual || m_steamid.m_comp.m_EAccountType == k_EAccountTypeConsoleUser;
}
//-----------------------------------------------------------------------------
// Purpose: Is this an anonymous account?
//-----------------------------------------------------------------------------
@ -785,10 +737,8 @@ 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
@ -814,20 +764,17 @@ 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
@ -844,8 +791,7 @@ inline bool CSteamID::IsValid() const
//-----------------------------------------------------------------------------
inline CSteamID SteamIDFromSteam2UserID(TSteamGlobalUserID* pTSteamGlobalUserID, EUniverse eUniverse)
{
uint32 unAccountID = pTSteamGlobalUserID->m_SteamLocalUserID.Split.Low32bits * 2 +
pTSteamGlobalUserID->m_SteamLocalUserID.Split.High32bits;
uint32 unAccountID = pTSteamGlobalUserID->m_SteamLocalUserID.Split.Low32bits * 2 + pTSteamGlobalUserID->m_SteamLocalUserID.Split.High32bits;
return CSteamID(unAccountID, k_unSteamUserDefaultInstance, eUniverse, k_EAccountTypeIndividual);
}
@ -867,7 +813,6 @@ inline TSteamGlobalUserID SteamIDToSteam2UserID( CSteamID steamID )
return steamGlobalUserID;
}
#endif
// generic invalid CSteamID
@ -885,7 +830,6 @@ inline TSteamGlobalUserID SteamIDToSteam2UserID( CSteamID steamID )
// 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
@ -900,14 +844,11 @@ 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;
@ -1025,8 +966,7 @@ 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;
@ -1042,7 +982,6 @@ public:
default:
return false;
}
}
void Reset()
@ -1054,16 +993,14 @@ public:
// Internal stuff. Use the accessors above if possible
//
enum EGameIDType
{
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;
@ -1075,8 +1012,7 @@ public:
#endif
};
union
{
union {
uint64 m_ulGameID;
GameID_t m_gameID;
};
@ -1086,15 +1022,13 @@ public:
const int k_cchGameExtraInfoMax = 64;
//-----------------------------------------------------------------------------
// Purpose: Passed as argument to SteamAPI_UseBreakpadCrashHandler to enable optional callback
// just before minidump file is captured after a crash has occurred. (Allows app to append additional comment data to the dump, etc.)
//-----------------------------------------------------------------------------
typedef void (*PFNPreMinidumpCallback)(void* context);
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,
@ -1106,8 +1040,7 @@ 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
@ -1115,23 +1048,19 @@ 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];
@ -1154,8 +1083,7 @@ enum ESteamIPv6ConnectivityState
#error ???
#endif
typedef struct ValvePackingSentinel_t
{
typedef struct ValvePackingSentinel_t {
uint32 m_u32;
uint64 m_u64;
uint16 m_u16;
@ -1164,7 +1092,6 @@ 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)

View File

@ -12,7 +12,6 @@
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);

View File

@ -14,8 +14,7 @@
// 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,
@ -32,11 +31,9 @@ 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,

View File

@ -4,8 +4,8 @@
#define STEAMNETWORKINGFAKEIP_H
#pragma once
#include "steamnetworkingtypes.h"
#include "steam_api_common.h"
#include "steamnetworkingtypes.h"
// It is HIGHLY recommended to limit messages sent via Fake UDP port to this
// value. The purpose of a Fake UDP port is to make porting ordinary ad-hoc UDP
@ -26,8 +26,7 @@ constexpr int k_cbSteamNetworkingSocketsFakeUDPPortMaxMessageSize = 4096;
///
/// See: ISteamNetworkingSockets::CreateFakeUDPPort
class ISteamNetworkingFakeUDPPort
{
class ISteamNetworkingFakeUDPPort {
public:
/// Destroy the object and cleanup any internal connections.
/// Note that this function call is not threadsafe with respect
@ -90,8 +89,7 @@ public:
/// use as an identifier. This callback is posted when
/// ISteamNetworkingSoockets::BeginAsyncRequestFakeIP completes.
/// See also ISteamNetworkingSockets::GetFakeIP
struct SteamNetworkingFakeIPResult_t
{
struct SteamNetworkingFakeIPResult_t {
enum { k_iCallback = k_iSteamNetworkingSocketsCallbacks + 3 };
/// Status/result of the allocation request. Possible failure values are:

View File

@ -8,10 +8,10 @@
#define STEAMNETWORKINGTYPES
#pragma once
#include <string.h>
#include <stdint.h>
#include "steamtypes.h"
#include "steamclientpublic.h"
#include "steamtypes.h"
#include <stdint.h>
#include <string.h>
//-----------------------------------------------------------------------------
// SteamNetworkingSockets config.
@ -98,8 +98,7 @@ 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
@ -119,7 +118,6 @@ 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,
};
@ -129,8 +127,7 @@ enum ESteamNetworkingAvailability
//
/// Different methods of describing the identity of a network host
enum ESteamNetworkingIdentityType
{
enum ESteamNetworkingIdentityType {
// Dummy/empty/invalid.
// Please note that if we parse a string that we don't recognize
// but that appears reasonable, we will NOT use this type. Instead
@ -184,8 +181,7 @@ enum ESteamNetworkingIdentityType
/// "Fake IPs" are assigned to hosts, to make it easier to interface with
/// older code that assumed all hosts will have an IPv4 address
enum ESteamNetworkingFakeIPType
{
enum ESteamNetworkingFakeIPType {
k_ESteamNetworkingFakeIPType_Invalid, // Error, argument was not even an IP address, etc.
k_ESteamNetworkingFakeIPType_NotFake, // Argument was a valid IP, but was not from the reserved "fake" range
k_ESteamNetworkingFakeIPType_GlobalIPv4, // Globally unique (for a given app) IPv4 address. Address space managed by Steam
@ -199,8 +195,7 @@ enum ESteamNetworkingFakeIPType
/// 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
@ -235,8 +230,7 @@ struct SteamNetworkingIPAddr
uint8 m_ip[4]; // NOTE: As bytes, i.e. network byte order
};
union
{
union {
uint8 m_ipv6[16];
IPv4MappedAddress m_ipv4;
};
@ -258,8 +252,7 @@ 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;
@ -355,8 +348,7 @@ 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.
@ -462,8 +454,7 @@ 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,
@ -678,8 +669,7 @@ const int k_nSteamNetworkConnectionInfoFlags_Relayed = 16; // The connection is
const int k_nSteamNetworkConnectionInfoFlags_DualWifi = 32; // We're taking advantage of dual-wifi multi-path
/// 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;
@ -733,8 +723,7 @@ 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 SteamNetConnectionRealTimeStatus_t
{
struct SteamNetConnectionRealTimeStatus_t {
/// High level state of the connection
ESteamNetworkingConnectionState m_eState;
@ -810,8 +799,7 @@ struct SteamNetConnectionRealTimeStatus_t
};
/// Quick status of a particular lane
struct SteamNetConnectionRealTimeLaneStatus_t
{
struct SteamNetConnectionRealTimeLaneStatus_t {
// Counters for this particular lane. See the corresponding variables
// in SteamNetConnectionRealTimeStatus_t
int m_cbPendingUnreliable;
@ -840,8 +828,7 @@ struct SteamNetConnectionRealTimeLaneStatus_t
const int k_cbMaxSteamNetworkingSocketsMessageSizeSend = 512 * 1024;
/// A message that has been received.
struct SteamNetworkingMessage_t
{
struct SteamNetworkingMessage_t {
/// Message payload
void* m_pData;
@ -927,7 +914,10 @@ 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; }
@ -1072,8 +1062,7 @@ 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];
};
@ -1093,8 +1082,7 @@ 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
@ -1121,8 +1109,7 @@ 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,
@ -1133,8 +1120,7 @@ enum ESteamNetworkingConfigDataType
};
/// Configuration options
enum ESteamNetworkingConfigValue
{
enum ESteamNetworkingConfigValue {
k_ESteamNetworkingConfig_Invalid = 0,
//
@ -1379,7 +1365,6 @@ enum ESteamNetworkingConfigValue
// 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"
@ -1566,7 +1551,6 @@ enum ESteamNetworkingConfigValue
k_ESteamNetworkingConfig_LogLevel_P2PRendezvous = 17, // [connection int32] P2P rendezvous messages
k_ESteamNetworkingConfig_LogLevel_SDRRelayPings = 18, // [global int32] Ping relays
// Deleted, do not use
k_ESteamNetworkingConfig_DELETED_EnumerateDevVars = 35,
@ -1592,8 +1576,7 @@ 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;
@ -1601,8 +1584,7 @@ struct SteamNetworkingConfigValue_t
ESteamNetworkingConfigDataType m_eDataType;
/// Option value
union
{
union {
int32_t m_int32;
int64_t m_int64;
float m_float;
@ -1646,8 +1628,7 @@ 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
@ -1663,8 +1644,7 @@ 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)
@ -1699,11 +1679,9 @@ 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);
}
}
@ -1732,10 +1710,10 @@ const SteamNetworkingPOPID k_SteamDatagramPOPID_dev = ( (uint32)'d' << 16U ) | (
#ifndef API_GEN
/// 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];
};
@ -1752,12 +1730,40 @@ 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; }
@ -1765,29 +1771,87 @@ 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 bool SteamNetworkingIdentity::SetXboxPairwiseID( const char *pszString ) { size_t l = strlen( pszString ); if ( l < 1 || l >= sizeof(m_szXboxPairwiseID) ) return false;
m_eType = k_ESteamNetworkingIdentityType_XboxPairwiseID; m_cbSize = int(l+1); memcpy( m_szXboxPairwiseID, pszString, m_cbSize ); return true; }
inline bool SteamNetworkingIdentity::SetXboxPairwiseID(const char* pszString)
{
size_t l = strlen(pszString);
if (l < 1 || l >= sizeof(m_szXboxPairwiseID))
return false;
m_eType = k_ESteamNetworkingIdentityType_XboxPairwiseID;
m_cbSize = int(l + 1);
memcpy(m_szXboxPairwiseID, pszString, m_cbSize);
return true;
}
inline const char* SteamNetworkingIdentity::GetXboxPairwiseID() const { return m_eType == k_ESteamNetworkingIdentityType_XboxPairwiseID ? m_szXboxPairwiseID : NULL; }
inline void SteamNetworkingIdentity::SetPSNID( uint64 id ) { m_eType = k_ESteamNetworkingIdentityType_SonyPSN; m_cbSize = sizeof( m_PSNID ); m_PSNID = id; }
inline void SteamNetworkingIdentity::SetPSNID(uint64 id)
{
m_eType = k_ESteamNetworkingIdentityType_SonyPSN;
m_cbSize = sizeof(m_PSNID);
m_PSNID = id;
}
inline uint64 SteamNetworkingIdentity::GetPSNID() const { return m_eType == k_ESteamNetworkingIdentityType_SonyPSN ? m_PSNID : 0; }
inline void SteamNetworkingIdentity::SetStadiaID( uint64 id ) { m_eType = k_ESteamNetworkingIdentityType_GoogleStadia; m_cbSize = sizeof( m_stadiaID ); m_stadiaID = id; }
inline void SteamNetworkingIdentity::SetStadiaID(uint64 id)
{
m_eType = k_ESteamNetworkingIdentityType_GoogleStadia;
m_cbSize = sizeof(m_stadiaID);
m_stadiaID = id;
}
inline uint64 SteamNetworkingIdentity::GetStadiaID() const { return m_eType == k_ESteamNetworkingIdentityType_GoogleStadia ? m_stadiaID : 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::SetIPv4Addr( uint32 nIPv4, uint16 nPort ) { m_eType = k_ESteamNetworkingIdentityType_IPAddress; m_cbSize = (int)sizeof(m_ip); m_ip.SetIPv4( nIPv4, nPort ); }
inline void SteamNetworkingIdentity::SetIPv4Addr(uint32 nIPv4, uint16 nPort)
{
m_eType = k_ESteamNetworkingIdentityType_IPAddress;
m_cbSize = (int)sizeof(m_ip);
m_ip.SetIPv4(nIPv4, nPort);
}
inline uint32 SteamNetworkingIdentity::GetIPv4() const { return m_eType == k_ESteamNetworkingIdentityType_IPAddress ? m_ip.GetIPv4() : 0; }
inline ESteamNetworkingFakeIPType SteamNetworkingIdentity::GetFakeIPType() const { return m_eType == k_ESteamNetworkingIdentityType_IPAddress ? m_ip.GetFakeIPType() : k_ESteamNetworkingFakeIPType_Invalid; }
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); }

View File

@ -22,8 +22,7 @@
#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;
@ -63,41 +62,35 @@ 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
@ -108,5 +101,4 @@ struct SteamPS3Memory_t
size_t (*m_pUsable_size)(void*);
};
#endif // STEAMPS3PARAMS_H

View File

@ -110,16 +110,14 @@ typedef uint32 AccountID_t;
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
@ -133,12 +131,9 @@ 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;
}
}

View File

@ -10,10 +10,8 @@
#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,
@ -23,5 +21,4 @@ enum EUniverse
k_EUniverseMax
};
#endif // STEAMUNIVERSE_H

View File

@ -1,8 +1,8 @@
#include "steam/steam_qt_enums_generated.h"
#include <QGuiApplication>
#include <QQmlApplicationEngine>
#include <QtQml/qqmlextensionplugin.h>
#include <QQuickStyle>
#include <QtQml/qqmlextensionplugin.h>
Q_IMPORT_QML_PLUGIN(ScreenPlayWorkshopPlugin)
@ -19,7 +19,6 @@ int main(int argc, char* argv[])
"SteamEnums",
"Error: only enums");
// Must be set so we can access the global ScreenPlay settings like install path.
QGuiApplication::setOrganizationName("ScreenPlay");
QGuiApplication::setOrganizationDomain("screen-play.app");

View File

@ -49,7 +49,6 @@ bool SteamWorkshop::init()
m_steamErrorRestart = true;
}
m_steamAccount = std::make_unique<SteamAccount>();
m_workshopListModel = std::make_unique<SteamWorkshopListModel>(m_appID);
m_workshopProfileListModel = std::make_unique<SteamWorkshopListModel>(m_appID);
@ -60,7 +59,6 @@ bool SteamWorkshop::init()
setOnline(true);
return true;
}
bool SteamWorkshop::checkOnline()
@ -336,7 +334,6 @@ bool SteamWorkshop::queryWorkshopItemFromHandle(SteamWorkshopListModel* listMode
qInfo() << m_searchHandle << pCallback->m_handle;
SteamUGC()->ReleaseQueryUGCRequest(pCallback->m_handle);
emit workshopSearchCompleted(results);
return true;
}

View File

@ -90,7 +90,8 @@ public slots:
void searchWorkshopByText(const QString text,
const ScreenPlayWorkshopSteamEnums::EUGCQuery rankedBy = ScreenPlayWorkshopSteamEnums::EUGCQuery::K_EUGCQuery_RankedByTrend);
bool checkAndSetQueryActive(){
bool checkAndSetQueryActive()
{
if (m_queryActive) {
qWarning() << "Query already active! Abort";
return false;

View File

@ -11,6 +11,10 @@ from typing import Tuple
from shutil import copytree
from pathlib import Path
from util import sha256, cd_repo_root_path, zipdir, run, get_vs_env_dict
from sys import stdout
stdout.reconfigure(encoding='utf-8')
def clean_build_dir(build_dir):
if isinstance(build_dir, str):
@ -69,7 +73,7 @@ class BuildConfig:
def execute(
build_config: BuildConfig
) -> BuildResult:
start_time = time.time()
# Make sure the script is always started from the same folder
build_config.root_path = cd_repo_root_path()
@ -88,29 +92,41 @@ def execute(
# temporary files in the build directory.
clean_build_dir(build_config.build_folder)
start_time = time.time()
# Runs cmake configure and cmake build
step_time = time.time()
build_result = build(build_config, build_result)
build_duration = time.time() - step_time
print(f"⏱️ build_duration: {build_duration}s")
# Copies all needed libraries and assets into the bin folder
step_time = time.time()
package(build_config)
package_duration = time.time() - step_time
print(f"⏱️ package_duration: {package_duration}s")
# Creates a Qt InstallerFrameWork (IFW) installer
if build_config.create_installer == "ON":
step_time = time.time()
build_installer(build_config, build_result)
build_installer_duration = time.time() - step_time
print(f"⏱️ build_installer_duration: {build_installer_duration}s")
# Create a zip file for scoop & chocolatey
if platform.system() == "Windows":
step_time = time.time()
build_result = zip(build_config, build_result)
zip_duration = time.time() - step_time
print(f"⏱️ zip_duration: {zip_duration}s")
print("Time taken: {}s".format(time.time() - start_time))
duration = time.time() - start_time
print(f"⏱️ Build completed in: {duration}s")
# Print BuildConfig & BuildResult member for easier debugging
print("BuildResult:\n")
print(' '.join("- %s: \t\t%s\n" % item for item in vars(build_result).items()))
print("BuildConfig:\n")
print(' '.join("- %s: \t\t%s\n" % item for item in vars(build_config).items()))
print("\n🆗 BuildResult:")
print(' '.join("\n- %s: \t\t%s" % item for item in vars(build_result).items()))
print("\n⚙️ BuildConfig:")
print(' '.join("\n- %s: \t\t%s" % item for item in vars(build_config).items()))
return build_result
@ -234,9 +250,9 @@ def build(build_config: BuildConfig, build_result: BuildResult) -> BuildResult:
-G "CodeBlocks - Ninja" \
-B.'
print(f"CMake configure:\n{cmake_configure_command}\n\n")
print(f"\n\n⚙️ CMake configure:\n{cmake_configure_command}\n\n")
run(cmake_configure_command, cwd=build_config.build_folder)
print(f"\nCMake build:\n")
print(f"\n\n⚙️ CMake build:\n\n")
run("cmake --build . --target all", cwd=build_config.build_folder)
build_result.binary = Path(build_config.bin_dir)

View File

@ -11,6 +11,10 @@ import platform
import paramiko
import defines
from util import sftp_exists
from sys import stdout
stdout.reconfigure(encoding='utf-8')
if __name__ == "__main__":
parser = argparse.ArgumentParser(description='Build and Package ScreenPlay')

View File

@ -4,6 +4,10 @@ import argparse
from format_util import find_files
from format_util import check_git_exit
from format_util import execute_threaded
from sys import stdout
stdout.reconfigure(encoding='utf-8')
def format_file_function(file):

View File

@ -3,6 +3,10 @@ import argparse
from format_util import find_files
from format_util import check_git_exit
from format_util import execute_threaded
from sys import stdout
stdout.reconfigure(encoding='utf-8')
def format_file_function(file):
executable = "cmake-format"

Some files were not shown because too many files have changed in this diff Show More