/*
 * Copyright (c) 2018-2020 Atmosphère-NX
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms and conditions of the GNU General Public License,
 * version 2, as published by the Free Software Foundation.
 *
 * This program is distributed in the hope it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
 * more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see .
 */
#pragma once
#include 
#include 
#include 
namespace ams::sf {
    class IServiceObject : public ISharedObject {
        public:
            virtual ~IServiceObject() { /* ... */ }
    };
    template
    concept IsServiceObject = std::derived_from;
    class IMitmServiceObject : public IServiceObject {
        public:
            virtual ~IMitmServiceObject() { /* ... */ }
    };
    class MitmServiceImplBase {
        protected:
            std::shared_ptr<::Service> forward_service;
            sm::MitmProcessInfo client_info;
        public:
            MitmServiceImplBase(std::shared_ptr<::Service> &&s, const sm::MitmProcessInfo &c) : forward_service(std::move(s)), client_info(c) { /* ... */ }
    };
    template
    concept IsMitmServiceObject = IsServiceObject && std::derived_from;
    template
    concept IsMitmServiceImpl = requires (std::shared_ptr<::Service> &&s, const sm::MitmProcessInfo &c) {
        { T(std::forward>(s), c) };
        { T::ShouldMitm(c) } -> std::same_as;
    };
}