Hi Andrew,
welcome to this list! :-)
I'll just point out a few minor style issues:
ebb1a01c4893: HaikuDepot: Handling for communications with application server
over multiple repositories
@@ -464,11 +465,18 @@ Model::AddDepot(const DepotInfo& depot)
bool
Model::HasDepot(const BString& name) const
{
+ return NULL != DepotForName(name);
@@ -827,6 +835,59 @@ Model::SetAuthorization(const BString& username, const
BString& password,
void
+Model::PopulateWebAppRepositoryCode(DepotInfo& depotInfo)
+{
+ if (depotInfo.BaseURL().Length() > 0) {
+
+ BMessage repositoriesEnvelope;
+ BMessage result;
+ double total;
+ StringList repositorySourceBaseURLs;
+
+ repositorySourceBaseURLs.Add(depotInfo.BaseURL());
+
+ // TODO; better API call handling around errors.
+ if (fWebAppInterface.RetrieveRepositoriesForSourceBaseURLs(
+ repositorySourceBaseURLs, repositoriesEnvelope) == B_OK
+ && repositoriesEnvelope.FindMessage("result", &result)
== B_OK
+ && result.FindDouble("total", &total) == B_OK) {
+
+ if ((int64) total > 0) {
+ if (status == B_OK) {
+ // Parse message
+ // info.PrintToStream();