5 #include <CoreMinimal.h>
8 #include <Kismet/BlueprintFunctionLibrary.h>
11 #include "LovenseTypes.h"
13 #include "LovenseFunctionLibrary.generated.h"
31 UFUNCTION(BlueprintCallable, Category =
"Lovense")
32 static void Initialize();
42 UFUNCTION(BlueprintCallable, Category =
"Lovense")
43 static void StartLovense();
54 UFUNCTION(BlueprintCallable, Category =
"Lovense")
55 static void StopLovense();
58 UFUNCTION(BlueprintCallable, Category =
"Lovense")
59 static void UpdateAdapters();
62 UFUNCTION(BlueprintCallable, Category =
"Lovense")
63 static void UpdateToys();
66 UFUNCTION(BlueprintPure, Category =
"Lovense")
67 static bool IsLovenseRunning();
70 UFUNCTION(BlueprintPure, Category =
"Lovense")
71 static bool IsUpdatingAdapters();
74 UFUNCTION(BlueprintPure, Category =
"Lovense")
75 static bool IsUpdatingToys();
81 UFUNCTION(BlueprintPure, Category =
"Lovense")
82 static const TArray<class ULovenseToy*>& GetToys();
88 UFUNCTION(BlueprintCallable, Category =
"Lovense")
89 static void ClearAllCommands(
class ULovenseToy* toy =
nullptr);
107 UFUNCTION(BlueprintCallable, Category =
"Lovense")
108 static bool SendCommand(
109 ELovenseCommand command,
115 const FString& presetName,
117 FOnLovenseResponseDynamic callback
126 UFUNCTION(BlueprintCallable, Category =
"Lovense")
127 static bool SendCommand_Test(
class ULovenseToy* toy);
133 UFUNCTION(BlueprintCallable, Category =
"Lovense")
134 static bool SendCommand_Stop(
class ULovenseToy* toy);
146 UFUNCTION(BlueprintCallable, Category =
"Lovense")
147 static bool SendCommand_Vibrate(
class ULovenseToy* toy, uint8 vibrationSpeed);
160 UFUNCTION(BlueprintCallable, Category =
"Lovense")
161 static bool SendCommand_Vibrate1(
class ULovenseToy* toy, uint8 vibrationSpeed);
174 UFUNCTION(BlueprintCallable, Category =
"Lovense")
175 static bool SendCommand_Vibrate2(
class ULovenseToy* toy, uint8 vibrationSpeed);
188 UFUNCTION(BlueprintCallable, Category =
"Lovense")
189 static bool SendCommand_Rotate(
class ULovenseToy* toy, uint8 rotationSpeed);
202 UFUNCTION(BlueprintCallable, Category =
"Lovense")
203 static bool SendCommand_RotateAntiClockwise(
class ULovenseToy* toy, uint8 rotationSpeed);
216 UFUNCTION(BlueprintCallable, Category =
"Lovense")
217 static bool SendCommand_RotateClockwise(
class ULovenseToy* toy, uint8 rotationSpeed);
228 UFUNCTION(BlueprintCallable, Category =
"Lovense")
229 static bool SendCommand_RotateChange(
class ULovenseToy* toy);
242 UFUNCTION(BlueprintCallable, Category =
"Lovense")
243 static bool SendCommand_AirAuto(
class ULovenseToy* toy, uint8 pulseSpeed);
255 UFUNCTION(BlueprintCallable, Category =
"Lovense")
256 static bool SendCommand_AirIn(
class ULovenseToy* toy);
268 UFUNCTION(BlueprintCallable, Category =
"Lovense")
269 static bool SendCommand_AirOut(
class ULovenseToy* toy);
281 UFUNCTION(BlueprintCallable, Category =
"Lovense")
282 static bool SendCommand_Thrust(
class ULovenseToy* toy, uint8 thrustingSpeed);
294 UFUNCTION(BlueprintCallable, Category =
"Lovense")
295 static bool SendCommand_Suck(
class ULovenseToy* toy, uint8 suctionSpeed);
307 UFUNCTION(BlueprintCallable, Category =
"Lovense")
308 static bool SendCommand_Finger(
class ULovenseToy* toy, uint8 fingeringSpeed);
321 UFUNCTION(BlueprintCallable, Category =
"Lovense")
322 static bool SendCommand_Preset(
class ULovenseToy* toy, uint8 pattern);
336 UFUNCTION(BlueprintCallable, Category =
"Lovense")
337 static bool SendCommand_Battery(
class ULovenseToy* toy, FOnLovenseResponseDynamic callback);
353 UFUNCTION(BlueprintCallable, Category =
"Lovense")
354 static bool SendCommand_AVibrate(
class ULovenseToy* toy, uint8 vibrationSpeed, int32 time);
372 UFUNCTION(BlueprintCallable, Category =
"Lovense")
373 static bool SendCommand_AVibrate1(
class ULovenseToy* toy, uint8 vibrationSpeed, int32 time);
391 UFUNCTION(BlueprintCallable, Category =
"Lovense")
392 static bool SendCommand_AVibrate2(
class ULovenseToy* toy, uint8 vibrationSpeed, int32 time);
409 UFUNCTION(BlueprintCallable, Category =
"Lovense")
410 static bool SendCommand_ARotate(
class ULovenseToy* toy, uint8 rotationSpeed, int32 time);
427 UFUNCTION(BlueprintCallable, Category =
"Lovense")
428 static bool SendCommand_AAirLevel(
class ULovenseToy* toy, uint8 pulseSpeed, int32 time);
444 UFUNCTION(BlueprintCallable, Category =
"Lovense")
445 static bool SendCommand_AThrust(
class ULovenseToy* toy, uint8 thrustingSpeed, int32 time);
461 UFUNCTION(BlueprintCallable, Category =
"Lovense")
462 static bool SendCommand_ASuck(
class ULovenseToy* toy, uint8 suctionSpeed, int32 time);
478 UFUNCTION(BlueprintCallable, Category =
"Lovense")
479 static bool SendCommand_AFinger(
class ULovenseToy* toy, uint8 fingeringSpeed, int32 time);
496 UFUNCTION(BlueprintCallable, Category =
"Lovense")
497 static bool SendCommand_APreset(
class ULovenseToy* toy,
const FString& patternName, int32 time);
518 UFUNCTION(BlueprintCallable, Category =
"Lovense")
519 static bool SendCommand_AVibRotate(
class ULovenseToy* toy, uint8 vibrationSpeed, uint8 rotationSpeed, int32 time);
540 UFUNCTION(BlueprintCallable, Category =
"Lovense")
541 static bool SendCommand_AVibAir(
class ULovenseToy* toy, uint8 vibrationSpeed, uint8 pulseSpeed, int32 time);
558 UFUNCTION(BlueprintCallable, Category =
"Lovense")
559 static bool SendCommand_AVibRotateAir(
class ULovenseToy* toy, uint8 vibrationSpeed, uint8 rotationSpeed, uint8 pulseSpeed, int32 time);
574 UFUNCTION(BlueprintCallable, Category =
"Lovense")
575 static bool SendCommand_AAll(
class ULovenseToy* toy, uint8 speed, int32 time);
596 UFUNCTION(BlueprintCallable, Category =
"Lovense")
597 static bool SendCommand_Pattern(
599 const TArray<int32>& pattern,
600 bool bVibrate =
true,
606 int32 interval = 100,
611 UFUNCTION(BlueprintPure, Category =
"Lovense")
618 UFUNCTION(BlueprintPure, Category =
"Lovense")
619 static bool GetStartWithLovenseActive();
622 UFUNCTION(BlueprintPure, Category =
"Lovense")
623 static FString GetDeviceIpOverride();
626 UFUNCTION(BlueprintPure, Category =
"Lovense")
627 static FString GetDevicePortOverride();
634 UFUNCTION(BlueprintPure, Category =
"Lovense")
635 static int32 GetToyDelay();
642 UFUNCTION(BlueprintPure, Category =
"Lovense")
643 static float GetToyStrengthMultiplier();
649 UFUNCTION(BlueprintPure, Category =
"Lovense")
650 static bool GetToyVibrationEnabled();
656 UFUNCTION(BlueprintPure, Category =
"Lovense")
657 static bool GetToyRotationEnabled();
663 UFUNCTION(BlueprintPure, Category =
"Lovense")
664 static bool GetToyAirEnabled();
670 UFUNCTION(BlueprintPure, Category =
"Lovense")
671 static bool GetToyThrustingEnabled();
677 UFUNCTION(BlueprintPure, Category =
"Lovense")
678 static bool GetToySuctionEnabled();
684 UFUNCTION(BlueprintPure, Category =
"Lovense")
685 static bool GetToyFingeringEnabled();
688 UFUNCTION(BlueprintPure, Category =
"Lovense")
689 static bool IsIPStringValid(
const FString& ipString);
692 UFUNCTION(BlueprintPure, Category =
"Lovense")
693 static bool IsPortStringValid(
const FString& portString);
699 UFUNCTION(BlueprintCallable, Category =
"Lovense")
700 static void SetStartWithLovenseActive(
bool bStartActive);
703 UFUNCTION(BlueprintCallable, Category =
"Lovense")
704 static void SetDeviceIpOverride(
const FString& ipOverride);
707 UFUNCTION(BlueprintCallable, Category =
"Lovense")
708 static void SetDevicePortOverride(
const FString& portOverride);
716 UFUNCTION(BlueprintCallable, Category =
"Lovense")
717 static void SetToyDelay(int32 value);
725 UFUNCTION(BlueprintCallable, Category =
"Lovense")
726 static void SetToyStrengthMultiplier(
float value);
733 UFUNCTION(BlueprintCallable, Category =
"Lovense")
734 static void SetToyVibrationEnabled(
bool value);
741 UFUNCTION(BlueprintCallable, Category =
"Lovense")
742 static void SetToyRotationEnabled(
bool value);
749 UFUNCTION(BlueprintCallable, Category =
"Lovense")
750 static void SetToyAirEnabled(
bool value);
757 UFUNCTION(BlueprintCallable, Category =
"Lovense")
758 static void SetToyThrustingEnabled(
bool value);
765 UFUNCTION(BlueprintCallable, Category =
"Lovense")
766 static void SetToySuctionEnabled(
bool value);
773 UFUNCTION(BlueprintCallable, Category =
"Lovense")
774 static void SetToyFingeringEnabled(
bool value);