Add Support for guideline api info

This commit is contained in:
Jack 2020-05-23 16:03:27 +08:00
parent b0ad7da904
commit d5406c7be0
4 changed files with 42 additions and 5 deletions

View file

@ -92,6 +92,11 @@ const std::vector<SdkApiString>& RoMetadataProcess::getPrivateApiList() const
return mPrivateApiList;
}
const std::vector<SdkApiString>& RoMetadataProcess::getGuidelineApiList() const
{
return mGuidelineApiList;
}
const fnd::List<ElfSymbolParser::sElfSymbol>& RoMetadataProcess::getSymbolList() const
{
return mSymbolList.getSymbolList();
@ -113,14 +118,26 @@ void RoMetadataProcess::importApiList()
{
SdkApiString api(api_str);
if (api.getApiType() == SdkApiString::API_SDK_VERSION)
switch (api.getApiType())
{
case SdkApiString::API_SDK_VERSION:
mSdkVerApiList.push_back(api);
else if (api.getApiType() == SdkApiString::API_MIDDLEWARE)
break;
case SdkApiString::API_MIDDLEWARE:
mPublicApiList.push_back(api);
else if (api.getApiType() == SdkApiString::API_DEBUG)
break;
case SdkApiString::API_DEBUG:
mDebugApiList.push_back(api);
else if (api.getApiType() == SdkApiString::API_PRIVATE)
break;
case SdkApiString::API_PRIVATE:
mPrivateApiList.push_back(api);
break;
case SdkApiString::API_GUIDELINE:
mGuidelineApiList.push_back(api);
break;
default:
break;
}
}
}
@ -165,6 +182,14 @@ void RoMetadataProcess::displayRoMetaData()
std::cout << " " << mPrivateApiList[i].getModuleName() << " (vender: " << mPrivateApiList[i].getVenderName() << ")" << std::endl;
}
}
if (mGuidelineApiList.size() > 0)
{
std::cout << " Guideline APIs:" << std::endl;
for (size_t i = 0; i < mGuidelineApiList.size(); i++)
{
std::cout << " " << mGuidelineApiList[i].getModuleName() << " (vender: " << mGuidelineApiList[i].getVenderName() << ")" << std::endl;
}
}
}
if (mSymbolList.getSymbolList().size() > 0 && (mListSymbols || _HAS_BIT(mCliOutputMode, OUTPUT_EXTENDED)))
{

View file

@ -32,6 +32,7 @@ public:
const std::vector<SdkApiString>& getPublicApiList() const;
const std::vector<SdkApiString>& getDebugApiList() const;
const std::vector<SdkApiString>& getPrivateApiList() const;
const std::vector<SdkApiString>& getGuidelineApiList() const;
const fnd::List<ElfSymbolParser::sElfSymbol>& getSymbolList() const;
private:
const std::string kModuleName = "RoMetadataProcess";
@ -56,6 +57,7 @@ private:
std::vector<SdkApiString> mPublicApiList;
std::vector<SdkApiString> mDebugApiList;
std::vector<SdkApiString> mPrivateApiList;
std::vector<SdkApiString> mGuidelineApiList;
ElfSymbolParser mSymbolList;

View file

@ -81,6 +81,14 @@ void SdkApiString::resolveApiString(const std::string& full_str)
{
mApiType = API_PRIVATE;
}
else if (api_type == kSdkGuidelineApiString)
{
mApiType = API_GUIDELINE;
}
else
{
// TODO?
}
mVenderName = vender;
mModuleName = module;

View file

@ -9,7 +9,8 @@ public:
API_MIDDLEWARE,
API_DEBUG,
API_PRIVATE,
API_SDK_VERSION
API_SDK_VERSION,
API_GUIDELINE,
};
SdkApiString(const std::string& full_str);
@ -32,6 +33,7 @@ private:
const std::string kSdkMiddleWareApiString = "SDK MW";
const std::string kSdkDebugApiString = "SDK Debug";
const std::string kSdkPrivateApiString = "SDK Private";
const std::string kSdkGuidelineApiString = "SDK Guideline";
const std::string kVenderNintendo = "Nintendo";
const std::string kSdkVersionString = "NintendoSdk_nnSdk-";