DRDE/ACTK1_0/se/LPE/LPCrtCmdExtension.hpp

121 lines
6.8 KiB
C++

#ifndef __DOMAIN_CR_COMMAND_EXTENSION_HPP
#define __DOMAIN_CR_COMMAND_EXTENSION_HPP
#include <string>
#include "common/ErrorPkg.hpp"
#include "se/Command.hpp"
#include "se/CommandExtension.hpp"
#include "se/IllegalArgException.hpp"
using namespace std;
class LPCrtCmdExtension : public CommandExtension
{
public:
LPCrtCmdExtension (const std::string *phaseName);
virtual void addToCommand(const Command &command) const;
bool hasNoticeID() {return haveNoticeID;}
void setNoticeID(string &idVal,string &notAftVal, string &acceptedVal) {
noticeID = idVal; notAfter = notAftVal; acceptedDate = acceptedVal; haveNoticeID = true;
}
void setSMD();
private:
bool haveNoticeID,haveSMD;
std::string lpePhaseName;
std::string noticeID;
std::string notAfter;
std::string acceptedDate;
};
inline LPCrtCmdExtension::LPCrtCmdExtension( const std::string *phaseName)
{
if (phaseName == NULL)
{
throw IllegalArgException(
ErrorPkg::getMessage("launch extension phase not set"));
}
lpePhaseName = std::string(*phaseName);
haveNoticeID = haveSMD = false;
}
#endif // __DOMAIN_UPDATE_COMMAND_EXTENSION_HPP
// just here for exploratory purposes
static const string smdData(
"DQo8c21kOnNpZ25lZE1hcmsgeG1sbnM6c21kPSJ1cm46aWV0ZjpwYXJhbXM6eG1sOm5zOnNpZ25l"
"ZE1hcmstMS4wIiBpZD0iX3NpZ25lZE1hcmsiPjxzbWQ6aWQ+MS0yPC9zbWQ6aWQ+DQogIDwhLS0g"
"aW5zZXJ0IHNtZDppZCAtLT4NCiAgPHNtZDppc3N1ZXJJbmZvIGlzc3VlcklEPSIyIj4NCiAgICA8"
"c21kOm9yZz5FeGFtcGxlIEluYy48L3NtZDpvcmc+DQogICAgPHNtZDplbWFpbD5zdXBwb3J0QGV4"
"YW1wbGUudGxkPC9zbWQ6ZW1haWw+DQogICAgPHNtZDp1cmw+aHR0cDovL3d3dy5leGFtcGxlLnRs"
"ZDwvc21kOnVybD4NCiAgICA8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