Skip to content

Commit

Permalink
release 0.1.1 (#20)
Browse files Browse the repository at this point in the history
  • Loading branch information
Xavrax authored Sep 5, 2024
1 parent a718033 commit f2ea4c1
Show file tree
Hide file tree
Showing 19 changed files with 174 additions and 116 deletions.
54 changes: 31 additions & 23 deletions PubnubLibrary.uplugin
Original file line number Diff line number Diff line change
@@ -1,24 +1,32 @@
{
"FileVersion": 3,
"Version": 1,
"VersionName": "0.1.0",
"FriendlyName": "PubnubLibrary",
"Description": "",
"Category": "Other",
"CreatedBy": "",
"CreatedByURL": "",
"DocsURL": "",
"MarketplaceURL": "",
"SupportURL": "",
"CanContainContent": true,
"IsBetaVersion": false,
"IsExperimentalVersion": false,
"Installed": false,
"Modules": [
{
"Name": "PubnubLibrary",
"Type": "Runtime",
"LoadingPhase": "Default"
}
]
}
"FileVersion": 3,
"Version": 2,
"VersionName": "0.1.1",
"FriendlyName": "Pubnub Unreal SDK",
"Description": "Quickly add interactive features to your game that scale without building your backend infrastructure.",
"Category": "Code",
"CreatedBy": "PubNub Inc.",
"CreatedByURL": "https://www.pubnub.com/",
"DocsURL": "https://www.pubnub.com/docs/sdks/unreal",
"MarketplaceURL": "com.epicgames.launcher://ue/marketplace/product/f19f329bb0f54385a0af714cfdf27bfc",
"SupportURL": "",
"CanContainContent": true,
"IsBetaVersion": false,
"IsExperimentalVersion": false,
"Installed": false,
"SupportedTargetPlatforms": [
"Win64",
"Mac"
],
"Modules": [
{
"Name": "PubnubLibrary",
"Type": "Runtime",
"LoadingPhase": "Default",
"PlatformAllowList": [
"Win64",
"Mac"
]
}
]
}
5 changes: 1 addition & 4 deletions Source/PubnubLibrary/Private/Config/PubnubSettings.cpp
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
// Fill out your copyright notice in the Description page of Project Settings.


#include "Config/PubnubSettings.h"

UPubnubSettings::UPubnubSettings()
{
CategoryName = "Plugins";
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
// Fill out your copyright notice in the Description page of Project Settings.


#include "FunctionLibraries/PubnubUtilities.h"

FString UPubnubUtilities::JsonObjectToString(TSharedPtr<FJsonObject> JsonObject)
Expand Down
4 changes: 1 addition & 3 deletions Source/PubnubLibrary/Private/PubnubLibrary.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// Copyright Epic Games, Inc. All Rights Reserved.

#include "PubnubLibrary.h"
#include "Core.h"
#include "Interfaces/IPluginManager.h"
Expand Down Expand Up @@ -33,4 +31,4 @@ void FPubnubLibraryModule::ShutdownModule()

#undef LOCTEXT_NAMESPACE

IMPLEMENT_MODULE(FPubnubLibraryModule, PubnubLibrary)
IMPLEMENT_MODULE(FPubnubLibraryModule, PubnubLibrary)
2 changes: 0 additions & 2 deletions Source/PubnubLibrary/Private/PubnubSubsystem.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// Copyright Epic Games, Inc. All Rights Reserved.

#include "PubnubSubsystem.h"

#include "Config/PubnubSettings.h"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
// Fill out your copyright notice in the Description page of Project Settings.


#include "Threads/PubnubFunctionThread.h"


Expand Down Expand Up @@ -55,4 +52,4 @@ void FPubnubFunctionThread::AddFunctionToQueue(TFunction<void()> InFunction)
Mutex.Lock();
PubnubAsyncFunctionsBuffer.Add(InFunction);
Mutex.Unlock();
}
}
3 changes: 0 additions & 3 deletions Source/PubnubLibrary/Private/Threads/PubnubLoopingThread.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
// Fill out your copyright notice in the Description page of Project Settings.


#include "Threads/PubnubLoopingThread.h"


Expand Down
4 changes: 1 addition & 3 deletions Source/PubnubLibrary/Public/Config/PubnubSettings.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// Fill out your copyright notice in the Description page of Project Settings.

#pragma once

#include "Engine/DeveloperSettings.h"
Expand Down Expand Up @@ -27,4 +25,4 @@ class PUBNUBLIBRARY_API UPubnubSettings : public UDeveloperSettings
//Should Secret Key be used automatically (secret key gives host permissions to the user). If set to false, SetSecretKey needs to be called manually to give host permissions.
UPROPERTY(Config, EditAnywhere, Category = "Init")
bool SetSecretKeyAutomatically = false;
};
};
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// Fill out your copyright notice in the Description page of Project Settings.

#pragma once

#include "CoreMinimal.h"
Expand Down
2 changes: 0 additions & 2 deletions Source/PubnubLibrary/Public/PubnubLibrary.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// Copyright Epic Games, Inc. All Rights Reserved.

#pragma once

#include "CoreMinimal.h"
Expand Down
106 changes: 53 additions & 53 deletions Source/PubnubLibrary/Public/PubnubStructLibrary.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,16 @@ struct FPubnubPublishSettings
GENERATED_BODY()

//If true, the message is stored in history. If false, the message is not stored in history.
UPROPERTY(BlueprintReadWrite, VisibleAnywhere) bool StoreInHistory = true;
UPROPERTY(BlueprintReadWrite, VisibleAnywhere, Category = "Pubnub") bool StoreInHistory = true;
//TODO: CipherKey is deprecated, decide what to do (hide variable or mark is as deprecated)
UPROPERTY(BlueprintReadWrite, VisibleAnywhere) FString CipherKey = "";
UPROPERTY(BlueprintReadWrite, VisibleAnywhere, Category = "Pubnub") FString CipherKey = "";
//If true, the message is replicated, thus will be received by all subscribers. If false, the message is not replicated
//and will be delivered only to Function event handlers. Setting false here and false on store is referred to as a Fire (instead of a publish).
UPROPERTY(BlueprintReadWrite, VisibleAnywhere) bool Replicate = true;
UPROPERTY(BlueprintReadWrite, VisibleAnywhere, Category = "Pubnub") bool Replicate = true;
//An optional JSON object, used to send additional (meta) data about the message, which can be used for stream filtering.
UPROPERTY(BlueprintReadWrite, VisibleAnywhere) FString MetaData = "";
UPROPERTY(BlueprintReadWrite, VisibleAnywhere, Category = "Pubnub") FString MetaData = "";
//Defines the method by which publish transaction will be performed. Can be HTTP GET or POST. If using POST, content can be GZIP compressed.
UPROPERTY(BlueprintReadWrite, VisibleAnywhere) EPubnubPublishMethod PublishMethod = EPubnubPublishMethod::pubnubSendViaGET;
UPROPERTY(BlueprintReadWrite, VisibleAnywhere, Category = "Pubnub") EPubnubPublishMethod PublishMethod = EPubnubPublishMethod::pubnubSendViaGET;
};

USTRUCT(BlueprintType)
Expand All @@ -29,11 +29,11 @@ struct FPubnubListUsersFromChannelSettings
GENERATED_BODY()

//Comma-delimited list of channel group names. If NULL, will not be used.
UPROPERTY(BlueprintReadWrite, VisibleAnywhere) FString ChannelGroup = "";
UPROPERTY(BlueprintReadWrite, VisibleAnywhere, Category = "Pubnub") FString ChannelGroup = "";
//If true will not give uuids associated with occupancy.
UPROPERTY(BlueprintReadWrite, VisibleAnywhere) bool DisableUUID = true;
UPROPERTY(BlueprintReadWrite, VisibleAnywhere, Category = "Pubnub") bool DisableUUID = true;
//If true (and if disable_uuds is false), will give associated state alongside uuid info.
UPROPERTY(BlueprintReadWrite, VisibleAnywhere) bool State = false;
UPROPERTY(BlueprintReadWrite, VisibleAnywhere, Category = "Pubnub") bool State = false;
};

USTRUCT(BlueprintType)
Expand All @@ -42,11 +42,11 @@ struct FPubnubSetStateSettings
GENERATED_BODY()

//The string with the channel name (or comma-delimited list of channel group names) to set state for.
UPROPERTY(BlueprintReadWrite, VisibleAnywhere) FString ChannelGroup = "";
UPROPERTY(BlueprintReadWrite, VisibleAnywhere, Category = "Pubnub") FString ChannelGroup = "";
//The user_id of the user for which to set state for. If NULL, the current user_id of the p context will be used.
UPROPERTY(BlueprintReadWrite, VisibleAnywhere) FString UserID = "";
UPROPERTY(BlueprintReadWrite, VisibleAnywhere, Category = "Pubnub") FString UserID = "";
//If set to true, you can set the state and make a heartbeat call at the same time via the /heartbeat endpoint.
UPROPERTY(BlueprintReadWrite, VisibleAnywhere) bool HeartBeat = false;
UPROPERTY(BlueprintReadWrite, VisibleAnywhere, Category = "Pubnub") bool HeartBeat = false;
};

USTRUCT(BlueprintType)
Expand All @@ -55,23 +55,23 @@ struct FPubnubHistorySettings
GENERATED_BODY()

//If false, the returned start and end Timetoken values will be returned as long ints. If true, the start and end Timetoken values will be returned as strings. Default is false.
UPROPERTY(BlueprintReadWrite, VisibleAnywhere) bool StringToken = false;
UPROPERTY(BlueprintReadWrite, VisibleAnywhere, Category = "Pubnub") bool StringToken = false;
//The maximum number of messages to return per response. Has to be between 1 and 100 messages. Default is 100.
UPROPERTY(BlueprintReadWrite, VisibleAnywhere) int Count = 100;
UPROPERTY(BlueprintReadWrite, VisibleAnywhere, Category = "Pubnub") int Count = 100;
//Direction of time traversal. Default is false, which means timeline is traversed newest to oldest.
UPROPERTY(BlueprintReadWrite, VisibleAnywhere) bool Reverse = false;
UPROPERTY(BlueprintReadWrite, VisibleAnywhere, Category = "Pubnub") bool Reverse = false;
//If provided (not NULL), lets you select a "start date," in Timetoken format. If not provided, it will default to current time.
//Page through results by providing a start OR end timetoken. Retrieve a slice of the time line by providing both a start AND end timetoken.
//Start is exclusive – that is, the first item returned will be the one immediately after the start Timetoken value. Default is NULL.
UPROPERTY(BlueprintReadWrite, VisibleAnywhere) FString Start = "";
UPROPERTY(BlueprintReadWrite, VisibleAnywhere, Category = "Pubnub") FString Start = "";
//If provided (not NULL), lets you select an "end date," in Timetoken format. If not provided, it will provide up to the number of messages defined in the "count" parameter.
//Page through results by providing a start OR end timetoken. Retrieve a slice of the time line by providing both a start AND end timetoken.
//End is exclusive – that is, if a message is associated exactly with the end Timetoken, it will be included in the result. Default is NULL.
UPROPERTY(BlueprintReadWrite, VisibleAnywhere) FString End = "";
UPROPERTY(BlueprintReadWrite, VisibleAnywhere, Category = "Pubnub") FString End = "";
//Pass true to receive a timetoken with each history message. Defaults to false.
UPROPERTY(BlueprintReadWrite, VisibleAnywhere) bool IncludeToken = false;
UPROPERTY(BlueprintReadWrite, VisibleAnywhere, Category = "Pubnub") bool IncludeToken = false;
//Pass true to receive a meta with each history message. Defaults to false.
UPROPERTY(BlueprintReadWrite, VisibleAnywhere) bool IncludeMeta = false;
UPROPERTY(BlueprintReadWrite, VisibleAnywhere, Category = "Pubnub") bool IncludeMeta = false;
};

USTRUCT(BlueprintType)
Expand All @@ -83,10 +83,10 @@ struct FPubnubFetchHistorySettings
* Has to be between 1 and 25 messages. Default is 25.
* If single channel is provided, maximum 100 messages. Default is 100.
*/
UPROPERTY(BlueprintReadWrite, VisibleAnywhere) int MaxPerChannel = 0;
UPROPERTY(BlueprintReadWrite, VisibleAnywhere, Category = "Pubnub") int MaxPerChannel = 0;
/** Direction of time traversal. Default is false, which means
* timeline is traversed newest to oldest. */
UPROPERTY(BlueprintReadWrite, VisibleAnywhere) bool Reverse = false;
UPROPERTY(BlueprintReadWrite, VisibleAnywhere, Category = "Pubnub") bool Reverse = false;
/** If provided (not NULL), lets you select a "start date", in
* Timetoken format. If not provided, it will default to current
* time. Page through results by providing a start OR end time
Expand All @@ -95,7 +95,7 @@ struct FPubnubFetchHistorySettings
* first item returned will be the one immediately after the start
* Timetoken value. Default is NULL.
*/
UPROPERTY(BlueprintReadWrite, VisibleAnywhere) FString Start = "";
UPROPERTY(BlueprintReadWrite, VisibleAnywhere, Category = "Pubnub") FString Start = "";
/** If provided (not NULL), lets you select an "end date", in
* Timetoken format. If not provided, it will provide up to the
* number of messages defined in the "count" parameter. Page
Expand All @@ -105,79 +105,79 @@ struct FPubnubFetchHistorySettings
* message is associated exactly with the end Timetoken, it will
* be included in the result. Default is NULL.
*/
UPROPERTY(BlueprintReadWrite, VisibleAnywhere) FString End = "";
UPROPERTY(BlueprintReadWrite, VisibleAnywhere, Category = "Pubnub") FString End = "";
/** If true to recieve metadata with each history
* message if any. If false, no metadata per message. Defaults to
* false.
*/
UPROPERTY(BlueprintReadWrite, VisibleAnywhere) bool IncludeMeta = false;
UPROPERTY(BlueprintReadWrite, VisibleAnywhere, Category = "Pubnub") bool IncludeMeta = false;
/** If true to recieve message type with each history
* message. If false, no message type per message. Defaults to
* false.
*/
UPROPERTY(BlueprintReadWrite, VisibleAnywhere) bool IncludeMessageType = false;
UPROPERTY(BlueprintReadWrite, VisibleAnywhere, Category = "Pubnub") bool IncludeMessageType = false;
/** If true to receive user_id with each history
* message. If false, no user_id per message. Defaults to
* false.
*/
UPROPERTY(BlueprintReadWrite, VisibleAnywhere) bool IncludeUserID = false;
UPROPERTY(BlueprintReadWrite, VisibleAnywhere, Category = "Pubnub") bool IncludeUserID = false;
/** If true to recieve message actions with each history
* message. If false, no message actions per message. Defaults to
* false.
*/
UPROPERTY(BlueprintReadWrite, VisibleAnywhere) bool IncludeMessageActions = false;
UPROPERTY(BlueprintReadWrite, VisibleAnywhere, Category = "Pubnub") bool IncludeMessageActions = false;
};

USTRUCT(BlueprintType)
struct FPubnubChannelPermissions
{
GENERATED_BODY()

UPROPERTY(BlueprintReadWrite, VisibleAnywhere) bool Read = false;
UPROPERTY(BlueprintReadWrite, VisibleAnywhere) bool Write = false;
UPROPERTY(BlueprintReadWrite, VisibleAnywhere) bool Delete = false;
UPROPERTY(BlueprintReadWrite, VisibleAnywhere) bool Get = false;
UPROPERTY(BlueprintReadWrite, VisibleAnywhere) bool Update = false;
UPROPERTY(BlueprintReadWrite, VisibleAnywhere) bool Manage = false;
UPROPERTY(BlueprintReadWrite, VisibleAnywhere) bool Join = false;
UPROPERTY(BlueprintReadWrite, VisibleAnywhere, Category = "Pubnub") bool Read = false;
UPROPERTY(BlueprintReadWrite, VisibleAnywhere, Category = "Pubnub") bool Write = false;
UPROPERTY(BlueprintReadWrite, VisibleAnywhere, Category = "Pubnub") bool Delete = false;
UPROPERTY(BlueprintReadWrite, VisibleAnywhere, Category = "Pubnub") bool Get = false;
UPROPERTY(BlueprintReadWrite, VisibleAnywhere, Category = "Pubnub") bool Update = false;
UPROPERTY(BlueprintReadWrite, VisibleAnywhere, Category = "Pubnub") bool Manage = false;
UPROPERTY(BlueprintReadWrite, VisibleAnywhere, Category = "Pubnub") bool Join = false;
};

USTRUCT(BlueprintType)
struct FPubnubChannelGroupPermissions
{
GENERATED_BODY()

UPROPERTY(BlueprintReadWrite, VisibleAnywhere) bool Read = false;
UPROPERTY(BlueprintReadWrite, VisibleAnywhere) bool Manage = false;
UPROPERTY(BlueprintReadWrite, VisibleAnywhere, Category = "Pubnub") bool Read = false;
UPROPERTY(BlueprintReadWrite, VisibleAnywhere, Category = "Pubnub") bool Manage = false;
};

USTRUCT(BlueprintType)
struct FPubnubUserPermissions
{
GENERATED_BODY()

UPROPERTY(BlueprintReadWrite, VisibleAnywhere) bool Delete = false;
UPROPERTY(BlueprintReadWrite, VisibleAnywhere) bool Get = false;
UPROPERTY(BlueprintReadWrite, VisibleAnywhere) bool Update = false;
UPROPERTY(BlueprintReadWrite, VisibleAnywhere, Category = "Pubnub") bool Delete = false;
UPROPERTY(BlueprintReadWrite, VisibleAnywhere, Category = "Pubnub") bool Get = false;
UPROPERTY(BlueprintReadWrite, VisibleAnywhere, Category = "Pubnub") bool Update = false;
};

USTRUCT(BlueprintType)
struct FPubnubGrantTokenStructure
{
GENERATED_BODY()

UPROPERTY(BlueprintReadWrite, VisibleAnywhere) int TTLMinutes;
UPROPERTY(BlueprintReadWrite, VisibleAnywhere) FString AuthorizedUUID;
UPROPERTY(BlueprintReadWrite, VisibleAnywhere) TArray<FString> Channels;
UPROPERTY(BlueprintReadWrite, VisibleAnywhere) TArray<FPubnubChannelPermissions> ChannelPermissions;
UPROPERTY(BlueprintReadWrite, VisibleAnywhere) TArray<FString> ChannelGroups;
UPROPERTY(BlueprintReadWrite, VisibleAnywhere) TArray<FPubnubChannelGroupPermissions> ChannelGroupPermissions;
UPROPERTY(BlueprintReadWrite, VisibleAnywhere) TArray<FString> UUIDs;
UPROPERTY(BlueprintReadWrite, VisibleAnywhere) TArray<FPubnubUserPermissions> UUIDPermissions;
UPROPERTY(BlueprintReadWrite, VisibleAnywhere) TArray<FString> ChannelPatterns;
UPROPERTY(BlueprintReadWrite, VisibleAnywhere) TArray<FPubnubChannelPermissions> ChannelPatternPermissions;
UPROPERTY(BlueprintReadWrite, VisibleAnywhere) TArray<FString> ChannelGroupPatterns;
UPROPERTY(BlueprintReadWrite, VisibleAnywhere) TArray<FPubnubChannelGroupPermissions> ChannelGroupPatternPermissions;
UPROPERTY(BlueprintReadWrite, VisibleAnywhere) TArray<FString> UUIDPatterns;
UPROPERTY(BlueprintReadWrite, VisibleAnywhere) TArray<FPubnubUserPermissions> UUIDPatternPermissions;
};
UPROPERTY(BlueprintReadWrite, VisibleAnywhere, Category = "Pubnub") int TTLMinutes;
UPROPERTY(BlueprintReadWrite, VisibleAnywhere, Category = "Pubnub") FString AuthorizedUUID;
UPROPERTY(BlueprintReadWrite, VisibleAnywhere, Category = "Pubnub") TArray<FString> Channels;
UPROPERTY(BlueprintReadWrite, VisibleAnywhere, Category = "Pubnub") TArray<FPubnubChannelPermissions> ChannelPermissions;
UPROPERTY(BlueprintReadWrite, VisibleAnywhere, Category = "Pubnub") TArray<FString> ChannelGroups;
UPROPERTY(BlueprintReadWrite, VisibleAnywhere, Category = "Pubnub") TArray<FPubnubChannelGroupPermissions> ChannelGroupPermissions;
UPROPERTY(BlueprintReadWrite, VisibleAnywhere, Category = "Pubnub") TArray<FString> UUIDs;
UPROPERTY(BlueprintReadWrite, VisibleAnywhere, Category = "Pubnub") TArray<FPubnubUserPermissions> UUIDPermissions;
UPROPERTY(BlueprintReadWrite, VisibleAnywhere, Category = "Pubnub") TArray<FString> ChannelPatterns;
UPROPERTY(BlueprintReadWrite, VisibleAnywhere, Category = "Pubnub") TArray<FPubnubChannelPermissions> ChannelPatternPermissions;
UPROPERTY(BlueprintReadWrite, VisibleAnywhere, Category = "Pubnub") TArray<FString> ChannelGroupPatterns;
UPROPERTY(BlueprintReadWrite, VisibleAnywhere, Category = "Pubnub") TArray<FPubnubChannelGroupPermissions> ChannelGroupPatternPermissions;
UPROPERTY(BlueprintReadWrite, VisibleAnywhere, Category = "Pubnub") TArray<FString> UUIDPatterns;
UPROPERTY(BlueprintReadWrite, VisibleAnywhere, Category = "Pubnub") TArray<FPubnubUserPermissions> UUIDPatternPermissions;
};
2 changes: 0 additions & 2 deletions Source/PubnubLibrary/Public/PubnubSubsystem.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// Copyright Epic Games, Inc. All Rights Reserved.

#pragma once

#include "CoreMinimal.h"
Expand Down
2 changes: 0 additions & 2 deletions Source/PubnubLibrary/Public/Threads/PubnubFunctionThread.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// Fill out your copyright notice in the Description page of Project Settings.

#pragma once

#include "CoreMinimal.h"
Expand Down
2 changes: 0 additions & 2 deletions Source/PubnubLibrary/Public/Threads/PubnubLoopingThread.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// Fill out your copyright notice in the Description page of Project Settings.

#pragma once

#include "CoreMinimal.h"
Expand Down
2 changes: 0 additions & 2 deletions Source/PubnubLibrary/PubnubLibrary.Build.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// Copyright Epic Games, Inc. All Rights Reserved.

using UnrealBuildTool;

public class PubnubLibrary : ModuleRules
Expand Down
2 changes: 0 additions & 2 deletions Source/ThirdParty/sdk/PubNubModule/Private/PubNubModule.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// Copyright Epic Games, Inc. All Rights Reserved.

#include "PubNubModule.h"
#include "Modules/ModuleManager.h"

Expand Down
2 changes: 0 additions & 2 deletions Source/ThirdParty/sdk/PubNubModule/PubNubModule.Build.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// Copyright Epic Games, Inc. All Rights Reserved.

using System;
using System.IO;
using UnrealBuildTool;
Expand Down
Loading

0 comments on commit f2ea4c1

Please sign in to comment.