mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
Implemented a method to receive and store a snapshot of the current image via JSON.
This commit is contained in:
@@ -285,6 +285,11 @@ private:
|
||||
///
|
||||
void handleSystemCommand(const QJsonObject &message, const JsonApiCommand& cmd);
|
||||
|
||||
/// @brief Handle an incoming JSON message for actions related to the current image
|
||||
/// @param message the incoming message
|
||||
///
|
||||
void handleGetCurrentImageCommand(const QJsonObject &message, const JsonApiCommand& cmd);
|
||||
|
||||
void applyColorAdjustments(const QJsonObject &adjustment, ColorAdjustment *colorAdjustment);
|
||||
void applyColorAdjustment(const QString &colorName, const QJsonObject &adjustment, RgbChannelAdjustment &rgbAdjustment);
|
||||
void applyGammaTransform(const QString &transformName, const QJsonObject &adjustment, RgbTransform &rgbTransform, char channel);
|
||||
@@ -403,5 +408,4 @@ private:
|
||||
|
||||
// The JsonCallbacks instance which handles data subscription/notifications
|
||||
QSharedPointer<JsonCallbacks> _jsonCB;
|
||||
|
||||
};
|
||||
|
@@ -34,7 +34,8 @@ public:
|
||||
System,
|
||||
Temperature,
|
||||
Transform,
|
||||
VideoMode
|
||||
VideoMode,
|
||||
GetCurrentImage
|
||||
};
|
||||
|
||||
static QString toString(Type type) {
|
||||
@@ -65,6 +66,7 @@ public:
|
||||
case Transform: return "transform";
|
||||
case VideoMode: return "videomode";
|
||||
case Service: return "service";
|
||||
case GetCurrentImage: return "getcurrentimage";
|
||||
default: return "unknown";
|
||||
}
|
||||
}
|
||||
@@ -322,7 +324,8 @@ public:
|
||||
{ {"system", "toggleIdle"}, { Command::System, SubCommand::ToggleIdle, Authorization::Yes, InstanceCmd::No, NoListenerCmd::Yes} },
|
||||
{ {"temperature", ""}, { Command::Temperature, SubCommand::Empty, Authorization::Yes, InstanceCmd::Yes, NoListenerCmd::Yes} },
|
||||
{ {"transform", ""}, { Command::Transform, SubCommand::Empty, Authorization::Yes, InstanceCmd::Yes, NoListenerCmd::Yes} },
|
||||
{ {"videomode", ""}, { Command::VideoMode, SubCommand::Empty, Authorization::Yes, InstanceCmd::No, NoListenerCmd::Yes} }
|
||||
{ {"videomode", ""}, { Command::VideoMode, SubCommand::Empty, Authorization::Yes, InstanceCmd::No, NoListenerCmd::Yes} },
|
||||
{ {"getcurrentimage", ""}, { Command::GetCurrentImage, SubCommand::Empty, Authorization::Yes, InstanceCmd::No, NoListenerCmd::Yes} }
|
||||
};
|
||||
return commandLookup;
|
||||
}
|
||||
|
Reference in New Issue
Block a user