/* * Copyright (c) 2014 Amlogic, Inc. All rights reserved. * * This source code is subject to the terms and conditions defined in the * file 'LICENSE' which is part of this source code package. * * Description: header file */ #ifndef __SSM_HANDLER_H__ #define __SSM_HANDLER_H__ #include #include #include #include #include #include #include #include #include #include "SSMHeader.h" #include #include #include "CPQLog.h" class SSMHandler { public: static SSMHandler* GetSingletonInstance(const char *SSMHandlerPath); virtual ~SSMHandler(); SSM_status_t SSMVerify(void); bool SSMRecreateHeader(void); unsigned int SSMGetActualAddr(int id); unsigned int SSMGetActualSize(int id); int SSMSaveCurrentHeader(current_ssmheader_section2_t *header_cur); bool CheckHandler(void); private: int mFd; static SSMHandler *mSSMHandler; SSMHeader_section1_t mSSMHeader_section1; const char *mSSMHandlerPath; bool Construct(); explicit SSMHandler(); SSM_status_t SSMSection1Verify(); SSM_status_t SSMSection2Verify(SSM_status_t); SSMHandler& operator = (const SSMHandler&); }; #endif