summaryrefslogblamecommitdiffstats
path: root/src/core/frontend/applets/profile_select.h
blob: 92e2737ea7419110f3a8e145dc3a111b3c8830c8 (plain) (tree)
1
2
3
4
5
6
7
8
9

                                                               




                     
 
                        
                                         
                                                              
 

                          






                                                                   
                                           
       

                                                                                   

                                   

                                                                                    



                                                                     
                                

                                                                                 


                             
// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later

#pragma once

#include <functional>
#include <optional>

#include "common/uuid.h"
#include "core/frontend/applets/applet.h"
#include "core/hle/service/am/applets/applet_profile_select.h"

namespace Core::Frontend {

struct ProfileSelectParameters {
    Service::AM::Applets::UiMode mode;
    std::array<Common::UUID, 8> invalid_uid_list;
    Service::AM::Applets::UiSettingsDisplayOptions display_options;
    Service::AM::Applets::UserSelectionPurpose purpose;
};

class ProfileSelectApplet : public Applet {
public:
    using SelectProfileCallback = std::function<void(std::optional<Common::UUID>)>;

    virtual ~ProfileSelectApplet();

    virtual void SelectProfile(SelectProfileCallback callback,
                               const ProfileSelectParameters& parameters) const = 0;
};

class DefaultProfileSelectApplet final : public ProfileSelectApplet {
public:
    void Close() const override;
    void SelectProfile(SelectProfileCallback callback,
                       const ProfileSelectParameters& parameters) const override;
};

} // namespace Core::Frontend