Esempio n. 1
0
        internal Friends(Client c)
        {
            client = c;

            client.RegisterCallback <PersonaStateChange_t>(OnPersonaStateChange);
            client.RegisterCallback <GameRichPresenceJoinRequested_t>(OnGameJoinRequested);
            client.RegisterCallback <GameConnectedFriendChatMsg_t>(OnFriendChatMessage);
        }
        internal Achievements(Client c)
        {
            client = c;

            All = new Achievement[0];
            c.RegisterCallback <UserStatsReceived_t>(UserStatsReceived);
            c.RegisterCallback <UserStatsStored_t>(UserStatsStored);

            Refresh();
        }
Esempio n. 3
0
        /// <summary>
        /// Creates an auth ticket.
        /// Which you can send to a server to authenticate that you are who you say you are.
        /// </summary>
        public unsafe Ticket GetAuthSessionTicket()
        {
            var data = new byte[1024];

            fixed(byte *b = data)
            {
                uint ticketLength = 0;

                client.RegisterCallback <GetAuthSessionTicketResponse_t>(AuthResponse);
                uint ticket = client.native.user.GetAuthSessionTicket((IntPtr)b, data.Length, out ticketLength);

                while (!_responded)
                {
                    client.RunCallbacks();
                }
                if (ticket == 0)
                {
                    return(null);
                }

                return(new Ticket()
                {
                    client = client,
                    Data = data.Take((int)ticketLength).ToArray(),
                    Handle = ticket
                });
            }
        }
Esempio n. 4
0
        internal LobbyList(Client client)
        {
            client.RegisterCallback <SteamNative.LobbyDataUpdate_t>(OnLobbyDataUpdated);

            this.client = client;
            Lobbies     = new List <Lobby>();
            requests    = new List <ulong>();

            ManualLobbyDataCallbacks = new Dictionary <ulong, Action <Lobby> >();
        }
Esempio n. 5
0
        public Lobby(Client c)
        {
            client = c;

            client.RegisterCallback <SteamNative.LobbyDataUpdate_t>(OnLobbyDataUpdatedAPI);
            client.RegisterCallback <SteamNative.LobbyChatMsg_t>(OnLobbyChatMessageRecievedAPI);
            client.RegisterCallback <SteamNative.LobbyChatUpdate_t>(OnLobbyStateUpdatedAPI);
            client.RegisterCallback <SteamNative.GameLobbyJoinRequested_t>(OnLobbyJoinRequestedAPI);
            client.RegisterCallback <SteamNative.LobbyInvite_t>(OnUserInvitedToLobbyAPI);
            client.RegisterCallback <SteamNative.PersonaStateChange_t>(OnLobbyMemberPersonaChangeAPI);
        }
Esempio n. 6
0
        public Auth(Client c)
        {
            client = c;

            client.RegisterCallback <SteamNative.ValidateAuthTicketResponse_t>(OnAuthTicketValidate);
        }
Esempio n. 7
0
        internal App(Client c)
        {
            client = c;

            client.RegisterCallback <SteamNative.DlcInstalled_t>(DlcInstalled);
        }
        internal MicroTransactions(Client c)
        {
            client = c;

            client.RegisterCallback <SteamNative.MicroTxnAuthorizationResponse_t>(onMicroTxnAuthorizationResponse);
        }
Esempio n. 9
0
        internal Overlay(Client c)
        {
            client = c;

            c.RegisterCallback <GameOverlayActivated_t>(OverlayStateChange);
        }
Esempio n. 10
0
        internal LobbyList(Client client)
        {
            client.RegisterCallback <SteamNative.LobbyDataUpdate_t>(OnLobbyDataUpdated);

            this.client = client;
        }
Esempio n. 11
0
        internal Friends(Client c)
        {
            client = c;

            client.RegisterCallback <SteamNative.PersonaStateChange_t>(OnPersonaStateChange);
        }