/*---------------------------------------------------------------------------* Project: Horizon File: XmlCreator.cpp Copyright 2009-2011 Nintendo. All rights reserved. These coded instructions, statements, and computer programs contain proprietary information of Nintendo of America Inc. and/or Nintendo Company Ltd., and are protected by Federal copyright law. They may not be disclosed to third parties or copied or duplicated in any form, in whole or in part, without the prior written consent of Nintendo. $Rev$ *---------------------------------------------------------------------------*/ #include "XmlCreator.h" #include #include namespace ConsoleRestore { namespace { const char xmlDataPrefix[] = \ "\n\ \n\ \n\ \n\ \n\ \n\ \n\ \n"; const char xmlDeviceIdPrefix[] = \ " "; const char xmlDeviceIdSuffix[] = "\n"; const char xmlSerialNoPrefix[] = \ " "; const char xmlSerialNoSuffix[] = "\n"; const char xmlDataSuffix[] = \ " \n\ \n\ \n\ "; } XmlCreator::XmlCreator() { // TODO 自動生成されたコンストラクター・スタブ } XmlCreator::~XmlCreator() { // TODO Auto-generated destructor stub } void XmlCreator::Exec(bit64 deviceId, u8* serialNo) { m_Xml.append(xmlDataPrefix); m_Xml.append(xmlDeviceIdPrefix); std::ostringstream oss; oss << std::dec; oss << deviceId; m_Xml.append(oss.str()); m_Xml.append(xmlDeviceIdSuffix); m_Xml.append(xmlSerialNoPrefix); m_Xml.append(reinterpret_cast(serialNo)); m_Xml.append(xmlSerialNoSuffix); m_Xml.append(xmlDataSuffix); } std::string XmlCreator::GetData() { return m_Xml; } } /* namespace ConsoleRestore */