2011-01-22 01:18:58 +03:00
|
|
|
/*
|
|
|
|
* Copyright 2011, Haiku, Inc.
|
|
|
|
* Distributed under the terms of the MIT License.
|
|
|
|
*/
|
2011-01-25 20:07:27 +03:00
|
|
|
#ifndef _PACKAGE__REPOSITORY_CONFIG_H_
|
|
|
|
#define _PACKAGE__REPOSITORY_CONFIG_H_
|
2011-01-22 01:18:58 +03:00
|
|
|
|
|
|
|
|
2011-01-24 23:48:03 +03:00
|
|
|
#include <Entry.h>
|
2011-01-22 01:18:58 +03:00
|
|
|
#include <String.h>
|
|
|
|
|
|
|
|
|
2011-01-25 20:07:27 +03:00
|
|
|
namespace BPackageKit {
|
2011-01-22 01:18:58 +03:00
|
|
|
|
|
|
|
|
2011-01-25 22:36:09 +03:00
|
|
|
class BRepositoryConfig {
|
2011-01-22 01:18:58 +03:00
|
|
|
public:
|
2011-01-25 20:07:27 +03:00
|
|
|
BRepositoryConfig();
|
|
|
|
BRepositoryConfig(const BString& name,
|
2011-01-25 22:36:09 +03:00
|
|
|
const BString& url, uint8 priority);
|
2011-01-25 20:07:27 +03:00
|
|
|
BRepositoryConfig(const BEntry& entry);
|
|
|
|
virtual ~BRepositoryConfig();
|
2011-01-22 01:18:58 +03:00
|
|
|
|
2011-01-25 22:36:09 +03:00
|
|
|
status_t Store(const BEntry& entry) const;
|
2011-01-22 01:18:58 +03:00
|
|
|
|
2011-01-24 23:48:03 +03:00
|
|
|
status_t SetTo(const BEntry& entry);
|
2011-01-22 01:18:58 +03:00
|
|
|
status_t InitCheck() const;
|
|
|
|
|
|
|
|
const BString& Name() const;
|
2011-01-25 22:36:09 +03:00
|
|
|
const BString& BaseURL() const;
|
2011-01-22 01:18:58 +03:00
|
|
|
uint8 Priority() const;
|
|
|
|
bool IsUserSpecific() const;
|
|
|
|
|
2011-01-24 23:48:03 +03:00
|
|
|
const BEntry& Entry() const;
|
|
|
|
|
2011-01-22 01:18:58 +03:00
|
|
|
void SetName(const BString& name);
|
2011-01-25 22:36:09 +03:00
|
|
|
void SetBaseURL(const BString& url);
|
2011-01-22 01:18:58 +03:00
|
|
|
void SetPriority(uint8 priority);
|
|
|
|
void SetIsUserSpecific(bool isUserSpecific);
|
|
|
|
|
|
|
|
public:
|
2011-01-25 22:36:09 +03:00
|
|
|
static const uint8 kUnsetPriority = 0;
|
2011-01-22 01:18:58 +03:00
|
|
|
|
|
|
|
private:
|
|
|
|
status_t fInitStatus;
|
|
|
|
|
|
|
|
BString fName;
|
2011-01-25 22:36:09 +03:00
|
|
|
BString fBaseURL;
|
2011-01-22 01:18:58 +03:00
|
|
|
uint8 fPriority;
|
|
|
|
bool fIsUserSpecific;
|
2011-01-24 23:48:03 +03:00
|
|
|
|
|
|
|
BEntry fEntry;
|
2011-01-22 01:18:58 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2011-01-25 20:07:27 +03:00
|
|
|
} // namespace BPackageKit
|
2011-01-22 01:18:58 +03:00
|
|
|
|
|
|
|
|
2011-01-25 20:07:27 +03:00
|
|
|
#endif // _PACKAGE__REPOSITORY_CONFIG_H_
|