mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-05-30 06:25:20 -04:00
htc: add htcfs server/service object skeletons
This commit is contained in:
parent
9fbbb9fadb
commit
870b45f208
17 changed files with 682 additions and 5 deletions
53
libraries/libstratosphere/source/htcfs/htcfs_client_impl.hpp
Normal file
53
libraries/libstratosphere/source/htcfs/htcfs_client_impl.hpp
Normal file
|
@ -0,0 +1,53 @@
|
|||
/*
|
||||
* 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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#pragma once
|
||||
#include <stratosphere.hpp>
|
||||
#include "../htclow/htclow_manager.hpp"
|
||||
#include "../htclow/htclow_channel.hpp"
|
||||
#include "htcfs_cache_manager.hpp"
|
||||
#include "htcfs_header_factory.hpp"
|
||||
|
||||
namespace ams::htcfs {
|
||||
|
||||
class ClientImpl {
|
||||
private:
|
||||
u8 m_receive_buffer[0x1C040];
|
||||
u8 m_send_buffer[0x1C040];
|
||||
u8 m_packet_buffer[0xE020];
|
||||
htclow::HtclowManager *m_htclow_manager;
|
||||
CacheManager m_cache_manager;
|
||||
HeaderFactory m_header_factory;
|
||||
os::SdkMutex m_mutex;
|
||||
htclow::Module m_module;
|
||||
htclow::Channel m_channel;
|
||||
htclow::Channel m_data_channel;
|
||||
bool m_connected;
|
||||
os::ThreadType m_monitor_thread;
|
||||
os::Event m_event;
|
||||
public:
|
||||
ClientImpl(htclow::HtclowManager *manager);
|
||||
|
||||
~ClientImpl() {
|
||||
this->Cancel();
|
||||
this->Wait();
|
||||
}
|
||||
public:
|
||||
void Start();
|
||||
void Cancel();
|
||||
void Wait();
|
||||
};
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue