mirror of
https://review.haiku-os.org/haiku
synced 2025-01-19 21:11:28 +01:00
fda0bf77fb
Revert "repo rework: Remove stubs; Breaks repo compat." Revert "repo rework: Remove need for repos to be self-aware" This reverts commit a2b2f4d6427914cdcdb59943dd8e4a0bfdcd53ee. This reverts commit 602076ef82647a48fd10f4d1ec830bb4242f9eb6. This reverts commit 5ffaf72c8a74a7eb6827e4d2b1f47c9360ddaefe. These changes break the build on Haiku and the ability to create repo mirrors, for the lack of a replacement for the URL (an UUID was evoked on the mailing lists, but not implemented). We are due for a release soon, please don't break the build.
91 lines
2.3 KiB
C++
91 lines
2.3 KiB
C++
/*
|
|
* Copyright 2011, Haiku, Inc.
|
|
* Distributed under the terms of the MIT License.
|
|
*/
|
|
#ifndef _PACKAGE__REPOSITORY_INFO_H_
|
|
#define _PACKAGE__REPOSITORY_INFO_H_
|
|
|
|
|
|
#include <Archivable.h>
|
|
#include <Entry.h>
|
|
#include <StringList.h>
|
|
#include <String.h>
|
|
|
|
#include <package/PackageArchitecture.h>
|
|
|
|
|
|
namespace BPackageKit {
|
|
|
|
|
|
class BRepositoryInfo : public BArchivable {
|
|
typedef BArchivable inherited;
|
|
|
|
public:
|
|
BRepositoryInfo();
|
|
BRepositoryInfo(BMessage* data);
|
|
BRepositoryInfo(const BEntry& entry);
|
|
virtual ~BRepositoryInfo();
|
|
|
|
virtual status_t Archive(BMessage* data, bool deep = true) const;
|
|
|
|
status_t SetTo(const BMessage* data);
|
|
status_t SetTo(const BEntry& entry);
|
|
status_t InitCheck() const;
|
|
|
|
const BString& Name() const;
|
|
const BString& OriginalBaseURL() const;
|
|
const BString& Vendor() const;
|
|
const BString& Summary() const;
|
|
uint8 Priority() const;
|
|
BPackageArchitecture Architecture() const;
|
|
const BStringList& LicenseNames() const;
|
|
const BStringList& LicenseTexts() const;
|
|
|
|
void SetName(const BString& name);
|
|
void SetOriginalBaseURL(const BString& url);
|
|
void SetVendor(const BString& vendor);
|
|
void SetSummary(const BString& summary);
|
|
void SetPriority(uint8 priority);
|
|
void SetArchitecture(BPackageArchitecture arch);
|
|
|
|
status_t AddLicense(const BString& licenseName,
|
|
const BString& licenseText);
|
|
void ClearLicenses();
|
|
|
|
public:
|
|
static BRepositoryInfo* Instantiate(BMessage* data);
|
|
|
|
static const uint8 kDefaultPriority;
|
|
|
|
static const char* const kNameField;
|
|
static const char* const kURLField;
|
|
static const char* const kVendorField;
|
|
static const char* const kSummaryField;
|
|
static const char* const kPriorityField;
|
|
static const char* const kArchitectureField;
|
|
static const char* const kLicenseNameField;
|
|
static const char* const kLicenseTextField;
|
|
|
|
private:
|
|
status_t _SetTo(const BMessage* data);
|
|
status_t _SetTo(const BEntry& entry);
|
|
|
|
private:
|
|
status_t fInitStatus;
|
|
|
|
BString fName;
|
|
BString fOriginalBaseURL;
|
|
BString fVendor;
|
|
BString fSummary;
|
|
uint8 fPriority;
|
|
BPackageArchitecture fArchitecture;
|
|
BStringList fLicenseNames;
|
|
BStringList fLicenseTexts;
|
|
};
|
|
|
|
|
|
} // namespace BPackageKit
|
|
|
|
|
|
#endif // _PACKAGE__REPOSITORY_INFO_H_
|