...
 
Commits (10)
......@@ -86,6 +86,15 @@ MEMBER const char *ISteamApps_GetCurrentGameLanguage(struct ISteamApps *iface)
return "french";
}
MEMBER int ISteamApps_GetDLCCount(struct ISteamApps *iface)
{
struct ISteamAppsImpl *This = impl_from_ISteamApps(iface);
LOG_ENTER_NOTIMPL("(This = %p)", VOIDPTR(This));
return 0;
}
struct ISteamApps *SteamApps_generic(const char *version)
{
static const struct
......
......@@ -14,7 +14,7 @@ static const struct ISteamApps005Vtbl ISteamApps005_vtbl = {
ISteamApps_BIsDlcInstalled,
INVAL_PTR,
INVAL_PTR,
INVAL_PTR,
ISteamApps_GetDLCCount,
INVAL_PTR,
INVAL_PTR,
INVAL_PTR,
......
......@@ -19,7 +19,7 @@ struct ISteamApps005Vtbl
MEMBER steam_bool_t (*BIsDlcInstalled)(struct ISteamApps *iface, steam_app_id_t app_id);
void *GetEarliestPurchaseUnixTime;
void *BIsSubscribedFromFreeWeekend;
void *GetDLCCount;
MEMBER int (*GetDLCCount)(struct ISteamApps *iface);
void *BGetDLCDataByIndex;
void *InstallDLC;
void *UninstallDLC;
......
......@@ -14,7 +14,7 @@ static const struct ISteamApps006Vtbl ISteamApps006_vtbl = {
ISteamApps_BIsDlcInstalled,
INVAL_PTR,
INVAL_PTR,
INVAL_PTR,
ISteamApps_GetDLCCount,
INVAL_PTR,
INVAL_PTR,
INVAL_PTR,
......
......@@ -19,7 +19,7 @@ struct ISteamApps006Vtbl
MEMBER steam_bool_t (*BIsDlcInstalled)(struct ISteamApps *iface, steam_app_id_t app_id);
void *GetEarliestPurchaseUnixTime;
void *BIsSubscribedFromFreeWeekend;
void *GetDLCCount;
MEMBER int (*GetDLCCount)(struct ISteamApps *iface);
void *BGetDLCDataByIndex;
void *InstallDLC;
void *UninstallDLC;
......
......@@ -14,7 +14,7 @@ static const struct ISteamApps007Vtbl ISteamApps007_vtbl = {
ISteamApps_BIsDlcInstalled,
INVAL_PTR,
INVAL_PTR,
INVAL_PTR,
ISteamApps_GetDLCCount,
INVAL_PTR,
INVAL_PTR,
INVAL_PTR,
......
......@@ -19,7 +19,7 @@ struct ISteamApps007Vtbl
MEMBER steam_bool_t (*BIsDlcInstalled)(struct ISteamApps *iface, steam_app_id_t app_id);
void *GetEarliestPurchaseUnixTime;
void *BIsSubscribedFromFreeWeekend;
void *GetDLCCount;
MEMBER int (*GetDLCCount)(struct ISteamApps *iface);
void *BGetDLCDataByIndex;
void *InstallDLC;
void *UninstallDLC;
......
......@@ -14,7 +14,7 @@ static const struct ISteamApps008Vtbl ISteamApps008_vtbl = {
ISteamApps_BIsDlcInstalled,
INVAL_PTR,
INVAL_PTR,
INVAL_PTR,
ISteamApps_GetDLCCount,
INVAL_PTR,
INVAL_PTR,
INVAL_PTR,
......
......@@ -19,7 +19,7 @@ struct ISteamApps008Vtbl
MEMBER steam_bool_t (*BIsDlcInstalled)(struct ISteamApps *iface, steam_app_id_t app_id);
void *GetEarliestPurchaseUnixTime;
void *BIsSubscribedFromFreeWeekend;
void *GetDLCCount;
MEMBER int (*GetDLCCount)(struct ISteamApps *iface);
void *BGetDLCDataByIndex;
void *InstallDLC;
void *UninstallDLC;
......
......@@ -20,7 +20,8 @@ MEMBER steam_bool_t ISteamApps_BIsLowViolence(struct ISteamApps *iface);
MEMBER steam_bool_t ISteamApps_BIsSubscribed(struct ISteamApps *iface);
MEMBER steam_bool_t ISteamApps_BIsSubscribedApp(struct ISteamApps *iface, steam_app_id_t app_id);
MEMBER steam_bool_t ISteamApps_BIsVACBanned(struct ISteamApps *iface);
MEMBER const char *ISteamApps_GetAvailableGameLanguages(struct ISteamApps *iface);
MEMBER const char *ISteamApps_GetCurrentGameLanguage(struct ISteamApps *iface);
MEMBER const char *ISteamApps_GetAvailableGameLanguages(struct ISteamApps *iface);
MEMBER const char *ISteamApps_GetCurrentGameLanguage(struct ISteamApps *iface);
MEMBER int ISteamApps_GetDLCCount(struct ISteamApps *iface);
#endif /* ISTEAMAPPS_PRIV_H */
#include <string.h>
#include "ISteamUser/ISteamUser019.h"
#include "ISteamAppList/ISteamAppList.h"
#include "ISteamApps/ISteamApps.h"
#include "ISteamController/ISteamController.h"
......@@ -46,15 +47,31 @@ MEMBER steam_handle_pipe_t ISteamClient_CreateSteamPipe(struct ISteamClient *ifa
return 1;
}
MEMBER steam_bool_t ISteamClient_BReleaseSteamPipe(struct ISteamClient *iface, steam_handle_pipe_t handle)
MEMBER steam_bool_t ISteamClient_BReleaseSteamPipe(struct ISteamClient *iface, steam_handle_pipe_t steam_pipe)
{
struct ISteamClientImpl *This = impl_from_ISteamClient(iface);
LOG_ENTER_NOTIMPL("(This = %p, handle = %d)", VOIDPTR(This), handle);
LOG_ENTER_NOTIMPL("(This = %p, steam_pipe = %d)", VOIDPTR(This), steam_pipe);
return STEAM_TRUE;
}
MEMBER steam_user_t ISteamClient_ConnectToGlobalUser(struct ISteamClient *iface, steam_handle_pipe_t steam_pipe)
{
struct ISteamClientImpl *This = impl_from_ISteamClient(iface);
LOG_ENTER_NOTIMPL("(This = %p, steam_pipe = %u)", VOIDPTR(This), steam_pipe);
return ISteamUser019_GetHSteamUser(SteamUser019());
}
MEMBER void ISteamClient_ReleaseUser(struct ISteamClient *iface, steam_handle_pipe_t steam_pipe, steam_user_t steam_user)
{
struct ISteamClientImpl *This = impl_from_ISteamClient(iface);
LOG_ENTER_NOTIMPL("(This = %p, steam_pipe = %u, steam_user = %u)", VOIDPTR(This), steam_pipe, steam_user);
}
MEMBER struct ISteamAppList *ISteamClient_GetISteamAppList(struct ISteamClient *iface, steam_user_t steam_user, steam_handle_pipe_t steam_pipe, const char *version)
{
struct ISteamClientImpl *This = impl_from_ISteamClient(iface);
......@@ -184,7 +201,6 @@ static void *get_generic_ISteamInventory(struct ISteamClient *iface, steam_user_
return VOIDPTR(ISteamClient_GetISteamInventory(iface, steam_user, steam_pipe, debug_str(version)));
}
static void *get_generic_ISteamMatchmaking(struct ISteamClient *iface, steam_user_t steam_user, steam_handle_pipe_t steam_pipe, const char *version)
{
return VOIDPTR(ISteamClient_GetISteamMatchmaking(iface, steam_user, steam_pipe, debug_str(version)));
......
......@@ -7,9 +7,9 @@ static const struct ISteamClient006Vtbl ISteamClient006_vtbl = {
ISteamClient_CreateSteamPipe,
ISteamClient_BReleaseSteamPipe,
INVAL_PTR,
ISteamClient_ConnectToGlobalUser,
INVAL_PTR,
INVAL_PTR,
INVAL_PTR,
ISteamClient_ReleaseUser,
ISteamClient_GetISteamUser,
INVAL_PTR,
ISteamClient_GetISteamGameServer,
......
......@@ -17,11 +17,11 @@
struct ISteamClient006Vtbl
{
MEMBER steam_handle_pipe_t (*CreateSteamPipe)(struct ISteamClient *iface);
MEMBER steam_bool_t (*BReleaseSteamPipe)(struct ISteamClient *iface, steam_handle_pipe_t handle);
MEMBER steam_bool_t (*BReleaseSteamPipe)(struct ISteamClient *iface, steam_handle_pipe_t steam_pipe);
void *CreateGlobalUser;
void *ConnectToGlobalUser;
MEMBER steam_user_t (*ConnectToGlobalUser)(struct ISteamClient *iface, steam_handle_pipe_t steam_pipe);
void *CreateLocalUser;
void *ReleaseUser;
MEMBER void (*ReleaseUser)(struct ISteamClient *iface, steam_handle_pipe_t steam_pipe, steam_user_t steam_user);
MEMBER struct ISteamUser *(*GetISteamUser)(struct ISteamClient *iface, steam_user_t steam_user, steam_handle_pipe_t steam_pipe, const char *version);
void *GetIVAC;
MEMBER struct ISteamGameServer *(*GetISteamGameServer)(struct ISteamClient *iface, steam_user_t steam_user, steam_handle_pipe_t steam_pipe, const char *version);
......
......@@ -6,9 +6,9 @@
static const struct ISteamClient012Vtbl ISteamClient012_vtbl = {
ISteamClient_CreateSteamPipe,
ISteamClient_BReleaseSteamPipe,
ISteamClient_ConnectToGlobalUser,
INVAL_PTR,
INVAL_PTR,
INVAL_PTR,
ISteamClient_ReleaseUser,
ISteamClient_GetISteamUser,
ISteamClient_GetISteamGameServer,
INVAL_PTR,
......
......@@ -21,10 +21,10 @@
struct ISteamClient012Vtbl
{
MEMBER steam_handle_pipe_t (*CreateSteamPipe)(struct ISteamClient *iface);
MEMBER steam_bool_t (*BReleaseSteamPipe)(struct ISteamClient *iface, steam_handle_pipe_t handle);
void *ConnectToGlobalUser;
MEMBER steam_bool_t (*BReleaseSteamPipe)(struct ISteamClient *iface, steam_handle_pipe_t steam_pipe);
MEMBER steam_user_t (*ConnectToGlobalUser)(struct ISteamClient *iface, steam_handle_pipe_t steam_pipe);
void *CreateLocalUser;
void *ReleaseUser;
MEMBER void (*ReleaseUser)(struct ISteamClient *iface, steam_handle_pipe_t steam_pipe, steam_user_t steam_user);
MEMBER struct ISteamUser *(*GetISteamUser)(struct ISteamClient *iface, steam_user_t steam_user, steam_handle_pipe_t steam_pipe, const char *version);
MEMBER struct ISteamGameServer *(*GetISteamGameServer)(struct ISteamClient *iface, steam_user_t steam_user, steam_handle_pipe_t steam_pipe, const char *version);
void *SetLocalIPBinding;
......
......@@ -6,9 +6,9 @@
static const struct ISteamClient014Vtbl ISteamClient014_vtbl = {
ISteamClient_CreateSteamPipe,
ISteamClient_BReleaseSteamPipe,
ISteamClient_ConnectToGlobalUser,
INVAL_PTR,
INVAL_PTR,
INVAL_PTR,
ISteamClient_ReleaseUser,
ISteamClient_GetISteamUser,
ISteamClient_GetISteamGameServer,
INVAL_PTR,
......
......@@ -21,10 +21,10 @@
struct ISteamClient014Vtbl
{
MEMBER steam_handle_pipe_t (*CreateSteamPipe)(struct ISteamClient *iface);
MEMBER steam_bool_t (*BReleaseSteamPipe)(struct ISteamClient *iface, steam_handle_pipe_t handle);
void *ConnectToGlobalUser;
MEMBER steam_bool_t (*BReleaseSteamPipe)(struct ISteamClient *iface, steam_handle_pipe_t steam_pipe);
MEMBER steam_user_t (*ConnectToGlobalUser)(struct ISteamClient *iface, steam_handle_pipe_t steam_pipe);
void *CreateLocalUser;
void *ReleaseUser;
MEMBER void (*ReleaseUser)(struct ISteamClient *iface, steam_handle_pipe_t steam_pipe, steam_user_t steam_user);
MEMBER struct ISteamUser *(*GetISteamUser)(struct ISteamClient *iface, steam_user_t steam_user, steam_handle_pipe_t steam_pipe, const char *version);
MEMBER struct ISteamGameServer *(*GetISteamGameServer)(struct ISteamClient *iface, steam_user_t steam_user, steam_handle_pipe_t steam_pipe, const char *version);
void *SetLocalIPBinding;
......
......@@ -6,9 +6,9 @@
static const struct ISteamClient016Vtbl ISteamClient016_vtbl = {
ISteamClient_CreateSteamPipe,
ISteamClient_BReleaseSteamPipe,
ISteamClient_ConnectToGlobalUser,
INVAL_PTR,
INVAL_PTR,
INVAL_PTR,
ISteamClient_ReleaseUser,
ISteamClient_GetISteamUser,
ISteamClient_GetISteamGameServer,
INVAL_PTR,
......
......@@ -23,10 +23,10 @@
struct ISteamClient016Vtbl
{
MEMBER steam_handle_pipe_t (*CreateSteamPipe)(struct ISteamClient *iface);
MEMBER steam_bool_t (*BReleaseSteamPipe)(struct ISteamClient *iface, steam_handle_pipe_t handle);
void *ConnectToGlobalUser;
MEMBER steam_bool_t (*BReleaseSteamPipe)(struct ISteamClient *iface, steam_handle_pipe_t steam_pipe);
MEMBER steam_user_t (*ConnectToGlobalUser)(struct ISteamClient *iface, steam_handle_pipe_t steam_pipe);
void *CreateLocalUser;
void *ReleaseUser;
MEMBER void (*ReleaseUser)(struct ISteamClient *iface, steam_handle_pipe_t steam_pipe, steam_user_t steam_user);
MEMBER struct ISteamUser *(*GetISteamUser)(struct ISteamClient *iface, steam_user_t steam_user, steam_handle_pipe_t steam_pipe, const char *version);
MEMBER struct ISteamGameServer *(*GetISteamGameServer)(struct ISteamClient *iface, steam_user_t steam_user, steam_handle_pipe_t steam_pipe, const char *version);
void *SetLocalIPBinding;
......
......@@ -6,9 +6,9 @@
static const struct ISteamClient017Vtbl ISteamClient017_vtbl = {
ISteamClient_CreateSteamPipe,
ISteamClient_BReleaseSteamPipe,
ISteamClient_ConnectToGlobalUser,
INVAL_PTR,
INVAL_PTR,
INVAL_PTR,
ISteamClient_ReleaseUser,
ISteamClient_GetISteamUser,
ISteamClient_GetISteamGameServer,
INVAL_PTR,
......
......@@ -24,10 +24,10 @@
struct ISteamClient017Vtbl
{
MEMBER steam_handle_pipe_t (*CreateSteamPipe)(struct ISteamClient *iface);
MEMBER steam_bool_t (*BReleaseSteamPipe)(struct ISteamClient *iface, steam_handle_pipe_t handle);
void *ConnectToGlobalUser;
MEMBER steam_bool_t (*BReleaseSteamPipe)(struct ISteamClient *iface, steam_handle_pipe_t steam_pipe);
MEMBER steam_user_t (*ConnectToGlobalUser)(struct ISteamClient *iface, steam_handle_pipe_t steam_pipe);
void *CreateLocalUser;
void *ReleaseUser;
MEMBER void (*ReleaseUser)(struct ISteamClient *iface, steam_handle_pipe_t steam_pipe, steam_user_t steam_user);
MEMBER struct ISteamUser *(*GetISteamUser)(struct ISteamClient *iface, steam_user_t steam_user, steam_handle_pipe_t steam_pipe, const char *version);
MEMBER struct ISteamGameServer *(*GetISteamGameServer)(struct ISteamClient *iface, steam_user_t steam_user, steam_handle_pipe_t steam_pipe, const char *version);
void *SetLocalIPBinding;
......
......@@ -35,7 +35,9 @@ static inline struct ISteamClientImpl *impl_from_ISteamClient(struct ISteamClien
}
MEMBER steam_handle_pipe_t ISteamClient_CreateSteamPipe(struct ISteamClient *iface);
MEMBER steam_bool_t ISteamClient_BReleaseSteamPipe(struct ISteamClient *iface, steam_handle_pipe_t handle);
MEMBER steam_bool_t ISteamClient_BReleaseSteamPipe(struct ISteamClient *iface, steam_handle_pipe_t steam_pipe);
MEMBER steam_user_t ISteamClient_ConnectToGlobalUser(struct ISteamClient *iface, steam_handle_pipe_t steam_pipe);
MEMBER void ISteamClient_ReleaseUser(struct ISteamClient *iface, steam_handle_pipe_t steam_pipe, steam_user_t steam_user);
MEMBER struct ISteamAppList *ISteamClient_GetISteamAppList(struct ISteamClient *iface, steam_user_t steam_user, steam_handle_pipe_t steam_pipe, const char *version);
MEMBER struct ISteamApps *ISteamClient_GetISteamApps(struct ISteamClient *iface, steam_user_t steam_user, steam_handle_pipe_t steam_pipe, const char *version);
MEMBER struct ISteamClient *ISteamClient_GetISteamClient(struct ISteamClient *iface, steam_handle_pipe_t steam_pipe, const char *version);
......
......@@ -121,6 +121,15 @@ MEMBER uint32_t ISteamUGC_GetNumSubscribedItems(struct ISteamUGC *iface)
return 0;
}
MEMBER uint32_t ISteamUGC_GetSubscribedItems(struct ISteamUGC *iface, steam_published_file_id_t *ids, uint32_t max_ids)
{
struct ISteamUGCImpl *This = impl_from_ISteamUGC(iface);
LOG_ENTER_NOTIMPL("(This = %p, ids = %p, max_ids = %u)", VOIDPTR(This), VOIDPTR(ids), max_ids);
return 0;
}
struct ISteamUGC *SteamUGC_generic(const char *version)
{
static const struct
......
......@@ -45,7 +45,7 @@ static const struct ISteamUGC005Vtbl ISteamUGC005_vtbl = {
INVAL_PTR,
INVAL_PTR,
ISteamUGC_GetNumSubscribedItems,
INVAL_PTR,
ISteamUGC_GetSubscribedItems,
INVAL_PTR,
INVAL_PTR,
INVAL_PTR,
......
......@@ -51,7 +51,7 @@ struct ISteamUGC005Vtbl
void *SubscribeItem;
void *UnsubscribeItem;
MEMBER uint32_t (*GetNumSubscribedItems)(struct ISteamUGC *iface);
void *GetSubscribedItems;
MEMBER uint32_t (*GetSubscribedItems)(struct ISteamUGC *iface, steam_published_file_id_t *ids, uint32_t max_ids);
void *GetItemState;
void *GetItemInstallInfo;
void *GetItemDownloadInfo;
......
......@@ -55,7 +55,7 @@ static const struct ISteamUGC007Vtbl ISteamUGC007_vtbl = {
INVAL_PTR,
INVAL_PTR,
ISteamUGC_GetNumSubscribedItems,
INVAL_PTR,
ISteamUGC_GetSubscribedItems,
INVAL_PTR,
INVAL_PTR,
INVAL_PTR,
......
......@@ -61,7 +61,7 @@ struct ISteamUGC007Vtbl
void *SubscribeItem;
void *UnsubscribeItem;
MEMBER uint32_t (*GetNumSubscribedItems)(struct ISteamUGC *iface);
void *GetSubscribedItems;
MEMBER uint32_t (*GetSubscribedItems)(struct ISteamUGC *iface, steam_published_file_id_t *ids, uint32_t max_ids);
void *GetItemState;
void *GetItemInstallInfo;
void *GetItemDownloadInfo;
......
......@@ -61,7 +61,7 @@ static const struct ISteamUGC009Vtbl ISteamUGC009_vtbl = {
INVAL_PTR,
INVAL_PTR,
ISteamUGC_GetNumSubscribedItems,
INVAL_PTR,
ISteamUGC_GetSubscribedItems,
INVAL_PTR,
INVAL_PTR,
INVAL_PTR,
......
......@@ -67,7 +67,7 @@ struct ISteamUGC009Vtbl
void *SubscribeItem;
void *UnsubscribeItem;
MEMBER uint32_t (*GetNumSubscribedItems)(struct ISteamUGC *iface);
void *GetSubscribedItems;
MEMBER uint32_t (*GetSubscribedItems)(struct ISteamUGC *iface, steam_published_file_id_t *ids, uint32_t max_ids);
void *GetItemState;
void *GetItemInstallInfo;
void *GetItemDownloadInfo;
......
......@@ -62,7 +62,7 @@ static const struct ISteamUGC010Vtbl ISteamUGC010_vtbl = {
INVAL_PTR,
INVAL_PTR,
ISteamUGC_GetNumSubscribedItems,
INVAL_PTR,
ISteamUGC_GetSubscribedItems,
INVAL_PTR,
INVAL_PTR,
INVAL_PTR,
......
......@@ -68,7 +68,7 @@ struct ISteamUGC010Vtbl
void *SubscribeItem;
void *UnsubscribeItem;
MEMBER uint32_t (*GetNumSubscribedItems)(struct ISteamUGC *iface);
void *GetSubscribedItems;
MEMBER uint32_t (*GetSubscribedItems)(struct ISteamUGC *iface, steam_published_file_id_t *ids, uint32_t max_ids);
void *GetItemState;
void *GetItemInstallInfo;
void *GetItemDownloadInfo;
......
......@@ -26,5 +26,6 @@ MEMBER steam_bool_t ISteamUGC_SetReturnChildren(struct ISteamUGC *iface, steam_u
MEMBER steam_bool_t ISteamUGC_SetReturnAdditionalPreviews(struct ISteamUGC *iface, steam_ugc_query_handle_t handle, steam_bool_t return_additional_previews);
MEMBER steam_bool_t ISteamUGC_SetReturnTotalOnly(struct ISteamUGC *iface, steam_ugc_query_handle_t handle, steam_bool_t return_total_only);
MEMBER uint32_t ISteamUGC_GetNumSubscribedItems(struct ISteamUGC *iface);
MEMBER uint32_t ISteamUGC_GetSubscribedItems(struct ISteamUGC *iface, steam_published_file_id_t *ids, uint32_t max_ids);
#endif /* ISTEAMUGC_PRIV_H */
......@@ -40,7 +40,8 @@ struct ISteamUser019Vtbl
void *BIsPhoneRequiringVerification;
};
#define ISteamUser019_GetSteamID(iface, ret) DSA_CALL_MEMBER_RETURN_STRUCT0(iface->vtbl.v019->GetSteamID, ret, iface)
#define ISteamUser019_GetHSteamUser(iface) ((iface)->vtbl.v019->GetHSteamUser((iface)))
#define ISteamUser019_GetSteamID(iface, ret) DSA_CALL_MEMBER_RETURN_STRUCT0((iface)->vtbl.v019->GetSteamID, ret, iface)
struct ISteamUser *SteamUser019(void);
......
......@@ -24,10 +24,16 @@ SUBDIRS-y := \
ISteamUserStats \
ISteamUtils \
ISteamVideo \
os
os \
vdf
EXTDIRS-y :=
libsteam_api := ../bin/libsteam_api$(DYN_LIB_EXT)
out_dir := ../bin
CFLAGS-y += -fPIC -fvisibility=hidden -I.
CFLAGS-$(CONFIG_OS_LINUX) += -pthread
libsteam_api := $(out_dir)/libsteam_api$(DYN_LIB_EXT)
BINS-y := $(libsteam_api)
......@@ -57,7 +63,8 @@ libs := \
ISteamUserStats/libsteamuserstats$(STATIC_LIB_EXT) \
ISteamUtils/libsteamutils$(STATIC_LIB_EXT) \
ISteamVideo/libsteamvideo$(STATIC_LIB_EXT) \
os/libos$(STATIC_LIB_EXT)
os/libos$(STATIC_LIB_EXT) \
vdf/libvdf$(STATIC_LIB_EXT)
objs := \
CCallback.c.o \
......@@ -71,12 +78,9 @@ objs := \
steamclient.c.o \
utils.c.o
CFLAGS-y += -fPIC -fvisibility=hidden -I.
CFLAGS-$(CONFIG_OS_LINUX) += -pthread
DEPS-$(libsteam_api)-y := $(libs)
OBJS-$(libsteam_api)-y := $(objs)
LDFLAGS-$(libsteam_api)-y += $(LDFLAGS_SHARED) -Wl,--whole-archive $(libs) -Wl,--no-whole-archive
LDFLAGS-$(libsteam_api)-$(CONFIG_OS_LINUX) += -ldl -pthread
LDFLAGS-$(libsteam_api)-$(CONFIG_OS_WINDOWS) += -Wl,--out-implib,$(libsteam_api).a -luserenv
DEPS-$(libsteam_api)-y := $(libs)
OBJS-$(libsteam_api)-y := $(objs)
......@@ -91,7 +91,7 @@ static inline int list_push(struct list *l, void *data, size_t data_size) {
return 0;
}
static inline int list_remove(struct list *l, struct list_elem *elem) {
static inline int list_extract(struct list *l, struct list_elem *elem) {
if (!elem)
return -1;
......@@ -107,6 +107,11 @@ static inline int list_remove(struct list *l, struct list_elem *elem) {
if (elem == l->tail)
l->tail = elem->prev;
return 0;
}
static inline int list_remove(struct list *l, struct list_elem *elem) {
list_extract(l, elem);
free(elem);
return 0;
......
......@@ -53,6 +53,11 @@ enum steam_game_id_type
STEAM_GAME_ID_TYPE_P2P = 3u
};
enum steam_id_raw
{
STEAM_ID_RAW_INVALID = 0u
};
enum steam_lobby_type
{
STEAM_LOBBY_TYPE_PRIVATE = 0u,
......@@ -64,8 +69,113 @@ enum steam_lobby_type
enum steam_result
{
STEAM_RESULT_OK = 1u,
STEAM_RESULT_FAIL = 2u
/* ... */
STEAM_RESULT_FAIL = 2u,
STEAM_RESULT_NO_CONNECTION = 3u,
STEAM_RESULT_NO_CONNECTION_RETRY = 4u,
STEAM_RESULT_INVALID_PASSWORD = 5u,
STEAM_RESULT_LOGGED_IN_ELSEWHERE = 6u,
STEAM_RESULT_INVALID_PROTOCOL_VER = 7u,
STEAM_RESULT_INVALID_PARAM = 8u,
STEAM_RESULT_FILE_NOT_FOUND = 9u,
STEAM_RESULT_BUSY = 10u,
STEAM_RESULT_INVALID_STATE = 11u,
STEAM_RESULT_INVALID_NAME = 12u,
STEAM_RESULT_INVALID_EMAIL = 13u,
STEAM_RESULT_DUPLICATE_NAME = 14u,
STEAM_RESULT_ACCESS_DENIED = 15u,
STEAM_RESULT_TIMEOUT = 16u,
STEAM_RESULT_BANNED = 17u,
STEAM_RESULT_ACCOUNT_NOT_FOUND = 18u,
STEAM_RESULT_INVALID_STEAM_ID = 19u,
STEAM_RESULT_SERVICE_UNAVAILABLE = 20u,
STEAM_RESULT_NOT_LOGGED_ON = 21u,
STEAM_RESULT_PENDING = 22u,
STEAM_RESULT_ENCRYPTION_FAILURE = 23u,
STEAM_RESULT_INSUFFICIENT_PRIVILEGE = 24u,
STEAM_RESULT_LIMIT_EXCEEDED = 25u,
STEAM_RESULT_REVOKED = 26u,
STEAM_RESULT_EXPIRED = 27u,
STEAM_RESULT_ALREADY_REDEEMED = 28u,
STEAM_RESULT_DUPLICATE_REQUEST = 29u,
STEAM_RESULT_ALREADY_OWNED = 30u,
STEAM_RESULT_IP_NOT_FOUND = 31u,
STEAM_RESULT_PERSIST_FAILED = 32u,
STEAM_RESULT_LOCKING_FAILED = 33u,
STEAM_RESULT_LOGON_SESSION_REPLACED = 34u,
STEAM_RESULT_CONNECT_FAILED = 35u,
STEAM_RESULT_HANDSHAKE_FAILED = 36u,
STEAM_RESULT_IO_FAILURE = 37u,
STEAM_RESULT_REMOTE_DISCONNECT = 38u,
STEAM_RESULT_SHOPPING_CART_NOT_FOUND = 39u,
STEAM_RESULT_BLOCKED = 40u,
STEAM_RESULT_IGNORED = 41u,
STEAM_RESULT_NO_MATCH = 42u,
STEAM_RESULT_ACCOUNT_DISABLED = 43u,
STEAM_RESULT_SERVICE_READ_ONLY = 44u,
STEAM_RESULT_ACCOUNT_NOT_FEATURED = 45u,
STEAM_RESULT_ADMINISTRATOR_OK = 46u,
STEAM_RESULT_CONTENT_VERSION = 47u,
STEAM_RESULT_TRY_ANOTHER_CM = 48u,
STEAM_RESULT_PASSWORD_REQUIRED_TO_KICK_SESSION = 49u,
STEAM_RESULT_ALREADY_LOGGED_IN_ELSEWHERE = 50u,
STEAM_RESULT_SUSPENDED = 51u,
STEAM_RESULT_CANCELLED = 52u,
STEAM_RESULT_DATA_CORRUPTION = 53u,
STEAM_RESULT_DISK_FULL = 54u,
STEAM_RESULT_REMOTE_CALL_FAILED = 55u,
STEAM_RESULT_PASSWORD_UNSET = 56u,
STEAM_RESULT_EXTERNAL_ACCOUNT_UNLINKED = 57u,
STEAM_RESULT_PSN_TICKET_INVALID = 58u,
STEAM_RESULT_EXTERNAL_ACCOUNT_ALREADY_LINKED = 59u,
STEAM_RESULT_REMOTE_FILE_CONFLICT = 60u,
STEAM_RESULT_ILLEGAL_PASSWORD = 61u,
STEAM_RESULT_SAME_AS_PREVIOUS_VALUE = 62u,
STEAM_RESULT_ACCOUNT_LOGON_DENIED = 63u,
STEAM_RESULT_CANNOT_USE_OLD_PASSWORD = 64u,
STEAM_RESULT_INVALID_LOGIN_AUTH_CODE = 65u,
STEAM_RESULT_ACCOUNT_LOGON_DENIED_NO_MAIL = 66u,
STEAM_RESULT_HARDWARE_NOT_CAPABLE_OF_IPT = 67u,
STEAM_RESULT_IPT_INIT_ERROR = 68u,
STEAM_RESULT_PARENTAL_CONTROL_RESTRICTED = 69u,
STEAM_RESULT_FACEBOOK_QUERY_ERROR = 70u,
STEAM_RESULT_EXPIRED_LOGIN_AUTH_CODE = 71u,
STEAM_RESULT_IP_LOGIN_RESTRICTION_FAILED = 72u,
STEAM_RESULT_ACCOUNT_LOCKED_DOWN = 73u,
STEAM_RESULT_ACCOUNT_LOGON_DENIED_VERIFIED_EMAIL_REQUIRED = 74u,
STEAM_RESULT_NO_MATCHING_URL = 75u,
STEAM_RESULT_BAD_RESPONSE = 76u,
STEAM_RESULT_REQUIRE_PASSWORD_RE_ENTRY = 77u,
STEAM_RESULT_VALUE_OUT_OF_RANGE = 78u,
STEAM_RESULT_UNEXPECTED_ERROR = 79u,
STEAM_RESULT_DISABLED = 80u,
STEAM_RESULT_INVALID_CEG_SUBMISSION = 81u,
STEAM_RESULT_RESTRICTED_DEVICE = 82u,
STEAM_RESULT_REGION_LOCKED = 83u,
STEAM_RESULT_RATE_LIMIT_EXCEEDED = 84u,
STEAM_RESULT_ACCOUNT_LOGIN_DENIED_NEED_TWO_FACTOR = 85u,
STEAM_RESULT_ITEM_DELETED = 86u,
STEAM_RESULT_ACCOUNT_LOGIN_DENIED_THROTTLE = 87u,
STEAM_RESULT_TWO_FACTOR_CODE_MISMATCH = 88u,
STEAM_RESULT_TWO_FACTOR_ACTIVATION_CODE_MISMATCH = 89u,
STEAM_RESULT_ACCOUNT_ASSOCIATED_TO_MULTIPLE_PARTNERS = 90u,
STEAM_RESULT_NOT_MODIFIED = 91u,
STEAM_RESULT_NO_MOBILE_DEVICE = 92u,
STEAM_RESULT_TIME_NOT_SYNCED = 93u,
STEAM_RESULT_SMS_CODE_FAILED = 94u,
STEAM_RESULT_ACCOUNT_LIMIT_EXCEEDED = 95u,
STEAM_RESULT_ACCOUNT_ACTIVITY_LIMIT_EXCEEDED = 96u,
STEAM_RESULT_PHONE_ACTIVITY_LIMIT_EXCEEDED = 97u,
STEAM_RESULT_REFUND_TO_WALLET = 98u,
STEAM_RESULT_EMAIL_SEND_FAILURE = 99u,
STEAM_RESULT_NOT_SETTLED = 100u,
STEAM_RESULT_NEED_CAPTCHA = 101u,
STEAM_RESULT_GSLT_DENIED = 102u,
STEAM_RESULT_GS_OWNER_DENIED = 103u,
STEAM_RESULT_INVALID_ITEM_TYPE = 104u,
STEAM_RESULT_IP_BANNED = 105u,
STEAM_RESULT_GSLT_EXPIRED = 106u,
STEAM_RESULT_INSUFFICIENT_FUNDS = 107u,
STEAM_RESULT_TOO_MANY_PENDING = 108u
};
enum steam_universe
......
......@@ -16,3 +16,8 @@ EXPORT void *CreateInterface(const char *version, enum steam_result *result)
return iface;
}
EXPORT void Steam_ReleaseThreadLocalMemory(steam_bool_t thread_exit)
{
LOG_ENTER("(thread_exit = %u)", thread_exit);
}
......@@ -4,5 +4,6 @@
#include "steam.h"
extern void *CreateInterface(const char *version, enum steam_result *result);
extern void Steam_ReleaseThreadLocalMemory(steam_bool_t thread_exit);
#endif /* STEAMCLIENT_H */
#include <stdarg.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
......@@ -66,6 +67,78 @@ long dsa_utils_file_get_size(FILE *fp)
return size;
}
char *dsa_utils_file_get_contents(const char *path, size_t *size)
{
size_t szret;
FILE *fp;
long sz;
char *data;
if (size)
*size = SIZE_MAX;
fp = fopen(path, "rb");
if (!fp)
goto fail_open;
data = NULL;
sz = dsa_utils_file_get_size(fp);
if (sz < 0)
goto fail_file_size;
if (sz > 0)
{
data = malloc(sz);
if (!data)
goto fail_alloc;
szret = fread(data, sz, 1, fp);
if (szret != 1)
goto fail_read;
}
fclose(fp);
if (size)
*size = sz;
return data;
fail_read:
free(data);
fail_alloc:
fail_file_size:
fclose(fp);
fail_open:
return NULL;
}
int dsa_utils_file_write(const char *filename, void *data, size_t size)
{
FILE *fp;
size_t szret;
fp = fopen(filename, "wb");
if (!fp)
goto fail_open;
szret = fwrite(data, size, 1, fp);
if (szret != 1)
goto fail_write;
fclose(fp);
return 0;
fail_write:
fclose(fp);
fail_open:
return -1;
}
void dsa_utils_free_ptr(void *ptr)
{
void **p = ptr;
......
......@@ -14,6 +14,8 @@ static inline unsigned int dsa_maxu(unsigned int a, unsigned int b) {
char *dsa_utils_concat(const char *s1, ...);
long dsa_utils_file_get_size(FILE *fp);
char *dsa_utils_file_get_contents(const char *path, size_t *size);
int dsa_utils_file_write(const char *filename, void *data, size_t size);
void dsa_utils_free_ptr(void *ptr);
void *dsa_utils_memdup(const void *data, size_t size);
char *dsa_utils_strdup(const char *str);
......
SUBDIRS-y :=
EXTDIRS-y :=
libvdf := libvdf$(STATIC_LIB_EXT)
STATICLIBS-y := $(libvdf)
objs := vdf.c.o
CFLAGS-y += -fPIC -fvisibility=hidden -I..
OBJS-$(libvdf)-y := $(objs)
This diff is collapsed.
#ifndef VDF_VDF_H
#define VDF_VDF_H 1
#include <stdarg.h>
enum dsa_vdf_value_type
{
DSA_VDF_VALUE_TYPE_INVAL = 0,
DSA_VDF_VALUE_TYPE_INT,
DSA_VDF_VALUE_TYPE_FLOAT,
DSA_VDF_VALUE_TYPE_STR,
DSA_VDF_VALUE_TYPE_LIST
};
struct dsa_vdf;
extern struct dsa_vdf *dsa_vdf_parse(const char *data, size_t size);
extern struct dsa_vdf *dsa_vdf_create_root(const char *key);
extern struct dsa_vdf *dsa_vdf_get_name(struct dsa_vdf *vdf, const char **name);
extern struct dsa_vdf *dsa_vdf_get_type(struct dsa_vdf *vdf, enum dsa_vdf_value_type *type);
extern struct dsa_vdf *dsa_vdf_get_int(struct dsa_vdf *vdf, int *val);
extern struct dsa_vdf *dsa_vdf_get_float(struct dsa_vdf *vdf, float *val);
extern struct dsa_vdf *dsa_vdf_get_str(struct dsa_vdf *vdf, const char **val);
extern struct dsa_vdf *dsa_vdf_mutate(struct dsa_vdf *vdf, enum dsa_vdf_value_type tgt_type);
extern struct dsa_vdf *dsa_vdf_mutate_as_inval(struct dsa_vdf *vdf);
extern struct dsa_vdf *dsa_vdf_mutate_as_int(struct dsa_vdf *vdf);
extern struct dsa_vdf *dsa_vdf_mutate_as_float(struct dsa_vdf *vdf);
extern struct dsa_vdf *dsa_vdf_mutate_as_str(struct dsa_vdf *vdf);
extern struct dsa_vdf *dsa_vdf_mutate_as_list(struct dsa_vdf *vdf);
extern struct dsa_vdf *dsa_vdf_unset(struct dsa_vdf *vdf);
extern struct dsa_vdf *dsa_vdf_set_int(struct dsa_vdf *vdf, int val);
extern struct dsa_vdf *dsa_vdf_set_float(struct dsa_vdf *vdf, float val);
extern struct dsa_vdf *dsa_vdf_set_str(struct dsa_vdf *vdf, const char *val);
extern struct dsa_vdf *dsa_vdf_set_list(struct dsa_vdf *vdf);
extern struct dsa_vdf *dsa_vdf_list_get_entry(struct dsa_vdf *vdf, const char *key);
extern struct dsa_vdf *dsa_vdf_list_get_entry_count(struct dsa_vdf *vdf, size_t *count);
extern struct dsa_vdf *dsa_vdf_list_get_entry_by_idx(struct dsa_vdf *vdf, size_t idx);
extern struct dsa_vdf *dsa_vdf_list_create_entry(struct dsa_vdf *vdf, const char *key);
extern struct dsa_vdf *dsa_vdf_list_open_entry(struct dsa_vdf *vdf, const char *key);
extern struct dsa_vdf *dsa_vdf_vget_path(struct dsa_vdf *vdf, va_list ap);
extern struct dsa_vdf *dsa_vdf_get_path(struct dsa_vdf *vdf, ...);
extern struct dsa_vdf *dsa_vdf_vcreate_path(struct dsa_vdf *vdf, va_list ap);
extern struct dsa_vdf *dsa_vdf_create_path(struct dsa_vdf *vdf, ...);
extern struct dsa_vdf *dsa_vdf_vopen_path(struct dsa_vdf *vdf, va_list ap);
extern struct dsa_vdf *dsa_vdf_open_path(struct dsa_vdf *vdf, ...);
extern char *dsa_vdf_serialize(struct dsa_vdf *vdf, size_t *size);
extern struct dsa_vdf *dsa_vdf_destroy(struct dsa_vdf *vdf);
extern struct dsa_vdf *dsa_vdf_destroy_root(struct dsa_vdf *vdf);
#endif /* VDF_VDF_H */