Lovense Integration
|
Adapter representing the Lovense Connect iOS app. More...
#include <LovenseIntegration/Source/LovenseIntegration/Classes/Adapters/LovenseConnectMobileAdapter.h>
Additional Inherited Members | |
![]() | |
const FORCEINLINE FLovenseAdapterDescription & | GetAdapterDescription () |
The adapter description that was used to initialize this adapter. Holds (mostly) raw TryGetAdapterData() HTTP request json data for this adapter. | |
const TArray< TPair< FString, FTimerHandle > > | GetToyTestTimerHandles () |
Array of toy deviceId string and test timer handle. This holds the toy deviceId so we can check if a toy is running a test command and to send a command to that toy to stop vibrating when the timer finishes. | |
virtual bool | Initialize (FLovenseAdapterDescription &description) |
Initializes the adapter with the passed in adapter description. More... | |
virtual void | Shutdown () |
Deinitialize the adapter. This will stop any running test timers and clear toy objects. | |
virtual bool | GetToys (FOnLovenseGetToysResponse callback) |
Polls the Lovense App for toys and creates toy objects for all received toys. We always directly poll the respective Lovense Apps to get our toy info so we don't put unnecessary load on the Lovense servers. More... | |
virtual bool | SendCommand_Test (const FString &toyId) |
See FLovenseManager::SendCommand_Test() for information on this command. More... | |
virtual bool | SendCommand_Stop (const FString ¶meters, const FString &toyId) |
See FLovenseManager::SendCommand_Stop() for information on this command. More... | |
virtual bool | SendCommand_Vibrate (const FString ¶meters, const FString &toyId, uint8 vibrationSpeed) |
See FLovenseManager::SendCommand_Vibrate() for information on this command. More... | |
virtual bool | SendCommand_Vibrate1 (const FString ¶meters, const FString &toyId, uint8 vibrationSpeed) |
See FLovenseManager::SendCommand_Vibrate1() for information on this command. More... | |
virtual bool | SendCommand_Vibrate2 (const FString ¶meters, const FString &toyId, uint8 vibrationSpeed) |
See FLovenseManager::SendCommand_Vibrate2() for information on this command. More... | |
virtual bool | SendCommand_Rotate (const FString ¶meters, const FString &toyId, uint8 rotationSpeed) |
See FLovenseManager::SendCommand_Rotate() for information on this command. More... | |
virtual bool | SendCommand_RotateAntiClockwise (const FString ¶meters, const FString &toyId, uint8 rotationSpeed) |
See FLovenseManager::SendCommand_RotateAntiClockwise() for information on this command. More... | |
virtual bool | SendCommand_RotateClockwise (const FString ¶meters, const FString &toyId, uint8 rotationSpeed) |
See FLovenseManager::SendCommand_RotateClockwise() for information on this command. More... | |
virtual bool | SendCommand_RotateChange (const FString ¶meters, const FString &toyId) |
See FLovenseManager::SendCommand_RotateChange() for information on this command. More... | |
virtual bool | SendCommand_AirAuto (const FString ¶meters, const FString &toyId, uint8 pulseSpeed) |
See FLovenseManager::SendCommand_AirAuto() for information on this command. More... | |
virtual bool | SendCommand_AirIn (const FString ¶meters, const FString &toyId) |
See FLovenseManager::SendCommand_AirIn() for information on this command. More... | |
virtual bool | SendCommand_AirOut (const FString ¶meters, const FString &toyId) |
See FLovenseManager::SendCommand_AirOut() for information on this command. More... | |
virtual bool | SendCommand_Thrust (const FString ¶meters, const FString &toyId, uint8 thrustingSpeed) |
See FLovenseManager::SendCommand_Vibrate() for information on this command. More... | |
virtual bool | SendCommand_Suck (const FString ¶meters, const FString &toyId, uint8 suctionSpeed) |
See FLovenseManager::SendCommand_Vibrate() for information on this command. More... | |
virtual bool | SendCommand_Finger (const FString ¶meters, const FString &toyId, uint8 fingeringSpeed) |
See FLovenseManager::SendCommand_Vibrate() for information on this command. More... | |
virtual bool | SendCommand_Preset (const FString ¶meters, const FString &toyId, uint8 pattern) |
See FLovenseManager::SendCommand_Preset() for information on this command. More... | |
virtual bool | SendCommand_Battery (const FString ¶meters, const FString &toyId, FOnLovenseResponse callback) |
See FLovenseManager::SendCommand_Battery() for information on this command. More... | |
virtual bool | SendCommand_AVibrate (const FString ¶meters, const FString &toyId, uint8 vibrationSpeed, int32 time) |
See FLovenseManager::SendCommand_AVibrate() for information on this command. More... | |
virtual bool | SendCommand_AVibrate1 (const FString ¶meters, const FString &toyId, uint8 vibrationSpeed, int32 time) |
See FLovenseManager::SendCommand_AVibrate1() for information on this command. More... | |
virtual bool | SendCommand_AVibrate2 (const FString ¶meters, const FString &toyId, uint8 vibrationSpeed, int32 time) |
See FLovenseManager::SendCommand_AVibrate2() for information on this command. More... | |
virtual bool | SendCommand_ARotate (const FString ¶meters, const FString &toyId, uint8 rotationSpeed, int32 time) |
See FLovenseManager::SendCommand_ARotate() for information on this command. More... | |
virtual bool | SendCommand_AAirLevel (const FString ¶meters, const FString &toyId, uint8 pulseSpeed, int32 time) |
See FLovenseManager::SendCommand_AAirLevel() for information on this command. More... | |
virtual bool | SendCommand_AThrust (const FString ¶meters, const FString &toyId, uint8 thrustingSpeed, int32 time) |
See FLovenseManager::SendCommand_AThrust() for information on this command. More... | |
virtual bool | SendCommand_ASuck (const FString ¶meters, const FString &toyId, uint8 suctionSpeed, int32 time) |
See FLovenseManager::SendCommand_ASuck() for information on this command. More... | |
virtual bool | SendCommand_AFinger (const FString ¶meters, const FString &toyId, uint8 fingeringSpeed, int32 time) |
See FLovenseManager::SendCommand_AFinger() for information on this command. More... | |
virtual bool | SendCommand_APreset (const FString ¶meters, const FString &toyId, const FString &patternName, int32 time) |
See FLovenseManager::SendCommand_APreset() for information on this command. More... | |
virtual bool | SendCommand_AVibRotate (const FString ¶meters, const FString &toyId, uint8 vibrationSpeed, uint8 rotationSpeed, int32 time) |
See FLovenseManager::SendCommand_AVibRotate() for information on this command. More... | |
virtual bool | SendCommand_AVibAir (const FString ¶meters, const FString &toyId, uint8 vibrationSpeed, uint8 pulseSpeed, int32 time) |
See FLovenseManager::SendCommand_AVibAir() for information on this command. More... | |
virtual bool | SendCommand_AVibRotateAir (const FString ¶meters, const FString &toyId, uint8 vibrationSpeed, uint8 rotationSpeed, uint8 pulseSpeed, int32 time) |
See FLovenseManager::SendCommand_AVibRotateAir() for information on this command. More... | |
virtual bool | SendCommand_AAll (const FString ¶meters, const FString &toyId, uint8 vibrationSpeed, uint8 rotationSpeed, uint8 pulseSpeed, uint8 thrustingSpeed, uint8 fingeringSpeed, uint8 suctionSpeed, int32 time) |
See FLovenseManager::SendCommand_AAll() for information on this command. More... | |
virtual bool | SendCommand_Pattern (const FString ¶meters, const FString &toyId, FLovensePattern &pattern) |
See FLovenseManager::SendCommand_Pattern() for information on this command. More... | |
![]() | |
static bool | TryGetAdapterData (FOnLovenseGetAdaptersResponse callback) |
Polls "https://api.lovense-api.com/api/lan/v2/app" for toys in the local network. This is the same for all API+Platform combinations, so we can make it static. More... | |
![]() | |
virtual FHttpRequestPtr | CreateHTTPRequest_GetToys () override |
Create HTTP request to poll for toy info. Each API+Platform combination requires different HTTP request settings, so allow child classes to create the HTTP request with the correct settings. | |
virtual FHttpRequestPtr | CreateHTTPRequest_SendCommand (const FString &command) override |
Create HTTP request to send a command. Each API+Platform combination requires different HTTP request settings, so allow child classes to create the HTTP request with the correct settings. More... | |
![]() | |
virtual void | ParseToyDescription (FLovenseToyDescription &toyDescription, TSharedPtr< class FJsonObject > toyObject) override |
Parses a json object holding toy data and fills a toy description. The json structure is different between the API's, so allow child classes to override this. More... | |
![]() | |
ILovenseAdapter (const ILovenseAdapter &) | |
void | CreateLovenseToy (FLovenseToyDescription &toyDescription) |
Creates a toy object and adds it to the toyStrongPointers array. Also adds the toyDescription to the responseData.toys array. | |
virtual void | GetToysDataJsonObject (TSharedPtr< class FJsonObject > jsonObject, TSharedPtr< class FJsonObject > &outToysJsonObject) |
Retrieve a json object holding an array of toys. The json structure is different between the API's, so allow child classes to override this. More... | |
virtual bool | SendCommand (const FString ¶meters, FOnLovenseResponse callback=FOnLovenseResponse()) |
Send a HTTP request to the respective Lovense App. More... | |
virtual void | OnToyTestTimerFinished () |
Test timer finished event. Will set vibration speed of the relevant toy to 0 and remove the relevant timer handle from the toyTestTimerHandles array. | |
![]() | |
static TSharedPtr< class ILovenseAdapter > | CreateLovenseAdapter (const FLovenseAdapterDescription &adapterDescription) |
Factory function for lovense adapters. Checks the adapterDescription.platform and adapterDescription.appType strings to determine which adapter should be created. | |
![]() | |
TSharedPtr< class LovenseToyEventsWebSocketHandler > | lovenseToyEventsWebSocketHandler |
FLovenseAdapterDescription | adapterDescription |
The adapter description that was used to initialize this adapter. Holds (mostly) raw TryGetAdapterData() HTTP request json data for this adapter. | |
FString | deviceIp |
Device IP string (excluding port) the Lovense App instance is running on. Parsed in Initialize(). | |
FString | webProtocol |
The web protocol to use. Default is HTTPS, but will be set to HTTP if li.Request.UseDirectIP is true as the SSL certificate does not work with direct IPs and we can't ignore SSL host verification without modifying the engine. | |
FLovenseGetToysResponseData | responseData |
Holds (mostly) raw GetToys() HTTP request json data. | |
TArray< TStrongObjectPtr< class ULovenseToy > > | toyStrongPointers |
Array of the Lovense toy object instances. Is strong object pointer so these UObjects aren't gc'd. | |
TArray< TPair< FString, FTimerHandle > > | toyTestTimerHandles |
Array of toy deviceId string and test timer handle. This holds the toy deviceId so we can check if a toy is running a test command and to send a command to that toy to stop vibrating when the timer finishes. | |
Adapter representing the Lovense Connect iOS app.