diff --git a/src/RoMetadataProcess.cpp b/src/RoMetadataProcess.cpp index 14bdb1c..81e9b47 100644 --- a/src/RoMetadataProcess.cpp +++ b/src/RoMetadataProcess.cpp @@ -92,6 +92,11 @@ const std::vector& RoMetadataProcess::getPrivateApiList() const return mPrivateApiList; } +const std::vector& RoMetadataProcess::getGuidelineApiList() const +{ + return mGuidelineApiList; +} + const fnd::List& 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))) { diff --git a/src/RoMetadataProcess.h b/src/RoMetadataProcess.h index d94030a..df854c1 100644 --- a/src/RoMetadataProcess.h +++ b/src/RoMetadataProcess.h @@ -32,6 +32,7 @@ public: const std::vector& getPublicApiList() const; const std::vector& getDebugApiList() const; const std::vector& getPrivateApiList() const; + const std::vector& getGuidelineApiList() const; const fnd::List& getSymbolList() const; private: const std::string kModuleName = "RoMetadataProcess"; @@ -56,6 +57,7 @@ private: std::vector mPublicApiList; std::vector mDebugApiList; std::vector mPrivateApiList; + std::vector mGuidelineApiList; ElfSymbolParser mSymbolList; diff --git a/src/SdkApiString.cpp b/src/SdkApiString.cpp index 2268fd6..1f3c9e6 100644 --- a/src/SdkApiString.cpp +++ b/src/SdkApiString.cpp @@ -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; diff --git a/src/SdkApiString.h b/src/SdkApiString.h index 5c794df..c1a8ffa 100644 --- a/src/SdkApiString.h +++ b/src/SdkApiString.h @@ -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-";