RDK Documentation (Open Sourced RDK Components)
Components_XrdkEMMC.h
Go to the documentation of this file.
1 /*
2  * If not stated otherwise in this file or this component's Licenses.txt file the
3  * following copyright and licenses apply:
4  *
5  * Copyright 2016 RDK Management
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18 */
19 
20 /**
21  * @file Components_XrdkEMMC.h
22  * @brief eMMC diagnostic APIs.
23  */
24 
25 /**
26 * @defgroup tr69hostif
27 * @{
28 * @defgroup hostif
29 * @{
30 **/
31 
32 
33 #ifndef STBSERVICE_COMPONENTS_X_RDKCENTRAL_COM_EMMC_H_
34 #define STBSERVICE_COMPONENTS_X_RDKCENTRAL_COM_EMMC_H_
35 
36 #include "hostIf_utils.h"
37 #include "hostIf_tr69ReqHandler.h"
38 #include "hostIf_main.h"
39 
40 #include "rdkStorageMgrTypes.h"
41 
42 #define X_EMMC_OBJ "Device.Services.STBService.1.Components.X_RDKCENTRAL-COM_eMMCFlash."
43 
45 {
46 private:
47  static GHashTable *ifHash;
48  static hostIf_STBServiceXeMMC *instance;
49 
50  char emmcDeviceID[RDK_STMGR_MAX_STRING_LENGTH] = "";
51  char emmcPartitionID[RDK_STMGR_MAX_STRING_LENGTH] = "";
52 
53  hostIf_STBServiceXeMMC(char* emmcDeviceID, char* emmcPartitionID);
55 
56  int getCapacity(HOSTIF_MsgData_t *);
57  int getLifeElapsedA(HOSTIF_MsgData_t *);
58  int getLifeElapsedB(HOSTIF_MsgData_t *);
59  int getLifeElapsed(HOSTIF_MsgData_t *stMsgData, const char* life_elapsed_type);
60  int getLotID(HOSTIF_MsgData_t *);
61  int getManufacturer(HOSTIF_MsgData_t *);
62  int getModel(HOSTIF_MsgData_t *);
63  int getReadOnly(HOSTIF_MsgData_t *);
64  int getSerialNumber(HOSTIF_MsgData_t *);
65  int getTSBQualified(HOSTIF_MsgData_t *);
66  int getPreEOLStateSystem(HOSTIF_MsgData_t *);
67  int getPreEOLStateEUDA(HOSTIF_MsgData_t *);
68  int getPreEOLStateMLC(HOSTIF_MsgData_t *);
69  int getPreEOLState(HOSTIF_MsgData_t *stMsgData, const char* pre_eol_state_type);
70  int getFirmwareVersion(HOSTIF_MsgData_t *);
71  int getDeviceReport(HOSTIF_MsgData_t *);
72 
73 public:
74  static hostIf_STBServiceXeMMC *getInstance();
75  static void closeInstance(hostIf_STBServiceXeMMC *);
76 
77  int handleGetMsg(HOSTIF_MsgData_t *);
78  int handleSetMsg(HOSTIF_MsgData_t *);
79 };
80 
81 #endif /* STBSERVICE_COMPONENTS_X_RDKCENTRAL_COM_EMMC_H_ */
82 
83 
84 /** @} */
85 /** @} */
_HostIf_MsgData_t
Definition: hostIf_tr69ReqHandler.h:170
hostIf_main.h
hostIf_main API.
hostIf_STBServiceXeMMC
Definition: Components_XrdkEMMC.h:44