Removes FileIOEventBus

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
This commit is contained in:
Esteban Papp
2021-12-02 18:08:45 -08:00
parent af19b53dde
commit 7817ed76bf
17 changed files with 19 additions and 307 deletions
@@ -1,45 +0,0 @@
/*
* Copyright (c) Contributors to the Open 3D Engine Project.
* For complete copyright and license terms please see the LICENSE at the root of this distribution.
*
* SPDX-License-Identifier: Apache-2.0 OR MIT
*
*/
#ifndef AZCORE_SYSTEM_FILE_BUS_H
#define AZCORE_SYSTEM_FILE_BUS_H
#include <AzCore/IO/SystemFile.h>
#include <AzCore/EBus/EBus.h>
#include <AzCore/std/parallel/mutex.h>
namespace AZ
{
namespace IO
{
/**
* Interface for handling file io events. All events are syncronized
*/
class FileIOEvents
: public AZ::EBusTraits
{
public:
virtual ~FileIOEvents() {}
//////////////////////////////////////////////////////////////////////////
// EBusTraits overrides
//TODO rbbaklov or zolniery look into why a recursive lock was not needed previously
typedef AZStd::recursive_mutex MutexType; //< make sure all file events are thread safe as they will called from many threads
//////////////////////////////////////////////////////////////////////////
/**
* You will either have a file (SystemFile) pointer or fileName pointer to the file name.
* \param fileName is provided when there is NO SystemFile object (when you call static functions).
*/
virtual void OnError(const SystemFile* file, const char* fileName, int errorCode) = 0;
};
typedef AZ::EBus<FileIOEvents> FileIOEventBus;
}
}
#endif // AZCORE_SYSTEM_FILE_BUS_H
#pragma once
@@ -8,7 +8,6 @@
#include <AzCore/IO/SystemFile.h>
#include <AzCore/IO/FileIO.h>
#include <AzCore/IO/FileIOEventBus.h>
#include <AzCore/PlatformIncl.h>
#include <AzCore/std/functional.h>
@@ -101,7 +100,6 @@ bool SystemFile::Open(const char* fileName, int mode, int platformFlags)
{
if (strlen(fileName) > m_fileName.max_size())
{
EBUS_EVENT(FileIOEventBus, OnError, this, nullptr, 0);
return false;
}
@@ -151,7 +151,6 @@ set(FILES
IO/CompressorZStd.h
IO/FileIO.cpp
IO/FileIO.h
IO/FileIOEventBus.h
IO/FileReader.cpp
IO/FileReader.h
IO/IOUtils.h