DtvKit_ATSC3.0
Loading...
Searching...
No Matches
atsc_core_config_api.h
Go to the documentation of this file.
1/*******************************************************************************
2 * Copyright © 2014 The DTVKit Open Software Foundation Ltd (www.dtvkit.org)
3 *
4 * This file is part of a DTVKit Software Component
5 * You are permitted to copy, modify or distribute this file subject to the terms
6 * of the DTVKit 1.0 Licence which can be found in licence.txt or at www.dtvkit.org
7 *
8 * THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
9 * EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES
10 * OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
11 *
12 * If you or your organisation is not a member of DTVKit then you have access
13 * to this source code outside of the terms of the licence agreement
14 * and you are expected to delete this and any associated files immediately.
15 * Further information on DTVKit, membership and terms can be found at www.dtvkit.org
16 *******************************************************************************/
17
18#ifndef ATSC_CORE_CONFIG_API_H_
19#define ATSC_CORE_CONFIG_API_H_
20
21#pragma once
22#include <stdio.h>
23#include <unistd.h>
24#include <string.h>
25#include <vector>
26#include <string>
27#include <map>
28#include <tuple>
29#include <sys/statvfs.h>
30
31#include "atsc_types.h"
32#include "atsc_core_utils_json.h"
33#include "atsc_core_utils_network.h"
34
42#define NRT_MINIMAL_MB_SPACE 200
43
47typedef struct{
48 int32_t iAppMode;
49 int32_t sKeys[ATSCCORE_FRONTEND_MAX];
50 int32_t sDemod[ATSCCORE_FRONTEND_MAX];
51 int32_t sFreq[ATSCCORE_FRONTEND_MAX];
52 int32_t sPlpId[ATSCCORE_FRONTEND_MAX];
53 int32_t sRegionId[ATSCCORE_FRONTEND_MAX];
55
60public:
61
69
77
85
92int32_t Save(sAppSettings_t sEnv);
93
100int32_t Load(sAppSettings_t* pSettings);
101
108uint64_t ExternalStorageSpace(void);
109
116uint64_t InternalStorageSpace(void);
117
124bool IsWriteSpace(uint32_t write_size);
125
132std::string GetESGPath(void);
133
140std::string GetFileStoragePath(void);
141
148uint64_t GetMountFsAvailableSize(char *szPath);
149
157
164int32_t EraseOldFiles(const char *pFolder, int32_t iOldSec);
165
166};
167
168#endif /* ATSC_CORE_CONFIG_API_H_ */
169
Definition atsc_core_config_api.h:59
uint64_t InternalStorageSpace(void)
internal storage location
uint64_t ExternalStorageSpace(void)
external storage location
int32_t LoadAPPMode(sAppSettings_t *pEnv)
load application mode
int32_t SaveAPPMode(sAppSettings_t sEnv)
To save Application mode.
bool IsWriteSpace(uint32_t write_size)
location to write space
std::string GetFileStoragePath(void)
read files location
~CCoreConfig()
Destructor for CCoreConfig.
int32_t EraseOldFiles(const char *pFolder, int32_t iOldSec)
To save Application mode.
uint64_t GetMountFsAvailableSize(char *szPath)
read available mount space
CCoreConfig()
Constructor of CCoreConfig.
int32_t Load(sAppSettings_t *pSettings)
To load application settings.
std::string GetESGPath(void)
read esg location
int32_t Save(sAppSettings_t sEnv)
Application settings.
Definition atsc_core_config_api.h:47
int32_t iAppMode
Definition atsc_core_config_api.h:48