Add keyring specific versions of the *Application() methods.

This commit is contained in:
Michael Lotz
2013-03-05 11:04:10 -05:00
committed by Ryan Leavengood
parent 51ab46a83c
commit 64ca113fe0
2 changed files with 23 additions and 0 deletions
+5
View File
@@ -81,8 +81,13 @@ public:
status_t GetNextApplication(const BKey& key,
uint32& cookie, BString& signature) const;
status_t GetNextApplication(const char* keyring,
const BKey& key, uint32& cookie,
BString& signature) const;
status_t RemoveApplication(const BKey& key,
const char* signature);
status_t RemoveApplication(const char* keyring,
const BKey& key, const char* signature);
// Service functions
+18
View File
@@ -335,12 +335,21 @@ BKeyStore::RevokeMasterAccess()
status_t
BKeyStore::GetNextApplication(const BKey& key, uint32& cookie,
BString& signature) const
{
return GetNextApplication(NULL, key, cookie, signature);
}
status_t
BKeyStore::GetNextApplication(const char* keyring, const BKey& key,
uint32& cookie, BString& signature) const
{
BMessage keyMessage;
if (key.Flatten(keyMessage) != B_OK)
return B_BAD_VALUE;
BMessage message(KEY_STORE_GET_NEXT_APPLICATION);
message.AddString("keyring", keyring);
message.AddMessage("key", &keyMessage);
message.AddUInt32("cookie", cookie);
@@ -359,12 +368,21 @@ BKeyStore::GetNextApplication(const BKey& key, uint32& cookie,
status_t
BKeyStore::RemoveApplication(const BKey& key, const char* signature)
{
return RemoveApplication(NULL, key, signature);
}
status_t
BKeyStore::RemoveApplication(const char* keyring, const BKey& key,
const char* signature)
{
BMessage keyMessage;
if (key.Flatten(keyMessage) != B_OK)
return B_BAD_VALUE;
BMessage message(KEY_STORE_REMOVE_APPLICATION);
message.AddString("keyring", keyring);
message.AddMessage("key", &keyMessage);
message.AddString("signature", signature);