diff options
| author | Jørgen P. Tjernø <[email protected]> | 2013-12-02 19:31:46 -0800 |
|---|---|---|
| committer | Jørgen P. Tjernø <[email protected]> | 2013-12-02 19:46:31 -0800 |
| commit | f56bb35301836e56582a575a75864392a0177875 (patch) | |
| tree | de61ddd39de3e7df52759711950b4c288592f0dc /sp/src/public/Friends/AddOns | |
| parent | Mark some more files as text. (diff) | |
| download | source-sdk-2013-f56bb35301836e56582a575a75864392a0177875.tar.xz source-sdk-2013-f56bb35301836e56582a575a75864392a0177875.zip | |
Fix line endings. WHAMMY.
Diffstat (limited to 'sp/src/public/Friends/AddOns')
| -rw-r--r-- | sp/src/public/Friends/AddOns/AddOnMessages.h | 112 | ||||
| -rw-r--r-- | sp/src/public/Friends/AddOns/AddOnTypes.h | 36 | ||||
| -rw-r--r-- | sp/src/public/Friends/AddOns/ISteamAddOn.h | 138 |
3 files changed, 143 insertions, 143 deletions
diff --git a/sp/src/public/Friends/AddOns/AddOnMessages.h b/sp/src/public/Friends/AddOns/AddOnMessages.h index e6bc1f9d..ca778f9c 100644 --- a/sp/src/public/Friends/AddOns/AddOnMessages.h +++ b/sp/src/public/Friends/AddOns/AddOnMessages.h @@ -1,56 +1,56 @@ -//========= Copyright Valve Corporation, All rights reserved. ============//
-//
-// Purpose:
-//
-//=============================================================================//
-
-#ifndef ADDONMESSAGES_H
-#define ADDONMESSAGES_H
-#pragma once
-
-enum GameMessageIDs
-{
- GAME_MSG_TEXT = 1, // text chat message
- GAME_MSG_DATA, // binary game data
-
- GAME_MSG_INVITE_REQUEST,
- GAME_MSG_INVITE_RESPONSE,
- GAME_MSG_REJOIN_REQUEST,
- GAME_MSG_REJOIN_RESPONSE,
-
- GAME_MSG_INVITE_PERMISSION, // ask permission to invite someone
- GAME_MSG_INVITE_NOTIFY, // tell everybody that we're inviting
- GAME_MSG_INVITE_DENIED,
-
- GAME_MSG_PLAYER_STATUS_UPDATE,
- GAME_MSG_SETUP_INFO, // when user joins a game, host send the setup information of who's in the game
- GAME_MSG_INVITE_CANCEL, // host has cancelled an invite
- GAME_MSG_GAME_START, // if a game has a setup phase, this tells everybody the game has started
-
- GAME_MSG_PLAYER_KICK, // player kicked from game
- GAME_MSG_UPDATING,
- GAME_MSG_UP_TO_DATE, // player is up to date and ready to get data
-
- GAME_MSG_STARTING_CARD_HAND = 300,
- GAME_MSG_STARTING_PLAYER,
- GAME_MSG_CARD_PLAY,
-
- GAME_MSG_CHEAT_POSSIBLE = 400, // when host detects a possible cheat
-
- GAME_MSG_MOVE = 500,
- GAME_MSG_COLOR_CHOICE,
- GAME_MSG_RECONNECT_DATA,
- GAME_MSG_QUIT,
- GAME_MSG_PASS,
-
- GAME_MSG_ABORT, // phase these out
- GAME_MSG_WAITING_ABORT,
-
-// GAME_MSG_CLOSE_WINDOW,
-
- // special individual game messages should take IDs 1000 and over
-};
-
-
-#endif // ADDONMESSAGES_H
-
+//========= Copyright Valve Corporation, All rights reserved. ============// +// +// Purpose: +// +//=============================================================================// + +#ifndef ADDONMESSAGES_H +#define ADDONMESSAGES_H +#pragma once + +enum GameMessageIDs +{ + GAME_MSG_TEXT = 1, // text chat message + GAME_MSG_DATA, // binary game data + + GAME_MSG_INVITE_REQUEST, + GAME_MSG_INVITE_RESPONSE, + GAME_MSG_REJOIN_REQUEST, + GAME_MSG_REJOIN_RESPONSE, + + GAME_MSG_INVITE_PERMISSION, // ask permission to invite someone + GAME_MSG_INVITE_NOTIFY, // tell everybody that we're inviting + GAME_MSG_INVITE_DENIED, + + GAME_MSG_PLAYER_STATUS_UPDATE, + GAME_MSG_SETUP_INFO, // when user joins a game, host send the setup information of who's in the game + GAME_MSG_INVITE_CANCEL, // host has cancelled an invite + GAME_MSG_GAME_START, // if a game has a setup phase, this tells everybody the game has started + + GAME_MSG_PLAYER_KICK, // player kicked from game + GAME_MSG_UPDATING, + GAME_MSG_UP_TO_DATE, // player is up to date and ready to get data + + GAME_MSG_STARTING_CARD_HAND = 300, + GAME_MSG_STARTING_PLAYER, + GAME_MSG_CARD_PLAY, + + GAME_MSG_CHEAT_POSSIBLE = 400, // when host detects a possible cheat + + GAME_MSG_MOVE = 500, + GAME_MSG_COLOR_CHOICE, + GAME_MSG_RECONNECT_DATA, + GAME_MSG_QUIT, + GAME_MSG_PASS, + + GAME_MSG_ABORT, // phase these out + GAME_MSG_WAITING_ABORT, + +// GAME_MSG_CLOSE_WINDOW, + + // special individual game messages should take IDs 1000 and over +}; + + +#endif // ADDONMESSAGES_H + diff --git a/sp/src/public/Friends/AddOns/AddOnTypes.h b/sp/src/public/Friends/AddOns/AddOnTypes.h index f4a77b88..b6cf75fe 100644 --- a/sp/src/public/Friends/AddOns/AddOnTypes.h +++ b/sp/src/public/Friends/AddOns/AddOnTypes.h @@ -1,18 +1,18 @@ -//========= Copyright Valve Corporation, All rights reserved. ============//
-//
-// Purpose:
-//
-//=============================================================================//
-
-#ifndef ADDONTYPES_H
-#define ADDONTYPES_H
-#pragma once
-
-#ifndef WIN32
- typedef unsigned long long SessionInt64;
-#else
- typedef unsigned __int64 SessionInt64;
-#endif
-
-#endif // ADDONTYPES_H
-
+//========= Copyright Valve Corporation, All rights reserved. ============// +// +// Purpose: +// +//=============================================================================// + +#ifndef ADDONTYPES_H +#define ADDONTYPES_H +#pragma once + +#ifndef WIN32 + typedef unsigned long long SessionInt64; +#else + typedef unsigned __int64 SessionInt64; +#endif + +#endif // ADDONTYPES_H + diff --git a/sp/src/public/Friends/AddOns/ISteamAddOn.h b/sp/src/public/Friends/AddOns/ISteamAddOn.h index 1b036754..ff395c36 100644 --- a/sp/src/public/Friends/AddOns/ISteamAddOn.h +++ b/sp/src/public/Friends/AddOns/ISteamAddOn.h @@ -1,69 +1,69 @@ -//========= Copyright Valve Corporation, All rights reserved. ============//
-//
-// Purpose: Interface to a Steam Add On
-//
-//=============================================================================//
-
-#ifndef ISTEAMADDON_H
-#define ISTEAMADDON_H
-#pragma once
-
-#include "interface.h"
-#include "AddOnTypes.h"
-#include <vgui_controls/Panel.h>
-
-class CUtlMsgBuffer;
-
-class ISteamAddOn : public IBaseInterface
-{
-public:
- // allows SteamAddOn to link to the core vgui factories
- virtual bool Initialize(CreateInterfaceFn *vguiFactories, int factoryCount) = 0;
-
- // allows SteamAddOns to link to all other modules
- virtual bool PostInitialize(CreateInterfaceFn *modules, int factoryCount) = 0;
-
- // when Friends closes down - all SteamAddOns are notified
- virtual void Deactivate() = 0;
-
- // notifies the addon who its VGUI parent panel is
- virtual void SetParent( vgui::Panel *parent ) = 0;
-
- // notifies the SteamAddOn of the user's ID and username.
- // Note: username can be set mulitple times due to changing of name
- virtual void SetUserID(unsigned int userID) = 0;
- virtual void SetUserName(const char *userName) = 0;
-
- // Query if there are any 'open' sessions - open meaning allowing new users to join the sessions
- virtual int QueryOpenSessionCount() = 0;
-
- // will be valid right after a call to QueryOpenInviteCount will set the addOnSessionID and hostname for
- // any open sessions for this addOn. Return true if it's a valid index
- virtual bool QueryOpenSessionInfo(int nOpenGameIndex, SessionInt64 &addOnSessionID, char *pszHostName) = 0;
-
- // returns true if this userID is involved in an addOnSession with this ID
- virtual bool QueryUserInvolved(SessionInt64 addOnSessionID, unsigned int userID) = 0;
-
- // if session doesn't exist, then the SteamAddOn body should deal with it
- virtual bool OnReceiveMsg(SessionInt64 addOnSessionID, CUtlMsgBuffer *msgBuffer) = 0;
-
- // Let's the SteamAddOn know when when any friend's status has changed
- virtual void OnFriendStatusChanged() = 0;
-
- // A request to start/join this AddOn with this user ID/name. addOnSessionID will be zero if it's a new session request
- virtual void OnInviteUser(unsigned int targetUserID, const char *username, SessionInt64 addOnSessionID) = 0;
-
- // user accepted this host's invite request
- virtual void OnAcceptInviteRequest(unsigned int hostID, const char *hostUserName, SessionInt64 addOnSessionID, const char *pAppData, int dataLen) = 0;
-
- // user accepted this host's rejoin request
- virtual void OnAcceptRejoinRequest(unsigned int hostID, const char *hostUserName, SessionInt64 addOnSessionID, const char *pAppData, int dataLen) = 0;
-
- // user starts this addOn from a menu
- virtual void StartAddOn() = 0;
-};
-
-#define STEAMADDON_INTERFACE_VERSION "SteamAddOn007"
-
-#endif // ISTEAMADDON_H
-
+//========= Copyright Valve Corporation, All rights reserved. ============// +// +// Purpose: Interface to a Steam Add On +// +//=============================================================================// + +#ifndef ISTEAMADDON_H +#define ISTEAMADDON_H +#pragma once + +#include "interface.h" +#include "AddOnTypes.h" +#include <vgui_controls/Panel.h> + +class CUtlMsgBuffer; + +class ISteamAddOn : public IBaseInterface +{ +public: + // allows SteamAddOn to link to the core vgui factories + virtual bool Initialize(CreateInterfaceFn *vguiFactories, int factoryCount) = 0; + + // allows SteamAddOns to link to all other modules + virtual bool PostInitialize(CreateInterfaceFn *modules, int factoryCount) = 0; + + // when Friends closes down - all SteamAddOns are notified + virtual void Deactivate() = 0; + + // notifies the addon who its VGUI parent panel is + virtual void SetParent( vgui::Panel *parent ) = 0; + + // notifies the SteamAddOn of the user's ID and username. + // Note: username can be set mulitple times due to changing of name + virtual void SetUserID(unsigned int userID) = 0; + virtual void SetUserName(const char *userName) = 0; + + // Query if there are any 'open' sessions - open meaning allowing new users to join the sessions + virtual int QueryOpenSessionCount() = 0; + + // will be valid right after a call to QueryOpenInviteCount will set the addOnSessionID and hostname for + // any open sessions for this addOn. Return true if it's a valid index + virtual bool QueryOpenSessionInfo(int nOpenGameIndex, SessionInt64 &addOnSessionID, char *pszHostName) = 0; + + // returns true if this userID is involved in an addOnSession with this ID + virtual bool QueryUserInvolved(SessionInt64 addOnSessionID, unsigned int userID) = 0; + + // if session doesn't exist, then the SteamAddOn body should deal with it + virtual bool OnReceiveMsg(SessionInt64 addOnSessionID, CUtlMsgBuffer *msgBuffer) = 0; + + // Let's the SteamAddOn know when when any friend's status has changed + virtual void OnFriendStatusChanged() = 0; + + // A request to start/join this AddOn with this user ID/name. addOnSessionID will be zero if it's a new session request + virtual void OnInviteUser(unsigned int targetUserID, const char *username, SessionInt64 addOnSessionID) = 0; + + // user accepted this host's invite request + virtual void OnAcceptInviteRequest(unsigned int hostID, const char *hostUserName, SessionInt64 addOnSessionID, const char *pAppData, int dataLen) = 0; + + // user accepted this host's rejoin request + virtual void OnAcceptRejoinRequest(unsigned int hostID, const char *hostUserName, SessionInt64 addOnSessionID, const char *pAppData, int dataLen) = 0; + + // user starts this addOn from a menu + virtual void StartAddOn() = 0; +}; + +#define STEAMADDON_INTERFACE_VERSION "SteamAddOn007" + +#endif // ISTEAMADDON_H + |