diff options
| author | 2019-03-11 19:37:35 -0400 | |
|---|---|---|
| committer | 2019-04-17 11:35:24 -0400 | |
| commit | 80c9e4d3ab7e7b7a4eeda8c3467039d8ca48ff62 (patch) | |
| tree | fb06dc0ba1578ad055da9aeaed4ce4941363053d /src | |
| parent | frontend: Add frontend receiver for Error applet (diff) | |
| download | yuzu-80c9e4d3ab7e7b7a4eeda8c3467039d8ca48ff62.tar.gz yuzu-80c9e4d3ab7e7b7a4eeda8c3467039d8ca48ff62.tar.xz yuzu-80c9e4d3ab7e7b7a4eeda8c3467039d8ca48ff62.zip | |
general_frontend: Add frontend scaffold for PhotoViewer applet
Diffstat (limited to 'src')
| -rw-r--r-- | src/core/frontend/applets/general_frontend.cpp | 27 | ||||
| -rw-r--r-- | src/core/frontend/applets/general_frontend.h | 28 |
2 files changed, 55 insertions, 0 deletions
diff --git a/src/core/frontend/applets/general_frontend.cpp b/src/core/frontend/applets/general_frontend.cpp new file mode 100644 index 000000000..d2762db96 --- /dev/null +++ b/src/core/frontend/applets/general_frontend.cpp | |||
| @@ -0,0 +1,27 @@ | |||
| 1 | // Copyright 2018 yuzu emulator team | ||
| 2 | // Licensed under GPLv2 or any later version | ||
| 3 | // Refer to the license.txt file included. | ||
| 4 | |||
| 5 | #include "common/logging/log.h" | ||
| 6 | #include "core/frontend/applets/general_frontend.h" | ||
| 7 | |||
| 8 | namespace Core::Frontend { | ||
| 9 | |||
| 10 | PhotoViewerApplet::~PhotoViewerApplet() = default; | ||
| 11 | |||
| 12 | DefaultPhotoViewerApplet::~DefaultPhotoViewerApplet() {} | ||
| 13 | |||
| 14 | void DefaultPhotoViewerApplet::ShowPhotosForApplication(u64 title_id, | ||
| 15 | std::function<void()> finished) const { | ||
| 16 | LOG_INFO(Service_AM, | ||
| 17 | "Application requested frontend to display stored photos for title_id={:016X}", | ||
| 18 | title_id); | ||
| 19 | finished(); | ||
| 20 | } | ||
| 21 | |||
| 22 | void DefaultPhotoViewerApplet::ShowAllPhotos(std::function<void()> finished) const { | ||
| 23 | LOG_INFO(Service_AM, "Application requested frontend to display all stored photos."); | ||
| 24 | finished(); | ||
| 25 | } | ||
| 26 | |||
| 27 | } // namespace Core::Frontend | ||
diff --git a/src/core/frontend/applets/general_frontend.h b/src/core/frontend/applets/general_frontend.h new file mode 100644 index 000000000..d4506c999 --- /dev/null +++ b/src/core/frontend/applets/general_frontend.h | |||
| @@ -0,0 +1,28 @@ | |||
| 1 | // Copyright 2019 yuzu emulator team | ||
| 2 | // Licensed under GPLv2 or any later version | ||
| 3 | // Refer to the license.txt file included. | ||
| 4 | |||
| 5 | #pragma once | ||
| 6 | |||
| 7 | #include <functional> | ||
| 8 | #include "common/common_types.h" | ||
| 9 | |||
| 10 | namespace Core::Frontend { | ||
| 11 | |||
| 12 | class PhotoViewerApplet { | ||
| 13 | public: | ||
| 14 | virtual ~PhotoViewerApplet(); | ||
| 15 | |||
| 16 | virtual void ShowPhotosForApplication(u64 title_id, std::function<void()> finished) const = 0; | ||
| 17 | virtual void ShowAllPhotos(std::function<void()> finished) const = 0; | ||
| 18 | }; | ||
| 19 | |||
| 20 | class DefaultPhotoViewerApplet final : public PhotoViewerApplet { | ||
| 21 | public: | ||
| 22 | ~DefaultPhotoViewerApplet() override; | ||
| 23 | |||
| 24 | void ShowPhotosForApplication(u64 title_id, std::function<void()> finished) const override; | ||
| 25 | void ShowAllPhotos(std::function<void()> finished) const override; | ||
| 26 | }; | ||
| 27 | |||
| 28 | } // namespace Core::Frontend | ||