void PackageInstaller::ArgvReceived(int32 argc, char **argv) { int i; BPath path; entry_ref ref; status_t ret = B_OK; PackageWindow *iter = 0; for (i = 1; i < argc; i++) { if (path.SetTo(argv[i]) != B_OK) { fprintf(stderr, B_TRANSLATE("Error! \"%s\" is not a valid path.\n"), argv[i]); continue; } ret = get_ref_for_path(path.Path(), &ref); if (ret != B_OK) { fprintf(stderr, B_TRANSLATE("Error (%s)! Could not open \"%s\".\n"), strerror(ret), argv[i]); continue; } iter = new PackageWindow(&ref); fWindowCount++; iter->Show(); } }
void PackageInstaller::_NewWindow(const entry_ref* ref) { PackageWindow* window = new PackageWindow(ref); window->Show(); fWindowCount++; }
void PackageInstaller::RefsReceived(BMessage *msg) { uint32 type; int32 i, count; status_t ret = msg->GetInfo("refs", &type, &count); if (ret != B_OK || type != B_REF_TYPE) return; entry_ref ref; PackageWindow *iter; for (i = 0; i < count; i++) { if (msg->FindRef("refs", i, &ref) == B_OK) { iter = new PackageWindow(&ref); fWindowCount++; iter->Show(); } } }