-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdcm_parseconf.h
More file actions
77 lines (65 loc) · 2.59 KB
/
dcm_parseconf.h
File metadata and controls
77 lines (65 loc) · 2.59 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
/*
* If not stated otherwise in this file or this component's LICENSE
* file the following copyright and licenses apply:
* Copyright 2024 Comcast Cable Communications Management, LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* SPDX-License-Identifier: Apache-2.0
*/
#ifndef _DCM_PARSECONF_H_
#define _DCM_PARSECONF_H_
#ifdef __cplusplus
extern "C"
{
#endif
#define DCM_JSON_STRSIZE 2048
#define DCM_JSONITEM_BOOL 0
#define DCM_JSONITEM_INT 1
#define DCM_JSONITEM_STR 2
#define DCM_JSONITEM_NULL 3
#define DCM_T2_JSONSTR "urn:settings:TelemetryProfile"
#define DCM_LOGUPLOAD_PROTOCOL "urn:settings:LogUploadSettings:UploadRepository:uploadProtocol"
#define DCM_LOGUPLOAD_URL "urn:settings:LogUploadSettings:UploadRepository:URL"
#define DCM_LOGUPLOAD_REBOOT "urn:settings:LogUploadSettings:UploadOnReboot"
#define DCM_LOGUPLOAD_CRON "urn:settings:LogUploadSettings:UploadSchedule:cron"
#define DCM_DIFD_CRON "urn:settings:CheckSchedule:cron"
#define DCM_TIMEZONE "urn:settings:TimeZoneMode"
#define DCM_MAINT_CONF_PATH "/opt/rdk_maintenance.conf"
#ifndef DCM_DEF_LOG_URL // please update with the Default URL
#define DCM_DEF_LOG_URL "https://falbackurl"
#endif
#define DCM_DEF_TIMEZONE "Local Time"
typedef struct _dcmSettingsHandle
{
INT8 cJsonStr[DCM_JSON_STRSIZE];
INT8 cUploadURL[MAX_URL_SIZE];
INT8 cUploadPrtl[8];
INT8 cTimeZone[16];
INT8 cRdkPath[MAX_DEVICE_PROP_BUFF_SIZE];
INT8 ctBuff[EXECMD_BUFF_SIZE];
INT32 bRebootFlag;
} DCMSettingsHandle;
INT32 dcmSettingsInit(VOID **ppdcmSetHandle);
VOID dcmSettingsUnInit(VOID *pdcmSetHandle);
INT32 dcmSettingParseConf(VOID *pdcmSetHandle, INT8 *pConffile,
INT8 *pLogCron, INT8 *pDifdCron);
INT8* dcmSettingsGetUploadProtocol(VOID *pdcmSetHandle);
INT8* dcmSettingsGetUploadURL(VOID *pdcmSetHandle);
INT8* dcmSettingsGetRDKPath(VOID *pdcmSetHandle);
INT32 dcmSettingsGetMMFlag();
INT32 dcmSettingDefaultBoot();
#ifdef __cplusplus
}
#endif
#endif //_DCM_PARSECONF_H_