internal bool GetBeaconLocationData(SteamPartyBeaconLocation_t BeaconLocation, SteamPartyBeaconLocationData eData, out string pchDataStringOut)
        {
            IntPtr mempchDataStringOut = Helpers.TakeMemory();

            var returnValue = _GetBeaconLocationData(Self, BeaconLocation, eData, mempchDataStringOut, (1024 * 32));

            pchDataStringOut = Helpers.MemoryToString(mempchDataStringOut);
            return(returnValue);
        }
Example #2
0
        public static bool GetBeaconLocationData(SteamPartyBeaconLocation_t BeaconLocation, ESteamPartyBeaconLocationData eData, out string pchDataStringOut, int cchDataStringOut)
        {
            InteropHelp.TestIfAvailableClient();
            IntPtr intPtr = Marshal.AllocHGlobal(cchDataStringOut);
            bool   flag   = NativeMethods.ISteamParties_GetBeaconLocationData(CSteamAPIContext.GetSteamParties(), BeaconLocation, eData, intPtr, cchDataStringOut);

            pchDataStringOut = (flag ? InteropHelp.PtrToStringUTF8(intPtr) : null);
            Marshal.FreeHGlobal(intPtr);
            return(flag);
        }
Example #3
0
        internal bool GetBeaconLocationData(SteamPartyBeaconLocation_t BeaconLocation, SteamPartyBeaconLocationData eData, StringBuilder pchDataStringOut, int cchDataStringOut)
        {
            if (Config.Os == OsType.Windows)
            {
                SteamPartyBeaconLocation_t.Pack8 BeaconLocation_windows = BeaconLocation;
                var retVal = _GetBeaconLocationData_Windows(Self, BeaconLocation, eData, pchDataStringOut, cchDataStringOut);
                BeaconLocation = BeaconLocation_windows;
                return(retVal);
            }

            return(_GetBeaconLocationData(Self, BeaconLocation, eData, pchDataStringOut, cchDataStringOut));
        }
Example #4
0
        internal bool GetAvailableBeaconLocations(ref SteamPartyBeaconLocation_t pLocationList, uint uMaxNumLocations)
        {
            if (Config.Os == OsType.Windows)
            {
                SteamPartyBeaconLocation_t.Pack8 pLocationList_windows = pLocationList;
                var retVal = _GetAvailableBeaconLocations_Windows(Self, ref pLocationList_windows, uMaxNumLocations);
                pLocationList = pLocationList_windows;
                return(retVal);
            }

            return(_GetAvailableBeaconLocations(Self, ref pLocationList, uMaxNumLocations));
        }
        internal bool GetAvailableBeaconLocations(ref SteamPartyBeaconLocation_t pLocationList, uint uMaxNumLocations)
        {
            bool self;

            if (Config.Os != OsType.Windows)
            {
                self = this._GetAvailableBeaconLocations(this.Self, ref pLocationList, uMaxNumLocations);
            }
            else
            {
                SteamPartyBeaconLocation_t.Pack8 pack8   = pLocationList;
                bool _GetAvailableBeaconLocationsWindows = this._GetAvailableBeaconLocations_Windows(this.Self, ref pack8, uMaxNumLocations);
                pLocationList = pack8;
                self          = _GetAvailableBeaconLocationsWindows;
            }
            return(self);
        }
        internal bool GetBeaconLocationData(SteamPartyBeaconLocation_t BeaconLocation, SteamPartyBeaconLocationData eData, StringBuilder pchDataStringOut, int cchDataStringOut)
        {
            bool self;

            if (Config.Os != OsType.Windows)
            {
                self = this._GetBeaconLocationData(this.Self, BeaconLocation, eData, pchDataStringOut, cchDataStringOut);
            }
            else
            {
                SteamPartyBeaconLocation_t.Pack8 beaconLocation = BeaconLocation;
                bool _GetBeaconLocationDataWindows = this._GetBeaconLocationData_Windows(this.Self, BeaconLocation, eData, pchDataStringOut, cchDataStringOut);
                BeaconLocation = beaconLocation;
                self           = _GetBeaconLocationDataWindows;
            }
            return(self);
        }
        internal async Task <CreateBeaconCallback_t?> CreateBeacon(uint unOpenSlots, SteamPartyBeaconLocation_t pBeaconLocation, string pchConnectString, string pchMetadata)
        {
            CreateBeaconCallback_t?resultAsync;

            if (Config.Os != OsType.Windows)
            {
                CreateBeaconCallback_t?nullable = await CreateBeaconCallback_t.GetResultAsync(this._CreateBeacon(this.Self, unOpenSlots, ref pBeaconLocation, pchConnectString, pchMetadata));

                resultAsync = nullable;
            }
            else
            {
                SteamPartyBeaconLocation_t.Pack8 pack8 = pBeaconLocation;
                SteamAPICall_t _CreateBeaconWindows    = this._CreateBeacon_Windows(this.Self, unOpenSlots, ref pack8, pchConnectString, pchMetadata);
                pBeaconLocation = pack8;
                resultAsync     = await CreateBeaconCallback_t.GetResultAsync(_CreateBeaconWindows);
            }
            return(resultAsync);
        }
 internal bool GetBeaconLocationData(SteamPartyBeaconLocation_t BeaconLocation, SteamPartyBeaconLocationData eData, StringBuilder pchDataStringOut, int cchDataStringOut)
 {
     return(_GetBeaconLocationData(Self, BeaconLocation, eData, pchDataStringOut, cchDataStringOut));
 }
 internal async Task <CreateBeaconCallback_t?> CreateBeacon(uint unOpenSlots, /* ref */ SteamPartyBeaconLocation_t pBeaconLocation, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(Utf8StringToNative))] string pchConnectString, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(Utf8StringToNative))] string pchMetadata)
 {
     return(await CreateBeaconCallback_t.GetResultAsync(_CreateBeacon( Self, unOpenSlots, ref pBeaconLocation, pchConnectString, pchMetadata )));
 }
 internal bool GetAvailableBeaconLocations(ref SteamPartyBeaconLocation_t pLocationList, uint uMaxNumLocations)
 {
     return(_GetAvailableBeaconLocations(Self, ref pLocationList, uMaxNumLocations));
 }
Example #11
0
 public static bool GetAvailableBeaconLocations(out SteamPartyBeaconLocation_t pLocationList, uint uMaxNumLocations)
 {
     pLocationList = new SteamPartyBeaconLocation_t();
     return(false);
 }
Example #12
0
        internal bool GetBeaconDetails(PartyBeaconID_t ulBeaconID, ref SteamId pSteamIDBeaconOwner, ref SteamPartyBeaconLocation_t pLocation, StringBuilder pchMetadata, int cchMetadata)
        {
            if (Config.Os == OsType.Windows)
            {
                SteamPartyBeaconLocation_t.Pack8 pLocation_windows = pLocation;
                var retVal = _GetBeaconDetails_Windows(Self, ulBeaconID, ref pSteamIDBeaconOwner, ref pLocation_windows, pchMetadata, cchMetadata);
                pLocation = pLocation_windows;
                return(retVal);
            }

            return(_GetBeaconDetails(Self, ulBeaconID, ref pSteamIDBeaconOwner, ref pLocation, pchMetadata, cchMetadata));
        }
Example #13
0
 /// Create a new party beacon and activate it in the selected location.
 /// unOpenSlots is the maximum number of users that Steam will send to you.
 /// When people begin responding to your beacon, Steam will send you
 /// PartyReservationCallback_t callbacks to let you know who is on the way.
 public static SteamAPICall_t CreateBeacon(uint unOpenSlots, out SteamPartyBeaconLocation_t pBeaconLocation, string pchConnectString, string pchMetadata)
 {
     pBeaconLocation = new SteamPartyBeaconLocation_t();
     return((SteamAPICall_t)0);
 }
Example #14
0
 /// Utils
 public static bool GetBeaconLocationData(SteamPartyBeaconLocation_t BeaconLocation, ESteamPartyBeaconLocationData eData, out string pchDataStringOut, int cchDataStringOut)
 {
     pchDataStringOut = "";
     return(false);
 }
Example #15
0
 private static extern bool _GetAvailableBeaconLocations(IntPtr self, ref SteamPartyBeaconLocation_t pLocationList, uint uMaxNumLocations);
Example #16
0
 private static extern bool _GetBeaconDetails(IntPtr self, PartyBeaconID_t ulBeaconID, ref SteamId pSteamIDBeaconOwner, ref SteamPartyBeaconLocation_t pLocation, IntPtr pchMetadata, int cchMetadata);
Example #17
0
        internal CallResult <CreateBeaconCallback_t> CreateBeacon(uint unOpenSlots, /* ref */ SteamPartyBeaconLocation_t pBeaconLocation, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(Utf8StringToNative))] string pchConnectString, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(Utf8StringToNative))] string pchMetadata)
        {
            var returnValue = _CreateBeacon(Self, unOpenSlots, ref pBeaconLocation, pchConnectString, pchMetadata);

            return(new CallResult <CreateBeaconCallback_t>(returnValue, IsServer));
        }
        internal bool GetBeaconDetails(PartyBeaconID_t ulBeaconID, ref SteamId pSteamIDBeaconOwner, ref SteamPartyBeaconLocation_t pLocation, StringBuilder pchMetadata, int cchMetadata)
        {
            bool self;

            if (Config.Os != OsType.Windows)
            {
                self = this._GetBeaconDetails(this.Self, ulBeaconID, ref pSteamIDBeaconOwner, ref pLocation, pchMetadata, cchMetadata);
            }
            else
            {
                SteamPartyBeaconLocation_t.Pack8 pack8 = pLocation;
                bool _GetBeaconDetailsWindows          = this._GetBeaconDetails_Windows(this.Self, ulBeaconID, ref pSteamIDBeaconOwner, ref pack8, pchMetadata, cchMetadata);
                pLocation = pack8;
                self      = _GetBeaconDetailsWindows;
            }
            return(self);
        }
Example #19
0
        internal async Task <CreateBeaconCallback_t?> CreateBeacon(uint unOpenSlots, /* ref */ SteamPartyBeaconLocation_t pBeaconLocation, string pchConnectString, string pchMetadata)
        {
            if (Config.Os == OsType.Windows)
            {
                SteamPartyBeaconLocation_t.Pack8 pBeaconLocation_windows = pBeaconLocation;
                var retVal = _CreateBeacon_Windows(Self, unOpenSlots, ref pBeaconLocation_windows, pchConnectString, pchMetadata);
                pBeaconLocation = pBeaconLocation_windows;
                return(await CreateBeaconCallback_t.GetResultAsync(retVal));
            }

            return(await CreateBeaconCallback_t.GetResultAsync(_CreateBeacon( Self, unOpenSlots, ref pBeaconLocation, pchConnectString, pchMetadata )));
        }
 internal bool GetBeaconDetails(PartyBeaconID_t ulBeaconID, ref SteamId pSteamIDBeaconOwner, ref SteamPartyBeaconLocation_t pLocation, StringBuilder pchMetadata, int cchMetadata)
 {
     return(_GetBeaconDetails(Self, ulBeaconID, ref pSteamIDBeaconOwner, ref pLocation, pchMetadata, cchMetadata));
 }
Example #21
0
 public static bool GetBeaconDetails(PartyBeaconID_t ulBeaconID, out CSteamID pSteamIDBeaconOwner, out SteamPartyBeaconLocation_t pLocation, out string pchMetadata, int cchMetadata)
 {
     pSteamIDBeaconOwner = (CSteamID)0;
     pLocation           = new SteamPartyBeaconLocation_t();
     pchMetadata         = "";
     return(false);
 }
Example #22
0
 private static extern SteamAPICall_t _CreateBeacon(IntPtr self, uint unOpenSlots, ref SteamPartyBeaconLocation_t pBeaconLocation, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(Utf8StringToNative))] string pchConnectString, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(Utf8StringToNative))] string pchMetadata);
Example #23
0
        public static bool GetBeaconDetails(PartyBeaconID_t ulBeaconID, out CSteamID pSteamIDBeaconOwner, out SteamPartyBeaconLocation_t pLocation, out string pchMetadata, int cchMetadata)
        {
            InteropHelp.TestIfAvailableClient();
            IntPtr intPtr = Marshal.AllocHGlobal(cchMetadata);
            bool   flag   = NativeMethods.ISteamParties_GetBeaconDetails(CSteamAPIContext.GetSteamParties(), ulBeaconID, out pSteamIDBeaconOwner, out pLocation, intPtr, cchMetadata);

            pchMetadata = (flag ? InteropHelp.PtrToStringUTF8(intPtr) : null);
            Marshal.FreeHGlobal(intPtr);
            return(flag);
        }
Example #24
0
 private static extern bool _GetBeaconLocationData(IntPtr self, SteamPartyBeaconLocation_t BeaconLocation, SteamPartyBeaconLocationData eData, IntPtr pchDataStringOut, int cchDataStringOut);
Example #25
0
        public static PartyBeaconID_t GetBeaconByIndex(uint unIndex) => default; // 0x00000001807AAEA0-0x00000001807AAF40

        public static bool GetBeaconDetails(PartyBeaconID_t ulBeaconID, out CSteamID pSteamIDBeaconOwner, out SteamPartyBeaconLocation_t pLocation, out string pchMetadata, int cchMetadata)
        {
            pSteamIDBeaconOwner = default;
            pLocation           = default;
            pchMetadata         = default;
            return(default);
Example #26
0
        internal bool GetBeaconDetails(PartyBeaconID_t ulBeaconID, ref SteamId pSteamIDBeaconOwner, ref SteamPartyBeaconLocation_t pLocation, out string pchMetadata)
        {
            using var mempchMetadata = Helpers.TakeMemory();

            var returnValue = _GetBeaconDetails(Self, ulBeaconID, ref pSteamIDBeaconOwner, ref pLocation, mempchMetadata, (1024 * 32));

            pchMetadata = Helpers.MemoryToString(mempchMetadata);
            return(returnValue);
        }
Example #27
0
        internal async Task <CreateBeaconCallback_t?> CreateBeacon(uint unOpenSlots, /* ref */ SteamPartyBeaconLocation_t pBeaconLocation, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(Utf8StringToNative))] string pchConnectString, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(Utf8StringToNative))] string pchMetadata)
        {
            if (Config.Os == OsType.Windows)
            {
                SteamPartyBeaconLocation_t.Pack8 pBeaconLocation_windows = pBeaconLocation;
                var retVal = _CreateBeacon_Windows(Self, unOpenSlots, ref pBeaconLocation_windows, pchConnectString, pchMetadata);
                pBeaconLocation = pBeaconLocation_windows;
                return(await CreateBeaconCallback_t.GetResultAsync(retVal));
            }

            return(await CreateBeaconCallback_t.GetResultAsync(_CreateBeacon( Self, unOpenSlots, ref pBeaconLocation, pchConnectString, pchMetadata )));
        }
Example #28
0
        internal bool GetAvailableBeaconLocations(ref SteamPartyBeaconLocation_t pLocationList, uint uMaxNumLocations)
        {
            var returnValue = _GetAvailableBeaconLocations(Self, ref pLocationList, uMaxNumLocations);

            return(returnValue);
        }
 internal async Task <CreateBeaconCallback_t?> CreateBeacon(uint unOpenSlots, /* ref */ SteamPartyBeaconLocation_t pBeaconLocation, string pchConnectString, string pchMetadata)
 {
     return(await CreateBeaconCallback_t.GetResultAsync(_CreateBeacon( Self, unOpenSlots, ref pBeaconLocation, pchConnectString, pchMetadata )));
 }