diff --git a/src/servers/keystore/Keyring.cpp b/src/servers/keystore/Keyring.cpp index f6f5f2e18c..ed227ab647 100644 --- a/src/servers/keystore/Keyring.cpp +++ b/src/servers/keystore/Keyring.cpp @@ -103,6 +103,30 @@ Keyring::KeyMessage() const } +status_t +Keyring::GetNextApplication(uint32& cookie, BString& signature, + BString& path) +{ + char* nameFound = NULL; + status_t result = fApplications.GetInfo(B_MESSAGE_TYPE, cookie++, + &nameFound, NULL); + if (result != B_OK) + return B_ENTRY_NOT_FOUND; + + BMessage appMessage; + result = fApplications.FindMessage(nameFound, &appMessage); + if (result != B_OK) + return B_ENTRY_NOT_FOUND; + + result = appMessage.FindString("path", &path); + if (result != B_OK) + return B_ERROR; + + signature = nameFound; + return B_OK; +} + + status_t Keyring::FindApplication(const char* signature, const char* path, BMessage& appMessage) diff --git a/src/servers/keystore/Keyring.h b/src/servers/keystore/Keyring.h index 0c75263aa2..b5381f29f5 100644 --- a/src/servers/keystore/Keyring.h +++ b/src/servers/keystore/Keyring.h @@ -25,6 +25,8 @@ public: bool IsAccessible() const; const BMessage& KeyMessage() const; + status_t GetNextApplication(uint32& cookie, + BString& signature, BString& path); status_t FindApplication(const char* signature, const char* path, BMessage& appMessage); status_t AddApplication(const char* signature,