2023-09-30 15:02:30 +03:00
|
|
|
#ifndef __STEAMCLIENT_UNIXLIB_H
|
|
|
|
#define __STEAMCLIENT_UNIXLIB_H
|
|
|
|
|
|
|
|
#include <stdarg.h>
|
|
|
|
#include <stddef.h>
|
|
|
|
#include <stdint.h>
|
|
|
|
#include <stdbool.h>
|
|
|
|
|
|
|
|
#include <windef.h>
|
|
|
|
#include <winbase.h>
|
|
|
|
|
2023-10-02 11:51:14 +03:00
|
|
|
#ifndef STEAM_API_H
|
|
|
|
#include "steamclient_structs.h"
|
|
|
|
#endif
|
|
|
|
|
2023-09-30 15:02:30 +03:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C"
|
|
|
|
{
|
|
|
|
#endif /* __cplusplus */
|
|
|
|
|
|
|
|
unsigned int steamclient_unix_path_to_dos_path( bool api_result, const char *src, char *dst,
|
|
|
|
uint32_t dst_bytes, int is_url );
|
|
|
|
|
|
|
|
extern const char *steamclient_dos_to_unix_path( const char *src, int is_url );
|
|
|
|
extern void steamclient_free_path( const char *path_array );
|
|
|
|
extern const char **steamclient_dos_to_unix_path_array( const char **src_array );
|
|
|
|
extern void steamclient_free_path_array( const char **path_array );
|
|
|
|
|
|
|
|
#define PATH_MAX 4096
|
|
|
|
extern char g_tmppath[PATH_MAX];
|
|
|
|
|
2023-10-02 16:27:37 +03:00
|
|
|
#ifndef STEAM_API_H
|
2023-09-30 15:02:30 +03:00
|
|
|
enum callback_type
|
|
|
|
{
|
2023-10-02 16:27:37 +03:00
|
|
|
SOCKETS_DEBUG_OUTPUT = 1,
|
|
|
|
WARNING_MESSAGE_HOOK,
|
2023-09-30 15:02:30 +03:00
|
|
|
};
|
|
|
|
|
2023-10-02 16:27:37 +03:00
|
|
|
struct callback
|
2023-09-30 15:02:30 +03:00
|
|
|
{
|
|
|
|
enum callback_type type;
|
2023-10-02 16:27:37 +03:00
|
|
|
uint32_t size;
|
|
|
|
|
2023-09-30 15:02:30 +03:00
|
|
|
union
|
|
|
|
{
|
|
|
|
struct
|
|
|
|
{
|
2023-10-02 16:27:37 +03:00
|
|
|
void (*W_STDCALL pfnFunc)( uint32_t, const char * );
|
|
|
|
uint32_t type;
|
|
|
|
const char msg[1];
|
|
|
|
} sockets_debug_output;
|
|
|
|
|
2023-09-30 15:02:30 +03:00
|
|
|
struct
|
|
|
|
{
|
2023-10-02 16:27:37 +03:00
|
|
|
void (*W_CDECL pFunction)( int32_t, const char * );
|
|
|
|
int32_t severity;
|
|
|
|
const char msg[1];
|
|
|
|
} warning_message_hook;
|
2023-09-30 15:02:30 +03:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2023-10-02 16:27:37 +03:00
|
|
|
extern bool unix_steamclient_next_callback( struct callback *callback, uint32_t *length );
|
2023-09-30 15:02:30 +03:00
|
|
|
|
2023-10-01 11:30:01 +03:00
|
|
|
extern bool (*steamclient_GetAPICallResult)( int32_t, uint64_t, void *, int, int, bool * );
|
|
|
|
extern bool unix_Steam_GetAPICallResult( int32_t pipe, uint64_t call, void *w_callback,
|
|
|
|
int w_callback_len, int id, bool *failed );
|
|
|
|
|
2023-10-02 11:51:14 +03:00
|
|
|
struct networking_message_pool;
|
|
|
|
struct networking_message
|
|
|
|
{
|
|
|
|
struct networking_message_pool *pool;
|
|
|
|
void **p_data;
|
|
|
|
uint32_t *p_size;
|
|
|
|
|
2023-10-02 11:52:15 +03:00
|
|
|
union
|
|
|
|
{
|
|
|
|
u_SteamNetworkingMessage_t_144 *u_msg_144;
|
|
|
|
u_SteamNetworkingMessage_t_147 *u_msg_147;
|
2023-10-02 15:50:49 +03:00
|
|
|
u_SteamNetworkingMessage_t_153a *u_msg_153a;
|
2023-10-02 11:52:15 +03:00
|
|
|
};
|
|
|
|
union
|
|
|
|
{
|
|
|
|
w_SteamNetworkingMessage_t_144 w_msg_144;
|
|
|
|
w_SteamNetworkingMessage_t_147 w_msg_147;
|
2023-10-02 15:50:49 +03:00
|
|
|
w_SteamNetworkingMessage_t_153a w_msg_153a;
|
2023-10-02 11:52:15 +03:00
|
|
|
};
|
2023-10-02 11:51:14 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
extern void unix_networking_messages_receive_144( uint32_t count, w_SteamNetworkingMessage_t_144 **w_msgs );
|
2023-10-02 11:52:15 +03:00
|
|
|
extern void unix_networking_messages_receive_147( uint32_t count, w_SteamNetworkingMessage_t_147 **w_msgs );
|
2023-10-02 15:50:49 +03:00
|
|
|
extern void unix_networking_messages_receive_153a( uint32_t count, w_SteamNetworkingMessage_t_153a **w_msgs );
|
2023-10-02 11:52:15 +03:00
|
|
|
extern void unix_networking_message_release_147( w_SteamNetworkingMessage_t_147 *w_msg );
|
2023-10-02 15:50:49 +03:00
|
|
|
extern void unix_networking_message_release_153a( w_SteamNetworkingMessage_t_153a *w_msg );
|
2023-10-02 11:51:14 +03:00
|
|
|
#endif
|
|
|
|
|
2023-09-30 15:02:30 +03:00
|
|
|
#ifdef __cplusplus
|
|
|
|
} /* extern "C" */
|
|
|
|
#endif /* __cplusplus */
|
|
|
|
|
|
|
|
#endif /* __STEAMCLIENT_UNIXLIB_H */
|