Implemented repository writing:
* fleshed out RepositoryWriterImpl * renamed BRepositoryHeader to BRepositoryInfo (in accordance with BPackageInfo) * adjusted BRepositoryInfo to be able to parse itself from a driver_settings file * added package_repo binary (only 'create' works as of yet) git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40405 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -0,0 +1,75 @@
|
||||
/*
|
||||
* 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 <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;
|
||||
|
||||
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);
|
||||
|
||||
public:
|
||||
static BRepositoryInfo* Instantiate(BMessage* data);
|
||||
|
||||
static const uint8 kDefaultPriority;
|
||||
|
||||
static const char* kNameField;
|
||||
static const char* kURLField;
|
||||
static const char* kVendorField;
|
||||
static const char* kSummaryField;
|
||||
static const char* kPriorityField;
|
||||
static const char* kArchitectureField;
|
||||
|
||||
private:
|
||||
status_t fInitStatus;
|
||||
|
||||
BString fName;
|
||||
BString fOriginalBaseURL;
|
||||
BString fVendor;
|
||||
BString fSummary;
|
||||
uint8 fPriority;
|
||||
BPackageArchitecture fArchitecture;
|
||||
};
|
||||
|
||||
|
||||
} // namespace BPackageKit
|
||||
|
||||
|
||||
#endif // _PACKAGE__REPOSITORY_INFO_H_
|
||||
Reference in New Issue
Block a user