diff options
author | eionrobb <eionrobb@8ca6c67d-4297-256d-f884-781da6d5760b> | 2012-01-29 01:57:22 +0400 |
---|---|---|
committer | eionrobb <eionrobb@8ca6c67d-4297-256d-f884-781da6d5760b> | 2012-01-29 01:57:22 +0400 |
commit | f4ee80b4c168c4bc7430b200f78ab47ac8a571aa (patch) | |
tree | 01d2bd64811b0634c73b20068b48bdfbb8cdee30 /steam-mobile/libsteam.h | |
parent | 5e9d6152202daae1a2ce2c9258cc94908b7d45da (diff) |
Initial checking of steam mobile code
Diffstat (limited to 'steam-mobile/libsteam.h')
-rw-r--r-- | steam-mobile/libsteam.h | 96 |
1 files changed, 96 insertions, 0 deletions
diff --git a/steam-mobile/libsteam.h b/steam-mobile/libsteam.h new file mode 100644 index 0000000..2c9b424 --- /dev/null +++ b/steam-mobile/libsteam.h @@ -0,0 +1,96 @@ + + +#ifndef LIBSTEAM_H +#define LIBSTEAM_H + +/* Maximum number of simultaneous connections to a server */ +#define STEAM_MAX_CONNECTIONS 16 + +#include <glib.h> + +#include <errno.h> +#include <string.h> +#include <glib/gi18n.h> +#include <sys/types.h> +#include <unistd.h> + +#ifndef G_GNUC_NULL_TERMINATED +# if __GNUC__ >= 4 +# define G_GNUC_NULL_TERMINATED __attribute__((__sentinel__)) +# else +# define G_GNUC_NULL_TERMINATED +# endif /* __GNUC__ >= 4 */ +#endif /* G_GNUC_NULL_TERMINATED */ + +#ifdef _WIN32 +# include "win32dep.h" +# define dlopen(a,b) LoadLibrary(a) +# define RTLD_LAZY +# define dlsym(a,b) GetProcAddress(a,b) +# define dlclose(a) FreeLibrary(a) +#else +# include <arpa/inet.h> +# include <dlfcn.h> +# include <netinet/in.h> +# include <sys/socket.h> +#endif + +#include <json-glib/json-glib.h> + +#ifndef PURPLE_PLUGINS +# define PURPLE_PLUGINS +#endif + +#include "accountopt.h" +#include "connection.h" +#include "debug.h" +#include "dnsquery.h" +#include "proxy.h" +#include "prpl.h" +#include "request.h" +#include "sslconn.h" +#include "version.h" + +#if GLIB_MAJOR_VERSION >= 2 && GLIB_MINOR_VERSION >= 12 +# define atoll(a) g_ascii_strtoll(a, NULL, 0) +#endif + +#define FB_MAX_MSG_RETRY 2 + +typedef struct _SteamAccount SteamAccount; +typedef struct _SteamBuddy SteamBuddy; + +typedef void (*SteamFunc)(SteamAccount *sa); + +struct _SteamAccount { + PurpleAccount *account; + PurpleConnection *pc; + GSList *conns; /**< A list of all active SteamConnections */ + GQueue *waiting_conns; /**< A list of all SteamConnections waiting to process */ + GSList *dns_queries; + GHashTable *cookie_table; + + gchar *umqid; + guint message; + gchar *steamid; +}; + +struct _SteamBuddy { + SteamAccount *sa; + PurpleBuddy *buddy; + + gchar *steamid; + gchar *personaname; + gchar *realname; + gchar *profileurl; + guint lastlogoff; + gchar *avatar; + + gchar *gameid; + gchar *gameextrainfo; + gchar *gameserversteamid; + gchar *lobbysteamid; +}; + + +#endif /* LIBSTEAM_H */ |