Lovense Integration: LovenseIntegration/Source/LovenseIntegration/Public/LovenseToy.h Source File

Lovense Integration

LovenseToy.h
1 // (CVN) - Candy Valley Network GmbH
2
3 #pragma once
4
5 #include <CoreMinimal.h>
6
7 // EXTERNAL INCLUDES
8
9 // INTERNAL INCLUDES
10 #include "LovenseTypes.h"
11
12 #include "LovenseToy.generated.h"
13
14
18 UCLASS(BlueprintType)
19 class LOVENSEINTEGRATION_API ULovenseToy : public UObject {
20 GENERATED_BODY()
21
22 friend class ILovenseAdapter;
23 friend class FLovenseManager;
24
25 public:
32 UFUNCTION(BlueprintPure, Category = "Lovense|Toy")
33 FString GetFullToyName();
34
36 UFUNCTION(BlueprintPure, Category = "Lovense|Toy")
37 FString GetAssociatedAdapterPlatformName();
38
40 UFUNCTION(BlueprintPure, Category = "Lovense|Toy")
41 FORCEINLINE bool IsConnected() { return !!this->toyDescription.status; }
42
47 UFUNCTION(BlueprintPure, Category = "Lovense|Toy")
48 FORCEINLINE int32 GetBatteryStatus() { return this->toyDescription.battery; }
49
51 UFUNCTION(BlueprintPure, Category = "Lovense|Toy")
52 bool IsRunningTestCommand();
53
59 UFUNCTION(BlueprintPure, Category = "Lovense|Toy")
60 bool IsValidToy();
61
62 public:
63 ULovenseToy();
64
66 FORCEINLINE const FString& GetToyID() { return this->toyDescription.id; }
67
69 FORCEINLINE const FLovenseToyDescription& GetToyDescription() { return this->toyDescription; }
71 FORCEINLINE void SetToyDescription(const FLovenseToyDescription& description) { this->toyDescription = description; }
72
73 private:
75 UPROPERTY(BlueprintReadOnly, Category = "Lovense|Toy", Meta = (AllowPrivateAccess = "true"))
76 FLovenseToyDescription toyDescription;
77
78 private:
80 class ILovenseAdapter* lovenseAdapter;
82 FLovenseCommandDelayTimers commandDelayTimers;
83 };
FLovenseCommandDelayTimers
These timers define the minimum update frequencies for the respective commands. There's a global se...
Definition: LovenseTypes.h:465
ULovenseToy
UObject representing a Lovense Toy.
Definition: LovenseToy.h:19
ULovenseToy::GetToyDescription
const FORCEINLINE FLovenseToyDescription & GetToyDescription()
The toy description of this toy. Holds (mostly) raw ILovenseAdapter::GetToys() HTTP request json data...
Definition: LovenseToy.h:69
ULovenseToy::SetToyDescription
FORCEINLINE void SetToyDescription(const FLovenseToyDescription &description)
Called by the Lovense Adapters to set the toy description of this toy. Holds (mostly) raw GetToys() H...
Definition: LovenseToy.h:71
ILovenseAdapter
Abstract base class for Lovense adapters. These adapters handle the communication with the Lovense ...
Definition: ILovenseAdapter.h:20
FLovenseToyDescription
Container holding (mostly) raw HTTP request json data for a Lovense Toy instance.
Definition: LovenseTypes.h:192
FLovenseManager
This class defines the plugin interface. Use FLovenseManager::Get() to get the global manager instanc...
Definition: LovenseManager.h:99