Improve:StorageManager include cleaner.

This commit is contained in:
Fancy code 2024-06-17 17:04:21 +08:00
parent 3b532d55c3
commit 21a97dc6f2
6 changed files with 23 additions and 3 deletions

View File

@ -12,4 +12,4 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
#include "EmmcHandle.h" // #include "EmmcHandle.h"

View File

@ -14,6 +14,9 @@
*/ */
#include "IStorageManager.h" #include "IStorageManager.h"
#include "ILog.h" #include "ILog.h"
#include "StatusCode.h"
#include <memory>
#include <string>
sd_card_info::sd_card_info() : mEvent(StorageEvent::END), mTotalSizeMB(0), mFreeSizeMB(0) sd_card_info::sd_card_info() : mEvent(StorageEvent::END), mTotalSizeMB(0), mFreeSizeMB(0)
{ {
} }

View File

@ -13,8 +13,15 @@
* limitations under the License. * limitations under the License.
*/ */
#include "SdCardHandle.h" #include "SdCardHandle.h"
#include "IHalCpp.h"
#include "ILog.h" #include "ILog.h"
#include "IStorageManager.h"
#include "LinuxApi.h" #include "LinuxApi.h"
#include "StatusCode.h"
#include "StorageBase.h"
#include <memory>
#include <stdio.h>
#include <string>
void SdCardHandle::ReportEvent(const SdCardHalStatus &status) void SdCardHandle::ReportEvent(const SdCardHalStatus &status)
{ {
LogInfo("SdCardHal: ReportEvent.\n"); LogInfo("SdCardHal: ReportEvent.\n");

View File

@ -14,11 +14,12 @@
*/ */
#include "StorageBase.h" #include "StorageBase.h"
#include "ILog.h" #include "ILog.h"
#include "IStorageManager.h"
#include <errno.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <sys/types.h>
bool StorageBase::CheckDirectory(const char *filepath) bool StorageBase::CheckDirectory(const char *filepath)
{ {
LogInfo("CheckDirectory:%s\n", filepath); LogInfo("CheckDirectory:%s\n", filepath);

View File

@ -13,7 +13,13 @@
* limitations under the License. * limitations under the License.
*/ */
#include "StorageManagerImpl.h" #include "StorageManagerImpl.h"
#include "ILog.h" // #include "ILog.h"
#include "IStorageManager.h"
#include "SdCardHandle.h"
#include "StatusCode.h"
#include "StorageBase.h"
#include <memory>
#include <string>
StatusCode StorageManagerImpl::Init(void) StatusCode StorageManagerImpl::Init(void)
{ {
SdCardHandle::SdCardInit(); SdCardHandle::SdCardInit();

View File

@ -14,7 +14,10 @@
*/ */
#include "StorageManagerMakePtr.h" #include "StorageManagerMakePtr.h"
#include "ILog.h" #include "ILog.h"
#include "IStorageManager.h"
#include "StatusCode.h"
#include "StorageManagerImpl.h" #include "StorageManagerImpl.h"
#include <memory>
bool CreateStorageManagerModule(void) bool CreateStorageManagerModule(void)
{ {
auto instance = std::make_shared<IStorageManager>(); auto instance = std::make_shared<IStorageManager>();