Skip to content

Commit

Permalink
few fixes before release
Browse files Browse the repository at this point in the history
  • Loading branch information
Xavrax committed Sep 5, 2024
1 parent 537d181 commit 243a2fa
Show file tree
Hide file tree
Showing 2 changed files with 85 additions and 76 deletions.
55 changes: 32 additions & 23 deletions PubnubLibrary.uplugin
Original file line number Diff line number Diff line change
@@ -1,24 +1,33 @@
{
"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": 1,
"VersionName": "0.1.0",
"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": "",
"EngineVersion": "5.4.0",
"CanContainContent": true,
"IsBetaVersion": false,
"IsExperimentalVersion": false,
"Installed": false,
"SupportedTargetPlatforms": [
"Win64",
"Mac"
],
"Modules": [
{
"Name": "PubnubLibrary",
"Type": "Runtime",
"LoadingPhase": "Default",
"PlatformAllowList": [
"Win64",
"Mac"
]
}
]
}
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;
};

0 comments on commit 243a2fa

Please sign in to comment.