mirror of
https://github.com/HenkKalkwater/harbour-sailfin.git
synced 2025-09-05 10:12:46 +00:00
Replace not-fully-initializing DTO constructors
There were some constructors in the DTOs which allowed construction of DTO which weren't fully initialized. These constructors have been made private, as they are still used in the 'fromJson' methods. Additionally, a constructor with all required parameters to fully initialize the class has been added. Additionally, the Loader class has been modified, since it no longer can assume it is able to default construct the parameter type. The parameter is now stored as an optional. Closes #15
This commit is contained in:
parent
1e795ae8b6
commit
90db983c30
358 changed files with 3785 additions and 322 deletions
|
@ -52,7 +52,36 @@ namespace DTO {
|
|||
|
||||
class UserPolicy {
|
||||
public:
|
||||
UserPolicy();
|
||||
UserPolicy(
|
||||
bool isAdministrator,
|
||||
bool isHidden,
|
||||
bool isDisabled,
|
||||
bool enableUserPreferenceAccess,
|
||||
bool enableRemoteControlOfOtherUsers,
|
||||
bool enableSharedDeviceControl,
|
||||
bool enableRemoteAccess,
|
||||
bool enableLiveTvManagement,
|
||||
bool enableLiveTvAccess,
|
||||
bool enableMediaPlayback,
|
||||
bool enableAudioPlaybackTranscoding,
|
||||
bool enableVideoPlaybackTranscoding,
|
||||
bool enablePlaybackRemuxing,
|
||||
bool forceRemoteSourceTranscoding,
|
||||
bool enableContentDeletion,
|
||||
bool enableContentDownloading,
|
||||
bool enableSyncTranscoding,
|
||||
bool enableMediaConversion,
|
||||
bool enableAllDevices,
|
||||
bool enableAllChannels,
|
||||
bool enableAllFolders,
|
||||
qint32 invalidLoginAttemptCount,
|
||||
qint32 loginAttemptsBeforeLockout,
|
||||
qint32 maxActiveSessions,
|
||||
bool enablePublicSharing,
|
||||
qint32 remoteClientBitrateLimit,
|
||||
SyncPlayUserAccessType syncPlayAccess
|
||||
);
|
||||
|
||||
UserPolicy(const UserPolicy &other);
|
||||
|
||||
/**
|
||||
|
@ -345,8 +374,13 @@ protected:
|
|||
QString m_authenticationProviderId;
|
||||
QString m_passwordResetProviderId;
|
||||
SyncPlayUserAccessType m_syncPlayAccess;
|
||||
|
||||
private:
|
||||
// Private constructor which generates an invalid object, for use withing UserPolicy::fromJson();
|
||||
UserPolicy();
|
||||
};
|
||||
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue