Add application iteration method.
This commit is contained in:
committed by
Ryan Leavengood
parent
cfa8131526
commit
0778e1477d
@@ -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
|
status_t
|
||||||
Keyring::FindApplication(const char* signature, const char* path,
|
Keyring::FindApplication(const char* signature, const char* path,
|
||||||
BMessage& appMessage)
|
BMessage& appMessage)
|
||||||
|
|||||||
@@ -25,6 +25,8 @@ public:
|
|||||||
bool IsAccessible() const;
|
bool IsAccessible() const;
|
||||||
const BMessage& KeyMessage() const;
|
const BMessage& KeyMessage() const;
|
||||||
|
|
||||||
|
status_t GetNextApplication(uint32& cookie,
|
||||||
|
BString& signature, BString& path);
|
||||||
status_t FindApplication(const char* signature,
|
status_t FindApplication(const char* signature,
|
||||||
const char* path, BMessage& appMessage);
|
const char* path, BMessage& appMessage);
|
||||||
status_t AddApplication(const char* signature,
|
status_t AddApplication(const char* signature,
|
||||||
|
|||||||
Reference in New Issue
Block a user